Code: Alles auswählen.
CALL FUNCTION 'ABAP4_CALL_TRANSACTION' DESTINATION 'P11_050' STARTING NEW TASK 'TEST'
EXPORTING
tcode = 'VA01'
* SKIP_SCREEN = ' '
* MODE_VAL = 'A'
* UPDATE_VAL = 'A'
* IMPORTING
* SUBRC =
* TABLES
* USING_TAB =
* SPAGPA_TAB =
* MESS_TAB =
EXCEPTIONS
CALL_TRANSACTION_DENIED = 1
TCODE_INVALID = 2
OTHERS = 3
.
IF sy-subrc <> 0.
* Implement suitable error handling here
ENDIF.
Code: Alles auswählen.
IF SKIP_SCREEN EQ SPACE AND L_USING_TAB_LINES EQ 0.
CALL TRANSACTION TCODE.
ELSEIF SKIP_SCREEN NE SPACE.
CALL TRANSACTION TCODE AND SKIP FIRST SCREEN.
ELSE.
CALL TRANSACTION TCODE USING USING_TAB MODE MODE_VAL UPDATE
UPDATE_VAL MESSAGES INTO MESS_TAB.
SUBRC = SY-SUBRC.
ENDIF.