Application Development 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: 

Syntax error in Write statement

Former Member
0 Kudos

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

Former Member
0 Kudos

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

Former Member
0 Kudos

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

Sougata
Active Contributor
0 Kudos

you missed the comma, follow syntax below:

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

Regards.

former_member588853
Active Contributor
0 Kudos

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

Former Member
0 Kudos

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".

Former Member
0 Kudos

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.

Former Member
0 Kudos

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

Former Member
0 Kudos

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.

Former Member
0 Kudos

Hi,

My apologies :-

I missed the comma previously.

Errored Code :-

WRITE : / 'Insert Failure in Ztable for' ,

IT_Ztable_TEMP .

Regards,

Anoop