cancel
Showing results for 
Search instead for 
Did you mean: 

How to get Namespace inside a mapping?

Former Member
0 Kudos

Hi there,

My requirment:

I have created source DT/MT/MI in a namespace and target DT/MT/MI in another namespace.

and i have created graphical mapping between them in another namespace.

In my mapping i would like map NAMESPACE of the sender and NAMESPACE where i am doing the mapping to the target fields.

Is it possible to get the namespace inside a graphical mapping..??

Kindly help me out..

Thanks in advance.

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

hi,

use this simple UDF

java.util.Map map;

map = container.getTransformationParameters( );

String constant;

Constant = (String) map.get(StreamTransformationConstants.INTERFACE_NAMESPACE);

return constent;

this code will return the sender service namespace ,and map this udf with ur target node.

regards,

Navneet.

Answers (3)

Answers (3)

dharamveer_gaur2
Active Contributor
0 Kudos

Hi

you can change your namespace using XSLT. look this blog

Former Member
0 Kudos

Hi,

in user defined functions or java mappings you could use the runtime constants:

http://help.sap.com/saphelp_nw04/helpdata/en/e2/e13fcd80fe47768df001a558ed10b6/frameset.htm

Regards

Patrick

udo_martens
Active Contributor
0 Kudos

Hi Harini,

just go to the message type of your inbound interface (target) and change the value of field XML namespace to a value you like to have the result.

Regards,

Udo

Former Member
0 Kudos

hi

thanx for the reply but could u plz explain me in a better way as i am new to XI

thanx in advance

Former Member
0 Kudos

Hi Harini

You can go to message type of the Source or target you want to change .

Under the field XML namespace. You can make changes .This will be effected in message mapping as well.

Thanks

Gaurav

former_member194786
Active Contributor
0 Kudos

Hi Harini,

Use the following link of sap help doc for the same:

http://help.sap.com/saphelp_nw04/helpdata/en/b3/9a2aeb24dc4ab6b1855c99157529e4/content.htm

It clearly explains the way to do the same. You have to create a user-defined function and use the method getTransformationParameters() of the container object or use the getParameters() method of the GlobalContainer object.

Thanks and Regards,

Sanjeev.