cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

SAP GUI Scripting select active row

wkn
Discoverer
0 Likes
16,894

Hi,

I'm trying to automate some SAP actions with Excel.

I Recorded some Script from SAP an most is working just fine, I only have a problem selecting the active row in CS02 after positioning the right RowID.

Recording results in:

session.findById("wnd[0]/usr/tabsTS_ITOV/tabpTCMA/ssubSUBPAGE:SAPLCSDI:0152/tblSAPLCSDITCMAT").getAbsoluteRow(39).selected = true

But I can't select a row with the AbsoluteRow number since I don't know that number.

Any ideas how to select the entire line so it can be deleted?

Thanks.

View Entire Topic
wkn
Discoverer
0 Likes

Hi Stefan,


Thank you for your help, but this isn't what I'm looking for.

CS02 is the Bill of Materials.

I use the scripting to select the right "Pos." code and then I want to select the entire row.

Manually you can highlight (select) the entire row by clicking on the grey square in front of it. I want to do this so I can delete the line.

Any other thoughts?

Thanks,

Wim

daniel_mccollum
Active Contributor

I think Stefan has a reliable solution for your problem statement.

In your script, you have tblSAPLCSDITCMAT. Stefan has given a snippet referencing tblSAPMBIBSTC537

Based on the tests you want to perform, you would loop as Stefan has, & once you find the row that meets your test criteria, you could select absolute row i.

You simply need to map your test, to Stefan's pattern.