Skip to Content
0
Jun 07 at 03:17 PM

Logic of EKPO-Elikz value in 2LIS_02_ITM extractor

88 Views Last edit Jun 07 at 03:04 PM 2 rev

Hi there,

Currently I'm trying to figure out what the logic is behind determining the most recent 'Delivery Completed Indicator' (2LIS_02_ITM-ELIKZ) value ('True' or 'False).

When looking in the EKPO table, you'll get an 'X' in the Elikz field when completed, however in the extractor you do not have simply one row with the most recent value, you'll have multiple rows and fields that are determining which is the most recent Elikz value.

With the following query, I came quite close, but it's definitely not the final logic being used in SAP.

            SELECT
                ebeln,ebelp,bwvorg,elikz,sum(aktwe) aktwe,sum(alief) alief,client
            FROM [EDW].[2LIS_02_ITM]
            WHERE 1=1
			and Bwvorg = 2
			and Rocancel = 'False'
            GROUP BY
                ebeln,ebelp,bwvorg,elikz,client
            HAVING SUM(alief) > 0

I noticed for instance that there are also many of the Elikz values that are recent, are actually when: bwvorg = 1 and Budat_dtm is null. But if I take that as a starting point, I'll also end up with the incorrect values.

Unfortunately for us there isn't a workaround via material movements, since the users ocassionally put the indicator on 'True' or 'False' manually.

Can anyone help me understanding the actual logic behind the 'Delivery Completed Indicator' in SAP?

Kind regards,

Igor