on 04-29-2019 6:09 PM
Hello,
I'm trying to solve for a scenario where a master data field (intercompany) can be various lengths. I'd like to map anything over 4 digits to IC_NONE and anything under 4 digits to a specific syntax. When I run the following JS:
js:((parseInt(%external%)>9999) ? "IC_NONE" : "IC_"+("0000"+%external%.toString()).slice(-4))
I'm receiving the following error:
Number of '?' markers in external (?*) and internal (?JS:((parseInt(%EXTERNAL%)>9999) ? "IC_NONE" : "IC) must be equal
Any thoughts or suggestions?
Thanks in advance!
Akos
System: BPC 10.0 NW; BW 7.4 SP03
Try:
External: *
Internal: JS:(parseInt(%external%)>9999) ? "IC_NONE" : "IC_"+("0000"+%external%.toString()).slice(-4)
"?" - has also a special meaning in External...
P.S. "System: BPC 10.0 NW; BW 7.4 SP03"
BPC SP???
BW 7.4 SP03 - so old???
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Vadim,
thanks for the helping hand! When you asked me to switch to the Internal column in conversion file, I remembered that I need to flip the CONVERT_INTERNAL parameter on the transformation file to NO. When I went to the file, I realized that I didn't have the parameter listed at all. Once I added it, the error went away. The interesting thing is that I had another statement ("IC_"+("0000"+%external%.toString()).slice(-4)) there before that didn't include a ternary operator and that worked without the parameter in the transformation file. Anyway the issue is resolved now ... thank you!
The solution working solution is :
Couple of the other follow-ups:
1. the error I pasted showed (?*) ... I was just trying to manipulate the external column ... I only had * before and gave me the same error
2. BPC SP??? it is 801 SP0004 ( as you said super old)
BW 7.4 SP03 - so old??? ... the upgrade is in the works, the EPM version is also very old (SP15) as well so it's quite entertaining to work out issues that SAP solved 4 years ago but you can't fix because you can't update the plug-in. Although it should be solved in a few months as well!
User | Count |
---|---|
6 | |
5 | |
2 | |
1 | |
1 | |
1 | |
1 | |
1 | |
1 | |
1 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.