cancel
Showing results for 
Search instead for 
Did you mean: 

how to get all user name by account from ME database?

Former Member
0 Kudos

I use the UserConfigurationService findUsersByFilters method, but couldn't get through the mode, call findUsersByFilters mistake, I should how to specify the properties of FindUsersByFilterRequest?

Accepted Solutions (0)

Answers (1)

Answers (1)

0 Kudos

I paste below the request, which works in my test system:

<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:mep="mepapi:com:sap:me:user" xmlns:com="http://www.sap.com/me/common" xmlns:user="http://www.sap.com/me/user">

   <soapenv:Header/>

   <soapenv:Body>

      <mep:findUsersByFilters>

         <!--Optional:-->

         <mep:Site>ATX</mep:Site>

         <!--Optional:-->

         <mep:Request>

            <!--Optional:-->

            <com:site>ATX</com:site>

         </mep:Request>

      </mep:findUsersByFilters>

   </soapenv:Body>

</soapenv:Envelope>

It does return all users configured in Site ATX.

Former Member
0 Kudos

UserConfigurationServiceInterface  s=Services.getService("com.sap.me.user", "UserConfigurationService","My site");

FindUsersByFilterRequest fr=new FindUsersByFilterRequest();

  fr.setSite("ATX");

  List<UserBasicConfiguration> user=null;

  try {

  user=s.findUsersByFilters(fr);

  SAPTestLogger.log(Severity.INFO, "", ""+new Date().getTime(), "user size="+user.size());

} catch (BusinessException e5) {

  SAPTestLogger.log(Severity.ERROR, "", ""+new Date().getTime(), "users_>"+e5.getMessage());

  }

Thank you!!The above is my test code,Get the List size = 0.

What should I get all the users List.


Former Member
0 Kudos

UserConfigurationServiceInterface  s=Services.getService("com.sap.me.user","UserConfigurationService","My site"); 

FindUsersByFilterRequest fr=new FindUsersByFilterRequest(); 

fr.setSite("ATX"); 

List<UserBasicConfiguration> user=null; 

user=s.findUsersByFilters(fr); 

------------------------

Thank you!!The above is my test code,Get the List size = 0.

What should I get all the users List.