cancel
Showing results for 
Search instead for 
Did you mean: 

Very Strange issue

Former Member
0 Kudos

Hello BW Experts ,

I am extracting data from standard data source 0CO_OM_OPA_1 ,which support full update only.

I have following figures on R/3 side for an order Number,

Order Number = 55667788

Cost Element = 223344 for all below cost figures

Cost Figures = 10 ,20,30,40.

And Detail for value type = 1 for all above cost figures.

Fiscal Year/period = 006.2005 same for all cost figures.

The same data is present in RSA3 for the above data source.

another example :

Order Number = 99887766

Cost Element = 665544 for all below cost figures,

Cost figures = 90,80.

And Detail for value type = 1,2 for all above cost figures.

Fiscal Year/period = 007.2005 same for all cost figures.

The same data is present in RSA3 for the above data source.

Now in BW ODS we have overwrite update type for Cost .

Due to which I am getting following data in ODS ,

<b>If the Detail for value type is same then the cost figures get overwritten in ODS as well as in infocube.</b>So in infocube i am getting only last cost figure = 40 for the Order number 55667788.

Actually there should be addition of all cost figures (102030+40 = 100).

But it does not happen if the Detail for value type is same.

In the same infocube if the Detail for value type is different , then we have addition of both the cost figures(80+90=170) as in case of Order 99887766

<b>The Detail for value type is a Not a key figure</b>,so I can not changed it to Addition update type.

I am playing with issue from last six days but could not find any solution.

I tried to make the Update type from Overwritten to Addition in case of ODS , then I get addition of all cost figures irrespective of the Detail for value type.

But this create another problem and that is I have to delete all the data daily before loading it to ODS and Infocube . We have three years data . So it become so time consuming that I have to change to Overwrite again.

ODS is used when we have to make Overwrite update type.

Now what to do in this case ?

Your valuable suggestions will be very helpful for me .

Best Regards ,

Amol Kulkarni.

Accepted Solutions (0)

Answers (5)

Answers (5)

Former Member
0 Kudos

Hi Amol,

Got better idea to differntiate the records.

Add 2 fields in the ods Key field.

1. Day

2. Time.

In the update rule assign sy-datum to day info object and sy-uzeit to time info object.

So combination of this field values will give you unique values and will protect overwriting of values.

Regards

Nimesh

Former Member
0 Kudos

Hi Nimesh,

Your idea will work only in the case when ALL RECORDS coming from R/3 are unique and shouldn't be overwritten.

If there are some records modifying some of previous ones, you'll get all of them!

Differentiating char shouldn't have such a problem: it will allow to overwrite modified records and add new ones.

Best regards,

Eugene

Former Member
0 Kudos

Hello Nimesh ,

We have only fiscal year period field coming from R/3 side.

We do not have daywise data on R/3 side data source 0CO_OM_OPA_1.

So I can not add the Date field to diffentiate the records.

If I add date field to update rule and Sy-datum assign to it , then all the reocrds it will identify as of current month ( system date for current month) and user will not able to see previous month data .

Also the records coming from R/3 are all unique , no differentating chararcter in the above standard data source which could differentate these unique records.

Any help please.

Regards ,

Amol.

Former Member
0 Kudos

Hi Amol,

Look out for variable VTYPE (Value type for Reporting), It must be different like ( Planned, Actual ) for the rows that is been extracted from R/3 Side. And put that as a key fields in the ODS.

Regards

Nimesh

Former Member
0 Kudos

Hello Nimesh ,

The value type for reporting is Actual in all cases as we are retreiving actual cost only.

I have some interesting findings ,

In Table AUFK enter order number and note the Object number of this Order.

Then go to table COSP, enter the Object number and we will get the related cost element and Cost figures all.

Now in this table we have CO Business key value HRKFT

field which is differentating all these cost figures means different for each cost figure though cost element and all other fields same.

But the problem is in the standard data source this field is not present.

So how could I add this field in this standard data source then how to map it to BW infoobject and then to enter it into the Key field of ODS.

The Logic is difficult to write to add the field HRKFT

in the standard data source as it use two tables namely

AUFK and COSP.

Any help please .

Amol.

Former Member
0 Kudos

Hi Amol,

If your key figure values belong to the same order and you want to have them all (without overwriting), you need to place into ODS' key fields a char that is different for all these values.

Could it be WBS element?

Best regards,

Eugene

Former Member
0 Kudos

Hi Amol,

I was faced the same problem with ODS, u can over come by chaging the Data fields to Key Fields it is one option and u can go with ODS settings like Unique data records

regards

DY

Former Member
0 Kudos

Hello ,

The Detailing for value type is a chat with data type Numc.

It is already in the key fields of ODS .

It is not present as a data field of ODS .

Amol.

Former Member
0 Kudos

Hello Eugene ,

You are mentioning about a char that is different for all these key fields.

Please explain me in detail what should be the character and what code I have to write so that it can count all the Cost figures separately and still we will be use overwrite functionality of ODS.

Amol.

Former Member
0 Kudos

Hello ,

This field is already as a key field in ODS.

I want that all cost figures get added for the same order,cost element and detailing for value type.

Amol

Former Member
0 Kudos

Hi Amol,

Look at one order number with the same cost element, value type and fiscal period. Why do you have several KFs for the same chars combination?

What differentiates them?

If you want all of them, I don't think that these are just modified values of the original one.

I suggested that such a differentiating char could be WBS element.

If you find such a char, include it as an ODS' key field.

Best regards,

Eugene

Former Member
0 Kudos

Hello ,

We do not have any key field / character in the standard data source which could differentiate.

In RSA3 I have checked that given the Order Number,

Cost element and Fiscal year period all the remaining figures are same for all cost figures .

So what to do now ?

Amol

Former Member
0 Kudos

Why would you need to reload ODS just because you change update to addition?

To me update with adition seems fine, if you are worried about delta complications just load periodically:

Full load to ODS based on previous period (can be done with ABAP or OLAP variable selection in Info Package) and then full load from ODS to cube using another info package for full load with selection on previous period. Another option if you want to use delta from ODS to cube, then delete the "before images" when loading to cube, i.e add the following code to start routine in update rule from ODS to cube:

LOOP AT DATA_PACKAGE.

IF DATA_PACKAGE-RECORDMODE = 'X'.

DELETE DATA_PACKAGE.

ENDIF.

ENDLOOP.

Former Member
0 Kudos

Hello ,

In ODS when if select update type as addition instead of Overwrite ,and If I do not delete the data from ODS daily ,then there will be double data records and all cost figures get double in the next day . The same data will be updated in Infocube and which make the cost figures double on next day, triple on the second day.

Regards ,

Amol

Former Member
0 Kudos

hai amol,

I think u need to write a complex transformation update routinue.See try writing code by giving condition saying value type=1 then cost=100;value type=2 then cost=200;value type=3 then others.....I am only trying to hint you.I am not writing the actual code.

hope this idea helps you...

cheers

sairamphani