cancel
Showing results for 
Search instead for 
Did you mean: 

how to reverse Arabic description

Former Member
0 Kudos

Dear ALL

*+In my smartform i displayed arabic description but it prints from left to right.But user wants right to left .I reversed it using reverse_string but it reverse numeric values also but i dont want reverse numeric values only text will reverse .+*

*+Please can anybody help on this+*

Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member
0 Kudos

Something like below code may help ::

data : l_str(15) type c.

data : l_len type i.

data : l_revstr(15).

l_len = strlen( l_str ).

do.

l_len = l_len - 1.

concatenate l_revstr l_str+l_len(1) into l_revstr.

if l_len = 0.

exit.

endif.

enddo.

write : / l_str,

/ l_REvstr.

Former Member
0 Kudos

Use your brain and some string operations.

First cut the number from your string then reverse it, then concatenate the number again.

Former Member
0 Kudos

Thanks for your reply if number comes in last or first i will do what you say but the numeric value appears two or three times

in the text at that time what i do.

aidan_black
Active Contributor
0 Kudos

Hi,

I am not sure if it should be necessary to handle the reverse direction in this way. If you use a form with language key Arabic and a device type like ARSWIN or SWINCF, then it should work ok. You may also have to implement the SAP notes below:

1391768 - API for BIDI support in text processing

1403736 - New bidirectional display function for SAPscript

Regards,

Aidan