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 option in module pool program

Former Member
0 Likes
856

Hi,

I have develop a module pool program. In one of the screen i need select option. so do any one have idea or approach for it.

Thanks in advance.

4 REPLIES 4
Read only

Former Member
0 Likes
546

hi,



SELECTION-SCREEN BEGIN OF SCREEN 101 AS SUBSCREEN.
SELECT-OPTIONS: S_CARRID FOR SPFLI-CARRID,
                S_CONNID FOR SPFLI-CONNID.
SELECTION-SCREEN END OF SCREEN 101.


and to use a CALL SELECTION-SCREEN xxxx in your module pool.

Hope this helps, Do reward.

Edited by: Runal Singh on Apr 3, 2008 12:09 PM

Read only

Former Member
0 Likes
546

Hi,

try the following code

tables : mard.

data : ok_code_100 type sy-ucomm.

selection-screen begin of screen 1010 as subscreen.

selection-screen begin of block b1 with frame title text-001.

select-options: s_werks for mard-werks,

s_lgort for mard-lgort.

parameters : p_var like disvariant-variant.

parameter: p_rb1 radiobutton group rd1 default 'X', " list

p_rb2 radiobutton group rd1. " grid

selection-screen end of block b1.

selection-screen end of screen 1010.

start-of-selection.

CALL SCREEN 100.

&----


*& Module STATUS_0100 OUTPUT

&----


text

-


module status_0100 output.

set pf-status 'Z11_SUBMIT'.

set titlebar 'CALL'.

endmodule. " STATUS_0100 OUTPUT

&----


*& Module USER_COMMAND_0100 INPUT

&----


text

-


module user_command_0100 input.

case ok_code_100.

when 'EXIT'.

leave program.

when 'SUBM'.

submit z11_ap_alv_mat using

selection-screen '1000'

with s_plant in s_werks

with s_stor in s_lgort

with p_var = p_var

with p_rb_01 = p_rb1

with p_rb_02 = p_rb2

and return.

endcase.

endmodule. " USER_COMMAND_0100 INPUT

here u have to design a subscreen area SUB_1010 in the screen painter, there is a option given there for that.

and also in the flow logic of screen 0100 you have to call the subscreen SUB_1010 both in PBO and PAI like :

process before output.

module status_0100.

call subscreen sub_1010 including sy-repid '1010'.

process after input.

call subscreen sub_1010.

module user_command_0100.

reward if helpful

Read only

Former Member
0 Likes
546

Hi,

creating select-options in a screen is not possible.u can create only in selection-screens.

rgds,

bharat.

Read only

Former Member
0 Likes
546

Hi,

You can create 2 input/output boxes on the screen and in the PBO when you write the select statement you can use between the two screen fields and that should solve your problem.

like: select * from ekpo where ebeln between screen_field1 and screen_field2.

Regards,

Bhaskar