2

I have created List Report Fiori App based on CDS view I've created before. Is there any possibility to use some annotations in existing and/or additional CDS view to create a hotspot smart field on Vendor number?

I.e. when I click on that it will navigate me to standard "Business Partner" App for this vendor?

List Report screen shot

If this is not possible could you explain how to do it "the other way"?

Sandra Rossi
  • 11,934
  • 5
  • 22
  • 48
Berater_SAP
  • 23
  • 2
  • 5

1 Answers1

4

What you need is called smart-link with intent-based navigation: a link which navigates to business object details by reading its semantic properties aka semantic object.

Semantic object can be defined in two ways:

  1. Through template-based approach, via annotation modeler in Web-IDE. Inside @UI.Lineitem add DataFieldWithIntentBasedNavigation and point it to your field name coming from CDS report

the only difference from this GIF is that you needn't to specify GUI_NAVIGATE property

  1. Through column definition in CDS view

    @Consumption.semanticObject: 'BusinessPartner'
    @UI: {
          identification: [{label: 'Vendor No', position: 10}],
          lineItem:[{
            position: 10,
            semanticObjectAction: 'manage',
            type: #WITH_INTENT_BASED_NAVIGATION
            }],
           selectionField.position: 10
         }
    

Semantic object are stored in /UI2/SEMOBJ and /UI2/SEMOBJ_SAP tables, check the correct object before developing.

Suncatcher
  • 10,355
  • 10
  • 52
  • 90
  • Thanks - it worked. Two questions: 1) Is there option to map value from BP app and my report so when i open BP fiori it opens with "vendor" value in field "Business Partner number"? 2) Can you recommend any book/other source of info when I learn more about logic in CDS that can extend custom report functionalities in Fiori. – Berater_SAP Feb 14 '20 at 13:39
  • Except [SAPUI5 help](https://sapui5.hana.ondemand.com/#/topic/c4de2df385174e58a689d9847c7553bd.html) official [SAP tutorials](https://developers.sap.com/tutorial-navigator.html?tag=topic:sapui5&tag=products:technology-platform/sap-fiori), you can check [this](https://www.wisdomjobs.com/e-university/sap-fiori-tutorial-1239.html), [this](https://sapyard.com/tutorials-on-sap-fiori/) and [this](https://www.saplearners.com/category/sap-fiori/). – Suncatcher Feb 14 '20 at 14:27
  • `so when i open BP fiori it opens with "vendor" value in field "Business Partner number"` and now it opens empty BP? – Suncatcher Feb 14 '20 at 14:28
  • Yes. I assume, that if I used BP data element in table behind CDS instead of LIFNR then it could work automatically but i want to ask if there is an option to do this mapping in CDS or i need to refer to data elements (?) that are also used in other App. – Berater_SAP Feb 14 '20 at 14:36
  • Yes, I suppose you need data elements for automatic mapping, maybe there is another way of manual mapping, but not I'm aware of. Did you check if semantic object in smart link target [is specified correctly](https://sapui5.hana.ondemand.com/#/topic/1d4a0f94bfee48d1b50ca8084a76beec.html)? Like this `Target="ZFAR_CUSTOMER_LINE_ITEMS2_SRV.Item/CostCenter` – Suncatcher Feb 14 '20 at 14:50
  • My changes in CDS don't get immediately updated in Fiori. Tried cache reset, hard reset, incognito etc. Sometimes it takes a lot of time til changes are visible in the App. Now i can't test it right i.e. i dont know if this is normal that i dont see code of external annotations (CDS) in WEB IDE. If after this synchro issue is fixed I still wont be able to get this auto mapping would it be ok to raise here a separate question? – Berater_SAP Feb 17 '20 at 09:49
  • `My changes in CDS don't get immediately updated in Fiori` yes, it worth a separate question. Try to include all the logs and meaningful information in that question – Suncatcher Feb 17 '20 at 10:00