cancel
Showing results for 
Search instead for 
Did you mean: 

BOPF associations to non persisted data, with SADL

0 Kudos

I'm learning about BOPF and using it with a Fiori Elements List Report/Object page. (EHP7 SP17, SAP Netweaver 7.4.20, FES 4.0)

I've been successful in creating a BOPF object to manage a single root node all the way to my List Report. But if the application needs to also load data (not a single table, but views) relevant to the root node record for the end user to just see (not manage), how does that work?

For example, my root node has a part number and maybe they want to see additional relevant part information.

I can't use a transient node because you can't map transient data from BOPF to an entity in your odata service. Right?

My thoughts are I need this relevant data in the BO because I may need it to build logic for a determination.

With just CDS i would build the view and associate it. I did that with this same list report and showed multiple associated tables on my object page. But with BOPF I'm struggling to find the right path.

Accepted Solutions (0)

Answers (1)

Answers (1)

samson_moses
Explorer
0 Kudos

Hi Timothy,

I would suggest you follow this way :

1. Create a base view, (ZB_MAIN) without any object modelling annotations , with joins on the base table(eg: ZTMAIN) relevant tables to build your additional data ( Eg: Part number description, etc )

2. On top of this, build the BOPF modelling CDS View(lets call this as Interface View) ZI_MAIN. This should have the object Modelling annotations like transactional capabilities(TransactionalProcessingEnabled = true, CreateEnabled, DeleteEnabled). Map all fields which are just for read-only purpose with @ObjectModel.readOnly. Set the WriteActivePersistance to the base table ZTMAIN.

3. Finally build the consumption CDS View (ZC_MAIN), which will have the UI relevant fields with their respective naming conventions and UI specific annotations.

Apply the same for the associated CDS Views / nodes. This was you will not have error of activation the OData service and also your BOPF nodes still represent the core structure and no determination is needed for the additional fields.

Regards,

Samson.