cancel
Showing results for 
Search instead for 
Did you mean: 

PR+PO+GR Link tables

Former Member
0 Kudos

Dear Experts,

Created two PR from ME51N this t code and assigned to maintenance order .

BTW PO for PR  but if GR is pending for one PR.

System should give user the error message for the pending GR, TECO should not happen.

Logic i created was,

  1. Go to table EKKN (PO) and pick the value EKKN –AUFNR(order no) , EKKN –EBELN(PO no) , EKKN –MENGE(QTY).

 

  1. Go to table EKBE  (GR)and pick the value EKBE –EBELN(PO no) , EKBE –BELNR(GR no) , EKBE –MENGE(Qty),

EKBE-ELIKZ (delivery completed) IF(EKKN –MENGE= EKBE –MENGE) AND EKBE-ELIKZ=‘X’

but if once total QTY for GR is 20 mea

first time its receiving 10 later, second time its receiving 10.

now  GR is received. but in tables two GR no r there. last completed GR no row is assigning 'X'

Want to compare the qty wheather its received r pending?

Valuable answers are appreciable.

Regards,

KPS.

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

Hello,

In case of multiple GRs, you have to add the quantity of all the material documents and then check the same with total quantity and decide whether the PO is still open or not.

You will also have to check the cancelled document. I mean if the GR document is cancelled (Movement type - 102) and a new GR is posted again (Movement type - 101), for such cases also, you have to add the logic.

You can also use debit / creadit indicator (EKBE - SHKZG) to arrive at total GR quantity

(EKBE-MENGE) which you can compare with total procured quantity (EKPO - MENGE) and decide whether the PO is still open or not.

Hope this will help you.

Thanks & Regards,

Mihir Popat