Hi All,
I have created an Infoset Query in SAP with the follwing tables:
MDKP
EKKO
EKPO
EKET
when I run the report using this coding to calculate open Oders no results are returned:
SELECT eindt menge wemng glmng
INTO corresponding fields of table lt_eket
FROM eket
WHERE ebeln = lt_ekko-ebeln
AND ebelp = lt_ekpo-ebelp.
loop at lt_eket.
sort lt_eket by eindt ascending.
v_eindt = lt_eket-eindt.
tmp = sy-datum + 20.
if lt_eket-eindt <= tmp.
break afru.
bmeng = bmeng + lt_eket-menge.
lmeng = lmeng + lt_eket-wemng.
Endif.
Endloop.
Endloop.
Endif.
Endselect.
* Rückgabevariable
obestmenge = 200. "bmeng - lmeng.
Can anyone help me out with this?