Hi all,
in demand planning process I am using a customer specific characteristic which is a string of several numbers.
By one specific digit out of this string it has to be differentiated whether calculation logic A or B has to be executed.
Example:
9 9 9 1 9 9 --> calculation A
8 8 8 1 8 8 --> calculation A
9 9 9 2 9 9 --> calculation B
8 8 8 2 8 8 --> calculation B
Is there any macro functionality like the excel function "=left" or something else which can return the value of this string's certain digit of the actual selected CVC?
By the way, I don't want to solve this by creating an additional characteristic/attribute oder changing the CVC structure...
Any help would be highly appreciated!
Julian
Julian,
Try this:
Suppose you are storing the valkues in Characteristic "CHARA". You want to decide upon the use of "Alternative 1"
or "Alternative 2" based on whether the FOURTH digit in "CHARA" is "1" or "2".
So IF:
8 8 8 1 8 8 --> Alternative 1
9 9 9 2 9 9 --> Alternative 2
Use the follwoing logic:
SET Layout Variable "VAR" = ACT_IOBJNM_VALUE("CHARA")
IF {DIV ( FRAC( VAR/1000 ) / 100 )} = 1
USE Alternative 1
ELSEIF {DIV ( FRAC( VAR/1000 ) / 100 )} = 2
USE Alternative 2
EX: for 888188
DIV ( FRAC( 888188/1000 ) / 100 )
= DIV ( 188 / 100 )
= 1
I think this might just work. My only doubt is if the variable VAR will be treated as a char string, thus not allowing
any arithematic manipulations...
Let me know if this helps.
Regards,
Abhi
Add a comment