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

SELECTION Screen Problem

Former Member
0 Likes
753

Dear All,

I am having the satement in my report as

SELECT-OPTIONS: s_vbeln FOR vbak-vbeln.

Is there any way to store the higher value of the select screen parameter.

Like I am entering 1 and 20 in the select option and i want to store 20 in one variable.

Thanks in Advance

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
722

hi Manik,

Check the field s_vbeln-high.

If you enter several values.

loop at s_vbeln.

and sort it to get the max/min values.

Erwan

7 REPLIES 7
Read only

Former Member
0 Likes
722

Hi

I believe the easier solution is to get max by a select

SELECT VBELN UP TO 1 ROWS FROM VBAK INTO V_MAX
                         WHERE VBELN IN S_VBELN
                             ORDER BY VBELN DESCENDING.
ENDSELECT.

Max

Read only

Former Member
0 Likes
723

hi Manik,

Check the field s_vbeln-high.

If you enter several values.

loop at s_vbeln.

and sort it to get the max/min values.

Erwan

Read only

Former Member
0 Likes
722

U canstore the higher value of select option using select-options-high.

Ex.: SELECT-OPTIONS: s_vbeln FOR vbak-vbeln.

data: l_vbeln like vbak-vbeln .(varaible to store high value.)

now write the code:

<b>l_vbeln = s_vbeln-high.</b>

If helpfule...please gve points

Read only

Former Member
0 Likes
722

Hi,

You can declare variable, say, v_high type vbeln

and then, store

v_high = s_vbeln-high.

Regards,

Arun Mohan

*Reward points if helpful

Read only

Former Member
0 Likes
722

Hi Manik,

S_VBELN-HIGH will store the value 20 and S_VBELN-LOW will store the value 1

Read only

Former Member
0 Likes
722

select option is like an internal table with the following structure.

SELECT-OPTIONS: s_vbeln FOR vbak-vbeln.

s_vbeln-low = 1

s_vbeln-high = 20

s_vbeln-option

s_vbeln- sign .

if you just enter 1 and 20 you can get using s_vebln-high if it is not so then you have to loop it and find it out.

Read only

Former Member
0 Likes
722

Try to use parameter-id: <b>AUN</b>

or Create a variable to store in table <b>TVARVC</b>.

Kind Regards

Eswar