This document contains ABAP code that uploads data from a file into a SAP system table. It uses GUI_UPLOAD to import the file data into an internal table. The data is then processed using BDC functionality to create and update records in table ZTAB_001 via transaction SM30. Open and close group forms are used to manage the BDC session.
Historical philosophical, theoretical, and legal foundations of special and i...
ZBDC_004 report
1. REPORT ZBDC_004 NO STANDARD PAGE HEADING LINE-SIZE 255.
*INCLUDE BDCRECX1.
TYPES: BEGIN OF T_TAB,
PERNR TYPE ZTAB_001-PERNR,
ENAME TYPE ZTAB_001-ENAME,
CITY TYPE ZTAB_001-CITY,
END OF T_TAB.
DATA: D_FILE TYPE STRING,
BDCDATA LIKE BDCDATA OCCURS 0 WITH HEADER LINE,
MESSTAB LIKE BDCMSGCOLL OCCURS 0 WITH HEADER LINE,
IT_DATA TYPE TABLE OF T_TAB,
WA_DATA TYPE T_TAB.
PARAMETERS: P_FILE TYPE IBIPPARMS-PATH OBLIGATORY.
AT SELECTION-SCREEN ON VALUE-REQUEST FOR P_FILE.
CALL FUNCTION 'F4_FILENAME'
IMPORTING
FILE_NAME = P_FILE.
D_FILE = P_FILE.