Application Development and Automation 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: 
Read only

Delete statement for string type internal table

Former Member
0 Likes
3,956

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

1 ACCEPTED SOLUTION
Read only

RaymondGiuseppi
Active Contributor
2,997

Did you try to use pseudo component TABLE_LINE?

11 REPLIES 11
Read only

RaymondGiuseppi
Active Contributor
2,998

Did you try to use pseudo component TABLE_LINE?

Read only

2,997

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.

Read only

2,997
Read only

0 Likes
2,997

Quickly rattle off a question or expend brain power reading... I can't see it catching on.

Read only

0 Likes
2,997

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

Read only

0 Likes
2,997

Don't use FORMs - they're obsolete.

Read only

2,997

Huh?

Read only

0 Likes
2,997

Thanks for let us know.

Read only

0 Likes
2,997

It is documented.

Read only

0 Likes
2,997

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.

Read only

matt
Active Contributor
0 Likes
2,997

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.