01-21-2009 2:05 PM
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
01-21-2009 2:11 PM
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
01-21-2009 2:11 PM
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
01-21-2009 2:18 PM
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.
01-21-2009 3:21 PM