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

Syntax error

Former Member
0 Likes
745

Hi all,

I am working on upgrade from 4.6c to ECC 6.0

I have found one syntax error in ECC..

DATA: CHAR132(132) TYPE C VALUE '----


-


-


'.

<b>Literals that take up more than one line not permitted in above statement.</b>

How can I rectify this.

Thanks

Shiva.

1 ACCEPTED SOLUTION
Read only

jayanthi_jayaraman
Active Contributor
0 Likes
713

Hi,

Use concatenate statement.

DATA: CHAR132(132) TYPE C.

concatenate '----


'

'----


'

'----


'

into char132.

write char132.

6 REPLIES 6
Read only

Former Member
0 Likes
713

YES YOU CANNOT BREAK THE QUOTATION MARKS

DATA: CHAR132(132) TYPE C VALUE

' -


'.

REGARDS

SHIBA DUTTA

Read only

Former Member
0 Likes
713

ur literal value should not exceed one line.

DATA: CHAR132(132) TYPE C VALUE '123456789087543222222<b> ' .</b>

end the declaration in one line.

If u want to give long value use string data type.

Read only

jayanthi_jayaraman
Active Contributor
0 Likes
714

Hi,

Use concatenate statement.

DATA: CHAR132(132) TYPE C.

concatenate '----


'

'----


'

'----


'

into char132.

write char132.

Read only

Former Member
0 Likes
713

declare data : char132(132) type c value '-'.

because you cannot have spaces in between ''.

regds,

kiran

Read only

Former Member
0 Likes
713

Hi Shiva,

I dont this this is a error message its just a warning.you should not worry about the warning messages go ahead and execuate the program.i think this should work.

Thanks

Vikranth Khimavath

Read only

Former Member
0 Likes
713

Hi,

This is not permitted.

So u can declare two more char type and concatenate teh same into one char type.

Else use text-elements and concatenate teh same.

DATA: CHAR132(132) TYPE C 
text-001 - '----------------------------------------'
text-002 - '-----------------------------------------'

Concatenate text-001 text-002 INTO char132.

Reward points and close teh thread if ur problem got solved.