Established Member
Re: SAPGuiTable - SetCellData

Hi Tuzzled,

 

I think i know what you're asking - you want to be able to enter your from and to values based on the value that's in the field column, right?

 

 

Looks like you're currently hard coding the row you want to enter -  Would the .FindRowByCellContent(col, val) be the command your after?

 

Something like:

 

'get the row

myrow = SAPGuiSession("Session").SAPGuiWindow("Extractor Checker S-API").SAPGuiTable("Selections (Internal Format)").FindRowByCellContent("Field", datatable("field",dtLocalSheet))

 

'enter details

SAPGuiSession("Session").SAPGuiWindow("Extractor Checker S-API").SAPGuiTable("Selections (Internal Format)").SetCellData myrow,"From value",  datatable("from",dtLocalSheet))
 
SAPGuiSession("Session").SAPGuiWindow("Extractor Checker S-API").SAPGuiTable("Selections (Internal Format)").SetCellData myrow,"To value", datatable("to",dtLocalSheet))
 
 
Your datatable then has 3 columns: Field, From and To.  The rest should be a simple bit of data driving.
 
(please note i typed that code in the reply window - it might need debugging)

 

Cheers,

Rich