cancel
Showing results for 
Search instead for 
Did you mean: 

Problem in synchronizing data

Former Member
0 Kudos

Hi all,

   I am developing an android test app (object api) for synchronizing data of BAPI_SALESORDER_GETLIST. I did the following for the MBO creation on server.

1. As input paramters i selected TRANSACTION_GROUP (set default value 0) , SALES_ORGANIZATION and CUSTOMER_NUMBER.

2.  Set SalesOrder table as output parameter.

3. Created 2 synchronization parameters sorgsp and custnosp.

4. Mapped the load arguments SALES_ORGANIZATION and CUSTOMER_NUMBER to sorgsp and custnosp.

Now in my mobile application when I do a sync

--------------------------------------------------------------------------

SOrderTestDB.disableChangeLog();

                              SOrderTestDB.synchronize();

                              SOrderListSynchronizationParameters spar = SOrderList.getSynchronizationParameters();

                              spar.setSorgsp("1000");

                              spar.setCustNosp("0000100000");

                              spar.save();

                              SOrderTestDB.synchronize();

                              System.out.println("Kumar came till here");

                   SOrderListSynchronizationParameters spar1 = SOrderList.getSynchronizationParameters();

                              spar1.setSorgsp("1000");

                              spar1.setCustNosp("0000100001");

                              spar1.save();

                              SOrderTestDB.synchronize();

----------------------------------------------------------------------

My first sync for values 1000 and 0000100000 succeeds but subsequently whenever I try to sync next [portion marked in bold] i get error.

I am attaching the clent and server errorlogs.

Please guide me why the sync error is coming whenever i try to sync the second time with new set of sync parameters. Please help me.

thanks and regards,

Kumar.

Accepted Solutions (0)

Answers (1)

Answers (1)

midhun_vp
Active Contributor
0 Kudos

When using synchronization parameters to retrieve data from an MBO during a synchronization session, you need clear the previous synchronization parameter values to get the expected results.

SOrderTestDB.disableChangeLog();

                              SOrderTestDB.synchronize();

                              SOrderListSynchronizationParameters spar = SOrderList.getSynchronizationParameters();

                              spar.setSorgsp("1000");

                              spar.setCustNosp("0000100000");

                              spar.save();

                              SOrderTestDB.synchronize();

                              System.out.println("Kumar came till here");

During the second sync:

SOrderListSynchronizationParameters spar = SOrderList.getSynchronizationParameters();

                              spar.delete();

                         spar =  SOrderList.getSynchronizationParameters();

                              spar.setSorgsp("1000");

                              spar.setCustNosp("0000100001");

                              spar.save();

                              SOrderTestDB.synchronize();

                              System.out.println("Kumar will come here");

Try the above mentioned code. Also make sure that the second set of values are giving output when it is tested in the RFC why because I have seen "anonymous traction" in the log.

- Midhun VP

Former Member
0 Kudos

Hi Midhun,

      I tried your code but still the same problem persisted.

Then I tried the following

1. Kept the android code as

   ------------------------------------------------------------

SOrderTestDB.disableChangeLog();

                              SOrderTestDB.synchronize();

                              SOrderListSynchronizationParameters spar = SOrderList.getSynchronizationParameters();

                              spar.setSorgsp("1000");

                              spar.setCustNosp("0000100000");

                              spar.save();

                              SOrderTestDB.synchronize();

                              System.out.println("Kumar came till here");

--------------------------------------------------------------------

2. Freshly deployed the mbo package to unwired server.

3. Ran the android application on emulator and got the accurate data.

4. Closed the application and uninstalled the app and closed the emulator.

5. Restarted the emulator, installed the same app and started it again.

Now I found the same app again gave the same error.

Can u please tell me why the sync stops working after a successful sync with sync parameters ??. I also found that If I delete the mbo package from the server and again redeploy it, the application again works..

Can u please suggest me what should I look into as I am unable to get any idea. Please help me.

thanks and regards,

kumar.

midhun_vp
Active Contributor
0 Kudos

Can you try this in a android hardware device instead of trying it in the simulator.

Are you deleting the registered user from SCC when you are installing the app for the second time. Some times issue comes due to the simulator's unique ID changes each time when you close and re open the simulator. Anyway if that is the issue when you try it in a hardware you will get to know since it will not change the device ID.

- Midhun VP