cancel
Showing results for 
Search instead for 
Did you mean: 

Logged user on mobile client

Former Member
0 Kudos

Hi experts,

This is relative to Mobile Infrastructure 7.1

I have a scenario where I need to get the logged user on mobile client an show data acording to this logged user. In my data object I have an attribute 'user' and I can make a query on service component filtering with the logged user. Is there a way that I can get it by code?

Tanks,

Gabriela

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi Gabriela!

For it you only need to do it:

User.getCurrentUser from com.sap.tc.mobile.sf.api.user.

Regards, Ronaldo.

Answers (2)

Answers (2)

Former Member
0 Kudos

Tanks Ronaldo

That answered my questions.

Regards

Gabriela

Former Member
0 Kudos

Tanks Ronaldo,

Just one more question. Is there a way that I can make the query using functions like uppercase() or lowercase() ? I have a problem that the data is not always uppercase and logged user is uppercase always, when I execute the query the corresponding data doesn´t apear.

Regards,

Gabriela

Former Member
0 Kudos

Hello Gabriela!

I suggest for you a condition to create a sql statements using two parameters if you talk about service of handheld, now if you talk about abap functions, that you have to call, you can transform that params in your where statement with it:


...
TRANSLATE field TO UPPER CASE
...

Then the independently state of your user filter, you tranform that data in upper case and every execute of state return the correctly data.

Best regards, Ronaldo.