REPORT ZLYHR01. DATA:TP1008 TYPE TABLE OF P1008,
SP1008 TYPE P1008. SP1008-PLVAR = ''.
SP1008-OTYPE = 'O'.
SP1008-OBJID = ''.
SP1008-INFTY = ''.
SP1008-SUBTY = ''.
SP1008-ISTAT = ''.
SP1008-BEGDA = ''.
SP1008-ENDDA = ''.
SP1008-VARYF = ''.
SP1008-BUKRS = ''.
SP1008-GSBER = ''.
SP1008-WERKS = ''.
SP1008-PERSA = ''.
SP1008-KOKRS = ''.
APPEND SP1008 TO TP1008. CALL FUNCTION 'RH_INSERT_INFTY'
EXPORTING
FCODE = 'INSE' "FCODE
VTASK = 'D' "VTASK
* ORDER_FLG = ORDER_FLG
* COMMIT_FLG = COMMIT_FLG
* AUTHY = AUTHY
* PPPAR_IMP = PPPAR_IMP
* KEEP_LUPD = KEEP_LUPD "VWMWF
* WORKF_ACTV = WORKF_ACTV "VWMWF
TABLES
INNNN = TP1008 "IP1001
* ILFCODE = ILFCODE "VWMWF
EXCEPTIONS
NO_AUTHORIZATION =
ERROR_DURING_INSERT =
REPID_FORM_INITIAL =
CORR_EXIT =
BEGDA_GREATER_ENDDA = .
IF SY-SUBRC = .
CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'
EXPORTING
WAIT = 'X'.
WRITE 'YES'.
ELSE.
CALL FUNCTION 'BAPI_TRANSACTION_ROLLBACK'.
WRITE: 'NO'.
ENDIF.
效果如下: