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

passing value range to function module

Former Member
0 Likes
862

Hi

Im going to use bom explosion FM CS_BOM_EXPL_MAT_V2 to fetch data.

In my requirement, there are range of WERKS and MATNR i.e. Select-option, which has to be given from selection screen, where as In CS_BOM_EXPL_MAT_V2 function module I can only give single value for WERKS and MATNR.

Can any one guide me how can I implement this?

Thank you in advance

1 ACCEPTED SOLUTION
Read only

SuhaSaha
Product and Topic Expert
Product and Topic Expert
0 Likes
554

Hello,

Depending on WERKS & MATNR select data from MARC into an internal table. Loop at the int. table & call the FM.


SELECT MATNR WERKS INTO ITAB
WHERE
MATNR IN S_MATNR
AND WERKS IN S_WERKS.

IF SY-SUBRC = 0.

LOOP AT ITAB INTO WA.
" Call the FM using WA-MATNR & WA-WERKS
ENDLOOP.

ENDIF.

BR,

Suhas

3 REPLIES 3
Read only

SuhaSaha
Product and Topic Expert
Product and Topic Expert
0 Likes
555

Hello,

Depending on WERKS & MATNR select data from MARC into an internal table. Loop at the int. table & call the FM.


SELECT MATNR WERKS INTO ITAB
WHERE
MATNR IN S_MATNR
AND WERKS IN S_WERKS.

IF SY-SUBRC = 0.

LOOP AT ITAB INTO WA.
" Call the FM using WA-MATNR & WA-WERKS
ENDLOOP.

ENDIF.

BR,

Suhas

Read only

Former Member
0 Likes
554

HI,

Best way is to get matnr plant data from marc based on all your selection criterion..

LOOP on this tab.

"Call FM CS_BOM_EXPL_MAT_V2....

Append the return tab in an internal table and clear it..

ENDLOOP.

you have data for all your material plant combinations in internal tab.

Read only

Former Member
0 Likes
554

Solved.

Thank you so much from both of you.