on 05-19-2008 11:32 AM
Hi all,
I would like know if tere is a way to read all elements of a View, in particular I need all Input Fields of my view. Is it possible?
Thanks
GN
Have a look at the methods in the class if_wd_view. You have options to retrieve each element by specifying its ID, or a group of elements also. The reference to the view will be available in the Modify View method and you can call these methods from there. However, I do not think you can retrieve all input fields or something specific like that.
Regards,
Nithya
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
yes, you can do that.
1. you can get the root container. view->get_root_element( ).
2. get all UI elements based on the root container. lr_container->get_children( ).
3. loop UI elements. if there has container elements. then do the same thing as below.
lrs_child->_DEFINITION_NAME. this can help you check the type of UI element.
eg: BUTTON, GROUP..
so that you can get all elments in the view.
Edited by: xu chen on Jul 15, 2009 5:50 AM
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
hi ,
declare an attribute x type ref to if_wd_context_node.
Then call x->get_elements().
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Have a look at how SAP does it in the CL_WD_DYNAMIC_TOOL class. There is a local class method (LCL_MANDATORY_CHECK=>GET_MANDATORY_ELEMENTS). In here SAP goes back to the database where the WD Metadata is stored - tables WDY_UI_PROP_DEF and WDY_UI_ELEM_DEF to get the internal ids of the particular UI element types. They then use the IF_WD_VIEW class and method GET_ELEMENTS_BY_CID to read the UI elements in question.
User | Count |
---|---|
93 | |
11 | |
10 | |
9 | |
9 | |
7 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.