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 data from table in db

Former Member
0 Likes
1,547

Hallow I build a table with data in se11 and I wont to delete all the data from their .how can I do that. I try with (buield program)

<b>DELETE from YHR_EX_MUSHLACH.

COMMIT WORK.</b>

And its not working what can I do , if it impoosible how can I write a select statement that I can delete 100 record from my table .(what I do from select into)

*SELECT id_number pernr hagbla1 rama

*FROM yhr_ex_mushlach

into ?

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
1,494

Hi ,

Try using

DELETE from YHR_EX_MUSHLACH where cond.

try to give a condition which is true for all records.

an example would be as below , assume field1 is a prinmary key field then command will be

DELETE from YHR_EX_MUSHLACH where field1 is not NULL.

Regards

Arun

Message was edited by:

Arun R

Hallow I build a table with data in se11 and I wont to delete all the data from their .how can I do that. I try with (buield program)

<b>DELETE from YHR_EX_MUSHLACH.

COMMIT WORK.</b>

And its not working what can I do , if it impoosible how can I write a select statement that I can delete 100 record from my table .(what I do from select into)

*SELECT id_number pernr hagbla1 rama

*FROM yhr_ex_mushlach

into ?

11 REPLIES 11
Read only

Former Member
0 Likes
1,494

GO TO SE16

CHECK ALL TABLE CONTENTS IN MENU TABLE ENTRIES CLICK DELETE ALL.

REGARDS

SHIBA DUTTA

Read only

0 Likes
1,494

hi shiba i check it i have myby 10000 recored and this commend dont do anything

regards

Read only

0 Likes
1,494

hey,

Go to se14 enter your table name and enter there is a radio button delete all data. check it and say adjust table it should work

santhosh

Read only

Former Member
0 Likes
1,494

Hi,

You can select the data into an internal table. I think you can use Sy-dbcnt for getting the 100th record and deleting it.

-Priyanka

Read only

Former Member
0 Likes
1,495

Hi ,

Try using

DELETE from YHR_EX_MUSHLACH where cond.

try to give a condition which is true for all records.

an example would be as below , assume field1 is a prinmary key field then command will be

DELETE from YHR_EX_MUSHLACH where field1 is not NULL.

Regards

Arun

Message was edited by:

Arun R

Read only

Former Member
0 Likes
1,494

GOTO SE14 AND AND DELETE ALL THE DATA.

Read only

Former Member
0 Likes
1,494

Hi

first you append all records to itab1 by select statement .

and use it

-DELETE itab1 FROM idx1 TO idx2.

eg: if need to delete 100 records.

delete itab1 from 1 to 100.

it will be use ful.

Regards.

Jay

Read only

Former Member
0 Likes
1,494

Hi antonio ,

Did you try the solution i suggested.

Or another alternative is

the code below

<b>Data : it_1 type table of R_EX_MUSHLACH..

start-of-selection.

select * into table it_1 from R_EX_MUSHLACH..

delete R_EX_MUSHLACH from table it_1.</b>

Regards

Arun

Message was edited by:

Arun R

Read only

Former Member
0 Likes
1,494

Hi

Try this code. It is working.

Tables: zemp_info.

delete from zemp_info.

if sy-subrc = 0.

write:/ 'Deleted'.

else.

write:/ 'Not'.

endif.

Regards

Haritha.

Read only

Former Member
0 Likes
1,494

TRY THIS

SELECT * FROM DBTAB INTO TABLE ITAB.

DELETE dbtab FROM TABLE itab.

REGARDS

SHIBA DUTTA

Read only

Former Member
0 Likes
1,494

did you tried going to se14 and deleting all data option.

Else if you wanna write a program

then simply

write:

delete from itab

where <some condition which is true for all >

commit work.