Skip to Content
avatar image
Former Member

Not Geting Data from Backend R/3

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

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

5 Answers

  • avatar image
    Former Member
    Aug 21, 2007 at 04:05 AM

    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.

    rfc-issue-cardinality-and-selection-problem

    Regards,

    Mithu

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Aug 21, 2007 at 04:27 AM

    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

    Add comment
    10|10000 characters needed characters exceeded

  • Aug 21, 2007 at 04:52 AM

    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

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Aug 21, 2007 at 05:22 AM

    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

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Aug 21, 2007 at 04:39 PM

    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

    Add comment
    10|10000 characters needed characters exceeded