May 01

Custom BOPF Business Object

By the end of this blog, you will be able to..

  1. Create a business object, include a root node
  2. Create a sub node to root node
  3. Create an action on a node
  4. Implement a simple action based on the BOPF API
  5. Create a sub node as “Delegation” using dependent objects /BOBF/TEXT_COLLECTION and /BOBF/ATTACHMENT_FOLDER
  6. 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)
  • 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:2017-04-29 11_01_18- - Remote Desktop Connection

Now lets try to “Create a sub node as Delegation“:

Right click on Root node to create Delegated node:

2017-04-29 11_01_56- - Remote Desktop Connection

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:

2017-05-01 14_26_24- - Remote Desktop Connection

Note: The node prefix is used by BOPF at run time in order to identify the Dependent Object which is called by the consumer.

2017-04-29 11_03_48- - Remote Desktop Connection

Business object look like below after saving and activating. Node “ROOT_LONG_TEXT” is created under ROOT node and corresponding associations are also generated.

2017-04-29 11_04_19- - Remote Desktop Connection

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

2017-04-29 11_06_41- - Remote Desktop Connection

Create Text schema:

2017-04-29 11_24_58- - Remote Desktop Connection

Assign Text Type to Text Schema:

2017-04-29 11_25_10- - Remote Desktop Connection

Assign Text Schema to Business Object:

2017-04-29 11_25_35- - Remote Desktop Connection

Test environment (BOBT):

Add record to the ROOT node and save..

2017-04-29 11_26_34- - Remote Desktop Connection

As there is association relation between ROOT and ITEM, We can add multiple records to ITEM node.

2017-05-01 15_01_21- - Remote Desktop Connection

2017-04-29 11_27_27- - Remote Desktop Connection

Execute the Action “PUBLISH” to check whether QUOTE_STATUS changes to “P – Published”

2017-04-29 11_27_52- - Remote Desktop Connection

2017-04-29 11_28_09- - Remote Desktop Connection

In the same way, Add long text also..

2017-04-29 11_28_33- - Remote Desktop Connection

2017-04-29 11_29_44- - Remote Desktop Connection

2017-04-29 11_31_03- - Remote Desktop Connection

Now, I will add another delegated node to handle attachments using dependent BO /BOBF/ATTACHMENT_FOLDER:

2017-05-01 15_23_16- - Remote Desktop Connection

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..

2017-04-29 11_47_50- - Remote Desktop Connection

Assign Attachment Type to Attachment Schema:2017-04-29 11_48_51- - Remote Desktop Connection

Assign Attachment schema to Business Object Node2017-04-29 11_49_14- - Remote Desktop Connection

Add MIME types on Business object nodes (Specifies the type of files that can be attached)2017-04-29 11_49_41- - Remote Desktop Connection

Test and make sure the attachment node is working fine using BOBT transaction code.