cancel
Showing results for 
Search instead for 
Did you mean: 

How to check SAP Element is editable or not in SAP mode?

jamesli000
Level 3

Dear Everyone

    How to check SAP textbox is editable or not in SAP spy mode?

    Or it can be check in other spy mode?

BR

James



------------------------------
James Li
------------------------------
2 REPLIES 2

jsantiago08
Level 5

This code checks the editability of the specified textbox. You can modify the code and adjust the ID as per your SAP environment.

To check if a SAP textbox is editable, you can use code stage, it should look like:

Dim SapGuiAuto  As Object
Dim Application As Object
Dim Connection  As Object
Dim session     As Object

SapGuiAuto  = GetObject("SAPGUI")
Application = SapGuiAuto.GetScriptingEngine
Connection = Application.Children(0)
session    = Connection.Children(0)

If session.findById("wnd[0]/usr/subDETAIL_AREA:SAPLCNPB_M:1010/subVIEW_AREA:SAPLCJWB:3998/tabsPTABSCR/tabpPGND/ssubSUBSCR2:SAPLCJWB:1205/ctxtPROJ-PWHIE").Changeable Then
  session.findById("wnd[0]/usr/subDETAIL_AREA:SAPLCNPB_M:1010/subVIEW_AREA:SAPLCJWB:3998/tabsPTABSCR/tabpPGND/ssubSUBSCR2:SAPLCJWB:1205/ctxtPROJ-PWHIE").Text = "NewValue"
Else
   MsgBox("The textbox is not changeable/editable.")
End If


------------------------------
Jerome Santiago - https://www.linkedin.com/in/jerome-santiago-b9b272141/
Automation Developer
------------------------------

Thiagorossharma
Level 3

Hello friend

In SAP Spy mode, verifying textbox editability is crucial. Explore SAP's native features or consider alternative spy modes for a comprehensive check. Effective testing ensures smooth SAP functionality.



------------------------------
Thiagoros sharma
------------------------------