Beruflich Dokumente
Kultur Dokumente
Data Interfaces |
Dec-2008
Objectives
The participants will be able to:
Describe the Call Transaction Method for Batch Input.
Differentiate the different batch input methods.
Data Interfaces |
Dec-2008
Overview
PROGRAM
DYNPRO
DYNBEGIN
SAPMF02K
0106
SAPMF02K
0110
FNAM
FVAL
RF02K-LIFNR
TEST1
RF02K-D0110
LFA1-STRAS
BDC_OKCODE
BDC Table
Data Interfaces |
Use in CALL
TRANSACTION
statement
Dec-2008
Create batch
input session
(BDC Program):
CALL TRANSACTION:
CALL DIALOG:
Data Interfaces |
Automatically by the
system during the
processing of the batch
input session
Dec-2008
Vendor
TEST1
Company Code
X
Address
Name
Computers, Inc.
Vendor
TEST2
Company Code
X
Address
Name
Computer Land
City
City
Philadelphia
Data Interfaces |
Boston
Dec-2008
MODE
<display mode>
UPDATE
<update mode>
MESSAGES INTO
<display mode>
<update mode>
A: display all
S: synchronous
A: asynchronous
N: no display
Data Interfaces |
Dec-2008
MODE
<display mode>
UPDATE
<update mode>
MESSAGES INTO
<display mode>
<update mode>
A: display all
S: synchronous
A: asynchronous
N: no display
L: local update
Data Interfaces |
Dec-2008
Step #2
DATA:
BEGIN OF INREC,
VENDNUM TYPE LIFNR,
STREET TYPE STRAS_GP,
END OF INREC.
PARAMETERS:
DISPMODE DEFAULT A,
UPDAMODE DEFAULT S.
Data Interfaces |
Dec-2008
Step #8
Step #9
START-OF-SELECTION.
OPEN DATASET INFILE
FOR INPUT IN TEXT MODE.
DO.
READ DATASET INFILE INTO INREC.
IF SY-SUBRC <> 0.
EXIT.
ENDIF.
PERFORM FILL_BDC_TAB.
CALL TRANSACTION FK02
USING
BDC_TAB
MODE
DISPMODE
UPDATE UPDAMODE.
IF SY-SUBRC <> 0.
WRITE: / Error.
ENDIF.
ENDDO.
CLOSE DATASET INFILE.
** This program is continued on the next slide **
Data Interfaces |
Dec-2008
Step #8
Step #9
START-OF-SELECTION.
OPEN DATASET INFILE
FOR INPUT IN TEXT MODE.
DO.
READ DATASET INFILE INTO INREC.
IF SY-SUBRC <> 0.
EXIT.
ENDIF.
PERFORM FILL_BDC_TAB.
CALL TRANSACTION FK02
USING
BDC_TAB
MODE
DISPMODE
UPDATE UPDAMODE.
IF SY-SUBRC <> 0.
WRITE: / Error.
ENDIF.
ENDDO.
CLOSE DATASET INFILE.
** This program is continued on the next slide **
10
Data Interfaces |
Dec-2008
Example #1 - Subroutines
FORM FILL_BDC_TAB.
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.
ENDFORM.
Notice that the vendor number and street values are coming from the
files records read into the INREC structure.
11
Data Interfaces |
Dec-2008
Error Handling
12
Data Interfaces |
Dec-2008
13
Data Interfaces |
Dec-2008
14
Data Interfaces |
DO.
...
PERFORM FILL_BDC_TAB.
CALL TRANSACTION FK02
USING
BDC_TAB
MODE
N
UPDATE
A.
IF SY-SUBRC <> 0.
WRITE: / Transaction error.
ENDIF.
ENDDO.
Dec-2008
Demonstration
Creation of a custom BDC program and changing customer address with
transaction XD02 (Change Customer) using the Call transaction method.
15
Data Interfaces |
Dec-2008
Practice
Creation of a custom BDC program and changing customer address with
transaction XD02 (Change Customer) using the Call transaction method.
16
Data Interfaces |
Dec-2008
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
Data Interfaces |
Dec-2008
Questions
What are the different batch input methods present in SAP for data upload?
What is the difference between synchronous and asynchronous update?
18
Data Interfaces |
Dec-2008