cancel
Showing results for 
Search instead for 
Did you mean: 

.net call web services BAPI_CUSTOMER_GETLIST

Former Member
0 Kudos

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 ?

Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member
0 Kudos

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

i hope it works.

Former Member
0 Kudos

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

former_member182416
Active Contributor
0 Kudos

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

Former Member
0 Kudos

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