Skip to Content
0
Nov 30, 2022 at 03:08 PM

Application of Generic Stack Function with Conditional Output in WWI Template

370 Views Last edit Nov 30, 2022 at 03:18 PM 2 rev

Dear All,

I have following Business Requirement,

I need to display components with specific details as below for a particular Real Sub.

Below components are maintained in VAT SAP_EHS_1012_022 i.e. Hazardous Ingredients (GHS).

Also I have a condition that out of the below components I only need to further display the components who have Regulatory List TSCA maintained in VAT SAP_EHS_1023_012 (Notification status) and Notification value as “Yes” for each Component.

image.png

Lets Say in the components, the Notification status data is maintained for Spec 1 and Spec 2 as Regulatory List TSCA and Notification value as “Yes” then below should be my final Output.

image.png

If Data is not maintained for any of the components then I need to display below output.

image.png

***********************************************************************************************************************************

Now below is the piece of code I have written,

image.png

<01GESTRSUBID(M:C14N_SYMBOL_STACK_NEW)[D:Specification]>

<11BRG046(M,SAP_EHS_1012_022 ;*)>

<11BRG047(S:POS;*)>

<11BRG048(M,SAP_EHS_1023_012;*)>

<15BIF049(AND:01G1023012B1 LK "TSCA",01G1023012C1 LK "Yes")>

<01GESTRSUBID(M:C14N_SYMBOL_STACK_PUSH)[D:Specification]>

image.png

<15EIF049>

<11ERG048>

<11ERG047>

<11ERG046>

<13BNG066(*:01GESTRSUBID(M:C14N_SYMBOL_STACK_TOP))>

<13CNG066>

image.png

13ENG066>

When I try to execute the code below is my output,

image.png

The output of 'Value' is blank. The reason I understood is when I pass the code of conditional output with Repetition group of SAP_EHS_1023_012 (Notification status) whose Value Category is C i.e. Composition, The code now tries to fetch composition output of 'Value' from SAP_EHS_1023_012 (Notification status) where there is no data maintained. So it returns me a blank value. But I need the value to be fetched from SAP_EHS_1012_022 i.e. Hazardous Ingredients (GHS) from the main Real Sub.

Can you please check my code and let me know what correction should I make to get output as below,

image.png

Regards,

Rohan

Attachments

image.png (8.1 kB)
image.png (5.8 kB)
image.png (3.0 kB)
image.png (4.3 kB)
image.png (2.9 kB)
image.png (1.1 kB)
image.png (1.2 kB)
image.png (5.5 kB)
image.png (6.0 kB)