Question
Load Script - with Variable
Hi All
I would like to limit the scope of an anylsis by filtering some company codes in a load script.
I have create a variable as text replacement in which I have put the list of company code:
Variable Name= ShopCC
TexT/Replacement= CH01,IT13,FR02,FR08
the load script is
FILTER EKPO.BUKRS IN (<%=ShopCCode%>);
Unfortunaltly I get an error saying that there iwas a syntax error in the load script.
Any Idea please ?
thank you
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.
I found a contradiction in your code: you wrote that your variable is called ShopCC but in the code you use the variable name ShopCCode. Once youve sorted that out it ought to work fine since the syntax is correct.
If you have more questions, feel free to make more forum posts and well be happy to help.
Best wishes,
Calandra
I get
The filter works if I apply it as Sheet-filter. But we rather want to have it as Analysis filter, not set on every sheet. Is this possible?
Thank you for your help.
BR,
Marcel
c.eckert:
FILTER MATCH_PROCESS_REGEX(<%= from %> >> (ANY)* >> <%= to %>) = 1;
Hey Calandra,
thanks a lot for your prompt response. I understand the circumstance now, that variables cannot be used in load script of the analysis - and yes, the variables can be set by the viewer via a dropdown.
I tried, but got the following (not really valuable) error:
Did the filter work for you?
BR
) but for the record this simpler Filter does the exact same thing same thing.
PROCESS EQUALS <%= from %> TO ANY TO <%= to %>;
So long as you dont explicitly write START in front of the first activity and END after the last activity, the ANY to and the to ANY are implicitly assumed by the implementation.
Just in case anyone with a similar problem reads this and it doesnt work for them: if, in the button drop down components where from and to selected, the wrapping characters arent set to single commas it is necessary to write single commas around the variable names in the filter.
Best wishes,
Calandra