03-02-2009 8:49 PM
Hi Friends,
I want to put logic to check that if purchase order Item created on so and so date then do following logic otherwise cancel it.
But in table I can not find out PO Item Creation date, there is only Item change date.
Is there any other way to get PO Item Creation date.
Thanks
Priyank
03-03-2009 8:32 PM
Hi Priyank,
There is no registry at EKPO for item level creation, this is because the items initially created would be the same date of creation of the PO (EKKO-AEDAT).
You can test it and you'll know what I'm talking about. If you after creating a new PO (Save it), then modify it, including a new line you will find this new line only on table CDPOS, but the initial lines were created at the same time that the PO, and therefore they won´t be in table CDPOS.
Hope it helps.
Regards,
Gilberto Li
Edited by: Gilberto Li on Mar 3, 2009 9:32 PM
03-02-2009 9:11 PM
03-03-2009 7:02 PM
NO, Rob.
I am looking for PO Item creation date.
I may create PO with line Item 1 on 03rd March, but then I can add line 2 at 7th march. So I need date for Item creation.
And also here if somebody change item then it is changing date in EKPO table field AEDAT.
SO I need original date when PO item created.
Thanks
Priyank
03-03-2009 7:39 PM
>
> NO, Rob.
>
> I am looking for PO Item creation date.
Right - I missed that. But you'd think there would be an easier way!
Rob
03-03-2009 4:57 AM
Hi,
You can identify the PO Item creation date from change document tables.
First, in table CDHDR pass the below values and get the change doucument number.
OBJECTCLAS-EINKBELEG
OBJECTID-<10-digit PO number>
UDATE- <Creation date>
Then pass the below data in CDPOS
OBJECTCLAS-EINKBELEG
OBJECTID-<10-digit PO number>
CHANGENR- <from CDHDR>
TABNAME-EKPO
CHNGIND- 'I' I - represents insert
Based on the above tables you can validate the creation of Item date.
Regards,
Prasana.
03-03-2009 7:04 PM
HI Prasana,
I tried this logic but when u create PO item it is not creating entry with Change indicator "I".
Only when u change entry in PO item it has entry for PO with Item and change indicator "U".
Thanks
PP
03-03-2009 7:05 PM
Hi,
I hope prasana gave the details, CDHDR & CDPOS tables can be used to get the details of PO item. Since there is no standard FM / table for this purpose.
Regards,
~Satya
03-03-2009 8:32 PM
Hi Priyank,
There is no registry at EKPO for item level creation, this is because the items initially created would be the same date of creation of the PO (EKKO-AEDAT).
You can test it and you'll know what I'm talking about. If you after creating a new PO (Save it), then modify it, including a new line you will find this new line only on table CDPOS, but the initial lines were created at the same time that the PO, and therefore they won´t be in table CDPOS.
Hope it helps.
Regards,
Gilberto Li
Edited by: Gilberto Li on Mar 3, 2009 9:32 PM
03-04-2009 6:28 PM
HI Gilberto,
What I know is that EKKO-ERDAT is for PO header creation date, if you add line item @ different date then it won't change.
But in CDPOS if you changed line on other date of PO item creation date then it will create entry for field AEDAT change and where I will get Old and new value and from Old value I will get PO item creation date.
SO I have to get list of all change date entry from CDPOS table and sort ascending and read first entry low value it is my PO item creation date and if didn't find then get EKPO-AEDAT (means po is never changed).
Thanks all for your help, but I solved my way.
PP
03-04-2009 6:37 PM
>
> Thanks all for your help, but I solved my way.
>
> PP
Please mark your question as solved and assign poin ts to helpful answers.
Rob