cancel
Showing results for 
Search instead for 
Did you mean: 

WWI IF statment: Comparison against ">" results in error

Mark-Pfister
Active Contributor
0 Kudos

Hello community,

I want to check with an WWI IF Statement if a certain symbol contains the value "<". This however results in  a Macro Error and the following error messages:

WWI Coding:

Errors:


If I change the comparison text - as in the example below to "any text"- it works without errors!

-> I think this is because the "<" (as well as the ">") are heavily used in the WWI Syntax and the WWI Parser get's "confused".

Is there some escape character that could make this work?

There are other options (WWI Symbol Method etc.) but I would like to avoid to create custom coding for this requirement.

Any help appreciated!

Mark

Accepted Solutions (0)

Answers (5)

Answers (5)

Former Member
0 Kudos

can't help you, sorry, this WWI coding goes way beyond my knowledge

But, greetings.

  Mike

satya11719
Active Contributor
0 Kudos

Hi Mark,

I'm talking comparison of symbol with another symbol, instead of < symbol, but I think it will not work in your case .

Thanks

Satya

satya11719
Active Contributor
0 Kudos

Hi mark,

Can you try to compare GESTVCOMPU COMPUPP Upper limit  with GESTVPRECU PRECU Operator upper limit.

Thanks

Satya

Mark-Pfister
Active Contributor
0 Kudos

Hi Satya,


Satyanarayana Reddy wrote:

Can you try to compare GESTVCOMPU COMPUPP Upper limit  with GESTVPRECU PRECU Operator upper limit.


I don not understand your proposal. What would be the benefit of that?

This comparison result will always be false (unless both are empty)!

Kind Regards


Mark

Ralph_P
Advisor
Advisor
0 Kudos

Hi Mark,

Isn't this a text comparison? Then it should look like <15BIF001(AND:GESTVPRECU LK "<")>. For text comparisons you need to use the operator LK, not EQ.

Ralph

Mark-Pfister
Active Contributor
0 Kudos

Hi Ralph,

LK is a "contains pattern" comparison:


If I would use this coding:

<15BIF001(AND:GESTVPRECU LK "<")>

the if statement would be true for "<=" or "<>" as well.

That wouldn't be too bad - however it is not working witch text comparison either -  i get the exact same error AS for EQ: The parser can not handle the "<".

Data on Specification:

WWI Coding:

WWI Output:

Kind Regards

Mark

Ralph_P
Advisor
Advisor
0 Kudos

Hi Mark,

You are right, it now makes sense. Look at your system error Unknown symbol type "). The parser interprets the < in the comparison as the beginning of a new symbol, however, it still is within the symbol 15BIF005. That's why you get the error. I'm afraid this will not work at all.

Ralph

christoph_bergemann
Active Contributor
0 Kudos

Dear Mark

did you still started OSS dialog? If not: give it a try. May be SAP will improve situation . If not you need to look for customer method to handle this requested logic

C.B.

christoph_bergemann
Active Contributor
0 Kudos

Dear Mark

wow, quite challenging and very interesting topic. I found some "similar" topic here

:Wildcards allowed for conditional output? | SCN

But i have some "general" doubts.

If you check:

Example: Conditional Output with Alternative - Basic Data and Tools (EHS-BD) - SAP Library

this code is shown:

<15BIF001(AND:01G1013005VA GE 1)><01G1013005VA(;*/TL)[D:Value]>

<15CIF001><03EHS_L_TEXT(CUST-100000000000031)[D:Density is less than 1]>

<15EIF001>


In this case the comparison is done not using a double quote. The "main" question might be now: if we look on symbol to check the "precision": what is the "SAP/WWI" internal type in which it this is handled? as "CHAR"?  As "integer"??


I believe you should "dig" deeper.  Check:

ESTVP EHS: Value Assignment Item - SAP Table - ABAP

The "precision" fields are defined as "CHAR5". May be give "*<*" a try.. ??

C.B.

Mark-Pfister
Active Contributor
0 Kudos

Hi Christoph,

For a EQ Comparison with a text one needs the double quotes "". For numerical comparison the "" are not needed as shown in the example WWI coding in the SAP online help.

Otherwise you can not even enter the condition:

Only with "" i can put the WWI statement on the template. But I get the error later when checking the template. Removing the "" directly on the template leads to an error during check as well.


Kind Regards


Mark

christoph_bergemann
Active Contributor
0 Kudos

Dear Mark

I am looking more like LK "*< " for check. We have e.g. "< ", "<=" etc. I would assume that

1.) using the quotes

2.) and using "*"

may be the WWI parser might accept this logic.

My assumption is as: if the SAP download is done then a value as ">" is handeld either as CHAR2 or as CHAR5 and nay "character" is relevant. So if you compare to "> " (with one space) or as "*> *" (once again one space) it might work. Nether tried it.

C.B.