Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

Dynpro field position -- Is this possible?

Former Member
0 Kudos
483

Hi everybody.

I think i've got a very good question for you.

Let me explain my situation: I'm developping a modul-pool application wiht several gui controls, dynpros, fields, etc. and i have the following requierement: I need to change a buttton position dynamically at runtime.

Is there any way to do this? I've tried to figure out how to solve this problem, but i haven't been able to find any information about this issue, neither in this forum nor over the internet.

I really appreciate any helpfull answers.

Thanks in advance.

3 REPLIES 3

Former Member
0 Kudos
68

Hi,

That is an interesting question.

Buttons within a screen:

I'm not sure if there is a "normal" way to control the actual location of a single button on the screen, but you might try creating multiple buttons that have the same function code. Place the buttons at the various locations you want to "move" them to. Then dynamically disable (screen-active = '0') all the buttons except the one you want to show up. This would at least look like a dynamic position change to the user (as long as the buttons all looked identical).

The only other thing I can think of is to define multiple, identical subscreens with the button(s) in different positions. Then you could dynamically call the subscreens to make the button(s) appear to "move". This would probably be more complex than the solution above, but you'd have more flexibility with the appearance of your screens (that is the dynamic subscreens).

Buttons in the toolbar:

To accomplish a change in position of a toolbar button, you would need to define multiple GUI statuses, with the button(s) in different positions within each GUI status. Then you can dynamically set the GUI status so that the button seems to change positions in the toolbar at runtime dynamically.

Please let us know if you find a better solution or if my suggestions do the trick.

Best Regards,

Jamie

0 Kudos
68

Hi.

Thanks a lot for your opinions.

I think i'm going to try the first solution, i mean, create as many buttons as needed, and hide/show them dynamically at runtime. (I think this is the best solution, so far...)

Anyway i'll keep on searching until i find out whether it is possible or not.

I was thinking of a custom gui control which could emulate the button and link it to a container, so i can change its properties (location, height, width, etc).

I'll keep you posted.

Thanks

former_member194669
Active Contributor
0 Kudos
68

May be this way.

Create as many PF-STATUS according to the order in which buttons placed and call this PF-STATUS dynamically.

ie


if condition eq 1.
   set pf-status 001.
else.
   set pf-status 002.
endif.

something like that