Hello folks,
i want to select to quantity of purchase orders, which will be delivered in the next X days (X = parameter).
I have a loop which selects materials. For each material i do:
liefdat = SY-DATUM. ADD D_DAYS TO liefdat. SELECT MAX( EKET~EINDT ) EKPO~MENGE INTO (maxdat, liefm) FROM EKPO INNER JOIN EKET ON EKPO~EBELN = EKET~EBELN AND EKPO~EBELP = EKET~EBELP WHERE EINDT <= liefdat AND EKPO~LOEKZ <> 'L' AND EKPO~MATNR = l_best-matnr GROUP BY EKPO~MENGE.
liefdat is CHAR8
liefm is QUANT_13
I always get an error, that the selected fields don't fit in the target fields.
can anybody help?
Thanks in advance,
Ph.