views:

296

answers:

3

First I have to clarify that I'm not referring to the company Business Objects recently acquired by SAP. Instead I'm referring to business objects as defined in the SAP Business Object Repository (BOR), e.g. SalesOrder (BUS2032).

So what would be the preferred approach to serialize such a business object in the SAP system so that a third party system could deserialize the business object including all attributes that make up a specific business object instance?

A: 

I don't know of a simple way to serialize BOR objects. However in many cases SAP have provided BAPI's that are Remote Enabled Function modules that can be called via the various SAP connectors or SOAP etc.

Taking BUS2032 as an example:

  • Run transaction SWO1
  • Enter BUS2032
  • Click the Program button
  • Search on call function 'BAPI

You will find various BAPI's - in this case they all belong to function group 2032 that can be accessed via transaction SE80

Note that SAP is not always this accomodating in their naming standards, but the more mature the module the better the chance that they've already made some form of RFC or Webservice available for the module.

Of course you can also write your own RFC or webservice, but then you need to understand the business model and which attributes are needed.

Esti
This would allow the caller to get the data out of the R/3 system, but it would be in a SAP-defined, structured format and not in a "serialized" format.
IronGoofy
True - I don't know of a simple way that SAP will serialize the BOR objects for you.
Esti
BAPI's are the methods exposed by SAP allowing to alter a business object. Another feature of business objects are events allowing to notify a receiver about changes to a business objects.The latter would be of more interest in this context but by default usually notifies the receiver about state changes only and includes the business objects key fields only. When the receiver is a remote system, this is insufficient to recreate the business object including all its attributes.
Tom
A: 

The SAP Business Connector uses XML documents to exchange SAP objects (between SAP and non-SAP systems). Maybe you can find some help in this article.

IronGoofy
The webMethods SAP Adapter (aka SAP Business Connector) works at the ALE, BAPI, RFC layer. It supports SAP's proprietary EDI and RPC formats. It does *not* support out of the box business object serialization.
Tom
A: 

According to this article you need to use the IF_SERIALIZABLE_OBJECT interface. I'm guessing your business object doesn't already implement that interface so you may have to extend it to a custom business object and implement the IF_SERIALIZABLE_OBJECT interface there.

BenV