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: 

Dialog Programming: Dynamic Screen

Former Member
0 Kudos
285

Hi,

I am creating a Dialog transaction.

I have the Following requirement:

I have say 5 push-buttons on the screen.

In PBO, i will make based on some condition the pushbutton as visible / invisible.

(This i can do using the loop at screen.. modify screen.. etc..

Now I wnat to keep the text of this pushbutton also to be dynamic...(though the name remains same )

So it's like this :

Pushbutton defined on the Screen with Name = 'Trans1'

and text = 'Trans1'.

Now at Runtime i just need to change the text to say 'MARA'.So internally the FCODE of the pushbutton still remains 'Trans1', For the user only the text would change.

If this is not possible then is there a way to generate the screen element dynamically. (Please note that this is a dialog transaction and i cannot use the method that is used for the dynmic code generation of selection screen of reports. )

Any help or inputs would be great!

Thanks,

Anuj D.

3 REPLIES 3

Vinod_Chandran
Active Contributor
0 Kudos
43

Hi,

This can be done. In the screen painter change attribute of the button as ‘Output Field’. In the program define a field called Trans1, which is the name of your button.

Data: Trans1(10).

In PBO, give the value for Trans1.

Trans1 = ‘MARA’.

This is it...

Please try this.

Thanks

Vinod

Former Member
0 Kudos
43

Hi Anuj,

The following link in the documentation explains what you need - http://help.sap.com/saphelp_47x200/helpdata/en/9f/dba9a635c111d1829f0000e829fbfe/frameset.htm

Regards,

Anand Mandalika.

Former Member
0 Kudos
43

Thanks Vinod, In the meantime i also tried the same and it worked.