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

Former Member
0 Likes
1,679

HI,

IS it mandatory to write client specified condition while deleteing entries from a z table?

For eg:

delete from ztable client specified where mandt = sy-mandt.

What happens if the client specified is not mentioned?

Thanks,

Kumar

11 REPLIES 11
Read only

Former Member
0 Likes
1,428

hi,

On specifying the client will only delete the records that were being posted from that client and other records will remain in the table ..for example if you have posted 1 and 2 record with client 100 and 3 with client 200 on executing the program in client 100 will only delete 1 and 2 records and the 3 record still remains in the table. So when you want to delete all the records then no need to specify that statement ...

Regards,

Santosh

Read only

Former Member
0 Likes
1,428

HI

No its not necessary to mention it.

Aditya

Read only

0 Likes
1,428

Hi

No need to specify client id.

Regards

Anbu

Read only

Former Member
0 Likes
1,428

Hi,

It will delete the particular client specified data.

Its not neccassary.

Many options available for DELETE,

Check the link

[Link|http://help.sap.com/saphelp_nw70/helpdata/en/fc/eb3aef358411d1829f0000e829fbfe/content.htm]

Regards,

Sandeep

Read only

Former Member
0 Likes
1,428

Hi,

Not compulsory to specified client.

You can use the CLIENT SPECIFIED addition to disable automatic client handling.

Check this thread:

http://help.sap.com/saphelp_nw04/Helpdata/EN/fc/eb3aef358411d1829f0000e829fbfe/content.htm

Regards

Adil

Read only

Former Member
0 Likes
1,428

HI

If you use client specified option than only records of that particular client will be deleted otherwise all the records from ztable will be deleted.

With Regards

Nikunj Shah

Read only

Former Member
0 Likes
1,428

If no client is specified, by default the current client is used and records will be deleted from this client.

However if you wish to delete records from some other client, then in this case u'll require to mention the client in the select query.

IN this case only the records in the client specified shall be deleted.

~ Piyush

Read only

Former Member
0 Likes
1,428

Hi Kumar,

see for client specified table the data will be client independent in such case it makes no meaning by giving mandt in delete condition. even if u dont mention the client no with sy-mandt only the logon client records will be deleted remaing clients data will be safe..

i think i am clear to u..

ask me if u further need any help..

regards,

Sunil Kumar Mutyala

Read only

Former Member
0 Likes
1,428

Hi

good

Always you should use the syntax given by the SAP wheather it is DELETE statement or any other statement.

If there is any syntax who does not mention the client name than you can use that syntax to delete the table than the current syntax that you are using.

If you currecnt syntax required to write the client name than you have to write that otherwise the syntax will give you the error.

Thanks

mrutyun^

Read only

Former Member
0 Likes
1,428

hi check this..

this is not mandatory but if you want to delete the records from a particular client then it is needed .

Read only

vinod_vemuru2
Active Contributor
0 Likes
1,428

Hi,

It is not mandatory.

SAP has automatic client handling mechanism i.e If u don't specify any thing it will consider current client ONLY

If u want to delete the entries corrosponds to other client then u have to use this addition.

Just check below F1 help.


Switches off automatic client handling. This allows you to delete data across all clients in the case of client-specific tables. The client field is then treated like a normal table field, for which you can formulate suitable conditions in the WHERE clause.