码迷,mamicode.com
首页 > Web开发 > 详细

webservice

时间:2019-09-30 09:18:59      阅读:101      评论:0      收藏:0      [点我收藏+]

标签:sage   log   ppt   ssi   tab   sig   splay   and   error   

REPORT  YTEST_WEBSERVICE_N .

DATA LS_CONSUMER TYPE REF TO ZCL_CO_ZWS_ZPPT006M .
DATA LS_INPUT    TYPE  ZCL_ZWS_ZPPT006M .
DATA LS_OUTPUT   TYPE  ZCL_ZWS_ZPPT006M_RESPONSE .
DATA CRTX        TYPE REF TO CX_AI_SYSTEM_FAULT .
DATA MESSAGE     TYPE STRING.
DATA LS_TABLE    TYPE ZCL_TABLE_OF_ZPPT006M.
FIELD-SYMBOLS <FS_TABLE> TYPE ANY TABLE.


DATA IT_TAB TYPE TABLE OF ZPPT006M .
DATA WA_TAB TYPE ZPPT006M.

PARAMETERS P_ZJHPGD TYPE ZPPT006M-ZJHPGD.
.
LS_INPUT-ZJHPGD  = P_ZJHPGD.


TRY.
CREATE OBJECT LS_CONSUMER
  EXPORTING
    LOGICAL_PORT_NAME  = ZWS_ZPPT006M
    .
CATCH CX_AI_SYSTEM_FAULT .
  MESSAGE 创建逻辑端口错误! TYPE S DISPLAY LIKE E .
  EXIT.
ENDTRY.

TRY.
CALL METHOD LS_CONSUMER->ZWS_ZPPT006M
  EXPORTING
    INPUT  =   LS_INPUT
  IMPORTING
    OUTPUT =   LS_OUTPUT
    .
CATCH CX_AI_SYSTEM_FAULT INTO  CRTX .
   MESSAGE =  CRTX->GET_TEXT( ).
ENDTRY.

  IF LS_OUTPUT-SUBRC = 0.
    LS_TABLE = LS_OUTPUT-TZPPT006M  .
      IF SY-SUBRC = 0 .
         ASSIGN LS_TABLE-ITEM TO <FS_TABLE>.
          IF SY-SUBRC  = 0.
            LOOP AT  <FS_TABLE> ASSIGNING FIELD-SYMBOL(<FS>) .
              MOVE-CORRESPONDING <FS> TO WA_TAB .
              APPEND WA_TAB TO IT_TAB .
            ENDLOOP.
         ENDIF.
     ENDIF.
  ENDIF.

    DATA TBNAME TYPE DD02L-TABNAME VALUE ZPPT006M .

    CALL FUNCTION REUSE_ALV_GRID_DISPLAY_LVC
    EXPORTING
      I_CALLBACK_PROGRAM = SY-CPROG
      I_STRUCTURE_NAME   = TBNAME
      I_SAVE             = U
    TABLES
      T_OUTTAB           = IT_TAB
    EXCEPTIONS
      PROGRAM_ERROR      = 1
      OTHERS             = 2.
  IF SY-SUBRC <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
            WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
  ENDIF.




*BREAK-POINT.

*
*REPORT Q .
*
*
*DATA IT_TAB TYPE TABLE OF SPFLI.
*DATA WA_TAB TYPE SPFLI.
*
*DATA IT_TAB1 TYPE TABLE OF SPFLI.
*DATA WA_TAB1 TYPE SPFLI.
*
*FIELD-SYMBOLS <FS_WA1> TYPE ANY .
*
* field-SYMBOLS <fs_tab> type STANDARD TABLE.
*
*SELECT * FROM SPFLI INTO CORRESPONDING FIELDS OF TABLE IT_TAB .
*
*
*
*  LOOP AT IT_TAB ASSIGNING FIELD-SYMBOL(<fs>).
*        append <fs> to IT_TAB1 .
*
*  ENDLOOP.
*
*  assign IT_TAB to <fs_tab> .
*
*  LOOP AT  <fs_TAB> ASSIGNING <fs_WA1>.
*
*    IF  <FS_WA1>-CARRID = ‘AA‘.
*      append <fs_wa1> to IT_TAB1.
*    ENDIF.
*
*  ENDLOOP.
*
*
*  LOOP AT <fs_tab> ASSIGNING FIELD-SYMBOL(<fs_wa>)..
*    append <fs_wa> to IT_TAB1.
*
*          append <fs_wa> to IT_TAB1.
*
*
*  ENDLOOP.
*
*  LOOP AT IT_TAB1 INTO WA_TAB1 WHERE CARRID = ‘AA‘.
*
*  ENDLOOP.
*
*
*
*
*  break-POINT.

 

webservice

标签:sage   log   ppt   ssi   tab   sig   splay   and   error   

原文地址:https://www.cnblogs.com/hdchen/p/11610919.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!