Skip to Content

Receive device serial num during Agentry Synch

Hello mobility experts.

We want to extract device uniq id (for example SN) when agentry session goes and store it somewhere in SAP. I've searched SDML reference and did not find anything for Android devices. Could you help with this question? Maybe some other ways exists...



Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

1 Answer

  • Best Answer
    Jul 22, 2015 at 06:19 PM


    I am assuming the reason you are asking the Serial Number is to uniquely identify the user transmitting.  Let us assume that deviceID = Serial Number for this discussion purpose or the ability to uniquely identify a device.

    With this said, most of the SDML are designed for Windows type of devices. You may try <<user.client.LocaleID>> or you may try <<user.deviceid>>.

    I am not really sure if the <<user.deviceid>> was fully integrated as the documentation on this is lacking in SAP.

    Starting from Agentry 6.0.32 see reference: Agentry Patch Notes 6.0.32 - SAP Mobility - SCN Wiki

    AG-24058 - Change Android client to default to using server-generated device IDs

    This feature may or may not be related to the SDML <<user.deviceid>> as it is purely used inside the Agentry core libraries called deviceID().  I am not sure if this is part of the openUI control where the deviceID() may be exposed. You may need to research the openUI section.

    I believe this piece of code was replicated into Agentry 6.0, 6.1 and 7.0 (In theory copied into SMP 3.0).

    The main comment of this is:

    ~~~~~~~~~~~~Start here~~~~~~~~~~~~~~~

    • The device ID is now generated by the server, and stored on the client.
    • Reseting the client using "Reset Everything" retains the device ID assigned by the server.
    • Clearing the data from Android's --> Settings --> Apps will lose the server assigned device ID.
    • Uninstalling the client will also lose the server assigned device ID.
    • Losing connection during a transmit will still retain the device ID assigned by the server.
    • Changing users will still retain the device ID assigned by the server.

    This was tested with multiple transmits from multiple devices and the server's device logs show the same number of device IDs (updating the user information of the device ID when a user is changed on a device)


    I have not really played with this but you may try it out (<<user.deviceID>>). Worst comes to worst it may not be supported as it is not part of any of our documentation in SMP 3.0 SDML document.  It could only be a control inside the Agentry core libraries wherein when they use the deviceID() function it returns the Android device id. Again this may be openUI.

    Hopefully somebody in the Agentry core of designers may expand on this subject matter. With respect to support, if it is not documented it is not supported. I gave my best shot at this question by providing the Agentry key bug number listed above from the release notes.

    Hopefully somebody who is within the inner circle of development may shine in.

    Another idea:  If you are trying to uniquely identify the transmit by getting the serial number or key of the device, you may also try to use the USERGUID available for each user that transmit against SAP backend with a particular device. This is normally stored in a /SYCLO/ Table MDW00 for each user transmitting. You can probably use this data to uniquely identify the user as this is normally use by the SAP Work Manager product to identify that a particular user is transmitting.

    Best Regards,

    Mark Pe

    SAP Platinum Support Engineer

    Add comment
    10|10000 characters needed characters exceeded

    • Mark,

      Thank you very much for approach. I decided to use OpenUI. I attach class logic, maybe someone find it useful.




      import android.content.Context;



      import android.os.Build;

      import android.telephony.TelephonyManager;

      import android.view.View;

      public class ZAndroidInfo extends StringDisplayAdapter {

        StringDisplayModel _model;

        Context _context;


        public void initialize(StringDisplayModel arg0, Context arg1) {

        // TODO Auto-generated method stub

        _model = arg0;

        _context = arg1;



        public View getView() {

        // TODO Auto-generated method stub

        return null;



        public String getExtensionString(String name)


            if (name.equals("MAC")) {

            WifiManager wifiManager = (WifiManager) _context.getSystemService(Context.WIFI_SERVICE);

            WifiInfo wInfo = wifiManager.getConnectionInfo();

            return  wInfo.getMacAddress(); }

            if (name.equals("IMEI")) {

            TelephonyManager telephonyManager = (TelephonyManager)_context.getSystemService(Context.TELEPHONY_SERVICE);

            return telephonyManager.getDeviceId(); 


            if (name.equals("SERIAL")) {

            return Build.SERIAL;  



            return "";