cancel
Showing results for 
Search instead for 
Did you mean: 

In mapping & symbol should be removed

Former Member
0 Kudos

Hi Experts,

I am doing one scenario file to idoc.

In my file structure i am getting '&' symbol and should be mapped to idoc structure.

But '&' symbol should be removed and get mapped to target structure.

In idoc i should not find '&'.

I have tried with replace string and varialble substitution but it not worked.

Can you please advise how this can acheive.

Thank,

Bhaskar

Accepted Solutions (1)

Accepted Solutions (1)

iprieto
Contributor
0 Kudos

Hi,

You can use

&

instead of "&".

Try to change the XML encoding.

Regards

Ivá

Shabarish_Nair
Active Contributor
0 Kudos

write a simple java mapping that will change all the & symbol in your file. you can use the replaceall function to the same.

Former Member
0 Kudos

Hi Shabharish,

We have function replace value, with this function can my prob solve?

or instead of java maping can i go for UDF?

How can change & symbol to &amp in XML coding?

Appreciate your inputs

Thanks,

Bhaskar

Shabarish_Nair
Active Contributor
0 Kudos

if you are looking to replace only values in a particular field UDF/standard functions is the easy way to go. But if you want to replace all & in the whole payload then use java mapping

Former Member
0 Kudos

Hi All,

My problem is solved.

I have gone with Java mapping as replace all with UDF not worked.

Thanks.. manjusha, jyothi, shabharish and others.

Thanks,

Bhaskar

Answers (3)

Answers (3)

jyothi_anagani
Active Contributor
0 Kudos

Hi Bhaskar,

Refer this [Handling the Special Characters in XI|https://www.sdn.sap.com/irj/scn/weblogs?blog=/pub/wlg/9420] [original link is broken] [original link is broken] [original link is broken]; suggested by Manjusha ....This is the same case for you. Java Mapping code has given there...Check it.

Thanks.

Former Member
0 Kudos

Hi bhaskar,

You can very well do it in Graphical mapping by writing a context UDF.

if (!(character == '&'))

Former Member
0 Kudos

Have you checked this blog

https://www.sdn.sap.com/irj/scn/weblogs?blog=/pub/wlg/9420 [original link is broken] [original link is broken] [original link is broken]