Skip to Content

Archived discussions are read-only. Learn more about SAP Q&A

Sting Reverse

data : v_string1(20) type C.

data : v_string2(20) type C.

initialization.

v_string1 = 'RAMA'.

CALL FUNCTION 'STRING_REVERSE'

EXPORTING

string = v_string1

lang = sy-langu

IMPORTING

rstring = v_string2

EXCEPTIONS

too_small = 1

OTHERS = 2.

write :/ v_string1,v_string2.

I am using this code to reverse the string.Works well.But in exporting parameter i gave lang = 'EN' instead of sy-langu.Its not working.Y?

Tags:
Former Member
Former Member replied

Hi,

Use 'E' instead of 'EN'. It will work.

data : v_string1(20) type C.
data : v_string2(20) type C.
initialization.
v_string1 = 'RAMA'.

CALL FUNCTION 'STRING_REVERSE'
EXPORTING
string = v_string1
lang = 'E'                  "Here change to E instead of EN
IMPORTING
rstring = v_string2
EXCEPTIONS
too_small = 1
OTHERS = 2.

write :/ v_string1,v_string2.

Thanks,

Sriram Ponna.

0 View this answer in context
Not what you were looking for? View more on this topic or Ask a question