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: 

How to delete the entire Z table

Former Member
0 Kudos

How to delete all the contents of a Z table and

how to delete selected rows in a z-table.

Thank you

1 ACCEPTED SOLUTION

Former Member
0 Kudos

HI,

To Delete all Contents of Z-Table,Use Syntax

<b>DELETE [FROM] <dbtab>.</b>

To Delete selected rows of Z-Table,Use Syntax

<b>DELETE FROM <target> WHERE <cond> .</b>

Regards,

Padmam.

7 REPLIES 7

Former Member
0 Kudos

Hi,

You can delete all the entries in the Z table by using TCode SE14.

Give table name click ion edit button and select Delete data radion button and click on Active and adjust database.

Thanks,

Sriram Ponna.

0 Kudos

I want to add code in my program to let the user delete the contents of the entire z table. and also let the user delete specific rows. This is the requirement. is there is a statement like the refresh statement for internal tables ?

Thank you

0 Kudos

Krish,

Why dont u generate Table Maintenance and use..... tcode SM30 to maintain....

Chandra.

0 Kudos

It is a dialog program , I have to let the user choose whether to add , delete entries in the table by making him choose radio buttons. So I Have to include code in the main program for these functionalities.

Former Member
0 Kudos

HI,

To Delete all Contents of Z-Table,Use Syntax

<b>DELETE [FROM] <dbtab>.</b>

To Delete selected rows of Z-Table,Use Syntax

<b>DELETE FROM <target> WHERE <cond> .</b>

Regards,

Padmam.

0 Kudos

Hi Padmam

The statement : DELETE FROM DBTABLE . is asking for a where paramenter, are you sure this is the right statement

0 Kudos

Hi,

I'm sure.To Delete all contents use,

<b>DELETE <dbtab>.</b>

U try this Sample Program,

TABLES SPFLI.

DATA: BEGIN OF WA,

CARRID TYPE SPFLI-CARRID,

CONNID TYPE SPFLI-CONNID,

END OF WA.

MOVE 'AA' TO WA-CARRID.

MOVE '0064' TO WA-CONNID.

DELETE SPFLI FROM WA.

MOVE 'LH' TO SPFLI-CARRID.

MOVE '0017' TO SPFLI-CONNID.

DELETE SPFLI.

Regards,

Padmam.