2013 Oct 22 7:12 AM
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
2013 Oct 22 7:27 AM
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.
2013 Oct 22 7:23 AM
Hi supriya ramanjinareddy
See this demo program for easy understanding
DEMO_SEL_SCREEN_WITH_TABSTRIP
2013 Oct 22 7:26 AM
I would rather suggest demo_sel_screen_as_subscreen ?
Regards,
Raymond
2013 Oct 22 7:24 AM
2013 Oct 22 7:27 AM
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.
2013 Oct 22 7:33 AM
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
2013 Oct 22 7:35 AM
2013 Oct 22 7:44 AM
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.
PARAMETERS: p_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
2013 Oct 22 9:20 AM
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
2013 Oct 22 9:30 AM