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

hi

IF itab-werks EQ '1000' OR itab-werks EQ '4000'.

SELECT SINGLE SUM (ERFMG) FROM MSEG INTO ITAB-ERFMG WHERE mblnr = itab-mblnr AND lgort = 'fgs' AND bwart = '101'.

ENDSELECT.

can anyone tell me is this statement correct?

Add a comment
10|10000 characters needed characters exceeded

Related questions

2 Answers

  • author's profile photo Former Member
    Former Member
    Posted on May 20, 2008 at 06:25 AM

    hi,

    if you write select single, then htere is no endselect required. see the code

    SELECT SINGLE SUM(ERFMG) FROM MSEG INTO ITAB-ERFMG WHERE mblnr = itab-mblnr AND lgort = 'fgs' AND bwart = '101'.

    regards,

    madhumitha

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on May 20, 2008 at 07:19 AM

    Hi Anuradha,

    Whenever you use SELECT SINGLE stmt, it means you are fetching a single value form the Databse table into a local variable or a field of an internal table.

    So, in such scenario, there is no need of TABLE addition or ENDSELECT along with the SELECT Stmt.

    So, only the below stmt will do.

    SELECT SINGLE SUM (ERFMG) FROM MSEG INTO ITAB-ERFMG WHERE mblnr = itab-mblnr AND lgort = 'fgs' AND bwart = '101'.

    Hope this is helpful to you. If you need further information, revert back.

    Reward all the helpful answers.

    Regards

    Nagaraj T

    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.