Call Function with RFC  dynamic table

Hi all
I create a function compare TABLE_ENTRIES_GET_VIA_RFC and CTVB_COMPARE_TABLES, everything is.dynamic
it works well but, how could i create a dynamic output parameter for table.
the system show me that RFC and dynamic table don't work.
i don't want line by line i would like to have the real structure inside of the Function i have everything but i can't move the data to the output parameter table .
could somebody help ?

Thx RE (and Mani) for the feedback.
I think that this URL is sufficient to understand how to pass dynamic internal table via RFC function module, whatever it is input or output. This URL says to use a STRING to store the table content in XML format, via CALL TRANSFORMATION ID, and pass this string as parameter. In the calling program, we have to "decode" the XML back into abap data, Just notice that we don't need to create an XSLT, ID is sufficient.
For any other information, open a new thread, or ask a precise question.

Similar Messages

  • Call function with rfc or not ?

    How can I know that an function is called by rfc or not ?
    info : The caller is not R/3 system. This web interface...
    thanks in advance

    Hi Stephan,
    Try this FM
    TRANSACTION_CALL_VIA_RFC
    Data : v_bdi_line type bdi_line.
    Call Function 'TRANSACTION_CALL_VIA_RFC'
         Exporting
             tcode = sy-tcode.
         importing
             transaction_data = v_bdi_line.
         Exceptions
             tcode_not_exist = 1.
    if sy-subrc ne 0.
       It means it is RFC call.
    endif.
    Reward points if it helps you.
    Regards,
    Sudhakar.

  • Interactive form With a dynamic table inside that

    Hi Experts,
                   i have an  Adobe interactive form With a dynamic table inside that. Add/ Delete button is there inside the form to add and delete rows from the table. This is working fine when iam viewing the form in the preview of adobe designer. when i deploy and run the application, the dynamic table is not working, internally the rable rows are creating, but the rows are not displaying in the form.. iam getting messages(which i set) when the row is created or deleted, but its not updating on the form ..
    iam using wdj
    please suggest asap.
    Regards
    Sarath

    Hi Sarath,
    Seems to be an issue with ACF. Please intall the ACF from the below link:
    https://sapmats-de.sap-ag.de/download/download.cgi?id=F9RUZ3Q7TERUBSMHSXWT3UMEM59IJYIPA931VQD32A1UNAKZ6B
    And also refer to the SAP note no. 1104060 and do the needful configuration.
    Regards,
    Arafat

  • CALL FUNCTION  WITH STARTING NEW TASK

    Hi All,
    i'm call a function module through
    CALL FUNCTION 'Y_WIN'  DESTINATION 'rfc_destination' then it's give right result but when i want to call with starting new task then
    CALL FUNCTION 'Y_WIN'  STARTING NEW TASK 'INFO' DESTINATION 'rfc_destination'
    it does nt provide me any data. i have check in debugger call fm is wkging fine so pls clear me why i'm nt geeting result.
    pls give ur suggestions,
    Anuj

    Did you use the PERFORMING <form> ON END OF TASK to get the results back; like in the following sample
              CALL FUNCTION 'SAPWL_STATREC_READ_FILE'
                   STARTING NEW TASK taskname
                   DESTINATION list-name
                   PERFORMING read_outtab ON END OF TASK
                   EXPORTING
                        read_start_date   = s_date
                        read_start_time   = '000000'
                        read_end_date     = s_date
                        read_end_time     = '235959'
                   EXCEPTIONS " failure when calling RFC
                        communication_failure = 1 MESSAGE msg_text
                        system_failure        = 2 MESSAGE msg_text
                        RESOURCE_FAILURE      = 3.
    and
    FORM read_outtab USING taskname.
    * Receive results back
      RECEIVE RESULTS FROM FUNCTION 'SAPWL_STATREC_READ_FILE'
        TABLES
          v2_normal_records = outtab
        EXCEPTIONS " from the called FM
          nodata    = 1.
    Regards

  • Call Function - Dest "RFC"

    Hello,
    i have a big problem.
    I´ve written a web dynpro programm.
    In this program i call a function:
    CALL FUNCTION 'READ_DAT' DEST 'Z_READ_DAT".
    Z_READ_DAT is a RCF which points on a exe file on my pc.
    When is use this Function in SAPGUI all works fine, but when i call it in WDA there is a dump.
    "Cannot open RFC". ST22 says EXEC_SAPGUI : cannot open sapgui.
    What can i do?

    Hi Benjamin Pfahl  ,
                                   there are cetain RFCs that cannot be used with Webdynpro, like gui_upload and all. the Fm 'READ_DAT' DEST 'Z_READ_DAT, since its working fine in normal abap means it cannot be used with wda, the Fm might be using sap gui to fetch from your pc.
    Regards
    Sarath

  • Data model with a dynamic table name

    Hi,
    I have report requirement, where in the table name in the data model query is unknown.So I use lexical parameter like " select * from &P_TABLE_NAME". This dynamic table is created and data populated in the before report trigger and table name is assigned to P_TABLE_NAME. The parameter P_TABLE_NAME has to be assigned an initial value otherwise the report errors with 'invalid table name' error. So I give a dummy table say 'DUMMY' as the initial value which has the same structure (with no data ) as the table that is being created in the before report trigger.
    The problem is that the data model query is being parsed ( and maybe executed ) even before the 'before report' trigger is run. As a result, the report o/p is empty, since the query used the DUMMY table for execution. But after the report completes, I can see the dynamic table being created with data.
    Question: Why is the before report trigger getting executed after the datamodel query is parsed and executed.
    Regards,
    Suresh

    Hi....
    yes, these are the settings I have:
    server folder: /Applications/MAMP/htdocs/dwphpelclasico
    web url:  http://localhost/dwphpelclasico/
    They should be correct. But I still get the message:
    Warning:  require_once(Connections/elclasico.php) [function.require-once]: failed to open stream: No such file or directory in /Applications/MAMP/htdocs/dwphpelclasico/list.php on line 1
    Could it be something with list.php?
    This is a new file I created to display my tableand  where I am inserted the record set.
    thanks

  • Error while transforming XSLT by calling function with Reflection API

    Hi,
    I'm new to Reflection API. I want to call function from the jar file which is not in my application context. So I have loaded that jar ( say XXX.jar) file at runtime with URLClassLoader and call the function say [ *myTransform(Document document)* ]. Problem is that when I want to transform any XSLT file in that function it throws exception 'Could not compile stylesheet'. All required classes are in XXX.jar.
    If I call 'myTransform' function directly without reflection API then it transformation successfully completed.
    Following is code of reflection to invoke function
            ClassLoader contextCL = Thread.currentThread().getContextClassLoader();
            URLClassLoader loader = new URLClassLoader(jarURLs, contextCL);
            Class c = loader.loadClass(fullClasspath);
            Constructor constructor = c.getDeclaredConstructor(constructorParamsClasses);
            Object instance = constructor.newInstance(constructorParams);
            Method method = c.getDeclaredMethod("myTransform", methodParamsClasses);
            Object object = method.invoke(instance, methodParams);Following is function to be called with reflection API.
    public Document myTransform ( Document document ) {
    // Reference of Document (DOM NODE) used to hold the result of transformation.
                Document doc = null ;
                // DocumentBuilderFactory instance which is used to initialize DocumentBuilder to create newDocumentBuilder.
                DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance () ;
                // Reference of DocumentBuilder used to create new Document (DOM NODE).
                DocumentBuilder builder;
                try {
                      // Initialize DocumentBuilder by using DocumentBuilderFactory instance.
                      builder = factory.newDocumentBuilder ();
                      // Initialize new document instance by using DocumentBuilder instance.
                      doc = builder.newDocument () ;
                      // Creates new DOMSource by using document (DOM NODE) which is coming through current transform() method parameter.
                      DOMSource domsource = new DOMSource ( document ) ;
                      // Creates new instance of TransformerFactory.
                      TransformerFactory transformerfactory = TransformerFactory.newInstance () ;
                      // Creates new Transformer instance by using TransformerFactory which holds XSLT file.
                      Transformer transformer = null;
    ********* exception is thrown from here onward ******************
                      transformer = transformerfactory.newTransformer (new StreamSource (xsltFile));
                      // Transform XSLT on document (DOM NODE) and store result in doc (DOM NODE).
                      transformer.transform ( domsource , new DOMResult ( doc ) ) ;
                } catch (ParserConfigurationException ex) {
                      ex.printStackTrace();
                } catch (TransformerConfigurationException ex) {
                      ex.printStackTrace();
                } catch (TransformerException ex) {
                     ex.printStackTrace();
                } catch (Exception ex) {
                     ex.printStackTrace();
                //holds result of transformation.
                return doc ;
    }Following is full exception stacktrace
    ERROR:  'The first argument to the non-static Java function 'myBeanMethod' is not a valid object reference.'
    FATAL ERROR:  'Could not compile stylesheet'
    javax.xml.transform.TransformerConfigurationException: Could not compile stylesheet
            at com.sun.org.apache.xalan.internal.xsltc.trax.TransformerFactoryImpl.newTemplates(TransformerFactoryImpl.java:829)
            at com.sun.org.apache.xalan.internal.xsltc.trax.TransformerFactoryImpl.newTransformer(TransformerFactoryImpl.java:623)
            at com.actl.dxchange.utilities.Transformation.transform(Transformation.java:83)
            at com.actl.dxchange.base.BaseConnector.transform(BaseConnector.java:330)
            at com.actl.dxchange.connectors.KuoniConnector.doRequestProcess(KuoniConnector.java:388)
            at com.actl.dxchange.connectors.KuoniConnector.hotelAvail(KuoniConnector.java:241)
            at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
            at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
            at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
            at java.lang.reflect.Method.invoke(Method.java:585)
            ...........

    Hi,
    Thanks for response.
    Following is code for setting 'methodParamsClasses' array object. I do ensure that Document is not null and valid. My application is web application.
    Document requestObj = /* my code for generating Document object*/
    Object[] methodParams = new Object[]{requestObj}
    Class[] methodParamsClasses = new Class[]{};
                if (methodParams != null) {
                    methodParamsClasses = new Class[methodParams.length];
                    for (int i = 0; i < methodParams.length; i++) {
                        if (methodParams[i] instanceof Document) {
    /************** if parameter is instance of Document then I set class type as "Document.class" ***********/
                            methodParamsClasses[i] = Document.class;
                        } else {
                            methodParamsClasses[i] = methodParams.getClass();

  • Call function within rfc

    Hi,
    i´ve developed an RFC FM and within this FM i use    
    CALL FUNCTION '
    NUMBER_GET_NEXT'
    in order to get a sequential number each time the FM is called.
    When this RFC FM is called from XI
    i get exception 1 (INTERVAL_NOT_FOUND) 
    Why is this happening?
    How can i solve this problem?
    Best regards.

    Hi,
    i just do this:
      DATA: l_number(15) TYPE C.
      IF l_number IS INITIAL.
        CALL FUNCTION 'NUMBER_GET_NEXT'
          EXPORTING
            NR_RANGE_NR             = '00'
            OBJECT                  = 'ZVLBSOLICI'
          IMPORTING
            NUMBER                  = l_number
          EXCEPTIONS
            INTERVAL_NOT_FOUND      = 1
            NUMBER_RANGE_NOT_INTERN = 2
            OBJECT_NOT_FOUND        = 3
            QUANTITY_IS_0           = 4
            QUANTITY_IS_NOT_1       = 5
            INTERVAL_OVERFLOW       = 6
            BUFFER_OVERFLOW         = 7
            OTHERS                  = 8.
    ENDIF.
    Best regards.

  • Using JOIN Function with NULL Dynamic Parameters

    I have a report with utilizes dynamic parameters but will not run if any of the parameters are null.  I am also using the JOIN function to print out the values of these parameters. If the user doesn't enter in all the parameters, can the report still run?

    Hi eburton 
    In CR 2008 we have optional parameter functionality, this will allow the report to run without parameter values.
    If you are not using CR2008 then the functionality is not available.
    Thanks,
    Sastry

  • Cannot call functions with this[]

    Hello,
    I'm in trouble because I need to call functions from MCs with
    a variable
    name.
    I tried to use this[] that should do the trick, but it
    doesn't.
    Here's what I did in code to try to debug :
    - trace what's inside the this[]
    - the actual this[]
    - a cut and paste of the above trace() with the function call
    Of course, both "hardcoded" calls work..; what am I doing
    wrong ?
    Here's the code :
    trace(_parent + "." + buttonName);
    trace("_parent." + buttonName);
    this[_parent + "." + buttonName].setBtnState("test1");
    this["_parent." + buttonName].setBtnState("test2");
    _parent.mcBtn1.setBtnState("test3");
    _level0.mcInt.mcBtn1.setBtnState("test4");
    What am I supposed to feed this[] with ? Path as a string ?
    Thanks in advance.
    PJ

    What you need to feed the array operator is a string or a
    variable that can be resolved to a string. And that string needs to
    be the sole name of an instance or property of something that can
    be found in that object.
    So the reason the ones with the "_parent.mcMe" didn't work is
    because there is no object with the name "_parent.mcMe" inside of
    this. There is a _parent object and inside the parent object there
    is an mcMe, but that isn't the same thing.So you need to pick out
    the path one item at a time.
    this["_parent"]["mcMe"]["testMe"]();
    Should also work. And any of those string litterals could be
    replaced by a variable which held a string as well. Also notice
    that the function at the end can also be referenced since you are
    looking inside the mcMe object for some object with a name of
    testMe. But the parens which call the function need to be outside
    the array access because they aren't part of the name of the
    object.

  • Call function with select options problem

    Hi there dear SDN community members.
    I have got an strange ABAP problem wich function call.
    Code1
    CLEAR ls_selec .
    ls_selec-iobjnm = '9AMATNR' .
    ls_selec-sign   = 'I' .                                    
    ls_selec-option = 'EQ' .
    ls_selec-low    = '0000000000000000000000000000000000017714' .
    APPEND ls_selec TO lt_selec .
    CLEAR ls_selec .
    ls_selec-iobjnm = '9AMATNR' .
    ls_selec-sign   = 'I' .
    ls_selec-option = 'EQ' .
    ls_selec-low    = '0000000000000000000000000000000010079409' .
    APPEND ls_selec TO lt_selec .
    CALL FUNCTION '/SAPAPO/TS_PLOB_LIST_GET'
      EXPORTING
        iv_bas_plobid  = 'Z_DP_POS'
        it_selection   = lt_selec
        it_group_by    = lt_group
      IMPORTING
        et_plob_values = lt_plobs .
    Function returns data in lt_plobs itab only for the last product which was appended to the selection table lt_selec.
    Whilst
    Code2
    CLEAR ls_selec .
    ls_selec-iobjnm = '9AMATNR' .
    ls_selec-sign   = 'I' .
    ls_selec-option = 'BT' .
    ls_selec-low    = '0000000000000000000000000000000000017714' .
    ls_selec-high   = '0000000000000000000000000000000010079409' .
    APPEND ls_selec TO lt_selec .
    Returns data in lt_plobs for all products included in selection tab lt_selec.
    What am I doing wrong in case of Code1? Why function does not return data for both products included in selection tab lt_selec?
    Will be thankful for help. Regards. P.

    I am very sorry to take your time unnecessarily.
    The problem was caused by data inconsistency in our sandbox system I was developing in.
    Be understanding, please.
    Kind regards. P.
    Ps. 
    Vinod Nair
    The 'Loop' solution has slowed the performance down very much.

  • Call function with select arguments

    Hi Gurus,
    I have problem to call function inside select statements as follow:
    select a.ID_ELE2, a.ID_ELE3, a.DT_FIS_YR, c.NU_FIS_PER, c.dt,
    (case
    when c.ld is null then
    GET_LD_CHECK (a.DT_FIS_YR,c.NU_FIS_PER, a.ID_ELE3, a.ID_ELE2) -- 1
    -- GET_LD_CHECK ('2009',7, '8010', '7493') --- 2
    else
    c.ld
    end ) description
    from ACCOUNT a, TRANSACTION c
    where a.DT_FIS_YR ='2009'
    and a.ID_ELE3 <> '0000'
    and c.TY_SRC not in ('CL', 'CN')
    and a.DT_FIS_YR = c.nu_fis_yr
    and a.AK = c.AK_FGCHAR
    and trim(a.ID_ELE3) ='8010'
    and c.NU_FIS_PER <> 14
    order by 1,4,5,6
    the 1 doesn't output result but the 2 it does! How can pass the select result to the function?
    Thanks in advance for your help.
    Ben

    The statement / function call seems to be ok. So there are not much chances left for your call to return different (=non) values.
    1) It could be that you have different values in the column then during your test call.
    2) Maybe your function raises an error and that error is supressed in some ugly WHEN OTHERS EXCEPTION => Solution: Get rid of the error handler.
    3) datatype conversion. For example if a.dt_fis_yr is a number value, then you should test with number values and not with strings. GET_LD_CHECK (2009,7, '8010', '7493'). Same logic goes for the other paramters, make sure the datatype is correct and matches the function parameter.

  • Call function with DML

    I have a function that performs DML. I am calling the function from toplink with the following. I get an error
    ORA-14551: cannot perform a DML operation inside a query when I try to execute this function. Is there another way to call functions without using select From dual?
    String queryFunc = "SELECT " +
    "CCU.adjPaymentTrans(#caseID, #obligorPIN, #ccuPIN, #transCd, #payorTp) " +
    "FROM dual";
    SQLCall sqlCallFunc = new SQLCall(queryFunc);
    ValueReadQuery valueReadFunc = new ValueReadQuery(sqlCallFunc);
    valueReadFunc.addArgument("caseID");
    valueReadFunc.addArgument("obligorPIN");
    valueReadFunc.addArgument("ccuPIN");
    valueReadFunc.addArgument("transCd");
    valueReadFunc.addArgument("payorTp");
    valueReadFunc.bindAllParameters();
    Vector theArgumentValuesFunc = new Vector(6);
    theArgumentValuesFunc.add(caseID);
    theArgumentValuesFunc.add(obligorPIN);
    theArgumentValuesFunc.add(ccuPIN);
    theArgumentValuesFunc.add(transCd);
    theArgumentValuesFunc.add(payorTp);
    Number amountReversed = (Number)uow.executeQuery(valueReadFunc, theArgumentValuesFunc);

    Normally DML is only done from stored procedures, not stored functions, you may want to consider changing the function to a procedure.
    To call a function that does DML, you must call the function through a PLSQL call. If you did not require the return value, the code would be:
    >>
    String queryFunc = "begin " +
    "CCU.adjPaymentTrans(#caseID, #obligorPIN, #ccuPIN, #transCd, #payorTp);" +
    "end;";
    SQLCall sqlCallFunc = new SQLCall(queryFunc);
    DataModifyQuery modifyFunc = new DataModifyQuery(sqlCallFunc);
    >>
    If you require the return value, then the SQL would be:
    >>
    String queryFunc = "begin ? = " +
    "CCU.adjPaymentTrans(?, ?, ?, ?, ?);" +
    "end;";
    >>
    However this would have to be executed through a CallableStatement in JDBC. TopLink currently only supports executing stored procedures as callable statements, so you would need to execute this directly through JDBC. You could also convert the function to a procedure, or wrap the function with a procedure. I believe TopLink 10.1.3 will have support for a StoredFunctionCall that can call DML stored functions.
    To get a JDBC connection from a TopLink session uses,
    UnitOfWork uow = session.acquireUnitOfWork();
    uow.beginEarlyTransaction()
    uow.getAccessor().getConnection();
    uow.commit();

  • Call function with arguments in AS3

    Hello!
    I`m a new in Flex developing, and cannot understand same code
    convention, im Java programmer.
    How I can write correct function call in ActionScript, my
    call: var goodsWnd:CreateGoodsWindow =
    PopUpManager.createPopUp(this,
    CreateGoodsWindow, true) as CreateGoodsWindow;
    I wish call function above with argument, how I do that?
    Where my class: public class CreateGoodsWindow extends
    extends TitleWindow
    public CreateGoodsWindow(data:Object)
    }

    Use PopUpManager.addPopUp() instead of createPopUp().
    addPopUp takes an object that has already been instantiated:
    var createGoodsWindow:CreateGoodsWindow = new
    CreateGoodsWindow(data);
    PopUpManager.addPopUp(createGoodsWindow);

  • Global binding with duplicate, dynamic tables

    Hi there,
    Hope someone can give me a hand. I have a dynamic form that contains an invisible duplicate so that there will be two copies printed - one for the form filler and another for another dept. Only one field on the form changes on each copy -- the copy indentifier.
    I have placed global binding for all fields on the "visible" form, so that the data will be ported into the invisible copy. However, there are two dynamic tables where the fields in the rows simply copy whatever is placed in the first row.
    How do I (in the XML or Javascript) create a link so that each row's fields can contain different data and be copied to the invisible version?
    Thanks in advance for your help.

    Yeah global binding won't work on repeating elements, you need to write a script to loop through the table and copy the data to another table.
    Check out this sample:
    http://www.assuredynamics.com/index.php/portfolio/duplicating-table-data/

Maybe you are looking for

  • Satelite 1905-S301 Recovery Disk problems

    I've recently gotten a Satelite 1905-S301 that I wanted to take back to "out of box" so I ran the recovery disks 1 thru 3 of 3 and all was going well but on the 3rd disk it says it can't find/open file PREINS005.GHS (or close to that name from memory

  • Workspace missing

    I created a Workspace in PsCC on my desktop I have PsCC on my Laptop as well but that Workspace is not on it; and I don't remember how I created it.  Is  there a way to import a workspace from a PsCC on another computer. Isn't PsCC always be in sync

  • Is it possible to redirect to same port two NICs

    Dear members, I have to setup my Solaris10/Apache server with two NICs, then I want to redirect the 80 port to another port like 777 for both of NICs. I mean, all the NICs should listen the 777 port and redirect incoming packets to 80 port. I tried t

  • Purging Presentation Services Cache

    Hi All, Do we have any mechanism to purge the Presentation Services Cache manually like we do for BI Server cache at the time of updating database tables? Thanks, -Vency

  • TS1424 some of my music has only part of the song or none at all...how do I redownload?

    I need to put my music back in my phone after it was wiped out.  Ever since then, I have only some of my songs.  All of the items I purchased were there but did not download in its entirety. How do I re-download my music?