2015 Jul 02 4:15 PM
I have a request where I need to create a prompt screen with selection so can enter list or range (SELECT-OPTIONS) and also need to enter Text (up to 6 lines of text) so this can be used to print comments on generated report. How do you combine SELECT-OPTIONS and LAYOUT on one prompt Screen? I found program SAPTEXTEDIT_TEST_2 that does what I need but can not enter list of range like I can do with SELECT-OPTIONS
Thanks Gary
I have a request where I need to create a prompt screen with selection so can enter list or range (SELECT-OPTIONS) and also need to enter Text (up to 6 lines of text) so this can be used to print comments on generated report. How do you combine SELECT-OPTIONS and LAYOUT on one prompt Screen? I found program SAPTEXTEDIT_TEST_2 that does what I need but can not enter list of range like I can do with SELECT-OPTIONS
Thanks Gary
2015 Jul 02 4:40 PM
Add the 6 lines of text, as 6 parameters in the screen. So, finally your screen will have 1 select option and 6 parameters.
Thanks,
Juwin
2015 Jul 02 6:17 PM
Yes add text as 6 parameters might work but trying to figure out if I could add a free formatting text box?
2015 Jul 02 6:21 PM
Yes you can... but not so straight forward.
You will have to create a new subscreen, and add the textbox in that. Then, you will have include that subscreen, in the selection-screen.
Thanks,
Juwin
2015 Jul 02 6:25 PM
2015 Jul 02 6:28 PM
Due to technical limitations of the forum, I can't paste the screen design here. But, once you create the subscreen, including that in the selection-screen is easy.
Thanks,
Juwin
2015 Jul 02 8:10 PM
Hi,
I tried it the other way around - create a selection screen as subscreen, which then was included on a normal dynpro. It has drawbacks - the functionality related to variants and normal selection screen GUI Status of course are not there.
I copied SAPTEXTEDIT_TEST_2 into Z namespace and adjusted it:
1) to define selection screen 0199 as sub-screen:
2) to add subscreen called SELECTION_AREA on dynpro 100:
3) flow logic of 100 to include 0199 into SELECTION_AREA:
4) form EXIT_PROGRAM to LEAVE TO SCREEN 0 rather than leave program
and there it is - functional selection screen in a subscreen of normal dynpro:
What Juwin proposes of course sounds more attractive - editor box in a selection screen...
cheers
Jānis
2015 Jul 02 8:32 PM
Hi Janis & Gary,
In order to include another screen on a selection-screen, you need to define a subscreen area on the selection-screen.
To define a subscreen area on the selection-screen, you need to take help of TABBED BLOCK.
selection-screen begin of tabbed block b1 for 10 lines.
selection-screen end of block b1.
This creates a subscreen area in the selection-screen named B1. This also creates a structure in the program, with 3 fields (PROG, DYNNR, ACTIVETAB). In the initialization event, assign the program name and the screen number you would like to show in the subscreen.
I have my selection-screen 1000 (for select-option) and subscreen 100 (for text area).
Upon execution, the screen looks like...
This way you can add any kind of controls - like table control, ALV control, picture control etc onto the selection screen.
Thanks,
Juwin
2015 Jul 02 8:45 PM
2015 Jul 02 8:47 PM
Yup, it's much easier than I thought it would be
Now I have to look some day if there is a viable hack to save those editor contents to a variant and pull them out again...
Thanks and cheers
Jānis