cancel
Showing results for 
Search instead for 
Did you mean: 

“Create” operation between MBOs and BAPIs

0 Kudos

Hi,

I have 2 MBOs, Customer and SalesOrder with one-to-many relationship, composite and bidirectional flags set. The “Create” operation for each MBOs is mapped to the BAPI passing each of the corresponding MBO structure as parameters.

the following behavior is observed

  1. BAPI Call: Create “Customer ” passing the data of the “customer” MBO as parameter and null for the data on “SalesOrder ”
  2. BAPI Call: Create the first “SalesOrder ” passing the data of the first “SalesOrder ” MBO as parameter and null for the data on Customer
  3. BAPI Call: Create the second “SalesOrder ” passing the data of the second “SalesOrder ” MBO as parameter and null for the data on Customer

Is this the correct behavior ?

How can I achieve this with one call to BAPI? I would like to minimize the amount of service calls to backend.

Thank you in advance

Regards,

Michael

Accepted Solutions (0)

Answers (2)

Answers (2)

midhun_vp
Active Contributor
0 Kudos

What type of app you are developing, native or hybrid  web ?

Also i don't understand your requirement. Do you want to fetch data for both MBO in single call.

- Midhun VP

0 Kudos

Hi,

Its HWC app. SUP 2.1.3

I would like to make a single call with "create" operation.

Right now it makes 1 call for Customer and 1 for each SalesOrder.

I learned that in 2.2 there is support for "composite" operations, which result in one call.

Optimally I would like to call the BAPI once.

Regards,

Michael.

vladimir_erakovic
Contributor
0 Kudos

Hi Michael,

If you use one BAPI you can make MBOs to be part of the same load group.

For more information look at this document describing just that for read data:

http://scn.sap.com/community/developer-center/mobility-platform/blog/2013/10/26/step-by-step-tutoria...

I didn't try yet but if you check store data on the device cache, and when create everything you want, then use Online request for create or Submit. I'll try something similar litlle later.

Regards,

Vladimir