Skip to Content
author's profile photo Former Member
Former Member

Dump with select stmt

Hi All,

Do you see anything wrong with this select stmt, it is giving me short dump.

DATA: BEGIN OF it_output OCCURS 0,

check TYPE c,

vbeln LIKE likp-vbeln,

lfdat LIKE likp-lfdat,

kunnr LIKE likp-kunnr,

knkli LIKE likp-knkli,

netwr LIKE vbak-netwr,

END OF it_output.

SELECT LIKPVBELN LIKPLFDAT LIKPKUNNR LIKPKNKLI VBAK~NETWR

FROM LIKP

INNER JOIN VBAK ON LIKPVBELN = VBAKVBELN

INTO TABLE IT_OUTPUT

WHERE LIKP~LFDAT IN S_LFDAT

AND LIKP~KUNNR IN S_KUNNR

AND LIKP~LIFSK = P_LIFSK.

Thanks

Veni.

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

5 Answers

  • Best Answer
    author's profile photo Former Member
    Former Member
    Posted on Oct 25, 2006 at 05:48 PM

    Hi

    DATA: BEGIN OF it_output OCCURS 0,

    One error is here:

    <b>*check TYPE c,</b>

    vbeln LIKE likp-vbeln,

    lfdat LIKE likp-lfdat,

    kunnr LIKE likp-kunnr,

    knkli LIKE likp-knkli,

    netwr LIKE vbak-netwr,

    <b>check type c,</b>

    END OF it_output.

    SELECT LIKPVBELN LIKPLFDAT LIKPKUNNR LIKPKNKLI VBAK~NETWR

    FROM LIKP

    • Another error is here

    <b>*INNER JOIN VBAK ON LIKPVBELN = VBAKVBELN</b>

    INNER JOIN LIPS ON LIKPVBELN = LIPSVBELN

    INNER JOIN VBAK ON LIPSVGBEL = VBAKVBELN

    INTO TABLE IT_OUTPUT

    WHERE LIKP~LFDAT IN S_LFDAT

    AND LIKP~KUNNR IN S_KUNNR

    AND LIKP~LIFSK = P_LIFSK.

    The link between sales order and delivery is in the item data, field is LIPS-VGBEL

    Max

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Oct 25, 2006 at 05:50 PM

    Hi veni,

    As your first field in the internal table is

    check type c,

    you are getting that short dump as it is trying to assign vbeln to check.

    Try to remove that field and try or declare it after declaring all the fields in that internal table.

    Hope this will help you.

    Vinod.

    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on Oct 25, 2006 at 05:45 PM

    You problem is the CHECK field in the internal table. You need to specific the INTO CORRESPONDING . If CHECK was not in the internal table, there would be no problem.

    DATA: BEGIN OF it_output OCCURS 0,
    <b>check TYPE c,</b>
    vbeln LIKE likp-vbeln,
    lfdat LIKE likp-lfdat,
    kunnr LIKE likp-kunnr,
    knkli LIKE likp-knkli,
    netwr LIKE vbak-netwr,
    END OF it_output.
    
    SELECT LIKP~VBELN LIKP~LFDAT LIKP~KUNNR LIKP~KNKLI VBAK~NETWR
    FROM LIKP
    INNER JOIN VBAK ON LIKP~VBELN = VBAK~VBELN
    INTO <b>CORRESPONDING FIELDS OF</b> TABLE IT_OUTPUT
    WHERE LIKP~LFDAT IN S_LFDAT
    AND LIKP~KUNNR IN S_KUNNR
    AND LIKP~LIFSK = P_LIFSK.

    Regards

    Rich Heilman

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Oct 25, 2006 at 05:46 PM

    <b>SELECT aVBELN aLFDAT aKUNNR aKNKLI b~NETWR

    FROM LIKP as a

    INNER JOIN VBAK as b ON aVBELN = bVBELN

    INTO TABLE IT_OUTPUT

    WHERE a~LFDAT IN S_LFDAT

    AND a~KUNNR IN S_KUNNR

    AND a~LIFSK = P_LIFSK.</b>

    Try like this.

    Regards,

    Prakash.

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Oct 25, 2006 at 05:47 PM

    Hi Veni,

    Try this

    DATA: BEGIN OF it_output OCCURS 0,
    check TYPE c,
    vbeln LIKE likp-vbeln,
    lfdat LIKE likp-lfdat,
    kunnr LIKE likp-kunnr,
    knkli LIKE likp-knkli,
    netwr LIKE vbak-netwr,
    END OF it_output.
    
    SELECT LIKP~VBELN LIKP~LFDAT LIKP~KUNNR LIKP~KNKLI VBAK~NETWR
    FROM LIKP
    INNER JOIN VBAK ON LIKP~VBELN = VBAK~VBELN
    INTO <b>corresponding fields of</b> TABLE IT_OUTPUT
    WHERE LIKP~LFDAT IN S_LFDAT
    AND LIKP~KUNNR IN S_KUNNR
    AND LIKP~LIFSK = P_LIFSK.

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.