cancel
Showing results for 
Search instead for 
Did you mean: 

Can one InfoSource/Datasource feed data to two different ODSs with ...?

Former Member
0 Kudos

We feed data from one InfoSource/Datasource to ODS1 and ODS2.

For ODS1 InfoPackage (two infopackages respectively for Initial and Delta upmodes), we use doc type Z1 for data selection.

For ODS2 InfoPackage (two infopackages respectively for Initial and Delta upmodes), we use doc type Z2 for data selection.

Would the above design be possible? But when we test the above design, find it is not good. Any idea?

Accepted Solutions (1)

Accepted Solutions (1)

former_member188975
Active Contributor
0 Kudos

Kevin,

Are you doing 2 separate Inits with the selection?

Former Member
0 Kudos

hi Bhanu,

Yes, we are! And also we must have to use Initial/Delta loads since the data records would be huge, that means we can't use Full load. Any idea?

Now in this website, I find we can't reward points, I will reward your points and others later.

Thanks

former_member188975
Active Contributor
0 Kudos

Hi Kevin,

Using delta is a good idea. Even if you are managing it through selections in the InfoPackage, to make it fool proof it is good to have a little start routine in the Update rules...simply like Delete Data_Package where Data_Package-DOC_TYPE <> "Z1".

(You cannot reward as your post is not marked as a question...you can edit this. )

Hope this helps...

Former Member
0 Kudos

Kevin,

as already explained in the past several times, you are able, as you tested by yourself, to do different initial loads, but then you are able to manage only ONE delta channel for each datasource and your two previous inits with different not overlapping selections will be summed up into only one row with all your selection conditions !

In this way you can manage only ONE delta and you need to filter out what you don-t need only at start routine level!

Hope now is clearer...

Bye,

Roberto

Former Member
0 Kudos

Ah...

Kevin, you have to edit your thread and mark it as question in the dedicated checkbox!

Bye,

Roberto

Former Member
0 Kudos

hi Roberto,

Yeh, maybe you are right since we found the following for these two different scenarios:

Senario 1 - For ODS1 InfoPackage:

doc type Z1 are correct for both Initial/Delta data selection.

Senario 2 - For ODS2 InfoPackage:

doc type Z2 is correct for Initial data selection, but the delta one is Z1 which is not right.

What you mean is that for Senario 1, we can still use Initial/Delta InfoPackage to restrict the data, but for senario 2, we would have to use start routine in Transfer Rule, right? If we use start routine in Transfer rule for senario 2, then the code would be like:

delete datapackage where doc_type <> 'Z2', right?

Thanks

Message was edited by: Kevin Smith

former_member188975
Active Contributor
0 Kudos

If the sequence of events was Init Z1, delta for ODS1, Init Z2, delta for ODS2, then this is why the first scenario worked but not the second one. With the next delta to ODS1, you will face the same issue. It would be better to have the delete data_package set up for both ODS and this would have to be in the Update rules as you have a common transfer structure / InfoSource feeding both the ODS objects.

Hope this helps...

Former Member
0 Kudos

hi Bhanu,

That mean we would have to only use Full as update mode in the infopackage and just use start routine in update rules for both ODSs, right?

If we use start routine in update rules, then if we only want to grab the data with document type Z11 and Z12 for senario 1, the code would be:

delete DATA_PACKAGE where AC_DOC_TYP <> 'Z11' AND AC_DOC_TYP <> 'Z12'.

Right?

former_member188975
Active Contributor
0 Kudos

What you state is fine, but you can do this with a delta load too. Just do a simple Init with no selections, and the delta records will be deleted as per the Start Routine logic.

Former Member
0 Kudos

hi Bhanu,

You know the data selection for both Initial and Delta must be the same. What you mean is that don't use any data selection in Initial/Delta, only check Initial and Delta update mode in the the corresponding infopackages respectively and just make the selection work in start routine, right?

former_member188975
Active Contributor
0 Kudos

Yes, that is what I meant. Unless you have a situation where you will only need data for "XXX" doc_types ever after, don't make a selection in the Init.

If you know that you only will need data for "XXX" doc_type, then you can make the selection in the Init (to reduce the volume of data extracted each time).

But in both the cases you will need the Start Routines in update rules to the ODS objects to select (or rather delete the unwanted doc_types).

Hope this helps...

Former Member
0 Kudos

Kevin,

you don't need to do every time a full!

You can do your separate init for every target ODSs and then manage only ONE [at the same time] delta and insert [for both your ODSs!] in the start routine your filter code [delete DATA_PACKAGE where AC_DOC_TYP...].

Don't forget that if you do init only for Z11 and Z12 you will not have anything but Z11 and Z12 in outbound from your source ODS!

Hope now is clearer...

Bye,

Roberto

Former Member
0 Kudos

hi Roterto/Bhanu,

In summary, the data selection only works for Initial load in InfoPackage. For delta, use start routine in update rule, but you know the start routine in update rule covers both Initial and Delta, that means the data seletion in infopackage and the start routine would generate a duplicated effect for initial data load.

Another thing is that we have so many different (maybe 10 different) doc types for selection, that means if we use these in start rountine of update rule, that would greatly makes the load slow, right?

Thanks

former_member188975
Active Contributor
0 Kudos

Not sure what you mean by "duplicated effect" here...if you are still planning to make a selection for the Init request, lets say you selected Doc Type Z1 and Z2. Then records extracted will only be with doc type Z1 and Z2. Now when this data reaches to the update rule processing step, the start routine will try to look and delete records that are not Doc type Z1 (or Z2 or whatever combo you require). If there is no doc for it to delete, it will move on.

You can set up all the doc types in the start routine...it will not make a too noticeable performance drag. It should be fine.

Hope this helps...

Former Member
0 Kudos

NO

It is not true that data selection works only for init...it will work for delta too, but you will not receiving several delta loads, but only ONE delta load that will sum up ALL your selections!

In other words, you can do your several init selections, then your delta will be related to all the doc types used in all your previous inits!

SO you have to as following...

1. Init from ODS0 towards ODS1 with Z1 as selection, or with what you need...

2. Init from ODS0 towards ODS2 with Z2 as selection, or with what you need...

3. Execute only ONE delta from ODS0 towards ODS1 and ODS2 at the same time...from ODS0 only new, deleted or changed records will be transferred for both Z1 and Z2.

Then, in your start routine in ODS1 you have to insert a routine that delete everything is different from Z1 and in ODS2 a routine that delete everything is different from Z2 !!!

Bye,

Roberto

Former Member
0 Kudos

hi Bhanu,

You see, the Infopackage for Inital load has already restricted the doc type selection, and then the start routine would restrict the doc type selection again when conducting the initial data load. Or I mean the data selection for Initial load exist both in Initial load InfoPackage and start routine for Initial data load run, or the data selection is duplicated for the above two in Initial data load.

Thanks

former_member188975
Active Contributor
0 Kudos

Yes, I see that the for the Init run, you have selections in 2 places: InfoPackage and Start Routine. But there is nothing wrong with that...

Former Member
0 Kudos

hi Roberto,

We are sorry that we are confused by your answer. When we talk about data selection here, we refer to two places we can use for data selection:

1. InfoPackage data selection tab (including Initial/Delta and both should be the same for data selection)

2. Start Routine of Update Rule (effect on both Initial and Delta load)

We are confused at these points:

1. When you say "It is not true that data selection works only for init...it will work for delta too", which data selection are you talking about (for 1 or 2)?

2. What's ODS0? Are you talking about InfoPackage or Start Routine?

Also we could not set the data selection in Initial load InfoPackage, see the senario,

For ODS1, we set the Initial load InfoPackage data selection for doc type Z1, then later if we create a Delta load infoPackage and save it, the data selection would be the same as Z1.

For ODS2, we set the Initial load InfoPackage data selection for doc type Z2, then later if we create a Delta load infoPackage and save it, the data selection would be either Z1 (if already loaded data to ODS1) or Z2 (without loading data to ODS1). We know that the start routine for ODS2 is correct, but the data selection of Delta InfoPackage is incorrect, then which one would take priority? The solution maybe is not to set any data selection in InfoPackages (only check Intial/Delta update mode) and only restrict the data selection in Start Routine of update rule.

Thanks a lot and looking forward to seeing your answer soon!

Message was edited by: Kevin Smith

former_member188975
Active Contributor
0 Kudos

Kevin,

Please read topic <b>Initializing the Delta Process</b> at this link:

http://help.sap.com/saphelp_nw04/helpdata/en/80/1a65dce07211d2acb80000e829fbfe/content.htm

This will help you to understand how multiple delta Inits and subsequent deltas work.

About the "priority" you are mentioning, you can think of it as a "sequence":

Delta load (Z1 and Z2 records) -> Update rule for ODS1 (deletes Z2 records) and Update rule for ODS2 (deletes Z1 records). If there are no Z2 records, update rule for ODS1 will not have to delete anything and will continue further processing.

Hope this helps...

Former Member
0 Kudos

Kevin,

1. I was talking about IP selection

2. ODS0 is your source and ODS1 and ODS2 are your targets

Are you able to follow what I described before or do you have some constraint?

Anyway, let's coming to your doubts...

First of all, when you create an infopackage to manage delta loads, you don't need to put anything in selection tab, cause the infopackage will have AUTOMATICALLY the same selections of ALL your previous initial loads!

"For ODS1, we set the Initial load InfoPackage data selection for doc type Z1"

OK, NOW EXECUTE YOUR INITIAL LOAD !

"For ODS2, we set the Initial load InfoPackage data selection for doc type Z2"

OK, NOW EXECUTE YOUR INITIAL LOAD !

Now you can create ONLY ONE delta infopackage for ODS1 and ODS2...you will find in selection tab either "Z1" AND "Z2" as selection conditions, together.

OK, NOW EXECUTE YOUR DELTA LOAD TOWARDS ODS1 AND ODS2 AT THE SAME TIME, WITH ONLY ONE DELTA LOAD !

During this delta, you will receive in ODS1 records with Z1 and Z2, and for this purpose you have to insert a code that delete everything is equal to Z2...clearly this code will take no effect on your previous initial load, since you uploaded only Z1 records, thanks to a dedicated init...

During the same delta, you will receive in ODS2 records with Z1 and Z2, and for this purpose you have to insert a code that delete everything is equal to Z1...clearly this code will take no effect on your previous initial load, since you uploaded only Z2 records, thanks to a dedicated init...

Onestly, I'not able to better explain myself !!!

Hope now is clearer...

Bye,

Roberto

Former Member
0 Kudos

hi Roberto,

We are really appreciated your detailed inputs! Yeh, we understand your points now. But when you talk about the Initial data load, maybe you forget about the start routin. The start routine covers both Initial and Delta load (that means it doesn't only take effect for Delta load). We copy what you wrote about Initial data load below:

"For ODS1, we set the Initial load InfoPackage data selection for doc type Z1"

OK, NOW EXECUTE YOUR INITIAL LOAD !"

Yeh, we can do this in InfoPackage, then what would be the code in Start Routine when executing the Initial load? Which one will take priority?

Thanks

former_member188975
Active Contributor
0 Kudos

Did you read my reply just above:

Former Member
0 Kudos

There is no priority, the system will take into account both!

BUT, since during your initial load in ODS1 you will receive only Z1 records (since this is your selection in infopackage for init), your start routine will not delete any records (instead of delta loads, when the start routine will process both Z1 and Z2 and will delete Z2 records!)...

Former Member
0 Kudos

hi Roberto,

Let's draw up a conclusion:

The document type restrictions are setup in Initial data load InfoPackage respectively for these two senarios no matter what start routine code is.

The start routine will meet our need for delta load no matter what the data selections are in Delta InfoPackage, right?

But now we find even the Initial load doesn't work! We conducted the Initial data load for ODS1 and it is fine. But then when we conducted the Initial load for ODS2 (remember since both share the same InfoSource/DataSource that these two Initial InfoPackage contain the same Initial load packet if you go to menu Scheduler -> Initialization Options for Source System, then in both Initial load InfoPackages, you can see the same Initial load packet there), get two red errors:

Activation of data records from ODS object ODS2 terminated

ODS object ODS2 was built incorrectly. Cannot update request REQU_4163W3XC4UV892XF79ULST12T

If opening the detailed msg for the 2nd red error above, then it shows the following (see below in between two dashed lines):

-


Diagnosis

Request 3,530 has still not been uploaded.

System response

The system cannot upload request REQU_4163W3XC4UV892XF79ULST12T (3,534).

Procedure

You can find information and the monitor log for a request in data load

monitor for a single request . You can also display the assignment of a

request number to a SID here by selecting the request number in the

header tab page.

First upload request 3,530 to ODS-Objekt ODS2 .

-


Help!

Thanks

Message was edited by: Kevin Smith

former_member188975
Active Contributor
0 Kudos

Kevin,

All along there is really no need to opt for 2 Inits. Youc an do one combined Init with the selections that you want. Later in the Update rules we do have the logic to separate and delete the unwanted records.

When you set up an Init, it is for the datasource, and not for the object you are laoding to. So here you cannot have Init1 for ODS1 and Init2 for ODS2. The ODS2 will not activate the data as it is looking for the first Init (request with lower SID than the Init2).

I would suggest that you scrap the 2 Inits and make do with just one. However if you want to continue with the Inits that you have, you will need to load the Init1 request to the ODS2 too. You can try doing this from RSA1 > PSA.

Hope this helps...

Answers (1)

Answers (1)

Former Member
0 Kudos

Hi Kevin,

a single InfoSource/Datasource can feed two different ODS with different data selection with no problem IF YOU USE A FULL...

If you have to use init/delta, you cannot do it and you have to filter out what you dont need in start routines for each ODS...

Hope it helps!

Bye,

Roberto

Former Member
0 Kudos

hi Roberto,

I modified my original post. You said "If you have to use init/delta, you cannot do it and you have to filter out what you dont need in start routines for each ODS...". Are you talking about start routine in Transfer Rule? In this case, in infopackages, we still have to use full load even if we use start routine in Transfer Rule?

Thanks