CALL FUNCTION 'BDC_OPEN_GROUP'
EXPORTING
CLIENT = SY-MANDT
GROUP = 'TT Clearing'
USER = 'PICONN'
KEEP = 'X'.
EXPORTING
CLIENT = SY-MANDT
GROUP = 'TT Clearing'
USER = 'PICONN'
KEEP = 'X'.
2 寫入BDC動作
CLEAR: GT_BDCDATA[].
PERFORM BDC_DYNPRO USING 'SAPMF05A' '0122'.
PERFORM BDC_FIELD USING 'BDC_OKCODE' '/00'.
PERFORM BDC_FIELD USING 'BKPF-BLDAT' SY-DATUM.
PERFORM BDC_FIELD USING 'BDC_OKCODE' '/00'.
PERFORM BDC_FIELD USING 'BKPF-BLDAT' SY-DATUM.
......
3 指定TCODE
CALL FUNCTION 'BDC_INSERT'
EXPORTING
TCODE = 'F-04'
TABLES
DYNPROTAB = GT_BDCDATA.
EXPORTING
TCODE = 'F-04'
TABLES
DYNPROTAB = GT_BDCDATA.
4 多TCODE時重覆 Step 2、3
5 結束GROUP
CALL FUNCTION 'BDC_CLOSE_GROUP'.
6 執行SM35 Session(GROUP)
SUBMIT RSBDCSUB WITH MAPPE EQ 'TT Clearing'
WITH VON EQ SY-DATUM
WITH BIS EQ SY-DATUM
WITH Z_VERARB EQ 'X'
WITH FEHLER EQ ' '
EXPORTING LIST TO MEMORY
AND RETURN.
WITH VON EQ SY-DATUM
WITH BIS EQ SY-DATUM
WITH Z_VERARB EQ 'X'
WITH FEHLER EQ ' '
EXPORTING LIST TO MEMORY
AND RETURN.