4

How to add/extend Smart Links in different Fiori Application Models

 1 year ago
source link: https://blogs.sap.com/2022/07/24/how-to-add-extend-smart-links-in-different-fiori-application-models/
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
July 24, 2022 2 minute read

How to add/extend Smart Links in different Fiori Application Models

Problem Statement:

With the Fiori List Reporting Framework it is always expected to have a navigation using the Smart links from one application to another application .

How can the smart links be implemented using different Annotation possibilities :

Navigation to a single Custom application 

There are two ways to  navigate to a single custom or standard application

Using the (Model Provider Class ) MPC Odata class for the local annotation models that are developed on the SAP Odata using SEGW .

Please note that here there is no possibility to provide the action but only semantic object .

 cl_fis_uibb_annotation=>create_semantic_object_anno(
      io_odata_model     = model  " Odata Model
      io_vocan_model     = vocab_anno_model "annotation file or model
      iv_entity_type     = 'DeliveryItems' "Entity Types
      iv_property        = 'ZMaterialID'  " Which property should be presented as smart link
      iv_semantic_object = 'ZMaterialObj' " Create a semantic specific the Custom application with only one action
      iv_namespace       = 'ZLE_SHP_DELIVERY_PICK' " Name of the Service in SEGW
).​

Now go the transaction /UI2/FLPD_CUST and create a tile with the same Semantic Object and Name

MicrosoftTeams-image-14.png
  • For multiple custom applications the same Semantic object should be used with different actions .

Adding the Smart links using the CDS annotations use the below code :

For Navigation to a single application use the below code :

// Annotations for first field
 fieldGroup: [ { qualifier: 'CustomerFIlter',
                         position:  10 } ],
         textArrangement: #TEXT_LAST }
  @Consumption: { valueHelpDefinition: [ { entity: { element: 'Customer',
                                                     name:    'I_CollsCustomerVH' } } ],
                  semanticObject:      'Customer'    
                  semanticObjectAction: 'Show'				-- Action

}
  @Search: { defaultSearchElement: true }
  Customer;
  • For Navigation to the different applications Do not add the Semantic Object Action so that it will show all the Actions and Applications associated with the Semantic object.

Extending the standard Smart links scenarios where you have to extend the exiting standard application to add the Custom Application Smart links :

  • In case of both the MPC Extension scenario and CDS annotation scenario use the below process to add the custom Application :

First Identify the Semantic Object standard name that is being used the CDS annotation for example in the below scenario for the customer :

Customer%20navigation

Customer navigation

2022-07-24_22h38_19.png

CDS Annotaions

  • Now in the Fiori Launch Pad Designer use the below target mapping configuration to design the custom apps .
  • Make sure the Semantic Object Should be the same as the one in the standard application and add the custom UI5 application .
  • If there are any parameters required make sure the parameters are also configured .
Target%20Mapping

Target Mapping

Capture-2.png

Thus with code free extension Smart links can be extended..


About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK