on 09-04-2012 5:29 PM
I have created some MBOs based on custom BAPI/FM's and the You have a custom "Z" table in SAP (lets call it ZCUSTOMER). Now, when I am in SUP, and ready to create an MBO, should I If I create the MBO based on ZUPDATE_CUSTOMER, the mbo will A lot of the examples I have read regarding MBO creation, Creating an MBO from a FM/BAPI (other then one that strictly I am an ABAPer turned SUPer (recently) so maybe I am missing Would like to here what you other ABAPers are doing out Thanks, Mike |
Hi,
Creating an operation on a BAPI and linking that operation to another BAPI will help but not in all the scenarios.
Lets say for example you have two Custom BAPI's Z_A and Z_B.
Z_A has input parameters a_a,a_b,a_c and it returns a table as an output containing many fields say name,lname,address,state,city,id,sex etc
Z_B is a create operation in the RFC. If you create an operation named CustomCreateOperation on the MBO created from Bapi Z_A and bind that operation with Z_B it will work fine.
But say in case of a scenario that Z_B has an input as a structure and it gives out a string as output for the values posted in the structure..For eg you are trying to Create a GR for a PO from device.
ABAP people might know that for every posting we generate material document and for blank data no material document is generated.
If you are using a custom operation first difficulty you will encounter is that you will never see the output parameter of the MBO referenced to Z_B created from the operation in the generated code and somehow if you are doing some up and down and seeing that thing you will never be able to read it synchronously.
Try it out keeping a debugger at the BAPI. It will always be called twice.Once with the data that you pass and second one with blank value and the time between the call will be so instant that you wont be able to read the material doc no generated in between.
Try it out.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Mike,
these are interesting questions. I am facing the same problems at the moment.
From my point of view the whole MBO design originally was designed for SQL databases. Therefore an UPDATE FM does not fit into the concept very nicely.
I think you should create a seperate READ FM for every UPDATE operation.
Currently I am trying to read service orders from SAP. Because they are very complex I need to replicate them to the SUP and synch only relevant orders to the mobile clients. But at the moment I have no clue how to model the MBOs for best performance because I need many MBOs for one service order and they have to be replicated together.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Mark,
I did get in contact with someone from Sybase regarding this, basically this is what I found out...
When you create an MBO from an SAP BAPI (let say in this case it updates a table and returns a success/fail message), then you are basically locked into using the default findAll query as this will allow SUP to return your message. The Sybase resource agreed with me that this seems a little strange but for now this is what we have.
There are many cases where I do not want to create a "Read" BAPI for an app, and I guess the above is the solution ... for now
Here's hoping new versions of SUP address MBO creation from SAP BAPIs.
-Mike
I think it's rare that you would only "create" an entity from a mobile app, without ever doing a "read".
The pattern is typically:
1) Retrieve a list of items.
2) Drill down into a specific instance to view the details
3) From there, click an Edit button to enable the fields for editing;
4) Or - select it from the list and delete it;
5) Or - click a "New..." button to navigate to an empty detail screen and fill in the required fields.
Therefore, I would offer this alternative.
Create the MBO from a getList BAPI. That gives you your "read" operation. If you have BAPIs that do create/update/delete operations, add those as operations on that same MBO. That's much more object-oriented than creating an entirely separate MBO for the "create" operation...
-Paul Horan-
SAP Global Mobility SWAT
User | Count |
---|---|
80 | |
9 | |
9 | |
7 | |
7 | |
6 | |
6 | |
6 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.