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

Issue when passing table parameter to perform...

Former Member
0 Likes
790

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.

1 ACCEPTED SOLUTION
Read only

matt
Active Contributor
0 Likes
744

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

5 REPLIES 5
Read only

naimesh_patel
Active Contributor
0 Likes
744

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

Read only

matt
Active Contributor
0 Likes
745

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

Read only

Former Member
0 Likes
744

How can I do Matt's alternatice approach...

Read only

matt
Active Contributor
0 Likes
744

Define a table type in SE11, perhaps called "Z_T_RSRANGE", which has line type RSRANGE.

matt

Read only

ThomasZloch
Active Contributor
0 Likes
744

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