on 08-27-2005 6:30 AM
I am unable to understand whats going wrong, when I runs BAPI BAPI_SALESORDER_GETLIST from SAP Frontend with parameters
CUSTOMER_NUMBER = "9994310"
SALES_ORGANIZATION = "3000"
MATERIAL = ""
DOCUMENT_DATE = ""
DOCUMENT_DATE_TO = ""
PURCHASE_ORDER = ""
TRANSACTION_GROUP = "0"
PURCHASE_ORDER_NUMBER = ""
It gives me 5 results in to SALES_ORDER table, but when I passes same parameter to this BAPI via .Net application it gives me 0 records in the SALES_ORDER table.
I tried passing DOCUMENT_DATE, DOCUMENT_DATE_TO in yyyyMMdd format in .net still no result.
Here is my .Net source code.
Dim conn As String = ConfigurationSettings.AppSettings("SAPConnectionString")
SalesOrder1.ConnectionString = conn
Dim vBAPIReturn As New SAP.Connector.BAPIRETURN
Dim sales_Orders As New BAPIORDERSTable
SalesOrder1.GetList("9994310", "", "", "", "", "", "3000", "0", vBAPIReturn, sales_Orders)
DataGrid2.DataSource = sales_Orders.ToADODataTable
DataGrid2.DataBind()
What could be possible reason?
Help will we greatly appriciated.
Regards,
Nitin
A little more info on this topic after I struggled with it also...
Here is some sample code that works:
SalesOrder proxyorders= new SalesOrder(SAPConnString);
BAPIRETURN Return0=new BAPIRETURN();
BAPIORDERSTable Sales_Orders=new BAPIORDERSTable();
proxyorders.GetList(null, null, null, strDate, null, null, null, null, out Return0, ref Sales_Orders);
-
Note that arguments to the BAPI call must be null - not "*" as described elsewhere in these threads.
This call allows you to get all customer orders for a date in the form of a strongly-typed Sales_Orders object.
Any argument in the BAPI call can be null.
With this information you can then also get specific customer details with another BAPI call:
string strSalesOrg = Sales_Orders[c].Sales_Off;
string strCustomerID = Sales_Orders[c].Sold_To;
Customer proxycustomer = new Customer(SAPConnString);
BAPIRETURN Return1=new BAPIRETURN();
BAPIKNA101 Customer_Details = new BAPIKNA101();
proxycustomer.GetDetail(strSalesOrg,out Customer_Details,out Return1,null,null,null,strCustomerID);
Took me a bit to sort it out but hope it helps...
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thanks guys, your inputs helped me to get rid of this problem.
Customer Number is 10 char field I just provided some zeros previous to my customer nuumber and got the result.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
84 | |
10 | |
9 | |
8 | |
6 | |
6 | |
6 | |
5 | |
3 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.