‎2007 Apr 19 9:21 PM
I need to read a list of Open Purchase Orders(for which I/R's have not been done completely) created or changed in a particular date range. Can anyone let me know the relevant tables where I can read this data from.
Any help would be appreciated.
Thanks.
Alam.
‎2007 Apr 19 9:31 PM
Hi,
You can achieve this with the help of tables <b>EKKO</b> ( PO header data ), <b>EKPO</b> (PO line item data) <b>EKBE</b> ( History of PO doc ), <b>RBKP</b> (Document Header: Invoice Receipt), <b>RSEG</b> (Document Item: Incoming Invoice).
The field <b>EKPO-EREKZ</b> is final invoice indicator. When the value of this field is set to 'X', it means that the line item has been fully invoiced. Keep in mind that this indicator is at line item level. You can not concur based on only one line item that PO is open or not. You have to check all line items.
You can also use FM <b>ME_READ_HISTORY</b> to read PO history.
Let me know if you need any other information.
Regards,
RS
‎2007 Apr 19 9:28 PM
Open po related tables r....
EKKO, EKPO, LFA1, EKET, EINE and condition for open PO's is...
if EKPO-ELIKZ = ' ' then all the po's r open.
if u find it helpful mark the points
~~Guduri
‎2007 Apr 19 9:29 PM
Hi,
Please check table EKKO and field FRGZU with values as 'X' or ' '.
Regards,
Ferry Lianto
‎2007 Apr 19 9:31 PM
Hi,
You can achieve this with the help of tables <b>EKKO</b> ( PO header data ), <b>EKPO</b> (PO line item data) <b>EKBE</b> ( History of PO doc ), <b>RBKP</b> (Document Header: Invoice Receipt), <b>RSEG</b> (Document Item: Incoming Invoice).
The field <b>EKPO-EREKZ</b> is final invoice indicator. When the value of this field is set to 'X', it means that the line item has been fully invoiced. Keep in mind that this indicator is at line item level. You can not concur based on only one line item that PO is open or not. You have to check all line items.
You can also use FM <b>ME_READ_HISTORY</b> to read PO history.
Let me know if you need any other information.
Regards,
RS
‎2007 Apr 20 12:35 AM
Hello RS,
How do we find if any change has been made to the PO at the header level?
Thanks,
Alam.
‎2007 Apr 20 2:36 AM
Hi,
To find the changes to PO ( or any other documents ) you have to use tables <b>CDHDR</b> and <b>CDPOS</b>.
This how it works.
<b>[1].</b> Read table CDHDR with
OBJECTCLAS = EINKBELEG
OBJECTID = "Purchase Order no".
<b>[2].</b> If you find any records from CDHDR, that means that PO has been changed. Now take the change document number from CDHDR (CHANGENR) and read table CDPOS with
OBJECTCLAS = EINKBELEG
OBJECTID = "Purchase Order no"
CHANGENR = CHHDR-CHANGENR.
You can also use the the standard function modules <b>CHANGEDOCUMENT_READ_HEADERS</b> ( to read CDHDR data) and <b>CHANGEDOCUMENT_READ_POSITIONS</b> ( to read CDPOS data ) to read document changes.
The header level changes are those where field <b>CDPOS-TABNAME = 'EKKO'</b>.
Let me know if you need any other information.
Regards,
RS