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: 

regarding space issue

Former Member
0 Kudos

hi,

I m find a strange issue ,

i have declared an internal table i_final, in that one field(comnt) is there with length 40

i m reading an input file and i m passing data to comnt field which is blank.

the value of this comnt is blank and this i m moving to g_comnt(this is also 40 character size)

when i m checking the g_comnt field is intitial it is failing. and also the STRLEN is showing as 40.

code is like this ,

i_final-comnt = w_inputfile_comnt.

g_comnt = i_final-comnt .

if g_comnt is intial.

write 'working'.

endif.

This condition is not working

Please advise ASAP

Thanks,

Suresh

4 REPLIES 4

Former Member
0 Kudos

Hi,

Try using

check the data type of g_comnt.

if g_comnt[] is intial.

write 'working'.

endif.

Reward points if helpful

0 Kudos

just make the break point in internal table value definatly it have some value ...

Former Member
0 Kudos

When you are reading from a flat file the spaces will be loading into the variable. These spaces are not same as the spaces in SAP. So they are considered as some value and value is assigned to your variable.

So your cindition is failing.

awrd points if useful

Bhupal

0 Kudos

bhupal,

can u tell me how i can over come this problem..

Thanks,

Suresh