08-29-2009 9:44 AM
Hi,
I have a requirement to generate dialog screens at runtime whenever the user clicks on a button. Could you provide me any pointers regarding this? The screens that are to be generated dynamically are quite similar to an already created screen using the Object Navigator (SE80) with a few changes.
Thanks in advance,
Neelesh
08-29-2009 10:16 AM
hi neelesh,
have all fields in the screen and hide the 'not needed' as per user choice.
08-29-2009 10:20 AM
Actually what I meant is that I would be needing the screens to be generated at the runtime. I need I/o fields created dynamically as obviously these need to have different names at run time as well. So what I need is dynamic creation of the screen.
08-29-2009 10:27 AM
neelesh,
you can try methods of the following classes.
CL_DD_INPUT_ELEMENT
CL_DD_FORM_ELEMENT
08-29-2009 1:05 PM
I guess this question has been asked many many times.
Generating screens dynamically is "for internal use" only (means SAP only), as you can see in "EXPORT DYNPRO" abap statement. It means that SAP may change its behavior, remove it from ABAP language, etc., at any time.
If it was a selection screen, you might use COMPLEX_SELECTIONS_DIALOG function module (supported by SAP).
There is a solution with Dynamic Documents (HTML) as proposed by
Soumyaprakash. See SAP library and ABAP example programs for more information.