Technology Blogs by Members
Explore a vibrant mix of technical expertise, industry insights, and tech buzz in member blogs covering SAP products, technology, and events. Get in the mix!
cancel
Showing results for 
Search instead for 
Did you mean: 
dhiraj_more
Participant
Hello Everyone,

I searched for some blogs on how to extend standard fiori apps which is based on CDS BOPF and Fiori Elements but didn't found anything. There is plenety of material on custom app creation based on CDS, BOPF and Fiori element but nothing on extension.

Pre-Requisite :: One should have knowledge on CDS,BOPF generated from CDS, ODATA and Fiori elements.

Requirement :: I want to extend Standard Fiori App “Manage Purchasing Info Records” to add below fields.

  1. Country of Origin(EINA-BSTAE)

  2. Production Version(EINE-VERID


Standard App Screen without extension as follows:




  1. Supplier Country of Origin field as shown below in UI after extension



   2.Need to add Production Field as shown below in UI after extension


 

Application Description  ==>  Manage Purchase Info Record is transactional app based on Fiori Elements where Create/Update/Delete is supported by BOPF Object I_PURGINFORECORDWWITHDRAFT generated from CDS.

  • BOPF Object ==> I_PURGINFORECORDWWITHDRAFT

  • Transactional CDS Root View ==> I_PURGINFORECORDWWITHDRAFT

  • Consumption CDS View in ODATA ==> C_PURINFORECORDWITHORG

  • Draft Class ==> CL_I_DR_PURGINFORECORDWWITHDRA responsible for Creation and update of Info records



Analysis ==> We did initial analysis as given below.

  1. We found that Country of Origin is part of Transactional CDS and BOPF Object. Therefore create, update for field is supported by underlying business object. But field is not added in consumption view. Hence field is not available in UI app.


          Solution ==> Add field in Consumption CDS view C_PURINFORECORDWITHORG to appear in UI


2. Production Version field is not present in consumption, transactional CDS and BOPF Object. Thus Create/Update of field need to be handled explicitly.

Solution ==> Please follow the below steps.

a. Extend transactional view I_PURGINFORECORDWWITHDRAFT to include Production Version field using association with EINE table


b. Next, we need to add these field in underlying draft structure and draft table explicitly.

  • Add field to draft table





  • Add field to draft structures




c. Now we need to make changes in Draft class wither using Implicit enhancement or Pre-Exit or Post Exit method. I have not done changes because of Approval issues. But that is normal ABAP


d. Extend the consumption CDS to add Production field to expose in UI.

Note: ODATA redefinition is not needed as we just have to add extra fields which is possible from consumption CDS. If we have to add new entity then we have to redefine the project.

Conclusion :: If custom field is not present in transactional and consumption CDS then we have to add field from scratch in transactional CDS, Draft table and it's structures and finally to consumption view.

Also I appeal experts to share their expertise and experience on how they have handled such requirement. Also if there is any better way of doing it.

Thanks,

Dhiraj More

 
21 Comments
Labels in this area