cancel
Showing results for 
Search instead for 
Did you mean: 

Some Help Please ;-)

Former Member
0 Kudos

Can this scenario work:

AnySender -


XI -


XI exits during mapping to an RFC to retrieve either 1 or many values depending on lets say ID field then enters back into the mapping to populate the target structure -


XI sends this message as either one ro many IDOCs to an R/3 backend system

Is the above scenario possible.... if so what are some of the possible stumbling blocks and if you can can you give me some basic steps on what needs to be configured in order for this to work....

I dont want to use BPM....

Accepted Solutions (0)

Answers (5)

Answers (5)

Former Member
0 Kudos

So is it possible to do

Field1 --> RFC in Mapping --> Field1, Field2 , Field3

How do you do this in the mapping will you need extra data types? for the RFC call or can that RFC call map the separate values to the relevant fields?

and can someone explain how it is done please?

Former Member
0 Kudos

Hi,

Create three RFC lookups

Field1 --> RFC in Mapping --> Field1,

Field1 --> RFC in Mapping --> Field2 ,

Field1 --> RFC in Mapping --> Field3 ,

here in this case use the in Message mapping Global declaration..there you declare all the connections details remaining thing for each function is different.

Global level just you have declare the common code till the JCO Connection this is for common for all RFC...

This woule help for performance..

Regards,

Venu.

Former Member
0 Kudos

HI,

In the case of generic access, before executing the lookup, developers first need to both build the payload that the adapter expects and parse the result payload themselves.

To access an application system generically, developers use the SystemAccessor class. For generic calls, developers of a method must pass a stream with the payload, which is then sent to the adapter. The result of the call is a payload object, which you can use to both read the payload as a stream and parse the payload.

The generic lookup API is part of the mapping API (see LookupService class in the Javadoc documentation).

Please see the above blogs and below links also

http://help.sap.com/saphelp_erp2005vp/helpdata/en/cf/406642ea59c753e10000000a1550b0/frameset.htm

Regards

Chilla..

Former Member
0 Kudos

Hi,

Create the RFC lookup in Message mapping.

Source -> UDF in Message Mapping -> more then one target field

Please find the UDF code. (Before developing this UDF u need a one RFC FM in XI OR R/3 )

com.sap.mw.jco.*;

JCO.Repository mRepository;

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

JCO.Client mConnection = JCO.createClient(

"010", // SAP client

"XXXX", // userid

"xxxxx", // password

"EN", // language

"IDES", // host name

"00" ); // system number

// connect to SAP

mConnection.connect();

// create repository

mRepository = new JCO.Repository( "SAPLookup", mConnection );

// Create function

JCO.Function function = null;

IFunctionTemplate ft = mRepository.getFunctionTemplate("ZTEST_LOOKUP");

function = ft.getFunction();

// Obtain parameter list for function

JCO.ParameterList input = function.getImportParameterList();

// Pass function parameters

input.setValue( a , "INPUT1" );

mConnection.execute( function );

String ret = function.getExportParameterList().getString( "TARGET" );

mConnection.disconnect();

return ret;

Regards,

Venu.

If the above solution was not correct..please elabrate your problem..

Former Member
0 Kudos

Hi,

We can acieve this with one way.Any sender to XI - and then in the mapping write a DB Lookup to connect the database and get value for one field and back to mapping process based on id.

This is somehitng similar to the following thread

DB lookup - /people/siva.maranani/blog/2005/08/23/lookup146s-in-xi-made-simpler

SOAP Lookup - /people/bhavesh.kantilal/blog/2006/11/20/webservice-calls-from-a-user-defined-function

Lookup - /people/alessandro.guarneri/blog/2006/03/27/sap-xi-lookup-api-the-killer

http://help.sap.com/saphelp_nw04/helpdata/en/cf/406642ea59c753e10000000a1550b0

Regards

Chilla..

Former Member
0 Kudos

Jai Could you elaborate a little on how this can be achieved and also what you mean by changing values?

prabhu_s2
Active Contributor
0 Kudos

<a href="/people/sravya.talanki2/blog/2005/12/21/use-this-crazy-piece-for-any-rfc-mapping-lookups Mapping Lookups</a>

Former Member
0 Kudos

Ricardo,

There was an article by Michal on RFC lookups.. I cant locate that now.. Will update with a link if I can find one..

I meant the RFC should not update any values in any table...

Regards,

Jai Shankar

Former Member
0 Kudos

This can work with RFC mapping look ups...

But make sure you are not updating any values in the RFC...

Regards,

JaiShankar