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 import a range in Function module?

Former Member
0 Likes
9,432

I am using a Function module in which material is getting imported.

In the import tab we have

Parameter Name    Typing     Associated Type       optional          pass value
IM_MATERIAL       TYPE       MATNR                 <checked>         <checked>

So when the Function module is execute we can enter only one value into the IM_MATERIAL.

But now it has to be enhanced for entering multiple values. How to import the material as a range?

Please throw light.

Thanks.

2 REPLIES 2
Read only

former_member209703
Active Contributor
3,308

Hi

If you are using a select-options you can use this approach.


TABLES: MARA.
DATA: RANGE TYPE WRF_MATNR_RANG_TTY.

SELECT-OPTIONS: SO_MATNR FOR MARA-MATNR.


START-OF-SELECTION.

  RANGE[] = SO_MATNR[].

CALL FUNCTION 'ZTEST'
 EXPORTING
   I_RANGE       = RANGE.

Where I_RANGE is defined using this table type WRF_MATNR_RANG_TTY


Parameter Name    Typing     Associated Type     optional          pass value
I_RANGE       TYPE       WRF_MATNR_RANG_TTY      <checked>     <checked>

Read only

Former Member
0 Likes
3,308

S_MATERIAL TYPE EFG_TAB_RANGES

Rob