on 01-31-2012 11:23 AM
Hi There,
We are enhancing a standard WDA application and we have a few static UI element created on the view. And now we want to rearrange these element to look like this.
Current:
Root
-> Transparent container1
-> ZTray
-> Transparent container2
target
Root
-> ZTray
-> Transparent container1
-> Transparent container2
Can you help me to find out me how can i perform this 'move" assignment using dynamic programming.
Thanks for your inputs.
Rgds
Hi Sudhir,
You can start trying something like this in WDDOMODIFYVIEW.
DATA:
lo_element type ref to cl_wd_uielement,
LO_CONTAINER TYPE REF TO CL_WD_UIELEMENT_CONTAINER.
IF first_time = abap_true.
LO_CONTAINER ?= view->get_element( 'ROOTUIELEMENTCONTAINER' ).
lo_element = LO_CONTAINER->REMOVE_CHILD( ID = 'ZTRAY' ).
LO_CONTAINER->ADD_CHILD( INDEX = 1
THE_CHILD = LO_ELEMENT ).
ENDIF.
I never did something like that. I guess that depending on the layout type of the view this code will need some changes (e.g matrix layout). I tried a simple test with flow layout and worked fine here.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
HI!
Try this:
DATA:
lo_element type ref to cl_wd_uielement,
LO_CONTAINER_TO TYPE REF TO CL_WD_UIELEMENT_CONTAINER,
LO_CONTAINER_FROM TYPE REF TO CL_WD_UIELEMENT_CONTAINER.
IF first_time = abap_true.
LO_CONTAINER_FROM ?= view->get_element( 'ROOTUIELEMENTCONTAINER' ).
LO_CONTAINER_TO ?= view->get_element( 'ZTRAY' ).
lo_element = LO_CONTAINER_FROM->REMOVE_CHILD( ID = 'TC_CONTAINER1' ).
LO_CONTAINER_TO->ADD_CHILD( LO_ELEMENT ).
lo_element = LO_CONTAINER_FROM->REMOVE_CHILD( ID = 'TC_CONTAINER2' ).
LO_CONTAINER_TO->ADD_CHILD( LO_ELEMENT ).
ENDIF.
This code removes the elements from one container (root) and moves to another one (tray).
User | Count |
---|---|
93 | |
10 | |
10 | |
9 | |
9 | |
7 | |
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.