Hi all in the link to action button i have written the follwing code to create input fields dynamically but i am getting the error can u correct where i went wrong
"here 'cost_copyto is the node name costcenter function,description are the field names and input1,2,3 is the id given for input fields but when executin i am getting following error - view is unknown not defined by a data statement.
following is the code written under link to ACTION
data: lr_INPUT1 type ref to CL_WD_INPUT_FIELD.
DATA: LR_INPUT2 type ref to CL_WD_INPUT_FIELD.
DATA : LR_INPUT3 type ref to CL_WD_INPUT_FIELD.
data: lr_container type ref to cl_wd_transparent_container.
data: lr_flow_data type ref to cl_wd_flow_data.
lr_container ?= view->get_element( 'ROOTUIELEMENTCONTAINER' ).
lr_input1 = CL_WD_INPUT_FIELD=>NEW_INPUT_FIELD( ID = 'INPUT1'
bind_value = 'cost_copyto-COSTCENTER'
).
lr_input2 = CL_WD_INPUT_FIELD=>NEW_INPUT_FIELD( ID = 'INPUT2'
bind_value = 'cost_copyto-FUNCTION'
).
lr_input3 = CL_WD_INPUT_FIELD=>NEW_INPUT_FIELD( ID = 'INPUT3'
bind_value = 'cost_copyto-DESCRIPTION'
lr_flow_data = cl_wd_flow_data=>new_flow_data( element = lr_INPUT ).
lr_container->add_child( lr_INPUT1 ).
lr_flow_data = cl_wd_flow_data=>new_flow_data( element = lr_INPUT ).
lr_container->add_child( lr_INPUT2 ).
lr_flow_data = cl_wd_flow_data=>new_flow_data( element = lr_INPUT ).
lr_container->add_child( lr_INPUT3 ).
endmethod.
Thanks & Regards,
Naveen