Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

Code in CMOD to diferenciate two destinations

Former Member
0 Kudos
360

Hello.

We have one R/3 and two different destinations, Two BW´s systems.

The problem is we have to create one extractor with two different rules. Namely:

We want the user-exit be executed depending on destination. In destinitation1 it has to be executed and in the other case doesn´t.

We want to can write something like:

CASE i_datasource.

    WHEN 'XXXX'

if (one logical system)

Execute User-exit.

elseif.

endif.

Thanks in advance

1 ACCEPTED SOLUTION

raymond_giuseppi
Active Contributor
0 Kudos
298

Are you able to identify ROOSPRMSC-RLOGSYS (logical BW system) value in the Customer Exit, analyzing Abap Stack and Memory in debug ?

Else you could create a dummy selection parameter for the extractor and pass the BW logical system in it.

Regards,

Raymond

12 REPLIES 12

Former Member
0 Kudos
298

Will sy-sysid or sy-host change?

Neal

0 Kudos
298

Hello.

I don't understand you. Do you mean I can use these two variables?

Are both correct? Or it's only a question.

Thanks.

0 Kudos
298

I do not have a BW system to look on.  Much less a pair.  So I suggest that you look at these system variables on each system and see if one changes between systems.  Just debug while anywhere on each system. 

If so, then I think that you will know how to use it.

Neal

0 Kudos
298

Hi Neal,

From the question I understood that the code will be on the ERP, which is only one system, hence the system variables will be the same.

Cheers,

Custodio

custodio_deoliveira
Active Contributor
0 Kudos
298

Hi Jose,

Could you share details of which user-exit you are going to implement?

cheers,

Custodio

0 Kudos
298

Hello Custodio.

What you've said is correct. The system variables are the same because the code is in R3.

In R3 source system Ihave a extractor inizializate in two destinatios. In two different bw's. One of them is in Spain and the other is in France. But the source data is the same.

So I have one source system and two different machines as destination.

My unique extractor has a user exit. This user exit delete records but i want to this user exit be executed if the extractor is going to load France, but not Spain.

So i need write in cmod something like....

If Xxxx is "destination 1". Or check...

Code.

Endif.

0 Kudos
298

Hi Jose,

Yes, I think I understand your problem. What's the user exit you are implementing?

Cheers,

Custodio

0 Kudos
298

So... It's a normal user exit which is applied by a standar stractor 2lis. This delete data and complete others field. But i want it works only with a destination. Only when data go into a bw system.

0 Kudos
298

One of the alternative can be in the function module which you are calling pass the destination name from where it is called and proceed accordinlgy

raymond_giuseppi
Active Contributor
0 Kudos
299

Are you able to identify ROOSPRMSC-RLOGSYS (logical BW system) value in the Customer Exit, analyzing Abap Stack and Memory in debug ?

Else you could create a dummy selection parameter for the extractor and pass the BW logical system in it.

Regards,

Raymond

0 Kudos
298

Hello, Raymond.

I've tried to get ROOSPRMSC-RLOGSYS debugging and I haven't been able to finf it. Are you sure it's possible or it was only an idea or test?

I Hope it was possible.

Thanks in advance.

0 Kudos
298

Was just an idea, as you get the information in the log of the background extractor jobs BIREQU_*

Usually a single Datasource always give the same result, but you can then use different transformations in different target BW systems.

Regards,

Raymond