RFC CALL VIA EXCEL VBA
Hello,
Hope someone call help with the following.
I am trying to retrieve data from a table within SAP by using the following Excel VBA code.
Sub retrieve_table_contents()
Dim R3, MyFunc, App As Object
Dim SEL_TAB, NAMETAB, TABENTRY, ROW As Object
Dim Result As Boolean
Dim iRow, iColumn, iStart, iStartRow As Integer
iStartRow = 4
Worksheets(1).Select
Cells.Clear
'Create Server object and Setup the connection
Set R3 = CreateObject("SAP.Functions")
R3.Connection.System = "QA2"
R3.Connection.client = "900"
R3.Connection.user = "mbrough"
R3.Connection.password = "st34lh"
R3.Connection.language = "EN"
If R3.Connection.logon(1, False) <> True Then
Exit Sub
End If
'Call RFC function TABLE_ENTRIES_GET_VIA_RFC
Set MyFunc = R3.Add("TABLE_ENTRIES_GET_VIA_RFC")
Dim oParam1 As Object
Dim oParam2 As Object
Dim oParam3 As Object
Dim oParam4 As Object
Set oParam1 = MyFunc.exports("LANGU")
Set oParam2 = MyFunc.exports("ONLY")
Set oParam3 = MyFunc.exports("TABNAME")
Set oParam4 = MyFunc.Tables("SEL_TAB")
oParam1.Value = "E"
oParam2.Value = ""
oParam3.Value = "LAGP"
If frmQuery.txtSelect <> "" Then
oParam4.Rows.Add
oParam4.Value(1, "ZEILE") = frmQuery.txtSelect
End If
Result = MyFunc.CALL
If Result = True Then
Set NAMETAB = MyFunc.Tables("NAMETAB")
Set SEL_TAB = MyFunc.Tables("SEL_TAB")
Set TABENTRY = MyFunc.Tables("TABENTRY")
Else
MsgBox MyFunc.EXCEPTION
R3.Connection.LOGOFF
Exit Sub
End If
Result = R3.TABLE_ENTRIES_GET_VIA_RFC(EXCEPTION, LANGU:="E", ONLY:="", TABNAME:="LAGP", SEL_TAB:=SEL_TAB, NAMETAB:=NAMETAB, TABENTRY:=TABENTRY)
'Quit the SAP Application
R3.Connection.LOGOFF
If Result <> True Then
MsgBox (EXCEPTION)
Exit Sub
End If
'Display table header
iColumn = 1
For Each ROW In NAMETAB.Rows
Cells(iStartRow - 1, iColumn) = ROW("FIELDNAME")
' For C and N datatypes, explicitly set the cell to TEXT format, otherwise leading zeroes will be lost
' when numbers are imported from a SAP text field
If ROW("INTTYPE") = "C" Or ROW("INTTYPE") = "N" Then
Range(Cells(iStartRow - 1, iColumn), Cells(iStartRow - 1 + TABENTRY.Rowcount, iColumn)).Select
Selection.NumberFormat = "@"
End If
Cells(iStartRow, iColumn) = ROW("FIELDTEXT")
iColumn = iColumn + 1
Next
Range(Cells(iStartRow - 1, 1), Cells(iStartRow, NAMETAB.Rowcount)).Font.Bold = True
'Display Contents of the table
iColumn = 1
For iRow = iStartRow + 1 To TABENTRY.Rowcount
For iColumn = 1 To NAMETAB.Rowcount
iStart = NAMETAB(iColumn, "OFFSET") + 1
' If this is the last column, calculate the length differently than the other columns
If iColumn = NAMETAB.Rowcount Then
iLength = Len(TABENTRY(iRow, "ENTRY")) - iStart
Else
iLength = NAMETAB(iColumn + 1, "OFFSET") - NAMETAB(iColumn, "OFFSET")
End If
' If the fields at the end of the record are blank, then explicitly set the value
If iStart > Len(TABENTRY(iRow, "ENTRY")) Then
Cells(iRow, iColumn) = Null
Else
Cells(iRow, iColumn) = Mid(TABENTRY(iRow, "ENTRY"), iStart, iLength)
End If
Next
Next
'Format the Columns
Range(Cells(iStartRow, 1), Cells(iStartRow + TABENTRY.Rowcount, NAMETAB.Rowcount)).Select
Selection.EntireColumn.AutoFit
End Sub
However when I run the code I get the following exception message. 'SYSTEM_FAILURE' and nothing is returned.
Does anyone know why this is?
Thanks,
Mike
You can send data from excel to the MII message listener with a simple http post.
Message format requirments can be found here:
[http://help.sap.com/saphelp_xmii120/helpdata/en/45/6a86ac88130dece10000000a11466f/content.htm|http://help.sap.com/saphelp_xmii120/helpdata/en/45/6a86ac88130dece10000000a11466f/content.htm]
Edited by: Christian Libich on Aug 10, 2009 10:14 PM
Similar Messages
-
I am trying to do an RFC call from Excel to SAP using VBA. RFC is working fine for most the RFC enabled Function Modules except DDIF_FIELDINFO_GET and DDIF_FIELDLABEL_GET.
What can be the reason for this?
Can someonme please help me with a macro code where these FMs are working.
Also can someone please help me with some tutorial on SAP connection with Excel.
<REMOVED BY MODERATOR - REQUEST OR OFFER POINTS ARE FORBIDDEN>
Edited by: Alvaro Tejada Galindo on Nov 12, 2008 9:14 AMHello Jon.
DDIF_FIELDINFO_GET is not working for me either. But I have used another FM (/ZOPTION/LIVE_DDIF_FIELDINFO):
Public Sub RFC_FIELDINFO()
Dim Func As Object
Dim sapConn As Object
Dim tblFIELDTAB
Dim tblFIXED_VALUES
Dim intRow%
Dim intCol%
'* Sub : Call FM /ZOPTION/LIVE_DDIF_FIELDINFO *
'* Author : Holger Köhn *
'* Created : 23.08.2014 *
'* Changed : *
ThisWorkbook.Sheets("TEST").Activate
Cells.Select
Selection.ClearContents
ThisWorkbook.Sheets("TEST").Range("A1").Select
'* create RFC-Connection *
Set sapConn = CreateObject("SAP.Functions")
sapConn.Connection.RfcWithDialog = True
If sapConn.Connection.LogOn(1, False) <> True Then
MsgBox "Cannot Logon to SAP"
Exit Sub
End If
DoEvents
'* run FM /ZOPTION/LIVE_DDIF_FIELDINFO *
Set Func = sapConn.Add("/ZOPTION/LIVE_DDIF_FIELDINFO")
Func.Exports("TABNAME") = "AUFK"
Set tblFIELDTAB = Func.Tables("FIELDTAB")
If Func.Call = False Then
MsgBox Func.Exception
Exit Sub
Else
Application.ScreenUpdating = False
For intCol = 1 To tblFIELDTAB.ColumnCount
ThisWorkbook.Sheets("TEST").Cells(1, intCol).Value = tblFIELDTAB.ColumnName(intCol)
Next
If tblFIELDTAB.RowCount > 0 Then
For intRow = 1 To tblFIELDTAB.RowCount
For intCol = 1 To tblFIELDTAB.ColumnCount
ThisWorkbook.Sheets("TEST").Cells((intRow + 1), intCol).Value = tblFIELDTAB(intRow, intCol)
Next
Next
ThisWorkbook.Sheets("TEST").Activate
End If
Columns.AutoFit
Application.ScreenUpdating = True
End If
'* clear tblFIELDTAB *
Do Until tblFIELDTAB.RowCount = 0
Call tblFIELDTAB.Rows.Remove(1)
Loop
Set sapConn = Nothing
Set Func = Nothing
Set tblFIELDTAB = Nothing
End Sub -
How to use loop in VBAK table using BDC RFC connection through excel vba ?
Hello,
I am trying to extract data from VBAK table using rfc connection with Excel VBA. where i can able to pull data first time, when i tried to use the same set of code using loops, it throws an error like BAD INDEX.
Any help appreciated.Hello,
I am trying to extract data from VBAK table using rfc connection with Excel VBA. where i can able to pull data first time, when i tried to use the same set of code using loops, it throws an error like BAD INDEX.
Any help appreciated. -
Hi all
Is it possible to call the Message-Listener (RFC) via Excel (VisualBasic) or do i have to use a WebService to send data from Excel to MII?
Thanks in advance!
DanielYou can send data from excel to the MII message listener with a simple http post.
Message format requirments can be found here:
[http://help.sap.com/saphelp_xmii120/helpdata/en/45/6a86ac88130dece10000000a11466f/content.htm|http://help.sap.com/saphelp_xmii120/helpdata/en/45/6a86ac88130dece10000000a11466f/content.htm]
Edited by: Christian Libich on Aug 10, 2009 10:14 PM -
Hi,
I am trying to call a RFC (ZTAB_FIELD_DET) by using VBA
as I am new to this feature I dont know much about the possible causes of some errors.
here is the code of RFC which will accept the table name, field name and language. And in turn it will return the Datatype of the field its length and description
**************************RFC Start*******************************:
FUNCTION ZTAB_FIELD_DET.
""Local Interface:
*" IMPORTING
*" VALUE(I_TNAME) TYPE TABNAME
*" VALUE(I_FNAME) TYPE FIELDNAME
*" VALUE(I_LANG) TYPE LANG
*" EXPORTING
*" VALUE(E_DATATYPE) TYPE DATATYPE_D
*" VALUE(E_FIELDLENGTH) TYPE DDLENG
*" VALUE(E_DESC) TYPE STRING
*temporary FM created which can retrieve the field details of a table
DATA : BEGIN OF wa,
datatype LIKE dd03l-datatype,
leng LIKE dd03l-leng,
reptext LIKE dd03m-reptext,
END OF wa,
itab LIKE TABLE OF wa.
SELECT ldatatype lleng m~reptext
INTO CORRESPONDING FIELDS OF TABLE itab
FROM ( dd03l AS l JOIN dd03m AS m
ON lfieldname EQ mfieldname AND
ltabname EQ mtabname )
WHERE l~tabname EQ i_tname AND
l~fieldname EQ i_fname AND
m~ddlanguage EQ i_lang.
LOOP AT itab INTO wa.
e_datatype = wa-datatype.
e_fieldlength = wa-leng.
e_desc = wa-reptext.
ENDLOOP.
ENDFUNCTION.
*********************RFC End**********************************
and now here is the code that i use in VBA
'*****************VBA start******************************
Set functionCtrl = CreateObject("SAP.Functions")
Set sapConnection = functionCtrl.Connection
sapConnection.client = "xxx"
sapConnection.user = "xxx"
sapConnection.Language = "xxx"
sapConnection.hostname = "xxx"
sapConnection.Password = "xxx"
sapConnection.SystemNumber = "xxx"
sapConnection.Destination = "xxx"
If sapConnection.logon(0, False) <> True Then
MsgBox "No connection to R/3!"
Exit Sub 'End program
Else
MsgBox "Connection to R/3 successful"
' adding the RFC to functionCtrl Object
Set RfcCallTransaction = functionCtrl.Add("ZTAB_FIELD_DET")
RfcCallTransaction.imports("I_TNAME") = "MAKT"
RfcCallTransaction.imports("I_FNAME") = "MAKTG"
RfcCallTransaction.imports("I_LANG") = "EN"
If RfcCallTransaction.Call = True Then
MsgBox "Datatype" + RfcCallTransaction.imports("E_DATATYPE").Value
MsgBox "FieldLength" + RfcCallTransaction.imports("E_FIELDLENGTH").Value
MsgBox "Description" + RfcCallTransaction.imports("E_DESC").Value
Else
MsgBox " Call Failed! error: " + GetCustomers.Exception
functionCtrl.Connection.Logoff
End If
End sub
'************************VBA End*****************************************
When I run this code, connection to SAP is successful but the
>><i>Set RfcCallTransaction = functionCtrl.Add("ZTAB_FIELD_DET")</i>
shows 'RfcCallTransaction' value as 'Nothing'
and the error message thrown is
"SAP Datatype not supported"
and in the debugger it throws
"Object variable or with block variable not set"
Need your valuable inputs on this
Thanks in advance!
Ranjit.It was a problem with type of export params
after correction it got solved -
Fill a PDF form via Excel (VBA) - Hide text box
Hi,
i already created a PDF form and also can fill the text boxes with Excel VBA.
Now i'm about to hide some fields if they are empty, but i have no clue how to.
My code to fill the fields is:
Fields("Title").Value = Worksheets(TabName).Cells(actCell, 4).Value
To hide a field the code should be similar, but i have no clue what statement i need to set.
I already tried:
Fields("Title").Visible = False
Fields("Title").Hide
Fields("Title").Hide = True
What else can i type to hide and unhide the fields?
Looking forward to hear from you.
Thanks a lot.Does the form have a provision to insert images (e.g. a Browse button)?
[topic moved to iOS subforum] -
Dear All,
Manually(MIGO) we can input rcv/issue data in SAP.
I need some VBA example code, where I can input for MIGO data in excel and it will save into SAP via VBA code.
How can I do this? Can anybody help me?
Thanks in Advance.close
-
How to call Copy.GetItem Method in Excel vba function
Hi,
I want to use sharepoint copy services to download/upload or retreive field information of a sharepoint file.
For that i want to sharepoint web services. One class among them is copy. I want to call the GetItem method present in that class.
Think that modules are not installed or not found in excel vba editor tools reference library list to enable.
So please provide me the steps from scratch to install the sharepoint library. and call the Copy class methods in my script.
Just send me a sample vba code to accomplishes the same requirement. I appreciate the help.
Regards,
SUBBAHi SUBBA,
The following articles for your reference:
VBA - Download files from sharepoint
http://ckannan.blogspot.com/2012/09/vba-download-files-from-sharepoint.html
Using Microsoft Windows SharePoint Services with the Microsoft Office System
http://msdn.microsoft.com/en-us/library/office/aa159897(v=office.11).aspx
How to download a file from a Sharepoint server via Excel VBA?
http://www.justanswer.com/computer-programming/7ntq7-download-file-sharepoint-server-via-excel-vba.html
About the Excel VBA questions, you can also post it to Excel for Developers Forum, you will get more help and confirmed answers from there.
http://social.msdn.microsoft.com/Forums/office/en-US/home?forum=exceldev<o:p></o:p>
Best Regards
Dennis Guo
TechNet Community Support -
CALL RFC DATA FROM TWO LINKED TABLES IN EXCEL VBA
Hi,
I am using Excel VBA to call information from tables in SAP.
This is working correctly, however I now need to be able to call information from another table where the two tables are linked by a common data field.
Example.
The first table I have lists all items in stock and contains an article number. The second table contains all article numbers and their descriptions.
I want to be able to call the first table but to have the article codes description on there aswell.
Here is the code I am currently using.
Sub GetTable()
'Connect to SAP
Dim sapConn As Object 'Declare variant
Set sapConn = CreateObject("SAP.Functions") 'Create ActiveX object
sapConn.Connection.System = "QA2"
sapConn.Connection.client = "900"
sapConn.Connection.user = "mbrough"
sapConn.Connection.Password = "st34lh"
sapConn.Connection.Language = "EN"
If sapConn.Connection.Logon(1, False) <> True Then 'Try Logon
MsgBox "Cannot Log on to SAP"
End If
'Define the table specifics
Dim objRfcFunc As Object
Set objRfcFunc = sapConn.Add("RFC_READ_TABLE")
Dim objQueryTab, objRowCount As Object
Set objQueryTab = objRfcFunc.Exports("QUERY_TABLE")
objQueryTab.Value = "LQUA"
Set objRowCount = objRfcFunc.Exports("ROWCOUNT")
objRowCount.Value = "15000"
Dim objOptTab, objFldTab, objDatTab As Object
Set objOptTab = objRfcFunc.Tables("OPTIONS")
Set objFldTab = objRfcFunc.Tables("FIELDS")
Set objDatTab = objRfcFunc.Tables("DATA")
'Set the condition and refresh the table
objOptTab.FreeTable
objOptTab.Rows.Add
objOptTab(objOptTab.RowCount, "TEXT") = "LGTYP BETWEEN 'K01' AND 'K06'"
'Set fields to obtain and refresh table
objFldTab.FreeTable
'Then set values to call
objFldTab.Rows.Add
objFldTab(objFldTab.RowCount, "FIELDNAME") = "LGNUM"
objFldTab.Rows.Add
objFldTab(objFldTab.RowCount, "FIELDNAME") = "MATNR"
objFldTab.Rows.Add
objFldTab(objFldTab.RowCount, "FIELDNAME") = "WERKS"
objFldTab.Rows.Add
objFldTab(objFldTab.RowCount, "FIELDNAME") = "LGTYP"
objFldTab.Rows.Add
objFldTab(objFldTab.RowCount, "FIELDNAME") = "LGPLA"
objFldTab.Rows.Add
objFldTab(objFldTab.RowCount, "FIELDNAME") = "GESME"
objFldTab.Rows.Add
objFldTab(objFldTab.RowCount, "FIELDNAME") = "VERME"
objFldTab.Rows.Add
objFldTab(objFldTab.RowCount, "FIELDNAME") = "MEINS"
If objRfcFunc.Call = False Then
MsgBox objRfcFunc.Exception
End If
Dim objDatRec As Object
Dim objFldRec As Object
For Each objDatRec In objDatTab.Rows
For Each objFldRec In objFldTab.Rows
Cells(objDatRec.Index, objFldRec.Index) = _
Mid(objDatRec("WA"), objFldRec("OFFSET") + 1, objFldRec("LENGTH"))
Next
Next
End Sub
The table which contains the article descriptions is called 'MAKT' and this table also contains the column 'MATNR' which is the article field.
Many thanks,
MikeIs there no way of connecting the tables within the code.
IT won't give me access to SE11
Thanks,
Mike -
How to call an applescript application from Office 2011 Excel VBA
All:
I have been pounding my head how to implement a working VBA application into the Mac environment. I have tried a number of approaches calling applescript from VBA. I would like to call my applescript application and pass one argument. My applescript application is as follows:
<code>
on run argv
set theURL to (item 1 of argv)
set p_path to do shell script "echo ~"
set m_path to POSIX file p_path
set theName to text -((offset of "/" in (reverse of characters of theURL) as text) - 1) thru -1 of theURL
set theFile to (p_path & "/Downloads/" & theName)
set macPath to (POSIX file theFile)
do shell script "/usr/bin/curl " & theURL & " -o " & quoted form of POSIX path of macPath
end run
</code>
My last attempt within VBA is:
<code>
Sub SaveMetaDataFile(URL As String, shortFileName As String)
Dim scriptToRun As String
Dim posixcmd As String
posixcmd = ThisWorkbook.Path
scriptToRun = "tell application " & posixcmd & ":MetaDataFileDownloadScript.app " & URL
MsgBox "[" & scriptToRun & "]"
MacScript (scriptToRun)
</code>
I first tried to call the script directly without the "tell application" and I still obtain an error. I also tried the following in VBA and I get the same error with the last lane of code:
<code>
scriptToRun = "set theURL to " & """" & URL & """" & Chr(13)
scriptToRun = scriptToRun & "set p_path to do shell script " & """" & "/bin/echo ~ " & """" & Chr(13)
scriptToRun = scriptToRun & "set m_path to " & """" & posixcmd & """" & Chr(13)
scriptToRun = scriptToRun & "set theName to " & """" & shortFileName & """" & Chr(13)
scriptToRun = scriptToRun & "set theFile to (p_path & " & """/Downloads/""" & " & theName)" & Chr(13)
scriptToRun = scriptToRun & "set macPath to (POSIX file theFile)" & Chr(13)
scriptToRun = scriptToRun & "do shell script " & """" & "/usr/bin/curl " & """" & " & " & " theURL " & " & " & """" & " -o " & """" & " & " & " quoted form of POSIX path of macPath"
MsgBox scriptToRun
'scriptToRun = scriptToRun & "do shell script " & """/usr/bin/curl """ & " & " & " theURL " & """ -o """ & " & " & " quoted form of POSIX path of macPath"
MacScript (scriptToRun)
</code>
The above code is from the applescript application. The applescript application works well using the terminal via osascript. For example:
xenas-imac:Census Work Xena$ osascript MetaDataFileDownloadScript.app http://www2.census.gove/acs20095yr/summaryfile/Sequence_Number_and_Table_numberLookup.xls
xenas-imac:Census Work Xena$
The whole goal is to download a file into the Download directory from Excel to allow the next step to import the file into Excel for the user. Any help here would be great!
Thank you;
LoriUpdate:
Ok have the module almost working and matches the syntax within the test applescript I had created, but the VBA code via the MacScript() call is generating an invalid procedure or argument call. The following is the test applescript to compare the created string to be passed to VBA MacScript() function:
<code>
set appPath to quoted form of POSIX path of "Macintosh HD:Users:Xena:Desktop:Census Work:"
do shell script "/usr/bin/osascript " & appPath & "MetaDataFileDownloadScript.app " & "http://www2.census.gove/acs20095yr/summaryfile/Sequence_Number_and_Table_numberLookup.xls"
</code>
The following is the VBA module that generates the above word for word as far as I can tell:
<code>
Sub SaveMetaDataFile(URL As String, shortFileName As String)
Dim scriptToRun As String
Dim posixcmd As String
posixcmd = ThisWorkbook.Path
posixcmd = posixcmd & ":"
scriptToRun = "set appPath to quoted form of POSIX path of " & Chr(34) & posixcmd & Chr(34) & Chr(13)
scriptToRun = scriptToRun & "do shell script " & Chr(34) & "/usr/bin/osascript " & Chr(34) & " & appPath & " & Chr(34) & "MetaDataFileDownloadScript.app " & Chr(34) & " & " & Chr(34) & URL & Chr(34)
MsgBox "[" & scriptToRun & "]"
MacScript (scriptToRun)
End Sub
</code>
The message box in the above VBA code matches my test applescript file and I have taken the output of the MsgBox and used it in a test applescript and it works great, but VBA is throwing "Run-time error '5': Invalid procedure call or argument".
Looking at Microsoft's definition it takes a string argument and I have made sure that scriptToRun is a string type, so at this point I suspect there is something wrong with the MacScript() funciton, or I am missing something above. Is there another way to call an applescript application from VBA outside the MacScript() function? Or is there something I am missing? Any help or suggestions is needed.
Thank you;
Lori (CodeXena) -
Call Transaction from Excel VBA macro and download ALV list object results
I have a situation that must be very common u2013 but I canu2019t find any clear information on how to get it done!
We frequently run SAP transactions, download the results (orders or inventory) into Excel, do some calculations and create a spreadsheet report.
I would like to automate this process using Excel VBA so that a macro will perform these steps:
1. Run our custom SAP report "YSD033" that summarizes orders using the previous day as the [From Date] parameter. (The user already has an active ECC 6 R3 session running.) If possible, can the TC be run using a specific variant "G111BIZ" ?
2. Download the list object that appears in an ALV grid as a table to an empty spreadsheet in the active workbook (export XXL list object)
3. Save the resulting workbook and close Excel.
Should the solution use u201Ccall transactionu201D or a GuiXT script?
Any help would be much appreciated, and some sample VBA code would be great!
Thanks.
GlennGood suggestion, but
I get "permission denied" for SapGuiAuto.GetScriptingEngine
I also tried the method below, but received this RFC error message:
User PPPPPPP has no RFC authorization for function group SYST.
Sub LoginCheck()
If login = False Then
' Setting the necessary variables for R/3 connection
Set objBAPICortrol = CreateObject("SAP.Functions")
Set objConnection = objBAPICortrol.Connection
' Establish a connection
If objConnection.Logon(0, False) Then
login = True
MsgBox "Connection Established"
CommandButton1.Caption = "Disconnect"
End If
Else
CommandButton1.Caption = "Connect 2 SAP"
login = False
objConnection.Logoff
Set objConnection = Nothing
Set objBAPICortrol = Nothing
End If
End Sub
I was told that these kinds of authority open up too big of a window that can't be monitored adequately...
I'm considering an approach like what is below if I can't convince security to grant me permissions...
Application.Wait Now + TimeValue("00:00:01")
SendKeys EnterKey, False
Since blocked RFC security settings are preventing the solution from being installed, I am markgin this question as answered.
I will post different questions about 1. how to convince the security team that it will be safe to allow the use of RFC calls, and /or 2. how use some windows-level scripting code to run the SAP jobs.
Thanks.
Edited by: GlennWebster on Mar 1, 2010 4:34 PM -
How to call a labview dll from excel-VBA?
How to call a simple Labview DLL from Excel VBA?
I have seen examples of DLL calls from VB but does it work the same way for VBA? I have 2000 excel and Labview 8.5. I created the DLL and tried to call it from VBA using the same type of code as in NI's website example(ofcourse its a bit diff with 8.5)
http://zone.ni.com/devzone/cda/tut/p/id/...
BUT it errors out when called from excel
ERROR: The object invoked has disconnected from its clientYou would need to provide more details about the LabVIEW DLL, such as the prototypes of the functions (VIs) that you're trying to call, and your actual VBA code. Specifically, what object you're trying to create. You should also make sure the Run-Time Enginer is installed, as well as any required libraries such as the VISA Run-Time if you're using VISA. Have you made sure to enable the ActiveX server for the DLL?
A search yielded the following items that you may wish to peruse:
http://forums.ni.com/ni/board/message?board.id=170&message.id=261345&requireLogin=False
http://forums.ni.com/ni/board/message?board.id=170&message.id=45099&requireLogin=False
http://forums.ni.com/ni/board/message?board.id=170&message.id=299209&requireLogin=False
http://forums.ni.com/ni/board/message?board.id=170&message.id=195846&requireLogin=False -
Excel sheet generation through RFC call from a BSP application
Hi,
I am calling a RFC FM ( in R3) in Event handler 'OnInputProcessing' of a BSP application in a SRM server.
That function submits a report program which geneates a excel sheet using download FM . Excel sheet is not getting generated.
But when i am calling this RFC FM (in R3) from a report program ( in srm server)
this is generating an ecel sheet.
I want to have call RFC from BSP application.
I tried the way of submit a program ( which contains RFC call) from BSP application ,but it is also not generating excel sheet.
My ultimate AIM is to generate excel sheet by trigerring CALL or submit from BSP
application.
can any one propose solution for it.
Useful answers will be rewarded.Hi,
Which FM is it. I guess that the download generated is a SAP gui oriented solution, which will never work in a web environment
Eddy
PS. Reward useful answers and earn points yourself -
Hi all.
I am currently starting with WDA and facing some problems in calling BAPI via RFC.
We have a "plain" WAS without SD or other modules. Our data is distributed over multiple R/3 systems.
When I try to implement a Service Call to the BAPI BAPI_CUSTOMER_GETLIST via RFC I got the error message that this FM is not available in the current system (WAS).
Does anyone has experience in how to get this working?
What is the best practice here?
- Building wrapper on WAS which calls the FM via RFC on the other system?
- Installing missing modules on WAS ?
Any comment would be appreciated.
Cheers,
SaschaHi again.
To shorten development time we considered the following solution:
We are generating web service proxy classes on the WAS for the BAPIs of the R/3 system we want to use. Afterwards we are generating wrapper function modules which will use these proxies. So we do not have to import all missing structrues cause these are generated automatically during proxy generation.
I tested this already with BAPI_CUSTOMER_GETDETAIL2. Calling the wrapping fm which calls the service proxy works fine from se80. I do get a result via the service.
Then i generated a service call for my WEBDynpro component using the wizard in WDA.
Silly is that the generated code is not compilable cause of missing ,. Anyway after correcting I tried to run my webdynpro application and when the fm gets called via the generated service method I receive the following message:
CODE SOAP:111
ERRORTEXT Unallowed RFC-XML Tag (SOAP_EINVALDOC)
Any ideas?
Why is it working when i call the fm directly but not when calling it from my webdynpro app?
Thanks in advance
Sascha
Message was edited by: Sascha Dingeldey
Message was edited by: Sascha Dingeldey -
How to Debug Functional Module called via RFC?
Hi Experts,
Please, can someone explain to me how to debug functional module that is called via RFC? Thanks in advance.
Best Regards,
AleksandarHi Laxman,
First of all thank you very much for giving attention to my post. Ok, I am trying to debug function module in RM-CA (FICA), function module is called by CRM system (via RFC) and in addition all this chain is triggered by WebClient.
I have user that can login on the CRM as well as on RM-CA (ECC 6.0) system, but those users are different (unfortunately I do not have administration permission so I cant change profiles of my users but I can ask for it). I can without any problem debug calls that come from WebClient, so setting an external break point in CRM system I can catch whatever I want but when process comes to point where actually call to back-end (RM-CA) takes place I simply cant get into functional module, that resides on RM-CA side. Actually what happens is that processing continues as was chosen NEXT STEP (F6).
To resume, two systems and two different users. Where XCM user should be created? (on RM-CA system or CRM). Should I change something in Menu option Utilities -> Settings -> ABAP Editor tab -> Debugging tab, in field users? If you need any additional info please tell me.
Thanks again for your support.
Aleksandar
Maybe you are looking for
-
Purchase Order Interface Error
Can any body help me out to resolve the issue. After inserting in the PO interface tables (PO_HEADERS_INTERFACE , PO_LINES_INTERFACE, PO_DISTRIBUTIONS_INTERFACE ) when I run request ( Import Standard Purchase Orders) following error occured. And no e
-
Attachment List - FD32/FD33
Hi... I want create a copy from Customer for new credit control area, but I need copy the Attachment List too (transaction FD32). It's possible? How? Thanks...
-
Crash? Error Icon?
My powerbook has recently been running slow, not shutting down properly, etc. Then today- it wouldn't boot up. It gets to the gray screen with the spinning wheel and wont go past it. So I turned it off and this time when booting it up it went to a bl
-
Hello, I found a minor Softwarebug in the iOS 4.2.1 /iTunes 10: (I am using iPhone 4, iTunes and Windows 7) Whenever i syncronise music on to my iPhone and this process takes very long, because e.g. i convert media in to 128 bit/sec AAC files this tw
-
How to deploy my own web services to the Start BPEL PM Server?
Recently, I am learning the JDeveloper BPEL Designer(version 10.1.2.0), I had finished my first BPEL process CreditFlow flowing the quickstart guider. Now I wonder how to deploy my own web services to the Start BPEL PM Server? I mean I don't want to