March-2005
Objectives
The participants will be able to:
Describe the Call Transaction Method for Batch Input.
Differentiate the different batch input methods.
March-2005
Overview
PROGRAM SAPMF02K DYNPRO 0106 DYNBEGIN X FNAM FVAL
RF02K-LIFNR
RF02K-D0110 SAPMF02K 0110 X LFA1-STRAS BDC_OKCODE BDC Table
TEST1
X 123 Main St. =UPDA
March-2005
Automatically by the system during the processing of the batch input session
CALL TRANSACTION:
CALL DIALOG:
March-2005
TEST1
TEST2
Address
Address
Name
Computers, Inc.
Name
Computer Land
Philadelphia
Data Interfaces | 7.07
CALL TRANSACTION <transaction code> USING MODE <bdc internal table> <display mode>
UPDATE
<update mode>
<msg int. table>.
MESSAGES INTO
<display mode>
A: display all E: display errors only N: no display
6 Data Interfaces | 7.07
<update mode>
S: synchronous A: asynchronous
March-2005
CALL TRANSACTION <transaction code> USING MODE <bdc internal table> <display mode>
UPDATE
<update mode>
<msg int. table>.
MESSAGES INTO
<display mode>
A: display all E: display errors only N: no display
7 Data Interfaces | 7.07
<update mode>
S: synchronous A: asynchronous
March-2005
DATA: BDC_TAB LIKE STANDARD TABLE OF BDCDATA INITIAL SIZE 6 WITH HEADER LINE,
INFILE(20) VALUE ./bc180_file4. DATA: BEGIN OF INREC,
Step #2
VENDNUM
END OF INREC. PARAMETERS:
LIKE LFA1-LIFNR,
Step #4 Step #5
Step #6
Step #7
Step #8
Step #9
Step #4 Step #5
Step #6
Step #7
Step #8
Step #9
Example #1 - Subroutines
FORM FILL_BDC_TAB. FORM POPULATE_BDC_TAB USING FLAG TYPE C VAR1 TYPE C VAR2 TYPE C. CLEAR BDC_TAB. IF FLAG = 1. BDC_TAB-PROGRAM = VAR1. BDC_TAB-DYNPRO = VAR2. BDC_TAB-DYNBEGIN = X. ELSE. BDC_TAB-FNAM = VAR1. BDC_TAB-FVAL = VAR2. ENDIF. APPEND BDC_TAB. ENDFORM. ENDFORM. Notice that the vendor number and street values are coming from the files records read into the INREC structure.
11 Data Interfaces | 7.07 March-2005
REFRESH BDC_TAB.
PERFORM POPULATE_BDC_TAB USING: 1 SAPMF02K RF02K-LIFNR VENDNUM, RF02K-D0110 1 SAPMF02K LFA1-STRAS BDC_OKCODE 0106, INRECX, 0110, INREC-STREET, =UPDA.
Error Handling
12
March-2005
With synchronous updating, we can check SY-SUBRC to determine the success of the transaction and the actual update to the database.
With asynchronous updating, we can check SY-SUBRC to determine the success of the transaction only, not the actual update to the database.
14
March-2005
Demonstration
Creation of a custom BDC program and changing customer address with transaction XD02 (Change Customer) using the Call transaction method.
15
March-2005
Practice
Creation of a custom BDC program and changing customer address with transaction XD02 (Change Customer) using the Call transaction method.
16
March-2005
Summary
If you use the CALL TRANSACTION or CALL DIALOG statement, errors are not handled automatically by the system. Errors must be handled in the batch input program. The CALL TRANSACTION statement executes an online program. When this transaction is completed, processing returns to the calling program.
17
March-2005
Questions
What are the different batch input methods present in SAP for data upload?
18
March-2005