Quantcast
Channel: SCN : Discussion List - BOPF Application Framework
Viewing all articles
Browse latest Browse all 249

Modification in BOPF Root object Data

$
0
0

Hello Experts,

 

I have created a BOPF Application with one root and one Dependent. I have created some root data and now want to edit that.

 

I am consuming my BOPF Application from SE38 report. I am not able to update the values for Root object.

 

Following steps i am following to Lock the Root and then edit the values of it.

 

I am getting dump when locking the Root. Some more data i have missed passing to the Modify method.

 

 

TRY.

     lo_txn_manager = /bobf/cl_tra_trans_mgr_factory=>get_transaction_manager( ).

     lo_serv_mgr    = /bobf/cl_tra_serv_mgr_factory=>get_service_manager( zif_may1_trq1_c=>sc_bo_key ).

     lo_bo_config   = /bobf/cl_frw_factory=>get_configuration( zif_may1_trq1_c=>sc_bo_key ).

   CATCH /bobf/cx_frw INTO lx_bopf.

     lv_error = lx_bopf->get_text( ).

     ASSERT CONDITION 1 = 2.

ENDTRY.

 

**** Get the details of the Root before modifying.

 

SELECT *

   FROM zmay1_d_root

   INTO TABLE lt_root_tab.

 

READ TABLE lt_root_tab INTO ls_root_wa INDEX 1.

IF sy-subrc EQ 0.

   ls_key-key = ls_root_wa-db_key.

   APPEND ls_key TO lt_key.

ENDIF.

 

CLEAR : lt_modification, ls_modification.

 

***** Lock the Root.

 

ls_modification-node = zif_may1_trq1_c=>sc_node-root.

ls_modification-root_key = ls_root_wa-db_key.

ls_modification-change_mode = 'E'.

APPEND ls_modification TO lt_modification.

CALL METHOD lo_serv_mgr->modify                      -  Getting Dump at this point.

   EXPORTING

     it_modification = lt_modification

   IMPORTING

     eo_change       = lr_chnge

     eo_message      = lr_message.

 

CLEAR : lt_modification, ls_modification.

 

CREATE DATA lr_data.

CHECK lr_data IS BOUND.

 

lr_data->trq_id = '200'.

lr_data->trq_desc = 'CHG'.

lr_data->src_loc = 'CHG'.

lr_data->des_loc = 'CHG'.

 

ls_modification-node = zif_may1_trq1_c=>sc_node-root.

ls_modification-change_mode = 'U'.

ls_modification-data = lr_data.

ls_modification-root_key = ls_root_wa-db_key.

APPEND ls_modification TO lt_modification.

 

 

CALL METHOD lo_serv_mgr->modify

   EXPORTING

     it_modification = lt_modification

   IMPORTING

     eo_change       = lr_chnge

     eo_message      = lr_message.

 

 

lo_txn_manager->save(

EXPORTING

   iv_transaction_pattern = /bobf/if_tra_c=>gc_tp_save_and_continue    " Data element for a transaction pattern

IMPORTING

   ev_rejected            =   lv_rejected          " Data element for domain BOOLE: TRUE (='X') and FALSE (=' ')

   eo_change              =   lr_eo_change         " Interface for transaction change objects

   eo_message             =   lr_eo_message        " Interface of Message Object

   et_rejecting_bo_key    =   lt_rejecting_bo_key  " Key table

).



BR,

Nikhil Kulkarni


Viewing all articles
Browse latest Browse all 249

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>