Fiori Elements Standard App Extension using virtual Elements: Manage Billing Document ( Real Time Extension Scenario)
This blog is about extending the Standard Fiori Elements based application using the Virtual Elements.
Business Scenario & Requirement Overview
Recently, I have requested to extend the Standard Manage Billing Document app with additional filter as “Sales Document”.
Manage Billing Documents is Fiori Element’s based application, which navigates from Billing Document( List Report) to Billing Document detail ( Object Page).
Sales Document exist at Item Level in the Billing Document.
- Sales Document (SO) number exist in the Billing Document Item.
- Needs to bring the Item Level field in the main filter bar (Selection Screen)
Technical Solution & design the solution
Step by Step Approach
Step1 : Identify the Main ODATA Service and Consumption CDS
Step 2 : Identify the Associated CDS from main consumption CDS
Step 3: Extend the Main CDS with required field.
Step 4: In the Extended CDS add the annotations for
UI Selection Field
End user Text Label
Virtual Element Annotations
( Please refer my existing blog on virtual element for detail on Virtual Elements )
Step 5: Implement the Exit Class for deriving data for virtual element
Based on the above Steps, lets us extend the standard Manage Billing Document App
Identify the ODATA Service and Backend CDS Data Model, can just put F12 and get the information
ODATA Service: SD_CUSTOMER_INVOICES_MANAGE
Consumption CCDS: C_BillingDocument_F0797
Extend the main CDS field and add the virtual Element as follows
Associated Entity detail for which field needs to be used
- Associated Entity – Item
- Associated Entity Field – SalesDocument
Implement the class with interface required for virtual Elements
That’s it, just run the application to see the new Sales Document Filter. enter the sales document number and press go.
Wow, we are done 😊 Lets clear the cache and see the app
Sales Document is available in filter bar 😊
So don’t wait to share your SAP findings and knowledge.
Very well written and great knowledge sharing here Mohit ! This solution shows how little capabilities that we know of different solutions can make big impact when clubbed together.
Thanks Gaurav Karkara
Excellent Mohit - thanks for Sharing 👏🏼
Good blog.Thanks for sharing.
Great Blog Mohit. Short and very relevant. Thanks for sharing.
Nice blog Mohit Bansal.
But what is the last line in the class. ro_condition = lv_salesorder->equals( iv_value ).
How you have managed this iv_value, I guess it's an importing param but you haven't passed anything in your screen shot.
Thanks for sharing your view. We don't need to explicitly pass the value in iv_param. framework will pass it from the value selected in Fiori Element.
Your blogs are always an easy read, Great stuff ! 🙂
Nice Blog. Thanks. Is it also possible extend transactional Behavior of fiori elements? E.g. Adding new field for create/edit which was not available in standard using virtual elements