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

Former Member
0 Likes
446

Hello

I need to select the data from AGR_USERS table(which is assignment of roles to users table).

Each user can have multiple roles.

My requirement is that I need to concatenate all the roles for a user in a string in an internal table.

How do I go about this?

Regards

Samir

Hello

I need to select the data from AGR_USERS table(which is assignment of roles to users table).

Each user can have multiple roles.

My requirement is that I need to concatenate all the roles for a user in a string in an internal table.

How do I go about this?

Regards

Samir

3 REPLIES 3
Read only

Former Member
0 Likes
427

hi,,

first get all the data into the internal table

then

declare variable

data:

w_roles type string.

loop at itab into wa.

concatenate wa-roles w_roles into w_roles separated by space .

endloop.

write: / w_roles.

plzz reward if it is usefull plzz dont forget to reward...

Read only

Former Member
0 Likes
427

Hi,

You can get the usernames from USR02 table.Now for each entry in USR02 put a select-endselect statement fetching values from AGR_USERS table concatenating to the internal table's role entry corresponding to username.

Hope this helps.

Reward if useful.

Thanks.

Anjaly

Read only

Former Member
0 Likes
427

Hi Davinder,

try Fm CONVERT_TABLE_TO_STRING

Regards,

-Muktar