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: 

Internal Table

Former Member
0 Kudos
147

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.

8 REPLIES 8

sreeramkumar_madisetty
Active Contributor
0 Kudos
115

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

former_member386202
Active Contributor
0 Kudos
115

Hi,

Change the data type of that field in internal table as character.

regards,

Prashant

0 Kudos
115

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.

Former Member
0 Kudos
115

Hi Gaurav,

you can not avoid that as it is the intial value of NUMC type field.

Regards,

Atish

Former Member
0 Kudos
115

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^

0 Kudos
115

NUMC is the field type and if field is empty, its getting initialised to ZERO's. number of such fields is too high,

0 Kudos
115

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

Former Member
0 Kudos
115

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.