Skip to Content
author's profile photo Former Member
Former Member

function lasterror => get the message

Hi everybody,

First, sorry if I make a lot of mistakes but I'm a poor french who is trying to write in english.

I use the following VBA code to access SAP internal tables from Microsoft Access.

Function RFC_READ_TABLE()

Dim R3 As Object

Set R3 = CreateObject("SAP.Functions")

R3.Connection.System = "system"

R3.Connection.client = "100"

R3.Connection.User = "my user ID"

R3.Connection.Password = "password"

R3.Connection.language = "FR"

If R3.Connection.Logon(0, True) <> True Then

R3.Connection.LastError

Exit Function

End If

The instruction "R3.Connection.LastError" returns a message box with te reason of the failure. But what I need is the String contains in this message box or a function which could return an error code.

Does someone can Help me ?

Thanks

Add a comment
10|10000 characters needed characters exceeded

Related questions

1 Answer

  • Best Answer
    author's profile photo Former Member
    Former Member
    Posted on Feb 23, 2005 at 02:52 PM

    Hi,

    I think that you post in wrong forum.

    This is a forum for Business One, not for R3.

    Ribeiro Santos

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.