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

sql statments with constats

Hi,

I want to fill an internal table (2 fields) and a constat value ('CONFIRMED') to every line.

Below gives me an error.

Any pointers ?

select

X_EKKO~EBELN

'CONFIRMED'

from EKKO as X_EKKO

inner join LFA1 as X_LFA1 on X_LFA1LIFNR = X_EKKOLIFNR

inner join EKPO as X_EKPO on X_EKPOEBELN = X_EKKOEBELN

inner join EKES as X_EKES on X_EKESEBELN = X_EKPOEBELN AND X_EKESEBELP = X_EKPOEBELP

into table i_MasterDataConf

where

(where_clause)

AND X_EKES~EINDT > l_enddate2.

//Martin

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

2 Answers

  • Best Answer
    author's profile photo Former Member
    Former Member
    Posted on Feb 17, 2005 at 01:02 PM

    Hello Martin,

    You cannot use the literal 'CONFIRMED' in the SELECT statement !! The SELECT statement allows you to only <i>select</i> the data <i>from the database</i>.

    In your code, use the addition INTO CORRESPONDING FIELDS OF i_MasterDataConf.

    Then fill the internal table with the value 'CONFIRMED' in the second field of all rows using the statement

    MODIFY ITAB FROM ITAB TRANSPORTING <NAME OF THE SECOND FIELD> WHERE <SECOND FIELD> EQ SPACE.

    Regards,

    Anand Mandalika.

    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on Feb 17, 2005 at 12:52 PM

    Hello,

    First of all you can select all the data from the transparent table into IntTab.

    Then you can fill the constant value by LOOP ... MODIFY InTab. ... ENDLOOP.

    Regards, Murugesh AS

    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.