on 06-21-2012 2:37 PM
Hi,
Can i know how to get the component name that was loaded in the webui.
ie: if we click account creation screen in UI component 'BP' is loaded. i want to get this component name for further processing in my z views.
Thanks.
Hi Prem,
I guess you are trying to get bol component or component set which gets loaded in the run time repository of a particular BSP component.
For that you need to redefine the window of the view where you need to fetch this bol component set value.Now create a public method in the window class like get_comp_loaded and do the following.
method get_comp_loaded ( returning rv_comp_loaded type string)
data : lr_rep type ref to REPOSITORY.
if me->repository is bound.
rv_comp_loaded = me->repository->GET_BOL_COMPONENT_SET ( ).
endmethod.
Then fetch the window of the view in one of the methods of implementation class.
data : lr_window type ref to zl_XXXX ( redefined window class).
lr_window ?= me->view_manager->get_window_controller( ).
lv_comp_loaded = lr_window ->get_comp_loaded ( ).
Regards,
Nithish
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thanks all for you quick replies...
Hi Nithish,
i have tried what you said. But i want to get this in the context node method IF_BSP_MODEL~INIT so that i can get the records from my Z table based on the component loaded and add the nodes to value node. i was not able to do this in the context node INIT method.
Hi Prem,
All you need to do it is to create a implementation class attribute in your context node class then you can implement the whole thing as I explained in previous post.
You can refer to below thread to find out how to access the implementation class in the context node class.
http://scn.sap.com/thread/3194920
Regards,
Nithish
Hi Prem,
If you see the MODEL in the run time repository of component BP_HEAD , you can see the value BP_APPL_COND which is a bol component set containing different bol components including BP .All these bol components under one name BP_APPL_COND will get loaded when you open BP_HEAD UI component.
You can check in spro->Customer Relationship Management->CRM Cross-Application Components->Generic Interaction Layer/Object Layer->Basic Settings to know about the Bol component set and components
Regards,
Nithish
Hi Prem,
If you check the maintenance view CRMV_GIL_COMP , you can find all the bol objects ( object table ) and relations ( model table) between them along with the implementation class for each bol component .
For bol component BP, the object table is CRMC_ALLOBJ_BUIL and model table is CRMC_MODEL_BUIL.
Regards,
Nithish
Hi Nithish,
In table CRMC_MODEL_BUIL if we give object A as "BuilHeader" and Object B as " BuilStandardAddress " we get the relation name as "BuilStandardAddressRel". But in runtime i wll not know the value for object B(BuilStandardAddress) i will know only context node name 'STANDARDADDRESS'. and not its Base Entity name, is it possible to find object B from any other table using the context node name.
Thanks.
Prem
Hi Prem,
There wont be any table to fetch those relations at run time with only one objects information.As we have many objects and relations between them within one table , it not possible to predict object B at run time.
Best way is to check bol_model_browser and available objects and relations between them, use the appropriate relation wherever you need as you know the dependent object before hand for processing.
Regards,
Nithish
Hello Prem Kumar ,
Nitish is Absolutely right . I interpreted your question in a different way actually .
are you asking like how to know the UI Component name information ? So that you can use that code in creating your Z components ? If yes then , when your UI Gets loaded , then you click once on the view for which you want to see the information about where it is created / Loading from -> after clicking , press "F2" button . You will get all the information regarding the component .
Hope it helps .
Thanks and Regards ,
Nikhil Kulkarni
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Prem,
Goto class CL_CRM_GENIL_OBJ_MODEL in that put the break point in method IF_GENIL_OBJ_MODEL~GET_COMPONENT_NAME and GET_COMPONENTS_LOADED you we can get know in debugging.....
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
5 | |
1 | |
1 | |
1 | |
1 | |
1 | |
1 | |
1 | |
1 | |
1 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.