Skip to Content

Archived discussions are read-only. Learn more about SAP Q&A

Consuming a SAP web service from .NET

I wrote and published as web service this function:

FUNCTION ZRQFUNCION.

*"----

-


""Interfase local

*" TABLES

*" LISTAPAISES STRUCTURE ZESTPAIS OPTIONAL

*"----

-


DATA: TI LIKE ZESTPAIS OCCURS 0 WITH HEADER LINE.

SELECT IDPA DESPA FROM ZRQPAIS INTO TABLE TI.

LOOP AT TI.

MOVE TI TO LISTAPAISES.

APPEND LISTAPAISES.

ENDLOOP.

ENDFUNCTION.

What I want is test the SAP WebService posibility to return a set of data rows (internal table). Don you know is it posible? How can I achive that?

This is my code in .Net

Zestpais[] lista = new Zestpais[9];

ZLISTAPAISESService x = new ZLISTAPAISESService();

x.Zrqfuncion(ref lista);

Here I have two problems:

1. I need to specify the length of the array.

2. I recive the following error message:

"Error de la solicitud con el código de estado HTTP 401: Unauthorized."

Regards,

Roberto.

Former Member
Not what you were looking for? View more on this topic or Ask a question