cancel
Showing results for 
Search instead for 
Did you mean: 

RfcGetTable in NW SDK

Former Member
0 Kudos

I am using the NW's SDK; i.e. the library is sapnwrfc.dll and the header is sapnwrfc.h.

After invoking a remote function in R/3, I wish to get the resulting table. I use the function RfcGetTable to retrieve the table and the functions RfcGetCurrentRow & RfcMoveToNextRow to iterate over the table.

Now the question is, if the amount of data to be retrieved via the table is large and does not fit into the memory, then (1) does the RfcGetTable gets the whole table or (2) RfcGetCurrentRow & RfcMoveToNextRow in the SDK library take care of getting the relevant data portion of the table into my address space or (3) I have to have my own code to keep track of how much data was transferred and figure out a way to get the next chunk of data.

Any information is appreciated.

Thanks

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

(1) does the RfcGetTable gets the whole table

Yes

(2) RfcGetCurrentRow & RfcMoveToNextRow in the SDK library take care of getting the relevant data portion of the table into my address space

Yes, and the table is compressed before transfer and decompressed by nwrfclib when receiveing.

(3) I have to have my own code to keep track of how much data was transferred and figure out a way to get the next chunk of data.

You do not need to.

and plus, you may just use RfcMoveTo to locate to the line you need to address and using RfcGetXXXX directly to get the data. Here you can omit one RfcGetCurrentRow call.

Former Member
0 Kudos

Thanks for the answer.

What happens if the compressed table is still large and doesnt fit into memory? How is this handled by SDK?

Former Member
0 Kudos

I am afraid if you trying to extract some very very big table like 'mseg' all together., you will get abap side heap over-flow exception first. According to my experience, 1GB size works fine, but if you really need to select all table content and transfer via RFC to outside, may be you consider slipt table by some time range or key range.

About nwrfcsdk lib`s own limitation, I currently do not have much detailed info on that. sorry.