We have added search box. Key in SAP issue keyword to search
TopBottom

Announcement: wanna exchange links? contact me at sapchatroom@gmail.com.

RE:[sap-dev] Exclude WITHDRAWN users when Reconcile users between ERP and SOLMAN

Posted by Admin at
Share this post:
Ma.gnolia DiggIt! Del.icio.us Yahoo Furl Technorati Reddit

Posted by kim_nguyen (SAP Consultants)
on Jun 24 at 8:43 PM
Mark this reply as helpfulMark as helpful
Thanks Neal,

Here is my code logic
1) Get all userid's from usr02
2) Get some address details for setting name and logondata for validity periods if sets by CALL FUNCTION 'BAPI_USER_GET_DETAIL'
3)check if the users exists in Solman in return structure, 088 exists, 124 does not exist
CALL FUNCTION 'BAPI_USER_EXISTENCE_CHECK'
4) If user does not exist in Solman, create them by
CALL FUNCTION 'BAPI_USER_CREATE1'
5) User exists, so update some fields
6) If user is locked then lock them in Solman else otherwise unlock them in case they were locked previously

Ok my problem is I tried to exclude WITHDRAWN users when initially select userid's from usr02 as CLASS <> 'WITHDRAWN' and but it still allow to create all WITHDRAWN user in Solman.

Am I doing the right step in here? Can you tell me where should I put the logic code to excluding all expired users.

Thanks with regards,
Kim Nguyen.







---------------Original Message---------------
From: kim_nguyen
Sent: Monday, June 21, 2010 9:41 PM
Subject: Exclude WITHDRAWN users when Reconcile users between ERP and SOLMAN

> Hi guru,
>
> I am writting a program to create users in solman from whatever users existing in ERP with all CLASS of users. However, I need to excluding all withdrawn users from ERP and only create all valid ones in SOLMaN.
> Can you tell me if my following code is correct and correct me if i am wrong.
> Here my code:
> * Get all userid's except some default users
> SELECT bname FROM usr02 INTO TABLE i_dataout
> where ustyp = 'A'
> and class ne 'WITHDRAWN'
> and bname not in
> ('DDIC','SAP*','BWUSER','ALEREMOTE','SAPCPIC','ADS_A GENT').
> SORT i_dataout.
> DELETE ADJACENT DUPLICATES FROM i_dataout.
> ELSE.
> i_dataout-bname = user.
> APPEND i_dataout.
> ENDIF.
>
>
> Thanks with regards
> Kim

__.____._
Copyright © 2010 Toolbox.com and message author.

Toolbox.com 4343 N. Scottsdale Road Suite 280, Scottsdale, AZ 85251
In the Spotlight
Earn Recognition for Your Contributions at Toolbox for IT. Gain Points for Community Achievements
_.____.__

0 comments:

Post a Comment

T r a n s l a t e to your language