From bernd.schaufele@sap.com Fri Jun 1 11:14:41 2007 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.1.7 (2006-10-05) on ompka.net X-Spam-Level: X-Spam-Status: No, score=-102.6 required=5.0 tests=AWL,BAYES_00, DK_POLICY_SIGNSOME,SPF_HELO_PASS,SPF_PASS,UNPARSEABLE_RELAY, UPPERCASE_25_50,USER_IN_WHITELIST autolearn=ham version=3.1.7 Received: from smtpde01.sap-ag.de (smtpde01.sap-ag.de [155.56.68.171]) by ompka.net (8.13.8/8.13.8/Debian-2) with ESMTP id l51BEZf5006011 for ; Fri, 1 Jun 2007 11:14:41 GMT Received: from sap-ag.de (smtpde01) by smtpde01.sap-ag.de (out) with ESMTP id NAA01794 for ; Fri, 1 Jun 2007 13:14:08 +0200 (MESZ) X-MimeOLE: Produced By Microsoft Exchange V6.5 Content-class: urn:content-classes:message MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Subject: Dummy RFC with nested structure Date: Fri, 1 Jun 2007 13:13:20 +0200 Message-ID: <2F36B8660837BD448C5DB4E4F88341E70161337A@dewdfe12.wdf.sap.corp> Thread-Topic: Dummy RFC with nested structure Thread-Index: AceR8RzHZ5tvobNSRwaKfsmkHpyG/ASQXssgAAJuACA= From: "SCHAUFELE, Bernd" To: "Piers Harding" X-OriginalArrivalTime: 01 Jun 2007 11:13:22.0095 (UTC) FILETIME=[DD96B3F0:01C7A43D] X-SAP: out Content-Transfer-Encoding: 8bit X-MIME-Autoconverted: from quoted-printable to 8bit by ompka.net id l51BEZf5006011 Status: RO X-Status: A Content-Length: 3386 Lines: 94 Hi Piers, I have created an RFC with hardcoded values, that shows the desired undesired behaviour: FUNCTION MY_RFC_HARD . *"---------------------------------------------------------------------- *"*"Local Interface: *" IMPORTING *" VALUE(IMPORT_ELEMENT) TYPE MY_IMPORT *" EXPORTING *" VALUE(EXPORT_ELEMENT) TYPE MY_EXPORT *"---------------------------------------------------------------------- * Instead of getting access to the list of force element, we should * retrieve the list of tasks per FE ID in order to optimize the RFC DATA: i_firstentry TYPE MY_TABLE_ENTRY, i_secondentry TYPE MY_TABLE_ENTRY, i_thirdentry TYPE MY_TABLE_ENTRY, i_forthentry TYPE MY_TABLE_ENTRY, i_fifthentry TYPE MY_TABLE_ENTRY, i_sixthentry TYPE MY_TABLE_ENTRY, i_seventhentry TYPE MY_TABLE_ENTRY, EXPORT_ELEMENT-OBJID = '50002557'. EXPORT_ELEMENT-LTEXT = 'Right'. EXPORT_ELEMENT-OTYPE = 'O'. EXPORT_ELEMENT-PLVAR = '01'. EXPORT_ELEMENT-FIRST = 'GONE'. EXPORT_ELEMENT-SECOND = 'Ready'. EXPORT_ELEMENT-THIRD = 'Waiting'. EXPORT_ELEMENT-FORTH = 'Running'. EXPORT_ELEMENT-SHORT = '2007'. ****************** * GET CAPABILITIES * ****************** i_firstentry-OBJID = '00000000' . i_secondentry = i_firstentry . i_thirdentry = i_secondentry . i_forthentry = i_thirdentry . i_fifthentry = i_forthentry . i_sixthentry = i_fifthentry . i_seventhentry = i_sixthentry . APPEND i_firstentry TO EXPORT_ELEMENT-CAPABILITIES . APPEND i_secondentry TO EXPORT_ELEMENT-CAPABILITIES. APPEND i_thirdentry TO EXPORT_ELEMENT-CAPABILITIES. APPEND i_forthentry TO EXPORT_ELEMENT-CAPABILITIES. APPEND i_fifthentry TO EXPORT_ELEMENT-CAPABILITIES. APPEND i_sixthentry TO EXPORT_ELEMENT-CAPABILITIES. APPEND i_seventhentry TO EXPORT_ELEMENT-CAPABILITIES. ENDFUNCTION. The MY_IMPORT data type here doesn't play a role, while it does in the original code. The MY_EXPORT data type is defined like that: Component Component type Data Type Length OTYPE OTYPE CHAR 2 PLVAR PLVAR CHAR 2 OBJID HROBJID NUMC 8 FIRST MY_DESCRIPTION CHAR 35 SECOND TEXT40 CHAR 40 THIRD TEXT40 CHAR 40 FORTH TEXT40 CHAR 40 CAPABILITIES MY_TABLE table LTEXT CHAR40 CHAR 40 SHORT SHORT_D CHAR 12 The line type of MY_TABLE is MY_TABLE_ENTRY which is defined as follows: Component Component type Data Type Length OBJID HROBJID NUMC 8 PLVAR PLVAR CHAR 2 OTYPE OTYPE CHAR 2 SHORT SHORT_D CHAR 12 TEXT STEXT CHAR 40 I hope that this is enough information to create the RFC. When I call this RFC, the Ruby sapnwrfc crashes, I think in the line typeHandle = RfcDescribeType(line, &errorInfo); of the get_table_line(...) function, when evaluating the first line of the CAPABILITIES table. Thank you very much for all your help, support and effort! Cheers Bernd