cancel
Showing results for 
Search instead for 
Did you mean: 

WWI:looping over compositions

michael_schmalfeldt2
Participant
0 Kudos

Hi,

we have a three layer data model in EH&S and I would like to loop (S:POS) over all layers in the WWI layout and list some identifiers.That's basically what I want:

<11BRG001(M,SAP_EHS_1012_001;*)><11BRG002(S:POS;*)><11BRG007(M,DSM_EHS_XXXX;*)><11BRG006(S:POS;*)>

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

<11BRG009(M,DSM_EHS_YYYY;*)><11BRG008(S:POS;*)>

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

<11ERG008><11ERG009><11ERG006><11ERG007><11ERG002><11ERG001>


But I get the error "Maximum recursion depth 1 for environment S:POS has been exceeded". Any idea how to solve this?

regards, Michael

Accepted Solutions (1)

Accepted Solutions (1)

christoph_bergemann
Active Contributor

Hello Michael

not sure regarding your code and what you would like to get; but POS can be used only on one level (and I have never seen the need for a second layer as in your example)

<11BRG001(M,SAP_EHS_1012_001;*)><11BRG002(S:POS;*)><11BRG007(M,DSM_EHS_XXXX;*)><11BRG006(S:POS;*)>

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

<11BRG009(M,DSM_EHS_YYYY;*)><11BRG008(S:POS;*)>

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

<11ERG008><11ERG009><11ERG006><11ERG007><11ERG002><11ERG001>

You have the "main" group <11BRG001(M,SAP_EHS_1012_001;*)

And the "salve" group: <11BRG002(S:POS;*); then you can use: (<01GESTRIDENT(I:NAM,PROD,)[D:Identifier]>

But you can not use "POS" twice

What is the business purpose of your wish?

Depending on your need: may be some "customer" symbosl could be used

C.B.


Answers (1)

Answers (1)

michael_schmalfeldt2
Participant
0 Kudos

Hi Christoph,

as I did not find any solution using standard repeating groups I went for another approach.

We need it for product labels where we need to declare both raw material and active ingredient quantities.

Kind regards, Michael

christoph_bergemann
Active Contributor
0 Kudos

Dear Michael

not sure if i fully understand your requirement.

This is my interpretation:

1.) you would like to print identfiers to describe the "raw material" compositon

2.) and you would like to print identifier to describe "ingredient" composition

Normally I would use for this purpose two properties. One property for describing the "raw material part" and the other to describe the "ingredient" part. Using this approach you have two normal main groups (by property) and two POS groups (per main group)

The "best" would be then: using some "Expert rules" to either populate bot properties in one run or by using data from "raw material composition" to derive" ingredient" composition

This approach would be (from my point of view) Best practise WWI development and Best Practise in use of Rule Sets

On the topic: if needed you can better support "change" marks (per property) if needed

More or less it could run as:

Contains 10 % Sugar, 20% milk, 69% water, 1 % coffein (raw material compositon)

and the other part could run as

contains X, Y, Z what ever is NAM PROD on "ingredient" level)

Simple solution.

It is not a good idea to make WWI templates to complex... (many reasons for this)

C.B.