cancel
Showing results for 
Search instead for 
Did you mean: 

Unable to retrive the data from BAPI

Former Member
0 Kudos

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

}

Accepted Solutions (0)

Answers (4)

Answers (4)

Former Member
0 Kudos

Solved

junwu
Active Contributor
0 Kudos

different version of web dynpro has different code for model execution

always use the wizard to generate code for model execution.

vijay_kumar49
Active Contributor
0 Kudos

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

Former Member
0 Kudos

Hi vijay

i already put that try block in execute bapi method.In catch i put one message for displaying error.Now i am getting error message like "Mandatory filed activity from ZBAPI_TIMESHEET is missing"

junwu
Active Contributor
0 Kudos

the message is quite clear, you forgot to fill the mandatory field

Former Member
0 Kudos

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

p330068
Active Contributor
0 Kudos

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