cancel
Showing results for 
Search instead for 
Did you mean: 

Difference between Calculated Field and Assignment

former_member210091
Participant
0 Kudos

Hey Guys,

What is the main difference between Calculated field and Assignment? Under what conditions we will use them?

The editor for both of them looks the same to me.

I saw one difference that some fields are disabled in the editor for Calculated field but all fields are enabled in Assignment, why those fields are disabled in Calculated field editor?

Thanks

Saif

Accepted Solutions (1)

Accepted Solutions (1)

former_member208981
Contributor
0 Kudos

Hi Saif,

Calculate / assignment fields are used in different scenarios.

Calculate:

This field gets updated based on the expression you defined in Console, when ever a new record is created via Import Manager or Data Manager. Also it get updated when the repository is loaded. But other wise manually, if you go to DM -> Right click -> Recalculate. Recalculation cannot be done via workflow.

Its read only in Data manager. Can be changed only when Repository is unloaded

Assignment:

I find it more flexible than calculate field.

Theonly way to execute a Assignment is to either do it manually or declare it in your workflow stencil "Assign" to assign the value automatically in the field. This does not get populated automatically as in case of Calculated field, when a new record is added.

Can be changed in Data Manager. Its not read only.

The use would be more based on how your requirement is.

I would go for Calculate, when I dont want to recalculate a field again and again.

In case i need to change the field value based on the other field value and need to check and assign in run time, I will use the assignment field as part of workflow.

Wrt to Expressions, that a very good point you made regarding Multilingual. I was not aware of it. But otherwise, I dont tihnk there is much difference.

Useful article:

http://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/102dc4e5-07c9-2910-93b3-f49c8ed52...

Thanks,

Priti

Edited by: Priti Rani Patnaik on Jun 3, 2010 4:14 PM

Answers (2)

Answers (2)

former_member210091
Participant
0 Kudos

Thanks everybody,

It helps solve my problem.

Thanks

Saif

former_member210091
Participant
0 Kudos

>>why those fields are disabled in Calculated field editor?

I have found the answer for this, Multilingual fields are disabled in Calculated field editor but they are enabled in Assignment editor.

Now i just need to know when to use Calculated field and when to use Assignment.

Thanks

Saif

Former Member
0 Kudos

Hello Saif

Quick guide

You can use calculated field for automatic calculation some value in current record

You can use assignment for filli expression result to selected field in record(or automatically fill selected field in all selected records)

You can change assignment expression without repository stop( expression for calculated field only after repository stop)

You can create assignment for whatever fields in record, exclude marked "writable once",QLUT, system or calculated(more detail see in attached links to documentation)

You cannot use assignment for add new values to hierarchy, LUT, QLUT, taxonomy tables ets.

More about you can find in documentation:

http://help.sap.com/saphelp_nwmdm71/helpdata/en/4b/72b8aaa42301bae10000000a42189b/content.htm

or here select "Functional components->MDM Data Manager":

http://help.sap.com/saphelp_nwmdm71/helpdata/en/index.htm

Regards

Kanstantsin Chernichenka

Former Member
0 Kudos

Hi Saif,

1. Calculated field populates the logic written in assignment expression itself(automatic) whereas for Assignment either you need to execute Assignment manually using Data Manager or can be executed Assignment using MDM workflow.

2. You can change the assignment expression using MDM Data Manager but for Calculated Field Expression, you need to do only through MDM Console that's too after unloading the repository.

3. Calculated field values are readable only, you cant change calculated field values using MDM data Manager whereas for Assignment you can change it.

Other difference when MDM Performance needs to be taken into consideration, you should avoid Calculated field as it impacts MDM Performance to a great extent. So should use minimum number of calculated fields in your repository. Using Assignment is better option rather than using Calculated fields.

Regards,

Mandeep Saini

Former Member
0 Kudos

Hi Saif

To add more-

1. Assignments are executed either manually or by using workflow. This can be done for a single record or a set of records from data manager.

2. Calculation happens automatically upon loading of repository. They are non editable, can not be deleted whereas the assigned field values can be deleted.

3. Changes in expression for calculated field can be done only after unloading the repository unlike Assignments.

4. calculated fields can not be used for matching during the import.

Thanks-

Ravi

Edited by: Ravi Kumar on Jun 3, 2010 12:02 PM

former_member210091
Participant
0 Kudos

Thanks a lot everybody, just one small question

As we said that Assignment can be executed manually or through workflow (through Assign step).

Now if i need to automatically populate field FIELD_3 which is FIELD_1+FIELD_2, i need to use Calculated field right?

Can this be automatically achieved through Assignment? I mean is it possible that Assignment can be executed automatically when i enter values for FIELD_1 and FIELD_2 via Data manager.

Thanks

Saif

Former Member
0 Kudos

Hi Saif

This can be done using a workflow with trigger action as Add/Udate record and autolaunch immediate. The steps can be start-> Assign->Stop.

But a User has to execute/perform the Assign step. this can not be automated.

regards

Ravi

Former Member
0 Kudos

Hi Saif,

As per my understanding, this is not possible. You have to either select number of records in Records Pane of data manager for which you want to execute this Assignment or can be done through MDM Workflow (Assign Step).

Regards,

Mandeep Saini

former_member208981
Contributor
0 Kudos

Hi Saif,

If your req is F3 = F1+F2 ; you can make F3 as calculated. This will assign value when the record is imported. But if the values change, it will not get updated at run time. You need to manually select "ReCalculate".

The assignment method in workflow would fit in here.

For Automatically assigning the F3 value at runtime, you need to have a workflow which will execute the assignment. No user intervention would be required.

In Assignment tab-> Assignment field: F3

START -> ASSIGN -> STOP

Trigger action: Add / Update

Thanks,

Priti