Application Development 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: 

Select Options in subscreen

Former Member
0 Kudos
2,940

Hi All,

Can anyone please tel me the solution on how to create select-options using layout of subscree.

for Eg,

I have blart declared in layout of subscreen. and defined in I/O with input possible

But i want to change it to select option.

Please help me in this.

Thanks

1 ACCEPTED SOLUTION

former_member215344
Contributor
0 Kudos
1,057

Hi Supriya,

Check the sample code below:

REPORT zselectoptions.

TABLES : bkpf.


SELECTION-SCREEN BEGIN OF SCREEN 400 AS SUBSCREEN.


SELECT-OPTIONS : s_blart FOR bkpf-blart.
SELECTION-SCREEN END OF SCREEN 400 .


START-OF-SELECTION .


CALL SCREEN 100 .

*&---------------------------------------------------------------------*


*& Module  STATUS_0100  OUTPUT

*&---------------------------------------------------------------------*


MODULE STATUS_0100 OUTPUT.

*  SET PFSTATUS 'xxxxxxxx'.

*  SET TITLEBAR 'xxx'.

ENDMODULE.                 " STATUS_0100  OUTPUT

*&---------------------------------------------------------------------**
& Module  USER_COMMAND_0100  INPUT*
&---------------------------------------------------------------------**      

MODULE USER_COMMAND_0100 INPUT.

ENDMODULE.                 " USER_COMMAND_0100  INPUT


Define screen 100 with subcreen area SEL as shown in below .

Define PF status and title bar with any names.
Put code in PBO and PAI of screen as shown in below screen shot.

Call subscreen sel including sy-repid ‘400’.

Activate all objects and execute the report and you will get module pool screen with select-options.

9 REPLIES 9

former_member209120
Active Contributor
0 Kudos
1,057

Hi supriya ramanjinareddy

See this demo program for easy understanding

DEMO_SEL_SCREEN_WITH_TABSTRIP

0 Kudos
1,057

I would rather suggest demo_sel_screen_as_subscreen ?

Regards,

Raymond

raymond_giuseppi
Active Contributor
0 Kudos
1,057

First read ABAP online documentation : Selection Screens as Subscreens

Regards,

Raymond

former_member215344
Contributor
0 Kudos
1,058

Hi Supriya,

Check the sample code below:

REPORT zselectoptions.

TABLES : bkpf.


SELECTION-SCREEN BEGIN OF SCREEN 400 AS SUBSCREEN.


SELECT-OPTIONS : s_blart FOR bkpf-blart.
SELECTION-SCREEN END OF SCREEN 400 .


START-OF-SELECTION .


CALL SCREEN 100 .

*&---------------------------------------------------------------------*


*& Module  STATUS_0100  OUTPUT

*&---------------------------------------------------------------------*


MODULE STATUS_0100 OUTPUT.

*  SET PFSTATUS 'xxxxxxxx'.

*  SET TITLEBAR 'xxx'.

ENDMODULE.                 " STATUS_0100  OUTPUT

*&---------------------------------------------------------------------**
& Module  USER_COMMAND_0100  INPUT*
&---------------------------------------------------------------------**      

MODULE USER_COMMAND_0100 INPUT.

ENDMODULE.                 " USER_COMMAND_0100  INPUT


Define screen 100 with subcreen area SEL as shown in below .

Define PF status and title bar with any names.
Put code in PBO and PAI of screen as shown in below screen shot.

Call subscreen sel including sy-repid ‘400’.

Activate all objects and execute the report and you will get module pool screen with select-options.

Former Member
0 Kudos
1,057

Hello,

Is that what you want?

If yes, sample code:

DATA spfli_wa TYPE spfli.

************************************************************************

SELECTION-SCREEN BEGIN OF BLOCK sel .

************************************************************************

SELECTION-SCREEN SKIP.

*---------------------------* TABSTRIP *-------------------------------*

SELECTION-SCREEN BEGIN OF TABBED BLOCK tabb1 FOR 7 LINES.

SELECTION-SCREEN TAB (30) title1 USER-COMMAND ucomm1 DEFAULT SCREEN 1001.

SELECTION-SCREEN TAB (30) title2 USER-COMMAND ucomm2 DEFAULT SCREEN 1002.

SELECTION-SCREEN END OF BLOCK tabb1.

*-------------------------* --------- *-------------------------------*

SELECTION-SCREEN END OF BLOCK sel.

*-------------------------* SCREEN 1001 *------------------------------*

SELECTION-SCREEN: BEGIN OF SCREEN 1001 AS SUBSCREEN          .

SELECTION-SCREEN: BEGIN OF BLOCK b1 WITH FRAME TITLE title.

SELECT-OPTIONS s_carrid FOR spfli_wa-carrid.

SELECTION-SCREEN: END OF BLOCK b1                            .

SELECTION-SCREEN: END OF SCREEN 1001                         .

*-------------------------* --------- *-------------------------------*

*-------------------------* SCREEN 1002 *------------------------------*

SELECTION-SCREEN: BEGIN OF SCREEN 1002 AS SUBSCREEN          .

SELECTION-SCREEN: BEGIN OF BLOCK b2 WITH FRAME TITLE titlex.

SELECT-OPTIONS s_carri FOR spfli_wa-carrid.

SELECTION-SCREEN: END OF BLOCK b2                            .

SELECTION-SCREEN: END OF SCREEN 1002                         .

*-------------------------* --------- *-------------------------------*

************************************************************************

INITIALIZATION.

************************************************************************

   title1   = 'Tab 1'.

   title2  = 'Tab 2'.

Kind Regards

former_member188282
Active Participant
0 Kudos
1,057

This message was moderated.

vladimir_erakovic
Contributor
0 Kudos
1,057

Hi Supriya,

As Ajay already said, declare selection screen in program variables declaration or top include, like this:

SELECTION-SCREEN BEGIN OF SCREEN 0160 AS SUBSCREEN.

   SELECT-OPTIONS: p_bukrs FOR ersr-bukrs MEMORY ID BUK,

                                  p_prctr FOR ersr-prctr MATCHCODE OBJECT PRCT,

                                 p_opera FOR ersr-opera,

                                  p_usvid FOR ersr-usvid MATCHCODE OBJECT /MKBS/USV2N.

   PARAMETERSp_godina TYPE z_godina,

                           p_mesec  TYPE z_mesecbr.

SELECTION-SCREEN END OF SCREEN 0160.

And you don't even need to add subscreen in screen painter but you just add in screen work flow code, like this:

PROCESS BEFORE OUTPUT.

   CALL SUBSCREEN subscreen INCLUDING 'Z_ERSR' '0160'.

   MODULE status_0150.

*

PROCESS AFTER INPUT.

   CALL SUBSCREEN subscreen.

   MODULE user_command_0150.

   MODULE exit_command_0150 AT EXIT-COMMAND.

When you save, screen 160 will automatically be generated.

Best regards,

Vladimir

Former Member
0 Kudos
1,057

In layout of a screen.I have declared select option .

My actual requirement is :

I have declared select option in Zprog :

data : g_blart type mhnd-blart.

types: t_blart like RANGE OF g_blart.

SELECT-OPTIONS: s_blart for g_blart.

And should cal this program using

submit Z01FI_RFMAHN21 and return using selection-set F150V-VARI1

                              with MA_LAUFD incl F150V-LAUFD

                              with MA_LAUFI incl F150V-LAUFI

                              with p_blart incl f150v-blart

but this was working fine when I hade declared as parameter.

                             

To call select option using submit,

how shld we call

0 Kudos
1,057

Supriya,

check this discussion:

http://scn.sap.com/message/7957662