on 06-12-2010 10:56 AM
Hi experts,
i have one webdynpro page ,which contains these 3 fields.
2 number fields and one date field....
2 number fields up to 2 decimal. Should be editable if user click on "modify" button. otherwise read-only.
Date field. Should always be read-only. once user click on the "save" button, this field should be automatically set to the current date (user or system).
can anybody please give the logic for modify action and save action....
Thanks& regards,
Praveena.
Anwered
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Praveena,
Every innput field has a property called ENABLED.
You can bind this property to some attribute in the context (of type wdy_boolean).
and on the SAVE action yoh can set the context attribute to TRUE/FALSE as per requirement.
and for Current Date
DATA lo_nd_node1 TYPE REF TO if_wd_context_node.
DATA lo_el_node1 TYPE REF TO if_wd_context_element.
lo_nd_node1 = wd_context->get_child_node( name = wd_this->wdctx_node1 ).
lo_el_node1 = lo_nd_node1->get_element( ).
lo_el_node1->set_attribute(
name = `DATE`
value = sy-datum ).
Where node 1 is the node in the CONTEXT.
DATE is the attribute in the node1 of type DATUM.
write the above code on SAVE action.
Hope this will help you.
Thanks & Regards,
Arvind
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
84 | |
24 | |
11 | |
9 | |
7 | |
6 | |
5 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.