on 02-20-2008 8:53 AM
Hi All,
How to add input field dynamically .
If any sample code present pls send.
Thanks
hemalatha
Hi Hemalatha,
Below is the code snippet using which you can add an input field to the view dynamically. You have to put this code in the view's WDDOMODIFYVIEW method:
DATA: lr_container TYPE REF TO cl_wd_uielement_container,
lr_flow_data TYPE REF TO cl_wd_flow_data,
lr_input_field TYPE REF TO cl_wd_input_field.
lr_container ?= view->get_element( 'ROOTUIELEMENTCONTAINER' ).
lr_input_field = cl_wd_input_field=>new_input_field( ).
lr_flow_data = cl_wd_flow_data=>new_flow_data( element = lr_input_field ).
lr_container->add_child( lr_input_field ).
You can pass other details for your input field in the "cl_wd_input_field=>new_input_field" method. See class "cl_wd_input_field" for method parameter details.
Hope this solves your question. If so, reward and close the thread ASAP.
Regards,
Ram
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
please check coding in [Wiki|https://wiki.sdn.sap.com/wiki/display/WDABAP/Dynamicuseof+Dictionary]
grtz,
Koen
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Hemalatha T C ,
For creating inputfied dynamically you have to use the class cl_wd_inputfield. you can use the method to create input field of this class. you have to write the coding at mofify view
Regards
Sarath
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
87 | |
10 | |
10 | |
10 | |
7 | |
6 | |
6 | |
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.