Skip to Content
author's profile photo Former Member
Former Member

OVS problem..please help!

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 doesn’t 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

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

5 Answers

  • Best Answer
    Posted on Jul 11, 2007 at 02:32 AM

    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

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Jul 11, 2007 at 03:46 AM

    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.

    Search Help(F4 Help)

    Regards,

    Mithu

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Jul 11, 2007 at 12:02 PM

    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

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Jul 11, 2007 at 07:43 PM

    Thanks to all. This problem has been solved by Vishal.

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Jul 11, 2007 at 12:53 PM

    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

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.