cancel
Showing results for 
Search instead for 
Did you mean: 

Start Routine logic problem !

Former Member
0 Kudos

Experts ,

in my start routine,

my Source-field-fieldname has value "ABC123"

and i need to assing this value in reverse order like "123ABC" to the Infoobject.

How do i get this output ?

thankss

Accepted Solutions (1)

Accepted Solutions (1)

MartinMaruskin
Active Contributor
0 Kudos

try something like following:

A = 'ABC123'.

Concatenate A+3(3) A(3) into A.

Answers (1)

Answers (1)

Former Member
0 Kudos

Hi Honar ,

Please use this code to reverse the strings.I think you want it like

Input : "ABA123"

Output : "321CBA"

for this use below code

data : v_Input (20) type c .

data : v_Output(20) type c.

LOOP AT SOURCE_PACKAGE ASSIGNING <SOURCE_FIELDS> .

v_Input = <SOURCE_FIELDS>-FIELDNAME .

CALL FUNCTION 'STRING_REVERSE'

EXPORTING

string =v_Input

lang = 'E'

IMPORTING

RSTRING = v_Output

EXCEPTIONS

TOO_SMALL = 1

OTHERS = 2

.

<SOURCE_FIELDS>-FIELDNAME = v_Output .

ENDLOOP .

This will work .

If you have different requirement then please tell me .

Regards,

Jaya