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 make input parameter with multiple values in function module?

Former Member
0 Likes
3,443

Dear Experts,

I want to add BUKRS as import field to a FM, what is the best way of of making it accept multiple enteries.

Regards,

Kiran

5 REPLIES 5
Read only

mvoros
Active Contributor
0 Likes
1,359

Hi,

you have two possibilities:

1) use TABLES. You add new table parameter with type LIKE bukrs.

2) You define a new table type of bukrs in SE11 and use this type for new import parameter.

The first way is obsolete but second is annoying because you need to define new type in SE11. Fortunately there is already table type T_BUKRS defined by SAP. So I would use second way in this case and use type T_BUKRS.

Cheers

Read only

Former Member
0 Likes
1,359

hi,

create one structure in DDIC with fields

SIGN

OPTION

LOW

HIGH

like select option of BUKRS and in IMPORT part of FM create one variable like this structure and pass the BUKRS select option from your program to FM.

Read only

Former Member
0 Likes
1,359

Hi

one thingyou can do is to create a stucture in SE11 with field SIGN

OPTION,LOW and HIGH.Create a table type also in SE11 with this structure.

Goto your function module and under the TABLES parameter create a table

using the table type created in SE11.

In the program pass the select-option parameter to the function module.

By this way you can pass multiple entries to the function module.

Try this,

This will defnitly solve your problem.

Regards

Hareesh.

Read only

Former Member
0 Likes
1,359

hI kiran,

The simple way is to create a data element & domain with value range where u provide set of fixed values or provide a check table to it.

Use that data element in a table <ztable>.

Code:
Parameters:
      p_burks like <ztable>-dataelement.

Call Function <function_name>
exporting 
p_burks = p_burks,

:

:

Read only

Former Member
0 Likes
1,359

the safest way woyuld be to use tables statement.