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

Pass a Select-Option as Input Parameter to a BAPI

Former Member
0 Likes
1,061

Hello All,

I would like you can help me. I neet to pass a Select-Option parameter to a BAPI who does a query using the condition WHERE field IN values.

What I get until now is activating the function to WHERE field = value.

4 REPLIES 4
Read only

Former Member
0 Likes
763

HI Roberto,

If the parameter is defined to hold a range then youcan pass that select-option values as a tables parameter. If it is not defined to hold a range , then you cannot pass the select-option.

REgards,

Ravi

Read only

0 Likes
763

Hi Ravi,

Thanks for your anwser.

My parameter is defined in the import part so:

P_MATERIAL TYPE MSEG-MATNR

Are you suggesting me to declare as a table parameter to accept a range of values? I need to create a structure with a single field (MSEG-MATNR) ?

Thanks in advance.

Read only

0 Likes
763

Hi Roberto,

Yes declare it as a table parameter so that it can accept the multiple values.

Regards,

Atish

Read only

Former Member
763

for example if you have a bapi which returns the material related data for asingle material, you cannot pass a range of materials at once.

In such case, you have to get all the materials into an internal table and then call the bapi for each loop.

select matnr from mara into table itab

where matnr in s_matnr.

loop at itab.

call function 'BAPI.....

exporting

material = itab-matnr

endloop.

REgards,

Ravi