Skip to Content
avatar image
Former Member

SUP 2.2.5 + Offline BAPI Error Handling

Dear All,

Following is my Offline Transaction scenario where I require help.

Use Case:

MBO created on a Z BAPI that is Creating a GR (Goods Receipt) in SAP ERP. BAPI output contains Error Return Table as well that helps us in finding any error that is thrown from SAP.

Successful Scenario:

We create one GR in offline mode and call create() and submitPending() method of the MBO. When connected again and SYNC, it successfully CREATE the GR if there is no Error and I will get a new Document Number. Also, it returns error in Error Return Table if there is any error. We get it by calling the findAll() method on the MBO.

Problem Scenario:

We create two or more GRs in offline Mode and call create() and submitPending(). Now Sybase Unwired Platform has two pending Items. When connected again and SYNC, it only returns the LAST successful OR unsuccessful GR record in the findAll(). We lost the other items statuses. We might get the successful items from GR_LIST MBO but any pending items that has ERROR will be lost.

Is there any way in SUP that I can individually Sync pending items OR get the status of all Pending items after Sync?

Is this a default behavior of SUP that it flushes all the pending Items at once and ONLY returns the last item status in the Original MBO?

Looking forward for a quick and favorable response.

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

2 Answers

  • Best Answer
    Apr 25, 2014 at 01:51 PM

    The MBO operations output is is not supported in SUP. Given below discussions gives more information ,

    An alternative solution that I can give you:

    1. Create an MBO using the BAPI used for operation, do not create an operation.
    2. Keep the input and output of MBO/BAPI as tables (stuctures).
    3. Call synchronize("sync_grp"); whenever you want to do operation, hence the operation RFC will be called. Make sure you are keeping this MBO in a separate sync group. Pass the input of the operation to the table using personalization keys. ie create PK of table/structure type and fill PK before sync fromĀ  mobile.
    4. Before making a sync call check whether device has internet connectivity. If there is no connectivity store the user entered values locally in device (ex. in SQLite). Keep a button to sync pending operations when the device comes online by the user.
    5. If the device is online do the sync. After successful sync make a findall query to get the output of operations. Since the output is a table all operations output messages can be found. In the BAPI output table keep a column for success/failure, based on that operation results can be identified.

    Midhun VP

    Add comment
    10|10000 characters needed characters exceeded

    • Former Member

      Thank you Midhun,

      This is the only approach that comes to my mind also.

      It will give us more control over Sybase way of doing pending items approach.

  • avatar image
    Former Member
    Nov 30, 2014 at 12:08 AM

    This message was moderated.

    Add comment
    10|10000 characters needed characters exceeded