webservice

Posted 追寻无限

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了webservice相关的知识,希望对你有一定的参考价值。

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的主要内容,如果未能解决你的问题,请参考以下文章

C#动态调用webService出现 基础连接已经关闭: 未能为 SSL/TLS 安全通道建立信任关系。

Java RMI地址解析问题

当我们在webservice.asmx.cs中编写所有代码时,webservice.asmx有啥用?

自动生成webservice客户端代码后怎么调用

在idea中,怎么生成cxf webservice的客户端代码

如何调用webservice接口 ajax