cancel
Showing results for 
Search instead for 
Did you mean: 

Bapi_Salesorder_Getlist return no items

Former Member
0 Kudos

When calling the Bapi_Salesorder_Getlist from .NET Connector but got no items return.

I can browse the order for customer 1012 in SAPGUI.

If the problem is caused by the searching parameters?

Please check the code for me.

Thanks!

Orders.SAPProxyOrders proxyorders= new Orders.SAPProxyOrders(cs);

// call the RFM method on the proxy

Orders.BAPIRETURN Return0=new Orders.BAPIRETURN();

Orders.BAPIORDERSTable Sales_Orders=new Orders.BAPIORDERSTable();

try

{

proxyorders.Bapi_Salesorder_Getlist("1012", "", "", "", "", "", "", "*", out Return0, ref Sales_Orders);

}

catch(SAP.Connector.RfcCommunicationException exp)

{

MessageBox.Show(exp.Message);

return;

}

catch(Exception exp)

{

MessageBox.Show(exp.Message);

return;

}

this.labelResultNumber.Text=Sales_Orders.Count.ToString();

Accepted Solutions (0)

Answers (1)

Answers (1)

reiner_hille-doering
Active Contributor
0 Kudos

I'm not sure, but perhaps this thread can help you:

Former Member
0 Kudos

Thanks.

Your hint is very helpful.

Bapi_Customer_GetDetail can read single customer by giving customernumber (Knnum)

Bapi_Order_GetStatus can also read a single order by giving order number.

But When calling Bapi_Order_GetList or Bapi_Customer_GetList, it return no Rows.

The BAPIREAUT.Number is 748, its Message said "No cusomter was found by giving criteria.

I still suspect the searching parameters is wrong.

The requirement is to list all the orders of a customer.

Or could you give me such code directyly.

Thanks a lot

reiner_hille-doering
Active Contributor
0 Kudos

I also think there is something wrong with search parameters. You should try to execute the function in SE37 to find parameters that work. If you have them, you just can use them in NCo. Note that you have to pass some parameters (e.g. customer number) with added leading zeros, as described in the referred thread.

Former Member
0 Kudos

The RFC Function RFC_CUSTOMER_GET works well with following parameters:

BRFCKNA1Table tblCust = new BRFCKNA1Table();

proxy.Rfc_Customer_Get("","*", ref tblCust);

but its correspond BAPI function BAPI_CUSTOMER_GETLIST doesn't work.

Where can I find such code for list Orders or Custormers by either BAPI or RFC?

For me it is difficult to read ABAP source code because my poor ABAP skill.

Or could you write some code?

Former Member
0 Kudos

Finally I solve the problem by provide propiate parameter.

By edit the Parameter of this BAPI, only 2 parameter was adopted, the customer number and sales organization.

Just ar Mr. Reiner Hille-Doering said in

, the customer number should be in char(10)format, and the sales organization should be in char(4)format.