on 06-02-2009 12:18 PM
Hi All,
I am facing a strange problem in MI 7.1, when ever client(code written in JSP) synchronizes with middleware it updates corresponding record by deleting all the entries.
Example :
In my CDS table there is an record
order_id value1 value2
1 20 30
So when ever client(Mobile) updates this record by saying value1 = 40 where order_id = 1 , then after syncronization it clears all the record for that order_id .In our case below record appears
order_id value1 value2
1
How is it happening , can i track it anywhere.
Regards,
Abhishek
Hi Abishek,
You can goto message monitoring and filter based on your SWCV and Data Object. This will list you the message flow between the client->DOE->backend. Here you can actually check what data was sent by the client. It could be that the client is sending empty values to the DOE.
After checking the messages and if its confirmed that the client is sending the correct values, most probably there could be a bug in the modify/update BAPI that is setting empty values.
Can you check this and let me know the results?
Best regards,
Vinodh
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Abhishek,
Modify bapi wrapper will be called durign sync and once it is updated in backend only it will be persisted in CDS. It goes to backend, if its persisted successfully, the flow in DOE proceeds , persisting in CDS, sending confirmation/rejection to receivers proceeds with runtime calculations for further distribution of this data.
If you are seeing data as blank in CDS , I guess the state will be same in backend tables too..
Please check if your modify bapi just updates the modified fields or some issue there clearing off other non-sent values..
Regards,
Liji
Hi Abishek,
Actually, the task in the message decides which BAPI should be called.
For example, if you are creating a new record in the client for the first time, the client framework will set the task to 'I'. So when sync'ing with middleware, based on the task will call the create BAPI.
Incase you are modifying a already created record on the client, the client framework will set the task to 'U' and while sync'ing modify BAPI will be called.
Since you said that you are updating from client, I assumed that modify will be called. If you feel that the BAPI's are not stable enough, you can always goto the backend and execute all your BAPI by filling in the neceaary values and you can check whether those are inserted/updated in your backend table.
Best regards,
Vinodh
Thanks a lot for your reply. So what i have understood is explained as below, correct me if i am wrong:
I have a Backend triggered , Bidirectional Push Instance BA. Now whole flow will be as below :
1. If any change is done then this whole instance will be sent to DOE where corresponding CDS table will be filled.
2. Trigger extract from Portal and now data will come to outbound queue of device.
3. Once device is registered then all the data will be flushed out from outbound queue and even if we trigger extract again it will not be filled in outbound queue as there is no change in CDS Table.
4. Now when device syncs after modifying some data then it calls MODIFY BAPI Wrapper first updates records in backend .
5. Now from DOE get_list and get_detail will be called for synchronizing data back to CDS table as it is in Backend.
Is my understanding is correct.
Regards,
Abhishek
Hi Abhishek,
Yes overall flow is correct.
Depending on the message task 'I','D' or 'U' (insert,delete,update) from the client ,corresponding bapi wrappers are called. During Modify and Create operation , only GetDetail is called to get the latest data from backend. For delete there is no call to backend for GetDetail.Create,Modify,Delete bapi wrappers are invoked per header key.
Regards,
Liji
Hi Liji,
Thanks for your support,Now i want to debug my BAPI Wrappers but whenever i put debugger in my backend and after this when i synchronize from device.
Then in CDS table all the row corresponding to that Key is getting deleted means the call to middleware happened but i am not able to stop it at the external breakpoint, means it is not stopping at that breakpoint at all.
Now how can i debug in my Modify BAPI that what is coming as a import.
Regards,
Abhishek
Hi,
This is because you must have used different logon credentials in your RFC destination of backend adapter and placed breakpoint by logging using different ID. Try using same account which you have in backend destination to keep the break point. Or keep break point in PROCESS_UPLOAD_MODIFY method in your backend adaptewr generated code. From there you can traverse to your bapi wrapper for debugging.
Regards,
Dhana
Hi Abhishek,
Instead of that, simply execute your BAPI from the backend by filling in the necessary values. In this way you will be able to check the results instantly. By the way, is the data cleared in the backend also?
Or when you synchronize, in the backend the data is as expected but only in the CDS its cleared?
Best regards,
Vinodh
HI Vinodh,
It is clearing data in backend also, I tried executing stanalone BAPI only then it is updating backend correctly, means BAPI is working fine.
Another question is that from Portal everytime i have to manually click "Trigger extract" for getting data in outbound queue , can i schedule it so that if any changes occur in CDS then it should trigger automatically.So no manual thing to do.
Regards,
Abhishek
Hi Abhishek,
To answer your query on avoiding of manual trigger extract , you can either
1) Periodic extract of data object instances for all devices by setting up an extract job. (Using TCODE sdoe_bg_job_monitor). This will be an API based triggering of extract per data object for all devices. This could be scheduled for required frequencies like any other job in a basis system
You can schedule for a time period with multiple occurances.
OR
2) set the parameter DO_SYNC_EXTRACT to 'X' for your DO
This can be done from admin portal>configuration>DOE Configuration
Insert new row and give your DO details here and set the value to 'X'.
This means any message that is downloaded from BE or uploaded from some other client that are eligible to your device will be pushed till device outbound queue in the same flow.
OR
3) Configure refresh queue option from NW mobile admin portal device administration page. These options will internally trigger extract whenever receiver synchronizes with DOE. There are options to do this extract synchronously or asynchronously. If marked synchronous, the sync session will wait till extract is completed.
Regards,
Liji
Hi Abhishek,
I can give you an alternative suggession.
As you have said that you Bapi Wrapper's are woking fine in the standalone execution.
We can figure out if client is sending the proper values or not.
Case 1 : Check in SQL studio
If your using maxdb as your database.
Install the MySQL MAXDB's SQLstudio
After which login into SQL studio with the following configuration
Server : Localhost
Database :midb
User:DBA
password :DBA
After which check for your DO table and check its content.
Thereby check for the instance you have modified.
If here the values have turned blank for value1 and value2 then there is some problem with the coding in the application.
Else u need to further put an external breakpoint and not a session breakpoint of your login(same as the RFC login of the SWCV) and then sync from the client.
Case 2 : Enble sync logs
1. Add the below mentioned two lines in the defaults.properties file of the "client path\settings" folder
com.sap.tc.mobile.sync.dumpInboundInFile = true
com.sap.tc.mobile.sync.dumpOutboundInFile = true
2. After which you can shut down your client and start it again.
3. Now make the update operations on any instance you want.
4. sync.
After sync in the client path a new folder gets created called as "synclogs".
Check in any one of the HttpRequests(Which is of a bigger size) search for ur order id number and check if the client is sencing the updated value 40 along with this.
if the client is sending this properly then u need to further put an external breakpoint and not a session breakpoint of your login(same as the RFC login of the SWCV) and then sync from the client.
You can either check with case1 or case2.
Thanks,
Swarna
Hi Abhishek,
Can you check your Modify BAPI wrapper logic?
How does it behave when you call it in the same way you try to update it on the client?
I mean to say call the Modify BAPI wrapper with the same set of values that you try on the client.
Thanks & Regards,
Abhijit
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
76 | |
9 | |
8 | |
7 | |
6 | |
5 | |
5 | |
5 | |
5 | |
5 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.