Sybase NNTP forums - End Of Life (EOL)

The NNTP forums from Sybase - forums.sybase.com - are now closed.

All new questions should be directed to the appropriate forum at the SAP Community Network (SCN).

Individual products have links to the respective forums on SCN, or you can go to SCN and search for your product in the search box (upper right corner) to find your specific developer center.

MBO creation with custom ABAP BAPI/FM - Best Practice??

2 posts in General Discussion Last posting was on 2012-09-04 21:10:07.0Z
Mike R Posted on 2012-08-31 22:55:48.0Z
Sender: 4160.504113cb.1804289383@sybase.com
From: Mike R
Newsgroups: sybase.public.sup.general
Subject: MBO creation with custom ABAP BAPI/FM - Best Practice??
X-Mailer: WebNews to Mail Gateway v1.1t
Message-ID: <504140f4.4edd.1681692777@sybase.com>
NNTP-Posting-Host: 172.20.134.41
X-Original-NNTP-Posting-Host: 172.20.134.41
Date: 31 Aug 2012 15:55:48 -0700
X-Trace: forums-1-dub 1346453748 172.20.134.41 (31 Aug 2012 15:55:48 -0700)
X-Original-Trace: 31 Aug 2012 15:55:48 -0700, 172.20.134.41
Lines: 39
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub sybase.public.sup.general:1082
Article PK: 1020158

I have created some MBOs based on custom BAPI/FM's and the
apps work fine. The question I have is more around the setup
of your MBOs. Consider this situation:

You have a custom "Z" table in SAP (lets call it ZCUSTOMER).
You write a custom BAPI/FM (call it ZUPDATE_CUSTOMER) that
takes in a customer number and name and updates the name
with the name that was input (I know this is dumb but stay
with me).

Now, when I am in SUP, and ready to create an MBO, should I
be first creating another BAPI/FM to just strictly read the
ZCUSTOMER table, as it seems that SUP wants to base its MBO
creation off of a read rather then an update? Then create an
Operation on the MBO that would use my ZUPDATE_CUSTOMER?

If I create the MBO based on ZUPDATE_CUSTOMER, the mbo will
work fine, it looks a little strange when I am designing the
app itself b/c I can actually call the generic "findAll" and
it invokes my FM/BAPI and does an update.

A lot of the examples I have read regarding MBO creation,
shows creating an MBO based off of a table, then creating
your operations (via SQL usually). This makes sense to me
b/c the table represents the data. Obviously not something
you want to try in SAP though.

Creating an MBO from a FM/BAPI (other then one that strictly
does reads) does not seem to be a best practice to me?? On
the other hand, I do not always want to have to create a
custom read BAPI/FM every time I create an MBO.

I am an ABAPer turned SUPer (recently) so maybe I am missing
something here.

Would like to here what you other ABAPers are doing out
there.

Thanks, Mike


Mike R Posted on 2012-09-04 21:10:07.0Z
Sender: 4340.50460ec6.1804289383@sybase.com
From: Mike R
Newsgroups: sybase.public.sup.general
Subject: Re: MBO creation with custom ABAP BAPI/FM - Best Practice??
X-Mailer: WebNews to Mail Gateway v1.1t
Message-ID: <50466e2f.61dd.1681692777@sybase.com>
References: <504140f4.4edd.1681692777@sybase.com>
NNTP-Posting-Host: 172.20.134.41
X-Original-NNTP-Posting-Host: 172.20.134.41
Date: 4 Sep 2012 14:10:07 -0700
X-Trace: forums-1-dub 1346793007 172.20.134.41 (4 Sep 2012 14:10:07 -0700)
X-Original-Trace: 4 Sep 2012 14:10:07 -0700, 172.20.134.41
Lines: 55
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub sybase.public.sup.general:1085
Article PK: 1020155

I did some testing with this ... instead of creating my
screens manually, I did the mbo drag and drop method just to
see how SUP would set up the call to my mbo. When I did
this the "Submit" function was set to "Invoke Parent Update"
rather then operation or query. So my thoughts now are that
when using custom BAPIs they would like us to use the
"parent update" option. This makes a little more sense.

Just and update ... still would like to hear what other
ABAPers are doing.

-MikeR

> I have created some MBOs based on custom BAPI/FM's and the
> apps work fine. The question I have is more around the
> setup of your MBOs. Consider this situation:
>
> You have a custom "Z" table in SAP (lets call it
> ZCUSTOMER).
> You write a custom BAPI/FM (call it ZUPDATE_CUSTOMER)
> that takes in a customer number and name and updates the
> name with the name that was input (I know this is dumb but
> stay with me).
>
> Now, when I am in SUP, and ready to create an MBO, should
> I be first creating another BAPI/FM to just strictly read
> the ZCUSTOMER table, as it seems that SUP wants to base
> its MBO creation off of a read rather then an update? Then
> create an Operation on the MBO that would use my
> ZUPDATE_CUSTOMER?
>
> If I create the MBO based on ZUPDATE_CUSTOMER, the mbo
> will work fine, it looks a little strange when I am
> designing the app itself b/c I can actually call the
> generic "findAll" and it invokes my FM/BAPI and does an
> update.
>
> A lot of the examples I have read regarding MBO creation,
> shows creating an MBO based off of a table, then creating
> your operations (via SQL usually). This makes sense to me
> b/c the table represents the data. Obviously not something
> you want to try in SAP though.
>
> Creating an MBO from a FM/BAPI (other then one that
> strictly does reads) does not seem to be a best practice
> to me?? On the other hand, I do not always want to have to
> create a custom read BAPI/FM every time I create an MBO.
>
> I am an ABAPer turned SUPer (recently) so maybe I am
> missing something here.
>
> Would like to here what you other ABAPers are doing out
> there.
>
> Thanks, Mike