‎2008 Jan 24 8:35 AM
Hi experts
I develop a Function module and convert it to Webservice, I declare a internal table in Function module's Tables tab and fill data in Function. But I cant read the data of internal table from parameter OUTPUT In program which called the webservice.What can i do to reslove this issue?
thansk
BR
Chris
.
‎2008 Jan 24 9:04 AM
Can you insert an extraction of your code (function module interface) ?
‎2008 Jan 24 9:42 AM
Hi Kris
Can u give me the detail informantion about extraction?
thanks
‎2008 Jan 24 9:43 AM
‎2008 Jan 24 10:09 AM
Hi Kris
FUNCTION ZTESTALV.
*"----
""Local interface:
*" IMPORTING
*" VALUE(SOURCE) TYPE STRING
*" EXPORTING
*" VALUE(DEST) TYPE STRING
*" TABLES
*" ZFLYPLAN STRUCTURE ZFLYPLAN OPTIONAL
*"----
TRANSLATE SOURCE TO UPPER CASE.
CONCATENATE SOURCE 'HELLO WORLD' INTO DEST.
SELECT * INTO CORRESPONDING FIELDS OF TABLE ZFLYPLAN FROM ZFLYPLAN.
ENDFUNCTION.
thanks
Edited by: Chris huang on Jan 24, 2008 11:09 AM
‎2008 Jan 24 10:16 AM
HI Kris
this is code for caller.I have another question, When the caller call the service a screen will popuped,request me input userid and password,How can i disabled the screen?
&----
*& Report ZTESTWEBSERVICES
*&
&----
*&
*&
&----
REPORT ZTESTWEBSERVICES.
DATA: ZSOAP TYPE REF TO ZTESTALVCO_A.
TRY.
CREATE OBJECT ZSOAP.
CATCH
CX_AI_SYSTEM_FAULT.
ENDTRY.
DATA: L_SYS_EX TYPE REF TO CX_AI_SYSTEM_FAULT.
DATA:
INPUT TYPE ZTESTALVZTESTALV,
OUTPUT TYPE ZTESTALVZTESTALVRESPONSE.
INPUT-SOURCE = 'asdsfdskjfslfsafdlsafdsf'.
TRY.
CALL METHOD ZSOAP->ZTESTALV
EXPORTING
INPUT = INPUT
IMPORTING
OUTPUT = OUTPUT.
BREAK-POINT.
WRITE: OUTPUT-DEST.
CATCH CX_AI_SYSTEM_FAULT INTO L_SYS_EX.
ENDTRY.
‎2008 Jan 24 10:18 AM
So you can t read DEST in your program and you can read the internal table contents ?
Did you already try with "changing"-paramaters instead of "exporting" ?
Perhaps if you mark the "pass by value" checkbox...
( just guessing )
‎2008 Jan 24 10:21 AM
Hi Kris
I want get data from table ZFLYPLAN,I Declare Zflyplan in Tables.The Exporing parameter DEST is ok.
thanks
‎2008 Jan 24 10:25 AM
Hi Kris
Changing parameter can't pass an internal table,I must pass an table,so i declare the table ZFLYPLAN in tables parameters
‎2008 Jan 24 10:31 AM
With methods you pass variables/tables via importing/exporting.
Here you have a mixture between function and method.
Think you should use :
call function <functionname>
exporting
<exporting parameters>
importing
<importing parameters>
tables
<table parameters>
exceptions
<exceptions>.
‎2008 Jan 24 1:39 PM
Hi Kris
How can i pass tables using Import or Export?I think tables must pass by Tables
thanks.
‎2008 Jan 24 1:46 PM
CALL METHOD meth EXPORTING imp1 = var1
IMPORTING exp1 = var2 ...
CHANGING chg1 = var3
var1, var2 and var3 can be declared as table types.
data: var1 type table of ...