cancel
Showing results for 
Search instead for 
Did you mean: 

View design/Gui design

Former Member
0 Kudos

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

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

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

Former Member
0 Kudos

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

Former Member
0 Kudos

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.

Former Member
0 Kudos

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

Former Member
0 Kudos

Is this transaparent container a dynamic or static one...

Where are you going wrong..

You chave to bind the enabled property of this container to this attribute..and set_attrbute method you can set teh value...

Former Member
0 Kudos

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.

Former Member
0 Kudos

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.

Former Member
0 Kudos

Hi Saurav,

Thanks for your reply.

But i have a doubt..

As far as i know we cannot create select optioons through transparent container...

So how can we handle this..

I have posted the same as a new question

Thank You once again.

Best Regards,

Navin Fernandes.

Answers (2)

Answers (2)

Former Member
0 Kudos

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

Former Member
0 Kudos

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.

Former Member
0 Kudos

HI Lekha,

Could You let me know which methods are available for gui postioning..

Best Regards,

Navin Fernandes.