cancel
Showing results for 
Search instead for 
Did you mean: 

Obtain user in getlist...

Former Member
0 Kudos

Hi, i want do a function GETLIST as this:

SELECT * FROM Z1CUSTOMER INTO CORRESPONDING FIELDS OF TABLE T_TOP WHERE ZFIRSTNAME = USER-OF-DEVICE.

My problem is... how can obtain the user of the device? I read various messages, but i don´t uniderstand.

I use a syncbo of type S01, and i want the name of the user that sync in the device.

Thanks,

Message was edited by:

Victor Capi

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi Victor Capi,

To know the user of the device, you atleast need to know the device id or the mobile id. With either one of these you can query upon MEREP_507 table.

Hope this helps.

Regards,

Nameeta

Former Member
0 Kudos

And how can know th device id or the mobile id? In the same device, one day can use an user and other day can use other user...

However, this table don´t exist in my backend...

Message was edited by:

Victor Capi

Former Member
0 Kudos

Hi Victor Capi,

If the same device is being used by many users, you atleast need to know the Mobile ID.

To know your Mobile ID go to transaction MEREP_PD, tab - Mobile ID. Click on the F4 help here for Mobile ID. Enter your Device ID in the Device GUID field. It will list all the Mobile IDs along with the users who are using the device. Select the particular record you want. This should give you all the information.

Regards,

Nameeta

Former Member
0 Kudos

Ok, but all of this i have do in the middelware no? Ok... but, how can obtain the mobileid in the function getlist...

Former Member
0 Kudos

Hi Victor,

take the DEFAULT_VALUE for the SyncBO. There just add the ME-SYNC_USER - this will give you the name of the current user.

Hope this helps to solve the issue. Examples for Default-Value is available in MDK.

Regards,

Oliver

Former Member
0 Kudos

I create new parameter of type ME-SYNC_USER, but appear an error, that not exist...

Thanks,

AjithC
Employee
Employee
0 Kudos

Hi Victor,

You have to do folowing steps.

1. Create a parameter for your getlist called say user.

2. Go to sbuilder. In the mapping screen of Getlist, for the import parameter, define a value id.

2. Now go to sbuilder initial screen. Enter your sycnBO name, click on Environment -> Default values. Enter ME-SYNC_USER as the value for your parameter..

Save and re-generate you syncBO.

Hope it helps.

Regards

Ajith

Former Member
0 Kudos

In the first step... what is the type of the parameter user?

AjithC
Employee
Employee
0 Kudos

char12

Ajith

Former Member
0 Kudos

Don´t work... work with SY-UNAME

AjithC
Employee
Employee
0 Kudos

You can use sy-uname, but it won't be always the device user name. For e.g. if you reprocess the worklist, sy-uname will be adminstrator(current user) name and not the sync user name. Also if you use async mode for sync, if the max number of handlers are reached, the worklist will go to waiting status and will be picked up only when RETRY_BP job runs. Again here the sy-uname will be different.

So if you always want sync user name, use the MI constant MI-SYNC_USER..

Regards

Ajith

Former Member
0 Kudos

Yes, i use MI-SYNC_USER, the problem is the type of USER in the BAPI... don´t work with char12, work with type SY-USER... You understand me?

Thanks,

Answers (0)