cancel
Showing results for 
Search instead for 
Did you mean: 

Delete SAP Row if excel data

0 Kudos

Dear all,

Please, could you help me to creat a macro in excel to check if Row in SAP isn't equal data form Excel and then delete it.

Exemple number of row can be more than 500 and change every time:

  • Excel table :
A1 : 20<br>A2 : 40
  • SAP Table (first column) :
0010<br>0020<br>0030<br>0040
  • Check to perform :
IF A1 <> SAP row 1 Then<br>  Delete SAP row 1
  SAP row +1 (Check SAP next Row)<br>Else <br>  Excel row +1 (Check Excel next Row)<br>  SAP row +1 (Check SAP next Row)<br>End IF
  • I get this code to select and delete the first SAP row :
session.findById("wnd[0]/usr/tblSAPLCOVGTCTRL_0100").getAbsoluteRow(0).selected = true<br>session.findById("wnd[0]/usr/subBUTTONS:SAPLCOVG:0050/btnDELETE").press

Thanks a lot for your help !

<br>
AlexGourdet
Product and Topic Expert
Product and Topic Expert
0 Kudos

Thank you for visiting SAP Community to get answers to your questions.

Since you're asking a question here for the first time, I'd like to recommend you with the following steps so you can get the most out of your community membership:

I also recommend that you include a profile picture. By personalizing your profile, you encourage readers to respond: https://developers.sap.com/tutorials/community-profile.html.

I hope you find this advice useful, and we're happy to have you as part of SAP Community!

All the best,
-Alex

Accepted Solutions (0)

Answers (0)