cancel
Showing results for 
Search instead for 
Did you mean: 

Not Geting Data from Backend R/3

Former Member
0 Kudos

Hi Experts,

I am using BAPI_SALESORDER_GETLIST in the web dynpro for java . application is suscesful deploying, but when i click on the

GET order list button

it is not showing or fatching any data.

1- I have used custom contoller for ammping the data.2
2- I am using the single view for this application.
and I have sleceted these field....

0Output · Return
Output · SalesOrders
Customer_Number
Document_Date
Document_Date_To
Sales_Organization





some java code is



public void wdDoInit()
{
//@@begin wdDoInit()
Bapi_Salesorder_Getlist_Input bapi_obj = new Bapi_Salesorder_Getlist_Input ();
wdContext.nodeBAPI_SALESORDER_GETLIST_INPUT().bind(bapi_obj);
try {

wdContext.nodeBAPI_SALESORDER_GETLIST_INPUT().currentBAPI_SALESORDER_GETLIST_INPUTElement().modelObject().execute();
wdContext.nodeOutput().invalidate();


}
catch (Exception e)
{
wdThis.wdGetAPI().getComponent().getMessageManager().reportSuccess(e.toString());
e.getStackTrace();

}

Please help me out where i am missing the Java code.

Thanks & Regards,

Iqbal Ahmad

Accepted Solutions (0)

Answers (5)

Answers (5)

Former Member
0 Kudos

Hi,

It is better to use MVC pattern i.e. use controller to get the data from BAPI and pass it to View Controller.

put your code in Component Controller of WdDoInit()

Bapi_Salesorder_Getlist_Input bapi_obj = new Bapi_Salesorder_Getlist_Input ();

wdContext.nodeBAPI_SALESORDER_GETLIST_INPUT().bind(bapi_obj);

Create a method call ExecuteBAPI()

<b></b><b></b>

try {

wdContext.nodeBAPI_SALESORDER_GETLIST_INPUT().currentBAPI_SALESORDER_GETLIST_INPUTElement().modelObject().execute();

wdContext.nodeOutput().invalidate();

}

catch (Exception e)

{

wdThis.wdGetAPI().getComponent().getMessageManager().reportSuccess(e.toString());

e.getStackTrace();

}

<b>call this method in View Controller.</b>

This will solve your problem

Regards

Ravi

Former Member
0 Kudos

Hi

Where are you trying to display the output ?

You need to pass some input parameters to this BAPI . Check if you have any data in the table in R/3 system.Check for the input parameters.

Enable debug on R/3 side to check where exactly you are going wrong .....

Regards

Akshaya

abhimanyu_lagishetti7
Active Contributor
0 Kudos

Hi Iqbal

Just Make sure the JCos created is with the same client number where the data exists in the R/3

Regards

Abhimanyu L

Message was edited by:

Abhimanyu Lagishetti

Former Member
0 Kudos

Hi Iqbal,

I think for getting the list for sales orders,u have to pass some input parameters before executing the bapi but u r not passing any.Check the bapi in r/3 system whether it works without any paramater or not.

regards

Sumit

former_member751941
Active Contributor
0 Kudos

Hi Iqbal,

Step1: Check whether you have bound the “Bapi_Salesorder_Getlist_Input.Output.SalesOrders” in the table “dataSource” or not.

Step2: Make sure data is exists in the System (R3/ECC) that you are using by executing the BAPI from “SAP Logon”.

Step3: If Customer_Number, Document_Date, Document_Date_To , Sales_Organization fields are under the “Output • SalesOrders” then your code is fine else you have to set the values for there fields before executing model.

Check this.

Regards,

Mithu