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: 

Is it possible to use SNC1 transaction and use lower case user name ?

tim_alsop
Active Contributor
0 Kudos

Hi,

I am interested to know, when using the SNC1 transaction to set external SNC names for SAP users, whether it is possible to use lower case user names when generating the SNC name.

e.g. I have been successful using SNC1 to set the SNC name of USER1 to p:USER1@REALM, but I want to set the SNC name of USER1 to p:user1@REALM instead. I want to configure an SNC1 variant to use a lower case version of the SAP user name when constructing the SNC name. I can only see how to add a prefix such as p: or a suffix such as @REALM, and it is not obvious how I can change the user name in some way when generating the SNC name to use.

This is required because SNC names are case sensitive, so I cannot use p:USER1@REALM.

1 ACCEPTED SOLUTION

WolfgangJanzen
Product and Topic Expert
Product and Topic Expert
0 Kudos

Hi Tim,

yes, you are perfectly right: SNC names are case-sensitive (and in particular the Kerberos names).

ABAP transaction SNC1 is used to generate the SNC mappings as long as there is a simple rule:

SNC name = static prefix + ABAP userID + static suffix

Well, ABAP userIDs are case-insensitive (upper-case converted). And that is causing the problem (by imposing a restriction).

Of course, it would be a minor effort to enhance SNC1 to perform a lower-case conversion of the ABAP userID (on request, as optional parameter).

Good idea - all we need now is someone to implement it ...

Cheers, Wolfgang

15 REPLIES 15

WolfgangJanzen
Product and Topic Expert
Product and Topic Expert
0 Kudos

Hi Tim,

yes, you are perfectly right: SNC names are case-sensitive (and in particular the Kerberos names).

ABAP transaction SNC1 is used to generate the SNC mappings as long as there is a simple rule:

SNC name = static prefix + ABAP userID + static suffix

Well, ABAP userIDs are case-insensitive (upper-case converted). And that is causing the problem (by imposing a restriction).

Of course, it would be a minor effort to enhance SNC1 to perform a lower-case conversion of the ABAP userID (on request, as optional parameter).

Good idea - all we need now is someone to implement it ...

Cheers, Wolfgang

0 Kudos

Wolfgang,

So, what happens now ? Is there a recommended procedure for such enhancements/ideas to be suggested to that they can be considered for a future version of SAP software ?

Thanks,

Tim

0 Kudos

I'll estimate the effort.

If it is low enough (which I assume) it will be implemented without bureaucratic overhead (in the current development release). Fortenately SNC1 is a report transaction; this allows to provide ABAP corrections via SAP notes - which technically enables downports. For downports, however, some bureaucracy comes into play ...

(2 lines of ABAP codes can expand to several days of effort, then).

0 Kudos

I suggest to treat transaction SNC1 = Report <b>RSUSR300</b> as a template for a customer program - you might want to implement even more complex name building rules than just converting intio lower case.

Here's the important part where you would translate the userid to lower case:


FORM CREATE_PNAME.
  DATA PNAME LIKE USRACL-PNAME.

  CLEAR CHANGED.

* SNC-Namen zusammenstellen
  PNAME = PREFIX.
*(del)
*  PNAME+PRELENGTH = USRACL-BNAME.
*(ins)
  data: lname like usracl-bname.
  lname = usracl-bname.
  translate lname to lower case.
  PNAME+PRELENGTH = lname. 
*(end)
  USRLENGTH = STRLEN( USRACL-BNAME ) + PRELENGTH.
  PNAME+USRLENGTH = POSTFIX.

Kind regards

Frank Buchholz

0 Kudos

Frank,

Are you suggesting that we take the SNC1 tranaction code and create a new transaction that we ship to our customers to use, and code it so that it has more flexible name building ?

Surely it is better if the standard SAP supplied SNC1 transaction is updated rather than us creating a new propriatory transaction, or is this approach quite common ?

Thanks,

Tim

0 Kudos

Hi Tim,

I've implemented the tiny enhancement yesterday night (in the current development system) - it's really not worth to mention.

Of course, such an enhancement should be provided as part of the standard - since it is required for Kerberos-based SNC.

The downporting part might take a bit longer.

But it will come - definetly before X'mas ...

Cheers, Wolfgang

0 Kudos

Wolfgang,

Thankyou very much for making this change. It will be very nice enhancement. I beleive most companies at the moment use table maintenance and load the USRACL table from a file initially prepared on PC, but having SNC1 supporting this would be much easier.

I think the issue Frank mentioned in earier post is very valid. Some companies will use Kerberos names such as TAlsop@REALM, so we want the SNC name to be set as p:TAlsop@REALM instead of p:talsop@REALM or p:TALSOP@REALM. Therefore, there needs to be some sort of pattern matching capability, allowing some characters in the name to be changed to lower case when constructing the SNC name, and not assume that the entire name is lower case.

Thanks,Tim

0 Kudos

Hi Tim,

sorry, but I don't want to make things too complicated - anyway: that rule-based approach might not be applicable in all cases.

The best approach would be anyway: retrieve the mapping information from an LDAP directory. However, that requires that the "ABAP userID" is somewhere provided as LDAP attribute (so you need a schema extension). Then you can also handle irregular mappings.

In the current release I've added support for the following three cases:

(1) userID is all in upper-case (default)

(2) userID is all in lower-case

(3) first character is upper-case, the remaining characters are lower-case

That should be sufficient for most cases.

For all special cases one should copy SNC1 and develop his own solution based on that template. For that reason we do ship the ABAP coding along with the product.

Cheers, Wolfgang

0 Kudos

Wolfgang,

I understand that it should not be too complicated.

Can you change case 3, to :

(3) first <n> characters is upper case, and remaining characters are lower case. The value of <n> can be specified by user.

In fact, you might want to make the code so that the following cases are implemented :

1) If <n> > max length of a user name (e.g. 99) then the entire user name will be convered to upper case.

2) if <n> = 0, then no characters are converted to upper case, therefore entire name will be lower case.

3) If <n> = 1, 2 etc. then first <n> chars of name will be converted to upper case, and rest will be lower case.

Thanks again,

Tim

0 Kudos

Well, then the next one comes with the requirement that the first <n> characters should be lower-case ...

Or someone wants that every first character of each word (separated by spaces) is upper-case converted, e.g. "Tim Alsop" rather than "Tim alsop".

And so on ...

PS: ABAP userIDs are length restricted (only 12 chars).

0 Kudos

Wolfgang,

Yes, I know that my suggestion will not cater for ALL needs, but I thought it might be an easy change compared to what you have already coded, and allow for a few more cases to be considered. Anything else would be too complex to consider right now.

Thanks,

Tim

0 Kudos

Let me think over it, again.

0 Kudos

Hi Wolfgang,

Has this change been released to customers yet?

Regards

Craig

0 Kudos

Well, it's implemented in NetWeaver 2007 (ABAP 7.10) - but not downported to previous releases. As mentioned in a previous posting: it's not really a big programming effort - but each downport activity is "accompanied" by some administrative effort (which is about 2-3 times higher than the actual programming effort - for such tiny enhancements).

0 Kudos

Hi Wolfgang,

could you please tell me the procedure to convert the lower case(USER ID) in SNC1.

our  ABAP systems are in NW 7.02

plese help me.

Thanks,

srinivas