Perl SAP::Rfc - input tables - The specified type Typ rfcdes is unknown.

I am pretty new to SAP and am working to understand the guts of it while also trying to do something useful, especially understanding how we could use Perl Sap::RFC.  I've been looking for days and making a little progress over time, but now I'm stuck.
Problem Summary:
I want to read the RFCDES table using RFC_READ_TABLE to get a dump of what's in there.   It is apparently too large for a plain RFC_READ_TABLE, but I discovered that by defining the fields that I want, I can get out what I need.  I did this by successfully executing RFC_READ_TABLE in SE37 for the RFCDES table by defining entries in the FIELDS table, but I can't figure out the right way to send a table as input to SAP via SAP::Rfc.
Background:
I am using SAP::Rfc v 1.55 on linux with 640,0,303 release of the rfcsdk.
I am getting the error:
RFC call failed: EXCEPT SYSTEM_FAILURE  GROUP   104     KEY     RFC_ERROR_SYSTEM_FAILURE        MESSAGE The specified type Typ rfcdes is unknown. at /home/<userid>/local/lib/perl5/site_perl/5.8.5/i386-linux-thread-multi/SAP/Rfc.pm line 1055.
Here is my code block (minus connect info):
my $it = $rfc->discover("RFC_READ_TABLE");
$it->QUERY_TABLE("rfcdes");
$it->ROWCOUNT( 30 );
$it->OPTIONS( ["NAME LIKE 'SAP%'"] );
my $str = $it->tab('FIELDS')->structure; # I think this line is extraneous
$it->FIELDS([{ FIELDNAME => "RFCDEST", OFFSET=> "000000", LENGTH => "000000",  FIELDTEXT=> ""}]);
$rfc->callrfc( $it );
$rfc->close();
The parameters to FIELDS are what worked in SE37.  I would eventually like to return more than just rfcdest (such as RFCOPTIONS) but at this point, anything working would be good
I have successfully done an RFC_READ_TABLE with SAP::Rfc (using the tables.pl example) so I'm pretty sure I have that working but I think the FIELDS input/output table is throwing me off.  Maybe I'm not understanding the array of hashes correctly?
I have looked at the thread SAP-::Rfc with Perl which got me this far but I'm still missing something.  Can anyone please help?
Thank you for your time.

You might want to check out the newer SAPNW::Rfc.  Not sure what version system you're connecting to.
Anyway, here's how I did RFC_READ_TABLE with SAP::Rfc years ago:
my $IT = $RFC->discover("RFC_READ_TABLE");
$IT->QUERY_TABLE('TBTCO');
$IT->OPTIONS( ["ENDDATE = '$MAXDATE' AND ENDTIME > '$MAXTIME' OR ENDDATE > '$MAXDATE'"] );
my @FLDARRAY = qw(JOBNAME JOBCOUNT JOBCLASS PERIODIC REAXSERVER RELUNAME SDLUNAME
AUTHCKMAN EVENTID SDLSTRTDT SDLSTRTTM STRTDATE STRTTIME ENDDATE ENDTIME STATUS);
$IT->FIELDS([@FLDARRAY]);
$RFC->callrfc( $IT );
print "Num Rows in PRD matching selection criteria: ".$IT->tab('DATA')->rowCount()." \n";
for my $ROW ( $IT->DATA ) {
   #do stuff;
$RFC->close();
Cheers,
David.
For reference, here's my wiki profile, where you can find my blogs on SAPNW::Rfc, and some sample scripts.
http://wiki.sdn.sap.com/wiki/display/profile/David+Hull
Edited by: David Hull on Mar 28, 2010 10:05 AM

Similar Messages

  • Perl SAP::Rfc: how sets the export parameters correctly?

    Hi,
    we use SAP::RFC with Perl to read out some user details. We have a problem
    of reading the export parameter structure "address".
    Here is an example:
    #!/usr/bin/perl
    use strict;
    use SAP::Rfc;
    use Data::Dumper;
    my $rfc = new SAP::Rfc(
                ASHOST => ... );
    my $iface = $rfc->discover( "BAPI_USER_GET_DETAIL" );
    my $user = "TEST";
    $iface->USERNAME( $user );
    my $lastname = $iface->ADDRESS->{'LASTNAME'};
    print "lastname : $lastname\n";
    $rfc->callrfc( $iface );
    $rfc->close();
    Nothing is saved in the field "lastname". Can anybody help us?
    Thanks
    Helmut

    Answer is pure assumption
    Pls check this link, you may get a idea
    https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/c98bea06-0b01-0010-78bd-8592433ff6f2
    Regards
    Madhan D

  • Error the entered value does not match the specified field type

    Hi,
    When I try to insert a null value to a field of the User Defined Table I am getting the error "The entered value does not match the specified field type" in SAP Business One version 2007 PL 42.
    Any help would be appreciated.
    Thanks in advance.
    Sudha.

    Hi Sudha,
    It probably have to do with how you defined the field.
    Is Null value allowed?
    What are the field definitions?
    Thanks,
    Jesper

  • SBO Mailer Error - The specified resource type cannot be found in the image file

    Hi Experts,
    I have created an alert in SBO and selected email and internal option for same. I get internal message however email is not getting delivered, I checked the Event Viewer of Windows and below error is shown for SBOMail.
    The description for Event ID 62 from source SBOMail cannot be found. Either the component that raises this event is not installed on your local computer or the installation is corrupted. You can install or repair the component on the local computer.
    If the event originated on another computer, the display information had to be saved with the event.
    The following information was included with the event:
    Failed to mark records error [-1]
    The specified resource type cannot be found in the image file
    I can send email from sbo for other documents but the alert is not delivering email.
    Please advise.
    Thanks
    Deepak

    Hi Deepak..
    Check with these threads...
    http://scn.sap.com/thread/966957
    http://scn.sap.com/thread/1295818
    SBOMail Application log error
    SBOMail error in event log
    Hope Helpful
    Regards
    Kennedy

  • How to avoid syslog messages when connecting via Perl SAP::RFC ?

    Everything works fine with Perl SAP::RFC calls to our ERP 6.0 thanks to Piers Harding except numerous entrys in the SAP-syslog (SM21) which make that a little bit unclearly.
    Tracing is set to "0" when connecting via new SAP::Rfc( ASHOST .. , TRACE    => "0" ) from Perl.
    The syslog - entries look something like this:
    07:46:10 DIA 000                          R1  M Trace vom Remote Client übernommen.       
    07:46:18 UP2 062 011 MYRFCUSER              R1  L Trace für Benutzer MYRFCUSER deaktiviert.
    Even when tracing is set to "0" there is also a *.trc-File in the directory where the perl script resides on RFC client side.
    In this trace file one can see the followig excert:
    >>> RfcOpenEx ...
    Got following connect_param string:
       TRFC=0 LCHECK=0 UNICODE=0 PASSWD=******* USER=MYRFCUSER LANG=DE *TRACE=CLIENT=011* ASHOST=myhost SYSNR=00
    Send RFCHEADER: 01/LIT/IEEE/SPACE/1100
    Send UNICODE-RFCHEADER: cp:1100/ce:IGNORE/et:5/cs:1/rc:0x00000023
    Could someone please give me a hint what is going wrong here.
    Thank you.
    Martin

    May be set TRACE->'1' and got tracing messages ?

  • Problem passing a table parameter in rfc call using the function control

    I try to pass a Table as parameter to a Function Module using the SAP.Functions library (part of SAP frontend controls) from a Visual Basic (VBA) program.
    The function module has been verified to work when invoked from SAP FrontEnd Function Builder.
    The SAP RFC Control is created with
    Set sapFunctions=CreateObject("SAP.Functions")
    Following code snippet shows how I attempt to set exports and add a table row before calling the function module:
    sapFunctions.Connection = sapConnection
    Set sapMaterialUpd = sapFunctions.Add("Z_SD_BAPI_SALES_DATA_UPD")
    With sapMaterialUpd
    <i>'set exports</i>
         .Exports("PA_GLPUPDLEVEL") = "S"
         .Exports("PA_VKORG") = "FI14"
    <i>'append table row</i>
         .Tables("IT_SALES_DATA_UPD").AppendRow
         .Tables("IT_SALES_DATA_UPD")(1, "VKORG") = "FI14"
         .Tables("IT_SALES_DATA_UPD")(1, "MATNR") = "W_3100"
         .Tables("IT_SALES_DATA_UPD")(1, "DATBI") = "99991231"
         .Tables("IT_SALES_DATA_UPD")(1, "DATAB") = "20041231"
         .Tables("IT_SALES_DATA_UPD")(1, "KBETR") = "2222"
         .Tables("IT_SALES_DATA_UPD")(1, "KONWA") = "EUR"
    End With
    <i>'call the function module</i>
    If sapMaterialUpd.Call() = True Then
        <i>'do something with the return tables here...</i>Else
        Debug.Print sapMaterialUpd.Exception
    End If
    The Call() returns <b>FALSE</b> and the exception is <b>"SYSTEM_FAILURE"</b>. The connection also resets.
    The local logfile that the control generates shows that an exception occurs at the point of the call:
    <i>10.02.2005  17:54:20.766 Packing Parameters for Z_SD_BAPI_SALES_DATA_UPD
    Packing Parameter PA_GLPUPDLEVEL.
    Packing Parameter PA_VKORG.
    Packing Table 0.
    Packing Table 1.
      10.02.2005  17:54:20.766 *** Calling  RFC Function 'Z_SD_BAPI_SALES_DATA_UPD'
      10.02.2005  17:54:20.986 RFC CALL status = RFC_SYS_EXCEPTION
      10.02.2005  17:54:20.986 RFC Error: RFC_IO27
      -Status:CODE=CM_DEALLOCATED_NORMAL STATUS=CM_NO_STATUS_RECEIVED DATA=CM_COMPLETE_DATA_RECEIVED ID=69415076
      -Message:connection closed
      -Internal Status:IO HANDLE=23 DRV=EXT LINE=1420 CODE=27 : GET ID=ffff LINE=861 CODE=7
      10.02.2005  17:54:20.986 Function call finished.</i>
    Seen next code snippet. If the Table object is not touched, the function call goes through without any problems:
    sapFunctions.Connection = sapConnection
    Set sapMaterialUpd = sapFunctions.Add("Z_SD_BAPI_SALES_DATA_UPD")
    With sapMaterialUpd
    'set exports
        .Exports("PA_GLPUPDLEVEL") = "S"
        .Exports("PA_VKORG") = "FI14"
        'do <b>not</b> append a table row, for testing only ;-)</b>
    End With
    <i>'call the function module</i>
    If sapMaterialUpd.Call() = True Then
    <i>    'do something with the return tables here...</i>
    Else
        Debug.Print sapMaterialUpd.Exception
    End If
    This code works perfectly when calling the function. It returns TRUE and behaves normally. The function module returns descriptive response text in a table telling that the table was empty, according to the BAPI implementation.
    So is there something special needed here <i>after</i> appending the table row and <i>before</i> making the Call to properly attach the table as a parameter for the function module?
    Can this be a bug in the SAP RFC Control? The version of the wdtfuncs.ocx is 6206.6.45.54.
    Any hints are welcome!

    hi All partner,
    who solved this problem , I meet it too and
    can't clear it.
    SAPfunc := sapfunctions1.Add('z_get_sfcs_dn_mo');    
    SAPitab := sapfunc.tables.item ('I_DNMO');
    SAPitab.appendrow;                                       SAPitab.value(1,'MANDT') := '220'; 
    SAPitab.Value(1,'VBELN') := '2150000001';
    SAPitab.Value(1,'POSNR') := '50';
    SAPitab.value(1,'MATNR') := '19-99999-00'; 
    SAPitab.value(1,'AUFNR') := '921241512001';
    SAPitab.value(1,'DEDAT') := '2005/09/09';
    SAPitab.value(1,'LFIMG') := '100';  
    IF  SAPfunc.call = true then
      begin
      end
    else
        begin
        showmessage('call fail!!') ;
        end;
    end;
    RFC source code as below
    FUNCTION z_get_sfcs_dn_mo.
    ""Local interface:
    *"  TABLES
    *"      I_DNMO STRUCTURE  ZDN_MO
      data: wa type zdn_mo.
      LOOP AT i_dnmo.
        wa-mandt = i_dnmo-mandt.
        wa-vbeln = i_dnmo-vbeln.
        wa-posnr = i_dnmo-posnr.
        wa-matnr = i_dnmo-matnr.
        wa-aufnr = i_dnmo-aufnr.
        wa-dedat = i_dnmo-dedat.
        wa-lfimg = i_dnmo-lfimg.
       modify  zdn_mo from wa.
        insert into zdn_mo values wa.  --dump at here
        commit work.
      ENDLOOP.
    T/C: ST22 error message say at
      insert into zdn_mo values wa. ---dump at here
    the sapfunc.call returns fail.
    Message was edited by: jorry wang

  • Find the SAP Script name for the Output type RD00 and Appli V3

    Hi Gurus,
    My requirement was to copy the Std SAP Script for the output type RD00 and application name V3 and to do some modification.
    Please any one suggest me how to find the Std SAP script based on the above Output type and Appl ?
    Regards
    paul

    Hi,
    The script Name is LB_BIL_INVOICE
    You can find byNACE>V3>Output Types>RD00-->Processing Routines
    In thje output type Press Change button and select New entries.
    Regards
    Sandipan
    Edited by: Sandipan Ghosh on Mar 31, 2008 12:06 PM

  • C# Calling SAP RFC/Web Service Failure

    Hi SAP Experts,
    I am facing this problem. When an external system is calling my SAP RFC/Web Service, the external system(which is not SAP) is not getting the correct value. But when I test the RFC in SAP GUI It is working correctly. When I test between SAP server A & SAP Server B it is working correctly which is the recepient server is getting the correct value. What might cause this problem ? Urget help is needed here. Thanks.

    Hi Hadi,
    U need to expose a custom RFC as a Web Service. This is a simple web service that returns Customer Data (from kna1) based on the Customer ID which we provide as input.
    In the RFC, U have to declare an internal table (G_RET) in the tables section of the RFC.
    Now, U have to test the web service, U can see a check box with NULL option beside the G_RET.
    cheers,
    Hema.

  • The key could not be obtained. You may need to use the -keystore argument with the specified keystor

    I am getting this error: "The key could not be obtained. You may need to use the -keystore argument with the specified keystore type." when trying to create an apk file using adt. I am following the steps mentioned here: http://blogs.adobe.com/ria/2010/10/28/creating-an-apk-file-using-flashbuilder-4-0/

    Could a self save from premiere cause the problem? By this i don't mean the autosave.
    Autosave is the only kind of 'self save', and is not likely to 'cause' project corruption.
    thnx for your reply. My first question came from a remark of Gakhue:
    "I'm using CS6 and I got that warning, I copied my project file on usb stick and re-opened in a different computer using CS5, it then gave me a few warnings about changing the name and saving it to auto save fault, I clicked away and said yes to each one"
    So i wondered how he did it
    The second question came from the fact that my last save was from 17 minutes after i left my studio. And i am not talking about an autosave. It was the main save of the corrupted videofile. And since i did not do it myself, the only option left is that Premiere did it? Or that premiere does not use the internal Mac clock and is on a different time. Which is not the case (just tested).

  • How to pass the data from a input table to RFC data service?

    Hi,
    I am doing a prototype with VC, I'm wondering how VC pass the data from a table view to a backend data service? For example, I have one RFC in the backend system with a tabel type importing parameter, now I want to pass all the data from an input table view to the RFC, I guess it's possible but I don't know how to do it.
    I try to create some events between the input table and data service, but seems there is no a system event can export the whole table to the backend data service.
    Thanks for your answer.

    Thanks for your answer, I tried the solution 2, I create "Submit" button, and ser the mapping scope to  be "All data rows", it only works when I select at least one row, otherwise the data would not be passed.
    Another question is I have serveral imported table parameter, for each table I have one "submit" event, I want these tables to be submitted at the same time, but if I click the submit button in one table toolbar, I can only submit the table data which has a submit button clicked, for other tables, the data is not passed, how can I achieve it?
    Thanks.

  • BAPI OR RFC THAT RETURNS THE VALUE TABLE CONTENTS THAT IS SPECIFIED IN DOM

    HI ALL,
    i have requirement of BAPI  or RFC that returns the value table contants(text table) in CRM..
    for ex:
      if i  pass the dataelement or domain or checktable as input parameter,could i get the contents of its text table associated with it....
    please if there is way help me on this..
    thanks and regards,
      goutham,

    Check these FM
    RFC_READ_TABLE
    RFC_GET_TABLE_ENTRIES

  • Acess the sap r/3 table

    hi everyone,
        can i access the sap r/3 tables directly without rfc .....
       any possibility is there means plz send me reply........
       present i am doing bapi via jco using RFMs.........
      with regards,'
      satish

    Hi,
    This question has already been asked (and answered) here - without FM can i acess sap table via jco? and here - bapi problem via jco and here - through jdbc driver connect to sap  Not sure if points are getting awarded or not...
    Anil, you are posting very confusing answers that don't help people who don't know about SAP and RFC technology.  A BAPI is a type of function module.  An RFC is a type of function module.  A function module is a function module.  To clarify, there is only one object called remotely, that is a function module.  For this to happen it HAS to be RFC enabled (Remote Function Call.)  A BAPI is a function module that completes a certain piece of business logic in entirety, such as creating a document or changing a document - typically methods of business objects as you suggest.  There should be no distinction between RFC and BAPI.  Typically, all BAPI function modules are RFC-enabled so they can be accessed from remote systems/applications.  Any function module that is RFC enabled can be accessed from a remote system.  To access SAP data from external systems/applications via JCo you need a function module that is RFC enabled.  There are a lot of RFC enabled function modules supplied by SAP - if you are developing custom logic or working with custom tables on the SAP system then you will need to develop a custom RFC enabled function module (call it a BAPI if you want!) that you can then call via JCo.
    I'd also say that connecting directly to a SAP database is very bad practice and shouldn't be suggested to resolve issues - data integrity can suffer and cause serious problems for the SAP system.  This method should be used with custom database instances (say created via the dictionary builder in NDS.)
    Gareth.

  • MII BLS Trasaction calling SAP RFC call - How to pass XML document as input parameter

    Hi,
    1. I am very new to the SAP and SAP xMII workbench.
    I have a webpage with iGrid applet embedded on it. We have multiple rows in the iGrid applet that can be selected by user.
    After selecting single or multiple grid rows user clicking a 'button' on the web page.
    We are using iCommand applet (ExacuteQuery] to call the BLS transaction.
    Using iCommand applet on the webpage we are passing parameters to BLS Transaction.
    Would like to pass on the single/ multiple selected grid row values as a XML document to BLS Transaction variable which is an Input parameter for SAP RFC call.
    I am using SAP JCo Session to make the RFC call. 
    Any pointers will be helpful.
    2. Which is a best track in SAP training courses to get formal training.
    Thanks,
    Senthil

    Hi Senthil,
    What version of MII (or xMII) are you working with?  There are some examples of this type of transaction in the wiki which you may want to download and take a look at.
    Regards, Mike
    SAP Customer Experience Group - CEG

  • Help on PO13 ---- "SAP Organizational Object"  in the table control.

    Hi All,
    Can some one tell me details on or where to read from ..... PO13 -> "SAP Organizational Object"  in the table control.
    For eg if you go to PO13 -
    > "Relationships"  in the table control you get all the hierarchy details of an employee (eg: reports to, belongs to, holder ...etc.).
    Similarly what would you get when u go to PO13 -
    > "SAP Organizational Object" -
    > Overview  in the table control. Is it something to do with product hierarchy ..... am not very sure. I am working on a sandbox on a trial workflow for learning purpose and I do not have it configured so that I can look for some samples.
    I understand I am not very clear about my question, but still I hope if someone can answer.
    Thanks,
    Anu.

    An object type is a generic description of an object.
    The object type definition determines the object type by specifying its various components.
    An object type is defined by its
    Basic data, such as name, created by...
    Key fields, which give each object a unique ID
    Attributes as the characteristics of an object
    Methods with parameters and exceptions as activities that can be performed for an object
    Events, which describe any changes that occur
    Implementation in the program code
    After assigning Object Type, you should click on Assign Key.. and assign respectuve Object ID.
    This will create link between Object in HR-OM with Object of other modules like Sales, Vendor, Purchase etc.
    Note sure, how this is used in Workflow... i never worked on workflows.
    Regards
    ...SAdhu

  • SAP Patch :'Error reading the standard sequence from the document tables

    Hi Experts,
    Please help!
    Recently SAP patching is carried out in our R/3 environments. Before patching, all our customized RFCs were working correctly.
    We are using BAPI ''BAPI_ALM_ORDER_GET_DETAIL' in a RFC. After the patching, the version date of the BAPI ''BAPI_ALM_ORDER_GET_DETAIL' is changed to new date of patching.
    Now, when we are calling the customized RFC, ''BAPI_ALM_ORDER_GET_DETAIL' is returning an error 'Error reading the standard sequence from the document tables'.
    This comes when we are pasiing any order with Order type 'ZM02' ( Maintenance Order - Preventative). It is working absolutely fine with Order Type ZM01(Maintenance Order - In Hours Opex).
    Sometime, when RFC is run individually, it works fine with same data and sometime it is throwing this error with the same data. Very Inconsistent.
    Please advice whether patching is the reason.
    Any advice..is welcomed.
    Many Thanks,
    Rohit

    We found that the flow of the code(RFC) was making a situation where even correct order id was passed to this BAPI, the result was an error 'Error reading the standard sequence from the document tables'. we reverted the RFC to it's earlier version. now that problem is not there.

Maybe you are looking for

  • Drag and Drop in JTabbedPane

    My problem is this. when you drag a file in jtabbedpane after it load, the drag and drop function are not working, instead it will only work when you add a tab in it, then you drag a file.

  • Cost Center not appearing in Hierarchy

    Hello, I am sending an IDoc from an external system into ERP to create new cost centers.  The IDoc comes in successfully and creates the cost center and I can see that it was correctly assigned to the cost center area if I look at the record in KS03.

  • Java Studio Creator Wishlist

    Hey here is a wishlist for the documentation support 1. DOcumentation on how to add more data sourcs nto the ide 2. How can JSCreator be used in a proiduction environment, with Source control support, inter operaboility with html design tools such as

  • GOF Patterns in Java

    I am currently reading the GOF book 'Design Patterns'. I was wondering if anyone could point me to a good book, or online link where GOF patterns are identified in the J2SE/J2EE packages? For example, the Decorator pattern appears to form the basis o

  • Missing Paragraph Level Tag from the Text drop down

    I am following the first tutorial with Katie's Cafe (written version) and I notice that when I click on Text, I am missing two things in the drop down menu; they are called the Paragraph Level tags.  I downloaded Muse only 7 days ago.  I am using a P