Sunday, February 28, 2021

BOL Vs GENIL..(SAP CRM)

 BOL:

The BOL layer provides a consistent interface to access the business objects APIs or the underlying data fetching APIs using the GENIL framework. The BOL object uses the object oriented approach to access the model. So whether you are accessing a standard object or an enhanced object, you don’t have to worry. All you need to know is the name of the Context, Context Node and then you are good to go. Tomorrow even if there is an implementation change you are not affected as the interface over which you have written your data fetch logic remains the same. This is very good advantage over the conventional programming where the business logic is present in the UI itself.
The BOL also acts as the buffer for the UI.
 BOL layer is thus specifically built by SAP specifically for SAP CRM Web UI and is available only at the runtim
e.


GENIL:

GENIL is the generic interaction layer which provides you access to the business logic which is present in the Business object. As compared to BOL, GENIL can also be used for scenarios other than the Web UI.
Consider the case where a user wants to execute a web service to fetch some data in a non Web UI scenario. In this case there is no need for BOL layer at all. You can directly connect to the GENIL Layers and fetch the needed data. In case of Web UI scenarios, we would need to use both GENIL & BOL Layers.
The GENIL represents the model of the component that you are planning to use. During the design time, you prepare a model for the GENIL. The objects involved in GENIL are specified in the Object Tables and the model tables. GENIL would be represented by an ABAP class and the object table and model table are specified in the programming so as to realize the actual model. This model can be depicted in design time using the GENIL_MODEL_BROWSER
 
GENIL at run time is needed to fetch the data from the Business objects or the underlying APIs. If you want to test the GENIL runtime behavior, use GENIL_BOL_BROWSER. As the name suggests, this involves both the GENIL & BOL layers because this is a developer tool provided by SAP to test the backend functionality in case of Web UI scenarios.


a) SET_PROPERTY -> This method on the entity is used to make changes in the BOL Buffer level.

b) MODIFY-> This method on BOL CORE is used to flush the changes from BOL BUFFERS to GENIL BUFFERS.

c) COMMIT -> This method on Transaction Context is used to persist the changes from the BOL Buffer to the BO tables. The GENIL Buffers would be cleared after this.

d) ROLLBACK -> This method on Transaction Context is used to reject the changes on the GENIL Buffers. This would also clear GENIL buffers.


No comments:

Post a Comment

BOL Vs GENIL..(SAP CRM)

 BOL: The BOL layer provides a consistent interface to access the business objects APIs or the underlying data fetching APIs using the GENIL...