Application Development 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: 

Passing Range to Function

Former Member
0 Kudos

Hi all

I would thank and reward with points to a correct answer.

I have one range with many lines. Example of one line:

mob-sign = 'I'.

mob-option = 'EQ'.

mob-low = '50010031'.

append mob.

Then I have to pass this range to a Function module to use in it. This means I will check some values if it's in this range. For example:

IF xpto IN mob.

ENDIF.

How do I pass the range? Through tables? Parameter?

And do I define in FM?

Message was edited by:

André Jordã

6 REPLIES 6

Former Member
0 Kudos

Hi,

Yes you can populate the range and use it further in the code

like

If not itab-field in mob.

< do some calculation>

endif.

reward if useful

regards,

ANJI

Former Member
0 Kudos

Hi...

Pass this in the tables option to the function module.

Reward points if useful......

Suresh......

Former Member
0 Kudos

in ur function module u can to define a field in the Tables section. This field needs to be reffer to a structure.... for this u need to create a structure with the fields ur passing in the range. now u can pass the range details to this FM using the table field which will hold data same as like an internal table.... u can use this data for ur validations.

Former Member
0 Kudos

yeah thru tables only.

call Function 'zpbc'.

export

import

tables

ranges = r_ranges.

Regards

Prabhu

Former Member
0 Kudos

No, I pass it through tables, I define it on FM LIKE EFG_RANGES (range type). It gives me the error: "MOB is not an internal table" on function call.

Former Member
0 Kudos

Hi,

We have standard Structures

/SDF/RANGES Ranges for data selection

/SDF/RANGESC1 Ranges for data selection CHAR 1

/SDF/RANGESC10 Ranges for data selection CHAR 10

/SDF/RANGESC14 Ranges for data selection CHAR 14

/SDF/RANGESC4 Ranges for data selection CHAR 4

/SDF/RANGESC5 Ranges for data selection CHAR 5

/SDF/RANGESD15 Ranges for data selection DEC 15

/SDF/RANGESD18 Ranges for data selection DEC 18

/SDF/RANGESI1 Ranges for data selection INT 1

/SDF/RANGESI2 Ranges for data selection INT 2

/SDF/RANGESI4 Ranges for data selection INT 4

You can make use of these and create the parameter in the TABLES, so that we can get more than 1 data at a time

Regards

Sudheer