Skip to Content
avatar image
Former Member

Unable to retrive the data from BAPI

Hi All,

I have created an app using BAPI.For that used standard code,application is running but data is not retrieved. Please help me regarding this.Following code is used in custom controller wdDoinit() method.

public void wdDoInit()

{

//@@begin wdDoInit()

// Create a new element in the Bapi_Flight_Getlist_Input node

Zbapi_Timesheet_Input input = new Zbapi_Timesheet_Input();

wdContext.nodeZbapi_Timesheet_Input().bind(input);

// Create new elements in the Destination_From and Destination_To nodes

input.setAction(new Zbapi_Timesheet_Input().getAction());

//@@end

}

Add comment
10|10000 characters needed characters exceeded

  • Follow
  • Get RSS Feed

4 Answers

  • Jan 07, 2012 at 01:41 PM

    Dear Vagdevimallaaa

    Please check the link for executing the RFC/Bapi

    [Linking Remote Function Call to Web Dynpro|http://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/761eba66-0401-0010-b982-d5f5bd9e8f90]

    Best Regards,

    Arun Jaiswal

    Add comment
    10|10000 characters needed characters exceeded

  • Jan 09, 2012 at 06:22 AM

    Hi,

    In this code you canu2019t Execute the RFC. Please look at below code.

    Zbapi_Timesheet_Input input = new Zbapi_Timesheet_Input();

    wdContext.nodeZbapi_Timesheet_Input().bind(input);

    Try

    {

    wdContext.currect Zbapi_Timesheet_InputElement.modelObject.execute();

    wdContext.nodeOutput.invaliddate()

    }

    Catch(Exception e)

    {

    wdComponentAPI.getMassageManager.reportSucess(e.toString(),false);

    }

    Hope this helps u.

    Best Regards

    Vijay K

    Add comment
    10|10000 characters needed characters exceeded

    • Former Member Jun Wu

      Hi

      My problem is resolved.Actually my modifications were not reflected.After restarting the J2EE engine, it is running successfully.

      Thanks

      Vagdevi

      Edited by: vagdevimallaaa on Jan 11, 2012 8:08 AM

  • Jan 09, 2012 at 07:55 AM

    different version of web dynpro has different code for model execution

    always use the wizard to generate code for model execution.

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Jan 11, 2012 at 07:09 AM

    Solved

    Add comment
    10|10000 characters needed characters exceeded