on 07-15-2010 12:09 PM
Dear SAP Mobile Experts,
Is there a way to identify the Device Name (from device information) while running a mobile application?
For example, one of the fields of a data object is PDA_ID. The only source of this info is the Device Name which can be found at the Device Information of the mobile client. If it is required to automatically read the Device Name and put into the PDA_ID field of the data object, what is the best way to do it?
Your inputs will be greatly appreciated.
Thanks in advance.
Regards,
Robert
Hi,
If your business case requires device information of the device in which the data was created and uploaded , then you can use the 'default values' option in backend adapter.
Double click on backend adapter , goto "default values" tab
Choose the bapiwrapper 'create' / 'modify' and then map the dataobject field that holds the deviceid to 'data object communication header' --> device_id.
With this, the data object field for holding device id will be be filled before sending to BE with out any extra coding.
But here you will get only device_id information and if you are very particular about device name, then you can achieve the same with a custom service plugged in the flow by queriying device inventory to get the corresponding device name.
Regards,
Liji
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Liji,
Thank you for your inputs.
I'm trying to edit the default values but encounter a problem. The list of parameter fields only displays the first 9 fields of the chosen parameter in alphabetical order. The field that I want to map is further down the list. The vertical scroll bar does not appear so I could not go into the field that I want to map.
Have you, or anyone found a solution or workaround for this?
I am trying to look for an OSS note but could not find one relating to the parameter list problem.
Regards,
Robert
Hi Liji,
You mentioned from your last reply:
"But here you will get only device_id information and if you are very particular about device name, then you can achieve the same with a custom service plugged in the flow by queriying device inventory to get the corresponding device name."
How do we query the device inventory? Should this be a custom operation added to the service component? Or somewhere else? It would be great if you can give an example.
Thanks and regards,
Robert
Hi Robert,
You can use function module GET_DEVICE_NAME to get the device name for a given device id.
NAME property of the return structure will have device name.
You can go through following link for better understanding on [custom services|http://www.sdn.sap.com/irj/scn/index?rid=/library/uuid/f0d258e4-3480-2c10-8ebc-853c3e787d90].
Regards,
Siva.
Hi,
If you are unable to scroll down, please raise an OSS message.
For time being, if possible, change the field name in the backend such that it appears with in the first 8 fields and re-import to the DOE then do the mapping.
Thanks and Regards,
Suma
Edited by: Suma S on Jul 26, 2010 1:19 PM
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Instead of using 'data object communication header' in the above said scenario
you can use device attributes to get the device name directly
hope this solves your issue
Regards
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Robert,
The DOE will automatically be aware of the mobile client device from which the data is being uploaded (via the sync protocol).
So, can you please tell why you want to put the device id into a data object field from the mobile client?
Regards,
Ram
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
This information is not exposed at Runtime of Mobile Application.
Buty you can enter the information as some context attribute bound to a UI and map the attribute to data object field n save . But there is no way to do this in DOE .. anything like this will be done thru application logic according to the use case.
Regards,
Nipun
User | Count |
---|---|
88 | |
10 | |
10 | |
9 | |
6 | |
6 | |
6 | |
5 | |
4 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.