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

module pool : design a screen with select-options with ranges

Former Member
0 Likes
1,247

Hi Experts,

I am doing a module pool........

I want to design a screen with select-options with ranges.......

Can You give the code for that?

plz help............

rewards gauranteed........................

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
974

Hi Akashdeep,

TABLES : mara.

SELECTION-SCREEN BEGIN OF SCREEN 1010 AS SUBSCREEN.

SELECTION-SCREEN BEGIN OF BLOCK b1 WITH FRAME TITLE text-001.

SELECT-OPTIONS: s_matnr FOR mara-matnr,

s_matkl FOR mara-matkl,

s_mtart FOR mara-mtart.

SELECTION-SCREEN END OF BLOCK b1.

SELECTION-SCREEN END OF SCREEN 1010.

DATA: number(4) TYPE n VALUE '1010'.

START-OF-SELECTION.

CALL SCREEN 100.

in screen flow logic .write below statements.

first declare the subscreen area 'AREA' in screen.

PROCESS BEFORE OUTPUT.

MODULE STATUS_0100.

CALL SUBSCREEN area INCLUDING sy-repid number.

*

PROCESS AFTER INPUT.

CALL SUBSCREEN area.

MODULE USER_COMMAND_0100.

Reward if it helps,

Regards,

Talwinder

Hi Experts,

I am doing a module pool........

I want to design a screen with select-options with ranges.......

Can You give the code for that?

plz help............

rewards gauranteed........................

5 REPLIES 5
Read only

Former Member
0 Likes
974

Hi,

Check this link

Shruthi

Edited by: Shruthi R on Jun 3, 2008 1:05 PM

Read only

Former Member
0 Likes
974

It is possible to create select-option on the screen using modulepool program.

1.

Define the selection-screen as subscreen in the top include of module pool program.

create modulepool program SAPMZ_SELOPT

Place the below code.or u can define that in top include.

REPORT SAPMZ_SELOPT.

TABLES :pa0001.

SELECTION-SCREEN BEGIN OF SCREEN 100 AS SUBSCREEN.

SELECT-OPTIONS: p_bukrs FOR pa0001-bukrs.

SELECTION-SCREEN END OF SCREEN 100.

2.

Goto garphical layout editor, drag Subscreen and drop on screen means define Subscreen area on the screen.

Place the below code in the PBO.

process before output.

" MODULE STATUS_1001.

call subscreen sub_area including 'SAPMZ_SELOPT' '100'.

process after input.

" MODULE USER_COMMAND_1001.

Please check the link for the same query closed

it will solve your problem

regards....

Read only

Former Member
0 Likes
975

Hi Akashdeep,

TABLES : mara.

SELECTION-SCREEN BEGIN OF SCREEN 1010 AS SUBSCREEN.

SELECTION-SCREEN BEGIN OF BLOCK b1 WITH FRAME TITLE text-001.

SELECT-OPTIONS: s_matnr FOR mara-matnr,

s_matkl FOR mara-matkl,

s_mtart FOR mara-mtart.

SELECTION-SCREEN END OF BLOCK b1.

SELECTION-SCREEN END OF SCREEN 1010.

DATA: number(4) TYPE n VALUE '1010'.

START-OF-SELECTION.

CALL SCREEN 100.

in screen flow logic .write below statements.

first declare the subscreen area 'AREA' in screen.

PROCESS BEFORE OUTPUT.

MODULE STATUS_0100.

CALL SUBSCREEN area INCLUDING sy-repid number.

*

PROCESS AFTER INPUT.

CALL SUBSCREEN area.

MODULE USER_COMMAND_0100.

Reward if it helps,

Regards,

Talwinder

Read only

Former Member
0 Likes
974

HI.

data: r_vbeln type range of vbeln.

now r_vbeln has the field sign, option, low and high.

Give the values and use this in teh select statement.

example,

r_vbeln-low = '2000'.

r_vbeln-high = '4000'.

append r_vbeln.

select * from vbak into table itab where vbeln in r_vbeln.

reward all helpfull answers.

Regards.

Jay

Read only

Former Member
0 Likes
974

Hi all,

Thanks so much........

But the Range button on the right-hand side of the select-option is not working.................!!!!!!!!!