cancel
Showing results for 
Search instead for 
Did you mean: 

Delta Upload - DSO to Infocube - records not nullified

former_member205667
Participant
0 Kudos
296

Hello Experts,

Can you please suggest on the below scenario:

Data flow

Data source (AIE type) -->DS01-->DS02-->DS03-->Cube

First run :

DS01-->DS02-->DS03-->Cube --> Report ( 10 records)

Before the second run- I have deleted a record/reference in the backend.

Second run:

DS01-->DS02-->DS03 = 9 Records ( the deleted record is marked as R in the changelog table)

But when I run the DTP from DS03-->Cube - there is no change ...!!!

Record  Key1 Data1 Price1

             Key 2 data 2 price 2

Key2 data2 price is set as R - but its still there in Infocube?

Note :

Currently in the datasource(generic) - no field is added in extract structure (upmod) - Datasource is of AIE delta type. In the start routine we are taking care of 0recordmode ( DS --> DS01).

This is working till DS03 and in changelog the 0recordmode was set to R and records are nullified from the active table of that DSO.

But why records are not nullified in the Infocube1?

Regards,

Ashwin.

Accepted Solutions (1)

Accepted Solutions (1)

former_member182470
Active Contributor
0 Kudos

Are you maintaining any field in Cube for deletion flags? If not, you should maintain a field in cube and map this field from 0recordmode of DSO3.

Run DTP from DSO3 to Cube. As cube cannot overwrite, all your records will get added.

Finally, you have to exclude all deleted flag records in your query filter.

former_member205667
Participant
0 Kudos

Hello Suman,

To which field in Cube I have to map the 0recordmode?

I can map to Char or KF?

My requirement is :

1) when i run query which is created on that Infocube1 will display the result as :

ABC MAT1 1 100

XYZ MAT1  2  200

Now XYZ is deleted and in DS03 also it set as R

2) Now when i run the query again,it should display the result as

ABC MAT1 1 100.

Can you please help here.

Regards,

Ashwin.

former_member182470
Active Contributor
0 Kudos

You can achieve this very easily.

Create a new infoobject called "Deletion Flag" as Char, length is 1 and Data Type as Char/String.

Add this new infoobject to your Cube and map this field to 0recordmode in DSO.

When you load data to Cube, you will get data as below :--

                                                        Deletion Flag

ABC       MAT1         1             100

XYZ        MAT1         2             200     R

You have to put a Filter on Deletion Flag Exclude R ( = Symbol should be in Red) in the query.

Hence, you will get only first record in the report.

Please drop all the cube content and make the suggested changes and reload again from DSO.

Regards,

Suman

former_member205667
Participant
0 Kudos

Hello Suman,

Thanks for quick response.

Ok, Suppose I have this scenario. Let me know if its works

1) DSO to Infocube --> Query

Result :

Calendar day   ID   Value  RecordMode

1-11-2012        C1    100     N

1-11-2012        C2    200    N

1-11-2012        C3    150    N

5-11-2012        C1    200    N

5-11-2012        C2    179    N

delete C1

2) Delta load from DSO to Infocube and now

1-11-2012        C1    100     R

1-11-2012        C2    200    N

1-11-2012        C3    150    N

5-11-2012        C1    200    R

5-11-2012        C2    179    N

or

1-11-2012        C1    100     N

1-11-2012        C2    200    N

1-11-2012        C3    150    N

5-11-2012        C1    200    N

5-11-2012        C2    179    N

1-11-2012        C1    100     R

1-11-2012        C2    200    N

1-11-2012        C3    150    N

5-11-2012        C1    200    R

5-11-2012        C2    179    N

So if I filter out R - still my result shows the same old data with C1..Right ?

Regards,

Ashwin.

former_member182470
Active Contributor
0 Kudos

Hi,

My Scenario :

You need to write a small field routine to your KF like below to nullify cube values. Imagine Item_D_F is Item Deletion flag in my case.

IF SOURCE_FIELDS-/bic/zitem_d_f EQ space.

   RESULT = SOURCE_FIELDS-/BIC/ZG_REV .
ELSE.
   RESULT = '0'.
ENDIF.

Finally, you have to put Item_D_F = Not Assigned in the Filter, which is nothing but we are not considering any Items which are deleted. The revenue figures will appear for the genuine items only.

Your Scenario : http://scn.sap.com/thread/3299703

Regards,

Suman

former_member182470
Active Contributor
0 Kudos

HI,

To be more precise on your case : You need not to map 0recordmode to Cube. 0recordmode itself determines delta for your cube from DSO.

Your DSO has data like this :--

Calendar day   ID   Value  RecordMode

1-11-2012        C1    100     N

1-11-2012        C2    200    N

1-11-2012        C3    150    N

5-11-2012        C1    200    N

5-11-2012        C2    179    N

Suppose C1 has been deleted, then your change-log will appear like below :

1-11-2012        C1    -100    R

5-11-2012        C1    -200    R

You did a delta load to Cube, then your Cube data looks like below :--

1-11-2012        C1    100     N

1-11-2012        C1    -100    R

1-11-2012        C2    200    N

1-11-2012        C3    150    N

5-11-2012        C1    200    N

5-11-2012        C1    -200   R

5-11-2012        C2    179    N

Cube will aggregate your data and nullifies. So C1 will not appear as per your query conditions.

Recordmode management : http://scn.sap.com/docs/DOC-11501

Regards,

Suman

former_member205667
Participant
0 Kudos

Hello Suman,

No ..

C1 has been deleted, our change-log will appear like below :

1-11-2012        C1    100    R

5-11-2012        C1    200    R

As I told

Currently in the datasource(generic) - no field is added in extract structure (upmod) - Datasource is of AIE delta type. In the start routine we are taking care of 0recordmode ( DS --> DS01).

So we have to nullify the records(deleted) in the infocube.

Is there any other method?

Regards,

Ashwin.


former_member205667
Participant
0 Kudos

Hello Suman,

For my scenario -the below code will not work...

IF SOURCE_FIELDS-/bic/zitem_d_f EQ space.

   RESULT = SOURCE_FIELDS-/BIC/ZG_REV .
ELSE.
   RESULT = '0'.
ENDIF.

Regards,

Ashwin.

former_member182470
Active Contributor
0 Kudos

That'what I gave you in my scenario. We are nullifying by a routine in cube. Haven't you checked my reply completely?

Even we are not using 0recordmode, we use a customized Item_D_F field to capture only deletion image.

former_member182470
Active Contributor
0 Kudos

Ok, you say you are achieving through a start routine. Why don't your routine not able to create entry in change-log as I mentioned? Eg: -100 and -200

Then only your cube can nullify.

former_member205667
Participant
0 Kudos

Hello Suman,

Ok. But will it nullify the data loaded/record already shown in the report ( first time) ?

I mean - C1 100 is loaded with N and later its deleted...but in Cube will have C1 100 N and C1 100 R...

So how does it make C1 as 0?

Regards,

Ashwin.

former_member182470
Active Contributor
0 Kudos

In your cube , you should be able to get record as C1 -100 R. Then only it will nulllify..

former_member205667
Participant
0 Kudos

Hello Suman,

OK ...again back to the same question - How to get that C1 -100 in the infocube?

Can i change this in the field routine...

IF SOURCE_FIELDS-/bic/zitem_d_f  = R.

   RESULT = SOURCE_FIELDS-/BIC/ZG_REV  * -1
ELSE.
   RESULT = '

SOURCE_FIELDS-/BIC/ZG_REV

'.
ENDIF.

will it work ?

Frankly , not much idea about ABAP and coding


former_member182470
Active Contributor
0 Kudos

Yeah, it should work. Code looks Ok. Please try and let me know...

former_member205667
Participant
0 Kudos

Hello Suman,

I should write the code in the Field Routine of Key figure?

If Yes then the error says

:The data object "SOURCE_FIELDS" does not have a component called

Z_item_d_f. and its created and added in the cube.


former_member182470
Active Contributor
0 Kudos

Hi,

You have to write in your KF rule.

Zitem_D_f field is my field in my environment. You have to conisder whatever field you are using in your DSO. I think you are using 0recordmode right? You have to use this field in your code.

former_member205667
Participant
0 Kudos

Hello Suman,

Yeah Yeah Got it ..I need to add that field item_d_f in the source fields of rule.

I will try this and let you know.

Thanks,

Ashwin.

former_member205667
Participant
0 Kudos

Hello Suman,

How are you ?

The above code is implemented and i can see revenue with -100 value in the cube with DF = R.

But when i run the query on the cube - there is no change in the result list of the query.....

Do I need to change the properties of Key figure in the query designer?

Regards,

Ashwin.

former_member182470
Active Contributor
0 Kudos

Hi Ashwin,

I am fine. Thank you..

Good to know that your records are getting nullified in cube level. You just need to modify your query.

Check your query conditions and restrictions as per your business logic.

just generate your query in RSRT and try to execute in RSRT.

Regards,

Suman

former_member205667
Participant
0 Kudos

Hello Suman,

How are you ?

Yes the values are getting nullified in Infocube...

When i set a filter on Deletion flag = exclude "R" - the query shows  all the N entries,

But in my case...

ABC Mat1 N 100

ABC Mat2 N 200

ABC Mat2 R -200

XYZ Matr N   300

So when I set a filter as exclude R = the query output is

ABC Mat1 N 100

ABC Mat2 N 200

XYZ Matr N   300

But this is not as expected.....the query output should be

ABC Mat1 N 100

XYZ Matr N   300

Right ?

How to achieve this ?

Regards,

Ashwin

Answers (3)

Answers (3)

snitwipro
Active Participant
0 Kudos

Please try with the same DTP with 'Change log'.

Regards

Sourav

former_member188080
Active Contributor
0 Kudos

looks like data is already transferred from your change log table ok to Infocube.

In case you have to reload again just carry out selective deletion in the Infocube and carry out full repair load to cube from DSO for those selective data records.

Thanks and regards

Kiran

RamanKorrapati
Active Contributor
0 Kudos

Hi Ashwin,

While loading data from dso to Cube, is it Delta DTP? if yes then are you loading data from Changelog table.

cube - property is additive, its not like dso. thru first load you may got 10 records and thru 3nd load you may get 9 records. Cube will have 19 records.

Records at cube level nenver nullify. if you want like that you may need to do reverse posting. while doing the report due to the summation that record will nullify but not physically.

Thanks

former_member205667
Participant
0 Kudos

Hello Ramanjaneyulu,

Thanks for the reply.

Yes it is delta load and records are loaded from changelog table.

Reverse posting ? - How? can you give more information on the same.

Regards,

Ashwin.

former_member182470
Active Contributor
0 Kudos

Hi Raman/Ashwin,

Reverse Posting concept is in 3.5 only. It is not applicable here. Please follow my suggestion. We did the same in our project.

Regards,

Suman

RamanKorrapati
Active Contributor
0 Kudos

Hi Ashwin,

When we entered wrong values into bw cube, without deleting we can nullify them bys using reverse posting option in 3.x . Now i check in Bw 7.0 or BW 7.3 graded out.

Reverse posting was option to post same record  - keyfigure value. So when run bex query takes values form cube, by summation that recordy will nullify.

Thanks