Insert Custom table sap abap

***************Updating database tables*****************************

IF lt_itab IS NOT INITIAL.

INSERT zabc FROM TABLE lt_itab_hdr .
IF sy-subrc = 0 .
INSERT zabc_item FROM TABLE lt_itab.
IF sy-subrc = 0 .
CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'.                    " use FM instead of Commit work to avoid atc error
ELSE.
CALL FUNCTION 'BAPI_TRANSACTION_ROLLBACK'.
ENDIF.
ENDIF.
ENDIF.
ENDIF.

Comments

Popular posts from this blog

Export data to xls using OOPS

Factory method ALV sap abap

Delete Selected Record in ALV Report