Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

code

former_member39123
Participant
0 Likes
523

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

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
494

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

2 REPLIES 2
Read only

Former Member
0 Likes
494

Hi,

This looks like "Da Vinci code "

kindly provide a formatted version

Read only

Former Member
0 Likes
495

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