Rohit Chouhan

Set filter value to data action in Sap Analytics Cloud

What is SAC

SAP Analytics Cloud (or SAP Cloud for Analytics) is a software as a service (SaaS) business intelligence (BI) platform designed by SAP. Analytics Cloud is made specifically with the intent of providing all analytics capabilities to all users in one product.

The SAC story allows input control values to be passed to Data Action Parameters, but this is impossible with the Analytical Application. But there is a perfect way to accomplish this.

There is no function available to pass Input Control or FilterLine values, but there is one perfectly good reason to do this.

  1. Create Data Actions from sidebar (not from insert tab) on Analytical Application, Add your data action name.
  2. Create new Button, and add this mention code below in onClick()
  3. Replace your Dimension and Data Action Parameter Id, use this code.
Application.showBusyIndicator("Preparing for execution..."); 
var filter = Table_1.getDataSource().getDimensionFilters("your_table_dimension");
for (var i = 0; i < filter.length; i++) {
	if (filter[i].type === FilterValueType.Single) {
		var singleFilterValueCC = cast(Type.SingleFilterValue, filter[i]);
		DataAction_1.setParameterValue("data_action_parameter_id", [singleFilterValueCC.value]);
	} else if (filter[i].type === FilterValueType.Multiple) {
		var multiFilterValueCC = cast(Type.MultipleFilterValue, filter[i]);
		DataAction_1.setParameterValue("data_action_parameter_id", multiFilterValueCC.values);

Application.showMessage(ApplicationMessageType.Success,"Executed Successfully");


Data Action is very useful tool in Sap Analytical Cloud for large calculation, Some of feature In Analytical Cloud its little difficult in Back-end side. So using this way we can use Data Action to pass filters value to Data Action Parameter.

Leave a Comment