Skip to Content
Technical Articles
Author's profile photo Mohnish Lunkad

Extending SAP FIORI App : My Inbox – Approve Purchase Order (F0402A)

Back-end system: S/4HANA 1809 

Overview

This blog shares on how SAP FIORI App – My Inbox can be enhanced. FIORI extension is done on My Inbox – Approve Purchase Order (F0402A) enhancing custom field in PO Line Item data.    Custom screen enhancement is done on PO Line Item to add field ‘Last Price’. To display the field on FIORI screen, no enhancement is needed either in Odata, Workflow or UI. Appropriate CDS views related to My Inbox – Purchase Order app to be identified and enhanced to modify the UI output display.

 

Workflow Configuration

SAP Business Workflow configuration entries maintained for Workflow Task of Purchase Order

 

Transaction Code – SPRO

Path: SAP Reference IMG -> SAP Customizing Implementation Guide -> SAP Netweaver -> SAP Gateway Service Enablement -> Content -> Workflow Settings -> Maintain Task Names and Decision Options

 

Transaction code – SWFVISU

 

GUI Enhancement of PO Line Item

Table EKPO enhanced by adding custom fields in structure ‘CI_EKPODB’

 

Field enhancement as it appears in ME23N transaction.

 

UI Visualization

FIORI%20App%20-%20My%20Inbox                                                              My Inbox – Purchase Order Approval

FIORI%20App%20-%20My%20Inbox%20Header%20Data                                                       My Inbox – Purchase Order App Header Data

FIORI%20App%20-%20My%20Inbox%20Line%20Item%20Data                                                         My Inbox – Purchase Order App Line Item Data

Extending CDS views.

For header level changes CDS view C_PurchaseOrderFs will be extended. For item level changes there are series of CDS views that needs to be extended due to use of Nested CDS concept.    Below chart shows the CDS view that needs to be extended.

In final consumption CDS view C_PurchaseOrderFs, CDS view C_PurOrdItemEnh is used which is a consumption view for the PO Line Item. Open the view C_PurOrdItemEnh in eclipse and open the dependency analyzer view.                                                                                                               Path – Right Click on CDS View -> Open With -> Dependency Analyzer

 

Step 1 – CDS view I_PurchasingDocumentItem to be extended with the custom field added in the table EKPO.

ZI_PurchasingDocumentItem
@AbapCatalog.sqlViewAppendName: 'ZCUSTOMFIELDS'
@EndUserText.label: 'Custom Field Extension'
extend view I_PurchasingDocumentItem with ZI_PurchasingDocumentItem {
    ekpo.zzprice as LastPrice
}

 

Step 2 – CDS view I_PurchaseOrderItem to be extended with the custom field.

ZI_PurchaseOrderItem
@AbapCatalog.sqlViewAppendName: 'ZCUSTOMFIELDS1'
@EndUserText.label: 'Custom Field Extension'
extend view I_PurchaseOrderItem with ZI_PurchaseOrderItem {
    LastPrice
}

 

Step 3 – CDS view I_PurchaseorderItemEnhanced to be extended with the custom field.

ZI_PurchaseorderItemEnhanced
@AbapCatalog.sqlViewAppendName: 'ZCUSTOMFIELDS2'
@EndUserText.label: 'Custom Field Extension'
extend view I_PurchaseorderItemEnhanced with ZI_PurchaseorderItemEnhanced {
    LastPrice
}

 

Step 4 – CDS view C_PurOrdItemEnh to be extended with custom field and the UI properties. As the UI properties has to be defined in CDS view extension, CDS view C_PurOrdItemEnh has to be reviewed to identify the ‘qualifier’ and ‘position’ properties for the new field.

ZC_PurOrdItemEnh
@AbapCatalog.sqlViewAppendName: 'ZCUSTOMFIELDS3'
@EndUserText.label: 'Custom Field Extension'
extend view C_PurOrdItemEnh with ZC_PurOrdItemEnh {
  
  @UI.lineItem: [{
            qualifier: 'PurchItem',
            position: 120,
            importance: #HIGH }, {
            position: 120,
            importance: #HIGH 
            }]
      LastPrice
  
}

CDS%20View%20C_PurOrdItemEnh%20to%20identify%20qualifier%20and%20position%20properties

CDS View C_PurOrdItemEnh to identify qualifier and position properties

Conclusion

Custom field enhancement for My Inbox FIORI app is possible through CDS view enhancement without any code changes in UI or backend as well. As long as the field is available in the underlying CDS view and eventually in the database table which in this case is EKPO, extending the CDS view will achieve the requirement to display fields in UI display. So the CDS enhancement has to be done from the bottom most CDS view to the top most CDS view as mentioned in the steps above.    Please provide your feedback or any suggestions on the blog in comment section.

 

Assigned Tags

      1 Comment
      You must be Logged on to comment or reply to a post.
      Author's profile photo Mauricio Pacheco
      Mauricio Pacheco

      Great Post!