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

Passing parameter as a range

manish_malakar0316
Active Participant
0 Likes
3,508

Hello all,

I have a small issue in my requirement. I have the following selection screen in my report and I had to put drop downs as shown:

Now the drop downs are  parameters and not select-options as shown below :

I am populating the drop down for the username using the FM VRM_SET_VALUES as shown:

Now, the main issue that I have is that I need to pass the username from the drop downs as a range in a custom function module.

This is the approach I took:

I created a range table:

I appended the values:

However, on debugging I can see the the parameters I3_CASH and I2_CASH are not holding any values at all.

So the range table LT_USNAM2 passed to the FM  is empty

So can anyone please help me out as to how to populate the range table so that I can get the higher and lower values and append them so they can be passed to the FM ?

Regards,

Manish

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
3,301

Hi Manish,

If you want to have the user name in parameters I2_CASH and I3_CASH set the user names itselfs as the keys when composing table L_VALUES:

LOOP AT lt_usnam1 INTO l_usnam1.

l_value-key = l_usnam1-usnam.

l_value-text = l_usnam1-usnam.

APPEND l_value to l_values.

CLEAR l_value.

ENDLOOP.

BR,

Gábor

2 REPLIES 2
Read only

Former Member
0 Likes
3,302

Hi Manish,

If you want to have the user name in parameters I2_CASH and I3_CASH set the user names itselfs as the keys when composing table L_VALUES:

LOOP AT lt_usnam1 INTO l_usnam1.

l_value-key = l_usnam1-usnam.

l_value-text = l_usnam1-usnam.

APPEND l_value to l_values.

CLEAR l_value.

ENDLOOP.

BR,

Gábor

Read only

Clemenss
Active Contributor
0 Likes
3,301

Hi,

- add comments to your source code - someone else will have to do maintennance

- add types and texts to your selection screen fields - better understanding given

if IM_CASHIER is a range, it will be defined a a table type with a table line with columns sign, option, low, high.

FIELD-SYMBOLS:

  <USNAM2> LIKE LINE OF LT_USNAM2.

APPEND INITIAL LINE TO LT_USNAM2 ASSIGNING <USNAM2>.

<USNAM2>-sign = 'I'. "Include optio

<USNAM2>-option = 'EQ'.

<USNAM2>-low = I2_CASH.

Regards Clemens