cancel
Showing results for 
Search instead for 
Did you mean: 

Understanding of WWI Code

Former Member
0 Kudos

Dear Experts,

Today I came across following 'standard' WWI code but i am not able to interpret the same.

Code is

<11BRG002(M,SAP_EHS_1023_070;*)>

              <13BNG003(+:01GESTVCOMPC)>

                       ABCD

               <13CNG003>

                       EFGH

                <13ENG003>

<11ERG002>

and the output is

      EFGH

Now, As I understand that, Master Repeating group is applied for SAP_EHS_1023_070 ( Other Regulations (KR)).

Tree Path: Standard Properties--> Regulations--> Other Regulations--> Asia/Pacific--> Other Regulations (KR)

then on the next line, Blank Compression is applied using report symbol GESTVCOMPC which is for 'Component Type' ( Table: ESTVP, Field:COMPCAT)

Blank compression also has 'else' loop starting with 13CNG003.

As per current status, the output is EFGH which means that, the first part of condition is not fulfilled and thus second part EFGH is getting printed.

My question, is that, what or which data I should maintain in specification so that first condition will get fulfilled?

<13BNG003(+:01GESTVCOMPC)>

I wanted to print the data of first condition.

Kindly Advise.

Thanking You,

Regards

Amol Joshi

Accepted Solutions (1)

Accepted Solutions (1)

christoph_bergemann
Active Contributor
0 Kudos

Dear Amol

if property: "Other Regulations (KR)" is of type "Composition" then one can maintain "components" with component type etc. Now if this property is of type "C" (composition) (did not check that) normally you need a further "POS" group within the master group (if i remember correct). If you maintain now one component in composition you "must" maintain a component type. If one line would be found during data collection I would assume that you will get the "IF" output ABCD; now you need to understand that years ago SAP changed their philosophy with compositions, you can (if i rememberr correct) maintain in one line only ! the "Exception value" without reference to one component and without a component type,. Once again in this case you would get the "Else" value

What is the purpose of this WWI code? Nether seen somthing like that

C.B.



Former Member
0 Kudos

Dear Christoph,

Thanks for the reply.

I would like to convey you that, this is standard code from SDS of korea which i got with CLEO 2012-2 update. so we are adopting standard template for Korea.

also, as mentioned by you, that report symbol is looking for value in "Component Type" filed is correct but the problem is that, Class do not have composition tab but it has "Spec. Listing" tab so there is no field "Component Type" within Class SAP_EHS_1023_070 ( Other Regulations (KR) and thus IF

loop not getting value and it is going to ELSE loop.

.

Now, can you quickly guide me, which Report Symbol i should use instead of 01GESTVCOMPC so thta it will look for the value in 'Spec' field of 'Spec. Listing" tab and will fulfill the IF loop and print ABCD.

Kindly Adivse.

Regards

Amol

P.S: Thus i feel, the standard SAP Code will not work for standard SAP Class SAP_EHS_1023_070 ( Other Regulations (KR). is my conclusion correct?

christoph_bergemann
Active Contributor
0 Kudos

Dear Amol

http://help.sap.com/erp2005_ehp_06/helpdata/en/a7/2873620a6c11d28a220000e829fbbd/content.htm?framese...

shows the topic of the "POS" group.

http://help.sap.com/erp2005_ehp_06/helpdata/en/a7/2872c60a6c11d28a220000e829fbbd/content.htm?framese...

Chapter:  Example: Layout of an Abridged Material Safety Data Sheet shows the use of the master group together with pos group

E.G.

11BRG003 (M,SAP_EHS_1012_004;*)>

3  <03EHS_L_TEXT(CED

  -SDB-01.002)> ¤

<03EHS_L_TEXT(CED-

SDB-02-07)> ¤

<03EHS_L_TEXT(CED-

SDB-02-05)> ¤

4  <11BRG002 (S:POS;*)> ¿

5 <01GESTRIDENT(I:NAM,

6  IUPAC,;*)> <11ERG002>¤

7

8

9

<11BRG002 (S:POS; *)> ¿

<01G1023001R2(C;*)

><11ERG002>¤

<11BRG002 (S:POS;*)> ¿

<01GESTVPRECL>

<01GESTVCOMPL(N:" ZZ9,9")>

<01GESTVCOMPE>

<11ERG002> ¤

10  <11ERG003>

The "blank" compression if elsif endif" logic can be applied to that if needed. E.g. you could use that "before"/"around"

11BRG002 (S:POS;*)> ¿

5 <01GESTRIDENT(I:NAM,

6  IUPAC,;*)> <11ERG002>

In the sense: if "no" identifier is found print "xy"; in chapter "Blank Compression" of SAP help only examples wih "characteristics"  are presented (e.g. chapter "Example: Blank Compression"

13BNG001(+:02GKNA1NAME1)>

Name:

<02GKNA1NAME1>

Street:

<02GKNA1STRAS>

City:

<02GKNA1ORT01>

<13ENG001>

or (with alternative)

<13BNG000(+:01GESTRILXFLG)>

<01GESTRILXFLG>

<13CNG000>

<01GESTRIDENT>

<13ENG000>

But in relation to the "POS" group it should work as well.

C.B.

Former Member
0 Kudos

Dear Chirstoph,

Thanks for such a elaborated reply.

I would like to convey you that, within ABCD - I've S:POS group only. Once the 1st coniditon got fulfilled, ABCD has the required code line to fetch the identifier nams , compostion ect...

My problme is with Blank Compression before that,

basically i want,

If class has Specification Lisiting maitained then go deep of ABCD ( which has code to fetch the identifier, composition ELSE print EFGH ( Print Not Relevant as specification listing is not available)

So i am looking for Report symbol or code which will do checking of spec listing availability then print ABCD else EFGH

Regards

Amol

0 Kudos

Dear Amol,

Component type is a field normally only available for compositions, not spec. listing.

So if your template is testing if there is a component type, the "Yes" part of the test means "it's a composition" and the "no" part means it's not (might be a spec listing, or a normal VAT). In your case, you use a spec. listing so the test will always give a negative answer.

I didn't find a standard report symbol telling if the "component-receiver VAT" is a real composition or a spec. listing. Nevertheless, the POS repeating group behaves in quite the same way on compositions and spec. listings. So, for your issue, I suggest to try and switch the "then" and "else" part of you blank compression.

If there is no specification in the spec. listing, the POS repeating group that will then be triggered (if I understood correctly) won't display nothing... just ensure that titles (if any) are included in the POS repeating group and are only displayed once before the first specification.

For your information, in the system to which I have access, the SAP_EHS_1023_070 VAT is a composition, not a spec listing.

I hope this will help you a little.

Kind regards,

Jean-Philippe

christoph_bergemann
Active Contributor
0 Kudos

Dear Amol

now we have the story...  (sorry seems that I missed your last reply). I would propose this:

a.) if the spec listing is maintained than at least one specid is mentioned. There is a report symbol available to print simply the spec id (with POS group you could then use then to print e.g. identifier of spec ids)

b.) now by using this approach you can try to use "blank compression" like: check if at least one spec id is present: print e.g. some identifer; if not (as in your case) print "Not relevant" or whatever.

There is a further options (which is not as stable as the first one). YOu could check if spec id is present "and" some identifiers (either direct or with ident listing);

The test regarding " is spec id available" is more stable  in comparison to the test is spec id available and a specific identifier (e.g CAS number...)

Hope you wil get now the solution

C.B.

PS: I assume that you know that value assignment types of type "B" and "C" are handled EHS internally the same; that means data is stored in ESTVP. 

PPS: as you received the new layout as part of CLEO (according to my understanding) you should ask: is there an update in that property? In the last years there is a trend to switch from "B" to "C" and therefore the WWI code you showed might make sense if definition has changed

PPS: Jean Philippe just added further remark: so we are now sure: in future SAP versions this VAt is of type C

Former Member
0 Kudos

Dear Jean-Philippe & Christoph,

Thanks a lot for your kind replies. Now I got a understanding that, why this code is going to else loop always.

My system is of B Type ( Spec. Listing) and the code written is for C Type VAT ( Composition ) and this always going to ELSE loop.

Now my one more basic question,

Which Logic or Report symbol is should use the check whether Spec. List is maintained or not.

Like,  01GESTVCOMPC is user in case of Composition, so which Report symbol I should user for Spec Listing.

IF spec listing maintained then go deep ELSE come out.

can you convey me how I can achieve this logic.

Thanking You,


Regards

Amol

P.S: once the first IF loop got positive result then ABCD do have the required code of S:POS so that is not a problem at this moment.

christoph_bergemann
Active Contributor
0 Kudos

Dear Amol

Using WWI one can print spec id /there is a standard symbol available ot do so) either from spec header or from composition or from spec listing (nether tried "reference" but could be possible too)

Therefore: as mentioned before try this:

a.) if the spec listing is maintained than at least one specid is mentioned. There is a report symbol available to print simply the spec id  (with POS group you could then use then to print e.g. identifier of spec ids)

b.) now by using this approach you can try to use "blank compression" like: check if at least one spec id is present: print e.g. some identifer; if not (as in your case) print "Not relevant" or whatever in "else" part.

There is a further options (which is not as stable as the first one). YOu could check if spec id is present "and" some identifiers (either direct or with ident listing);

The test regarding " is spec id available" is more stable  in comparison to the test is spec id available and a specific identifier (e.g CAS number...)

C:B.

PS: regarding spec listing you can only check for "existance" of spec id or of existance of some identifier related to the spec id.

Former Member
0 Kudos

Hello Jean-Philippe & Christoph,

Thanks for your valuable inputs.

As per your suggestion, i do have incorpoated a below code and used blank compression but it is not working.

I know you will understand the code but still trying to explain at my level.

<11BRG002(M,SAP_EHS_1023_070;*)> ( Repeating Group Started)

<11BRG004(S:POS;*)> ( Slave Repating Group Started, going to spec listing’s sepc)

<13BNG000(*:01GESTRIDENT(I:NAM,PROD,))> ( Blank Compression)

<01GESTRIDENT(I:NAM,PROD,)[D:Identifier]> ( fetchin Identifer value)

<13CNG000>( else loop)

                                <01G1023070RE(P)[D:Remarks]> (Remark value)

<13ENG000>

<11ERG004>

<11ERG002>

When it is going to ELSE loop, there is it not allowing me to nest a repeating group around 01G1023070RE(P)[D:Remarks]> and thus it is still in S:POS group which is not correct. So here it will look for 'Remark' value of specification which is mentioned in Spec.Listing and not the main one..

Thus I feel, Blank Compression may not work.

Can you please advise here....

Regards

Amol

0 Kudos

Hello Amol,

If you want to check if there is a component (in composition or spec. listing) and, based on the check display something not coming from the component, you might try the following:

     <01GESTRAUTHG(M:C14N_SYMBOL_STACK_NEW)> (initialization of a stack)

     <11BRG002(M,SAP_EHS_1023_070;*)> ( Repeating Group Started)

<11BRG004(S:POS;*)>

<01GESTRAUTHG(M:C14N_SYMBOL_STACK_PUSH)> (put a value in the stack when there is a component)

<11ERG004>

<11ERG002>

     <13BNG000(*:01GESTRAUTHG(M:C14N_SYMBOL_STACK_TOP))> (Blank compression that checks if there is a value in the stack. Next line = then clause)

                Here put what should be displayed when there are components in your composition or spec listing

     <13CNG000> (If there is no value in the stack - no component - the next lines are used = else clause)

          <11BRG003(M,SAP_EHS_1023_070;*)>

          <01G1023070RE(P)[D:Remarks]> (Remark value)

          <11ERG003>

     <13ENG000>

For this to work, you need to have the 3 function modules available in your system:

     - C14N_SYMBOL_STACK_NEW

     - C14N_SYMBOL_STACK_PUSH

     - C14N_SYMBOL_STACK_TOP

Hope this helps.

Kind regards,

Jean-Philippe

christoph_bergemann
Active Contributor
0 Kudos

Dear Amol

the proposal of Jean-Philippe is interesting. These "special" symbols are not used often (may be to rarely).

Check e.g.:

http://www.consolut.com/en/s/sap-ides-access/d/s/doc/YD-CSM-RG-STACK

http://www.consolut.com/en/s/sap-ides-access/d/s/doc/YD-CSM-RG-DGCH14

http://www.stechno.net/sap-notes.html?view=sapnote&id=1576098

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

Regarding "nesting" of "groups". Check e.g

http://help.sap.com/erp2005_ehp_06/helpdata/en/a7/2873620a6c11d28a220000e829fbbd/content.htm?framese...

Chapter: Repeating Groups

Can you check without "Blank compression" please? Can you insert the repeating group "around" <01G1023070RE(P)[D:Remarks]>;

Does it work?

I believe you should go on step by step

C.B.

dhinsap
Active Participant
0 Kudos

Dear Jean,

I have a difficulty in understanding the concept of template creation using symbols and phrases. Can u share any document that explains a sample template creation like SDS.In creating 15 sections and printing the phrases specific to a material.Need some guidance.

Regards

Dhinesh

christoph_bergemann
Active Contributor
0 Kudos

Dear Dhinesh,

a.) please check SAP Online help; examples of layouting are provided there

b.) please check: http://scn.sap.com/docs/DOC-41109

Dear Amol

I have found further interesting links etc. May be check (for now and future)

http://www.stechno.net/sap-notes.html?view=sapnote&id=579846

http://www.stechno.net/sap-notes.html?view=sapnote&id=1250868

http://www.stechno.net/sap-notes.html?view=sapnote&id=1328380

http://www.consolut.com/en/s/sap-ides-access/d/s/doc/YP-RELNEHS_SAF_27A_VFG

Further hint not related to WWI:

This "Is else endif" logic is nice and does have great value. To do testing like: is there a data record present to be printed in WWI is only the "last answer" to a problem. The main reason is: after e.g. one year you need "days" (believe me!) to explain why in WWI layout (released report) value "X" has printed but not "Y". Therefore:

In most cases the value assignment type of interest does have a characteristic called "Remark". Now by using e.g. Expert Server rules you could populate the characteristic and now the WWI would have a "easy and simple chance" to retrieve data. E.g. if no data is present (which you are looking for) the expert rule could populate the charactersitc with a phrase like "According to our information there is no indication of..." or "No data available" or something similar so that you can "explain" to customer the data shown / presented.

It is not a "good" idea to use WWI for checking of existance of data. A "better" approach as mentioned, is to populate the property with data which has been generated by e.g. expert rules. This approach does have the further pro: you can search for the data using standard EHS queries and normally the business is supported better (and to is more stable regarding legal aspects).

C.B.

PS: you could may be check further WWI options; we have "blanl compression" and "conditional output"

http://help.sap.com/erp2005_ehp_06/helpdata/en/6c/b088411c90be0fe10000000a1550b0/content.htm?framese...

Conditional output. SAP help provides this hint:

Conditional Output

Use

With this function, you can define conditions that must be fulfilled before a specific text section can be output.

Integration

In blank compression, the system checks only for empty values; in conditional output, it checks for the values you specify.

Answers (0)