on 04-18-2013 12:35 PM
Hi All,
I have a requirement material report as per the below: fg with multi level bom.. Plz help me
FG Code | FG Desc | Material Code | Mat Desc | Base Qty | Unit of Measure | UOM As per Bom | Qty |
Thanks
Hi,
SELECT the data from MARA,MARC,MAKT,MAST and STKO and STPO tables by inner join into one internal table and display the data.
Regards,
Gurunath Kumar D
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
This message was moderated.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi ,
There is no standard report available for this, you have to ask your abaper's to develop the new report for this requirement. Ask them to fetch the required data from the tables
MARC - Plant Data of material, MAKT - Material Descriptions, MAST - Material to BOM Link and STPO - BOM Items.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
You can get all Material UOM from the General Material Data (MARA)
As per your requirement, you can get the FG Codes UOM from MARA-MEINS and for the Material Codes UOM ( BOM UOM ), u can get it from STPO-MEINS or MARA-MEINS ( Both will be the same ).
Depending on the type of BOM used (Material BOM or Sales order BOM) you can use the tables MAST or KDST as the link.
To get the drilled down details like the AFS Details to the BOM, you can use the table J_3ABOMD.
Regards,
AyyamPerumal
Hi,
If there is no change in the BOM UOM and Material Master UOM, you can follow my above response.
In this scenario, i hope there should be a Conversion Factor maintained in the Material Master for that material in the Additional Data Tab ( To link the two different Quantities ).
You have to get those Conversion Factor Details and will have to modify your Quantities and UOM using those details.
Regards,
AyyamPerumal
Hi,
Try below loogic.
form sub_EXPLODE_BOM tables p_it_fin
using p_it_mara_matnr
p_it_mara_werks.
data:ft_stpo type STANDARD TABLE OF STPO_API02,
ft_stko TYPE STANDARD TABLE OF STKO_API02,
ft_stko1 TYPE STANDARD TABLE OF STKO_API02,
fw_stpo type STPO_API02,
fw_stko type STKO_API02.
data:warning type c.
clear:l_stlal,
temp2.
select stlal from mast into CORRESPONDING FIELDS OF TABLE t_stlal where matnr = p_it_mara_matnr .
sort t_stlal DESCENDING by stlal.
READ TABLE t_stlal into l_stlal index 1.
if sy-subrc eq 0.
move l_stlal to temp1.
clear l_stlal.
endif.
refresh:t_stlal.
do temp1 times.
clear l_stlal.
move sy-index to l_stlal.
refresh:ft_stpo, ft_stko.
CALL FUNCTION 'CONVERSION_EXIT_MATN1_INPUT'
EXPORTING
input = p_it_mara_matnr
IMPORTING
OUTPUT = p_it_mara_matnr
EXCEPTIONS
LENGTH_ERROR = 1
OTHERS = 2
.
IF sy-subrc <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
CALL FUNCTION 'CSAP_MAT_BOM_READ'
EXPORTING
material = p_it_mara_matnr
PLANT = p_it_mara_werks
bom_usage = '1'
ALTERNATIVE = l_stlal
IMPORTING
FL_WARNING = warning
TABLES
T_STPO = ft_stpo
T_STKO = ft_stko1
EXCEPTIONS
ERROR = 1
OTHERS = 2
.
IF sy-subrc <> 0.
* MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
* WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
loop at ft_stpo into fw_stpo.
move p_it_mara_matnr to wa_stpo-matnr1 .
shift wa_stpo-matnr1 LEFT DELETING LEADING '0' .
move it_mara-ind to wa_stpo-ind.
move l_stlal to wa_stpo-alt.
shift p_it_mara_matnr left deleting leading '0'.
move p_it_mara_matnr to wa_stpo-matnr.
move fw_stpo to wa_stpo-api02.
add 1 to temp2.
move temp2 to wa_stpo-flg1.
append wa_stpo to it_stpo1.
endloop.
refresh:ft_stpo,ft_stko.
enddo.
clear wa_stpo.
loop at it_stpo1 into wa_stpo.
CALL FUNCTION 'CONVERSION_EXIT_MATN1_INPUT'
EXPORTING
input = wa_stpo-api02-COMPONENT
IMPORTING
OUTPUT = wa_stpo-api02-COMPONENT
EXCEPTIONS
LENGTH_ERROR = 1
OTHERS = 2
.
IF sy-subrc <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
clear:l_stlal,temp1.
refresh:t_stlal.
select stlal from mast into CORRESPONDING FIELDS OF TABLE t_stlal where matnr = wa_stpo-api02-COMPONENT.
if sy-subrc eq 0.
sort t_stlal DESCENDING by stlal.
READ TABLE t_stlal into l_stlal index 1.
move l_stlal to temp1.
refresh:t_stlal.
clear:l_stlal.
endif.
do temp1 times.
move sy-index to l_stlal.
CALL FUNCTION 'CSAP_MAT_BOM_READ'
EXPORTING
material = wa_stpo-api02-COMPONENT
PLANT = p_werks
bom_usage = '1'
ALTERNATIVE = l_stlal
IMPORTING
FL_WARNING = warning
TABLES
T_STPO = ft_stpo
T_STKO = ft_stko
EXCEPTIONS
ERROR = 1
OTHERS = 2
.
IF sy-subrc <> 0.
ENDIF.
loop at ft_stpo into fw_stpo.
move wa_stpo-flg1 to wa_stpo1-flg2.
move l_stlal to wa_stpo1-alt.
shift wa_stpo-api02-COMPONENT LEFT DELETING LEADING '0'.
move wa_stpo-api02-COMPONENT to wa_stpo1-matnr.
move fw_stpo to wa_stpo1-api02.
move p_it_mara_matnr to wa_stpo1-matnr1.
shift wa_stpo1-matnr1 left DELETING LEADING '0' .
move it_mara-ind to wa_stpo1-ind.
*move loc to wa_stpo1-ind.
add 1 to temp2.
move temp2 to wa_stpo1-flg1.
append wa_stpo1 to it_stpo1.
endloop.
refresh:ft_stpo, ft_stko.
enddo.
ENDLOOP.
if not it_stpo1 is initial .
add 1 to loc .
clear wa_stpo.
move 'C70' to wa_stpo-color.
move it_mara-ind to wa_stpo-ind.
insert wa_stpo into it_stpo1 index 1.
read table ft_stko1 into fw_stko index 1 .
if sy-subrc eq 0.
clear wa_stpo-color.
move 'C10' to wa_stpo-color.
shift it_mara-matnr left deleting leading '0'.
wa_stpo-matnr = it_mara-matnr.
wa_stpo-COMPONENT = it_mara-matnr.
wa_stpo-comp_qty = fw_stko-BASE_QUAN.
insert wa_stpo into it_stpo1 index 2.
endif.
endif .
endform. " EXPLODE_BOM
Regards
Srinivas.K
HI,
Please share you requirement with ABAPer he will develop a report as per this format.
As this kind of report is not available in standard.
Thanks
Lokesh
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
You will have to develop a report with help of ABAP developer.
You can use following tables -
1) MARC - Plant Data of material
2) MAKT - Material Descriptions
3) MAST - Material to BOM Link
4) STPO - BOM Items
Link tables MARC / MAST & STPO base on MATNR & WERKS. Get the required details from these tables & output the same.
Hope this helps.
Regards,
Prashant
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
99 | |
12 | |
11 | |
6 | |
6 | |
4 | |
3 | |
3 | |
3 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.