cancel
Showing results for 
Search instead for 
Did you mean: 

RFC Lookup

Former Member
0 Kudos

Hello,

I have a requirement where am accessing the R/3 Function module via RFC lookup.

But, as of now am hardcoding the development system name, Let me know how to handle the hardcoding in UDF like automatically it should point Development, Testing and Production.

Regards,

Anandh

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Better to use Key-Value pair.

like

DEV = BS_D

QUA = BS_Q

PRO = BS_P

Now in your UDF apply the logic through which it will read the SID of the systems and based on that it will map the business systems.

this will determine at runtime and you dont have change it in other environemnt. also take care of communication naming also.

thanks

farooq

Edited by: Farooq Farooqui on Sep 4, 2008 4:18 PM

Former Member
0 Kudos

Hello,

Could you light me on how to read the SID in an UDF.

Regards,

Anandh

Former Member
0 Kudos

Hi,

This is my code where i am hardcoding it.

Channel channel = LookupService.getChannel("DEV","CC_RFC_TO_XI");

Now,

Regards,

Anandh

Answers (5)

Answers (5)

Former Member
0 Kudos

hi,

try to use following code to to get the receiver service name at run time.

java.util.Map map;

map = container.getTransformationParameters( );

String constant1;

Constant1 = (String) map.get(StreamTransformationConstants.RECEIVER_SERVICE);

but the following code

Channel channel = LookupService.getChannel("DEV","CC_RFC_TO_XI");

using string as a input.

so can u try this "constant1" as a input value for BS name.

constant1 is getting value at run time and use this value as a input.

just try i am not sure about this.

regards,

navneet

Former Member
0 Kudos

Declared my communication channel as business service rather than business system. That will become generic and no hardcoding or SID is required

former_member238007
Contributor
0 Kudos

HI

As you have a communication between an Asynch System (File) and a Synch System (RFC) you would need to use a BPM. There are no work arounds to it.

There is one option though, there is a concept called RFC LookUp using which you can call an RFC and get the response from insde your message mapping with a User Defined function.

So, maybe you can get the file, and while mapping the same to the target file , you can trigger the RFC call using the RFC LookUp API and then map the response ot the target!

But, this should be used only in case of non transactional RFC calls. If the RFC is going to do some DB actions like Insert / Update you should not use this option.

Let me know if you need more details,

regards

Kishore

Jitendra_Jeswan
Contributor
0 Kudos

Hi ,

Do you have this system where you are doing RFC look-up as ENDER or RECEIVER system/servcies in XI ?

If yes, then you can use the constants from in-build function called "Sender" or "receiver" and feed it to the UDF, which will dynamically take the value from here....

Thanks.

former_member238007
Contributor
0 Kudos

Hi..

>>>> RFC lookup's , these blogs willhelp,

But remember, never use this for Transctional Calls, as error handling can become difficult in such cases.

regards

Kishore