Application Development and Automation 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: 
Read only

Problem : Modify (bopf) don´t change table data.

ronaldo_aparecido
Contributor
0 Likes
948

Dear experts.

I have a code and i need to save items data then my code is :

  /scmtms/cl_mod_helper=>mod_create_multi(

     EXPORTING

       it_data        = lt_fo_item

       iv_node        = /scmtms/if_tor_c=>sc_node-item_tr

       iv_source_node = /scmtms/if_tor_c=>sc_node-root

       iv_association = /scmtms/if_tor_c=>sc_association-root-item_tr

     CHANGING

       ct_mod         = lt_mod ).


and after:


lo_fo_srvmgr = /bobf/cl_tra_serv_mgr_factory=>get_service_manager( /scmtms/if_tor_c=>sc_bo_key ).

   lo_fo_srvmgr->modify(

     EXPORTING

       it_modification = lt_mod

     IMPORTING

       eo_change = lo_change

       eo_message = lo_message ).

   IF lo_message IS BOUND .

     /scmtms/cl_common_helper=>msg_convert_bopf_2_bapiret2(

        EXPORTING

          io_message  = lo_message

        CHANGING

          ct_bapiret2 = lt_return[] ).


AND AFTER I USE SAVE.







MY PROBLEM IS :

1-I HAVE THE SAME VALUE FOO FIELD SRC_STOP_KEY = 2E262DF48B721ED596E496888A98A5F1  IN TWO LINES OF ITEM BEFORE CALL   /scmtms/cl_mod_helper=>mod_create_multi(  AND BEFORE THE MODIFY .


WHY , WHEN I GO TO SEE IT IN /N/BOBF/TEST_UI TRANSACTION   THE ITEM TABLE HAVE DIFERENT VALUES FOR FIELD SRC_STOP_KEY ?



MY CODE DONT CREATED CORRECTLY.

DO YOU  KNOW WHY OR HAVE SUGGESTIONS ?


THANKSW.

1 REPLY 1
Read only

Former Member
0 Likes
557

Is this Code in a Determination/Action class or standalone class/report program ?

1. If its a determination/action class which is being called within the process flow, then the standard Save will take care.

2. Otherwise there could be N number of reasons it might not be working. It would be good if you could give Full code, and the context in which this is being done. Attach the Code as a Notepad File instead of copy-paste.