Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

'ME_DIRECT_INPUT_SOURCE_LIST' not updated the changed values

vallamuthu_madheswaran2
Active Contributor
0 Kudos

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.

1 ACCEPTED SOLUTION

former_member207020
Active Contributor
0 Kudos

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

1 REPLY 1

former_member207020
Active Contributor
0 Kudos

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