Application Development and Automation 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: 
Read only

Dynamic screen programming

Former Member
0 Likes
1,302

Hi Experts

Could you please guide me through the concepts of dynamic screen programming. I have a requirement where the UI elements to be displayed in the next screen can be decided only at the runtime.

Thanks and best regards

Anand

6 REPLIES 6
Read only

Former Member
0 Likes
1,005

Hi,

we can change screen element attributes.we can't decide screen element at run. But we can do one thing, we can use subscreen concepts.Create one subscreen area in second screen. then u can paste different screen.Try it

L.Velu

Read only

Former Member
0 Likes
1,005

Hi there,

Dynamic screens program involves changing the screen attributes at runtime ,

depending upon some conditions..Use the event 'AT SELECTION SCREEN OUTPUT'.

This event gets executed before the screen is displayed . In this u can change the screen table attributes like invisible, active, output etc and then use the

modify screen command depending upon ur requirements.

thanks.

Read only

Former Member
0 Likes
1,005

Hi Anand,

U can use the SCREEN concept in the PBO of the screen.

e.g. If the screen has three input fields : RMMg1-MATNR, RMMG1-MTART and MARA-MATKL.

U want to display RMMG1-MATNR and MARA-MATKL only based on some condition, then u can use:

in the PBO of the screen:

LOOP AT SCREEN.

CASE SCREEN-NAME.

WHEN 'RMMG1-MTART'.

screen-active = 0.

screen-invisible = 1.

modify screen.

WHEN 'OTHERS'.

screen-active = 1.

screen-invisible = 0.

modify screen.

ENDCASE.

ENDLOOP.

Similarly, using various SCREEN attributes, u can hide/unhide, enable/disable the screen components.

If u want to see all the SCREEN attributes, u can do so only while debugging. There is no structure in the data dictionary which will give u the screen attributes.

Hope it helps.

Regards,

Himanshu

Read only

0 Likes
1,005

Hi Himanshu

The way you have suggested could be used if i know the possible elements on the screen. But in my case i dont have the idea about what could be the possibilities. A similar example can be taken as the screen in SE37. Depending on the function module u choose on the first screen, based on this the input interface is decided for the next screen.

Do u have any suggestion for achieving this requirement?

Best regards

Anand

Read only

0 Likes
1,005

Hi Anand.

Have you ever had any luck creating dynamic screens? I am looking at the Control Framework, yet it does not allow me to create dropdowns, text fields. etc at run time.

Regards,

Chris

Read only

former_member184158
Active Contributor
0 Likes
1,005

Hi Former Member,

why don't try to use these FMs  :

FREE_SELECTIONS_INIT

FREE_SELECTIONS_DIALOG

by using the above FMs, you can create any slection screen during run time.

for more details how to use them, just refer to this  ,

try to run this demo program DEMO_FREE_SELECTIONS from SAP and just take a look how it works

Regards

Ibrahim