
Custom BOPF Business Object
By the end of this blog, you will be able to..
- Create a business object, include a root node
- Create a sub node to root node
- Create an action on a node
- Implement a simple action based on the BOPF API
- Create a sub node as “Delegation” using dependent objects /BOBF/TEXT_COLLECTION and /BOBF/ATTACHMENT_FOLDER
- Test the functions of the new business object
Note: Important transaction codes while working with BOPF:
- BOB – Business Object Builder
- BOBF
- BOBX – Business Object Builder (Expert)
- /BOBF/CONF_UI
- BOBT – BOPF Test environment
Refer the SCN document under below link for getting started with BOPF
Getting Started with Business Object Processing Framework
By following the steps in above document, I have covered below aspects:
- Create a business object, including the root node
- Create a sub node to root node
- Create an action on a node
- Implement a simple action based on the BOPF API
Below screenshot shows the business object that I have created:
Now lets try to “Create a sub node as Delegation“:
Right click on Root node to create Delegated node:
Provide node name, node prefix, node type as “Delegated node”, under “Cross BO Relationship” select “Ref. Business Object” as /BOBF/TEXT_COLLECTION.
We can choose from the available Dependent Objects:
Note: The node prefix is used by BOPF at run time in order to identify the Dependent Object which is called by the consumer.
Business object look like below after saving and activating. Node “ROOT_LONG_TEXT” is created under ROOT node and corresponding associations are also generated.
Before we test this delegated node, lets make few settings in SPRO to link business object with text types:
SPRO »» Cross-Application Components »» Reusable Objects and Functions for BOPF environment »» Dependent Object Text Collection
Create Text schema:
Assign Text Type to Text Schema:
Assign Text Schema to Business Object:
Test environment (BOBT):
Add record to the ROOT node and save..
As there is association relation between ROOT and ITEM, We can add multiple records to ITEM node.
Execute the Action “PUBLISH” to check whether QUOTE_STATUS changes to “P – Published”
In the same way, Add long text also..
Now, I will add another delegated node to handle attachments using dependent BO /BOBF/ATTACHMENT_FOLDER:
To make it work, I will again make few settings in SPRO
SPRO »» Cross-Application Components »» Reusable Objects and Functions for BOPF environment »» Dependent Object Attachment Folder
Create Attachment type and Attachment schema if required..
Assign Attachment Type to Attachment Schema:
Assign Attachment schema to Business Object Node
Add MIME types on Business object nodes (Specifies the type of files that can be attached)
Test and make sure the attachment node is working fine using BOBT transaction code.
Pingback: Create Alternative Key/Validation (BOPF) | Technical Concepts in SAP
Pingback: Create Determination – BOPF | Technical Concepts in SAP
Pingback: Integrate SAP FPM and BOPF | Technical Concepts in SAP
Bahi nice Article 🙂
LikeLike