cancel
Showing results for 
Search instead for 
Did you mean: 

issue with the field value having ' getting the output as '

venkatasap
Participant
0 Kudos

Hi Sap All.

iam having an Issue where a field Names from IDOC with the value T'Stephen is getting the target mapped value as T'Stephen.

if the source is File then I can do some validation at the CC Parameters but this is a Idoc.

can any one provide a simple code to replace that invalid string.

Regards.

Jagdish.

Accepted Solutions (0)

Answers (3)

Answers (3)

rasjoshi
Active Contributor
0 Kudos

hi jagdish,

can u try replace string option in mapping and check result.

else u can opt for udf also.

-rashmi

iaki_vila
Active Contributor
0 Kudos

Hi Jagdish,

You can do an UDF to change ' by '. Check Ragu code like example:

Regards.

venkatasap
Participant
0 Kudos

Hi Inaki Vila.

must I go with Java Mapping or I can just create a udf ? inside message mapping.because when I create a udf with the mentioned code iam getting the error below       

     

   


         
             
       

  will be waiting for the response.

Regards.

Jagdish.

nitindeshpande
Active Contributor
0 Kudos

Hi Jagdish,

The line of code where you are getting the error starts with a Dot(.) which is illegal, remove the dot and then try running the mapping.

Best method would be to write the code first in NWDS and then use it in UDF.

For your requirement, you can fix this only by doing a Java Mapping or writing an UDF as mentioned by Inaki.

Regards,

Nitin Deshpande

venkatasap
Participant
0 Kudos

Hi Inaki Vila.

here I want a clear decision of whether I need to go UDF or Java Mapping to solve this problem of special characters in name field generically.

if you say Java Mapping. could you please explain me in brief of how I create Java Mapping as iam not familiar with it.

Regards.

Jagdish

iaki_vila
Active Contributor
0 Kudos

Hi Jagdish,

With UDF would be easier to do it. However, if you want to know more about java mapping this Raghu Vamseedhar Reddy KadipiReddy blog could be helpful.

First of all, you would need to download the NWDS according your PI version, to do a java mapping: NWDS Download Links - Java Development - SCN Wiki

Regards.

nitindeshpande
Active Contributor
0 Kudos

Hello Jagdish,

As Inaki suggested you can do java mapping using NWDS.

But there is another method, where you can write the java code directly in your ESR. Please find below the link for the same -

Regards,

Nitin Deshpande

stefan_grube
Active Contributor
0 Kudos

This is correct handling of escaping characters in XML. What exaxtly is your issue? ' is correct XML value and understandable of all XML consumers.