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 in Write statement

Former Member
0 Likes
1,956

Hi,

I have a piece of code migrated from 4.5b to ecc 6.0 giving me an error in Write statement :-

WRITE : / 'Insert Failure in Ztable for'

IT_Ztable_TEMP .

The Syntax check throws an error like :-

"IT_Ztable_TEMP" cannot be converted to a character-type field.

What could be the possible solution to this?

Thanks in Advance.

Regards,

Anoop.

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
1,281

hi anoop,

WRITE : / 'Insert Failure in Ztable for'

for this above write st u didnt gave any position . write like this

WRITE : /10 'Insert Failure in Ztable for'. [or]

WRITE 'Insert Failure in Ztable for'

if helpful reward some points.

with regards,

suresh babu aluri.

8 REPLIES 8
Read only

Former Member
0 Likes
1,281

IT_Ztable_TEMP is an internal table, u have to specify the fields

loop at itab.

WRITE : / 'Insert Failure in Ztable for' , IT_Ztable_TEMP-field .

endloop.

but not sure if this is ur requirement

Read only

Sougata
Active Contributor
0 Likes
1,281

you missed the comma, follow syntax below:

WRITE : / 'Insert Failure in Ztable for',
                        IT_Ztable_TEMP .

Regards.

Read only

Former Member
0 Likes
1,281

hi,

WRITE : / 'Insert Failure in Ztable for' , IT_Ztable_TEMP.

did you put comma after the text in write statement,

rewards if correct

else give your past your code we can help you

regards,

nazeer

Read only

Former Member
0 Likes
1,281

Hi Anoop Mukundan,

Try specifying each and every field instead of the entire work area. Also I can't find out ',' between "Insert Failure in Ztable for" and "IT_Ztable_TEMP".

Read only

Former Member
0 Likes
1,283

hi anoop,

WRITE : / 'Insert Failure in Ztable for'

for this above write st u didnt gave any position . write like this

WRITE : /10 'Insert Failure in Ztable for'. [or]

WRITE 'Insert Failure in Ztable for'

if helpful reward some points.

with regards,

suresh babu aluri.

Read only

Former Member
0 Likes
1,281

Hi,

1) Put a comma after each field even the hardcoded one.

2) Check for the Currency, integer fields in a structure.

3) Check if ur using itab to print directly.

Thanks

Sandeep

Reward if helpful

Read only

Former Member
0 Likes
1,281

HI,

u can't print all the fields in an itab directly if they have any currency,quantity,pack type of fields.in that u should print the table contents like

write:/ itab-fld1,itab-fld2,itab-fld3.

rgds,

bharat.

Read only

Former Member
0 Likes
1,281

Hi,

My apologies :-

I missed the comma previously.

Errored Code :-

WRITE : / 'Insert Failure in Ztable for' ,

IT_Ztable_TEMP .

Regards,

Anoop