08-18-2015 7:09 AM
Hi Friends,
I have to change the source list "valid to" date. I am using the FM ME_DIRECT_INPUT_SOURCE_LIST. But the source list value has not changed but the sy-subrc valuie is 0.
call function 'ME_INITIALIZE_SOURCE_LIST'. "Initializing source list creation/updation
call function 'ME_DIRECT_INPUT_SOURCE_LIST' "Upodating source list with LT_EORDU
exporting
i_matnr = gs_source_list-matnr "Material
i_werks = gs_source_list-werks "Plant
i_vorga = gc_b "B
tables
t_eord = lt_eordu "inetrnal table with source list data compatible with bapi
exceptions
plant_missing = 1
material_missing = 2
error_message = 4
others = 3.
Thanks with Regards,
Vallamuthu M.
08-18-2015 7:39 AM
Hi,
There is no COMMIT statement in FM ME_DIRECT_INPUT_SOURCE_LIST and therefore the values are not getting updated.
I did where used list of FM ME_DIRECT_INPUT_SOURCE_LIST and below FMs are used when sy-subrc is 0.
ME_POST_SOURCE_LIST_NEW
BAPI_TRANSACTION_COMMIT
Please try like below :-
call function 'ME_DIRECT_INPUT_SOURCE_LIST'
exporting
i_matnr = gs_source_list-material
i_werks = gs_source_list-plant
i_vorga = gc_b
tables
t_eord = lt_eordu
exceptions
plant_missing = 1
material_missing = 2
error_message | = 4 |
others = 3.
if sy-subrc = 0.
call function 'ME_POST_SOURCE_LIST_NEW'.
call function 'BAPI_TRANSACTION_COMMIT'.
else.
** Raise Error mesage
endif.
-Thanks
Learner
08-18-2015 7:39 AM
Hi,
There is no COMMIT statement in FM ME_DIRECT_INPUT_SOURCE_LIST and therefore the values are not getting updated.
I did where used list of FM ME_DIRECT_INPUT_SOURCE_LIST and below FMs are used when sy-subrc is 0.
ME_POST_SOURCE_LIST_NEW
BAPI_TRANSACTION_COMMIT
Please try like below :-
call function 'ME_DIRECT_INPUT_SOURCE_LIST'
exporting
i_matnr = gs_source_list-material
i_werks = gs_source_list-plant
i_vorga = gc_b
tables
t_eord = lt_eordu
exceptions
plant_missing = 1
material_missing = 2
error_message | = 4 |
others = 3.
if sy-subrc = 0.
call function 'ME_POST_SOURCE_LIST_NEW'.
call function 'BAPI_TRANSACTION_COMMIT'.
else.
** Raise Error mesage
endif.
-Thanks
Learner