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 table

Former Member
0 Likes
680

HI!

Is there a function to delete table entries from a non sap table.

thanks

1 ACCEPTED SOLUTION
Read only

athavanraja
Active Contributor
0 Likes
603

before answering your question a request

can you close/reply/reward point to the anwers which were helpful, this would encourage many people to join SDN to help each other .

e.g of you unclosed thread

mark your posts as question.

Now to your question:

you can write a simple porgram to do this job. i dont think that you will find a FM for this job.

Regards

Raja

6 REPLIES 6
Read only

athavanraja
Active Contributor
0 Likes
604

before answering your question a request

can you close/reply/reward point to the anwers which were helpful, this would encourage many people to join SDN to help each other .

e.g of you unclosed thread

mark your posts as question.

Now to your question:

you can write a simple porgram to do this job. i dont think that you will find a FM for this job.

Regards

Raja

Read only

Former Member
0 Likes
603

Hi,

U can use

1. DELETE itab.

2. DELETE TABLE itab WITH TABLE KEY k1 = v1 ... kn = vn.

3. DELETE TABLE itab [FROM wa].

4. DELETE itab INDEX idx.

5. DELETE itab FROM idx1 TO idx2.

6. DELETE itab WHERE logexp.

7. DELETE ADJACENT DUPLICATES FROM itab.

Read only

Read only

Former Member
0 Likes
603

If you need to execute SQL commnads on external database...depending on the database, you will have to use native SQL stms in ABAP.

using

EXEC SQL.

connect to :lv_connection_name.

DELETE .. " Native SQL of external database

ENDEXEC.

But then you need to do some settings to connect to the external database.

for example , in case of MSSQL you need to have a connection name entry in table DBCON.

Get in touch with your basis team.

Thanks,

Ram

Read only

0 Likes
603

Pls don't forget to assign reward points when you feel that the answers to your questions are valuable.

Read only

jayanthi_jayaraman
Active Contributor
0 Likes
603

Hi,

FM is not needed.The following will do.

exec sql.

truncate averi_clnt

endexec.

Kindly reward points,if your problem is solved.Otherwise,get back.