Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

RFC Import structure

Former Member
0 Likes
822

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

4 REPLIES 4
Read only

Jelena_Perfiljeva
Active Contributor
0 Likes
619

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.

Read only

0 Likes
619

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

Read only

0 Likes
619

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:

http://scn.sap.com/thread/1625536

Read only

Phillip_Morgan
Contributor
0 Likes
619

Hello,

You should look into the .net connector.