All,
I hate to keep posting things, but I have another SAP question. I am trying to pull longtext from SAP tables and can do it one part number and one operation at a time with the following code.
If someone has a website that lists all the possible remote function calls (RFCs) for SAP and how they can be used then I can use that to work from because I have searched and cannot find one anywhere. Or if anyone has any suggestions regarding the question then that would be appreciated also.
Thanks for all your help. It is always appreciated.
I hate to keep posting things, but I have another SAP question. I am trying to pull longtext from SAP tables and can do it one part number and one operation at a time with the following code.
Code:
Public Sub ReadText()
Set objFileSystemObject = VBA.CreateObject("Scripting.FileSystemObject")
Set filOutput = objFileSystemObject.CreateTextFile("C:\Documents and Settings\jpbivin\Desktop\LTEXT2.CSV", True)
Set RFC_READ_TEXT = funcControl.Add("RFC_READ_TEXT")
Set tblText_Lines = RFC_READ_TEXT.Tables("TEXT_LINES")
tblText_Lines.AppendRow
tblText_Lines(1, "TDOBJECT") = "ROUTING"
tblText_Lines(1, "TDNAME") = "005N503786180000000100000001"
tblText_Lines(1, "TDID") = "PLPO"
If RFC_READ_TEXT.Call = True Then
If tblText_Lines.RowCount > 0 Then
' Change Next line to write a different header row
filOutput.WriteLine "Object, LText"
For intRow = 1 To tblText_Lines.RowCount
filOutput.WriteLine tblText_Lines(intRow, "TDLINE")
Next
MsgBox "COMPLETED SUCCESSFULLY"
Else
MsgBox "No records returned"
End If
Else
MsgBox "ERROR CALLING SAP REMOTE FUNCTION CALL"
End If
'Result Table set back
Do Until tblText_Lines.RowCount = 0
Call tblText_Lines.Rows.Remove(1)
Loop
Set tblText_Lines = Nothing
End Sub
If someone has a website that lists all the possible remote function calls (RFCs) for SAP and how they can be used then I can use that to work from because I have searched and cannot find one anywhere. Or if anyone has any suggestions regarding the question then that would be appreciated also.
Thanks for all your help. It is always appreciated.