How to Create a Custom Business Object

It is often necessary to create a business object to create/post IDocs of specific objects like SALES Contracts. Most of SAP data migration projects uses LSMW as a tool for data load. Almost all master and transactional data can be loaded with LSMW BAPI/Idoc Option. But, for the business object like sales contracts (BUS2034) cannot be loaded with LSMW BAPI option because of missing BUS object BUS2034 in the business object list.

Step by step procedures for creating a custom business object:

 

1. Go to T-code LSMW. And check for the availability of Business object “BUS2034” in the BAPI method by creating any LSMW( For test)

Create a Custom Business Object in SAP

Once if the system shows the error message” Enter a Valid Value”, we are required to create a Z-Business object for the Object “BUS2034”.


2. For this Process, go to the T-Code “BAPI”.  Select the “Business Object Builder” from the Environment.

SAP Tips: Create a Custom Business Object

3. Provide the details of fields as shown in Screen shot.

Object Type: ZBUS2034, Click on create button.

SAP Tip: Create a Custom Business Object
SAP Help: Create a Custom Business Object

4. Save the same in a Package. 

SAP Tips: Create a Custom Business Object

5. Create a transport request and use the same in the Business object creation.

SAP Business Object Tips

6. All the functions modules described in the Business Object BUS2034 will appear as shown.

SAP Business Object Tip

7. Select the method “CreateFromData” and release the status to “To Modified” as shown for the object type.

SAP Tips and Tricks

8. Select the method “CreateFromData” and release the status to “To Implemented” as shown for the object type.

SAP Screenshots

9. Select the method “CreateFromData” and release the status to “To Released” as shown for the object type.

SAP Custom Business

10. Select the method “CreateFromData” and release the object type component status to “To Modified” as shown for the object type.

Create a Custom Business Object in SAP

11. Select the method “CreateFromData” and release the status to “To Implemented” as shown for the object type.

Create a Custom Business Object in SAP

12. Select the method “CreateFromData” and release the status to “To Released” as shown for the object type.

SAP Custom Business Objects

13. Finally, Come back to the main screen and Change the release status to “Released”.

Business Object SAP

14. Select the “Generate ALE Interface” from the Environment option of Menu in the Transaction “BAPI”.

Business Object SAP

15. Provide the Business Object name “ZVBUS2034” and select the method as “CREATEFORMDATA.”


16. Click on Create Option.

SAP Business Object

17. Provide the Message Type as “ZZBAPI_CONTRACT_CREATEFROMDATA” 

SAP Business Objects

18. Create a package “ZOTC”, Function Group “ZBUS2034” and fill the details for the fields as shown.

IDOC Type: ZZBAPI_CONTRACT_CREATEFROMDA01

Function Module for ALE Outbound Processing: ZZZALE_CONTRACT_CREATEFROMDATA

Function Module for ALE Inbound Processing: ZIDOC_INPUT_ZZBAPI_CONTRACT_CR

Function Group: ZBUS2034

Package: ZOTC

Creating Business Objects in SAP

 19. Below screen will appears once we are done with the step #17.

Creating Business Object in SAP

20. Click on the IDoc Type “ZZBAPI_CONTRACT_CREATEFROMDA01” in the above screen and we will be navigated to the below screen. Go to Edit in the Menu, Click on “Setrelease”.

Creating Business Object SAP

21. Click on Back button. We will be navigated to the below screen.

How To Create a Custom Business Object in SAP

22. Check the existence of business object “ZBUS2034” In the LSMW after the business object creation and providing the ALE interface.

Creating Business Objects SAP