‎2009 Aug 28 1:58 PM
Dear Experts,
I have a small requirement,
Is there a way that I can findout, what are all the Line items created for a sales order today(or in a particular interval of time).
Scenario.
A sales order XYZ created on Aug 1st with Line items 10 and 20.
The item 20 was changed on Aug 25th
A new Item 30 was created on Aug 27th.
When I run a selection for Aug 20th to Aug 27th,
It should come up saying xyz 30, leaving xyz 20(Which actually is changed but not created newly).
Can some one throw an idea on how to achive this scenario.
Thanks in advance.
-Amit
‎2009 Aug 28 2:13 PM
Use CDHDR (change document header),
CDPOS(change document item)
tables to find out changed documents.
and populate the documents that doesnot have entries in above tables.
Regards
sateesh
‎2009 Aug 28 2:11 PM
Hi,
You can fetch changed documents from CDHDR Table using OBJECTCLAS as 'VERKBELEG' and OBJECTID as your salesorder number. Then go to CDPOS table using information fetched from CDHDR. There you have a field CHNGIND which is an indicator dictating if there was a new entry made in the order or updation was done for an old entry.I think you will have 'I' for item 30 and 'U' for item 20 in your case. I believe TABKEY field in CDPOS is combination of Client,Salesorder Number and Item Number in this case. Let me know in case you have any issues.
KR Jaideep,
‎2009 Sep 01 2:59 PM
Dear experts,
Thanks for your response.
Is there a change document being created when an Item is added to the sales order, and not when an Item is changed, if so do I need to do any kind of configuration changes or any settings.
Thanks in Advance,
-Amit.
‎2009 Sep 01 5:07 PM
Hi Amit, could you please enhance the title of your post, something like "Are change documents created while adding item to sales order" (because this title could be subject to "abuse"). If you can't change it, please ask the moderators.
‎2009 Aug 28 2:13 PM
Use CDHDR (change document header),
CDPOS(change document item)
tables to find out changed documents.
and populate the documents that doesnot have entries in above tables.
Regards
sateesh
‎2009 Aug 28 2:21 PM
Hi Amit,
If you want to find the sales order/items created on a particular day, you need to fetch data from Sales Document Item(VBAP) table by using Creation Date (ERDAT) in where Condition.
Regards,
Venkat Ramana.