cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

SAP SUP Integration

rakshit_doshi
Active Contributor
0 Likes
916

Hi guys,

Has anyone worked with SAP Backend with SUP generating Native Applications on Android /ios Platform.

When we call the beginsynchronize() and synchronize() API if you would have debugged on the SAP Side you would have seen that after beginsynchronize() the data is called twice in the SAP Backend.

Has anyone encountered this thing or seen this stuff.

How to avoid this this.

Any suggestions.. Please help..

Accepted Solutions (0)

Answers (3)

Answers (3)

Former Member
0 Likes

Hi,

i have the same issue here. Did you solve the problem? Would be great if you let me know.

I'm using the Code of SUP101 Tutorial IOS, the Callbackhanlder and SUPDelegate and i use a Bapi with one input param.

I can successfully connect and register. Then i can connect to SAP an debug the Bapi, i get the right input param and the right output table.

After fninishing the Bapi is called once again with the same input data.

Anyone, any ideas?

Thanks,

me

ruben_alvarez
Explorer
0 Likes

Hello,

Did you solver your problem finally? Could you tell me how did you do it?

Thanks,

miltonc
Product and Topic Expert
Product and Topic Expert
0 Likes

Rakshit,

Are you calling both beginSynchronize AND synchronize ?

Or is the BAPI being called twice with just beginSynchronize...

Thanks !

rakshit_doshi
Active Contributor
0 Likes

Yes i am calling both but i even tried calling commenting the other one but still the BAPI is called twice.

When both are open it is called 4 times.

miltonc
Product and Topic Expert
Product and Topic Expert
0 Likes

You dont need to call both beginSynchronize and Synchronize in your code.

Synchronize is a blocking call.  While beginSynchronize is a non-blocking call. 

But it is strange that the same BAPI wrapper is called twice with a single call to beginSynchronize. 

miltonc
Product and Topic Expert
Product and Topic Expert
0 Likes

Need some more information to troubleshoot this issue.  And just to confirm.  Its the same BAPI thats being called twice with a single call to beginSynchronize. 

1.  Comment both calls to beginSynchronize and Synchronize.  Make sure your BAPI is never called.  Just want to make sure there is no other call elsewhere in your code that is causing the BAPI to be called. 

2.  Lets comment out one of the calls (for example, Synchronize) going forward.  So you should only have beginSynchronize.  What kind of operation is being done before you call beginSynchronize (Create, Update, Delete). 

3.  Is there anything in there that might be invalidating the cache ?

4.  Are you changing the personalization keys, sync params etc. in your code ?

5.  Are you deriving from the DefaultCallbackHandler and handling the events.  If so, are there any clues that you are seeing there...

6.  And if you can post a snippet of your code that calls beginSynchronize, that will be nice too. 

rakshit_doshi
Active Contributor
0 Likes

Hi,

What is the difference between non blocking and blocking call and what are the significance of both??

rakshit_doshi
Active Contributor
0 Likes

Hi Milton,

1.Can you confirm without begin Synchronize and Synchronize can the BAPI be called in any other way.??

2.With Synchronize or BeginSynchronize i am calling a Create Operation. Not the default create operation but i have defined an operation on the MBO of the type create as my BAPI takes a structure as an input rather than single values.

3. How do we determine whether the cache is being invalidated or not.

4. I am not using any personalization and Sync params while calling the MBO on which i am calling create  operation

5. Yes i am trying to read it from both, the Default Callback handler and as well querying the MBO using Query

6. Drop your email id. I will mail you the code snippet.

Thanks,

Rakshit Doshi

miltonc
Product and Topic Expert
Product and Topic Expert
0 Likes

Blocking call is a synchronous call.  You call the method and the method 'blocks' your main thread until the result is returned. 

Non-blocking call is asynchronous.  You call the method and you are free to do other stuff on your main thread. 

miltonc
Product and Topic Expert
Product and Topic Expert
0 Likes

Email me your code snippet at [email protected]

Former Member
0 Likes

Thank You Very Much !!

Former Member
0 Likes

Hi Rakshit,

I need some more details on this.

When we call the beginsynchronize() and synchronize() API,It should hit back end only once.

can you explain in detail on data is called twice in the SAP Back end.

How many MBO's you have in your project and further give me some details about cache groups and syn groups which you have in your Mobile Project.

With Regards,

Abhishek Wajge

rakshit_doshi
Active Contributor
0 Likes

HI Abhishek,

I kept a debugger on the BAPI. When i call the beginsynchronize and synchronize API here it calls the BAPI first time with the correct data but after execution once it again calls the BAPI with all zero data.

I have total 3 mBO's but i have never set any different cache groups or sync groups.

Do i have to use those.

I have not even defined the cache policy on any operation.

Can you kindly advice on this and even the significance of cache group and sync group.

Thanks

Former Member
0 Likes

Hi rakshit

Even if you dont create a cache or sync group there

Is always  default cache and sync group. All mbo's you create will go into that group. When you call synchronise() without a parameter all mbos in all cache group are called. That may explain many calls to Sap.

Regards

Elenwe