cancel
Showing results for 
Search instead for 
Did you mean: 

(SUP for Blackberry) SAP Login via BAPIs

Former Member
0 Kudos

Dear community,

I am currently trying to implement a mobile scenario with the SUP for Blackberry using MBOs build through BAPIs. However, I currently run in to problems with the user login functionality. Even though I created dummy data (employees connected with users) on the sandbox landscape I am working with, the login does not seem to work. There are different BAPIs to use (e.g. Employee, EmployeeAbstract, etc.) and I am not quite sure which is beat fit. I looked them up in the BAPI Repository but was not really enlightened by the documentation.

Has anybody here experience with this and could give me some guidelines on how to proceed?

Any help is very much appreciated!

Thank you,

Jenny

Edited by: Jenny Bachmann on Feb 1, 2011 1:14 AM

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi,

Could you give us more details on the issue, some error messages maybe?

Regards,

Pierre

Former Member
0 Kudos

Hi Pierre,

sorry for being so unspecific. I'll try to give more details.

I am using the BO Employee and the BAPI CheckPassword (BAPI_EmployeeT_CheckPassword) which is supposed to consume an Employee ID and password and return a return code message saying whether the pwd is correct or not. However, I always get the error "Execution failed: TYPE: <<E>>, MESSAGE: <<Internet user does not exist>>". I created a user in SU01 and connected it with the Employee in HRUSER successfully, however it does not seem to be read. Maybe there is another table that is addressed instead of the one that has to be read? Maybe the BAPI is not valid anymore? Or does "creating a user" not mean "creating an internet user" and I still have to add something?I don't know. =/

Best regards,

Jenny

Former Member
0 Kudos

Ohh, what I forgot to mention - there is a different BAPI (GetList - ZEmployeeTimeForm.GetList) that is supposed to display selected information about an employee. I tried both entering the UserID and EmployeeID of the aforementioned employee and it returned positive results both times. Therefore I am quite certain that the user "works".

best regards,

Jenny

Former Member
0 Kudos

Hi Jenny,

You should try to execute the BAPI directly from the backend using the SAP GUI and the same username/password to see if the BAPI works as expected. The error message you got seems to come from the BAPI so it seems the BAPI is executed properly.

Regards,

Pierre

Former Member
0 Kudos

Hey Pierre,

I am pretty sure now, that the BAPI does work, but not really as expected, because it retrieves data from a dummy table. Therefore, a user has to be registered to this dummy table first, before he will be found. But I hoped I could access the "real" tables via a BAPI. I know that there is the BAPI Repository Browser, but I do not find the documentation quite exhausting... do you know of any more detailed source to find out about good, suitable BAPIs?

Best regards,

Jenny

Former Member
0 Kudos

You don't have to use the BAPI browser, you can use wildcards (i.e BAPI* or Z*) to find the BAPIs you are going to use (any RFC enabled function module should work).

Have you read my blogs on SUP? They should help you get started with SUP.

[Developing Mobile Applications with Sybase Unwired Platform (1/3)|http://www.sdn.sap.com/irj/scn/weblogs?blog=/pub/wlg/20874] [original link is broken] [original link is broken] [original link is broken];

[Developing Mobile Applications with Sybase Unwired Platform (2/3)|http://www.sdn.sap.com/irj/scn/weblogs?blog=/pub/wlg/20876] [original link is broken] [original link is broken] [original link is broken];

[Developing Mobile Applications with Sybase Unwired Platform (3/3)|http://www.sdn.sap.com/irj/scn/weblogs?blog=/pub/wlg/20884] [original link is broken] [original link is broken] [original link is broken];

Regards,

Pierre

Former Member
0 Kudos

Hi Pierre,

yes, in fact I started with this tutorial when I first started using the SUP a month ago, very helpful indeed!! 😃

Best regards,

Jenny

Former Member
0 Kudos

The BAPI documentation is now available on SDN and you can use the BAPI transaction to find BAPIs and how to use them.

Other than that you can use help.sap.com to get more information. For instance I've found a lot of useful information in the ESS/MSS documentation (which function modules are used for each functionnality). I used this information and the standard portal applications (debug) to create my leave request creation/approval mobile application.

Regards,

Pierre

Former Member
0 Kudos

Hi Pierre,

ahh, thank you very much for those tips, I will have a look at them. I am also trying to implement such a scenario, do you have any tips what I have to look out for / consider when doing that?

Best regards,

Jenny

Former Member
0 Kudos

Hi Pierre,

before I forget it: I have another question! How do I "handle" the out parameters of an MBO? I mean, if I invoke an operation/ a synch an fill the out-parameters with data, how can I check what is in there and proceed accordingly?

Let's say I enter a UID and PWD and have a return message as an out parameter. If the message contains an error, I want to navigate to one screen, if not, to another screen. I tried implementing that with the "Success" and "Error" Connection, but I did not find any decent description on how to configure them so that they react to certain events. Or does that require custom coding?

Thank in advance!

Jenny

Former Member
0 Kudos

Hi Jenny,

As far as I know you'll probably have to add some custom code to achieve this. The documentation contains somes samples on how to do this.

Regards,

Pierre

Former Member
0 Kudos

Hi ozmrdn,

yes, I do use the DAD. Thanks for the suggestion, I think this part is figured out now 😃

Hi Pierre,

first of all, thanks for your support and you patience with me!

I played around with the PT_ARQ_* RFC a bit and tried to create a leave request, but I keep running into a problem. As far as I understood, one has to call the REQUEST_PREPARE first, then the REQUEST_CHECK and finally the REQUEST_EXECUTE. I fill the PREPARE RFC with im_modus = 'R', im_pernr = '00001000' and im_command = 'CREATE' - what I get is an error saying "Execution failed: unknown JCO type". Do you have any idea what this is supposed to mean? I checked the ST22 transaction but apparently there was no short dump from the system, so this seems to be a sup-error? Google did not have anything on that error...

Best regards,

Jenny

Former Member
0 Kudos

Hey there,

okay, I found a part of the problem. I did not fill the parameters im_wi_id and im_request_id. While debugging I found that they have to be filled with the initial values im_wi_id = '000000000000' and im_request_id= ' ' in order to have the rfc execute. However, if I want the attribute ex_request to be returned, it gives the JCo error once again. I can return any other attribute but ex_request - how can that be? =(

Best regards,

Jenny

Edited by: Jenny Bachmann on Feb 8, 2011 3:05 AM

tahir_z
Contributor
0 Kudos

Hi Jenny,

If you want to leave a request to a RFC try to create it as an "operation" type not as MBO. The operation has to be attached to any MBO.

Former Member
0 Kudos

Hi ozmrdn,

sorry, but I don't quite understand how this could solve my problem? I understand that I can attach the rfc as an operation to a MBO, but how will that change the JCo error that I am receiving? =/ Could you maybe explain more in details?

Thank you!

Jenny

Answers (3)

Answers (3)

tahir_z
Contributor
0 Kudos

Jenny,

Im not sure if you can return an attribute in the creation progress. Once you create your BAPI as an operation type you won't receive JCO error even you select ex_request as an out parametr. But as i told you im not sure if it returns result...

Former Member
0 Kudos

Hi,

yes, I noticed that, too, but I always had to create attributes too so that the values that is returned by an operation could somehow be stored. Otherwise I do not know how to handle the output...

Best regards,

Jenny

Former Member
0 Kudos

I am moving further questions to the thread as it might move from the original topic of this one. My question concering SAP login with the SUP is answered. I also found another nice explanation that I want to share:

1) SUP user info can be synchronized with LDAP but not synchronized with ERP.

2) SUP uses 1 technical user to connect to ERP

3) SUP uses 2 filter approaches to deliver data from ERP to devices

A) use u201Eload parameteru201C to filter data from ERP to SUP

B) use u201Esynchronization parameteru201C to filter data from SUP to devices

either of above parameters can use u201Esynchronizaion keyu201C created in device application

4) u201Esynchronization keyu201C can use device user name/password data

I hope this helps someone else, too 😃 Thank you for the support!

Edited by: Jenny Bachmann on Feb 8, 2011 9:32 AM

tahir_z
Contributor
0 Kudos

Hi,

Are you using DAD ? if yes you can add a login screen to navigate.