Chapter 04 - Batch Input Methods
Chapter 04 - Batch Input Methods
Chapter 04 - Batch Input Methods
Data Interfaces |
Dec-2008
Objectives
The participants will be able to:
Research a transaction for the BDC purpose.
Describe the contents of a BDC table.
Declare a BDC table and how to fill the BDC table.
Data Interfaces |
Dec-2008
Overview
External System
Data
Data Interfaces |
SAP System
Batch Input
Dec-2008
External
Data
X
SAP
Checks &
Database
Validations
Table
External
Data
Data Interfaces |
Dec-2008
Online Program
To check and validate the external
data, user dialogue is simulated
through an SAP transaction
(i.e., an online program).
Vendor
TEST1
Company Code
Address
Name
Computers, Inc.
Street
City
Data Interfaces |
Philadelphia
Dec-2008
BDCDATA Structure
To simulate user dialogue,
you must know the
following information:
(1)
(2)
(3)
(4)
ABAP
ABAP Dictionary
Dictionary
BDCDATA
PROGRAM
DYNPRO
DYNBEGIN
FNAM
FVAL
Data Interfaces |
Dec-2008
Vendor
TEST1
Company Code
Address
X
For our example, we will use the
Change Vendor transaction
(FK02) to add a street address to
an already existing vendor.
Data Interfaces |
Name
Computers, Inc.
Street
City
Philadelphia
Dec-2008
Step #2
Step #3
Determine how to proceed in the
transaction
(go to the next screen by
pressing the Enter key).
Data Interfaces |
Dec-2008
Step #2
Step #3
Determine how to proceed in the
transaction (save the record by
clicking on the Save pushbutton
or pressing the CTRL+S key).
Data Interfaces |
Dec-2008
Step #2
Step #3
Determine how to proceed in the
transaction (save the record by
clicking on the Save pushbutton
or pressing the CTRL+S key).
10
Data Interfaces |
Dec-2008
PROGRAM
DYNPRO
DYNBEGIN
SAPMF02K
0106
SAPMF02K
0110
FNAM
FVAL
RF02K-LIFNR
TEST1
RF02K-D0110
BDC_OKCODE
/00
X
LFA1-STARS
BDC_OKCODE =UPDA
11
Data Interfaces |
Dec-2008
DATA:
DATA:
12
Data Interfaces |
Dec-2008
13
Data Interfaces |
CLEAR WA_BDC_TAB.
WA_BDC_TAB-PROGRAM = SAPMF02K.
WA_BDC_TAB-DYNPRO = 0111.
WA_BDC_TAB-DYNBEGIN = X.
APPEND WA_BDC_TAB TO BDC_TAB.
CLEAR WA_BDC_TAB.
WA_BDC_TAB-FNAM = LFA1-STRAS.
WA_BDC_TAB-FVAL = 123 Main St.
APPEND WA_BDC_TAB TO BDC_TAB.
CLEAR WA_BDC_TAB.
WA_BDC_TAB-FNAM = BDC_OKCODE.
WA_BDC_TAB-FVAL = =UPDA.
APPEND WA_BDC_TAB TO BDC_TAB.
ENDFORM.
Dec-2008
14
Data Interfaces |
CLEAR WA_BDC_TAB.
WA_BDC_TAB-PROGRAM = SAPMF02K.
WA_BDC_TAB-DYNPRO = 0111.
WA_BDC_TAB-DYNBEGIN = X.
APPEND WA_BDC_TAB TO BDC_TAB.
CLEAR WA_BDC_TAB.
WA_BDC_TAB-FNAM = LFA1-STRAS.
WA_BDC_TAB-FVAL = 123 Main St..
APPEND WA_BDC_TAB TO BDC_TAB.
CLEAR WA_BDC_TAB.
WA_BDC_TAB-FNAM = BDC_OKCODE.
WA_BDC_TAB-FVAL = =UPDA.
APPEND WA_BDC_TAB TO BDC_TAB.
ENDFORM.
Dec-2008
0106,
TEST1,
X,
1 SAPMF02K
LFA1-STRAS
BDC_OKCODE
0111,
123 Main St.,
=UPDA.
ENDFORM.
This two-subroutine method to fill the BDC table is preferable because the
POPULATE_BDC_TAB subroutine is reusable throughout all batch input programs.
15
Data Interfaces |
Dec-2008
0106,
TEST1,
X,
1 SAPMF02K
LFA1-STRAS
BDC_OKCODE
0111,
123 Main St.,
=UPDA.
ENDFORM.
This two-subroutine method to fill the BDC table is preferable because the
POPULATE_BDC_TAB subroutine is reusable throughout all batch input programs.
16
Data Interfaces |
Dec-2008
17
Method #1
Method #2
CALL TRANSACTION
USING Statement
Data Interfaces |
Dec-2008
Demonstration
Creation of a custom BDC program using call transaction method for transaction
XD02 (Change Customer).
18
Data Interfaces |
Dec-2008
Practice
Creation of a custom BDC program using call transaction method for transaction
XD02 (Change Customer).
19
Data Interfaces |
Dec-2008
Summary
The <bdc table> must be declared TYPE BDCDATA.
To fill the BDC table delete all entries first with the REFRESH statement
Initialize the Work-area with CLEAR statement.
Fill the header line (or staging area) with the
appropriate information. For a new screen entry, fill the PROGRAM, DYNPRO,
and and DYNBEGIN fields. For a field entry, fill the FNAM and FVAL fields
20
Data Interfaces |
Dec-2008
Questions
What are the fields present in the BDC table ?
What are the different Batch Input methods.
21
Data Interfaces |
Dec-2008