on 12-04-2009 10:36 AM
Hi Gurus,
1.) The view which we design is because of drag and drop in WDA.
But when a button or text feld gets created it is static .
How can we make the postion of that feld dynamic.
For eg:
I create an element say text box..it gets created at the top..
what if i want to postion the same in the centre of the view.. How is this possible..?
2.) How can we create dynamic selection screen
Eg: We used to make screen-group = active etc in our report se38 programming.
Are there any methods for the same...?
Best Regards,
Navin Fernandes.
Edited by: NAVIN FERNANDES on Dec 4, 2009 11:41 AM
hi ,
Procedure for creating context attributes dynamically:
Each attribute of the previously created context node can be defined by calling the method add attribute ( ) from the reference to the metadata of the node.
the method add_attribute( ) has to be called once for each attribute. However, the method add_new_child_node ( ) not only allows you to create a context node, but also to create related attributes.
regards,
amit
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Amit,
Could you tell me..
Suppose i create a node and its elements dynamically.. i need to map the same to the gui elements like text box , button etc..
How do i do this..?
or Suppose i create two input fields in my view and
I want to disable them dynamically.. How can i do this ( As in selection screen )
Best Regards,
Navin Fernandes.
Edited by: NAVIN FERNANDES on Dec 4, 2009 1:02 PM
HI,
Create tehse fields inside a transapranet container and create a context attribtute of type wdy_boolean and bind it to the
enable property of the transaparanet container...
based on the requriement you can set teh value to true or false for enable/disable using the set_attribute method of the if_wd_conetxt_node..
If the transparent copntainer is disableed then the input fields also get disabled.
Regards,
Lekha.
Hi Lekha,
"Create tehse fields inside a transapranet container and create a context attribtute of type wdy_boolean and bind it to the
nable property of the transaparanet container..."
How do i create transparent container..?
Also i created context attribute of type wdy_boolean but when i try to map it to the context of the view it is not happeing..
Can you tell wether this is the right way to bind to enable property of transparent container.
Thank You for the Information..
Best Regards,
navin Fernandes.
Edited by: NAVIN FERNANDES on Dec 4, 2009 2:01 PM
Hi Lekha,
Can you tell me how to create a transparent container.?
My requirement is as follows:
When i tick the checkbox ,Two input fields should appear and when i uncheck it it should dissappear
like we do in the selection screen of a report program.
Can you help me with this design..
Best Regards,
Navin Fernandes.
Hi,
Transparent container is a UI Element like other UI (Input field , textview etc.)
1.Create one Transparent container.
2.Place your input fields inside this container.
3.Bind visible property of this to an attribute of type wdui_visibility.
4.Now on the click of checkbox, set the visble attribute as invisible using 01.
hi
2.) How can we create dynamic selection screen
Eg: We used to make screen-group = active etc in our report se38 programming.
Are there any methods for the same...?
do u mean u want to create UI dynamically in ur view , u can use the concept of DYNAMIC PROGRAMMING in WD ABAP
To create a new node, the method add_new_child_node( ) can be used. This method hands back the reference to the metadata of the new node.
Dynamic Context AttributesAttributes for the dynamic nodes created can be created by calling the method add_attribute ( ) from the reference to the metadata of the node. This method has to be called once for each attribute.
However add_new_child_node ( ) method not only allows to create a context node, but also to create related attributes.
The interface of method wdDoModifyView provides a parameter VIEW, which is a reference to an object of type IF_WD_VIEW representing the instance of a view at runtime
check out my WIKI :
http://wiki.sdn.sap.com/wiki/display/stage/dynamiclayoutmanipulationinWD+ABAP
Procedure to create context nodes dynamically:
In order to create a new independent context node a reference to the metadata of the context root node has to be obtained first. This reference is obtained by calling the method
wd_context->get_node_info( ).
Next, the metadata of the new node has to be defined. To create a new node, the method add_new_child_node( ) from the reference to the context root node can be used. This method hands back the reference to the metadata of the new node. An important parameter of the method add_new_child_node( ) is static. Only if this parameter is set to abap_false can the related node can be deleted at runtime.
I am creating the drop down by index . I have used the reference using the attribute mr_view .
mr_view refers to the associated TYPE IF_WD_VIEW .
regards,
amit
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
As you will be using the VIEW parameter of teh modifyview for dynamic programming, there should be a method to position teh UI element right.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
85 | |
10 | |
10 | |
10 | |
7 | |
6 | |
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.