Skip to Content
author's profile photo Former Member
Former Member

To set and get values of a field in web ui

Hi all,

As per the screenshot attached with this discussion, I have created a view with a Model context node binded to BTAdminH entity. I need to display a dynamic text in this view, so i created a value context node. Also i have added the value attribute to the UI.

I need help regarding how to read and write values to the newly created node which is present in the webui.

That is How to Get and Set values to the new field in UI.

I also tried Getter and Setter methods, but the field in the UI is not getting updated.

Thanks in advance

cheers,

Savaridasan

Capture.JPG (135.6 kB)
Capture2.JPG (25.1 kB)
Add a comment
10|10000 characters needed characters exceeded

Related questions

2 Answers

  • author's profile photo Former Member
    Former Member
    Posted on Dec 05, 2012 at 09:08 AM

    Hi Savaridasan,

    Use below code to set your value node

    ---------------------------------------------

    --------------------------------------------

    ---------------------------------------------

    TYPES: BEGIN OF str,

    payment_status TYPE char20,

    END OF str

    DATA lr_struct_ref TYPE REF TO str. "Structure of payment status context node

    DATA ls_struct TYPE str.""Structure of your context node

    DATA lr_value_node TYPE REF TO cl_bsp_wd_value_node.

    CREATE DATA lr_struct_ref.

    CREATE OBJECT lr_value_node

    EXPORTING

    iv_data_ref = lr_struct_ref.

    ls_struct-payment_status = 'Your Value'.

    lr_value_node->if_bol_bo_property_access~set_properties( ls_struct ).

    ---------------------------------------------------------------------------

    ---------------------------------------------------------------------------

    Regards

    Rajarama U

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Jul 25, 2016 at 01:15 PM

    Hi,

    Are you trying to write to the attribute on page initialize and trying to save the data in the field on save?

    If you are trying to save the data in that field in database, i would rather suggest to enhance BTAdminH using AET. We can update the contents of the dynamically based on some events or in DO_PREPARE_OUTPUT.

    Could you explain the requirement a bit more in detail?

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.