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

ranges option in module pool

Former Member
0 Likes
2,136

hi,

i have a module pool program where i can see the high value and low value for selection screen,I want to see the functionality provided by range button same as in the selection screen.(for multiple selection).

hi,

i have a module pool program where i can see the high value and low value for selection screen,I want to see the functionality provided by range button same as in the selection screen.(for multiple selection).

7 REPLIES 7
Read only

Former Member
0 Likes
1,372

HI Priya,

use RANGE

Ranges: pernr for pa001-pernr.

and fill it in pai.

Hope magic Works!

Regards,

Purvesh.

Read only

Former Member
0 Likes
1,372

Hi Priya,

Use RANGE keyword.

Read only

Former Member
0 Likes
1,372

u have to code like this

suppose select options is for s_vbeln.

ranges: lv_range for vbak-vbeln.

IF s_vbeln-low is not initial and s_vbeln-high = ' '.

lv_vbeln-low = s_vbeln-low.

lv_vbeln-option = 'EQ'.

lv_vbeln-sign = 'I'.

APPEND lv_vbeln

ELSEIF s_vbeln-low is not initial and s_vbeln-high is not intial.

lv_vbeln-low = s_vbeln-low.

lv_vbeln-high = s_vbeln-high.

lv_vbeln-option = 'BT'.

lv_vbeln-sign = 'I'.

APPEND lv_vbeln.

ENDIF.

Read only

Former Member
0 Likes
1,372

Hi,

In such case you get two values as LOW and HIGH ,so to make it function like Ranges , while retrieving from Data Base you have to provide condition like...

As there may arise different cases like,

if not <LOW> is initial and

not <HIGH> is initial.

select <columns>

from <DB table>

into <int_tab>

where <field> between <LOW> and <HIGH>

elseif not <LOW> is initial and

<HIGH> is initial.

select <columns>

from <DB table>

into <int_tab>

where <field> = <LOW> .

elseif <LOW> is initial and

not <HIGH> is initial.

select min distinct <field>

into <wa_field>

from <DB table>

where ......

select <columns>

from <DB table>

into <int_tab>

where <field> between <wa_field>

and <HIGH>

endif.

Read only

Former Member
0 Likes
1,372

Let 1000 be the screen on which you want to put Range button.

>Make a subscreen area on it. Let it be named as sub_area.

Now make a selection screen in your program.

>SELECTION-SCREEN BEGIN OF SCREEN 100 AS SUBSCREEN.

>SELECT-OPTIONS R_PERNR FOR PERNR-PERNR.

>SELECTION-SCREEN END OF SCREEN.

Now in screen 1000 flow logic, we can call the selection screen in the sub screen area defined.

>In PBO of 1000

>CALL SUBSCREEN SUB_AREA INCLUDING SY-REPID '0100'.

Now, code in AT SELECTION-SCREEN OUTPUT event will be exe.

>In PAI of 1000

>CALL SUBSCREEN SA_SS. as the first line after PAI

Now, AT SELECTION-SCREEN event will be exe.

Using above method u will get the functionality of Select-Options of Selection Screen on a Module Pool Screen.

Read only

Former Member
0 Likes
1,372

Thread was ended unexpectedly. Not fair!!!

Read only

Former Member
0 Likes
1,372

.