on 11-07-2006 5:40 PM
Hi everyone!
I am working on a smartsync application which has insert and modify bapi wrappers.
My problem is after inserting data , For modifying the same, i need synckey of the inserted syncbo.
I have written a querry to get the inserted data, but the value of synckey i am getting is not same as that created in the middleware. It is returning some two digit number . In the trace file of my MI client i could see this value as the local synckey.
How to get the synckey generated in the middleware is my problem! I tried all the methods given in javadoc for getting the synckey. For all the result is the same value.
Another question is about the change bapi Wrapper.
i tried to retrieve the inserted syncbo instance form the data facade using the same synckey and then modified the row instance .
It is not working, can the synckey be the problem for that?
i tried to retrieve the "Syncstate" of the syncbo. It says "inconsistent". What does this mean? I refered javadoc , but couldn't get a clear picture.
please help me!
Thanking you in advance,
Regards,
veera.
HI JO!
I have also the same problem. Can you please give some details about this semantic key field. In my case
After insertion of a record, For modifying it i have written the code like this,
Syncbo sb = dataFacade.getSyncbo(sbd(SyncBo Descriptor) , syncKey).
RowDescriptor rowdes = sbd.getTopRowDescriptor();
Row row = sb.getTopRow();
FieldDescriptor fid1 = rowdes.getFieldDescriptor("USERID");
FieldDescriptor fid2 = rowdes.getFieldDescriptor("NAME");
FieldDescriptor fid3 = rowdes.getFieldDescriptor("CONTACTNO");
row.modifyFieldValue(fid1,ADIRAJUM);
row.modifyFieldValue(fid2,KRISHNA);
row.modifyFieldValue(fid3,223736);
sb.modifyRow(row);
dataFacade.insertSyncBo(sb);
SyncManager smgr = SyncManager.getInstance();
smgr.synchronizeWithBackend();
For the value of synckey i have written a method to query the local DB and fetch the inserted record. It also has synckey.
But the problem is here the value of synckey i am getting from it is a local synckey. And my modify functionality is failing once for all.
But when i retrieved the value of synckey from merep_10100 and hard coded the same . Modify is working fine.
I have gone through the MERER_CONTACT_MODIFY bapi wrapper which you are referring .
In my case i have three fields in my R/3 DB table with USERID being the Key.
Can you please detail about using this semantic key field while fetching the syncbo instance from the dataFacade and using it for modifying the instance.
Thanks in Advance,
Regards,
krishna.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
hello krisha,
is it your client code that fails or the BAPI?
in the client, a local synckey are dynamically assigned during insertion. all other
syncbo data downloaded from the middleware (i.e. replicaDB) will have their global
synckey. i suggest not to hardcode your synckeys. retrieve them dynamically and
pass them as your parameter value.
regards
jo
Hi jo!
I hardcoded the value of synckey only to test the functionality ! I have run the syncbo emulator to test my BAPI it was working fine.
And at the client tier, The functionality(modify) is working fine with hardcoded value of synckey but not the with the one i retrieved querying the DB2E.
Also with the local synckey the record is getting updated in the local DB but the changes are not reflecting in the R/3. What could be the possible reason for this!
Please help!
Thanks in Advance,
Regards,
krishna.
hello krishna,
do you have hardcoded synckey values in your codes?
or you just hardcoded them to test the functionality?
>Also with the local synckey the record is getting updated in the local DB but the >changes are not reflecting in the R/3. What could be the possible reason for this!
1) does your changes being uploaded into the middleware?
-> check it out in the worklist monitor
2) if the BAPI update is failing, do you have error dumps?
-> check merep_log and/or st22
3) if 1) & 2) are not the possible cause, check your modify BAPI.
try also regenerating your SyncBos.
regards
jo
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Veera,
There are two kinds of synckeys that you need to know, when a syncBo is created on the client it is a local synckey which only the client would know. When this syncBo is sent to the server the server will assign a global sync key to the same syncBo. Hence all the other clients would get the global synckey, but the client which has created the syncBo will ALWAYS know only the local synckey. That is the reason you will not find this local synckey in the middleware. You can get a better picture if you try seeing the data with MEREP_MON.
For retreiving the syncBo and modifying it, what is the exact problem that you are facing?
The state "inconsistent" means that you have changed some data in the client which is not present in the middleware. It would be in this state till the middleware receives this data(when you sync) and returns a response to the client.
Let me know if you have any other queries?
Best Regards,
Karthik
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
95 | |
11 | |
10 | |
9 | |
9 | |
7 | |
6 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.