cancel
Showing results for 
Search instead for 
Did you mean: 

Object Model Annotations in CDS Views without corresponding BOPF Objects

0 Kudos

Hi Experts,

I have been looking at the ABAP Programming model for Fiori and it looks fantastic. Finally we have something as complex as SAP itself. 🙂

As I have understood the new ABAP Programming model for Fiori, we have CDS Views of various types which contain Field level information, associations, BOPF, UI and Analytics related Annotations, which gets exposed as an oData Service and then into Fiori.

I am looking at a CDS Views I_SalesDocument in S/4 HANA system. Here I see some Object Model Annotations, even a CompositionRoot, but I “Do not” see :

1)A corresponding BOPF object in /n/BOBF/CONF_UI

2)The Annotation @ObjectModel.transactionalProcessingEnabled

Could you kindly explain, in what situations, could we require a BusinessObject Annotation, except a Transactional scenario with CRUD operations ?

Many thanks for your reply in advance.

Accepted Solutions (1)

Accepted Solutions (1)

freilinger
Participant
0 Kudos

Hi Prateek,

I am not sure if I understood your question correctly...

If you want to have some sort of transactional processing this is exactly the situation, where you want to have business objects to help you dealing with your C(R)UD operations. In case you have only analytical scenarios or use cases, where you only want to read data, you don't need the ObjectModel annotations, as you don't need a Business Object or the BOPF Framework in those situations from my point of view.

As a side note, there is no BO generated by your CDS View as you did not enter all necessary ObjectModel annotations to achieve this.

I hope I could help you out a little - best regards,

Sebastian

Answers (2)

Answers (2)

rudramani
Participant

Well BOPF objects are really handy in case of CRUD operation. Read operation is possible without BOPF implementation. You can view and edit your Business Objects created at transaction BOBX . These object models can be also used for association. You can enter these codes to enable the Create, Update and Delete operation on your table:

@ObjectModel:{
  modelCategory : #BUSINESS_OBJECT,
    compositionRoot : true,
    transactionalProcessingEnabled : true, "It enables the transactional process
    createEnabled : true,
    updateEnabled : true,
    deleteEnabled : true,
    writeActivePersistence: 'Your Table Name'
    }
0 Kudos

Hi Rudra,

Thank you so much for the detailed explanation.
It is really helpful.

Thanks and Regards,

Urvashi Tibrewal

former_member55862
Participant
0 Kudos

Hi! Rudra,

I am not able to see corresponding object in transaction BOBX and also in the CDS below message is shown.

Can you advise?

Regards,

AQIB

0 Kudos

Thanks Sebastian for looking at my query. Then I think I can assume CDS Views I_SalesDocument in S/4 HANA system in Work in progress by SAP. I also had the same idea as you when I had tried to figure it out but then I saw a apecific View from SAP, which I said in my Question :

I am looking at a CDS Views I_SalesDocument in S/4 HANA system. Here I see some Object Model Annotations, even a CompositionRoot, but I “Do not” see :

1)A corresponding BOPF object in /n/BOBF/CONF_UI

2)The Annotation @ObjectModel.transactionalProcessingEnabled

Thorsten_Franz
Explorer
0 Kudos

Hi Prateek,

The ObjectModel.compositionRoot annotation has a significance outside BOPF objects - in a pure SADL context. It influences the inclusion of other views which are part of the composition hierarchy (with ObjectModel.association.type) in OData services when OData.publish is used in a consuming compositon view (which in this case would probably be a consumption view) or a metadata extension. A consumption view could also BOPF-enable the entity from the interface view and use the ObjectModel.association.type annotations with VIEW scope of the underlying interface view. The ObjectModel.compositionRoot in the interface view is perhaps not effective per se but required to prevent error messages from the ObjectModel.association.type annotations.

Cheers,

Thorsten