SAP ABAP/4 Learning---BDC batch input written in the internal table program
Source: Internet
Author: User
Program
*-----------------------------------------------------------------------
* Program ID:ZTEST904_BDC
* Program NAME:ZTEST904_BDC
*-----------------------------------------------------------------------
* CREATED date:2004/09/04
* CREATED By:liugang
* DESCRIPTION: This program is to learn how to use the program to invoke
* The BDC automatically imports data.
*-----------------------------------------------------------------------
* Modification:
* DATE MODIFIED MODIFIED by Transport REQUEST DESCRIPTION
* 2004/09/04 Liugang version:01/01 Learning
*-----------------------------------------------------------------------
The ZTEST904_BDC.
* Define the inner table in the BDC format
**************************************************
Data:begin of i_bdcdata occurs 0,
*BDC's program name, such as the Code MM01 program name SAPLMGMM (SAP standard program)
Program like Bdcdata-program,
*BDC Dynpro Number
Dynpro like Bdcdata-dynpro,
*BDC BDC Dynpro started
Dynbegin like Bdcdata-dynbegin,
*BDC Project Name
Fnam like Bdcdata-fnam,
Added value of *BDC project name
FVal like Bdcdata-fval,
End of I_bdcdata.
* Start-of-selection
Start-of-selection.
LOOP at Itab.
Perform append_mm01 USING itab-a.
Perform RUN_BDC.
Endloop.
*---------------------------------------------------------------------*
* FORM APPEND_DATA_MM01 *
*---------------------------------------------------------------------*
* Define a subroutine in which to store each step of the operation
*---------------------------------------------------------------------*
FORM append_mm01 USING fval like itab-a.
Clear I_bdcdata.
Clear i_bdcdata[].
* Start a new screen event
*0173 screen
* The name of the program and the BDC Dynpro number, the beginning of the mark to write the table header,
I_bdcdata-program = ' saplmgmm '.
I_bdcdata-dynpro = ' 0060 '.
I_bdcdata-dynbegin = ' X '.
APPEND I_bdcdata.
Clear I_bdcdata.
*---------------------------------------------------------------------*
* FORM RUN_BDC *
*---------------------------------------------------------------------*
* ........ *
*---------------------------------------------------------------------*
FORM RUN_BDC.
* Start calling transaction MM01, pass the good BDC object to the past, and then set the pattern to a,
* That is to say, all windows are visible.
* N means don't see it
Call TRANSACTION ' MM01 ' USING i_bdcdata MODE ' N '.
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.
A Free Trial That Lets You Build Big!
Start building with 50+ products and up to 12 months usage for Elastic Compute Service