Skip to main content

Hi All

Am very new to celonis data connection and events including PQL

I have a data set for Requisition PR (EBAN), Procurement PO (EKKO and EKPO)

I also have the finance data invoices BSEG.BSCHL = 31

Is there a column or a query l can use to directly link the invoices (BSEG) to POs(EKPO) without the table EKBE

Eventually, l have to compare PR, PO and Invoice value?

Thanks

Hi Isaac,
thank you for your question!
You can connect the table EKPO to BSEG by joining the table

  1. RSEG with the keys MANDT, EBELN, EBELP to EKPO

  2. RSEG with keys MANDT, BELNR, GJAHR to RBKP

  3. RBKP with the keys MANDT, BELNR, GJAHR to BKPF

  4. BKPF with the keys MANDT, BELNR, BUKRS, GJAHR to BSEG

Usually this is also standard to configure in the P2P Data Model in a data connection perspective.
From an analysis perspective, why would you dont like to use the table EKBE to compare them? I would propose to sum up the invoice value in EKBE and pull it to the PO.

PU_SUM(EKPO, EKBE.REEWR)

Best Regards,
Data Science Team

the relation of BSEG to EKKO and EKPO is as follows (all within one MANDT = SAP client)

BSEG-EBELN = EKKO-EBELN = EKPO-EBELN = PO number

BSEG-EBELP = EKPO-EBELP = PO item number

please note that one PO number may be related to many invoice numbers

and one PO item may be related to many invoice items (of different invoices).

Point 3. of the above answer is wrong. RBKP-BELNR is the logistical invoice number, while BKPF-BELNR is the number of the accounting document. They are differnet. The concatenqtion of RBKP-BELNR and RBKP-GJAHR is usually found in BKPF-AWKEY.

Best Regards, Christian Preitschopf


Reply