Hero prompt: GRPO DATA EXTRACTION & POPULATION RULES Applicable...
2views
0favorites
Model used
Hero1.0Generation parameters
Image1024x1024119479jpg
Prompt
GRPO DATA EXTRACTION & POPULATION RULES
Applicable Document: Generate Goods Receipt PO (GRPO) only.
--------------------------------------------------
Rule 1 – GRPO Dates
Populate:
| SAP Table | Field | Value |
| OPDN | DocDate | Clearing Agent/Freight Forwarder Invoice Date |
| OPDN | DocDueDate | Clearing Agent/Freight Forwarder Invoice Date |
| OPDN | TaxDate | Clearing Agent/Freight Forwarder Invoice Date |
Business Rules
• Use the invoice date issued by the Clearing Agent, Freight Forwarder or Logistics Company (e.g. P. Kelepeshis, Hellenic Cargo Freight Logistics, Blue Ice or similar).
• Use the same date for all three fields.
• Do not use Supplier Invoice Date, Bill of Lading Date, Posting Date, Scan Date, Email Date or System Date.
• If the date cannot be identified with confidence, flag Manual Review.
--------------------------------------------------
Rule 2 – Product Line Validation
Compare every Purchase Order (Base Document) line against the Supplier Invoice.
Compare: Item Code, Description, Quantity, Unit Price, Line Total.
Business Rules
• GRPO lines must always be created from the Base Document (Purchase Order).
• Supplier Invoice values are for validation only and validation must always be performed.
• Never overwrite Purchase Order values with Supplier Invoice values.
• Before comparing Quantity, Unit Price or Line Total, convert both documents to the same Unit of Measure using the Purchase Order UoM.
• Convert both Quantity and Unit Price before validation.
• Standard conversion: 1 MT (TON)=1,000 KG.
• Example: 17 MT @ €2,010/MT = 17,000 KG @ €2.01/KG.
• Use packaging information (e.g. 68 Drums × 250 KG) to validate converted quantities.
• Never compare values with different Units of Measure.
• If Quantity, Unit Price or Line Total differs after conversion, display the differences and flag Manual Review.
• If the Invoice contains items not on the Purchase Order, flag Manual Review.
• If the Purchase Order contains items not on the Invoice, flag Manual Review.
• If the UoM or conversion factor cannot be determined, flag Manual Review.
--------------------------------------------------
Rule 3 – Batch Number Validation
For batch-managed items extract the Batch Number from the CoA, Supplier Invoice, Packing List and other supporting documents.
Business Rules
• Use the CoA Batch Number as the default SAP Batch Number.
• Compare the CoA Batch Number with all other documents.
• If any Batch Number differs, still populate the CoA Batch Number but flag Manual Review and display the conflicting document(s).
• Ignore spaces, hyphens, slashes and letter case when comparing Batch Numbers.
• Compare each item independently.
• Support multiple Batch Numbers per item and preserve quantities.
• If no CoA exists, use the next highest priority document and flag Manual Review.
• If no Batch Number is found, flag Manual Review.
--------------------------------------------------
Rule 4 – Manufacturing & Expiry Dates
Extract Manufacturing Date and Expiry Date for every batch-managed item from the CoA.
Recognize labels:
Manufacturing: Date of Manufacture, Manufacturing Date, MFG Date, Production Date, Produced On, Manufactured On.
Expiry: Expiry Date, Expiration Date, Exp Date, Best Before, Use Before, Valid Until, Shelf Life Until, Retest Date.
Business Rules
• If no Expiry Date exists but a Retest Date exists, use the Retest Date as the Expiry Date.
• Return all dates in DD/MM/YYYY format.
• If only Month and Year are available, use the first day of the month.
• Example: May 2026 = 01/05/2026, November 2027 = 01/11/2027.
• Compare Manufacturing and Expiry/Retest Dates with all supporting documents.
• If dates differ, flag Manual Review.
--------------------------------------------------
Rule 5 – Freight Charges
Condition
When invoice lines contain Freight, Freight Surcharge, Fuel Charge, Fuel Surcharge, Transport Charge, Shipping Charge, Logistics Charge or freight-related Sundries.
Action
• Remove these lines from the product lines.
• Populate SAP Business One Additional Expenses.
• SAP Table: PDN3.
• Expense Code: FREIGHT.
• PDN3.LineTotal (Net Amount)=Total Freight Charges.
• Preserve VAT Code.
Business Rules
• Freight charges are NOT discounts.
• Populate ONLY PDN3.LineTotal.
• Never populate Document Discount.
• Never populate Line Discount.
• Never reduce Item Unit Price.
• Never reduce Item Line Total.
• Never use Freight Charges to balance the invoice.
• Product lines must contain inventory goods only.
• Combine multiple freight-related charges into one PDN3.LineTotal value.
• If a Sundries line cannot be identified as freight-related, flag Manual Review.
Validation
Invoice Total = Product Total + PDN3.LineTotal ± Taxes.
--------------------------------------------------
Rule 6 – Product Cost Surcharges
Condition
When invoice lines contain Energy Surcharge, Energy Cost Adjustment, Raw Material Surcharge, Alloy Surcharge, Metal Surcharge, Environmental Surcharge, Manufacturing Surcharge or similar product cost surcharges.
Action
• Do NOT populate PDN3.LineTotal.
• Allocate the surcharge to the related product line(s).
• Increase the Product Unit Price.
Business Rules
• These surcharges form part of the acquisition cost.
• They must not remain as separate invoice lines.
• They must never create Freight Charges.
• If the surcharge relates to one product, allocate 100% to that product.
• If it relates to multiple products, distribute proportionally based on line value unless another allocation method is specified.
• Recalculate the Unit Price after allocation.
Formula
New Unit Price=(Product Line Value+Allocated Surcharge)/Quantity.
Example
Qty=10, Unit Price=€100, Energy Surcharge=€20.
New Unit Price=(1000+20)/10=€102.
• If the affected products cannot be determined, flag Manual Review.
--------------------------------------------------
Validation Rules
• Never guess or invent values.
• Always compare the Purchase Order against the Supplier Invoice before creating the GRPO.
• Flag all Quantity, Unit Price and Line Total differences.
• Batch Number defaults to the CoA and must match supporting documents.
• Manufacturing and Expiry Dates default to the CoA.
• Freight, Fuel, Transport, Shipping and Logistics charges populate PDN3.LineTotal only.
• Product Cost Surcharges (e.g. Energy Surcharge) must increase the Product Unit Price and must never populate PDN3.LineTotal.
• Freight Charges must never populate Document Discount or Line Discount.
• If confidence is below 80%, flag Manual Review.
More by @theodorapetrou
Comments (0)
Please sign in to comment