cancel
Showing results for 
Search instead for 
Did you mean: 

Problems with DSO rule group after dataflow migration of Cube 0PUR_C01 (Purchasing Data)

Former Member
0 Kudos

Hi experts,

I have migrated the 3.x Dataflow of InfoCube 0PUR_C01 (Purchasing Data) into the 7.x Dataflow.

Now my Dataflow look like this:

1. Item Level: DataSource 2LIS_02_ITM -> InfoSource 2LIS_02_ITM -> DSO ZPUR_O01 (Position) -> InfoCube ZPUR_C01
2. Schedule Line Level: DataSource 2LIS_02_SCL -> InfoSource 2LIS_02_SCL -> DSO ZPUR_O02 (Schedule Line Level) -> InfoCube ZPUR_C01


In the migrated Transformation between InfoSource 2LIS_02_ITM and DSO ZPUR_O01 (Position) I have two rule groups.

In the first Rule Group (Standard Group), the Time characteristics (0CALDAY, 0CALMONTH, 0CALWEEK) are based on the Source Time Characteristic 0ENTRY_DATE (Date on which the purchasing document was created) of the InfoSource 2LIS_02_ITM (= Source field SYDAT "Entry date" of the DataSource 2LIS_02_ITM):

In the second Rule Group, the Time Characteristics (0CALDAY, 0CALMONTH, 0CALWEEK) are based on the Source Time Characteristic 0DOC_DATE (Document Date) of the InfoSource 2LIS_02_ITM (= Source field BEDAT Document Date of the DataSource 2LIS_02_ITM):


The Data records of the DataSource 2LIS_02_ITM (one example purchasing order with one purchasing document item):

- First data record: = purchasing order (Transfer process 1)

- Second data record: = goods receipt (Transfer process 2)

- Third data record: = Invoice receipt (Transfer process 3)

---


Now, my problem is that the first rule group (InfoSource -> DSO) does not work correctly!

In the DSO, for all three transfer processes (0PROCESSKEY), the Time Charactersitic 0CALDAY is the result of the source Field 0ENTRY_DATE or BEDAT:

But that is incorrect.

I expected as the correct result of the two rule groups, that 0CALDAY should filled in the DSO as follows:

- First data record: 0CALDAY = 20.08.2010 (0PROCESSKEY = 1)
- Second data record: 0CALDAY = 10.01.2011 (0PROCESSKEY = 2)
- Third data record: 0CALDAY = 04.02.2011 (0PROCESSKEY = 3)


By the way, my key fields of the DSO are 0PROCESSKEY (Transaction Key), 0DOC_ITEM (Document Item Number) and 0DOC_NUM (Document Number). In a test scenario I have interrupted the Transformation between 0DOC_DATE and 0CALDAY in the second Rule Group. After reloading the data into the DSO, the Time Characteristic 0CALDAY was the result of the first Rule group (0CALDAY = 0ENTRY_DATE). But this is not the appropriate solution. 


Can someone please help to resolve the issue?

Many thanks in advance!

Best regards,
Michael 

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi experts,

I have reconstructed my scenario in a test system with a CSV File as source for a test DataSource.

But the problem is still the same!!!

DataSource with 3 data records and two date fields (BEDAT and SYDAT):

DataSource Fields -> InfoSource/DSO Fields

BEDAT -> 0DOC_DATE

SYDAT -> 0ENTRY_DATE

AKTWE -> 0CURR_GRQTY

ALIEF -> 0DELIVERIES

Rule group 1: 0ENTRY_DATE = 0CALDAY...

Rule group 2: 0DOC_DATE = 0CALDAY...

DSO Data records with the incorrect values for 0CALDAY, 0CALMONTH and 0CALWEEK:

I think that is really curious. Any ideas, how I can solve my issue?

Thanks and regards,

Michael

esjewett
Active Contributor
0 Kudos

Hi Michael,

Unless I'm mistaken, your key fields are mapped exactly the same way in both rule groups. So each rule group will create a record based on the source record, but they'll have exactly the same key. When this happens the second record created will overwrite the first record in the DSO. To fix this, you'll need to add a field to your DSO key and then assign it as a constant in each rule group.

To test if this is the problem, run your example based on your CSV file but *don't* activate the data in the DSO. Look in the "New" table of the DSO and you should see all the records you expected originally, but they will have duplicate keys. Once you activate, you'll see half the number of records in the "Active" table of the DSO.

One other thing to check: If your rule groups are before an InfoSource (I think yours are after, so this isn't your problem), then make sure the InfoSource has the necessary key fields checked. Otherwise non-unique records can be deleted.

Regards,

Ethan

umashankar_poojar
Active Contributor
0 Kudos

Hi Michel,

           I agree with Ethan, since there is a same keyfields are sourced from two datasources. Even though standard rule group executed correctly, the second rule group records are overwriting the earlier. Hence you are getting 3 records.

           Make a InfoObject as key which will satisfy your requirement otherwise, as a traditional way load in to two different DSO and then merge it to InfoCube.

Hope it helps you to find a way

Thanks,

Umashankar

Former Member
0 Kudos

Your Key fields are causing the issue..

Since your key figure combination is same for both the rules the data is getting over written.. you need to take care in case of DSO, but no issue will occur with the cubes...

Create a new info object zrule ans add it as a keyfield, in 1st rule group assign a constant value as '1' and in the 2nd rule group assign a constant value as '2'.

This should fix your issue...

Thanks,

Nithesh.

Former Member
0 Kudos

Hi Ethan,

Thanks for your reply to my issue. You´re absolutely right, the missing key field in the DSO was the reason for the problem.

I have created a new Characteristic "ZRULE" and assign it as a constant each rule group. So finally I have now four key fields in the DSO (0PROCESSKEY, 0DOC_ITEM, 0DOC_NUM and ZRULE) to solve my problem.

Regards,

Michael

former_member182470
Active Contributor
0 Kudos

HI Michael,

I had already given hint on new key field in your DSO in my previous replies. But you never got it. I don't understand what is the problem with my replies? Anyway it is up to you.

Answers (2)

Answers (2)

former_member182470
Active Contributor
0 Kudos

Hi Michael,

I have gone through your post thoroughly.There is a small confusion here.

Rule Group 1: Entry Date-->Sydat -->Time chars in DSO

Rule Group 2: Document Date-->Bedat-->Time Chars in DSO

Whenever you use 2 rule groups, you are suppose to get two sets of data one below each other.

So, you are suppose to get 6 records out of which first 3 records of Rule Grp1 and just below you will get another 3 records of Rule Grp2. Ideally, your DSO data should like below:--

Calday
Calmonth
Process Key
20.08.20102010081
10.01.20112011012
04.02.20112011023
20.08.20102010081
20.08.20102010082
20.08.20102010083

The DSO data which you posted is for Rule Group 2. Just reload the data to DSO. See whether your are getting 6 records in DSO or not? If not, then your DSO design might be something wrong.

Regards,

Suman

Former Member
0 Kudos

Hi Suman,

Thank you for your comprehensive reply and the  detailed explanation of the Account Model.

I have reloaded the purchasing document item data to DSO. Now I have two active DSO Requests. Nevertheless, I still have 3 records in the DSO and 0CALDAY is equal to 20.08.2010 for this 3 records (Process keys).

In my scenario, the first rule group (Standard rule group) does not apply.

Many thanks and regards,

Michael

former_member182470
Active Contributor
0 Kudos

Please tick "Do not Check Uniqueness of data" in your DSO. Do not use "handle duplicate key records" in your DTP. Then try to reload data to DSO

Former Member
0 Kudos

Hi Suman,

DSO Settings:

DTP Seetings:

Former Member
0 Kudos

Your settings and mapping (info source - cube) seems to be good...

Please revisit the mapping between the datasource and infosource...

Former Member
0 Kudos

Hi Nithesh,

the mapping between the DataSource and InfoSource look like this:

0ENTRY_DATE (Source field in DS = SYDAT) = Source for 0CALDAY in DSO (Rule group 1)

0DOC_DATE (Source field in DS = BEDAT) = Source for 0CALDAY in DSO (Rule group 2)

I think, the mapping is ok.

Thanks and regards,

Michael

former_member182470
Active Contributor
0 Kudos

HI Michael,

We have a similar scenario. We handle two different dates in the Cube. All the time chars are mapped to two dates from DSO. So we created two rule groups between DSO to cube.

What are your Kf values for two rule groups?

Please go through this doc about rule groups http://scn.sap.com/docs/DOC-11537

To make any record unique, there will be at least once field value differs. Wth this field, the data gets automatically displayed in separate rows. That's how you will get 6 records.

Former Member
0 Kudos

Hi Suman,

Thank your for your reply and the excursion of the Key Figure Model and the Account Model.

Below are a small selection of the Key Figures in the DSO:

Key figures of Standard Group (Transformation between InfoSource and DSO):

Key figures of Rule Group 2 (Transformation between InfoSource and DSO):

One general question, the DSOs should be able to use different rule groups?! Or I can use Rule groups exclusively between DSOs and InfoCubes?

Thanks and regards,

Michael

Former Member
0 Kudos

Hi Michael,

                   Please help me understand have you created custom DSO and how did you get those transformations(Routines).

Thanks in Advance

Praveen


former_member182470
Active Contributor
0 Kudos

Hi,

Rule groups should work with Cubes and DSOs as well.

You may have to introduce another key field into your DSO, please find something very unique when you observe the data in your PSA. Then you will get 6 records..

http://scn.sap.com/thread/3314699

Regards,

Suman

Former Member
0 Kudos

Using Rule Group for all Transformations it will be applicable not only DSO & Cube, where ever the Transformations are there then Rule group will come by default Standard. DSO record will get over written in case of cube it does not happen.

Former Member
0 Kudos

Hi Michael,

Quick question, are these rule groups defined on transformation for first level of DSO ?

if my understanding is correct you have correct data set in PSA... try doing the same in second level DSO it should work.

Regards,

Abhi

Former Member
0 Kudos

Hi Abhi,

many thanks for your reply.

I´m sorry, but what do you mean with the first and second level of the DSO?

The two rule groups (Standard and rule group 2) are defined on Transformation between the InfoSource (Source = DataSource/PSA 2LIS_02_ITM) and the DSO (Source = InfoSource).

Of course, I have the correct data set in PSA. Could you please explain what do you mean with "try doing the same in second level DSO..."

Many thanks and regards,

Michael