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 in dynpro

Former Member
0 Likes
3,232

Hi expert,

I created a simply program with modul pool ( se80 ). In the main screen I want to create a select-options.

I know that in report program (se38) is very easy, but in modul pool is possible ? it's easy ?

Some people told me that is possible create only range... and not traditional select-option !!! It's right ?

Tks a lot,

bye.

7 REPLIES 7
Read only

Former Member
0 Likes
1,884

hi robert

http://sample-code-abap.blogspot.com/2008/06/select-option-in-module-pool-screen.html

see this link for step by step guide for creating a select option in screen painter

regards

chinnaiya

Read only

0 Likes
1,884

Tks for your reply, but it run not completely.

I mean that the button of select-option is not run, it's correct only the range !!!

any idea ?

tks.

Read only

0 Likes
1,884

Tks a lot for your reply chinnaiya,

it has solved my problem at 60%. In fact i have to add an other row

"call subscreen sub_1" after MODULE AFTER INPUT and than run ok.

Now I have a little bug a solve: In the dynpro, in the selection option showed, there's not the variable's name at side of field input, it's possible to put in the name ???

tks again.

bye.

Read only

Former Member
0 Likes
1,884

Hi Roberto,

One solution would be to define a selection-screen in your top include (like you would do in your report). Then call this screen using statement CALL SELECTION-SCREEN statement.

Regards,

John.

Read only

Former Member
1,884

Hi,

Here I am giving step-by-step procedure form the starting. Jus go thru it. Here screen shots, im nt attaching.

Select-Options in Module Pool Programming:

This Example will show how to Place select-Options in Module Pool Programming. As now a days Module Pool Programming is Playing key role, we need to be ready to for this type of requirements also.

STEP1:

SE80 -> Create any Program (SAPMZdemo) with TOP include-> SAVE->Create the screen and Place what ever the elements you need according to your requirement.

And Place one sub screen area also. (Mandatory)

STEP 2 :

Place The following code in TOP include.

data : v_kunnr type kunnr,

v_prog type sy-repid value u2018SAPMZDEMOu2019,

V_ subdyn1 type sy-dynnr value u2018200u2019.

STEP 3:

Create the Include with the name as the user defines (MZDEMO_SUBSCREEN200)

STEP 4:

Place the following code in Include MZDEMO_SUBSCREEN200.

&----


*& Include MZDEMO_SUBSCREEN200

&----


*Selection Screen 200

SELECTION-SCREEN BEGIN OF SCREEN 200 AS SUBSCREEN.

SELECTION-SCREEN BEGIN OF BLOCK blck1 WITH FRAME TITLE text-000.

SELECT-OPTIONS : so_kunnr FOR v_kunnr.

SELECTION-SCREEN END OF BLOCK blck1.

SELECTION-SCREEN END OF SCREEN 200.

Save the Include and Activate it.

STEP 5:

Add the Following code in flow logic editor for Screen 100.

process before output.

module status_0100.

call subscreen sub1 including v_prog v_subdyn1.

process after input.

module user_command_0100.

call subscreen sub1.

STEP 6:

Create the Transaction code for the Module Pool Program.

Give the Program name and Initial screen number in the following Screen.

STEP 7:

Save and Activate the Entire Module Pool Program.

And Execute The TCODE which you created.

Regards

Sandeep REddy

Read only

Former Member
0 Likes
1,884

Hi Roberto,

In the main program, use the following code..

SELECTION-SCREEN BEGIN OF SCREEN 201 AS SUBSCREEN.

SELECT-OPTIONS : s_opt1 FOR xyz-abc,

s_opt2 FOR xyz-def.

SELECTION-SCREEN END OF SCREEN 201.

this will create a selection screen 201. call this screen in the subscreen area of the dialog screen.

if you want to display in seperate window use AS WINDOW instead of AS SUBSCREEN

Regards,

Goutham

Read only

0 Likes
1,178

Good post.

One bug: in step 5, call the subscreen first, then the user command.

This will ensure the value of the filled in subscreen is available in the PAI of the main screen. Otherwise it will be empty in debug, even thogh you fill in something.

 

Still useful in 2025 though!