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

Join condition syntax error (Urgent).

Former Member
0 Likes
691

Hi everybody,

I am using the below statement in one of my programs. But it gives an syntax error as 'The literal is more than 255 characters'. It doesn't even allow me to do a pretty print. Can anyone help me please to solve this issue. This is urgent.

Select ce4PAPH1 ce4MVGR2 ce3~VVBMC001

INTO corresponding fields of TABLE I_BRANDWISE

from CE4OPC1 as CE4

inner JOIN CE3OPC1 as CE3

ON CE4PAOBJNR = CE3PAOBJNR

where CE4opc1-AKTBO = ‘X'

and CE4~BUKRS = ‘1000’

and CE4~KNDNR = P_SOLDTO

and CE4KOKRS = ‘CCA1’ AND CE3PALEDGER = ‘01’

and CE3~PLIKZ = 0

and ( CE3VRGAR BETWEEN ‘B’ AND ‘C’ and CE3PERBL BETWEEN P_STRPER AND P_ENDPER )

and CE4~MVGR2 IN S_BRAND.

Thanks in advance... Amit.

4 REPLIES 4
Read only

former_member199581
Active Participant
0 Likes
655

You have to check your ' ' in the conditions.

Also, check out that strings between ' ' does not go to a new line.

The syntax error you get is caused by a value preceeded by a ' and not closed by another '.

For example:


text = 'Hello World.   "This will cause the error because of the missing ' at the end


text = 'Hello World'.   "This is ok

Hope this helps,

Roby.

Read only

Former Member
0 Likes
655

Hi,

try not keeping this statement in a single whole line.

CE3~VRGAR BETWEEN ‘B’ AND ‘C’ and CE3~PERBL BETWEEN P_STRPER AND P_ENDPER

keep it as

CE3~VRGAR BETWEEN ‘B’

AND ‘C’

and CE3~PERBL BETWEEN P_STRPER

AND P_ENDPER

Regards,

Satish

Message was edited by:

Satish Panakala

Read only

Former Member
0 Likes
655

Also, make sure your quotes are actually quotes, if that makes sense. Sometimes if you copy things into the ABAP editor from MS Word, email, etc. then the editor doesn't like the font. It may look like a quote, but delete it and type it back in.

Read only

Former Member
0 Likes
655

Try:

SELECT ce4~paph1 ce4~mvgr2 ce3~vvbmc001
  INTO CORRESPONDING FIELDS OF TABLE i_brandwise
  FROM ce4opc1 AS ce4
  INNER JOIN ce3opc1 AS ce3
    ON ce4~paobjnr = ce3~paobjnr
  WHERE ce4~aktbo = 'X'
    AND ce4~bukrs = '1000'
    AND ce4~kndnr = p_soldto
    AND ce4~kokrs = 'CCA1'
    AND ce3~paledger = '01'
    AND ce3~plikz = 0
    AND ( ce3~vrgar BETWEEN 'B' AND 'C'
    AND   ce3~perbl BETWEEN p_strper AND p_endper )
    AND ce4~mvgr2 IN s_brand.

Rob