cancel
Showing results for 
Search instead for 
Did you mean: 

Perl SAP::Rfc - How to handle exported tables

Former Member
0 Kudos

I see in the 'read table' example how to process returned tables. In particular you don't have set up anything before you make the call.

What if the function is 'exporting' a table by value? Do I need to setup something in the argument list before I call?

--

Tim

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

I'm not sure that I understand your question quite right - tables type parameters are both export and import, so if you have something to send you load it prior to the call?

Former Member
0 Kudos

I'm not sure I'm understanding the SAP call parameters

The function is sapwl_statrec_read_remote in the sapwl_collector package (Basis 620). The package defines several table types, e.g. sapwlnormrecs. The function returns several parameters that are these tables type. The function parameters are not declared in the Tables tab, they are declared on the Export tab.

I want to know if I have to set up the return parameter before I make the call, or if the call will setup the Exported parameters. (The rfc_read_table examples did not; they accessed the returned DATA table after the call.)

Currently, the only setup I'm doing is to set the import parameters, e.g. start/stop dates, times, etc. And I'm getting an error that looks like SAP::Rfc is having problems parsing the returned tables.

RFC call failed: EXCEPT RfcCallReceive GROUP 104 KEY RFC_ERROR_SYSTEM_FAILURE MESSAGE RFC_ERROR_SYSTEM_FAILURE at C:/Perl/site/lib/SAP/Rfc.pm line 1055.

Top of the trace file is:

        • ERROR file opened at 20070405 123031 Central Daylig, SAP-REL 640,0,117 RFC-VER 3 815402 MT-SLT:1028 Error in program 'perl': *>RfcInstallStrucure2: field 1 (OPCODE, t:6, l:10) offset 0 too small (at least 22 expected)

>TS> Thu Apr 05 12:30:32 2007

T:1028 Error in program 'perl': *>RfcInstallStrucure2: field 1 (RECNO, t:9, l:2) offset 0 too small (at least 528 expected)

T:1028 Error in program 'perl': *>RfcInstallStrucure2: field 1 (RECNO, t:9, l:2) offset 0 too small (at least 528 expected)

>TS> Thu Apr 05 12:30:33 2007

T:1028 Error in program 'perl': *>RfcInstallStrucure2: field 1 (I_TRANSID, t:0, l:32) offset 0 too small (at least 180 expected)

I'm thinking the return parameter types are 'deep' and I need the new NW rfc stuff.

Thanks for all your help!

Former Member
0 Kudos

OK - well let me know how you get on with sapnwrfc.

Cheers.

Former Member
0 Kudos

Do you agree that the data types are too deep for SAP::Rfc 1.54?

With sapnwrfc I have the file_load error with Connection.dll. I've put the sdk .dlls and the ms vc dlls in the same dir as connection.dll, depends.exe says everything is ok. Don't know what to try next.

Former Member
0 Kudos

You need to either build your own sapnwrfc from source, or find someone with good windows programming to help you, or switch to a platform that I can help you with, such as Linux.

Piers Harding.