Author(s) Name: Nitesh Pandey and Rahul Sharma
BDC stands for Batch Data Communication. It is a technique for mass input of data by simulating user inputs in screens of existing transactions. In simple words, it is used to transfer data in bulk from non sap systems to sap systems.
Standard SAP consistency checks and authorizations are automatically performed.
There are two main techniques widely used for this purpose. These are
Ø Batch Input Session (BI session)
Ø Call Transaction Using (CTU)
Both must be programmed in ABAP Programs. First recording of transaction needs to be done for both the methods by using SHDB transaction. Then this recording can be triggered by using any of these methods.
Steps involved in recording: Following steps are performed to record any transaction.
1.) Open transaction shdb.
2.) Click on New recording button.
3.) Enter recording name(ZNK_BDC1) and transaction name(SM30).
Note: Field description on the above screen shot:
i.) Recording: Enter name of the recording.(e.g. ZNK_BDC1).
ii.) Transaction code: Enter the transaction code for which recording needs to be done.(e.g. SM30).
iii.) Update mode: Select any one from the dropdown list. It controls how the actual
SAP database updates are performed.
Asynchronous mode: It is the default mode and the fastest mode for updating database. It does not wait till the update in database is complete either it is successful or un successful. Called transaction receives no completion message from the update module in asynchronous updating. The calling data transfer program, in turn, cannot determine whether a called transaction ended with a successful update of the database or not. That is why this mode is NOT recommended for processing any larger amount of data.
Synchronous mode: Execution is slower than asynchronous mode because called transactions wait for updating to be completed. However, the called transaction returns any update error message that occurs to your program. It is much easier for you to analyze and recover from errors.
Local mode: This mode is the one which is confined to a particular application server, where the BDC program is running.
4.) Click on Start recording button. Now the transaction first screen appears. Enter table/view name (ZNK_TABLE1).
5.) Click on Maintain button.
6.) Click on New Entries button and enter Plant = CH00 and Storage Location = 2000.
7.) Click on save button. Now keep on clicking on back button until the following screen appears.
8.) Till now the recording is complete. This recording can be used to generate the report program. For this, click on BACK button and select your recording name from the list of recordings and then click on Program tab.
9.) The following screen appears; fill the program name and description. Select the radio button Transfer from Recording and press enter.
10.) A report program is generated is se38. Now use the Call Transaction Method to read the data from any file and upload into the table.
11.) Logic to develop the program: If the data is coming from any .txt file, get the data into an internal table it_final_data. Now loop at the internal table and use the code got from above recording. Find below the code snippet for your reference.
Error Handling: While using Call Transaction store all the messages into some internal table and interpret them by using FM 'FORMAT_MESSAGE'.
Have content to add? Just click here, be sure to add labels to help others find the relevant information quickly!
- Getting Started
SAP Mentor FAQ
Our Community Members
Show Your Community Pride
Run Better with SAP Community Network
Online Users Record
Hotly Discussed Topics
SAP NetWeaver 7.3 Info Wiki Part1
SAP Network Blogger Awards