on 2024 Jul 26 9:36 PM
Hi,
PROBLEM:
-A SAC Script with a logic like IF ( condition OR condition OR ..condition){} is needed.
-SAC Script or SAP SAC Script Documentation does not provide
info about the possible syntax for IF (){} at all ?
SOLUTION:
Is there for SAP Script another logice than if (...=== ...){} at all possible ?
Anybody has got an ideas if at all and how to run an IF ( ... OR ...) within SAC Script ?
PROBLEM IN DETAIL:
-have got a BW Query with 10 Variables Z_QUERY_VAR_01 ... Z_QUERY_VAR_10.
-want to run operations only on the variables: Z_QUERY_VAR_01 ..._03.
- a SAC Script with an or OR to build the descired logic ist set up
LOGICAL BACKGROUND:
For the 3 variables a further processing with
var filterValuesFISCYEAR02 = MANAGREP.getDataSource().getVariableValues("ZMO_VAR_FISCYEAR02")[0];
switch(filterValuesFISCYEAR02.type){
case VariableValueType.Single:
var singlefilterValue = cast(Type.SingleVariableValue, filterValuesFISCYEAR02 );
...
is required and this does not accept the multiple call of the same code.
Any idea who to work arround of this ?
ThanXs:
Best Martin
Hi Martin,
not sure if I understand your question when you say "others"? So, if you want to use if then else with "OR" condition:
if (condition1 || condition2 || condition3) then {
//this code will be executed if any of the previous conditions are true
}
else {
//this code will be applied for the "others" conditions
}
Am I answering your question?
Regards,
Javier
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
71 | |
10 | |
8 | |
7 | |
6 | |
6 | |
6 | |
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.