cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Conversion File Range 10.0 NW

Former Member
0 Likes
721

Hello,

I am trying to apply conversions to a range of value in a Conversion File. I am using 10.0 NW. I find in the 7.5 documentation that ":" is supported for a range of cells, but I can't find that in the 10.0 NW documentation (which is much more lacking in documentation that 7.5...) Is this not supported in 10.0 NW? If it is supported, any ideas on what I'm doing wrong?

The concept of what I need to do is load in BRL Rates at -1/Value for June 2015 going forward, and for prior time, apply no conversion. This works perfectly if I just hardcode BRL201506, but I don't want to have to hardcode every month going forward for the rest of time...I wasn't to use a range.

EXTERNALINTERNALFORMULA
BRL201506:BRL999999BRL-1/Value
BRL*BRL

If this isn't possible to do using standard conversion, can someone help me with the js equivalent I would need to accomplish this?

Thank You,

Alex

(Also unrelated, if I try to paste anything into the SCN post editor here, it freezes all the text and I can't make any further changes to my post, thus having to refresh the page and retype my entire post...and since I can't copy it back in, have to retype the entire thing again, any ideas what's going on there?...)

Accepted Solutions (0)

Answers (3)

Answers (3)

former_member186338
Active Contributor
0 Likes

"(Also unrelated, if I try to paste anything into the SCN post editor here, it freezes all the text and I can't make any further changes to my post, thus having to refresh the page and retype my entire post...and since I can't copy it back in, have to retype the entire thing again, any ideas what's going on there?...)" - I have no issues with Firefox to post on SCN, which browser are you using?

Former Member
0 Likes

Internet Explorer 11. It looks like the only way Paste works is to go into the HTML editor version of the post editor and then it lets you paste...

former_member186338
Active Contributor
0 Likes

May be you can use Firefox? Or at least Firefox portable - can be used without installation...

With FF you can simply paste images in line... not only text

Vadim

Former Member
0 Likes

I don't currently have FF installed on my work computer, but I have Chrome and it seems to work fine. I just have to use IE for ancient work-related sites...else I'd always use Chrome

former_member186338
Active Contributor
0 Likes

Chrome is not fine with BPC

Former Member
0 Likes

Oh yeah, now I remember why I stopped using Chrome at work...

former_member186338
Active Contributor
0 Likes

FF is a compromise

Former Member
0 Likes

So I tried accomplishing this in js and can't get it to work. Any suggestions?

js:if(%external% >= BRL20150601) { -1/Value } else { Value }

js:if(%external% >= BRL20150601) { -1/Value; } else { Value; }

*IF(%external%>=BRL20150601 then (-1/Value); Value)

*IF(%external%>=BRL20150601 then (-1/Value); )

All of the above result in an "evaluation error" of the statement when I run the Import.

former_member186338
Active Contributor
0 Likes

Ups...

Search Google for "javascript tutorial"

Test first link: JavaScript Tutorial

Look on: JavaScript Comparison and Logical Operators Conditional (Ternary) Operator

syntax:

variablename = (condition) ? value1:value2

Look on the example and "Try It Yourself"

Test your code in the online testing environment

Vadim

former_member186338
Active Contributor
0 Likes

Try:

js:(%external%.toString() >= "BRL20150601") ? -1/Value : Value

in the FORMULA column...

Not sure if %external% is supported in this column!

Vadim

Former Member
0 Likes

Hi Vadim,

I tried your first post today (the "Try It Yourself" test) and I got the same formula as you

The Import now succeeds (before it failed to "evaluation error") however, it always goes to Value, it doesn't  take -1/Value even if the external is greater than BRL20150601.

I tested this and it works properly in the online tester, but looks like it isn't evaluating properly in the conversion file. Any ideas?

!DOCTYPE html>html>body> p>Input Curr+Value and click the button:

input id="external" value="BRL20150631" /> button onclick="myFunction()">Try it p id="demo">script>function myFunction() {     var external, answer, myval;     myval=-3.10190     external= document.getElementById("external").value;     answer= (external.toString()>= "BRL20150601") ? -1/myval:myval;     document.getElementById("demo").innerHTML = answer; } /script> /body>/html>

Former Member
0 Likes

This doesn't paste very well onto the forum... (I tried to take out the first "<" so it didn't convert it in the forum but that didn't make it look very good..)

former_member186338
Active Contributor
0 Likes

I suspect %external% usage in the FORMULA column - never tested it myself.

%external% in INTERNAL column is fine, tested many times...

Try with fixed:

js:("BRL20150602" >= "BRL20150601") ? -1/Value : Value

Is it now: -1/Value?

Vadim

Former Member
0 Likes

Hello Vadim,

I changed to a hardcoded value, and it looks like the logic works. However, that brings be back then to my original question, if %external% isn't supported in the formula column (which seems odd since I feel like that's the point...), do you/anyone know of another way I can accomplish doing math on a value depending on the external value?

I guess I can do this in an APD, but I'd prefer being able to manage it in a conversion file instead of hardcoding in date values into an APD.

Regards,

Alex

former_member186338
Active Contributor
0 Likes

Something definitely looking bad, but:

BRL201506

BRL201507

BRL201508

BRL201509

BRL201510

BRL201511

BRL201512

BRL2016??

BRL2017??

BRL2018??

BRL2019??

BRL202???

202912 is not 999999 but is fine

Vadim

Former Member
0 Likes

Hi Vadim,

Yeah...that is my fallback if I absolutely have to, I just really didn't want to have to add a ton of lines for every currency we have this issue for, I was hoping a simple js solution would work...

I guess I could suggest supporting %external% on the never-read SAP Ideas page, though that place seems to be a waste of time...

If anyone else knows of another way to accomplish this, please let me know.

Thanks,

Alex

former_member186338
Active Contributor
0 Likes

I have no idea why BRL201506:BRL999999 approach is not working... Conversion file logic was not changed since 7.5...

Former Member
0 Likes

Do you have NW 10.0? Would you be willing to try a range in your system and maybe it's a SP level thing?

I am on:

SAP_BW 731 SP10

CPMBPC 801 SP5

HANABPC 801 SP3

HDB Rev 85

EPM SP21

former_member186338
Active Contributor
0 Likes

"Do you have NW 10.0?" Yes

"Would you be willing to try a range in your system" - not today

"and maybe it's a SP level thing?" CPMBPC 801 SP5 is very old

Vadim

Former Member
0 Likes

It was the latest when we upgraded last spring 😕 It takes an arm and a leg to upgrade and no one likes the risk of becoming unstable when we are currently stable. Probably next spring we will upgrade again. The business won't let it happen during planning season (Aug-Jan....)

former_member186338
Active Contributor
0 Likes

Anyway, I recommend you to have a sandbox BPC with the latest SP for tests like now!

Latest:

CPMBPC 801: SP 0011
former_member186338
Active Contributor
0 Likes

HI Alex,

Can you explain the logic you want to implement using JavaScript? The range is from 201506 to 999999? Then read some online JavaScript tutorial. Use substring and compare... Easy job!

Vadim

Former Member
0 Likes

Hello Vadim,

The range is a date range from 201506 (June of 2015) through the rest of time 999999 (99 month, of year 9999). I could make it a sensical month and year, but a range is a range, so I just filled it in with 9's. since that is similar to what sap does (12-31-9999 is usual end date).

Any suggestions on js tutorials as it would apply to this specific case in BPC? I would have to be using it in the Formula field since I'm applying math to BPC "Value". I'm not sure how to do this in relation to what I have.

Also, do you know if js is the only way to do this? Is ":" no longer supported in 10.0 NW and this was just a 7.5 NW feature?

Thanks,

Alex

former_member186338
Active Contributor
0 Likes

Hi Alex,

I am currently in the countryside with iPad and slow internet. If you search forum for: bpc Vadim JavaScript you will find a.lot of samples. Also search google for JavaScript tutorial. Test you code in the online testing environment.

B.R. Vadim