on 06-05-2007 3:51 PM
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
Hi
try to research available methods on modelObject(), for inst:
wdContext().currentBapi_Quotation_Createfromdata2_InputElement().modelObject().associatedInputParameterInfo();
....associatedResultInfo();
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Denis,
already tried that The closest I seem to get is to the JCO.Client being used by the Bapi_Quotation_Createfromdata2_OutputElement().model(). But not the JCO.Function itself. A question here - what exactly would be the Function being executed?
for e.g in JCO -
Function func = createFunction("BAPI_QUOTATION_CREATEFROMDATA2", mRepository);
ParameterList exportParamList = func.getExportParameterList();
ParameterList tableParamList = func.getTableParameterList();
My question is on which (function) object can I run the getExportParameterList()? Is the function in WD the same as Bapi_Quotation_Createfromdata2_OutputElement().model(). ? If yes, it doesnt work because I cannot create a JCO.Function object from this model.
@Nagaraju, I can execute my program perfectly, you misunderstood the question. I want to capture the ParameterList getExportParameterList() of the BAPI being executed in the WD which is normally done in JCO programs. I can't seem to find the function object for it.
Hope someone can help me out with this!
Sameer
Hi Sameer,
After you binding the model to context , obviously the export parameters or table parameters are bound to a node.
After executing the BAPI context is filled with the required data.
If you want the export parameter in the FM then
wdContext.currentOutputElement().getE_Name();
I assume export parameter name is E_name
And it is under the node Output.
If it is table then wdContext.node<Table_name>.get<Table_name>Element(i)
will give the records of the table.
Hope I understood the problem.
Regards,
Nagaraju Donikena
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
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
84 | |
10 | |
10 | |
10 | |
7 | |
6 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.