Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

Not getting Purchase Order Item Creation date

Former Member
0 Kudos

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

1 ACCEPTED SOLUTION

Former Member
0 Kudos

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

9 REPLIES 9

Former Member
0 Kudos

I guess you're looking at the wrong table. See EKKO-AEDAT.

Rob

0 Kudos

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

0 Kudos

>

> 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

Former Member
0 Kudos

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.

0 Kudos

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

Former Member
0 Kudos

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

Former Member
0 Kudos

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

0 Kudos

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

0 Kudos

>

> 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