Application Development 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: 

Comma without preceding colon (after SELECT ?).

karuna_gangireddy
Contributor
0 Kudos

Hi All,

I am not very good at ABAP. I am writing a report in which i used the following SELECT statement.

-


TYPES: BEGIN OF ITAB,

xkunnr LIKE KNA1-KUNNR,

xname1 LIKE KNA1-NAME1,

xlifsd1 LIKE KNVV-LIFSD,

xfaksd1 LIKE KNVV-FAKSD,

xcrblb LIKE KNKK-CRBLB,

END OF ITAB.

DATA: IT_ITAB TYPE TABLE OF ITAB.

DATA: LS_ITAB TYPE ITAB.

SELECT KNA1KUNNR KNA1NAME1 KNVVLIFSD KNVVAUFSD KNKK~CRBLB

INTO ( IT_ITAB-xkunnr, IT_ITAB-xname1, IT_ITAB-xlifsd1, IT_ITAB-xaufsd1,

IT_ITAB-xcrblb )

FROM KNA1

INNER JOIN KNVV ON KNA1KUNNR = KNVVKUNNR

INNER JOIN KNKK ON KNA1KUNNR = KNKKKUNNR

WHERE ( KNA1KTOKD = '0001' ) OR ( KNA1KTOKD = 'C001' ) .

ENDSELECT.

SORT IT_ITAB BY XNAME1.

-


I am getting the error ' Comma without preceding colon (after SELECT ?)' at the SELECT statement. Could anyone please let me know what am i doing wrong here?

Thanks in Advance,

Karuna.

1 ACCEPTED SOLUTION

ferry_lianto
Active Contributor
0 Kudos

Hi,

Please remove ENDSELECT statement.


...
ENDSELECT.                      "<--- Remove this line

SORT IT_ITAB BY XNAME1.

Regards,

Ferry Lianto

4 REPLIES 4

ferry_lianto
Active Contributor
0 Kudos

Hi,

Please try this.


TYPES: BEGIN OF ITAB,
xkunnr LIKE KNA1-KUNNR,
xname1 LIKE KNA1-NAME1,
xlifsd1 LIKE KNVV-LIFSD,
xfaksd1 LIKE KNVV-FAKSD,
xcrblb LIKE KNKK-CRBLB,
END OF ITAB.

DATA: IT_ITAB TYPE TABLE OF ITAB.

DATA: LS_ITAB TYPE ITAB.

SELECT KNA1~KUNNR KNA1~NAME1 KNVV~LIFSD KNVV~FAKSD KNKK~CRBLB
INTO TABLE IT_ITAB
FROM KNA1 AS KNA1
INNER JOIN KNVV AS KNVV ON KNA1~KUNNR = KNVV~KUNNR
INNER JOIN KNKK AS KNKK ON KNA1~KUNNR = KNKK~KUNNR
WHERE KNA1~KTOKD = '0001' OR KNA1~KTOKD = 'C001'.

SORT IT_ITAB BY XNAME1.

Regards,

Ferry Lianto

0 Kudos

Hi Ferry Lianto,

Thank you for your quick response. I copied the code you mentioned but now i am getting a new error 'Incorrect nesting: For statement "ENDSELECT",there is no open structure introduced by "SELECT".

Thanks,

Karuna.

ferry_lianto
Active Contributor
0 Kudos

Hi,

Please remove ENDSELECT statement.


...
ENDSELECT.                      "<--- Remove this line

SORT IT_ITAB BY XNAME1.

Regards,

Ferry Lianto

0 Kudos

Thank you Ferry Lianto . I removed the statement 'ENDSELECT' and the program is now error free. Thank you very much. I also awarded the point as your help resolved my issue. Thanks again.