Skip to Content
Rules for creating BAPI wrappers are very important for the third party vendor who develop Mobile Applications which runs on SAP Mobile Infrastructure. The BAPI Wrapper rules mentioned in MDK documentation are the design time rules , which means without following those rules SyncBO cannot be created. There are some necessary rules which you should keep in mind while implementing the BAPI wrappers so as to keep the Middleware Replica DB consistent . Your BAPI wrapper should follow these rules in order to get the consistent data on the client device. If BAPI wrapper voilate these rules the MI behaviour would not be as expected( you could encounter Short dump , Error Log , unexpected add/modify/delete on device ).

To understand these rules please go through BAPI Wrapper section of MDK documentation. Click here

Here is a snap shot :
General rule : 1. In case of any error or execution , Bapi wrapper should always fill the “Type” field of return parameter with “E” ,”X” or “A”.
2. If BAPI wrapper is defined in the local system ( the system where SyncBO is created) then return message should always have the mesasge class. If message class is not returned by the BAPI Wrapper ( in case of error ) the outbound return message on worklist monitor will be the unexpected one .

GetList Bapi Wrapper Rules:
·It should never return duplicate header record. ·It should never return any header record with object key as Initial value.

GetDetail Bapi wrapper Rules:
·It should never return initial ( Blank ) object key (r3key) for header record.
·It Should never return the item rows with duplicate object key or initial (Blank) object key.
·Header record object key in the export parameter of getdetail should be always same as the object key of the import parameter at runtime .

Create Bapi Wrapper rules :
·It Should never return Initial (Blank ) object key for Header record .
·It should always return a unique key in other words it should never return a key which already exist in the middleware.
·It should return the error message if the Object Key is already exists in the backend.
·It should always return the header’s object key which is created in the backend.

Modify Bapi Wrapper rules:
·Table Parameter Should contains all the items exists in the backend.(changed as well as unchanged) ·Header data in the export parameter is not required .
·If the header record does not exists in the backend, Bapi wrapper should fill the return parameter with error message .

Delete Bapi Wrapper rules:
·If the record does not exist in the backend, Bapi wrapper should fill the return parameter with error message .

To report this post you need to login first.

Be the first to leave a comment

You must be Logged on to comment or reply to a post.

Leave a Reply