cancel
Showing results for 
Search instead for 
Did you mean: 

Wildcards allowed for conditional output?

michael_schmalfeldt2
Participant
0 Kudos

Hi,

has anybody ever used Conditional Output in WWI together with a Wildcard/place holder for a text comparison? Is WWI able to handle that?

Kind regards, Michael

Accepted Solutions (0)

Answers (2)

Answers (2)

holger_hartung
Contributor
0 Kudos

Hello,

I have had the same question with wildcards for LK but I mean it i dosn't work like "P*" !!!!! I have had test diffeferent case but dont get what I have expected....

christoph_bergemann
Active Contributor
0 Kudos

Dear Michael

can you please elaborate more your business case? E.g. Example: Conditional Output with Alternative - Basic Data and Tools (EHS-BD) - SAP Library

One of the examples here as discussed is: Query on Conditional Output in WWI template | SCN

Is providing the "general" help for conditional output. As mentioned in many other threads: you should nor try to do "text comparison" (in my opionion)

I am not sure: do you would liketo achive something like: if symbol "X" cotains "pattern" as... then..(like with ABAP using the "CS"  option?). In any case: SAP help is providing this guidance

The condition consists of the following parts:

  • Symbol whose content must fulfill the condition
  • Comparison operator, such as Equal To (EQ), Greater Than (GT), or Text Comparison (LK)
  • Comparison value, that is a value or string against which the system checksYou can also enter a symbol as a comparison value. The system then compares the content of this symbol with the content of the symbol that must fulfill the condition.

So you can to "text comparison" using "LK". But SAP is not providing an example of the use of this "LK". I did not try it: but may be it might work. But If I read the SAP help correct the fit must be "100 %" (and not like using the "CS" (contain patterns) logic.


C.B:


PS: check this OSS Note: Note 1395432:Long texts in comparison operations for conditional outputs


As well please check OSS Note: 1281618. If I read this note correct you can use something like:


LK "*TEST*" and you would get result (so CS is supported): But please check (and keep in mind; you have always (in most cases) a dependency on value becuase of language (e.g. of phrase position)


PPS: check as well:

Here you will find an example of use of "LK" logic

michael_schmalfeldt2
Participant
0 Kudos

Hi,

on a Label we would like to display a Phrase depending on the first character of an identifier. So if the identifier starts with "P" we would like to Display Phrase 1, if the identifier starts with a character "S" Phrase 2 should appear,...

I made some tests using LK = "P%" but that did not work. In the meantime I have made a WWI method which reads the identifier and Returns the first character where I can now apply a LK = "P" but it would have been nice to have it solved by just using conditional Output...

Kind regards, Michael

Ralph_P
Product and Topic Expert
Product and Topic Expert
0 Kudos

Hi Michael,

I never tried but doubt it would work. If you do a text comparison, you have to set the text to be compared in double quotes and that will make WWI to search for exactly that text. So if you enter ...LK "P*" the text to be compared is P* and not P whatever.

Ralph

christoph_bergemann
Active Contributor
0 Kudos

Dear Michael

you need to pay attention with the logic you would like to get. The following issues might come up:

a.) identifier does not havte "P*" but "p*" as pattern and then it will not work

b.) the identifier should be "language independent" defined or the maintenance must be done properly or you will not succeed

But Ralph confirms my assumption. That means the use of "*" is allowed in comparison and therefore you can use "patterns" in the "LK" logic

As I do not have any kind of idea of your "business need" and why you would liketo trigger with the "identifier" I can only propose alternatives:

a.) depending on the "business" content of the identifier you might use the "substance nature". This is not language dependent and a cusotmizing entry. No user error possibel

b.) may be you know: you can extend specification header with new screens. On the screens you can do what you want to do. E.g. you can maintain as well values like "X", "Y", "Z" (e.g. as well using phrases) and then you can use this maintenance to "trigger" that phrase1 or phrase 2 or ... will be displayed.

I can not recommend to use this kind of "phrase" logic. The issue is like. you have then may be to "change" layout. That means: now you would like to check for "P*" but tommorrrow you would liek to check for "K*" and then you need to change WWI logic.

The "better" logic might be to create new property with one class/characteristic and phrase enabled. Then you could prepare e.g. two characteristics. In WWI logic you wouldcheck on value of characteristic 1 first and then print out content of characteristic two. The Con is: user must then maintain it like this. The pro is: it might be more "future" oriented

Good luck in using the conditional ouput. I would assume that It will work as Ralph hase explained

C.B.