on 2023 Jul 15 7:09 PM
Hi Experts
Could anyone help me with the below code please.
simple code but not working. I need to pass dynamic values to my data action for that I am first trying it out with constants then I will replace with script variables in Javascript.
DA_1.setParameterValue("CC_P", "GB1"); => company code dimension
DA_1.setParameterValue("MY_P", "202304"); => DATE dimension format "YYYYMM"
DA_1.execute();
The code above does not produce any errors, but it also does not perform the desired action of storing a value in the planning model. I would greatly appreciate any help or insights you can provide.
Thank you in advance.
Best regards,
M
Request clarification before answering.
malya_7
You need to use fully qualified member names when assigning the parameter for e.g. [SAP_CEP_PRODUCT].[H1].[MZ-FG-C900] See an example below.
Parameter setup: Hierarchy defined in parameter should be used in JavaScript assignment
Data Action: Keep most if the member scoped in MEMBERSET
MEMBERSET [d/MEASURE] = "QUANTITY"
MEMBERSET [d/SAP_CEP_PRODUCT]=BASEMEMBER([d/SAP_CEP_PRODUCT] , %P_Product%)
MEMBERSET [d/SAP_CEP_SALESORG]=BASEMEMBER([d/SAP_CEP_SALESORG] , %P_SalesOrg%)
MEMBERSET [d/SAP_CEP_CUSTOMER]="#"
MEMBERSET [d/SAP_CEP_ENTITY]="#"
DATA([d/CALMONTH]=%P_Date%)=1
Application.showBusyIndicator("Preparing for execution...");
// format is [DIMNAME].[HIERID].[MEMBER], the hierarchy id should be same as defined in param
DataAction_1.setParameterValue("P_Product","[SAP_CEP_PRODUCT].[H1].&["+"MZ-FG-C900"+"]");
DataAction_1.setParameterValue("P_SalesOrg","[SAP_CEP_SALESORG].[H1].&["+"SO0001"+"]");
DataAction_1.setParameterValue("P_Date","[CALMONTH].[YQM].&[" + "202301" +"]");
DataAction_1.execute();
Application.refreshData();
Application.hideBusyIndicator();
Application.showMessage(ApplicationMessageType.Success,"Executed Successfully");
Before DA run
After DA run
DA Monitor logs
Hope this helps !!
Please accept/upvote if this helps you
Nikhil
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Nikhil,
Thanks for your reply again.
My date dimension is passing correctly now, but not the company code.
For my Company code dimension hierarchy is not enabled. so I am passing directly the value
DataAction_1.setParameterValue("CC_P","[Comp_code].&[" + "IE01" + "]");
DataAction_1.setParameterValue("P_Date","[Date].[YQM].&[" + "202302" + "]");
DataAction_1.execute();
User | Count |
---|---|
82 | |
29 | |
9 | |
8 | |
7 | |
7 | |
7 | |
6 | |
6 | |
5 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.