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 Mass Delete records from VARI Table?

Former Member
0 Kudos
1,758

Hi all,

Is there any way to do a Mass Deletion of records from VARI Table??

what I tried :

1) Don't have access to SE11 to delete the entries by selecting which ever I would like to delete.

2) Tried with Function Module DB_DELETE_TABLE - but I think we can't able to delete even by using this as even I provided Key fields it says entry not found. Do I need to check any conditions here (Following way I am giving the entry to FM -

[003VASAPF180A                                SAPF180A_00001        0 ]

[Client-3,  Relation_ID-2,  Program-40,   Variant-14,  Next_Record_Counter-10]

Please Suggest.

3 REPLIES 3

Ankit_Maskara
Product and Topic Expert
Product and Topic Expert
0 Kudos
443

Why don't you use a simple DELETE statement in a SE38 program.

https://help.sap.com/saphelp_45b/helpdata/en/34/8e73d16df74873e10000009b38f9b8/content.htm

If you don't have access to SE38, then ideally you should not be the one deleting entries from table.

Also keep in mind what Raymond has suggested because the field values have dependencies amongst multiple tables.

BR.

raymond_giuseppi
Active Contributor
0 Kudos
443

Did you look for foreign key relations between VARI and other tables, e.g. VARID/T, you will mess with the data if you "wildly" delete  some records, and did you think on system variants (SAP&*, CUS&*) that require a transport request or were delivered by SAP and as variant used in background scheduled jobs, etc.

So better build a small report

  • Analyze the list of suitable variant (not systems) from VARID/VARIT
  • Then use some FM as RS_VARIANT_DELETE (feel free to analyze the whole function group)

Regards,

Raymond

former_member218424
Participant
0 Kudos
443

This message was moderated.