2007 Jun 08 1:52 PM
Hi all, I have the following code but it is giving me a syntax error which says "The text literal "'. " is longer than 255 characters. Check whether it ends correctly."
case vbdkl-vkorg
when '0010' or 0011' or '0020' or '0030' or '0040' or '0060' or '0065'.
w_include = 'tvko-txnam_kop'.
when '0021'.
w_include = 'zadrs_hdr_ver_weatherbond'.
when '0012'.
perform get_bzirk
using vbdkl-kunnr
vbdkl-vkorg
kna1-telf1
kna1-telfx
changing w_bzirk
w_prt_phone
if w_bzirk = 'CARLSH'
w_include = 'tvko-txnam_kop'.
else
w_include = 'NAME1'.
endif.
when '0050'.
perform get_bzirk
using vbdkl-kunnr
vbdkl-vkorg
kna1-telf1
kna1-telfx
changing w_bzirk
w_prt_phone
if w_bzirk = 'CCWSH'
w_include = 'tvko-txnam_kop'.
else
w_include = 'NAME1'.
endif.
when others.
w_include = 'tvko-txnam_kop'.
endcase.Regards,
Davis
2007 Jun 08 1:58 PM
Hi Davis,
Have you pasted code as it is, if yes then you are missing lots of dots '.'
case vbdkl-vkorg.
when '0010' or '0011' or '0020' or '0030' or '0040' or '0060' or '0065'.
w_include = 'tvko-txnam_kop'.
when '0021'.
w_include = 'zadrs_hdr_ver_weatherbond'.
when '0012'.
perform get_bzirk
using vbdkl-kunnr
vbdkl-vkorg
kna1-telf1
kna1-telfx
changing w_bzirk
w_prt_phone.
if w_bzirk = 'CARLSH'.
w_include = 'tvko-txnam_kop'.
else.
w_include = 'NAME1'.
endif.
when '0050'.
perform get_bzirk
using vbdkl-kunnr
vbdkl-vkorg
kna1-telf1
kna1-telfx
changing w_bzirk
w_prt_phone.
if w_bzirk = 'CCWSH'.
w_include = 'tvko-txnam_kop'.
else.
w_include = 'NAME1'.
endif.
when others.
w_include = 'tvko-txnam_kop'.
endcase.
Try this code.
Regards,
Atish
ur missing a quote here
when '0010' or <b>(')</b>0011' or '0020' or '0030' or '0040' or '0060' or '0065'.
2007 Jun 08 1:55 PM
ur missing a quote here
when '0010' or <b>(')</b>0011' or '0020' or '0030' or '0040' or '0060' or '0065'.
2007 Jun 08 1:59 PM
Basavaraj and everybody else,
Thank you very much! I spent a few minutes on that and couldn't find it; I assumed I was missing a quote somewhere.
Regards,
Davis
2007 Jun 08 1:55 PM
Hi
It means a ' is missing, but probably a point is missing:
<b>case vbdkl-vkorg <----
ERROR</b>
when '0010' or 0011' or '0020' or '0030' or '0040' or '0060' or '0065'.
<b>case vbdkl-vkorg.<----
ok</b>
when '0010' or 0011' or '0020' or '0030' or '0040' or '0060' or '0065'.
Max
2007 Jun 08 1:58 PM
Hi Davis,
Have you pasted code as it is, if yes then you are missing lots of dots '.'
case vbdkl-vkorg.
when '0010' or '0011' or '0020' or '0030' or '0040' or '0060' or '0065'.
w_include = 'tvko-txnam_kop'.
when '0021'.
w_include = 'zadrs_hdr_ver_weatherbond'.
when '0012'.
perform get_bzirk
using vbdkl-kunnr
vbdkl-vkorg
kna1-telf1
kna1-telfx
changing w_bzirk
w_prt_phone.
if w_bzirk = 'CARLSH'.
w_include = 'tvko-txnam_kop'.
else.
w_include = 'NAME1'.
endif.
when '0050'.
perform get_bzirk
using vbdkl-kunnr
vbdkl-vkorg
kna1-telf1
kna1-telfx
changing w_bzirk
w_prt_phone.
if w_bzirk = 'CCWSH'.
w_include = 'tvko-txnam_kop'.
else.
w_include = 'NAME1'.
endif.
when others.
w_include = 'tvko-txnam_kop'.
endcase.
Try this code.
Regards,
Atish
2007 Jun 08 2:01 PM
Atish,
Thanks a lot. I didn't realize that I wrote the code as sloppy as I did.
Regards,
Davis
2007 Jun 08 1:58 PM
You are missing '.' in your code.
if w_bzirk = 'CARLSH'
if w_bzirk = 'CCWSH'
and after your perform get_bzirk
Regards,
M
2007 Jun 08 2:02 PM
Thanks to all who found my mistakes. I didn't realize that I made so many mistakes.
Regards,
Davis
2007 Jun 08 2:05 PM
Hi,
You missed out a single inverted comma at line number two for 0011.
Whenever you miss a single inverted comma, ABAP will treat all the lines following after the line as the part of that string.
Since, a text-literal can be of maximum size 255, therefore it displays the error "literals that take up more than one lines are not permitted".
Does that solve your problem.
Reward points if helpful.
Best Regards,
Saurabh.
2007 Jun 08 4:14 PM
Hi Davis,
If you have pated the code as it is you have missed out single quotes' and full stop (.) in many places in the code.
Regards
Jitendra
| User | Count |
|---|---|
| 3 | |
| 2 | |
| 2 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |