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 with concatenate

Former Member
0 Kudos

Hi,

I have a problem with concatenae in Right to Left

The Problem is very simple

data: data1 type char02 value 'AA'.

data: data2 type char10 value '12345'.


data: result type char20.


concatenate data1 '-' data2 into result.


or


concatenate data2 '-' data1 into result.


The result doesn't change

Try it by Debug or display to screen.


The result is AA-12345


I want to display 12345-AA


in LTR it's working fine

if the values are  123-456 it's working fine   123-456 => 456-123

if the values are  ABC-DEF it's working fine  ABC-DEF => DEF-ABC


AA-12345 => AA-12345   I Want 12345-AA        In Right to left    not Left to Right


but Numbers and chars it's not change the direction


How to solve the issue?


Jermy


4 REPLIES 4

Former Member
0 Kudos

Hi Germi.

I couldn't simulate your problem here (I created a second "result" variable), see:

DATA: data1 TYPE char02 VALUE 'AA'.

DATA: data2 TYPE char10 VALUE '12345'.

DATA: result TYPE char20.

DATA: result2 TYPE char20.

CONCATENATE data1 '-' data2 INTO result.

CONCATENATE data2 '-' data1 INTO result2.

WRITE: result, result2.

DISPLAYS:

AA-12345             12345-AA

Regards.

0 Kudos

Did you run it by right to left ?

I've got same result.

0 Kudos

Did you try "textdirection" and "textalign" properties?

"textDirection: sap.ui.core.TextDirection.LTR,

textAlign: sap.ui.core.TextAlign.End"

Sandra_Rossi
Active Contributor
0 Kudos

You can't do it directly whatever the programming language is. Same for ABAP.

It can be done only at output time, and is valid only if you're logged in a RTL language.

More info in note 587150 - Support of Arabic-script languages