Quantcast
Channel: SCN : Discussion List - Scripting Languages
Viewing all articles
Browse latest Browse all 325

[VBA] Reading data in non-editable fields

$
0
0

Hi everyone,

 

I'm looking for a way for my VBA script to read the content of greyed out fields in VA01.

Example:

 

1.PNG

 

Normally I am able to find the path by recording myself editing the cell content in SAP:

 

session.findById("wnd[0]/usr/tabsTAXI_TABSTRIP_OVERVIEW/tabpT\02/ssubSUBSCREEN_BODY:SAPMV45A:4401/subSUBSCREEN_TC:SAPMV45A:4900/tblSAPMV45ATCTRL_U_ERF_AUFTRAG/ctxtRV45A-MABNR[1,1]).Text = "1"

Afterwards I can simply fill an Excel cell with the data:

 

Sheets("X").Cells(y, z) = session.findById("wnd[0]/usr/tabsTAXI_TABSTRIP_OVERVIEW/tabpT\02/ssubSUBSCREEN_BODY:SAPMV45A:4401/subSUBSCREEN_TC:SAPMV45A:4900/tblSAPMV45ATCTRL_U_ERF_AUFTRAG/ctxtRV45A-MABNR[1,1]).Text

 

However, this method does not work for the locked fields that I cannot edit since they won't show up in my recording.

Even when I check what table the desired data lies in and replace "RV45A-MABNR" with the correct table and [1,1] with right position I get nothing.

How can I work around that? Your help would be greatly appreciated.


Viewing all articles
Browse latest Browse all 325

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>