Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Function module convert to Webservice

Former Member
0 Likes
1,175

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

.

11 REPLIES 11
Read only

Former Member
0 Likes
1,076

Can you insert an extraction of your code (function module interface) ?

Read only

0 Likes
1,076

Hi Kris

Can u give me the detail informantion about extraction?

thanks

Read only

0 Likes
1,076

How does the source code of your program looks like...

Read only

0 Likes
1,076

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

Read only

0 Likes
1,076

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.

Read only

0 Likes
1,076

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 )

Read only

0 Likes
1,076

Hi Kris

I want get data from table ZFLYPLAN,I Declare Zflyplan in Tables.The Exporing parameter DEST is ok.

thanks

Read only

0 Likes
1,076

Hi Kris

Changing parameter can't pass an internal table,I must pass an table,so i declare the table ZFLYPLAN in tables parameters

Read only

0 Likes
1,076

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>.

Read only

0 Likes
1,076

Hi Kris

How can i pass tables using Import or Export?I think tables must pass by Tables

thanks.

Read only

0 Likes
1,076

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 ...