on 06-17-2022 12:10 AM
Hello SAP Community,
I am creating a data action that has the following logic where I am calculating fields based on various conditions,
Everything works fine until I get to the PurchasesProduction calculation.
which has the following formula
DATA([d/CONCEPTO_INV] = "ComprasProduccion") = RESULTLOOKUP([d/CONCEPTO_INV] = "StockSeguridad", [d/Version] = %OriVersion%, [d/Date] = "202205") + RESULTLOOKUP([d/CONCEPTO_INV] = "PptoVentas") - RESULTLOOKUP([d/CONCEPTO_INV] = "StockInicial")
When I execute the data action in the history it shows me the result well
Formula.
ComprasProduccion = StockSeguridad = 200 + PptoVentas = 165 - StockInicial 415 = -50
Now I must add a logic to tell it that everything that is less than < 0 then 0 if not PurchasesProduction and for this add the following condition in the data action:
IF RESULTLOOKUP([d/CONCEPTO_INV] = "ComprasProduccion")<0 THEN
DATA([d/CONCEPTO_INV] = "ComprasProduccion")=0
ELSE DATA([d/CONCEPTO_INV] = "ComprasProduccion")=RESULTLOOKUP([d/CONCEPTO_INV] = "ComprasProduccion")
ENDIF
But the final result when executing the data action is a different result than expected:
As shown, it shows 165 when according to the conditional it should show 0 since -50 is less than 0.
Can someone tell me the procedure that I must correct to correct and that it works correctly?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
86 | |
10 | |
10 | |
9 | |
6 | |
6 | |
6 | |
5 | |
4 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.