cancel
Showing results for 
Search instead for 
Did you mean: 

Storing old value when changing a record

Former Member
0 Kudos

Hi all,

When the user changes a field is it then possible to store the old value in a field? I don't want to keep any history or enable change tracking - it has to be a field in MDM where the old value is shown? I just want to show the old/previous value, so if the fieldvalue changes from X to Y I want to store X, if it later changes from Y to Z I want to store Y.

Can this be done with a calculated field somehow? Or maybe it is not even possible at all?

Any suggestions?

Regards

Henning

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hello Henning

You can use check-in check-out mechanism for that.

You can create Workflow for record(for record change event) :

start(with check out) -> prosess -> validate->branch

after brach we are going two ways:

->stop(checkin - leave as is)

->stop(rollback- return old value)

or for more difficult rules:

start(with check out) -> prosess -> validate->branch->

after branch we are going by any ways :

-> assignment1(return old value) ->stop(checkin)

-> assignment2(return old value) ->stop(checkin)

-> stop(checkin-leave as is)

Another way(as you proposed) additional fields and assignment for it

Regards

Kanstantsin Chernichenka

Edited by: Kanstantsin Chernichenka on Mar 14, 2011 12:03 PM

Former Member
0 Kudos

Hi Henning,

I would still Prefer 2nd approach using Assignment,

you can write assignment on new filed which you would create in your main table and copy the value of field A into Field B.

May be you can write assignment as

whenever the value of Update on(if you have any update on file with timestamp) field changes by default copy the value in Field A and paste it in Field B.

This way you wont have to bother of anything because by default the old value would be there every time.

hope it works

Thanks and Regards

Praful.

Former Member
0 Kudos

Hello Praful.

Concerning new fields(very important remark):

you can't create new fields by fly ( in time when repository loading/running)

you should to create new fields before(modify repositoyr structure)

Assignment used the same function as Validation. First of its store value in related field according expression result second of its return TRUE or FALSE depend of expression result(Warning or Error message).

If you want to know more about mdm expressions,validation and assignment, please read pages 240-284 from that manual:

http://help.sap.com/saphelp_nwmdm71/helpdata/en/4b/72b8aaa42301bae10000000a42189b/MDMDataManager71.p...

Regards

Kanstantsin Chernichenka

Answers (2)

Answers (2)

Former Member
0 Kudos

Super, thanks for the assistance

Regards

Henning

Former Member
0 Kudos

Hi Praful

This will work yes.

Is there somewhere to autorun an assignment or does that have to be the end-user performing this step?

Former Member
0 Kudos

Hi Henning,

Is there somewhere to autorun an assignment or does that have to be the end-user performing this step?

Yes, you can auto-run an assignment using MDM workflows and need to set your MDM workflow trigger action on Record Update. MDM workflow should be like this as shown below

Start>Assign>Stop.

For your more convenience, you can follow the approach more or less in the same way as as given in below Article for syndicate updated fields but here you don't require syndicate step in workflow. The whole idea is to provide this link is that you can achieve as per your requirement by bringing little change in approach as given in below article.

[Syndicate Updated Fields only in MDM 5.5|http://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/b0946351-ce88-2c10-24af-d1174e17be4f?quicklink=index&overridelayout=true]

Regards,

Mandeep Saini