on 08-05-2008 8:14 PM
Hello experts
I need to know how to create UI elements in runtime
Thanks.
.
If you need to create an input field, for eg.
data lr_input_fld type ref to CL_WD_INPUT_FIELD.
lr_input_fld = CL_WD_INPUT_FIELD->NEW_INPUT_FIELD(
EXPORTING
BIND_VALUE = <node_path> ).
Similarly for each UI element, there is an associated class having a NEW_<UI_ELEMENT> method.
Check the class and the method for the signature.
You will also need to use SET_LAYOUT_DATA()
Eg, if you want to add the fields in a group that has matrix layout, you will first need to create CL_WD_MATRIX_HEAD_DATA->NEW_MATRIX_HEAD_DATA and pass the return parameter to SET_LAYOUT_DATA().
If adding in the Group on the view, get refernce of the group using view->get_element(<element_name>)
and then ADD_CHILD()
Note that you have the reference of the view in WDDOMODIFY method
Regards,
Reema.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
check these standard examples
WDR_TEST_DYNAMIC
WDR_TEST_DYNAMIC_1
WDR_TEST_DYNAMIC_2
WDR_TEST_DYNAMIC_3
WDR_TEST_DYNAMIC_CI
Thanks
Suman
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I would start by reading this online help link:
http://help.sap.com/saphelp_nw70/helpdata/EN/11/ba74412cba127de10000000a155106/frameset.htm
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
82 | |
10 | |
10 | |
9 | |
6 | |
6 | |
5 | |
5 | |
4 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.