on 06-05-2023 6:09 PM
Buenos días,
Estoy intentado meter IF aninados en una función, pero siempre me da error de sintaxis;
Por ejemplo tengo esto metido en la función, pero claro, si se cumple el primero, el segundo ya no sale datos, ¿hay alguna manera de que filtrando por OF me puedan salir varios datos que yo quiera?
if {OPPOR.YTIPOMERCADO_0} = 'OF' then
OFX := OFX+{ZDATCOM.COSTEPROD_0};
else
if {OPPOR.YTIPOMERCADO_0} = 'OF' then
MTOFX := MTOFX+{ZDATCOM.COSTEMAT_0}
Un saludo
It looks like you're trying to update two different values based on the same condition. Assuming that OFX and MTOFX are variables that you're setting, you need to change this part of your formula to this:
if {OPPOR.YTIPOMERCADO_0} = 'OF' then
(
OFX := OFX+{ZDATCOM.COSTEPROD_0};
MTOFX := MTOFX+{ZDATCOM.COSTEMAT_0};
);
-Dell
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
82 | |
11 | |
10 | |
8 | |
6 | |
6 | |
6 | |
6 | |
5 | |
5 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.