cancel
Showing results for 
Search instead for 
Did you mean: 

create bapi wrapper not working

Former Member
0 Kudos

Hi!

I created a syncBo of S01 type.In this there is only TOP structure and no ITEM structures.When I tested the CREATE BAPI WRAPPER from the emulator I am getting the following error

Return code 1 (UPLOADER)

But the record is being uploaded to the backend succesfully.

When I create a new record from MI Client I am still getting the same error in the work list monitor.Afer I synchronized with the server again

this new record is getting downloaded to the client.That is after synchronization there are 2 records with same values in the Client database.One is a record with local sync key and the other with a global sync key.

I am attaching the logs in the Work list monitor. Please help me in

tracing the error.

5 I 21.11.2006 15:47:27 Z_MEREP_GEN_S01_____Z_FSM_USRP has finished for run number 0000053143 and runt

6 I 21.11.2006 15:47:27 Z_MEREP_GEN_S02_____Z_FSM_USRP has started for run number 0000053143 and runti

6 N 21.11.2006 15:47:27 Default values loaded successfully (SyncBO=Z_FSM_USRP, #=1)

7 I 21.11.2006 15:47:27 TOPCNTR=0000000001 has started for run number 0000053143 and runtime counter 7

7 D 21.11.2006 15:47:27 Getting synchornizer worklist records (mobile ID=0000001110, #=3)

7 D 21.11.2006 15:47:27 Read TOP rcd from upload data(mobile ID=0000001110,seqno=7,rcdcntr=1,action=)

7 N 21.11.2006 15:47:27 Header=Z_FSM_USRP, items=0000001110 stored from mbl10100 into itab (sBO=0,Mobi

7 D 21.11.2006 15:47:27 Adding header(mobile ID=0000001110, synchronization key=0000000001) data=TOP00

7 N 21.11.2006 15:47:27 Before BAPI wrapper call: Create

8 I 21.11.2006 15:47:27 ZFSM_UPS_CREATE has started for run number 0000053143 and runtime counter 8

8 I 21.11.2006 15:47:27 ZFSM_UPS_CREATE has finished for run number 0000053143 and runtime counter 8

7 S 21.11.2006 15:47:27 Return code from RFC BAPI Wrapper call:UserID USD18808 Create sucessfully

7 N 21.11.2006 15:47:27 Before BAPI wrapper call: GetDetail

9 I 21.11.2006 15:47:27 ZFSM_UPS_GETDETAIL has started for run number 0000053143 and runtime counter 9

9 I 21.11.2006 15:47:27 ZFSM_UPS_GETDETAIL has finished for run number 0000053143 and runtime counter

7 S 21.11.2006 15:47:27 Return code from RFC BAPI Wrapper call:

7 E 21.11.2006 15:47:27 Return code 1 (UPLOADER)

7 D 21.11.2006 15:47:27 Return code 0 (FORM CREATE_RTN START)

7 W 21.11.2006 15:47:27 Outbox data is empty

7 D 21.11.2006 15:47:27 Return code 0 (FORM CREATE_RTN END)

7 I 21.11.2006 15:47:27 Z_MEREP_GEN_S02_____Z_FSM_USRP has finished for run number 0000053143 and runt

6 D 21.11.2006 15:47:27 Return code - (FORM EXECUTE_SCENARIO END)

6 D 21.11.2006 15:47:27 UPDATE MEREP_501 OK. MBL_ID= 0000001110 SEQNO= 7

6 D 21.11.2006 15:47:27 Return code 0 (UPDATE MEREP_501)

6 D 21.11.2006 15:47:27 Return code 0 (UPDATE MEREP_505-STATUS)

6 D 21.11.2006 15:47:27 Status was set to E 0000001110 7

6 I 21.11.2006 15:47:27 Inbox data deleted (mobile ID = 0000001110, sequence number = 7)

6 D 21.11.2006 15:47:27 Return code 0 (FORM HANDLER_UPDATES)

6 I 21.11.2006 15:47:27 MEREP_PROCESS_HANDLER_WL has finished for run number 0000053143 and runtime co

4 D 21.11.2006 15:47:27 Return code 0 (PROCESS_HANDLER_WL)

4 I 21.11.2006 15:47:27 0 worklists found to be processed for mobile ID 0000001110

4 D 21.11.2006 15:47:27 Return code 4 (WAITING MEREP_505 EXISTENCE)

4 D 21.11.2006 15:47:27 Return code 0 (DELETE MEREP_503)

4 I 21.11.2006 15:47:27 End processing conversation worklist I 0000001110

4 D 21.11.2006 15:47:27 DIRECTION= I DEQUEUE MEREP_503 0000001110

4 D 21.11.2006 15:47:27 DIRECTION= O INSERT MEREP_503 0000001110

4 I 21.11.2006 15:47:27 MEREP_HANDLER has finished for run number 0000053143 and runtime counter 4

3 I 21.11.2006 15:47:27 MEREP_ARECEIVER has finished for run number 0000053143 and runtime counter 3

2 I 21.11.2006 15:47:27 MEREP_ARECEIVER has finished for run number 0000053143 and runtime counter 2

Accepted Solutions (0)

Answers (1)

Answers (1)

kishorg
Advisor
Advisor
0 Kudos

Hi Veera,

<<<

That is after synchronization there are 2 records with same values in the Client database.One is a record with local sync key and the other with a global sync key.

>>>

This is because of improper key mapping or because of population of different

values in the export param of GETDETAIL Wrapper when compared to that one populated in the GETLIST.

Just check the key field mappings and make it sure that you have exported those key fields in the CREATE BAPI Wrapper which are mapped as key fields in

the GETDETAIL Wrapper.

After creating (by executing the CREATE Wrapper) the entries , the FrameWork uses the export parameters of the CREATE Wrapper(which are marked as key fields of the GETDETAIL Wrapper) to execute the GETDETAIL Wrapper.At this

stage, the FrameWork fills the OutBox with respect to that particular Inbox worklist.

Keep one thing,

GETLIST selects list of Header data. In this you may have number of key(s).

With respect to this, you are executing the GETDETAIL for getting ITEM entries.

For particular TOP record which is selected using the GETLIST should be filled

in the export parameter of the GETDETAIL for that particular TOP record.

If these two are different or if the key fields are not populating properly, then there is a chance for two records (one with local nd one with global).

Its because of the problem in your BAPI Wrapper. check this...

Regards,

Kishor Gopinathan

Former Member
0 Kudos

Hi Kishor!

Thank you very much for your suggestions.

In the syncbo there is only one key for the GetList Bapi wrapper, which is used as the import param for the GetDetail bapiwrapper.The same key is returned by the export param of Create Wrapper.

I have one doubt.When we create a record in the Client DB, a local syncKey is generated. When Synchronized with the Middleware this record should be updated in the backend and a global synckey is generated to this record in the middleware.Is nt it?

So what should ideally happen to the synckey of the Client.That is after synchronization wil the local synckey of the record overwritten by the middleware generated global key ?

Thanks you

Former Member
0 Kudos

Hi Veer,

Yes what you said is correct.

When we create any record in client RDB , it is locally stored...so the information about this record is not known to server(middleware) or other users , so client assigns it a local sync key.

When we sync the client this particular record will get updated in the Backend and middleware and comes back to client with a global sync key...so now this particular record is known to server and also available to other users when they sync.

Local sync key is overwritten by global sync key.

Ru still facing the problem with create bapi wrapper.

Cheers,

Karthick

kishorg
Advisor
Advisor
0 Kudos

Hi Veera,

Karthick has already explained in detail abt local nd global sync keys.

Global sync key is generated from the MI Server itself. But in the case of

records, which are created from the MI client, sync key is generated from the

MI client and during sync this local sync key will become the global sync key in the MI server also.There is no seperate global sync key for those records which are created from the MI Client.

In your case,

because of improper values to your key fields while executing the CREATE wrapper, there is the generation of global sync key for the same record from the MI server in the next GETLIST , GETDETAIL execution.

You can see,

in the case of new records created from the MI client, after syncing, in the OutBound , replacement with Action 'R' for the same record with the generated key field.

If the CREATE wrapper is not working properly, the new record would be created in the backend and that won't come in the OutBound for the same Inboud request and the same record would be downloaded to the MI client in the next synchroization.(i mean , GETLIST nd GETDETAIL)....

check the values you are populating for the key fields during CREATE wrapper execution and during GETLIST execution..

Regards,

Kishor Gopinathan

Former Member
0 Kudos

Hi Kishor!

Create Bapi wrapper is working now.The problem is that the structure of the table in the backend and in the client DB are different.Thanks for your suggestions

Former Member
0 Kudos

Hi Karthick!

Now the bapi wrapper is working fine.Thank you very much for your reply.