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

web service missing output data!

Former Member
0 Likes
897

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

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
715

When you call the method Proxy, you are declaring exporting and importing areas, but no tables.

3 REPLIES 3
Read only

Jelena_Perfiljeva
Active Contributor
0 Likes
715

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?

Read only

Former Member
0 Likes
716

When you call the method Proxy, you are declaring exporting and importing areas, but no tables.

Read only

Former Member
0 Likes
715

thank you !

i have resolve it!