Quantcast
Channel: SCN : Discussion List - SAP Sourcing
Viewing all articles
Browse latest Browse all 1416

Problem with ampersand

$
0
0

Hello experts,

 

In our SAP CLM we have a special field which is concatenation of few display names of Business Partners. We have following code where everything works correctly:

 

String businessNames = "Name 1, Name 2, Name 3, Name 4, Name 5";
BigTextIfc bigTextVariable = TypeFactory.createBigText();
if(hasValue(businessNames)){  bigTextVariable.setText(businessNames);
}

Then bigTextVariable is saved in db and the value in db is represented by: "Name 1, Name 2, Name 3, Name 4, Name 5". The problem appears when we have something like below(ampersand in businessNames variable):

 

String businessNames = "Name 1, Name & Name, Name 3, Name 4, Name 5";
BigTextIfc bigTextVariable = TypeFactory.createBigText();
if(vasValue(businessNames)){     bigTextVariable.setText(businessNames);
}

Then like in first example when i save bigTextVariable in db the result is: "Name 1, Name". Everything after ampersand is removed. Using replace function and exchange "&" character to "&" or "&" makes that further part of string occurs but there is no ampersand sign inside.

 

At the end I would like to say that I can't replace bigTextVariable with simple String type variable because then I receive error during passing it to our special field and saving it to db so my require is to use this type of big text variable instead of String type. Can anyone please advice something?

 

Thanks in advance and best regards.


Viewing all articles
Browse latest Browse all 1416

Trending Articles