TYPES:
BEGIN OF ty_bom,
idnrk TYPE stpo-idnrk,
matnr TYPE mast-matnr,
werks TYPE mast-werks,
bmeng TYPE stko-bmeng,
menge TYPE stpo-menge,
END OF ty_bom.
DATA gt_bom TYPE TABLE OF ty_bom.
SELECT d~idnrk
a~matnr
a~werks
b~bmeng
d~menge
FROM mast AS a INNER JOIN stko AS b
ON a~stlnr = b~stlnr AND
a~stlal = b~stlal
INNER JOIN stas AS c
ON b~stlty = c~stlty AND
b~stlnr = c~stlnr AND
b~stlal = c~stlal
INNER JOIN stpo AS d
ON c~stlty = d~stlty AND
c~stlnr = d~stlnr AND
c~stlkn = d~stlkn
INTO CORRESPONDING FIELDS OF TABLE gt_bom
WHERE a~werks = i_plant
AND b~stlty = 'M'
AND d~idnrk EQ lv_model.
댓글 2
-
sapjoy
2017.11.16 22:57
CSAP_MAT_BOM_READ -
전군
2017.11.21 18:27
BOM 전개 function으론 아래것도 많이 씁니다. 참고로 달아봅니다.
CALL FUNCTION 'CS_BOM_EXPL_MAT_V2'
EXPORTING
capid = 'PP01' " Application ID
altvo = 'X' " 입력된 대체BOM 기준 조회
emeng = i_emeng " 기준수량
mehrs = i_mehrs " Multi-level explosion
mtnrv = i_matnr "
werks = i_werks "
stlal = i_stlal " 대체 BOM '01'
stlan = i_stlan " 1: 생산
datuv = i_datuvTABLES
stb = et_stb