Code: Alles auswählen.
IF rs_selfield-fieldname = 'RSNUM'.
" CALL TRANSACTION 'MB26' AND SKIP FIRST SCREEN.
DATA:
it_using_tab TYPE STANDARD TABLE OF bdcdata ,
wa_using_tab LIKE LINE OF it_using_tab.
CLEAR: wa_using_tab.
wa_using_tab-program = 'PP_PICK_LIST'.
wa_using_tab-dynpro = '1000'.
wa_using_tab-dynbegin = 'X'.
APPEND wa_using_tab TO it_using_tab.
CLEAR: wa_using_tab.
wa_using_tab-fnam = 'BDC_CURSOR'.
wa_using_tab-fval = 'S_RSNUM-LOW'.
APPEND wa_using_tab TO it_using_tab.
CLEAR: wa_using_tab.
wa_using_tab-fnam = 'BDC_OKCODE'.
wa_using_tab-fval = '=ONLI'.
APPEND wa_using_tab TO it_using_tab.
CLEAR: wa_using_tab.
wa_using_tab-fnam = 'S_RSNUM-LOW'.
wa_using_tab-fval = r_sop-rsnum.
APPEND wa_using_tab TO it_using_tab.
CALL TRANSACTION 'MB26' USING it_using_tab MODE 'E'." UPDATE 'E'.
RETURN.
ENDIF.
Code: Alles auswählen.
DATA:
it_using_tab TYPE STANDARD TABLE OF bdcdata ,
wa_using_tab LIKE LINE OF it_using_tab,
options TYPE ctu_params.
CLEAR: wa_using_tab.
wa_using_tab-program = 'PP_PICK_LIST'.
wa_using_tab-dynpro = '1000'.
wa_using_tab-dynbegin = 'X'.
APPEND wa_using_tab TO it_using_tab.
CLEAR: wa_using_tab.
wa_using_tab-fnam = 'BDC_CURSOR'.
wa_using_tab-fval = 'S_RSNUM-LOW'.
APPEND wa_using_tab TO it_using_tab.
CLEAR: wa_using_tab.
wa_using_tab-fnam = 'BDC_OKCODE'.
wa_using_tab-fval = '=ONLI'.
APPEND wa_using_tab TO it_using_tab.
CLEAR: wa_using_tab.
wa_using_tab-fnam = 'S_RSNUM-LOW'.
wa_using_tab-fval = r_sop-rsnum.
APPEND wa_using_tab TO it_using_tab.
options-racommit = abap_true.
options-updmode = 'S'.
CALL TRANSACTION 'MB26' USING it_using_tab
OPTIONS FROM options.