2007 Jul 04 4:45 AM
I need to pass Null Value to couple of fields in Internal table and one of them is type i.
Any way to do it?
2007 Jul 04 4:57 AM
Here is the sample code of it
data : begin of itab occurs 0,
field1(10) type c ,
field2(10) type i ,
end of itab.
itab-field1 = ' '.
itab-field2 = 0.0 .
Append itab .reward points if it is usefull...
Girish
Here is the sample code of it
data : begin of itab occurs 0,
field1(10) type c ,
field2(10) type i ,
end of itab.
itab-field1 = ' '.
itab-field2 = 0.0 .
Append itab .reward points if it is usefull...
Girish
2007 Jul 04 4:47 AM
For Type CHAR or STRING pass SPACE.
For TYPE I it will be 0.00.
Regards,
Amit
Reward all helpful replies.
2007 Jul 04 4:55 AM
2007 Jul 04 4:56 AM
HI,
if u r passing null velues to intrnal table type c will be # and type i will be zero's
Regards
Suresh.d
2007 Jul 04 4:57 AM
Here is the sample code of it
data : begin of itab occurs 0,
field1(10) type c ,
field2(10) type i ,
end of itab.
itab-field1 = ' '.
itab-field2 = 0.0 .
Append itab .reward points if it is usefull...
Girish
2007 Jul 04 5:03 AM
Hi
Null value for char type is ' ' i.e space
Null value for integer type is 0.
Thanks
2007 Jul 04 5:08 AM
It gives 0 as value for type i.
Using itab-field = 0.0. results in value being shown as 0 rather than Null. Any other suggestion?
2007 Jul 04 5:15 AM
Hi,
value '0' itself denotes null for integers because if you don't assign anything to it , it will be set to '0'. So, if you want to store null , you will have to change its data type!
Regards,
Sooness
| User | Count |
|---|---|
| 3 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |