Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

How to Create BO in BOPF as to hold 3 different Nodes as Transient and Data sharing between the 3 Nodes ?

Former Member
0 Kudos

Hi All,

My requirement :

I have to create a FBI OVP Application, Displaying Search UIBB in the first Section .(Fetches Data from Standard Table)

Below this search UIBB I have to create a List UIBB (Name it as LIST_1) in the Second Section to display Search Result.(This List UIBB has to Tool Bar Actions like 'Delete' & 'MOVE'  . user select a record from the list and click on delete action, Delete action has to remove the Record from the list ).

Below this List UIBB we have another List UIBB (Name it as LIST_2) which Holds the Records Moved from the LIST_1.(User selects a record in LIST_1 and Clicks on action 'MOVE'  the selected record in the LIST_1 has to be Removed and it should be place in the LIST_2 ).

My Development Plan :

Step 1 : Creating a BO of type Controller Object.

Step 2 : Make ROOT Node as Transient Node-->Propose Names for Data structure, combined structure, combined Table type. Provide fields in the data type and Generate Dictionary Objects.

Create LIST_1 and LIST_2 as transient nodes ---> Propose Names for Data structure, combined structure, combined Table type. Provide fields in the data type and Generate Dictionary Objects.

For LIST_1 Create Actions 'DELETE' & 'MOVE'

Question 1) How to code to delete a Record from the LIST_1 in DELETE Action?

Question 2) How to Code to move a Record from the LIST_1 to LIST_2 based on user selection in the LIST_1 in MOVE Action ?

Question 3) Is this Possible to Handle all the 3 nodes in my requirement in a single BO or I Should Create 3 different BO as in my requirement the 3 nodes are independent and in the BO it uses KEY and Parent_Key relation with the SUB Node, Is this possible to handle all the 3 independent nodes in single BO ?

Question 4) If i Create # different BO How can i achieve this Functionality ?

Please Guide me with Your valuable Suggestions.

Thanks in Adv.

Thanks,

Kranthi Kumar.

1 ACCEPTED SOLUTION

0 Kudos

Hello Kranti,

As I understand , you have all the required data in non BO existing standard tables. You now want to represent this data as a business object. What you need is a BO wrapper on this existing data , and a controller object would be one way to achieve this ( in theory ). Or you can create a Business Process Object/Master Data Object  that acts as a BO wrapper ( with its own buffer implementation ) on top of existing data/APIs , see the standard  Business Process Object BO /BOFU/BASIS_APPLICATION_LOG as an example. The Master Data Object /BOFU/BUSINESSPARTNER is another example.

Question 1) How to code to delete a Record from LIST_1 in DELETE Action ?

There is nothing to be done here. The underlying data source for the list is a BO node and the standard Delete action that you get as part of regular CRUD for a BO node will do the job. However note that this delete just deletes the record from the buffer, if this now needs to be translated to an actual delete in the standard table then you need to handle that.

There are two ways to handle the actual update to the table based on how you consume the data from the table. You can do the update within a determination set to Before Save (Before writing data). Or , you can create your own buffer implementation and handle your data manipulation there.

Question 2) How to Code to move a Record from the LIST_1 to LIST_2 based on user selection in the LIST_1 in MOVE Action ?

Add the record to the underlying node for List_2 and remove the record from the underlying node of List_1.Again , this is just buffer data manipulation , the standard tables are not touched , you will need to handle that.

Question 3) Is this Possible to Handle all the 3 nodes in my requirement in a single BO or I Should Create 3 different BO as in my requirement the 3 nodes are independent and in the BO it uses KEY and Parent_Key relation with the SUB Node, Is this possible to handle all the 3 independent nodes in single BO ?

Your BO design depends upon your requirements/use case/functionalities. Is the data related and can be defined as constituent of a single business entity ? If yes , then it should ideally be a single business object. In short , let your functionality decide the scope of your business object. Technical considerations should be secondary.
In addition , remember that too many Business Objects will create a performance overhead.

The use case that you provide is technical and it does not give me enough info  to advise on the scope of the business object(s) you will need to create. From a technical perspective , handling 3 nodes in the same business object to address your use case is very much possible.

Question 4) If i Create # different BO How can i achieve this Functionality ?

I will indulge in this question from a point of technical feasibility. When you have multiple BOs and you want to establish a relationship between them , this is achieved by using Business Object Representation nodes. Business Object Representation nodes enable cross BO associations that establish a relationship between a node of the source BO with a node of the target BO.

Regards,

Indranil.

2 REPLIES 2

0 Kudos

Hello Kranti,

As I understand , you have all the required data in non BO existing standard tables. You now want to represent this data as a business object. What you need is a BO wrapper on this existing data , and a controller object would be one way to achieve this ( in theory ). Or you can create a Business Process Object/Master Data Object  that acts as a BO wrapper ( with its own buffer implementation ) on top of existing data/APIs , see the standard  Business Process Object BO /BOFU/BASIS_APPLICATION_LOG as an example. The Master Data Object /BOFU/BUSINESSPARTNER is another example.

Question 1) How to code to delete a Record from LIST_1 in DELETE Action ?

There is nothing to be done here. The underlying data source for the list is a BO node and the standard Delete action that you get as part of regular CRUD for a BO node will do the job. However note that this delete just deletes the record from the buffer, if this now needs to be translated to an actual delete in the standard table then you need to handle that.

There are two ways to handle the actual update to the table based on how you consume the data from the table. You can do the update within a determination set to Before Save (Before writing data). Or , you can create your own buffer implementation and handle your data manipulation there.

Question 2) How to Code to move a Record from the LIST_1 to LIST_2 based on user selection in the LIST_1 in MOVE Action ?

Add the record to the underlying node for List_2 and remove the record from the underlying node of List_1.Again , this is just buffer data manipulation , the standard tables are not touched , you will need to handle that.

Question 3) Is this Possible to Handle all the 3 nodes in my requirement in a single BO or I Should Create 3 different BO as in my requirement the 3 nodes are independent and in the BO it uses KEY and Parent_Key relation with the SUB Node, Is this possible to handle all the 3 independent nodes in single BO ?

Your BO design depends upon your requirements/use case/functionalities. Is the data related and can be defined as constituent of a single business entity ? If yes , then it should ideally be a single business object. In short , let your functionality decide the scope of your business object. Technical considerations should be secondary.
In addition , remember that too many Business Objects will create a performance overhead.

The use case that you provide is technical and it does not give me enough info  to advise on the scope of the business object(s) you will need to create. From a technical perspective , handling 3 nodes in the same business object to address your use case is very much possible.

Question 4) If i Create # different BO How can i achieve this Functionality ?

I will indulge in this question from a point of technical feasibility. When you have multiple BOs and you want to establish a relationship between them , this is achieved by using Business Object Representation nodes. Business Object Representation nodes enable cross BO associations that establish a relationship between a node of the source BO with a node of the target BO.

Regards,

Indranil.

0 Kudos

Hi Indranil Dutt,

Thanks for your Suggestioins.

I will go with your suggestions, In case if i face any issues i will post a discussion please provide your suggestions.

Thanks,

Kranthi.