on 11-22-2007 8:06 PM
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.
Dear Friends,
I found a solution for the .net coding:
Zestpais[] paises = new Zestpais[9];
ZLISTAPAISESService x = new ZLISTAPAISESService();
System.Net.NetworkCredential y = new System.Net.NetworkCredential("alumno04", "987654321");
x.Credentials = y;
x.Zrqfuncion(ref paises);
foreach(Zestpais h in paises)
{
MessageBox.Show(h.Despa);
}
What was missing was the network credentials.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
86 | |
10 | |
10 | |
9 | |
6 | |
6 | |
6 | |
5 | |
4 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.