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

Reg : Storage bin location variable

Former Member
0 Likes
1,054

Hi All,

I have created a report to display the materials according to the plant, Storage location and storage bin in the selection screen. i have defined the storage bin select option as

S_lgpbe FOR mard-lgpbe

Now when entering the values in the selection screen field S_LGPBE as 3 to 20.

i am getting an error stating that "lower limit is greater than the upper limit".

i have used the FM alpha_output to convert the variables in to out put format in at selections screen event. but the error is coming before triggering this event. can any one tell me how to overcome this error.

Thanks and Regards,

M.Phanindra

4 REPLIES 4
Read only

amy_king
Active Contributor
0 Likes
960

Hi Maruvada,

This is happening because MARD-LGPBE is a character field with length 10, and in a character comparison 3xxxxxxxxx > 20xxxxxxxx. Perhaps you could define your select-options with option NO INTERVALS.

Cheers,
Amy

Read only

Former Member
0 Likes
960

Hi Amy,

Thanks for the reply but the user needs the field as selection screen as he wants to input a range of storage bins in the selection screen for the given plant. is there any other way through which i can avoid this error.

Read only

amy_king
Active Contributor
0 Likes
960

Hi Maruvada,

Using SELECT-OPTIONS s_lgpbe NO INTERVALS will still give you a select-options but will prevent the user from entering a range directly on the selection screen (though there is an easy workaround in the extension dialog). Users could enter a list of single values instead of a range.

An alternative would be to instruct your users to use 20 as the LOW value and 3 as the HIGH value-- though this seems awkward from a user's perspective.

Maybe it could be possible to convince the business owner to use a listbox (dropdown list) to select one or more storage bins instead of having a range. You could populate the listbox values based on the plant and storage location selected, and users could select one or more values from the listbox.

I'm sure there are other alternatives too, maybe another member will reply.

Cheers,

Amy

Read only

Former Member
0 Likes
960

Hello,

Normally Storage bin field should start with a character, something like A-0-00, Z-0-00 etc..

If your master data is set up purely by numbers, and if you want to enter a range of numbers on the selection.

You can default the selection screen with low = A and high = Z( this can be done on Initialization event).

The user should enter A3 and Z20 or any number range of their choice( but without deleting A or Z).

You can manipulate these fields during At-Selection screen on <field>event, by removing A and Z and swapping low to high or other way based on the value of the fields.

Check the below code..... Hope it helps!

SELECT-OPTIONS: S_lgpbe FOR mard-lgpbe

DATA: lv_low type lgpbe,

           lv_high type lgpbe.


INITIALIZATION.

s_lgpbe-sign = 'I'.

s_lgpbe-option = 'BT'.

s_lgpbe-low = 'A'.

s_lgpbe-high = 'Z'.

APPEND s_lgpbe.

AT SELECTION-SCREEN ON s_lgpbe.

lv_low = s_lgpbe-low+1(9).

lv_high = s_lgpbe-high+1(9).

if lv_low > lv_high.

s_lgpbe-low = lv_high.

s_lgpbe-high = lv_low.

modify s_lgpbe index 1.

endif..

Start-of-selection:

Write your query ...

Thanks!

VM.