Need to call External URL in SAP Analytics Cloud using Scripting by passing 3 Input Values

26 Views Asked by At

I am trying to open URL based on User Input values in Input Field 1, 2 and 3.

Getting error :

Auto conversion is not supported in Line : var finalURL = baseURL + "?" + urlParams.toString();

Code :

// Get the values from the input fields
var input1Value = InputField_1.getValue(); // Replace with the correct field name
var input2Value = InputField_2.getValue(); // Replace with the correct field name
var input3Value = InputField_3.getValue(); // Replace with the correct field name

// Base URL
var baseURL = "https://fnp.preprod.erp.maersk.com/sap/bc/ui2/flp";

// URL parameters
var urlParams = {
    "sap-client": "400",
    "sap-language": "EN",
    "#": "AccountingDocument-manage",
    "AccountingDocument": input1Value,
    "CompanyCode": input2Value,
    "FiscalYear": input3Value,
    "sap-app-origin-hint": "",
    "/detail": input2Value + "/" + input3Value + "/" + input1Value
};

var finalURL = baseURL + "?" + urlParams.toString();

NavigationUtils.openUrl(finalURL);
0

There are 0 best solutions below