on 08-29-2014 2:39 PM
On the offchance that anyone knows this, i'm having a bit of an issue figuring out how to make my script determine if an SAP field is editable or if it is locked for editing. The fieldname is constant with a coordinate value (which i'm accounting for in the script)
session.findById("wnd[0]/usr/tblSAPLCOMKTCTRL_0120/ctxtRESBD-CHARG[14,0]")
But either i've forgotten how to make this thing determine editable non-editable... as shown below, item 0035 can be edited. Item 0010 phantom component is locked.
Hello.
When i Consider session.findById("wnd[0]/usr/tblSAPLCOMKTCTRL_0120/ctxtRESBD-CHARG[14,0]") as field-identifier for check it should look like:
If session.findById("wnd[0]/usr/tblSAPLCOMKTCTRL_0120/ctxtRESBD-CHARG[14,0]").Changeable Then session.findById("wnd[0]/usr/tblSAPLCOMKTCTRL_0120/ctxtRESBD-CHARG[14,0]").Text = "NewValue"
Best regards
Holger
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Holger,
I have used the changeable property in similar case, but it returns incorrect value. But it does not correspond to real state. For reading I used following code where reading the state and writing to excel sheet:
...
For f = 0 To visiblerows - 1
For g = 0 To tDataColumns - 1
...
changeable_1 = tTableID.getcell(f, g).changeable
myVariable = tTableID.getcell(f, g).Text
......
ActiveSheet.Cells(h + 13, e).Value = myVariable & "|" & f & "|" & g & "-" & changeable_1
....
next g
next f
But even every second "Batch" cell is unchangeable:
I get for differences in excel when reading the cells :
But for some cells it works. It's driving me crazy already second day. If you can help, I would be grateful.
Michal
Thank you Holger. I was banging my head against my monitor trying to figure that out. Did not realize i could use .CHANGEABLE as a suffix.
Just out of curiosity... there isn't a listing anywhere that details this kind of field identification suffix somewhere, is there? I never would have thought of changeable.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.