Hi Nikhil,

I faced the same problem but the following helped me:

 Sub IsCellEditable_Example()
'The following example uses the IsCellEditable method to determine whether 
a cell is still editable after a
'user enters data in a cell and presses Enter.
SAPGuiSession("Session").SAPGuiWindow("Create Standard 
Order:").SAPGuiTable("All 
items").SetCellData 1, "Item", "10"
SAPGuiSession("Session").SAPGuiWindow("Create Standard 
Order:").SAPGuiTable("All 
items").SetCellData 1, "Material", "p-100"
SAPGuiSession("Session").SAPGuiWindow("Create Standard 
Order:").SAPGuiTable("All 
items").SetCellData 1, "Order quantity", "1"
SAPGuiSession("Session").SAPGuiWindow("Create Standard 
Order:").SAPGuiTable("All 
items").SelectCell 1, "Order quantity"
SAPGuiSession("Session").SAPGuiWindow("Create Standard Order:").SendKey 
ENTER
Table_IsCellEditable = SAPGuiSession("Session").SAPGuiWindow("Create 
Standard Order:").SAPGuiTable("All items").IsCellEditable(1, "#3")
If Table_IsCellEditable = True Then
SAPGuiSession("Session").SAPGuiWindow("Create Standard 
Order:").SAPGuiTable("All 
items").SetCellData 1, "#3", "2"
Else
Reporter.ReportEvent micFail, "Table.IsCellEditable return a FALSE value", 
"Table.IsCellEditable 
returned False, therefore the cell cannot be edited"
End If

End Sub
El jueves, 19 de julio de 2012 11:19:03 UTC+2, Nikhil escribió:
>
> Hi Guys,
>
> I am facing one unexpected error "The Parameter is incorrect" with 
> SAPguiTable > IsCellEditable method. Below is my code. This code is working 
> if Cell is editable but when we use same method for non editable cell then 
> it is throwing error (Attached snapshot)., It should return False for this 
> scenario (As per the help file). I tried this code in both the ways, 1. 
> using Column index 2. Using Column Name.
>
> Table_IsCellEditable = SAPGuiSession("Session").SAPGuiWindow("Create 
> Inquiry: Overview").SAPGuiTable("All items").IsCellEditable(1, "#11")   
> '(by Column index)
> OR
> Table_IsCellEditable = SAPGuiSession("Session").SAPGuiWindow("Create 
> Inquiry: Overview").SAPGuiTable("All items").IsCellEditable(1, "Net 
> Value")   '(by Column name) 
>
> If Table_IsCellEditable = True Then
> Msgbox "Yes"
> Else
> Msgbox "No"
> End If
>
> Please let me know if you have a solution for the same.
>
> Thanks
> Nikhil Gangwar
>
>
>

-- 
You received this message because you are subscribed to the Google
"QTP - HP Quick Test Professional - Automated Software Testing"
group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/MercuryQTP?hl=en

Reply via email to