cancel
Showing results for 
Search instead for 
Did you mean: 

How to call Bapi Wrapper in java class

Former Member
0 Kudos

in the java class , how do we call the SyncBo for the specific Bapi Wrapper function

for instance, if i click the link then i want to pass in parameter to the specific Bapi wrapper and return the result ,

eg: click the link of employeeid to link to specific employee detail records

so i need to call bapi wrapper - getDetails

pls advice

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

Hi,

MI client Framework is based on MVC Architecture.

Modal- JavaBeans

View - JSP

Controller-Servlet

When we create the Smart Sync project using Netweaver developer studio, five java files are

generated.

Constants: All Program constants are defined here.

SmartSyncServlets:Central servlet that receives http request evaluates user action, requests table data from TableContentProvider, fills TableViewBean with this data and dispatches to JSP.

TableViewBean: Bean used for data transport between servlet and JSPs.

SmartSyncDBAccess: All calls into Smart Sync API are done here and used for storing/retrieving the data from/to the backend.

TableContentProvider:Acts as a mediator between the TableView bean and SmartSyncDBAccess. Packs the data it requested from SmartSyncDbAccess into a Vector that matches the form of the JSP table

Whenever the event occurs, that should hit the Servlet and request the data to/from SmartSyncDBAccess through TableContentProvider. These data is transported from the Servlet to JSP through TableViewBean.

SmartSyncDBAccess uses MI API to store the data. please refer this link

https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/com.sap.km.cm.docs/library/mobile/mobile%20infrast...

These Client MI API's access the SyncBo's only through the meRepMeta.XML. Hence SyncBO's inturn calls the BAPI warppers based on the request from the Mobile device.

Hope this is helpful

Best Regards,

Lakshmi

Former Member
0 Kudos

i not just want the explaination, but the coding in java class

i am very new to MI...

for instance, if we want our application to call the module function in R/3 we normally we use JCO Connector by setting the import parameter or table parameter list to call the JCO Function

after that the JCO will return a parameter list or table list to us.

we will need to <b>setValue("value",fieldname) </b> to pass in the parameter

and we will use <b>getValue("value",fieldname) </b>to get the result;

if we want to pass the parameter to the specific syncBO with the particular bapi wrapper function , in term of coding , how we could do that ?

in generic sync, there is something or inbound and outbound, how about smart sync, how they communicate with R/3 SYNCBO -> BAPI WRAPPER

http://i192.photobucket.com/albums/z231/yzme/page1.jpg

http://i192.photobucket.com/albums/z231/yzme/page2.jpg

http://i192.photobucket.com/albums/z231/yzme/page3.jpg

page 2 (GetList)and page 3(GetDetail) is same,

i expect that page 3 should list the detail of the items such as price code, stock in hand , discount

Message was edited by:

yzme yzme

Former Member
0 Kudos

Hi,

<<-- in generic sync, there is something or inbound and outbound, how about smart sync, how they communicate with R/3 SYNCBO -> BAPI WRAPPER-->>

BAPI WRAPPER's are called by SYNCBO's. These SyncBO are declared in the MeRepMeta.XML. Hence you have Specific MI API's to access these SyncBo's which are declared in the MeRepMeta.XML.

These MI API are declared only in java file SmartSyncDBAccess.

Some of the API commomly used by SamrtsyncDDAcess uses are

SyncBoDataFacade -- Used for Data Access

SyncBoDescriptorFacade -- Used for meta-data access

SyncBoDescriptor -- Describes the meta-data description of SyncBO

RowDescriptor -- Describes the meta-data description of Row of particular syncBo

For more details on API, kindly go refer these links

For API’s

https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/com.sap.km.cm.docs/library/mobile/mobile%20infrast...

Also refer this link

<<-- i expect that page 3 should list the detail of the items such as price code, stock in hand , discount-->>

Have you declared the child items in the MeREpMeta.XML for your SyncBO's??

Hope this helps,

Best Regards,

Lakshmi

Former Member
0 Kudos

Have you declared the child items in the MeREpMeta.XML for your SyncBO's??

can you tell me how to do this, or provide me a sample / reference