Skip to Content
avatar image
Former Member

How to Get value of Attribute "CATEGORY" of BT120H_CPL

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....?

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

3 Answers

  • Best Answer
    avatar image
    Former Member
    Mar 15 at 11:44 AM

    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

    Add comment
    10|10000 characters needed characters exceeded

  • Mar 09 at 05:11 AM

    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.

    Add comment
    10|10000 characters needed characters exceeded

  • Mar 09 at 11:05 AM

    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.

    Add comment
    10|10000 characters needed characters exceeded

    • Former Member

      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