Passing a Table to an RFC

Hi All,
I am using an RFc as a WebService in my application in Visual Studio.NET 2003(ASP.NET/VB.NET). The RFC returns the result in the form of a table which contains Material no and Material Description as two columns. When I am making a call to this RFC then it expects a import parameter in the form of a table.
"ByRef MATLIST()as GetMaterial.WebReference.ZMAT_LIST".
Any ideas how to pass this parameter to this RFC.
Thanks and Regards,
Sameer

not a direct answer to your query, but check out the following link , this would give an idea.
http://www.sap-img.com/abap/vb-codes-or-vba-macro-code-for-access-sap-and-run-one-rfc.htm
Regards
Raja

Similar 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

  • Problem passing a table in an RFC wrapper in ECC to a FM in SRM?

    I am creating a wrapper around FM 'TEXT_CONVERT_XLS_TO_SAP' in ECC, because I cant find a FM in SRM to convers an excel file into an itab. I pass an excel sheet from SRM to this wrapper to convert the values into an Itab and pass then back to SRM. The problem is the parameter "i_tab_converted_data = i_converted" from 'TEXT_CONVERT_XLS_TO_SAP' is of type STANDARD TABLE. So when I created the Itab = i_itab_converted_data in my program using a type I declared in my program, I can't use the type to create the exporting parameter in the FM to pass the itab back to SRM.

    >
    DEMVIL wrote:
    > What I was saying was tthe I_TAB_CONVERTED_DATA is of type "STANDARD TABLE" therefore if I create type and create a table of that type, in this case table I_CONVERTED, it works, but can't use the type to create an export parameter.
    >
    > CALL FUNCTION 'TEXT_CONVERT_XLS_TO_SAP'
    >     EXPORTING
    > *   I_FIELD_SEPERATOR      =
    > *      i_line_header       = 'X'
    >       i_tab_raw_data       = i_raw
    >       i_filename           = l_filename
    >     TABLES
    >       i_tab_converted_data = i_converted
    >  EXCEPTIONS
    >    conversion_failed       = 1
    >    OTHERS                  = 2.
    It should work. how have you defined i_converted? Below is what I have used and it works fine for me.
    TYPES: BEGIN OF ty_datatab,
      matnr          TYPE char18,  "Material Number
      short_text     TYPE char40,  "Short Text
      quantity       TYPE char13,  "Purchase Order Quantity
      unit           TYPE char3,   "Purchase Order Unit of Measure
      delivery_date  TYPE eeind,   "Delivery Date
      ekgrp          TYPE char3,   "Purchasing Group
      stge_loc       TYPE char4,   "Storage Location,
      matl_group     TYPE char9,   "Material Group
      agreement      TYPE char10,  "Agreement Number
      ag_item_num    TYPE char5,   "Agreement Item Number
      vendor_mat_no  TYPE char35,  "Vendor Material Number
      gl_account     TYPE char10,  "G/L Account Number
      costcenter     TYPE char10,  "Cost Center
      fund           TYPE char10,  "Fund
      func_area      TYPE char16,  "Functional Area
      item_txt       TYPE char70,  "Item Text
      created_by     TYPE char12,  "Created By
    END OF ty_datatab.
    it_record TYPE STANDARD TABLE OF ty_datatab INITIAL SIZE 0,
      CALL FUNCTION 'TEXT_CONVERT_XLS_TO_SAP'
        EXPORTING
          i_tab_raw_data       = it_raw
          i_filename           = p_pfile
        TABLES
          i_tab_converted_data = it_record
        EXCEPTIONS
          conversion_failed    = 1
          OTHERS               = 2.

  • Problem passing a table in an RFC wrapper?

    I am creating a wrapper around FM 'TEXT_CONVERT_XLS_TO_SAP' in ECC, because I cant find a FM in SRM to convers an excel file into an itab. I pass an excel sheet from SRM to this wrapper to convert the values into an Itab and pass then back to SRM. The problem is the parameter "i_tab_converted_data = i_converted" from 'TEXT_CONVERT_XLS_TO_SAP'  is of type STANDARD TABLE. So when I created the Itab = i_itab_converted_data in my program using a type I declared in my program, I can't use the type to create the exporting parameter in the FM to pass the itab back to SRM.

    Hi,
    Well if thats your requirement, then you will have to copy the FM to a Z FM & then tweak it as per your requirement.
    Thanks,
    Best regards,
    Prashant

  • Problem with passing table values to RFC

    Hi all,
    I am passing values in table in RFC. There are no import/export parameters in RFC. We are passing only tables.
    There are two tables in the RFC I_Dept and I_Subdept. Initially RFC is executed for getting the Dept which works fine as for this there is no need to set in input table value. But to get sub department I need to set the dept in I_Dept and after executing RFC I should get values in table I_Subdept. The code is as below:
    wdContext.nodeOutput_I_Dept().invalidate();
    wdContext.nodeOutput_I_Subdept().invalidate();
    Z_Bapi_Dept_Values_Input d_Input = new Z_Bapi_Dept_Values_Input();
    wdContext.nodeZ_Bapi_Dept_Values_Input().bind(d_Input);
    Zdept dept = new Zdept();
    dept.setZname("Sales");
    d_Input.addI_Dept(dept);
    try
    wdContext.nodeZ_Bapi_Dept_Values_Input().currentZ_Bapi_Dept_Values_InputElement().modelObject().execute();
    wdContext.nodeZ_Bapi_Dept_Values_Input().nodeOutput().invalidate();
    catch (WDDynamicRFCExecuteException e)
    msgManager.reportException(e.toString(), true);
    Is anything wrong in this code because even after executing the RFC the size of node I_Subdept() is zero. But the RFC works fine in the backend.
    Regards,
    Jaydeep

    A typical misunderstanding when populating structured input data  
    via code is the following:                                              
    - You have bound a WD context node hierarchy to the model say
      N1         >         M1
      ->N2       >         ->M2
                                                                                    where N1, N2 are WD Context nodes (N2 is child of N1) and M1, M2 are   
    model classes bound to the context nodes. Important: M1 has a relation 
    to M2 on the model side, means there is some method M1.setMyM2(M2)   
    (assuming the target role of the relation is called "MyM2").           
    - You create context elements for N1 and N2 which are bound to a model  
    class instances of M1 and M2 respectively.                                                                               
    Assuming that M1 is the "executable" model class (*_Input) and M2       
    represents an input structure needed, the M2-input will - using the     
    above approach - not be available on execution. Why? The relation on the
    model side (MyM2) is not available if just maintaining it via the     
    context, i.e. context and model are not "in sync". As RFC execution is  
    done via the model the M2 input will not be available.                  
    You best create complex/nested input structures on the model            
    side and then bind the top-level model object to the resp context node. 
    In the above sample this would be:                                      
    M1 m1ModelObject = new M1();                                            
    M2 m2ModelObject = new M2();                                            
    m1ModelObject.setMyM2(m2ModelObject);
    Hope it helps!
    Regards,
    Sangeeta

  • RFC function : passing a table as input

    Hi,
    I have no trouble passing input values to an RFC model in web dynpro, but I have difficulties to pass an input table.
    By default, the input "it_table" node of the model I use, is defined like this : card 0..n, selec 0..1 Singleton True.
    Do I have to change something?
    Then, what is the correct code for creating the node (because card is 0..n) and then add items (for each line of my table)?
    For the moment, I get this error : value node is created without a reference.
    Thanks

    I finally managed to get it work.
    Here is the COMPLETE solution.
    Note that in my solution, it was easier for me to put data in a value Node FIRST and THEN to copy it to the model Node.
    --> In the RFC function, declare the table "TYPE TLINE_T", and not "LIKE TLINE".
    GestionAvisComp - Context
    - Z2_I_Gestion_Simplifiee_Avis_Input (Model Node, card 0..1, sel 0..1, singleton true)
             + It_Ajout_Texte_Avis (card 0..n, sel 0..1, singleton true) Class Tline
                - Tdformat
                - Tdline
             - Qmart
    - It_Texte_Avis (Value node, card 0..n, sel 0..1, singleton true)
      public void wdDoInit()
        //@@begin wdDoInit()
         //$$begin Service Controller(1353609186)
         Z2_I_Gestion_Simplifiee_Avis_Input input = new Z2_I_Gestion_Simplifiee_Avis_Input();
         wdContext.nodeZ2_I_Gestion_Simplifiee_Avis_Input().bind(input);
         //$$end
        //@@end
    WhateverView
    public void onActionSauvegarderAvis(com.sap.tc.webdynpro.progmodel.api.IWDCustomEvent wdEvent )
         // Add two elements to the value node
         IIt_Texte_Avis_InputElement firstTexte_AvisEl = wdContext.nodeIt_Texte_Avis_Input().createIt_Texte_Avis_InputElement();
         IIt_Texte_Avis_InputElement secondTexte_AvisEl = wdContext.nodeIt_Texte_Avis_Input().createIt_Texte_Avis_InputElement();
         firstTexte_AvisEl.setTdformat("/*");
         firstTexte_AvisEl.setTdline("Line 1");
         secondTexte_AvisEl.setTdformat("/*");
         secondTexte_AvisEl.setTdline("Line 2");
         wdContext.nodeIt_Texte_Avis_Input().addElement(firstTexte_AvisEl);
         wdContext.nodeIt_Texte_Avis_Input().addElement(secondTexte_AvisEl);
         // Moving the elements of the value node into the model node
         int size = wdContext.nodeIt_Texte_Avis_Input().size();
         for (int i = 0; i < size; i++) {
              wdContext.nodeIt_Texte_Avis_Input().setLeadSelection(i);
              Tline x = new Tline();
              x.setTdformat(wdContext.currentIt_Texte_Avis_InputElement().getTdformat());
              x.setTdline(wdContext.currentIt_Texte_Avis_InputElement().getTdline());
              wdContext.currentZ2_I_Gestion_Simplifiee_Avis_InputElement().modelObject().addIt_Ajout_Texte_Avis(x);
         wdContext.currentZ2_I_Gestion_Simplifiee_Avis_InputElement().setQmart("ZE");
         // Execute the RFC model
         // Clear the Value Node
         while ( wdContext.nodeIt_Texte_Avis_Input().size() > 0 )
                   wdContext.nodeIt_Texte_Avis_Input().removeElement(
                        wdContext.nodeIt_Texte_Avis_Input().getElementAt(0)
         // Clear the Model Node          
              if (wdContext.currentZ2_I_Gestion_Simplifiee_Avis_InputElement().modelObject().getIt_Ajout_Texte_Avis() != null) {
              while(wdContext.currentZ2_I_Gestion_Simplifiee_Avis_InputElement().modelObject().getIt_Ajout_Texte_Avis().size() > 0)
                   wdContext.currentZ2_I_Gestion_Simplifiee_Avis_InputElement().modelObject().getIt_Ajout_Texte_Avis().remove(0)
    Edited by: Emanuel Champagne on Jan 17, 2008 9:32 PM
    Edited by: Emanuel Champagne on Jan 18, 2008 10:20 PM

  • Pass a table from my webdynpro JAVA application to an RFC in R/3

    Hi All,
    I need to Pass a table from my webdynpro JAVA application to an RFC in R/3. How can I do that?
    Regards
    Sarath

    Hi,
    Please have a look at this thread,
    Pass Table as Input to Adaptive RFC
    Regards,
    Saravanan K

  • Passing table to the RFC from BSP!

    Dear friends,
    I am trying to call a RFC (on 4.6c) from a BSP page( on a 6.20 System). i am trying to pass a table from the BSP to the RFC and get the result back. This is not working as expected.
    The Function module  at R3 (4.6c) which takes a table as an input and gives string as an output.
    The code is for Function module is given below.
    <b>FUNCTION ZBHAVIN1.
    ""Local interface:
    *"  EXPORTING
    *"     VALUE(TEMP) TYPE  STRING
    *"     VALUE(TEMP1) TYPE  STRING
    *"  TABLES
    *"      ITAB STRUCTURE  ZITAB
    TEMP  = ITAB-MESSAGE.
    TEMP1 = ITAB-MESSAGE1.
    ENDFUNCTION.</b>
    To call this function module the code for the bsp page (created on a 6.20 System) is :
    <b>
    <%@page language="abap"%>
    <% TYPE-POOLS ZBSP1. %>
    <html>
      <head>
        <link rel="stylesheet" href="../../sap/public/bc/bsp/styles/sapbsp.css">
        <title> Display Page </title>
      </head>
      <body class="bspBody1">
        <%
        DATA TEMP2  TYPE STRING.
        DATA TEMP3 TYPE STRING.
        DATA ITAB1 TYPE TABLE OF ZBSP1_ITAB11.
        DATA WA LIKE LINE OF ITAB1.   
        WA-MESSAGE  = 'THIS IS FIRST ELEMENT'.
        WA-MESSAGE1 = 'THIS IS SECOND ELEMENT'.
        APPEND WA TO ITAB1.
        CALL FUNCTION 'ZBHAVIN1'
             DESTINATION 'TCLCLNT200'
               IMPORTING
                  TEMP  = TEMP2
                  TEMP1 = TEMP3
               TABLES
                  ITAB  = ITAB1
               EXCEPTIONS
                 OTHERS = 1.
        %>
        <P><%=  TEMP2  %>
        <P><%=  TEMP3 %>
      </body>
    </html></b>
    This code is not working for me as it is.
    If i remove the comments, then it works, which means that the table passed from the BSP has no Header Line.
    So , do i need to always chnage my Receving RFC to take care of this issue? or is there a way to pass the Tabkle with Header line to the RFC from BSP?

    You'll have to define a table type either in the Types tab of the BSP application or as a Dictionary object.
    Then you can define a page attribute for the table and call the code from your OnCreate event handler (just to clean up your page layout)
    You have to remember that you are working with the whole OO context and so working with the tables inside the BSP are quite different.
    Have a look at this article for some examples: https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/library/unkown/exploring bsp development and the miniwas.htm

  • Passing values for Table in Adaptive RFC model

    Hi ,
    I am new to WebDynpro ,I have a requirement I need to pass a table for the back end BAPI, the table has two columns say (column1 and column2), before calling the BAPI I need to fill values in the column1 and the when the BAPI returns it should fill the column2 values, Is this possible to do, If so do I need to call invalidate for the values to get reflected after the BAPI returns??
    Can some one send me the sample code as to how to do this??
    Regards,
    emrin.

    Hi,
    After creating model and context mapping to table,
    u write the following code in component controller,
    WD Doinit();
    Bapi_Flight_Getlist_Input bap=new Bapi_Flight_Getlist_Input();
        wdContext.nodeBapi_Flight_Getlist_Input().bind(bap);
        try{
        wdContext.nodeBapi_Flight_Getlist_Input).currentBapi_Flight_Getlist_InputElement().modelObject().execute();
             wdContext.nodeOutput().invalidate();
        catch(Exception e)
             e.getStackTrace();

  • Sending a table to remote RFC in Java UDF

    Hello,
    <br><br>
    We use the API "com.sap.aii.mapping.lookup" often to make RFC calls from a UDF and return data. We typically create an import parameter in the Function Module and pass the value into the RFC. We now need to send in an unlimited number of values so we understand that instead of the import paramter we need to use a table. The problem is we get an error when we build the XML in our UDF and try to call the RFC. We tried wrapping the values in item nodes and several other approaches but we are not sure if we can populate a table via XML and make the RFC call.
    <br><br>
    Example of what we tried:
    <br><br>
    String sRfcxml = "&lt;?xml version=\"1.0\" encoding=\"UTF-8\"?&gt;&lt;ns0:ZCAE_MX_CONTRACT_ROUTING xmlns:ns0=\"urn:sap-com:document:sap:rfc:functions\"&gt;&lt;E_ZCAE_COCODE&gt;&lt;item&gt;0445&lt;/item&gt;&lt;/E_ZCAE_COCODE&gt;&lt;/ns0:ZCAE_MX_CONTRACT_ROUTING&gt;";
    <br><br>
    Regardless of what we try we get the following error during the call:
    <br><br>
    error of "RuntimeException in Message-Mapping transformation: Exception:[java.lang.RuntimeException: com.sap.aii.mapping.lookup.LookupException: Exception during processing the payload.Problem when calling an adapter by using communication channel RFC_RCV_ORGDATA (Party: , Service: ValidateXIData_BusiServ, Object ID: d5401e52ad1039df96f02bde53b23c06) XI AF API call failed. Module exception: 'error while processing the request to rfc-client: com.sap.aii.af.rfc.afcommunication.RfcAFWException: error while processing message to remote system:com.sap.aii.af.rfc.core.client.RfcClientException: could not convert request from XML to RFC:com.sap.mw.jco.JCO$Exception: (130) JCO_ERROR_XML_PARSER: Expecting a tag to begin with '<' instead of '0', in "ODE><item>0965</item"'. Cause Exception: 'error while processing message to remote system:com.sap.aii.af.rfc.core.client.RfcClientException: could not convert request from XML to RFC:com.sap.mw.jco.JCO$Exception: (130) JCO_ERROR_XML_PARSER: Expecting a tag to begin with '<' instead of '0', in "ODE><item>0965</item"'. com.sap.aii.mapping.lookup.LookupException: Problem when calling an adapter by using communication channel RFC_RCV_ORGDATA (Party: , Service: ValidateXIData_BusiServ, Object ID: d5401e52ad1039df96f02bde53b23c06) XI AF API call failed. Module exception: 'error while processing the request to rfc-client: com.sap.aii.af.rfc.afcommunication.RfcAFWException: error while processing message to remote system:com.sap.aii.af.rfc.core.client.RfcClientException: could not convert request from XML to RFC:com.sap.mw.jco.JCO$Exception: (130) JCO_ERROR_XML_PARSER: Expecting a tag to begin with '<' instead of '0', in "ODE><item>0444</item"'. Cause Exception: 'error while processing message to remote system:com.sap.aii.af.rfc.core.client.RfcClientException: could not convert request from XML to RFC:com.sap.mw.jco.JCO$Exception: (130) JCO_ERROR_XML_PARSER: Expecting a tag to begin with '<' instead of '0', in "ODE><item>0444</item"'."
    <br><br>
    Now if we do not pass any data or use an import versus table parameter in the function module it works just fine.
    <br><br>
    We know we can work around this by using an import parameter and stringing the values together with a delimiter and then breaking this apart in ABAP but we are looking for a cleaner solution.
    <br><br>
    Any thoughts?
    <br><br>
    Joe
    Edited by: Joe Wright on Nov 16, 2009 10:45 PM

    Not sure what's wrong, but are you sure your "stringed" XML document matches the expected RFC structure ? Btw, I'd replace (though it could be considered as a cosmetic change) to replace "ns0" with "rfc" in your namespaces declaration, it's what you'll see in all imported RFC objects in XI/PI
    Rgds
    Chris

  • Passing request table to Jco function

    Hello Experts,
      We have one requirement where we need to pass the table data from the BLS to SAP Jco Function Module call.  For example we are reading the material numbers from the oracle database and then we need to pass these material numbers to SAP Function Module as a table to read the further details from SAP for the given material numbers. 
      We wrote a custom function module in SAP which accepts the material number as table.  Is it possible to pass the table request parameter to Function Module?  If possible how can we do this?  I tried to pass the XML document to Function Module table, but no luck.
    Thanks
    Mohan

    Mohan,
    in the BLT, configure the JCO action to use you custom function. After pressing enter, MII reads the xml structure of the function (if the connection MII to SAP is working). In the further processing of the BLT, you can fill the RFC table which you can see in the link editor using your query results and the link editor types "AppendXML" or "AppendAfter".
    The following thread might help: [RFC call with multiple input|http://forums.sdn.sap.com/click.jspa?searchID=34070350&messageID=8134561].
    Michael

  • How to pass Dynamic Table(s) to FM

    Hello All i hv an requirement in which i need to process a block of code recursively. right now i am trying to do the same with Subroutine but its hard i know. I have an option to use FM instead but i am not sure if we can pass dynamic tables to FM, so is there anybody who had solution for the same. otherwise i can use it using TOP include to declare dynamic table in comon arae as im calling it from another FM(RFC) but i  dont want to use that as it will consume more memory.
    So i have 2 question
    1. should i use FM instead of subroutine for recursive operation if yes how can know if i reached the maximum alloted size of memory for a program. is there any FM which can tell me about the memory used or somethign like that so that i can avoid any ABAP dump.
    2.how can i pass dynamic tables as input to parameters.
    Note : i allready seen https://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/f50dcd4e-0501-0010-3596-b686a7b51492

    Hello Mani
    Perhaps the sample report ZUS_SDN_TABLE_READ_VIA_RFC_XML in thread
    How to return back a structure of dynamic tables in a Function Module
    might be a useful approach for you.
    Regards
      Uwe

  • Pass internal tables in Export  Parameters of  Function Module

    Hi
    How to pass internal tables through export parametes of the calling function module. i
    think i can pass it by reference ....
    if so can anyone suggest how to do it?

    Hi,
    You can Export values of an Internal table in two ways, by :
    1) specifying in Tables tab
    (Not recommended since it's an obsolete in ECC 6.0)
    If used, will reduce the performance of the FM
    Tables are always passed by reference
    2) specifying in Exports tab.
    The parameter should be a Table type (created in se11)
    having a Line type that refers to the structure of the data.
    Pass by Value is not used for Normal Function modules.
    Used usually for RFC enabled FMs.
    Cheers,
    Remi

  • Error while passing a table to a function module

    Hi Iam passing a table g_tab of length 376 flat structure to the function module..under TABLES section parameter.
    Changedocument_read_headers.
    iam getting a complile time error like the below displayed thing. Can u tell me how to solve this ?
    In the function module interface, you can specify only
    fields of a specific type and length under "I_CDHDR".
    Although the currently specified field
    "G_CDHDR_TAB" is the correct type, its length is incorrect.
    Edited by: kiran kumar on Jul 7, 2008 8:53 AM

    probably u making a mistake while declaring the table
    declare it like this in the tables section:
    S_JOB     LIKE     RNGE_OBJID
    where s_job is the internal table name and RANGE_OBJID is a structure type and NOT an internal table type.

  • PASSING A TABLE TO ANOTHER PROGRAM

    HII FRNDS
    CAN WE PASS A TABLE TO ANOTHER PROGRAM . I AM CALING THAT PROGRAM USING SUBMIT COMMAND.
    tHANKX
    ROHIT

    check this sample code..
    DATA list_tab TYPE TABLE OF abaplist.
    SUBMIT report EXPORTING LIST TO MEMORY
                  AND RETURN.
    CALL FUNCTION 'LIST_FROM_MEMORY'
      TABLES
        listobject = list_tab
      EXCEPTIONS
        not_found  = 1
        OTHERS     = 2.
    IF sy-subrc = 0.
      CALL FUNCTION 'WRITE_LIST'
        TABLES
          listobject = list_tab.
    ENDIF.
    hope this helps...

Maybe you are looking for