| Forums.Sureshkumar.net : A Perfect Place to Share Knowledge Blogs Games Magazines |
|
|
#1 (permalink) |
|
Super Moderator
Join Date: Mar 2006
Posts: 4,803
Thanks: 9 Thanked 630 Times in 488 Posts Thanks: 9
Thanked 630 Times in 488 Posts
Blog Entries: 2
Rep Power: 101
|
BDC (Batch Data Communication) The SAP System offers three methods for transferring data into the System from other SAP Systems and non-SAP Systems. These methods are collectively called "batch input" or "batch data communication." Uses of Batch Input • Transferring data from another system when you install your SAP System • • Regularly transferring data that is captured by a non-SAP system in your company into the SAP System. • • You can also use batch input to transfer data between two R/3 Systems. Basic Technique All batch input methods work by carrying out normal SAP transactions, just as any user would. Batch-input executes the transactions automatically and is therefore suitable for entering large amounts of data that are already available . The batch input technique offers these advantages for transferring data: • No manual interaction is required during data transfer. • • Batch input ensures data integrity |
|
|
|
|
|
#2 (permalink) |
|
Super Moderator
Join Date: Mar 2006
Posts: 4,803
Thanks: 9 Thanked 630 Times in 488 Posts Thanks: 9
Thanked 630 Times in 488 Posts
Blog Entries: 2
Rep Power: 101
|
Batch input processing methods • Method 1 - CLASSICAL BATCH INPUT • • Method 2 - CALL TRANSACTION • • Method 3 - CALL DIALOG Method 1 - Classical batch input. be entered in the SAP System and stores the data in a "batch-input session." When the program has finished generating the session, you can run the session to execute the SAP transactions in it. This method uses the function modules BDC_OPEN, BDC_INSERT, and BDC_CLOSE to generate sessions. Method 2 - CALL TRANSACTION USING In this method, your program uses the ABAP/4 CALL TRANSACTION USING statement to run an SAP transaction. Batch-input data is not deposited in a session for later processing. Instead, the entire batch-input process takes place inline in your program. Method 3 - CALL DIALOG There is a third batch-input method using the ABAP/4 CALL DIALOG statement. SAP recommends against using this method unless necessary. The CALL DIALOG method is now outdated and is more complex and less comfortable to use than the other techniques. |
|
|
|
|
|
#3 (permalink) |
|
Super Moderator
Join Date: Mar 2006
Posts: 4,803
Thanks: 9 Thanked 630 Times in 488 Posts Thanks: 9
Thanked 630 Times in 488 Posts
Blog Entries: 2
Rep Power: 101
|
BDCDATA All three batch-input methods use a common data structure for holding the instructions and data for SAP transactions. This structure is defined as structure BDCDATA in the ABAP/4 Dictionary. FIELD NAME TYPE LENGTH DESCRIPTION PROGRAM CHAR 8 BDC MODULE POOL DYNPRO NUMC 4 BDC DYNPRO NUMBER DYNBEGIN CHAR 1 BDC STARTING A DYNPRO FNAM CHAR 35 BDC FIELD NAME FVAL CHAR 80 BDC FIELD VALUE |
|
|
|
|
|
#4 (permalink) |
|
Super Moderator
Join Date: Mar 2006
Posts: 4,803
Thanks: 9 Thanked 630 Times in 488 Posts Thanks: 9
Thanked 630 Times in 488 Posts
Blog Entries: 2
Rep Power: 101
|
Filling the BDCDATA Structure identifies the screen: program name, screen name and a start-of-screen indicator. You record this information in the PROGRAM, DYNPRO, and DYNBEGIN fields of the BDCDATA structure. Example BDCDATA-PROGRAM = 'sapms38m'. BDCDATA-DYNPRO = '0100'. BDCDATA-DYNBEGIN = 'x'. APPEND BDCDATA. Entering a Value in a Field After the dynpro-start record, you must add a record for each field that is to receive a value. You need fill only the FNAM and FVAL fields. Example BDCDATA-FNAM = 'RS38M-FUNC_EDIT'. BDCDATA-FVAL = 'x'. APPEND BDCDATA. Executing a function You can execute a function in a transaction by entering the functioncode or function key number in the command field of an SAP session. You use the FNAM and FVAL fields to enter this information, just as you would for normal screen fields. The command field is identified by a special name in batch input, BDC_OKCODE. This name is constant and always identifies the command field. For function key: BDCDATA-FNAM = 'BDC_OKCODE'. BDCDATA-FVAL = '/11'. For function code: BDCDATA-FNAM = 'BDC_OKCODE'. BDCDATA-FVAL = '=UPDA'. |
|
|
|
|
|
#5 (permalink) |
|
Super Moderator
Join Date: Mar 2006
Posts: 4,803
Thanks: 9 Thanked 630 Times in 488 Posts Thanks: 9
Thanked 630 Times in 488 Posts
Blog Entries: 2
Rep Power: 101
|
Entering Values in Loop Fields Some screen fields need multiple values, one on each line. To provide input to one of these loop fields, you must use an explicit line index : BDCDATA-FNAM = 'fieldx(5)'. BDCDATA-FVAL = 'value'. Positioning the cursor To position the cursor on a particular field, you must use the special cursor field: BDCDATA-FNAM = 'BDC_CURSOR'. BDCDATA-FVAL = 'fieldx'. Creating a Session with BDC_OPEN_GROUP BDC_OPEN_GROUP function module creates a new session. Once you have created a session, then you can insert batch input data into it with BDC_INSERT. You cannot re-open a session that already exists and has been closed. A batch input program may have only one session open at a time. Using BDC_INSERT This function module adds a transaction to a batch input session. You specify the transaction that is to be started in the call to BDC_INSERT. You must provide a BDCDATA structure that contains all of the data required to process the transaction completely. |
|
|
|
|
|
#6 (permalink) |
|
Super Moderator
Join Date: Mar 2006
Posts: 4,803
Thanks: 9 Thanked 630 Times in 488 Posts Thanks: 9
Thanked 630 Times in 488 Posts
Blog Entries: 2
Rep Power: 101
|
BDC_CLOSE_GROUP Use the BDC_CLOSE_GROUP function module to close a session after you have inserted all of your batch input data into it. Once a session is closed, it can be processed. You must close a session before you can open another session from the same program. CALL TRANSACTION USING for Batch Input Processing batch input data with CALL TRANSACTION USING is the faster of the two recommended batch input methods. In this method, batch input data is processed inline in your batch input program. Syntax: CALL TRANSACTION 'SE38' USING BDCDATA MODE 'A' UPDATE 'S'. |
|
|
|
![]() |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
| Display Modes | Rate This Thread |
|
|