‎2012 Dec 28 6:50 PM
Hello
I am using COM / OLE Objects to connect RFC SAP I can log in, send my export structure and I get my import as structure but I am not sure how to read the content of structure I just can read columns name, if I read value of the structure always are empty, but structure width is 48 I can not figure it out.
Where is the content of the structure? Should rfc returns a structure or a table?
I hope somebody can help ,me
Thanks
‎2013 Jan 02 8:50 PM
Since there has been no response, I guess I'm not the only one not able to understand the question.
RFC function would return whatever it is programmed to return. It can be either structure or a table. And we (SCN forum members) don't know what was programmed there.
‎2013 Jan 03 1:35 AM
Thanks for your answer.
I do not know about SAP, but I have some more questions I hope you can help me.
Can a structure have a lot of record, like a array? I have read tutorials about RFC object and I found that a table depends of RFC object not from Imports but there are not tables in rfc.
When I check import response I just get a empty structure I can not information, well I think so I am not sure if I am doing right.
This is what I am doing
Set FunctionCtrl = CreateObject("SAP.Functions")
FunctionCtrl.Connection.user = "ZZZZZZZ"
FunctionCtrl.Connection.Password = "ZZZZZZZ"
FunctionCtrl.Connection.Language = "EN"
FunctionCtrl.Connection.systemnumber = "84"
FunctionCtrl.Connection.hostname = "SERVIDOR" K22 I22 ' P22
FunctionCtrl.Connection.client = "100"
Set TheFunc = FunctionCtrl.Add("FUNCION")
Set OBjExp=TheFunc.Exports.item(1)
TheFunc.call
Set Import1=TheFunc.Imports.item(1)
MessageBox Import1.ColumnName(1)
MessageBox Import1.ColumnName(2)
MessageBox Import1.ColumnName(3)
MessageBox Import1.ColumnName(4)
MessageBox Import1.ColumnName(5)
MessageBox Import1.ColumnName(6)
Thanks
‎2013 Jan 03 3:55 PM
In ABAP "structure" is just a group of single variables. I'm not sure if there is a similar concept in C# (?). "Array" would be the equivalent of "internal table" in ABAP.
This is not an ABAP question and personally I never had to call an RFC function from outside of SAP, so I don't know how it is supposed to work. There should be some documentation in SDK, I believe.
Also there is a lot of information already available online. This is just the first post from Google search:
‎2013 Jan 03 5:09 PM