Application Development and Automation 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: 
Read only

concatenate string and number type

Former Member
0 Likes
1,160

I have a internal table, i need loop the internal table and append the record index to text.

like

loop at itab

CONCATENATE 'INFO' + SY-TABIX into itab-text.

modify itab index SY-TABIX

endloop.

how can i do that. Thanks!

I have a internal table, i need loop the internal table and append the record index to text.

like

loop at itab

CONCATENATE 'INFO' + SY-TABIX into itab-text.

modify itab index SY-TABIX

endloop.

how can i do that. Thanks!

5 REPLIES 5
Read only

Former Member
0 Likes
926

hi,

wat you can do is create a integer variable and inside loop increment it and concatenate it to the INFO and store it in the internal table

Read only

seshatalpasai_madala
Product and Topic Expert
Product and Topic Expert
0 Likes
926

Hi,

Assign the sy-tabix to some temporary variable of type String or char.

As follows.

loop at itab

DATA: local_tabix type string.

local_tabix = SY-TABIX.

CONCATENATE 'INFO' + local_tabix into itab-text.

modify itab index SY-TABIX

endloop.

Regards,

Sesh

Message was edited by:

Seshatalpasai Madala

Read only

suresh_datti
Active Contributor
0 Likes
926

try this..


data w_index(10).
loop at itab.
w_index = sy-tabix.
CONCATENATE 'INFO' w-index into itab-text
  separated by '+'.
...
...
endloop

~Suresh

Read only

Former Member
0 Likes
926
data : v_index(5)

loop at itab.
v_index = sy-tabix.
CONCATENATE 'INFO' v_index  into itab-text.
condense itab-text.
modify itab index SY-TABIX.
endloop.
Read only

Former Member
0 Likes
926

hi

good

you can store the SY-TABIX value in to a string varibale and after that using CONTACTENATE command you can concatenate both the strings ,bcz concatente wont allow to joing two different data types.

Thanks

mrutyun^