This BAPI function is used to call the transcation code MM02 to edit material.
First it will check whether or not the material exist in MAW1, if it does exist then it will call transaction MM02 but if it didn’t exist then it will call transaction MM24.
First it will check whether or not the material exist in MAW1, if it does exist then it will call transaction MM02 but if it didn’t exist then it will call transaction MM24.
In this ABAP sample code, there’s an option where you can skip the first screen, if you check it then you will be prompted with a select views data.
Report Z_MATERIAL_EDIT.
Parameters: p_matnr like BAPIMATALL-MATERIAL,
p_fscrn like BAPIMATALL-SKIP_1ST_SCREEN.
p_fscrn like BAPIMATALL-SKIP_1ST_SCREEN.
Data: d_ret like BAPIRET1.
CALL FUNCTION ‘BAPI_MATERIAL_EDIT’
EXPORTING
EXPORTING
MATERIAL = p_matnr
SKIP_1ST_SCREEN = p_fscrn
IMPORTING
RETURN = d_ret
.
if sy-subrc = 0.
endif.
Run the program (F8), enter the material number and check the first screen checkbox if you want to skip the first screen.
Now you will see the transaction MM02 is executed with the select views data appeared (Skipping the first screen).
Post a Comment