Learning BDC Programming
Learning BDC Programming
Learning BDC Programming
I want to learn how to upload data using BDC. If I have a excel data file how will
upload it using BDC. I don't know the full process of doing it, if someone help me in
this. I want it using BDC session process and processing that session. I was trying to
upload material master other day. But could not follow the process of uploading using
BDC though I know LSMW. Please explain me the BDC process in details with
examples.
For a BDC upload you need to write a program which created BDC sessions.
Steps:
1. Work out the transaction you would use to create the data manually.
2. Use transaction SHDB to record the creation of one material master data.
Click the New recording button or the Menu - Recording - Create
3. Save the recording, and then go back a screen and go to the overview.
4. Select the recording and click on Edit - Create Program. Give the program a Z name, and
select transfer from recording.
5. Edit the program. You will see that all the data you entered is hard-coded into the
program. You need to make the following changes:
5.1 After the start-of-selection, Call ws_upload to upload the file (the excel file needs to be
saved as TAB separated).
5.2 After the open-group, Loop on the uploaded data. For each line, perform validation
checks on the data, then modify the perform bdc_field commands to use the file data.
5.3. After perform bdc_transaction, add the endloop.
Execute the program. It will have options to create a batch session or to process directly.
These are all my finds . Might be it will be useful to you.
Direct call of transactions, session handling:
/nxxxx This terminates the current transaction, and starts transaction xxxx
/n This terminates the transaction. This generally corresponds to pressing F15 to go back.
/nend This termiantes all separate sessions and logs off (corresponds to System - Logoff).
/nex This terminates all separate sessions and logs off immediately (without any warning!).
/oxxxx This opens a new session and starts transaction xxxx in This session.
/o This lists existing sessions and allows deletion or opening of a new session.
What is recording?
As the word record implies, it mean recording the keystroke of the user input of a SAP
transaction screen.
Why it is used?
It is normally used for mass update or uploading of data to the system.
What is its need?
It help to save time for the users who need to mass change the system data. For e.g. tax rate
change announce by the country government.
How it is related with bdc?
It is related to bdc because bdc programming allows recording of user inputs.