cancel
Showing results for 
Search instead for 
Did you mean: 

Question on How-to perform SAP data lookip within XI mapping

Former Member
0 Kudos

I was able to access SAP FM successfully from XI mapping via JCo Connector. I created a Java script within the IR (not via IDE). And its working fine.

I want to store connection information within a property file. I have transported this to test system and its still pointing to dev instance.

Can one of you tell me how I can store this in a property file....what is this file and how is it done.

// Change the logon information to your own system/user

JCO.Client mConnection = JCO.createClient(

"010", // SAP client

"SAPUSER", // userid

"XXXXX", // password

"EN", // language

"host.company.com", // host name

"10" ); // system number

Thank you,

Pam

Accepted Solutions (1)

Accepted Solutions (1)

MichalKrawczyk
Active Contributor
0 Kudos

Hi Pam,

It's not a direct answer to your question but

please consider using RFC - API

https://sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/library/uuid/801376c6-0501-001...

with this new function you store your logon info inside your communication channel - no nedd for encrypting/storing property files

but it's just an idea:)

Regards,

michal

Former Member
0 Kudos

Michal / Thorsten,

Great leads. I'm using Michal's suggestion since I have this option going in my mapping and is very simple.

However, Thorsten suggestion is a must-try solution....very tempting.

Thank you.

MichalKrawczyk
Active Contributor
0 Kudos

every soultion is a must try at least once:)

later you can always choose the one you prefere most:)

Regards,

michal

Former Member
0 Kudos

Michal,

I'm following your example closely. I get

"package com.sap.aii.mapping.lookup does not exist"

Can you tell how I can get my script look at all the function in Java lookup.

Thank you,

Parimala

Former Member
0 Kudos

I'm on SP12. After writing my lengthy code, I checked the prerequisites, it says its available in SP13.

Is there a way around it. Can I load these libraries and use it.

Thank you for all the leads.

Parimala

Answers (1)

Answers (1)

0 Kudos

Hi Pam,

A better approach is to use the Lookup API which is available from SP13. This allows you to call a FM via the RFC Adapter in your adapter engine. (see http://help.sap.com/saphelp_nw04/helpdata/en/cf/406642ea59c753e10000000a1550b0/frameset.htm)

This frees you from maintaining connection information in a file and use a communication channel instead. The downside, I suppose, is that you must create an XML message representing your request and parse the returned XML rather than using JCo data structures.

Regards,

Thorsten