Skip to Content
avatar image
Former Member

JCO Function in a WD program

Hallo,

Just like it is possible to get export parameters from a function in a normal JCO program, is it possible to get these export parameters (through the function call getExportParameterList) in a normal WD program?

I have a WD with Adaptive RFC. I would like to create an xml file with the export and table parameters. For that I need to create a function of course so that I can use something like function.getExportParameterList into a ParameterList object.

Since a function is run through execute (as in mConnection.execute(function)), I thought it might be the model object of my BAPI. But that doesnt work either.

I cannot write JCO.Function func = wdThis.wdGetContext().currentBapi_Quotation_Createfromdata2_InputElement().modelObject();

Does any one have any idea how I could do that?

Thanks for looking into it,

Sameer

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

2 Answers

  • Best Answer
    avatar image
    Former Member
    Jun 05, 2007 at 04:03 PM

    Hi

    try to research available methods on modelObject(), for inst:

    wdContext().currentBapi_Quotation_Createfromdata2_InputElement().modelObject().associatedInputParameterInfo();

    ....associatedResultInfo();

    Add comment
    10|10000 characters needed characters exceeded

    • Former Member Former Member

      Hello Nagaraju,

      I know that Output parameters are bound to the node and I use them all the time :).

      The question was and remains, how do I get an XML file from the Function model like we do in JCo. Again, I repeat the example I explained above -

      ParameterList pl = function.getExportParameterList();

      pl.writeXML("export.xml");

      ParameterList plTables = function.getTableParameterList();

      plTables.writeXML("tables.xml");

      Therefore, the problem is the "function" object. How can I capture the JCO.Function object? I thought it was the BAPI model object but it does not seem to be case. It didn't work.

      Bye,

      Sameer

  • avatar image
    Former Member
    Jun 05, 2007 at 08:56 PM

    Hi Sameer,

    Before executing the model it should be binded to a context.

    Did you bind the model object to context.

    If no please do that in onInit().

    Zrfc_Name_Input input = new Zrfc_Name_Input();

    wdContext.nodeABC.bind(input);

    Then you can execute that model using

    wdContext.currentElement().modelObject().execute();

    Then the context has the output you wanted.

    Using wdContext you can get the export parameters and table parameters.

    I hope this helps you.

    Regards,

    Nagaraju Donikena

    Add comment
    10|10000 characters needed characters exceeded