Hi All,
I am Creating a BOPF BO with 3 Nodes,
Node 1) ROOT -- > contains a query,
using Root Node I have created Search UIBB Configuration in FBI.
In testing -- > when i enter Data in the Search Criteria Fields am able to get the details in to the query method
from Imporing parameter : 'IT_SELECTION_PARAMETERS'.
HERE I am fetching data from a standard table and trying to fill the data in the Node : 'MNR_SEARCH_RESULT'.
How to Append data to the Sub node 'MNR_SEARCH_RESULT' when there is no Node instance created in the ROOT Node ?
For This I have created an instance in the ROOT Node and Using that I tried to create Instance in the Sub Node 'MNR_SEARCH_RESULT'.
Below is my code which i have placed in the Query method ..
DATA : LR_DATA TYPE REF TO ZBO_S_ROOT1.
DATA : LR_SEARCH_RES TYPE REF TO ZBO_S_MNR_SEARCH_RESULT.
DATA : LO_CI_SERVICE_MANAGER TYPE REF TO /BOBF/IF_TRA_SERVICE_MANAGER,
LO_TRANSACTION_MANAGER TYPE REF TO /BOBF/IF_TRA_TRANSACTION_MGR.
LO_CI_SERVICE_MANAGER = /BOBF/CL_TRA_SERV_MGR_FACTORY=>GET_SERVICE_MANAGER( IV_BO_KEY = ZIF_BO_TEST_PO_C=>SC_BO_KEY ).
LO_TRANSACTION_MANAGER = /BOBF/CL_TRA_TRANS_MGR_FACTORY=>GET_TRANSACTION_MANAGER( ).
CREATE DATA LR_DATA.
LR_DATA->KEY = LO_CI_SERVICE_MANAGER->GET_NEW_KEY( ).
LR_DATA->ROOT_KEY = IS_CTX-ROOT_NODE_KEY.
LR_DATA->PIPO_MAT_ID = '100100'.
LR_DATA->PIPO_MAT_DESC = 'MATERIAL'.
LR_DATA->PIPO_SPRAS = 'E'.
LR_DATA->PIPO_MATL_TYPE = 'ZPMI'.
LR_DATA->PIPO_MATL_GROUP = 'ZKK'.
DATA lt_mod TYPE /bobf/t_frw_modification.
DATA lo_change TYPE REF TO /bobf/if_tra_change.
DATA lo_message TYPE REF TO /bobf/if_frw_message.
FIELD-SYMBOLS: <ls_mod> LIKE LINE OF lt_mod.
APPEND INITIAL LINE TO lt_mod ASSIGNING <ls_mod> .
<ls_mod>-node = ZIF_BO_TEST_PO_C=>sc_node-ROOT.
<ls_mod>-change_mode = /bobf/if_frw_c=>sc_modify_create.
<ls_mod>-key = LR_DATA->KEY.
<ls_mod>-data = LR_DATA.
DATA : LT_CHG_FIELDS TYPE /BOBF/T_FRW_NAME.
DATA : LS_CHG_FIELDS LIKE LINE OF LT_CHG_FIELDS.
DATA : LV_KEY TYPE /BOBF/CONF_KEY.
CALL METHOD IO_MODIFY->CREATE
EXPORTING
IV_NODE = ZIF_BO_TEST_PO_C=>sc_node-ROOT
IV_KEY = LR_DATA->KEY
IS_DATA = LR_DATA
IV_ROOT_KEY = IS_CTX-ROOT_NODE_KEY
IMPORTING
EV_KEY = LV_KEY .
CREATE DATA LR_SEARCH_RES.
LR_SEARCH_RES->KEY = LO_CI_SERVICE_MANAGER->GET_NEW_KEY( )..
LR_SEARCH_RES->PARENT_KEY = LV_KEY.
LR_SEARCH_RES->ROOT_KEY = LV_KEY.
LR_SEARCH_RES->MATNR = '123'.
LR_SEARCH_RES->ERSDA = SY-DATUM.
LR_SEARCH_RES->ERNAM = SY-UNAME.
**LR_SEARCH_RES->LAEDA = .
**LR_SEARCH_RES->AENAM = .
**LR_SEARCH_RES->VPSTA = .
*LR_SEARCH_RES->LVORM = .
LR_SEARCH_RES->MTART = 'ZPI'.
LR_SEARCH_RES->MBRSH = 'ZTP' .
LR_SEARCH_RES->MATKL = 'MAT'.
**LR_SEARCH_RES->BISMT = ''
**LR_SEARCH_RES->MEINS =
CALL METHOD io_modify->create
EXPORTING
iv_node = ZIF_BO_TEST_PO_C=>sc_node-MNR_SEARCH_RESULT
is_data = LR_SEARCH_RES
iv_assoc_key = ZIF_BO_TEST_PO_C=>sc_association-root-MNR_SEARCH_RESULT
iv_source_node_key = ZIF_BO_TEST_PO_C=>sc_node-root
iv_source_key = LV_KEY
iv_root_key = LV_KEY.
I am Unable to set data to the Node . I did not get any error message or Dump while executing . when i tried to retrive data I got the details from the node but am unable to view those details in the FBI UI and BOBT UI while testing .
Please provide your valuable Suggestions.
Thanks in Adv.
Thanks ,
Kranthi Kumar M.