Get production order according to status.
Get Production Order info in detail from ORDER ITEM table AFPO.
Get Production Orders from Status table from table JEST.
Delete entries from I_AFPO if there is no corresponding entry in JEST.
Get WMS using charateristics.
Get Internal characteristic and object for item type from CABN and AUSP.
Get Objek(matnr) for END_MARKET according to Domestic/Export from CABN and AUSP.
Get used WMS materials (from PO using BOM explosion)
Check AFPO record.
DESCRIBE TABLE I_AFPO LINES L_LINE.
Get reservation number for material from AFKO.
Get Reservation table for find Production Order which contain WMS from RESB.
Prepare BOM table.
Arrange Prod. Order which contain WMS in BOM table.
Get BOM CALL FUNCTION 'CS_BOM_EXPL_MAT_V2'.
Fill in BOM table with Base Quantity.
Fill in PUQ table.
Get PUQ using afpo and BOM.
Get WMS matnr from bom table.
Prepare combination PO no and WMS matnr for MSEG retrieving.
Get AUQ with WMS materials.
Check PO exists.
Get Actual Usage Qty from mseg according to Prd Order No.
select mblnr bwart matnr menge aufnr vprsv
Fill in AUQ table.
Get adjustment Qty from mseg only according to WMS matnr.
Get adjustment from mseg table.
Get Document header for Adjustment.
Adjusting AUQ table.
Get Material Group and descriptions.
Check PUQ table.
Get Material Group Description.
Get material description.
Build Detail Report.
IF RB_DTL = 'X'.