Skip to main content
Announcements
Global Transformation Awards! Applications are now open. Submit Entry
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

FIFO - Fill Ratio calculation Purchase order vs GRN

Hi,

I am trying to load purchase order schedules and correspoding Grn (goods receipt note) tables, 

Following are the table data

Purchase Order Table

PO NOPODATEQTYSCHEDULE DATE
44000626802012-07-05575010-Aug-12
44000626802012-07-05500020-Aug-12
44000678402012-11-2067019-Dec-12

GRN Tabel

PO NOGrnNoDateGateQty
4400062680500039845912-Jul-122500
4400062680500040180523-Jul-123500
4400062680500040294826-Jul-123300
4400062680500040324327-Jul-122200
4400067840500044141025-Dec-12500

I want to generate a result table as follows in load script

PONOGrnNoDateGateQtyFILL RATIONO OF DAYS
4400062680500039845912-Jul-12250043.48-29
4400062680500040180523-Jul-123500104.35-18
4400062680500040294826-Jul-12330066.00-25
4400062680500040324327-Jul-121700100.00-26
4400067840500044141025-Dec-1250074.636

The Fill Ratio is calculated based on first schedule of the same PO number, once the scheduled qty is completly received, it should consider next available record for the same PO.,Same way the no of days is also calculated

.

Thanks in advance for your help

Sajith. T

0 Replies