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

LIST BOX

Former Member
0 Likes
457

Hi Experts,

Here I hv example code regarding the LIST BOX,

<i><i><b>Set the LOWER values</b></i></i>

<i>qcr_list = 'P_QCR1'.

CALL FUNCTION 'VRM_SET_VALUES'

EXPORTING

id = qcr_list

values = list.</i>

<b>* Set the HIGHER values</b>

<i>qcr_list = 'P_QCR2'.

CALL FUNCTION 'VRM_SET_VALUES'

EXPORTING

id = qcr_list

values = list.</i>

So, pls. le t me clarify that,

1- How the SAP knows that, the P_QCR1 shuld put under LOWER value? Just bcoz, its come first in the coding sequence i.e. before P_QCR2?

thanq.

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
431

Hello Srikhar,

When you use qcr_list = 'P_QCR1'. then you are calling FM ,so it will come first..

Genrally this type of req ,i will not define select-option and i use always parameters

even if you want as select-option then we have other process ,let me know if you need any...

Thanks

Seshu

3 REPLIES 3
Read only

Former Member
0 Likes
432

Hello Srikhar,

When you use qcr_list = 'P_QCR1'. then you are calling FM ,so it will come first..

Genrally this type of req ,i will not define select-option and i use always parameters

even if you want as select-option then we have other process ,let me know if you need any...

Thanks

Seshu

Read only

0 Likes
431

ThanQ Sheshu,

I guess the following is answer for my questtion!

<i>When you use qcr_list = 'P_QCR1'. then you are calling FM ,so it will come first..

Genrally this type of req ,i will not define select-option and i use always parameters

<i>Am also usign parameters i.e. am not using select-options.

As I need to hv list box; I hv choosen parameters</i>

even if you want as select-option then we have other process ,let me know if you

need any...</i>

Pls. let me know(my curiosity)

thanq.

Message was edited by:

Srikhar

Read only

0 Likes
431

Declare selection screen as two parameter like

selection-screen : begin of block b2 with frame title text-002.

selection-screen begin of line.

selection-screen comment 1(31) text-003.

parameter: p_mtart like mara-mtart

as listbox visible length 10 .

selection-screen comment 40(30) text-005.

parameter: p_mtart1 like mara-mtart

as listbox visible length 10 .

selection-screen end of line.

selection-screen: end of block b2.

i did not test in my system above code -

selection-screen parameter will show

material type - box material type - box

now once you filled the data ( By using list box ) ,then create one range

range : r_mtart for mara-mtart.

in start-of-selection.

do append all the parameter values

r_mtart-low = p_mtart.

r_mtart-high = p_mtart1.

r_mtart-option = 'BT'.

r_mtart-sign = 'I'.

append r_mtart.

you can use r_mtart as in select query using in operator.

Thanks

Seshu