Skip to Content
avatar image
Former Member

.net call web services BAPI_CUSTOMER_GETLIST

I call a Web Services by .net

ZWEB_CUSTOMER_GETLIST.ZWEB_CUSTOMER_GETLISTService customersList = new ZWEB_CUSTOMER_GETLIST.ZWEB_CUSTOMER_GETLISTService();

ZWEB_CUSTOMER_GETLIST.BAPICUSTOMER_ADDRESSDATA[] ADDRESSDATA = new ZWEB_CUSTOMER_GETLIST.BAPICUSTOMER_ADDRESSDATA[0];

ZWEB_CUSTOMER_GETLIST.BAPICUSTOMER_IDRANGE[] IDRANGE = new ZWEB_CUSTOMER_GETLIST.BAPICUSTOMER_IDRANGE[1];

IDRANGE[0] = new ZWEB_CUSTOMER_GETLIST.BAPICUSTOMER_IDRANGE();

IDRANGE[0].SIGN = "I";

IDRANGE[0].OPTION = "BT";

IDRANGE[0].LOW = "0000000000";

IDRANGE[0].HIGH = "999999999";

ZWEB_CUSTOMER_GETLIST.BAPICUSTOMER_SPECIALDATA[] SPECIALDATA = new ZWEB_CUSTOMER_GETLIST.BAPICUSTOMER_SPECIALDATA[0];

customersList.Credentials = _credential;

try

{

System.Net.CookieContainer cookie = new System.Net.CookieContainer();

customersList.CookieContainer = cookie;

ZWEB_CUSTOMER_GETLIST.BAPIRETURN1 ret = customersList.BAPI_CUSTOMER_GETLIST(ref ADDRESSDATA, " ", ref IDRANGE, 1, ref SPECIALDATA);

if (ret != null && SPECIALDATA.Length>0) .....

But i don't retrive any information by ref ADDRESSDATA

ADDRESSDATA is always = null

If i run bapi BAPI_CUSTOMER_GETLIST by se37

i see many address into ADDRESSDATA table

Why ?

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

2 Answers

  • avatar image
    Former Member
    Apr 25, 2008 at 08:44 AM

    Hi

    Set the URL of the WebService Object

    e.g :

    URL = "http://" & APP_SERVER & ":8000/sap/bc/soap/rfc?sap-client=" & CLIENT

    Assuming the Object of WebService is objWS.

    objWS.URL = URL

    By Default it takes the Default Client of SAP System

    which May Not have the Data !

    Regards

    Rajendra

    Add comment
    10|10000 characters needed characters exceeded

    • Former Member

      http://..../sap/bc/srt/rfc/sap/ZWEB_COMPANY_GETLIST?sap-client=300&wsdl=1.1&style=rpc

      The problem is not connecting to SAP.

      By BAPI_CUSTOMER_GETLIST(ref ADDRESSDATA, " ", ref IDRANGE, 0, ref SPECIALDATA);

      i retrive SPECIALDATA with list of customer but ADDRESSDATA is null

      Why ADDRESSDATA is null ? this is probleme

  • avatar image
    Former Member
    May 26, 2008 at 09:17 AM

    why don't you try to make it a list generic of address rather than an array.

    i hope it works.

    Add comment
    10|10000 characters needed characters exceeded

    • Former Member

      Sorry

      the problem is define wrong style:

      ...../sap/ZWEB_CUSTOMER_GET_DETAIL2?sap-client=200&wsdl=1.1&style=rpc

      i define not rpc style and after web service work good

      Thanks

      hallo