‎2008 Nov 03 4:20 PM
Hello,
I have a table parameter (S_KOSTL) defined as RSRANGE in a function module.
Now when I am passing the table to an perform staeement as follows:
PERFORM get_cost_center_info USING s_kostl
CHANGING lt_output.
Inside the form routine I am using following:
FORM get_cost_center_info USING S_KOSTL TYPE RSRANGE
CHANGING ct_output TYPE tt_output.
LOOP AT it_ausp INTO ls_ausp WHERE atwrt IN s_kostl.
:
:
ENDLOOP.
But it says relational operator 'IN' not supported even if I defined S_KOSTL LIKE RSRANGE in function module tbale parameter.
Please help.
Regards,
Rajesh.
‎2008 Nov 03 4:24 PM
When you use "USING S_KOSTL TYPE RSRANGE" like that, you're defining the parameter s_kostl as a flat structure, rather than a table of rsrange.
Either use the form TABLES addition, or, define a table type of type standard table of rsrange.
matt
‎2008 Nov 03 4:23 PM
Since you are passing the Range which is a Table you have to pass it with the TABLES addition instead of the Using.
Try like this:
PERFORM get_cost_center_info TABLES s_kostl
CHANGING lt_output.
Inside the form routine I am using following:
FORM get_cost_center_info TABLES S_KOSTL TYPE RSRANGE
CHANGING ct_output TYPE tt_output.
LOOP AT it_ausp INTO ls_ausp WHERE atwrt IN s_kostl.
ENDLOOP.
Regards,
Naimesh Patel
‎2008 Nov 03 4:24 PM
When you use "USING S_KOSTL TYPE RSRANGE" like that, you're defining the parameter s_kostl as a flat structure, rather than a table of rsrange.
Either use the form TABLES addition, or, define a table type of type standard table of rsrange.
matt
‎2008 Nov 03 4:30 PM
‎2008 Nov 03 4:35 PM
Define a table type in SE11, perhaps called "Z_T_RSRANGE", which has line type RSRANGE.
matt
‎2008 Nov 03 4:27 PM
Since the TABLES parameter is obsolete (implicit header line), I recommend Matt's second alternative. You should do the same in your function module interface, don't use TABLES any more, instead CHANGING.
Thomas