cancel
Showing results for 
Search instead for 
Did you mean: 

When we used should Entity SU type 2 in SAP MDG?

former_member211679
Participant
0 Kudos

Hello All,

I am very new to SAP MDG, my question is in which scenario can we use SU Type 2?. Please provide an example.

Thanks

Sumit

Accepted Solutions (1)

Accepted Solutions (1)

bpawanchand
Active Contributor
0 Kudos

Hi Sumit,

Please find below:

lets say for creating/changing employee master data we need 3 Entities

1. Employee 2. Address Type 3. Employee Addresses

So Employee Data Model is created with 3 entity types

1. Employee I have made as SU Type 1 because it can be change later with Change Request

2. Name & Phone will be the attribute within Employee Entity.

4. Coming to the Address type I will assign SU Type 2 because it is check table it can't be change with Change Request.

5.Employee Addresses I have assigned SU Type 4 it can change later within Change request along with Employee .

Regards

Pavan

former_member211679
Participant

Thanks Pavan for the information, it helps me in understanding better.

0 Kudos

But why we have staging tables for type 2 entities ? Though these tables are always empty.

Answers (2)

Answers (2)

former_member218472
Participant

Hi Sumit,

We used Type-2 in one of our Custom Data Model. If your check/value table of your data element(@domain level) has only two primary keys including MANDT then MDG ignores the check. But if check/value table of your DE has more than two primary keys then MDG throws the error Invalid Check Table. To avoid this you have to bring leading relationship among those primary keys. If any one of those extra DE's has in turn has check/value table then again you have to do this circus :-)(bring relationships in those check tables pmkeys) else MDG throws error Further relationship to entity type 3 missing. So in order to over come this error you have two options

1. You can go for Type-2 Or

2. You can copy std. DE into your Z DE and use it in MDG data modeling.

Hope this clarifies your doubt.

Thanks,

Mahesh

former_member211679
Participant
0 Kudos

Thanks Mahesh for the info.

bpawanchand
Active Contributor
0 Kudos

Hi Sumit,

This is how I look at SU Type 2:

For example, consider a system tables in ABAP T002 where you store Language Keys of the system now the text table of this table is T002T. As you are aware that every text table will have one extra field language key( QUALIFYING) by which you will filter the actual table entries to get both code and its associated description by language key. It is same very similar to a Table and Text table relationship.

Usually, you use SU Type 2 entities as a qualifying relationship to SU type 4 entities. Because every SU 4 entity must be associated with a leading and qualifying relationship. However, this is not true everytime with SU 2, it can also be a attribute in su1 or su4. It can also be a composite key with su1.

You also have to remember that SU 2 entities will never have any attributes to maintain. Just to give other simple example :

So here in the employee address table we are qualifying the employee address by adding address type.

Regards

Pavan

former_member211679
Participant
0 Kudos

Thanks Pavan for the example, just to have a basic understanding, coming to your example lets say for creating/changing employee master data we need 5 mandatory things

1. EmpID 2. Name 3. Phone 4. Address Type 5. Address

So Employee Data Model is created with 5 entity types

1. EmpID i have made as SU Type 1 becoz it can be change later with Change Request

2. Name i have made as SU Type 1 becoz it can change later with Change request.

3. Phone i have made as SU Type 3 becoz i doesn't it to be change in MDG.

4. Coming to the address type i will assigned SU Type 2 becoz it is check table it can't be change with Change Request.

5. Address i have assigned SU Type 1 it can change later.

Correct me if i am wrong.

Thanks & Regards

sumit