on 2018 Mar 08 11:28 AM
Hi All,
How we can pass a data from one UI component to another.
I have a Page with two UI components. Ui component "BTCATEGORIES" contains a drop down list "Category" with some values. and UI component "BT120H_CPL" contains a drop down called "Priority" with high medium low priorities. I would like to collect the category value from drop down of "BTCATEGORIES" and use it in do_prepare_output method of "BT120H_CPL, for some condition checking".
Is there any way we can do this....?
Request clarification before answering.
Hi Ricky,
I figured out that the Category value was getting determined and populated when all the CAT01, CAT02, CAT03 and CAT04 will be filled with values.
Hence My lv_category populated with the needed value.
Thanks for the help on this as ..
Ligin
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Ligin,
I have checked the screen in WebUI. The field CATEGORY is of BT120H_CPL. Please check the screenshot.

If you are talking about that field, then you can use the below code.
DATA: lr_entity_h TYPE REF TO cl_crm_bol_entity,
lv_category TYPE crmt_activity_category.
lr_entity_h ?= me->typed_context->btadminh->collection_wrapper->get_current( ).
lv_category = lr_entity_h->get_property_as_string( 'CATEGORY' ).
If you are talking about the fields which are under the section 'Categorization' as shown below, then let me know.

-Ricky.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Ricky,
Yes I am looking for the category under processing data.
lr_entity_h ?= me->typed_context->btadminh->collection_wrapper->get_current( ). gave me an error
" is accessed in the current context under a different name"
so i wrote
lr_entity_cat ?= me->typed_context->btadminh->collection_wrapper->if_bol_bo_col~get_current( ).
but while loading the page it shows the below error !
Ligin.
Hi Ricky,
I have a correction to make. the attribute "Category" is there in my component but, in my page there is no field for category. The category is been determined by the program by the values selected by the user from the drop downs"
category :CAT01, catalog :CAT02, code group : CAT03 and code: CAT04. from UI component BTCATEGORIES, View: Category.
In this case I will not be able to extract the data as CATEGORY is not a drop down for me.
I would like to capture those values , from the drop downs category :CAT01, catalog :CAT02, code group : CAT03 and code: CAT04 of BTCATEGORIES ,to DO_PREPARE_OUT_PUT of BT120hCPL
Thanks | Ligin
Hi Ligin,
The component BTCATEGORIES is already integrated in BT120H_CPL. Try to access the component controller and then read relations of BTOrder/BTAdminH.
-Ricky.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Ricky, Thnaks for your response once more.
i used the below code. But the category is only determined once the transaction is being saved. lv_category_old will be populated with value only on the display mode of a saved transaction. on the creation time , after selecting a value from the CATEGORY dropdown, lr_entity_h->get_property_as_string( 'CATEGORY' ) is not retrieving any value. Requirement is to determine the Category of the transaction, on creation time by reading the drop down value.or do you think is there any way to figure out the category of the transaction on creation time.?
lr_entity_h ?= me->typed_context->btadminh->collection_wrapper->if_bol_bo_col~get_current( ).
lr_coll = lr_entity_h->get_related_entities(
iv_relation_name = 'BTHeaderActivityExt' ).
lr_entity_h = lr_coll->get_current( ).
lv_category_old = lr_entity_h->get_property_as_string( 'CATEGORY' ).
| User | Count |
|---|---|
| 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.