8 Replies Latest reply: May 7, 2012 4:08 PM by Geetha Sravanthi RSS

Read values from the UI

Geetha Sravanthi
Currently Being Moderated

Hi ,

 

  I have added new fields to BTCustomerH and added it a context node to BTAdminH. In the method (do_prepare_output), i try to read the values on the screen using the statements below :

 

 

 

l_btcustomerh ?= ztyped_context->btcustomerh->collection_wrapper->get_current( ).

  IF l_btcustomerh IS BOUND.


    CALL METHOD l_btcustomerh->get_properties(

      IMPORTING

        es_attributes = wa_customer ).



  ENDIF.

 

But in wa_customer , i m not getting any values. Can you please help me..how to read the values.

 

Thank you,

Geetha K

  • Re: Read values from the UI
    Prerna Mittal
    Currently Being Moderated

    Hi Geetha,

     

    try the below logic.

     

    DATA : l_btcustomerh    TYPE REF TO if_bol_bo_property_access,

                  lr_Entity              TYPE REF TO cl_crm_bol_entity.

     

    l_btcustomerh ?= ztyped_context->btcustomerh->collection_wrapper->get_current( ).

      IF l_btcustomerh IS BOUND.

    lr_Entity ?= l_btcustomerh


        CALL METHOD  lr_Entity->if_bol_bo_property_access~get_properties(

     

          IMPORTING

     

            es_attributes = wa_customer ).

     

    Hope this helps!!!

    Prerna

  • Re: Read values from the UI
    Ravi Kumar
    Currently Being Moderated

    Hi,

    When ever u add value node with a model node then it will  the object of type class cl_bsp_wd_mixed_node may be by this ur getting dumb.

     

    am giving some code sample to u to deal with mixed node.

     

    Data:

    lr_props TYPE REF TO if_bol_bo_property_access,

    lr_mixed TYPE REF TO cl_bsp_wd_mixed_node,

    name TYPE string.

     

    Logic:

    lr_prop = me->typed_context->item->collection_wrapper->get_current( ).

    lr_mixed ?= lr_prop.

    CALL METHOD lr_mixed->IF_BOL_BO_PROPERTY_ACCESS~GET_PROPERTY_AS_VALUE

    EXPORTING

    iv_attr_name = 'NAME' //Attribute name.

    IMPORTING

    ev_result = name.

     

    hope this will help you..

  • Read values from the UI
    Subrahmanyam Anantagiri
    Currently Being Moderated

    Try to read values form Component controlller not from node.

     

    lr_entity ?= lr_comp->typed_context->node_name->collection_wrapper->get_current( ).

     

    wa_xxxx = lr_entity->get_propeties( use this method ).

    try this and check the values in debug.