We have added search box. Key in SAP issue keyword to search
TopBottom

Announcement: wanna exchange links? contact me at sapchatroom@gmail.com.

RE:[sap-dev] SAP RFC Call Returns Error in Return Parameter from Vb Before the RFC Call

Posted by Admin at
Share this post:
Ma.gnolia DiggIt! Del.icio.us Yahoo Furl Technorati Reddit

Reply from horacio zapettini on Aug 21 at 8:45 AM
Mauro,

What matters here is that you've found a possible solution. (so you can go on with your project).

As a programmer you'll find out that there are always different ways to solve the same issue. (one or more are optimal, the others aren't but if you get into a solution, who cares? )

If RFC_READ_TABLE works, then who cares? :) I'd finish my assignment and once it's working, I'd check if there is a better (and possibly optimal) solution.

Horacio

Ps: I'd still check if having dialog access, that RFC user receives the "error 0" . It's a minor change for your basis guys.

---------------Original Message---------------
From: Mauro Re Garbagnati
Sent: Saturday, August 18, 2012 2:11 PM
Subject: SAP RFC Call Returns Error in Return Parameter from Vb Before the RFC Call

@Wes, @Horacio: I tried just now the use of RFC_READ_TABLE and in this way I found what I needed (I replicated the functionality of BAPI_GL_ACC_EXISTENCECHECK) :
Set objRfcFunc = sapConn.Add("RFC_READ_TABLE")            objRfcFunc.Exports("QUERY_TABLE") = "SKB1"      objRfcFunc.Exports("DELIMITER") = "|"            Dim optsObj As Object      Set optsObj = objRfcFunc.Tables("OPTIONS")      Call optsObj.appendrow      optsObj(1, "TEXT") = "BUKRS EQ 'C100' AND SAKNR EQ '0000000001'"            Dim fldObj As Object      Set fldObj = objRfcFunc.Tables("FIELDS")      Call fldObj.appendrow      fldObj(1, "FIELDNAME") = "SAKNR"            Rem *** BAPI Call ***      If objRfcFunc.Call = False Then          ErrorMsg = objRfcFunc.Exception 'Message collection          MsgBox ErrorMsg, 16, "Errore"          InsertCash = False          sapConn.Connection.Logoff          Exit Sub      End If            Dim tabReturn As Variant      Set tabReturn = objRfcFunc.Tables("DATA")      returnedRows = tabReturn.RowCount           if returnedRows=0 then       MsgBox "Don't exist"     else       MsgBox "Exist"     end if      sapConn.Connection.Logoff

However I simply don't understand why I'm getting the 'Error 0' problem with the BAPI itself calling it directly.
I found a way to bypass the problem (and that's good!) but I consider it not solved at the moment.

I want - If all of you are ok with me - leave this thread open to see if something else is coming out to solve the 'Error 0' problem.

At the moment, please accept my sincere thanks to all of you *gurus*!

Mauro

 
Reply to this email to post your response.
 
__.____._
Manage Settings | Unsubscribe | Create FAQ | Send Feedback
  
Copyright © 2012 Toolbox.com and message author.
Toolbox.com 4343 N. Scottsdale Road Suite 280, Scottsdale, AZ 85251
horacio zapettini  

12 achievements
 
Mark as helpful
View this online
Ask a new question
 
In the Spotlight
Toolbox.com for iPhone & Android: Ask Questions & Get Answers Anywhere. Download the Free App

_.____.__

0 comments:

Post a Comment

T r a n s l a t e to your language