‎2007 May 25 2:16 PM
Hi experts,
please could you explane me what do this code in detail?
<p>
DATA: material LIKE /bi0/pmaterial-material,
mrp_contrl LIKE /bi0/pmaterial-mrp_contrl.
RANGES: rpf_mrpp FOR /bi0/pmaterial-mrp_contrl.
DATA: it_z12vcitm LIKE /bic/az12vcitm00 OCCURS 0 WITH HEADER LINE.
DATA: new_package LIKE DATA_PACKAGE OCCURS 0 WITH HEADER LINE.
DATA: it_zcharq LIKE /bic/azcharq00 OCCURS 0 WITH HEADER LINE.
FIELD-SYMBOLS <f> TYPE ANY.
FIELD-SYMBOLS <u> TYPE ANY.
FIELD-SYMBOLS <c> TYPE ANY.
DATA f TYPE string.
DATA u TYPE string.
DATA c TYPE string.
DATA: valore TYPE /bic/azcharq00-sum_of_x.
rpf_mrpp-sign = 'E'.
rpf_mrpp-option = 'BT'.
rpf_mrpp-low = '010'. rpf_mrpp-high = '029'. APPEND rpf_mrpp.
rpf_mrpp-low = '034'. rpf_mrpp-high = '037'. APPEND rpf_mrpp.
rpf_mrpp-option = 'EQ'.
rpf_mrpp-low = '040'. APPEND rpf_mrpp.
rpf_mrpp-low = '045'. APPEND rpf_mrpp.
SORT DATA_PACKAGE BY material.
LOOP AT DATA_PACKAGE.
IF material NE DATA_PACKAGE-material.
material = DATA_PACKAGE-material.
SELECT SINGLE mrp_contrl FROM /bi0/pmaterial
INTO mrp_contrl
WHERE material = material
AND objvers = 'A'.
IF sy-subrc NE 0.
CLEAR mrp_contrl.
ENDIF.
ENDIF.
IF mrp_contrl IN rpf_mrpp.
DELETE DATA_PACKAGE.
ENDIF.
ENDLOOP.
</p>
Regards,
Vito
Message was edited by:
Vito Savalli
‎2007 May 25 2:23 PM
Hi,
<b>MRP Control</b> = <b>010 to 029, 034 to 037 & MRP Control = 40, 45.</b>
The routine receives Material no. , MRP Control as input.
Based on the material no. received in the routine & OBJVERS = "A", MRP CONTROL is retrieved from bi0/pmaterial.
The MRP Control retrieved from the above table should match the values mentioned in bold. If MRP control is same, then the record is deleted from the Data Package.
Best regards,
Prashant
‎2007 May 25 2:19 PM
Hi,
This looks like "Da Vinci code "
kindly provide a formatted version
‎2007 May 25 2:23 PM
Hi,
<b>MRP Control</b> = <b>010 to 029, 034 to 037 & MRP Control = 40, 45.</b>
The routine receives Material no. , MRP Control as input.
Based on the material no. received in the routine & OBJVERS = "A", MRP CONTROL is retrieved from bi0/pmaterial.
The MRP Control retrieved from the above table should match the values mentioned in bold. If MRP control is same, then the record is deleted from the Data Package.
Best regards,
Prashant