on 07-10-2007 8:08 PM
Hi All,
Please someone help me with this.
From the Web Dynpro OVS Valuehelp tutorial, I added an advanced search for the airport. I added RFC airport node as a child node of Bapi_Flight_Getlist_Input, and it has 4 elements; Airportid, City, Countr, and Countr_Iso. I did Edit Model Binding to import and bring Destination_From(Bapisfldst) to the Bapi_Flight_Getlist_Input RFC node. The RFC output node is OVSAirportQueryOutput, and the Value Node is OVSAirportQueryInput. Both of them have the same elements as the RFC airport node.
At runtime, it doesnt give me a hit list of the airport in the table when I type in the airport code for the search. It only gives me a blank table without record. How can I get the record of the airport values to show on the table?
This is the code.
public void onQuery(IWDNodeElement queryInputNodeElement, IWDNode queryOutputNode) {
IPublicOVSCust.IOVSAirportQueryInputElement input =
(IPublicOVSCust.IOVSAirportQueryInputElement) queryInputNodeElement;
IPublicOVSCust.IOVSAirportQueryOutputNode output =
(IPublicOVSCust.IOVSAirportQueryOutputNode) queryOutputNode;
Bapi_Flight_Getlist_Input bapiInput = new Bapi_Flight_Getlist_Input();
Bapisfldst bapiAirport = new Bapisfldst();
Bapisfldst bapiCity = new Bapisfldst();
Bapisfldst bapiCountry = new Bapisfldst();
if (input.getAirportid() != null) {
bapiAirport.setAirportid(input.getAirportid());
}
if (input.getCity() != null) {
bapiCity.setCity(input.getCity());
}
if (input.getCountr() != null) {
bapiCountry.setCountr(input.getCountr());
}
bapiInput.setDestination_From(bapiAirport);
bapiInput.setDestination_From(bapiCity);
bapiInput.setDestination_From(bapiCountry);
try {
bapiInput.execute();
<b>what should I put in here?</b>
} catch (Exception e) {
IWDMessageManager msgMgr = wdComponentAPI.getMessageManager();
msgMgr.reportException(e.getLocalizedMessage(), false);
}
}
Please help!
-Napadol
You need to get the result from BAPI and bind it to <b>queryOutputNode</b>.
You have executed the BAPI now you just need to get result returned and bind that to the queryOutputNode.
Best Regards,
Ashwani Kr Sharma
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thanks to all. This problem has been solved by Vishal.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Don,
Couple of things here.
First, it seems wrong that you need three instances of Bapisfldst structure to pass airport, city and country to Bapi_Flight_Getlist. In your code the last instance of this structure will overwrite previous two destination_from assignments. So just create one instance of Bapisfldst and set three fields in it from corresponding fields of input element.
Second, do a signle function test in SAP to ensure that with the parameter you are passing, BAPI does in fact return something.
And last, I don't think you may be able to to just bind the BAPI output flightlist node to airportqueryoutput value node, since attributes in this node are subset of flightlist model output node. So you may need to use wdcopy services to copycorresponding fields of each element.
Regards,
Vishal
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
The first step that you have check is the output node need is model node not value node.
Now you have bind the result to Output.
Output.bind(bapiInput.getOutput().get<<node result>>());
Regards,
Edson Thomaz
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Napadol,
Here is the code.
try {
bapiInput.modelObject().execute();
bapiInput.node().getChildNode("Output", 0).invalidate();
} catch (Exception e) {
IWDMessageManager msgMgr = wdComponentAPI.getMessageManager();
msgMgr.reportException(e.getLocalizedMessage(), false);
}
You can also check this thread [page 3] steps are given.
Regards,
Mithu
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 | |
25 | |
12 | |
9 | |
6 | |
6 | |
5 | |
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.