2007 Nov 26 8:37 AM
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
2007 Nov 26 8:47 AM
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
2007 Nov 26 10:58 AM
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.
2007 Nov 26 11:03 AM
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
2007 Nov 26 11:50 AM
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
2015 Sep 11 3:57 PM
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
2015 Sep 11 5:17 PM
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