cancel
Showing results for 
Search instead for 
Did you mean: 

CDS SmartLink URL generation

marvin_heibert
Participant
0 Kudos
127

Dear Community,

many CDS Based Applications have implemented a SmartLink that allows you to navigate to a related application.

E.g.: the CDS View 'C_SchedgAgrmtHdrObjPg' which is showing the Details in the MyInbox for approving scheduling agreements.

2024-10-02 10_13_14-Purchase Scheduling Agreement und 5 weitere Seiten - Geschäftlich – Microsoft​ E.png

 

 

 

 

 

Once I click on one of the Links, the respective Target Mapping gets called and in addition, URL Parameters will get attached.

E.g.: https://<host>:<port>/sap/bc/ui2/flp#PurchaseSchedulingAgreement-displayFactSheet?CashDiscount1Days=....

So I was wondering where the URL gets generated, to understand it in gernal as well. 
The specific reason why I'm asking is, that we want to integrate a custom application via SmartLink which is working fine by creating a Target Mapping with the same Semantic Object, but in addition we want to attach a custom URL parameter as well. 

I hope you guys can help me out to understand how these Links are getting generated.

Thanks a lot in advance!

Br,
Marvin 

MarcinPciak
Active Contributor
0 Kudos

Hi Marvin,

URL is generated automatically based on the CDS view you are navigating from in form of #SemanticObject-action?<param1>=<value1>&<paramX>=<valueX>

where param1 to paramX are all properties' names from the CDS that the page is generated from. I.e. if I have this navigation defined

@Consumption.semanticObject: 'show'
@UI.fieldGroup: [
{
	qualifier: 'CustomerInfo',
	type: #WITH_INTENT_BASED_NAVIGATION,
	semanticObjectAction: 'Customer',	
	requiresContext: true,  
	position: 10
}]
CustomerFirstName,
CustomerLastName

...some of the URL parameters are the CustomerFirstName and CustomerLastName

In the resulting app that resolves from the #Customer-show all the parameters should have the same names as CDS properties, so that they can be resolved from parsed URL on the target app launch. The rest of the params should be ignored, as the target app does not need them for proper app initialization.

Regards

Marcin

 

Accepted Solutions (0)

Answers (0)