‎2009 Jan 27 5:56 AM
hi all,
I have problem with internal table.there is field profit center in internal table.
iam also getting blanks for profit center. i want to keep interies in internal table,
if there is a value in profit center and if it is blank it should be deleted from internal table.
plz suggest any solution .
thank you.
‎2009 Jan 27 5:58 AM
cldnt understand exactly wht u r asking ?
how do u want to maintain the entires in the internal table ?
if u dont want blan entries at all..
delete <internal_table> where profitcenter = space
n if u dont want duplicate values for profit center also not even blank den
sort internal table by profit center
delete adjacent dupliactes from internaltable comparing profitcenter
delete <internal_table> where profitcenter = space
Edited by: Ashwinee Mali on Jan 27, 2009 11:29 AM
‎2009 Jan 27 5:58 AM
cldnt understand exactly wht u r asking ?
how do u want to maintain the entires in the internal table ?
if u dont want blan entries at all..
delete <internal_table> where profitcenter = space
n if u dont want duplicate values for profit center also not even blank den
sort internal table by profit center
delete adjacent dupliactes from internaltable comparing profitcenter
delete <internal_table> where profitcenter = space
Edited by: Ashwinee Mali on Jan 27, 2009 11:29 AM
‎2009 Jan 27 6:02 AM
hi,
Internal table has a field called profitcenter.
some records in internal table have values for profitcenter.
and some records doesnot have values.
now i want to delete all the records from internal table where profit center is blank.
thank you
‎2009 Jan 27 6:07 AM
Hi,
use this statement...
DELETE itab WHERE profitcenter EQ spcae.
‎2009 Jan 27 5:58 AM
After selecting data into internal table write
Delete itab where profitcenter is initial.
Hope this helps...
Edited by: Karan Sethi on Jan 27, 2009 11:38 AM
‎2009 Jan 27 6:02 AM
hi,
set flag if there is no entries in that column.
then delete internal table transporting flag.
Try,
DELETE itab WHERE fname IS INITIAL.
or
DELETE itab WHERE col IS INITIAL.
or try this.
sort it_tab field1 . ..
Delete itab where itab-field = space.
‎2009 Jan 27 6:08 AM
Hi
Check out the syntax for different types of Delete at: [Delete from itab|http://help.sap.com/saphelp_nw70/helpdata/en/06/aafd54fc4011d195280000e8353423/content.htm]
Delete itab where profit_center IS INITIAL. will work
Hope this helps
Regards,
Jayanthi.K
‎2009 Jan 27 6:16 AM
Hi,
Try this solution:
DELETE <internal table name> WHERE <field name (Profit Center)> IS INITIAL.
I hope it will help you.
Thanks and regards,
Suresh
‎2009 Jan 27 6:16 AM
Hi,
You can delete from itab as below.
Delete I_Tab where FieldName Is Initial.
or
Delete I_Tab where FieldName Eq ' '.
Other wise you can move all values of the field to one more internal table and you can clear first Itab clear.
Regards
Md.MahaboobKhan