Skip to Content
avatar image
Former Member

Select Options

The flight example for accessing BAPIs from WebDynpro components assumes very elementary search criterion fields such as a City From (string) and City To(string) etc which can be created on a Webdynproi view and which correspond to optional fields of the following SAP Structure: Destination_From and Destination_To in the backend BAPI etc

However if the Web Dynpro Search Criteria parameters correspond to a Select-Option kind of a parameter in the backend BAPI, the underlying implementation of which being internal tables with

schema (sign,option, low, high), how am i supposed to build the UI elements on a View.

i tried creating 4 text fields on the View which had bindings with the view context structure elements (sign,option, low, high) which were actually generated from the BAPI parameters.

i then did the initialization etc. and tried entering the input values

i.e. Low: from vendor no (lowest venfor no)

High: to vendor no (highest vendor no)

Sign: I (->inclusive)

Option: BT (-> Between)

This didn't work and the result was the max possible rows were returned by the BAPI and there was no filtering. i.e. all the 4000 rows of my data was returned.

I tried feeding the above parameters into the SAPGUI and made a BAPI call from SE37 and it returned me the fitered rows which satisfied the criterion in the select -option internal table.

thus it returned only about 2100 rows of my data.

hence i concluded that the web dynpro View was not feeding my search criterion while making the BAPI Call.

Has anyone tried using Search-Option like parameters in a WebDynpro View as a seach criterion

range.

.V

Add comment
10|10000 characters needed characters exceeded

  • Follow
  • Get RSS Feed

1 Answer

  • avatar image
    Former Member
    Nov 28, 2003 at 12:49 PM

    Hello Jake,

    Basically you need to progam the select option by yourself and bind it to whatever you

    choose. The example below might be of help.

    Best regards, Karin

    /** Hook method */

    public void wdDoInit()

    {

    FlightModel model =

    (FlightModel)WDModelFactory.getModelInstance(FlightModel.class, WDModelScopeType.APPLICATION_SCOPE);

    model.setJcoClient(client);

    Bapi_Flight_Getlist_Input myInput = new Bapi_Flight_Getlist_Input();

    Bapisfldra bapisfldraDate = new Bapisfldra();

    myInput.addDate_Range(bapisfldraDate);

    wdContext.nodeInput().bind(myInput);

    //@@end

    }

    /** Hook method called to clean up controller. */

    public void wdDoExit()

    {

    //@@begin wdDoExit()

    //@@end

    }

    /** declared method */

    public void getFlights( ) {

    //@@begin getFlights()

    wdContext.currentDateRangeElement().setSign("I");

    wdContext.currentDateRangeElement().setOption("EQ");

    wdContext.currentDateRangeElement().setLow(new Date(101,11,17));

    try

    {

    wdContext.currentInputElement().modelObject().execute();

    }

    catch (Exception ex)

    {

    IWDMessageManager msgMgr =

    (IWDMessageManager)wdThis.wdGetAPI().getComponent().getMessageManager();

    msgMgr.reportException(ex.getLocalizedMessage());

    }

    wdContext.nodeOutput().invalidate();

    // test output

    IWDMessageManager msgMgr =

    (IWDMessageManager)wdThis.wdGetAPI().getComponent().getMessageManager();

    msgMgr.reportSuccess("Success");

    //@@end

    }

    Add comment
    10|10000 characters needed characters exceeded