‎2018 Jun 26 9:57 AM
Hi Guys,
I have string type internal table. Now i want to delete the initial values in internal table.
Is it possible to delete using DELETE statement?
Code:
Data gt_tab TYPE STANDARD TABLE OF string.
Delete gt_tab where _____ is initial????
Note: I knew we can delete it through loop statement.
Thanks,
Chella
‎2018 Jun 26 10:35 AM
‎2018 Jun 26 10:35 AM
‎2018 Jun 26 10:37 AM
If people would get away from using STANDARD tables all the time and start using HASHED and SORTED by default, they'd eventually stumble on TABLE_LINE when they're defining the key.
‎2018 Jun 26 10:44 AM
If people read the documentation, they'd find table_line too.
‎2018 Jun 26 11:32 AM
Quickly rattle off a question or expend brain power reading... I can't see it catching on.
‎2018 Jun 26 2:27 PM
Hi Guys,
Thanks to everyone.
DELETE gt_tab WHERE table_line IS INITIAL. -- This statement itself working fine. But i was used inside perform, it was STANDARD TABLE so It was not allowed.
Thanks,
Chella
‎2018 Jun 26 3:17 PM
‎2018 Jun 26 4:51 PM
‎2018 Jul 02 11:50 AM
‎2018 Jul 02 12:07 PM
‎2018 Jul 02 12:08 PM
To clarify what Horst is saying - There is no reason why using DELETE... on a standard table inside a form would be forbidden.
What you've posted makes no sense.
‎2018 Jun 26 10:35 AM
You'll be better off, performance wise, using a SORTED TABLE.
Data gt_tab TYPE SORTED TABLE OF string WITH NON-UNIQUE KEY table_line.
Delete gt_tab where table_line is initial.