2008 Jan 22 10:15 AM
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
2008 Jan 22 10:20 AM
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...
2008 Jan 22 10:31 AM
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
2008 Jan 22 10:36 AM
| User | Count |
|---|---|
| 3 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |