2007 Oct 26 6:59 AM
Hi all Experts,
I am reading data from dB table in to an internal table. Now all the NUMC type fields from dB which are empty are comming as ZERO's in to the internal table. How can I prevent that? i.e. blank NUCM fields shoud not get as ZERO's in to the internal table.
2007 Oct 26 7:02 AM
Hi
While Move the data from DB table to Internal Table, add the where condition that move NUMC values which are not initial.
Regards,
Sree
2007 Oct 26 7:03 AM
Hi,
Change the data type of that field in internal table as character.
regards,
Prashant
2007 Oct 26 7:05 AM
I can not put a complex WHERE condition as it is hampering performance, also changing type of the field in the internal table is not a goot option as it contains about 700+ such fields per data record.
2007 Oct 26 7:14 AM
Hi Gaurav,
you can not avoid that as it is the intial value of NUMC type field.
Regards,
Atish
2007 Oct 26 7:16 AM
hi
good
if you are getting all the NUMC field as 0 than you can delete the same by
loop at itab.
delete itab where numc eq 0.
endloop.
reward point if helpful.
thanks
mrutyun^
2007 Oct 26 7:21 AM
NUMC is the field type and if field is empty, its getting initialised to ZERO's. number of such fields is too high,
2007 Oct 26 7:43 AM
hi.
you can use this statement <b>translate itab using '0 '</b>. only problem is if any field contains value like 100 or 10 then output will be displayed as '1 '.
its better to take single field and make the modification else u cant.
Tell me how many fields you have in u r internal table.
Regards
Prajwal .k
Message was edited by:
prajwal k
2008 Jan 25 7:10 AM
you can use no-zero command.
like in mara table BLANZ field is numc.
data itab like mara occurs 10 with header line.
select * from mara into table itab.
loop at itab.
write: / itab-matnr, itab-blanz no-zero.
endloop.
try this .
may b helpfull.