cancel
Showing results for 
Search instead for 
Did you mean: 

WWI Coding - Feasibility

Former Member
0 Kudos

Dear All,

I want to put a conditional output based on the phrase maintained in a characterstics.

For example: if a characteristics "SAP_EHS_1018_001" contains a phrase "No Data Available",

then another phrase "Remarks" shall not appear on the output report.

Output:

No Data Available

But if the phrase maintained for the characteristic "SAP_EHS_1018_001"

contains a phrase other than "No Data Available", then the other phrase along with"Remarks" shall appear on the output report.

Output:

Remarks:abcdefgh(The other phrase)

I also tested the below code and it works:

 

<11BRG044(M,SAP_EHS_1018_001;*)>

<13BNG116(+:01G1018001RE)>

<15BIF000(AND:01G1018001RE LK "no data available")> 

<15CIF000>

<03EHS_L_TEXT(CED-E11.00900050)[D:Remarks]>:

<15EIF000>

<11BRG003(D;*)>

<01G1018001RE(P;*)>

<11ERG003>

<13ENG116>

<11ERG044>

But the problem is the report can be generated in different languages.

So if I generate the report in any language other than English (EN), the above code fails.

And it does not look good, if I code with "OR" logic and put the phrase "No Data Available" in all the languages in the conditional check.

Is there any other way of doing this.?

Would really appreciate if there is some other way of doing this.

Thanks in advance.

Best Regards,

Aarohi

Accepted Solutions (0)

Answers (5)

Answers (5)

christoph_bergemann
Active Contributor
0 Kudos

Dear Aarohi

you should avoid if possible to use such WWI logics... many people love to use this kind of logics;

yes they are possible; but just using different maintenacne approach can do the same "trick".

Example: normally many of the WWI reports generated need to be shared with customer. "No data available" is a "bad" choice to print; Most of the EHS Classes contains a characterisrtic called "Remarks"; Now it depends "only" on clever use of data maintenance to make sure what will show up in WWi report without any WWI logic.

C.B.

Ralph_P
Product and Topic Expert
Product and Topic Expert
0 Kudos

Hi Aarohi,

As Peter explained make the check language-independent by looking for the phrase key instead of the text. That will do the trick.


Ralph

Former Member
0 Kudos

You shouldn't be comparing the text using conditional output.  You should be looking at the phrase id.   For example, <15BIF102(AND:01G1018001RE(K) LK "CUST-XXXXXXXXX")>

Former Member
0 Kudos

Thank you Peter

I was facing same issue and this code with phrase ID is working perfectly for me.

Former Member
0 Kudos

Hi !

Really tricky demand !

In conditional Output, you are comparing a string, “No Data Available” against a phrase assigned (in English).

Based upon the outcome you are printing the “Data” as ‘Phrases’.

Ok. Your code works fine for one report language – English !

Now you want to extend it to other languages that would come up in the final report !.

Here you can use Repeating Group of Type – “Validity Area, Language”.

But the problem comes in the conditional output !. Because every time you are comparing the string, “No data Available” against the possible phrases in the “Remarks”.

Eg. If the report language is German, you would get the phrase, ‘Keine Daten verfügbar’ to compare with your comparison string. In that case, your condition would fail. If you further explain or give hint about your business process for this, it would be easy to discuss the logic !

Regards

Subash Sankar.

Former Member
0 Kudos

Hello Aarohi

the topic about “Conditional output” has been discussed  very recently. Refer below threads

http://scn.sap.com/docs/DOC-48359

http://scn.sap.com/thread/3444598

Balajee