Chapter 07_ Call Transaction Method
Chapter 07_ Call Transaction Method
Objectives
Overview
Automatically by the
Create batch During the processing of
system during the
input session the batch input session
processing of the batch
input session
(BDC Program):
X Address X Address
REPORT YDI00007.
Example #1 - Subroutines
FORM FILL_BDC_TAB. FORM POPULATE_BDC_TAB USING
FLAG TYPE C
REFRESH BDC_TAB. VAR1 TYPE C
VAR2 TYPE C.
PERFORM POPULATE_BDC_TAB CLEAR WA_BDC_TAB.
USING: IF FLAG = ‘1’.
WA_BDC_TAB-PROGRAM = VAR1.
‘1’ ‘SAPMF02K’ ‘0106’, WA_BDC_TAB-DYNPRO = VAR2.
‘ ’ ‘RF02K-LIFNR’ INREC- WA_BDC_TAB-DYNBEGIN = ‘X’.
VENDNUM, ELSE.
‘ ’ ‘RF02K-D0110’ ‘X’, WA_BDC_TAB-FNAM = VAR1.
WA_BDC_TAB-FVAL = VAR2.
‘1’ ‘SAPMF02K’ ‘0110’, ENDIF.
‘ ’ ‘LFA1-STRAS’ INREC-STREET, APPEND WA_BDC_TAB TO
‘ ’ ‘BDC_OKCODE’ ‘=UPDA’. BDC_TAB.
ENDFORM. ENDFORM.
Notice that the vendor number and street values are coming from the
file’s records read into the “INREC” structure.
Error Handling
Call Transaction
DO. DO.
... ...
PERFORM FILL_BDC_TAB. PERFORM FILL_BDC_TAB.
CALL TRANSACTION ‘FK02’ CALL TRANSACTION ‘FK02’
USING BDC_TAB USING BDC_TAB
MODE ‘N’ MODE ‘N’
UPDATE ‘S’. UPDATE ‘A’.
IF SY-SUBRC <> 0. IF SY-SUBRC <> 0.
WRITE: / ‘Error’. WRITE: / ‘Transaction error’.
ENDIF. ENDIF.
ENDDO. ENDDO.
Demonstration
Practice
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.
Questions
What are the different batch input methods present in SAP for data upload?
What is the difference between synchronous and asynchronous update?