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

How can I handle error messages from VBA?

$
0
0

Hello,

I've started using "Record script" and I've found it very useful, it's very powerful combined with VBA code.

By now, I'm executing it from Excel and I would love to know how can I handle SAP error messages.

 

 

For example:

 

Sub Test ()

'Some code

 

Dim material As String

material = "123456"

session.findById("wnd[0]/usr/ctxtRC29N-MATNR").Text = material

 

'Some code

End Sub

 

I wrote this routine to change 1000 materials information.

Everything went fine until the code tryed to modify a material that has some weird configuration and SAP returned an error message.

 

Thanks in advance,

Richard


Viewing all articles
Browse latest Browse all 325

Latest Images

Trending Articles



Latest Images

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