cancel
Showing results for 
Search instead for 
Did you mean: 

Another Problem with XI Lookup

Former Member
0 Kudos

Shame on me...

I think I've read all of the topics regarding XI Lookups and still don't understand the whole thing:

My need is:

I have to read a SAP-Table to substitute a Value in my Mapping.

So I have to create a Function in my SAP-System, which ich call via RFC from my Mapping, right?

Anymore I need to specify the Party, Business system, Communication channel in my Configuration, correct?

Furthermore I need a user defined Function in my Mapping, where I call this SAP Function, OK?

I determined a channel, get a RFC accessor, and then i'm not sure further...

Where in this function do i specify which SAP Function I want to call?

Do I need something more?

Thanks for your patience and help,

best regards, Leo

Accepted Solutions (1)

Accepted Solutions (1)

bhavesh_kantilal
Active Contributor
0 Kudos

Leo,

<i>Where in this function do i specify which SAP Function I want to call?</i>

You need not / cannot pass the name of the Function Module.

Just import the RFC into XI, and use the XML strucutre of the request message of the Function Module ( along with the parameters filled up) and pass it to the <b>CALL method of the ACCESSOR class to do the Look up.</b>

Just check this blog for the same,

/people/morten.wittrock/blog/2006/03/30/wrapping-your-mapping-lookup-api-code-in-easy-to-use-java-classes

Regards,

Bhavesh

Former Member
Former Member
0 Kudos

Thanks, but: I'm fairly unfamiliar in programming java and/or xml jet, and my problem is that there is so much written i don't understand completely.

I former mapped EDI messages (shipment, delfor etc.) with another tool, and now do my first steps with xi. The message-mappings themself are easy to understand, but now i need a convert-table from sap.

So i would be pleased if there is a step by step guide for reading a sap-table from my message mapping, i'm already confused if there is spoken from an jdbc call instead of an rfc call etc...

I am willing to learn the whole thing, but now i need near-term one simple special sap-lookup, just for this one case.

Is there anywhere something like my sought step-by-step guide?

Thanks again for your help,

Leo

moorthy
Active Contributor
0 Kudos

Hi Leo,

Using JCO call you can do this from the mapping. Check this blog-

/people/sravya.talanki2/blog/2005/12/21/use-this-crazy-piece-for-any-rfc-mapping-lookups

Regards,

Moorthy

Former Member
0 Kudos

Hi Moorthy,

I tried to implement the sample in the blog you suggested, but when I try to test it I get the following errors now:

K:/usr/sap/XIW/DVEBMGS00/j2ee/cluster/server0/./temp/classpath_resolver/Mapaf243160faaa11dab2e20050568633c9/source/com/sap/xi/tf/_DELJIT97A_DELFOR02_AI_.java:2172: package JCO does not exist JCO.Repository mRepository; ^ K:/usr/sap/XIW/DVEBMGS00/j2ee/cluster/server0/./temp/classpath_resolver/Mapaf243160faaa11dab2e20050568633c9/source/com/sap/xi/tf/_DELJIT97A_DELFOR02_AI_.java:2173: package JCO does not exist JCO.Client mConnection = JCO.createClient( ^ K:/usr/sap/XIW/DVEBMGS00/j2ee/cluster/server0/./temp/classpath_resolver/Mapaf243160faaa11dab2e20050568633c9/source/com/sap/xi/tf/_DELJIT97A_DELFOR02_AI_.java:2173: cannot resolve symbol symbol : variable JCO location: class com.sap.xi.tf._DELJIT97A_DELFOR02_AI_ JCO.Client mConnection = JCO.createClient( ^ K:/usr/sap/XIW/DVEBMGS00/j2ee/cluster/server0/./temp/classpath_resolver/Mapaf243160faaa11dab2e20050568633c9/source/com/sap/xi/tf/_DELJIT97A_DELFOR02_AI_.java:2185: package JCO does not exist mRepository = new JCO.Repository( "GenericRFCMappingLookup", mConnection ); ^ K:/usr/sap/XIW/DVEBMGS00/j2ee/cluster/server0/./temp/classpath_resolver/Mapaf243160faaa11dab2e20050568633c9/source/com/sap/xi/tf/_DELJIT97A_DELFOR02_AI_.java:2188: package JCO does not exist JCO.Function function = null; ^ K:/usr/sap/XIW/DVEBMGS00/j2ee/cluster/server0/./temp/classpath_resolver/Mapaf243160faaa11dab2e20050568633c9/source/com/sap/xi/tf/_DELJIT97A_DELFOR02_AI_.java:2189: cannot resolve symbol symbol : class IFunctionTemplate location: class com.sap.xi.tf._DELJIT97A_DELFOR02_AI_ IFunctionTemplate ft = mRepository.getFunctionTemplate("RFC_READ_TABLE"); ^ K:/usr/sap/XIW/DVEBMGS00/j2ee/cluster/server0/./temp/classpath_resolver/Mapaf243160faaa11dab2e20050568633c9/source/com/sap/xi/tf/_DELJIT97A_DELFOR02_AI_.java:2192: package JCO does not exist JCO.ParameterList input = function.getImportParameterList(); ^ K:/usr/sap/XIW/DVEBMGS00/j2ee/cluster/server0/./temp/classpath_resolver/Mapaf243160faaa11dab2e20050568633c9/source/com/sap/xi/tf/_DELJIT97A_DELFOR02_AI_.java:2198: package JCO does not exist JCO.ParameterList tabInput = function.getTableParameterList(); ^ K:/usr/sap/XIW/DVEBMGS00/j2ee/cluster/server0/./temp/classpath_resolver/Mapaf243160faaa11dab2e20050568633c9/source/com/sap/xi/tf/_DELJIT97A_DELFOR02_AI_.java:2199: package JCO does not exist JCO.Table inputTable = tabInput.getTable("OPTIONS"); ^ K:/usr/sap/XIW/DVEBMGS00/j2ee/cluster/server0/./temp/classpath_resolver/Mapaf243160faaa11dab2e20050568633c9/source/com/sap/xi/tf/_DELJIT97A_DELFOR02_AI_.java:2204: package JCO does not exist JCO.Table lookupFieldPos = function.getTableParameterList().getTable("FIELDS"); ^ K:/usr/sap/XIW/DVEBMGS00/j2ee/cluster/server0/./temp/classpath_resolver/Mapaf243160faaa11dab2e20050568633c9/source/com/sap/xi/tf/_DELJIT97A_DELFOR02_AI_.java:2213: package JCO does not exist JCO.Table valueSet = function.getTableParameterList().getTable("DATA"); ^ 11 errors

Can you give me an advice where I have to look for this problem or what is wrong with my implementation? Do I have to import something?

Am I able to test it during design time at all?

Thanks, Leo

Answers (0)