2010 May 18 7:35 AM
hi expert!
i create RFC TO convert web service.
and calling web service using proxy object,return data will miss TABLES Parameter info
BUT using HTTP trought browser this TABLES Parameter is ok!
example:
rfc function:
FUNCTION ZWEBSERVICE1.
*"----------------------------------------------------------------------
*"*"Local Interface:
*" IMPORTING
*" VALUE(INPUT) TYPE CHAR40 DEFAULT ' '
*" EXPORTING
*" VALUE(OUTPUT) TYPE CHAR40
*" TABLES
*" TDATA STRUCTURE TEXTL OPTIONAL
*"----------------------------------------------------------------------
if input is initial or input = ' '.
output = 'initial'.
else.
concatenate 'value:' input into output.
endif.
do 10 times.
TDATA-LINE = SY-INDEX.
CONDENSE TDATA-LINE.
CONCATENATE 'LINE' TDATA-LINE ':' INPUT INTO TDATA-LINE.
APPEND TDATA.
enddo.
ENDFUNCTION.and calling report:
*&---------------------------------------------------------------------*
*& Report ZCALLWEBSERIVE1
*&
*&---------------------------------------------------------------------*
*&
*&
*&---------------------------------------------------------------------*
REPORT ZCALLWEBSERIVE1.
DATA: proxy TYPE REF TO ZWDBSERVICE1CO_ZWEBSERVICE1,
org_IN TYPE ZWDBSERVICE1ZWEBSERVICE1,
ORG_OUT TYPE ZWDBSERVICE1ZWEBSERVICE1RESPON,
tdata type ZWDBSERVICE1TABLE_OF_TEXTL,
item_tab type ZWDBSERVICE1TEXTL_TAB,
ITEM type ZWDBSERVICE1TEXTL,
error type REF TO cx_ai_system_fault.
org_in-INPUT = 'SORG.1000'.
TRY.
CREATE OBJECT proxy
* EXPORTING
* LOGICAL_PORT_NAME =
.
* TRY.
CALL METHOD proxy->ZWEBSERVICE1
EXPORTING
INPUT = org_in
IMPORTING
OUTPUT = ORG_OUT.
* CATCH CX_AI_SYSTEM_FAULT .
* CATCH CX_AI_APPLICATION_FAULT .
* ENDTRY.
CATCH cx_ai_system_fault INTO error.
WRITE /1 error->ERRORTEXT.
ENDTRY.
COMMIT WORK.
WRITE: AT /1 org_in-input,
/1 org_out-output.
*loop at org_out-TDATA-ITEM into ITEM.
* write:/ ITEM-LINE.
*endloop.
item_tab = org_out-TDATA-ITEM.
*loop at item_tab into item.*
*write:/ ITEM-LINE.*
*endloop.*no data in inter table ITEM.
thank you very much!
Edited by: Thomas Zloch on May 18, 2010 7:51 PM
2010 May 18 7:08 PM
When you call the method Proxy, you are declaring exporting and importing areas, but no tables.
2010 May 18 7:01 PM
1) You forgot to use the 'code' tags, which makes your post unreadable.
2) I don't mean to judge, but it seems that you've been on SDN since 2007 and have 250 posts but 0 points. Which means that you have neither helped anyone nor rewarded anyone for answering your questions (you get 1 point yourself for giving points). So how do you think this makes others feel about helping you?
2010 May 18 7:08 PM
When you call the method Proxy, you are declaring exporting and importing areas, but no tables.
2010 May 19 1:53 AM