Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

Problem in string concatenation in Arabic.

former_member199126
Participant

Hi people,

I have a problem in concatenating two arabic strings. Please see the below code.

PARAMETERS: p_str1(100) TYPE c DEFAULT ',%مكونات: نشا معدلة 23.86%, شراكوز 7.35',
p_str2(100) TYPE c DEFAULT ',السيليكا'.

DATA: lv_string3(100) TYPE c.


lv_String3 = p_str1 && p_str2.

write lv_string3.

When i concatenate these two strings, i am getting the below output

I see that the % symbol is moving to the front. Is there a way to concatenate these two strings properly?

Regards,

Karthik

6 REPLIES 6

DoanManhQuynh
Active Contributor

idk if it could be a hint for you but in your string % is 1 byte character. I changed it to be 2 byte (in japanese) or put whatever other 2 byte character at begining of str1,then concatenate str2 to str1 like below and it work:

PARAMETERS: p_str1 TYPE string DEFAULT ',%مكونات: نشا معدلة 23.86%, شراكوز 7.35',
 p_str2 TYPE string DEFAULT ',السيليكا'.

DATA: lv_string3(100) TYPE c.

lv_string3 = p_str2 && p_str1.
WRITE / lv_string3.

might be its the byte problem...

0 Kudos

Thanks, This goes to the the downstream systems. I am not sure the business will accept or not. Really appreceate for the help.

0 Kudos

I don't think so - if this is a unicode system then the characters will all have the same byte length won't they ??. However, that would be a good test to try temporarily to see if that is the case.

matt
Active Contributor
0 Kudos

What happens if you use CONCATENATE instead?

former_member199126
Participant
0 Kudos

Same. It does not show any difference when i use concatenate or inline.

former_member182550
Active Contributor
0 Kudos

And if you define your variables as type String ?