cancel
Showing results for 
Search instead for 
Did you mean: 

SAP Query

Former Member
0 Kudos

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?

Accepted Solutions (0)

Answers (1)

Answers (1)

thorsten_zielke
Contributor
0 Kudos

Let me suggest to catch the resulting SQL via R/3 transaction ST05. From there you should get the complete SQL statement with parameter values. Run this SQL from Database Studio or SQL Studio in connect mode 'Oracle' and let us know what you would expect.

Also, please post your MaxDB version.

Thorsten