on 12-05-2012 7:31 AM
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
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?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Rajarama, thanks for your reply.
Hi i used the below code in GET_PAYMENTSTATUS method to set a value in to paymentstatus field in the UI.
me->SET_PAYMENTSTATUS( attribute_path = 'PAYMENTSTATUS' value = value ).
But now as per my requirement, I need to set the value while a Button is clicked.
That is help me how to set new value to the paymentstatus field when an event is performed.
Thanks
Savaridasan.
Hi,
I am able to set and get values in creating Model attribute in Model NODE and also while using Value attribute in Valude NODE.
But in my case, am creating a Value attribute in Model NODE and the field gets displayed only if i comment the code in Get and Set method of the Value attribute field
Also i tried with some code to display value to the attribute but it throws BSP error - the snapshot i have atached with this discussion.
Help me in this regard. Thanking you all Experts
Cheers,
Savaridasan
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.