Application Development 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: 

SECATT for assigning roles to users

Former Member
0 Kudos

Hi All,

How do we make the ECATT to work for the below scenario:

Users already have roles assigned to them. We need to add a new roles to the users which can vary in number based on the users job.

A simple ECATT script that was developed to add a single role to a new user does not work in the above case and gives an error of invalid batch input. How do I create a ECATT to assign role to user who already has a set of roles assigned (number of roles assigned to users differ, so I cannot assume to train the ECATT to assign a role on line X). Is there something I am missing while the ECATT script creation?

We are doing this from a CUA and its very difficult to assume how many roles a user could have.

Thanks,

Jay

1 ACCEPTED SOLUTION

Former Member
0 Kudos

Did you write the ECATT script to add from tcode SU01 or PFCG ? I found it easier to do it from SU01. Also, after each role added do a save.

8 REPLIES 8

Former Member
0 Kudos

Did you write the ECATT script to add from tcode SU01 or PFCG ? I found it easier to do it from SU01. Also, after each role added do a save.

0 Kudos

I am doing it from SU01. If its a new user with no roles then the ECATT executes fine. But if a user has role, then i get an error message which says something like "not a batch input" or "invalid batch input"

0 Kudos

Actually forget what I just said - it is easier to add

a role via PFCG. When you record your ECATT, select the first user

id and click on the add button - this will add

a line for you and you can enter the user id. This

will be consistent throughout your ECATT since you

are always adding a line.

0 Kudos

Thanks JC, but as I mentioned earlier we are doing this from a CUA system. So we will not be able to do it using PFCG. We are left with the option to do it using SU01.

Doing from SU10 in CUA is alo such a pain, but may be I should try using su10 in my ECATT.

0 Kudos

Yes doing an ECATT from SU10 will work as well - just a few extra steps to record. Recommend you run 1 user at a time so if it the ECATT fails somewhere then at least the previous changes are already added.

0 Kudos

I'm with JC on this one. Recent experience has shown SU10 to be much better for scripting role additions as it will append to what a user has already (if required).

Also has a very low system resource usage if that matters.

0 Kudos

Thanks Alex for the insight. For some reason SU10 is slow in the CUA environment and I wanted to avoid it but yes I finally had to use SU10. Talking to one of our ABAPer I came to know that even in their BDC recordings they get the error which I receeived, but he changes his program to skip all the lines with data and then fill the empty line.

In CUA environment, how do we create ECATT to delete a role from many users?

Thanks,

Jay

0 Kudos

Hi Jayaroop,

You can still use SU10 for the deletion from the CUA master on a user by user basis, though if I recall correctly you will need to enter the start/end dates of the role when you are making the selection in SU10 (it's been a while since I have done that though so it's worth checking.......)