cancel
Showing results for 
Search instead for 
Did you mean: 

Conditional Output for multiple values

former_member602203
Participant
0 Kudos
621

Hi Gurus,

I struggle with following problem:

We have a characteristic (e.g. Test Standard) which contains serveral phrases (phrase text e.g. DIN xxxx, ASTM xxxx). These characteristic is multiple valued (DIN and ASTM occurs at the same time)

For a report generation (print output) I would like to print only phrases with *DIN*. Is that possible at all? (If I understand SAP documentation I'm not sure about...)

Thanks

Accepted Solutions (1)

Accepted Solutions (1)

satya11719
Active Contributor
0 Kudos

Hello Holger Hartung

Why would you require to maintain 2 diff values in same instance and print only 1 phrase,

Single instance with multiple values, i think we cannot output with single symbol with conditional output.

you may need to create custom FM and use with the symbol.

<01G****> DIN xxxx ASTM xxxx

Thanks

Satya

former_member602203
Participant

These are just considerations about a concept and different solutions

Answers (4)

Answers (4)

christoph_bergemann
Active Contributor

Dear Holger

the "conditional" topic part does have some limitations. In your case: only potential option might be to prepare a "customer report symbol"

But there are some "cons" for this approach

E.g. if you have a characteristic whcih can have "multiple" values most of the people believe: this must be a "phrase based" on. But this is not true (but this is in this case only a "detail" of the overall story).

Any how: many users "claim" that they would like to do "sorting" in "printing" in WWI

Stupid bad example: the characteristic might contain the value "A, B,C" (in this sequence) but they ask for a "logic" (like for your "DIN logic") that it must print always in this sequence "C, B, A" (or "C, A" or whatever: but not simply print what is maintained)

Anything like that is possible with WWI (like your "DIN" example) but the best approach is:

Maintain the data as proposed by Satya "Why would you require to maintain 2 diff values in same instance and print only 1 phrase,"

The main reason for this is this basic question:

If you have later e.g. a released report and somebody is asking to you: why is it printed as "A,B, C" and not "C, B, A" the effort to answer this question is quite big as you must analyse the "change logs" and other stuff (big story. Believe me: we have "similar" logic in our WWI topics and in some cases i was not able to explain why something was printed)

But as listed in many other similar threads: for some "characteristic" stories even a WWI solution is quite complex. E.g. if you have characteristics which allows a "range" (like temperature); here conditional logic by standard can bot be used (please check one related blog for this here).

Here even trying do do something with "ABAP" logic is not easy (and i am not sure if it is really possible)

For your "ABAP" part. As you know: phrases contain translations; so this "DIN" logic might makesense if you look on "phrase code" as in this case we can assume that the "content" is the same per language.

Your custom symbol could have therefore this logic

1.) first collect all phrase ids of the "characteristic" (starting from 1 to many phrases)

2.) then do a kind of look and just check: does phrase code contain "*"DIN" in the language as requested; if yes: put phrase id in "buffer" if not; ignore

3.) at the end your "buffer" contains any "DIN" phrase; so now by just using the phrase id as collected (in the sequence as stored in the "buffer") you can pass back to the report symbol a list of "texts" in this case the "phrase code of the selected language" and hand it over to the normal WWI processing and then you should get the required result

To make it short. Yes with a customer specific symbol i am pretty sure that you will get a solution and then only "DIN" phrases will print, even if "ASTM" is maintained as well

C.B.

PS: may be using the "PUSH" part in WWI you might get as well some solution; the "push/stack" topic is discussed often; you should invest here seom time

former_member602203
Participant
0 Kudos

Thanks Christoph, realy well explanation. I will use FM to pick right phrase...

Whats like the PUSH topic?

christoph_bergemann
Active Contributor
0 Kudos
former_member602203
Participant
0 Kudos

wow, thanks. I have never heard before, that exitist so much possibilities regarding symbole methods...

former_member602203
Participant
0 Kudos

Hi Mohammend,

Operator LK is not allowed for multiple valued characteristics...

former_member3035
Participant
0 Kudos

Hello Holger Hartung

What I understand - you want to output when your phrase selected in Character starting with *DIN* - If not DIN then it should not populate - I think you can use "LK" in Condition Output - Try with "LK" Text Compare option.

Thanks

Idrees