Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Select statement issue--urgent

Former Member
0 Likes
587

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

4 REPLIES 4
Read only

Former Member
0 Likes
560

between INTO and TABLE corresponding fields is missing.

Read only

Former Member
0 Likes
560

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.

Read only

varma_narayana
Active Contributor
0 Likes
560

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>

Read only

Former Member
0 Likes
560

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.