cancel
Showing results for 
Search instead for 
Did you mean: 

Copy update rules from one InfoSource to another one

Former Member
0 Kudos

I have a DataTarget "A" connected to InfoSource "X" through Update rules. I also have another InfoSource "Y". "X" and "Y" have IDENTICAL Communication structures. I know how to copy the Update rules between "X" and "A" to a new DataTarget "B", but this is not what I want to do. I want to copy the Update rules between "A" and "X" to create Update rules between "A" and "Y". Any idea how to do that? If there is no way to do it in the Warehouse Management I am pretty sure it can be done in ABAP (the "copy" method of the cl_rsau_updr class seems to support it...). Has anybody successfully written something to do it?

For those that are curious about why I want do to that, here is the story. I added an ODS between an InfoSource and a Cube. I just want to move the Update rules between the InfoSource and the Cube one level up, between the ODS and the cube. And no, I do not want the processing in the Update rules to happen between the InfoSource and the ODS (in which case I would copy the Update rules as I already know how to do), I want it between the ODS and the cube...

Thanks

Accepted Solutions (0)

Answers (3)

Answers (3)

Former Member
0 Kudos

THANKS ! FOR THIS TERRIBLE ABAP

VERY VERY HELPUL !!!!!

Former Member
0 Kudos

I solved the problem myself through ABAP. Here is the code, but of course you use it at your own risk and I do not support it...

There seems to be a problem in the cl_rsau_updr=>copy method (I am on BW 3.5 SP 14). The following has extra code to correct the problem.

***********************************************************************

  • Description: *

  • *

  • Copies Update rules from Data Target A InfoSource X *

  • to Data target B InfoSource Y *

  • *

  • Modified versions are copied/created. *

  • *

***********************************************************************

REPORT z_updr_copy.

TYPE-POOLS: rs, rsau.

DATA: l_objvers TYPE rsobjvers,

E_S_UPDR TYPE RSAU_S_UPDR.

PARAMETERS: dtar_fr TYPE RSDDATATARGET, "Source DataTarget

isrc_fr type RSISOURCE, "Source InfoSource

dtar_to type RSDDATATARGET, "Destination DataTarget

isrc_to type RSISOURCE. "Destination InfoSource

START-OF-SELECTION.

  • The cl_rsau_updr=>copy method has a bug. We must fix the data it generates

  • before it is written to the database...

CALL METHOD cl_rsau_updr=>copy

EXPORTING

i_DTA_SOURCE = dtar_fr

i_DTA_TARGET = dtar_to

i_isource_SOURCE = isrc_fr

i_isource_TARGET = isrc_to

I_ONLY_INTERNAL = RS_C_TRUE "to fix data before writing...

IMPORTING

e_s_updr = E_S_UPDR

EXCEPTIONS

error = 1

OTHERS = 2.

IF sy-subrc <> 0.

MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno

WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.

ENDIF.

  • This line missing in the cl_rsau_updr=>copy method.

e_s_updr-s_info-isource = isrc_to.

  • write the update rules : update rules tables (rsau)

CALL FUNCTION 'RSAU_UPDR_WRITE'

EXPORTING

i_objvers = rs_c_objvers-modified

i_s_updinfo = e_s_updr-s_info

  • I_T_UPDINFO =

i_t_upddat = e_s_updr-t_dat

i_t_updkey = e_s_updr-t_key

i_t_updform = e_s_updr-t_updform

i_t_updrout = e_s_updr-t_updrout

i_t_arout = e_s_updr-t_arout

i_t_aabap = e_s_updr-t_aabap

i_t_aroutt = e_s_updr-t_aroutt

EXCEPTIONS

database_write_error = 1

OTHERS = 2.

IF sy-subrc <> 0.

MESSAGE e274(RSAU) RAISING error.

ENDIF.

Message was edited by:

Michel Yergeau

Former Member
0 Kudos

Hi Michel

You want update rule processing between the ODS and the cube. Here is what you should do .

Let the update rules between Cube & Infosource be there (do not delete) . Then Introduce ODS and create update rules from Infosource to ODS (simple one to one mapping)

Then create update rules from ODS to Info cube with template of the same Info cube .

I am not sure whether this will work . But I don't think there is any harm in re-creating the update rules from ODS to Info cube by refering to your old model (update rules from Info source to Info cube) unless lot of effort is involved in doing this activity.

Former Member
0 Kudos

Hello MicheL,

How r u ?

I tried with what u are trying to do. But i dont think its possible in BW, coz its not allowing to copy the Update rules which is existing between one InfoSource and InfoCube to create Update Rules for InfoSource and ODS.

Instead, its showing only InfoCube to select as a template for InfoCube and ODS for ODS.

I do not have any idea about the ABAP way of doing that.

Best Regards....

Sankar Kumar