cancel
Showing results for 
Search instead for 
Did you mean: 

XI 7.0 passing attributes between java mapping and message mapping

Former Member
0 Kudos

Hi all,

Here's a newbie question. There is a scenario where an interface mapping has several stages of java mapping and message mapping

I would like to know how to set attributes in the java mapping so that it can be accessed in a message map (or vice versa). What I intend to do is pass some information from one mapping to the other so that action can be taken based on the values passed.

Thank you!

Accepted Solutions (1)

Accepted Solutions (1)

stefan_grube
Active Contributor
0 Kudos

Another option is storing the values in the message header in the same way as the Adapter-Specific Message Attributes:

http://help.sap.com/saphelp_nw04/helpdata/en/43/09b16006526e72e10000000a422035/frameset.htm

Just use your own name/namespace combination, which is not used in any adapter.

If possible use the way that Sandro proposed and add the information which you need to additional tags in the payload.

Regards

Stefan

Former Member
0 Kudos

Thank you all for the various solutions. I will be trying out all the suggested procedures.

Answers (3)

Answers (3)

STALANKI
Active Contributor
0 Kudos

I guess you can.There is one more way as wll.Create a java class and have the attributes as static.compile it and load into xi as imported archives.You call Class.attributes from mesage mapping,java or XSLT it can access it.but make sure u add a import statement in user defined function or java where ever u want.

You imported a jar into SWCV and use it in any mapping inside SWCV.If you want it to use across,have it as a basis dependancy object to ur SWCV where ur using.

STALANKI
Active Contributor
0 Kudos

Why cannot you use the global variable section of message mapping.You can access them everywhere in the mappings.

Former Member
0 Kudos

Hi Sravya,

are you sure you can runtime access the content of global container in DIFFERENT mapping, for example one java mapping passing data to custom function in a Message Mapping tool ?

Sandro

Former Member
0 Kudos

Hi Vijay,

you can use the more native and elegant way: in the first mapping generate XML elementes that contains the data you neen in the next phase of mapping. Then, after you used the data as zou need, if these information must not exist in the final payload, just drop it.

Regards,

Sandro