cancel
Showing results for 
Search instead for 
Did you mean: 

Make a Field editable in webdynpro

former_member670836
Participant
0 Kudos
398

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.

Accepted Solutions (0)

Answers (2)

Answers (2)

former_member670836
Participant
0 Kudos

Anwered

Former Member
0 Kudos

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

former_member670836
Participant
0 Kudos

HI aravind,

Thanks for giving your suggesions,My problem was solved...Thanks a lot..

Regards,

Praveena.