‎2007 Aug 22 11:35 AM
Hi All,
i need information regarding below select statement.
SELECT ebelp
ebeln
vgabe
SUM( menge ) AS menge
shkzg
FROM ekbe
INTO TABLE t_ekbe
WHERE ebeln EQ t_documents-ebeln
AND ebelp EQ t_documents-ebelp
AND ( vgabe EQ c_1
OR vgabe EQ c_2 )
GROUP by ebelp ebeln vgabe shkzg.
I am working 4.5b version now.All the data declartion is correct.This select statement goes to Dump .when ever data is selected before the select statment.
let me any other choices to do same.its urgent.
Thanks,
Arnald
‎2007 Aug 22 11:39 AM
‎2007 Aug 22 11:40 AM
SELECT ebelp
ebeln
vgabe
SUM( menge ) AS menge
shkzg
FROM ekbe
INTO <b>CORRESPONDING FIELDS OF</b> TABLE t_ekbe
<b>FOR ALL ENTRIES IN t_documents</b>
WHERE ebeln EQ t_documents-ebeln
AND ebelp EQ t_documents-ebelp
AND ( vgabe EQ c_1
OR vgabe EQ c_2 )
GROUP by ebelp ebeln vgabe shkzg.
‎2007 Aug 22 11:51 AM
Hi...Arnald..
Try this way... Runtime error may be bcoz of the Order of fields....
types : begin of st_ekbe,
EBELN TYPE EKBE-EBELN,
EBELPTYPE EKBE-EBELP,
VGABE TYPE EKBE-VGABE,
SHKZG TYPE EKBE-SHKZG,
MENGE TYPE EKBE-MENGE,
end of st_ekbe.
DATA: T_EKBE TYPE TABLE OF ST_EKBE.
SELECT
ebeln
ebelp
vgabe
shkzg
SUM( menge )
FROM ekbe
INTO TABLE t_ekbe
WHERE ebeln EQ t_documents-ebeln
AND ebelp EQ t_documents-ebelp
AND ( vgabe EQ c_1
OR vgabe EQ c_2 )
GROUP by ebeln ebelp vgabe shkzg.
<b>Reward if Helpful</b>
‎2007 Aug 22 12:00 PM
Hi,
If you are using into table statement, the declaration of the internal table and select statement fot the fields should be same as the internal table. If you are using this internal table for further modifications. it is better to use into corresponding fields.
If possible could please let us know what is the dump you are getting?
Thanks,
Sriram Ponna.