on 10-26-2016 9:44 AM
Hi All,
I have two z fields in VBAP table name as Delivery date and New Delivery date. I have maintained change history check box while creating data elements. Now my requirement is to identify which filed value has recently modified. That means I should not compare the values of those fields instead of that which filed has been recently changed.
Let's consider in Delivery date we have 10/26/2016 then after I have entered 10/25/2016 in New delivery date. while reporting delivery date I have to display 10/25/2016 as it was updated recently.
Thanks & Regards,
Krishna
Now my requirement is to identify which filed value has recently modified. That means I should not compare the values of those fields instead of that which filed has been recently changed.
Let's consider in Delivery date we have 10/26/2016 then after I have entered 10/25/2016 in New delivery date. while reporting delivery date I have to display 10/25/2016 as it was updated recently.
There is some mismatch here. The requirement, as stated, is to identify the date when the value was changed. ("Recent" is a bit too fuzzy but let's leave it at that.) With this in mind, the next statement "I have to display 10/25/2016" may or may not be correct. You have not shared the date when the field was changed (it might as well be in last year, who knows), we can only see the current values in the fields.
So first thing first you need to get the requirement straight. As Max noted, the change documents would provide the date of change. However, they are very cumbersome to use, so Gaurav's suggestion may have some merit too.
But you also might want to understand where does this requirement come from. Delivery Date is already available in the standard fields and there should already be change documents for them. In many cases such requirements arise when the problem is actually with the business process and the users either don't understand or incorrectly use rescheduling/planning. That's just from my experience.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi
If your new fields are available for change document and they are updated by standard tool (so standard transactions like VA01,2,.... or Bapis....) you can get the modifications in change documents (so table CDHDR and CDPOS)
Max.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Krishna,
Did you explored the standard internal tables xvbap/yvbap which differentiate the before/after change values ?
K.Kiran.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Gaurav Singh,
Thank you very much quick reply, to do this I have to add 4 more fields in VBAP table.
is there any better way than this ? can you please suggest.
Thanks & Regards,
Krishna
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Why would you need 4 fields? It's just one extra field, as far as I understand. You have some delivery date, then it changes. So Delivery Date goes to New Delivery Date and at this point SY-DATUM would go into Change Date field (1 new field). I doubt you'd actually need time, it's likely date is more than sufficient.
Actually it'd make more sense to have Delivery Date and Old Delivery Date IMHO if you are after the change tracking.
Also consider Max's answer.
Hi Shiva,
Its better you add two more fields in your table i.e AEDAT & AETIM which Last change date and Last change time .
At the time of creating/updating your values just put this two fields values as -
AEDAT = sy-datum.
AETIM = sy-uzeit .
Now , In your table you would be having the values last change date and last change time in your table.
Now you can do your reporting as per your wish, As you can take the latest/recent date & time or oldest date.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
88 | |
10 | |
10 | |
9 | |
7 | |
7 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.