Showing results for 
Search instead for 
Did you mean: 

ABAP How to add a line in one ODS from the start routine of another?

Former Member
0 Kudos


I want to increment a counter in an ODS when loading data into a cube.

The ODS looks like this :

0CALYEAR | 0FC_COUNT |some other charac.

The cube has a start routine. Everytime the start routine is called, I would like to update the ODS counter according to 0CALYEAR specified in the infopackage.

Does anybody has a clue on how to do that ?

Thank you very much


Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

What is the key of the ODS? 0CALYEAR??

You can do an SQL 'UPDATE' at the end of the start routine to the active table of ODS. However, that is a bad idea.

Do you really want to update it once for each start routine run (start routine can multiple times for the same load execution if there are multiple data packets)?

If you do have to update the ODS this way, you should probably -

- Create a Z table with ODS key and this no field;

- update the Z table in the start routine

- create a datasource on this z table and update the ODS with it.

Former Member
0 Kudos

Hi Ajay,

Yes, let's say the key is 0CALYEAR.

If the start routine runs multiple times then I am in trouble.

How can you then increment the counter by only one for one load process ?

Thanks again for your help.


Former Member
0 Kudos

It might be easier to load through a z table.

Have an ABAP program run after the successful run of load to cube (as next step in the process chain) which creates an entry in the z table, incrementing count by 1. Or if it is ok, this program can directly read the active table of ODS and update the same by incrementing the count using SQL (again, a bad idea to directly update the ODS table).

I am not sure if this 'count' is going to be much useful. What if you back-out an incorrectly loaded request (will it decrease the count?), or, if it is a 'repeat delta' or 'repair full' kind of requests, how would you apply this logic? It might be easier to check the no of requests from the 'manage' tab of the cube, or, go to say table RSICCONT in SE16 and get the no of records for a cube (which will give you the no of requests added to it).