on 08-20-2007 9:40 PM
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.0Output · Return
Output · SalesOrders
Customer_Number
Document_Date
Document_Date_To
Sales_Organization
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
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
89 | |
10 | |
10 | |
9 | |
6 | |
6 | |
6 | |
5 | |
4 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.