Software Development

How to Retrieve a List of Locked User Accounts directly from SAP NetWeaver Portal



A problem ticket was created for a production issue wherein the SAP NetWeaver Portal application’s Unlock Users functionality is taking too long to even just list the all locked accounts from a specific country. During the investigation, I found out that the application first retrieves the list of user IDs from an Oracle database, and uses each user ID to determine whether or not an associated account in SAP NetWeaver Portal is  locked or not.

There is a better way to do this. The available API allows for user account search using other user properties like country name, User Account Locked, Logon ID, and etc.

Software Environment

  • Windows 7 Professional SP1
  • Java 2 SDK 1.4.2 for Windows 32-bit
  • SAP NetWeaver Developer Studio Version 7.0.09 for Java
  • SAP NetWeaver Application Server
    • ​  – 7.00 SP26 (1000.
    • – 7.00 SP26 (1000.

Create a Web Dynpro

First, create a new Development Component Project via File -> New -> Development Component Project. For this post, has been created.

Modify the View


Place a TextView and DropDownByIndex UI components.


Then, modify the view’s context.


The Codes

Place the following codes in the wdDoModifyView() method and within //@begin wdModifyView and //@end lines


A Locked User Account For Testing


Sample Output


The TextView UI component displays the number of retrieved locked accounts while the DropDownByKey UI component displays the user IDs of the locked accounts.

You Might Also Like