Script

gtmsb

Member
FOR EACH pt_mstr NO-LOCK
WHERE pt_pm_code = "P"
, EACH in_mstr NO-LOCK
WHERE in_part = pt_part
AND in_mrp
:
DISPLAY pt_part
pt_desc1
in_site
.
END.



Can anyone explain this to me?
I am poor in script.
 
If I have added Progress comments with the explanation of the lines.

You have requested a script to lookup Purchase items with MRP required.


FOR EACH pt_mstr NO-LOCK /* Read All Products */
WHERE pt_pm_code = "P" /* When "product PM type" = purchase */
, EACH in_mstr NO-LOCK /* Read all inventory masters */
WHERE in_part = pt_part /* connect it to the product master */
AND in_mrp /* Where the MRP flag indicates recalculate */
:
DISPLAY pt_part /* Display product code */
pt_desc1 /* Item description 1 */
in_site /* inventory site for which the MRP should be recalculated */
.
END.


NO-LOCK is just for just reading the database tables and iqnore other users who could lock the data for other purposes.

William W.
 
Back
Top