2009 Nov 05 3:20 PM
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
2009 Nov 05 3:32 PM
Why don't you pass the whole select-options?
Just declare w_arbpl in the method as a range of arbpl.
Or in case you don't want to process that in the method, then move the low values to a table of type arbpl and pass that table to the method. Of course you need to change the definition of w_arbpl in the method first
2009 Nov 09 4:52 PM
Hi Debabrata,
s_arbpl has got a headerline with the same name as the internal table. So you pass s_arbpl-low of this headerline to your method. To get access to the 'table' (and the single values) use s_arbpl[]:
TABLES: crhd.
DATA: wr_arbpl TYPE RANGE OF crhd-arbpl WITH HEADER LINE.
SELECT-OPTIONS: s_arbpl FOR crhd-arbpl.
WRITE: / s_arbpl-low. "headerline
LOOP AT s_arbpl[] INTO wr_arbpl.
WRITE: / wr_arbpl-low.
ENDLOOP.
regards, Karsten
Edited by: Karsten Korte on Nov 9, 2009 5:57 PM
ok, that was not really the question, sorry.
just do what Ramiro Escamilla suggested ...
2009 Nov 25 8:55 PM
Hi Debabrata ,
Create a local type inside your class obj_plan( i dont know what is the reference type )
like
t_range_arbpl type range of arbpl.
Now your method process_percent_planned should have an importing parameter of type t_range_arbpl
say i_arbpl
YOu can pass the select options internal table directlty
call method obj_plan->process_percent_planned
exporting
ktext = ktext
i_arbpl = s_arbpl[].
| User | Count |
|---|---|
| 3 | |
| 2 | |
| 2 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |