Skip to Content
author's profile photo
Former Member

Select statement issue--urgent

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

Add comment
10|10000 characters needed characters exceeded

  • Follow
  • Get RSS Feed

4 Answers

  • author's profile photo
    Former Member
    Posted on Aug 22, 2007 at 10:39 AM

    between INTO and TABLE corresponding fields is missing.

    Add comment
    10|10000 characters needed characters exceeded

  • author's profile photo
    Former Member
    Posted on Aug 22, 2007 at 10: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.

    Add comment
    10|10000 characters needed characters exceeded

  • Posted on Aug 22, 2007 at 10: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>

    Add comment
    10|10000 characters needed characters exceeded

  • author's profile photo
    Former Member
    Posted on Aug 22, 2007 at 11:00 AM

    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.

    Add comment
    10|10000 characters needed characters exceeded