Application Development and Automation 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: 
Read only

Error ORDER BY

Former Member
0 Likes
795

Hi, I have a problem with a select, the error is: Comma without preceding colon (after SELECT ?).

IF NOT COMM_STRUCTURE-/bic/zkilat IS INITIAL .

SELECT FECHA, KILAT, VALOR FROM ZBW_T0004

WHERE KILAT EQ COMM_STRUCTURE-/bic/zkilat

ORDER BY FECHA ASCENDING.

IF SY-SUBRC EQ 0.

RESULT = ZBW_T0004-VALOR.

ENDIF.

ENDIF.

thanks

Mike

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
766

You will need an INTO as well.

Rob

5 REPLIES 5
Read only

naimesh_patel
Active Contributor
0 Likes
766

Remove commas from the fields of the select query.

Like


SELECT FECHA KILAT VALOR 
FROM ZBW_T0004
WHERE KILAT EQ COMM_STRUCTURE-/bic/zkilat
ORDER BY FECHA ASCENDING.

Regards,

Naimesh Patel

Read only

Former Member
0 Likes
767

You will need an INTO as well.

Rob

Read only

0 Likes
766

To place this

SELECT FECHA KILAT VALOR

INTO CORRESPONDING FIELDS OF COMM_STRUCTURE-/bic/zkilat

FROM ZBW_T0004

WHERE KILAT EQ COMM_STRUCTURE-/bic/zkilat

ORDER BY FECHA ASCENDING.

Says to me, The work area (or internal table) "COMM_STRUCTURE-/BIC/ZKILAT" is not structured

Read only

0 Likes
766

Try like:


DATA: LA_WORK TYPE ZBW_T0004.

SELECT FECHA KILAT VALOR
INTO CORRESPONDING FIELDS OF ZBW_T0004  " <<
FROM ZBW_T0004
WHERE KILAT EQ COMM_STRUCTURE-/bic/zkilat
ORDER BY FECHA ASCENDING.

Regards,

Naimesh Patel

Read only

0 Likes
766

To place this

ENDSELECT

Thanks you very much to All