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: 
ahmedyehia9
Newcomer

Purpose of this blog:

Enhancing Standard Fiori Apps in S/4HANA: A Comprehensive Guide to How to Adding Custom Fields in Standard SAP Fiori Apps and How to Adding a Fields in a Filter Bar of a Standard SAP Fiori App .

 

Highlight of this blog:

  • Introduction of Fiori launchpad.
  • Introduction of CDS View Extension Creation.
  • Usage of ABAP Annotations for CDS Views.

 

Detailed Steps:

1. Navigate to Fiori Library: here

1.1 Enter SAP Fiori App Name or Fiori App Id

Untitled1.png

Ex: "Overdue Materials - Goods Receipt Blocked Stock" Or "F2347"

Untitled2.png

 

1.2  Navigate to ‘ IMPLEMENTATION INFORMATION’  Tab then ‘ Configuration ’ 

Untitled3.png

1.3 Get OData service : MMIM_OVERDUE_GRBLOCKED_SRV.

Note: Remove SRV and you will get ODATA Project: MMIM_OVERDUE_GRBLOCKED.Note: Remove SRV and you will get ODATA Project: MMIM_OVERDUE_GRBLOCKED.

 

2. Navigate to SAP GUI and go to T-Code SEGW : 

2.1 Open new project and add your OData project: MMIM_OVERDUE_GRBLOCKED.

Untitled6.png

 2.2- Follow the steps below to get CDS view.

Note: Get CDS view , remove 'Type', and obtain " C_MaterialOverdueGRBlocked ".Note: Get CDS view , remove 'Type', and obtain " C_MaterialOverdueGRBlocked ".

 

3. Open Eclipse Editor :

 3.1 Create Extend View: " ZMM_GR_BS_DDL " and  enter your logical code. 

 

 

@AbapCatalog.sqlViewAppendName: 'ZMM_GR_BS_DDL'
@EndUserText.label: 'Add custom field in GR Blocked Stock'


extend view C_MaterialOverdueGRBlocked with ZMM_GR_B_STOCK
association [1..1] to ekkn as _Extend_EKKN on $projection.purchaseorder = _Extend_EKKN.ebeln  and $projection.purchaseorderitem = _Extend_EKKN.ebelp
association [1..1] to eban as _Extend_EBAN on $projection.purchaseorder = _Extend_EBAN.ebeln  and $projection.purchaseorderitem = _Extend_EBAN.ebelp
{   
    @Search.defaultSearchElement: true
    @Search.fuzzinessThreshold: 0.8
    @Search.ranking: #HIGH
    @EndUserText.label: 'Job Order'
    @Consumption.valueHelpDefinition: [{ entity: { element: 'AUFNR' , name: 'ZMM_JobOrdGRBlockStock_VH' } }]
    _Extend_EKKN.aufnr ,
    
    @Search.defaultSearchElement: true
    @Search.fuzzinessThreshold: 0.8
    @Search.ranking: #HIGH
    @EndUserText.label: 'PR Number'
    _Extend_EBAN.banfn,
    
    @Search.defaultSearchElement: true
    @Search.fuzzinessThreshold: 0.8
    @Search.ranking: #HIGH
    @EndUserText.label: 'PR Item'
    
    _Extend_EBAN.bnfpo,
    @Search.defaultSearchElement: true
    @Search.fuzzinessThreshold: 0.8
    @Search.ranking: #HIGH
    @EndUserText.label: 'Storage Location'
    
    _Extend_EBAN.lgort,
    _Extend_EKKN ,
    _Extend_EBAN
   }

 

 

3.2 Go to SAP GUI -> T-Code SE16N . You will find that custom fields are appended to the CDS view C_MATERIALOVERDUEGRBLOCKED.

Untitled10.png

 3.3 Go to SAP GUI -> T-Code SEGW .You will find that custom fields are appended to the CDS view in OData service.

BeforeBefore

AfterAfter

 

4. Navigate to SAP Fiori Launchpad :

4.1 Navigate to Fiori App from T-Code /UI2/FLPTE_ALL

Untitled11.png

 4.2 Choose Settings.

Untitled12.png

4.3 Select the fields that you have added.

Untitled14.png

 4.4 Choose Adapt Filters. 

Untitled13.png

4.5 Select the fields that you have added.

Untitled15.png

4.6 You will find the fields you have added. 

Untitled16.png

 

Conclusion:

At the end, I hope this blog was helpful, uncomplicated, and clearly detailed for the entire process of adding custom fields in standard Fiori apps. In the upcoming blogs, we will delve into adding custom fields in more complex Fiori apps that require extending standard OData services, such as ( Stock - Multiple Materials, Monitor Purchase Order Items, etc.)

 References:

  • ABAP Annotations for CDS Views here
  • Extending CDS Views here 
  • CDS: Search Annotations here 
2 Comments
Labels in this area