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)
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.
3. Provide the details of fields as shown in Screen shot.
Object Type: ZBUS2034, Click on create button.
4. Save the same in a Package.
5. Create a transport request and use the same in the Business object creation.
6. All the functions modules described in the Business Object BUS2034 will appear as shown.
7. Select the method “CreateFromData” and release the status to “To Modified” as shown for the object type.
8. Select the method “CreateFromData” and release the status to “To Implemented” as shown for the object type.
9. Select the method “CreateFromData” and release the status to “To Released” as shown for the object type.
10. Select the method “CreateFromData” and release the object type component status to “To Modified” as shown for the object type.
11. Select the method “CreateFromData” and release the status to “To Implemented” as shown for the object type.
12. Select the method “CreateFromData” and release the status to “To Released” as shown for the object type.
13. Finally, Come back to the main screen and Change the release status to “Released”.
14. Select the “Generate ALE Interface” from the Environment option of Menu in the Transaction “BAPI”.
15. Provide the Business Object name “ZVBUS2034” and select the method as “CREATEFORMDATA.”
16. Click on Create Option.
17. Provide the Message Type as “ZZBAPI_CONTRACT_CREATEFROMDATA”
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
19. Below screen will appears once we are done with the step #17.
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”.
21. Click on Back button. We will be navigated to the below screen.
22. Check the existence of business object “ZBUS2034” In the LSMW after the business object creation and providing the ALE interface.