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

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

RE: 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 17 at 2:10 PM
Wes, there's been a first time for all of us ;) (when I started, there was a couple of pages referencing this FM and excel). According to what we can read, Mauro has a good level of experience with VB.

This FM is so used as an example that in http://visualbasic.ittoolbox.com/groups/technical-functional/visualbasic-l/rfc_read_table-543014 there is a thread that invokes it.

As said in another thread, We've given Mauro the hook, line, fishing instructions and helped him in catching the first fishes. Now it's time for him to try to catch a fish by his own.

---------------Original Message---------------
From: Wes Arey
Sent: Friday, August 17, 2012 1:52 PM
Subject: SAP RFC Call Returns Error in Return Parameter from Vb Before the RFC Call

Here is a sample from something I had around. You will need to adapt it to your own needs.
The input table "options" contains the where clause.
The input table "fields" contains the field list of values to return from the query
You can add to input tables using Appendrow


Dim codes2 = bapi.Add("RFC_READ_TABLE")
codes2.exports("QUERY_TABLE") = "MSEG"
codes2.exports("DELIMITER") = "|"

Dim Opts As Object = codes2.Tables("OPTIONS")
Opts.Appendrow()
Opts(1, "TEXT") = "MJAHR EQ 2011 AND AUFNR EQ '001000375125'"

Dim fld As Object = codes2.tables("FIELDS")
fld.appendrow()
fld(1, "FIELDNAME") = "MBLNR"
fld.appendrow()
fld(2, "FIELDNAME") = "RSNUM"
codes2.call()
Dim tab As Table
tab = codes2.Tables("DATA")
returnedRows = tab.RowCount
aValue = tab.cell(x,y)

Be careful if you loop on this as the input tables stay populated between calls
use .freetable() to remove the rows
Horacio - Yeah he can look online but if you've never done it before the syntax is obtuse.
Wes

 
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
Have an SAP Question? Ask Your Peers at Toolbox for IT

_.____.__

0 comments:

Post a Comment

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