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

How to Pass Select-options Single values as Parameter value to Method ?

Former Member
0 Likes
615

Hi Friends,

I need to pass select-options values(single values) for s_arbpl to the method "process_percent_planned". Now all single values are in internal table s_arbpl-low field. I need to pass this internal table(s_arbpl-low) values to the method where i will run query based on these single values.In my below code i am passing value through variable w_arbpl. I have defined this parameter in the method.But here only one value is passed to method. I want multiple single values (in s_arbpl-low) should be passed. Please let me know how to correct code.

Tables: crhd.

Data: ktext type auftext,

w_arbpl type arbpl.

select-options: s_arbpl for crhd-arbpl.

ktext = 'Test'

create object obj_plan.

call method obj_plan->process_percent_planned

exporting

ktext = ktext

w_arbpl = s_arbpl-low.

Thanks

Hi Friends,

I need to pass select-options values(single values) for s_arbpl to the method "process_percent_planned". Now all single values are in internal table s_arbpl-low field. I need to pass this internal table(s_arbpl-low) values to the method where i will run query based on these single values.In my below code i am passing value through variable w_arbpl. I have defined this parameter in the method.But here only one value is passed to method. I want multiple single values (in s_arbpl-low) should be passed. Please let me know how to correct code.

Tables: crhd.

Data: ktext type auftext,

w_arbpl type arbpl.

select-options: s_arbpl for crhd-arbpl.

ktext = 'Test'

create object obj_plan.

call method obj_plan->process_percent_planned

exporting

ktext = ktext

w_arbpl = s_arbpl-low.

Thanks

2 REPLIES 2
Read only

Former Member
0 Likes
565

Hello,

You could just loop at the select-options field and call the method inside it


Tables: crhd.
Data: ktext type auftext,
w_arbpl type arbpl.


select-options: s_arbpl for crhd-arbpl.


ktext = 'Test' 

create object obj_plan.

loop at s_arbpl.

call method obj_plan->process_percent_planned
exporting
ktext = ktext
w_arbpl = s_arbpl-low.
endloop.

Vikranth

Read only

deepak_dhamat
Active Contributor
0 Likes
565

hi ,

when you want to pass S_ARBPL AS PARAMETER IN SELEC OPTION

ARBPL SUCH AS

WIN002

WIN003

WIN004

WIN005

WIN006

WIN007

IN MULTIPLE SELECTION S_ARBPL

THEN

USE

Tables: crhd.

Data: ktext type auftext,

w_arbpl type arbpl.

select-options: s_arbpl for crhd-arbpl.

ktext = 'Test'

LOOP AT S_ARBPL .

create object obj_plan.

call method obj_plan->process_percent_planned

exporting

ktext = ktext

w_arbpl = s_arbpl-low.

ENDLOOP.

REGARDS

dEEPAK .

THEN SELECT THAT

call method obj_plan->process_percent_planned

exporting

ktext = ktext

w_arbpl = s_arbpl-low.