cancel
Showing results for 
Search instead for 
Did you mean: 

String formula in VC 7.02 (EHP 2 SP3)

Former Member
0 Kudos

Hi everybody,

I have to landscapes, one running VC 7.0 and the other running VC 7.02 (EHP 2 SP3).

In VC 7.0, the following formula works as expected.

"EXECUTE SAP_GetFacturas_RP " & IF(ISNULL(@ifNroOC), "null", "'" & @ifNroOC & "'")

When @ifNroOC is null, it prints "EXECUTE SAP_GetFacturas_RP null" and when it has a value, it prints "EXECUTE SAP_GetFacturas_RP 'a value'"

In VC 7.02, when @ifNroOC has a value, it works OK, the same as VC 7.0. But when @ifNroOC is null, it prints just null.

Without quotes or anything. Just null.

Any ideas?

Thanks in advance,

Fede

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi,

in VC 7.0 there are two optional runtimes: flex 1.5 and flex 2.0. in 7.02 there is only flex 2 runtime.

Is it possible that you are comparing two different runtimes? I mean, you use flex 1.5 in 7.0, and flex 2 in 7.02? If so, it might explain the diffrerence and it might be a bug that was fixed for flex 2 and not for flex 1.5 (flex 1.5 is not supported and maintained anymore)

You can check it in the tools->options=>compiler

in 7.0 you will see two options in the dropdown:

For flex 1.5 you will see "Flash" and for flex 2 you will see "Flash (Flex 2)"

In 7.02 you will only see "Flash" which stand for flex 2.0.

Best regards,

Udi

Answers (3)

Answers (3)

Former Member
0 Kudos

Hi,

O.K, now I understand the problem. This is definitely a bug in the flex 2.0 runtime. I suggest you open a formal SAP message so you could get a solution (fix or a workaround).

Best regards,

Udi

Former Member
0 Kudos

Hi,

This of course could be a bug in flex 2.0, but another option is that the bug is in flex 1.5, and flex 2 presents the correct behaviour. I'm not sure I fully understand the formula, but it seems to me that the flex 2 result is the correct one. I mean, if @ifNroOC is null, the first value should be returned, which is "null". Please correct me it I didn't get it right.

Thanks,

Udi

Former Member
0 Kudos

Dear Udi,

I'll try to be more specific.

ifNroOC is a component (input field) in my model.

"EXECUTE SAP_GetFacturas_RP " & IF(ISNULL(@ifNroOC), "null", "'" & @ifNroOC & "'")

The formula is trying to say that if there is a value in that input field, it should be appended to the string "EXECUTE SAP_GetFacturas_RP ". eg: if the input field has the value "43", the resulting string should be "EXECUTE SAP_GetFacturas_RP 43"

If there is no value, it should append the string "null", so the resulting string should be "EXECUTE SAP_GetFacturas_RP null".

For testing purposes, i replaced the string "null" in the formula for the string "Test if null". eg: "EXECUTE SAP_GetFacturas_RP " & IF(ISNULL(@ifNroOC), "Test if null", "'" & @ifNroOC & "'")

The result was basically the same. If there is a value in the input field, the formula works perfect.

If there is no value, the overall result is wrong: I expect it to be "EXECUTE SAP_GetFacturas_RP Test if null", but instead i get just "Test if null".

Best regards,

Fede

Former Member
0 Kudos

Udi,

You are right. I was comparing two different compilers.

In 7.0 I was compiling with Flex 1.5 and it worked. In 7.02, with Flex 2.0, it's not working properly.

It's very strange that the error occurs in the newer compiler.

Do you know if there is a fix for this issue?

Thanks in advance!