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

SELECT-OPTIONS and Screen Layout

Former Member
0 Likes
4,721

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 

9 REPLIES 9
Read only

Juwin
Active Contributor
0 Likes
4,408

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

Read only

Former Member
0 Likes
4,408

Yes add text as 6 parameters might work but trying to figure out if I could add a free formatting text box?

Read only

Juwin
Active Contributor
0 Likes
4,408

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

Read only

Former Member
0 Likes
4,408

Is there an example program of this process?

Read only

Juwin
Active Contributor
0 Likes
4,408

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

Read only

0 Likes
4,407

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

Read only

Juwin
Active Contributor
0 Likes
4,407

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


Read only

Juwin
Active Contributor
0 Likes
4,407

I have updated this in my blog here:

Thanks,

Juwin

Read only

0 Likes
4,407

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