Skip to Content
Sep 01, 2020 at 10:36 PM

How to Suppress NULL or Suppress from the queue SAP PI

322 Views Last edit Sep 01, 2020 at 10:50 PM 2 rev

I am attempting to filter inbound data by utilizing IF-THEN statements.The data will be split between multiple contexts in a queue. I want to then be able to concatenate multiple "non-filtered/suppressed" queue items and output them into a single Description field. Unfortunately, the Suppressed values are coming in as NULL values as well as a new Context Change. My code currently isn't managing the problem and I would appreciate any assistance.

Example Flow:

1 Material = 1 Product

1 Material can have [0..unbounded TDID and TDLINE items] per Product

Each Product has a Description and Product Specification based on TDID and TDLINE data (filtered). The TDLINE items need to be concatenated and output to a description field based on TDID. TDID can consist of two values 'GRUN' and 'IVER'.



If TDID equals 'IVER' -> concatenate associated TDLINE items -> output to field PRODUCT_SPECIFICATION

if TDID equals 'GRUN' -> concatenate associated TDLINE items -> output to field DESC2


(1)Display of Full Mapping:

-if TDID contains string 'IVER' then I want all its' associated TDLINE items

(2) Display of IF-THEN queue

-all TDLINE entries not associated with TDID 'IVER' are SUPPRESS

(3) Concatenate all TDLINE entries

-I want to concatenate all TDLINE entries ignoring the SUPPRESS/NULL entries while still managing context as it is important

(4)Output concatenated contents to Description field -> NOT WORKING.

-This doesn't appear to be working as nothing is being written to the field. I "believe" it could be in part due to NULL values or context changes.

Original Code:

I have attached my UDF original code as my latest looked jumbled.

Any help would be greatly appreciated. Thank you all very much.


pi-mapping.jpg (24.5 kB)
if-then.jpg (39.0 kB)
udf.jpg (34.4 kB)
output.jpg (27.7 kB)