Skip to end of metadata
Go to start of metadata

Author: http://scn.sap.com/people/sravya.talanki2
Submitted: 20/12/2012
Related Links:

Description

The below snippet is the source code for ABAP class ZCL_IDOC_DETAIL_REPORT. Please refer to the links above for reference.

class ZCL_IDOC_DETAIL_REPORT definition
  public
  create public .

public section.
*"* public components of class ZCL_IDOC_DETAIL_REPORT
*"* do not include other source files here!!!

  methods READ_IDOC_DATA
    importing
      !IT_IDOCNUM type STANDARD TABLE
      !IT_STATUS type STANDARD TABLE
      !IT_CRDAT type STANDARD TABLE
      !IV_EMPTY type CHAR1 .
  type-pools LEDID .
  methods READ_IDOC_METADATA
    importing
      !IV_IDOCTYPE type LEDID_IDOCTYPE .
  PROTECTED SECTION.
*"* protected components of class ZCL_IDOC_DETAIL_REPORT
*"* do not include other source files here!!!
  PRIVATE SECTION.
*"* private components of class ZCL_IDOC_DETAIL_REPORT
*"* do not include other source files here!!!

    TYPES:
      BEGIN OF ts_idoc_error_report,
                       idocnum        TYPE   string,
                       idocstat       TYPE   string,
                       idocstattxt    TYPE   string,
                       idocsegfldn    TYPE   string,
                       idocsegfldv    TYPE   string,
                       idocsegfldd    TYPE   string,
                     END   OF ts_idoc_error_report .
    TYPES:
      BEGIN OF ts_idoc_meta_data,
                    idocsegname    TYPE   string,
                    idocsegfldn    TYPE   string,
                    idocsegfldd    TYPE   string,
                    idocsegfldvf   TYPE   string,
                    idocsegfldvt   TYPE   string,
                    chkbox(1)      TYPE   c,
                  END   OF ts_idoc_meta_data .

    DATA:
      gt_idoc_report  TYPE TABLE OF      ts_idoc_error_report .
    DATA gs_idoc_report TYPE ts_idoc_error_report .
    DATA:
      gt_idoc_struct  TYPE TABLE OF      ts_idoc_meta_data .
    DATA gs_idoc_struct TYPE ts_idoc_meta_data .

    METHODS set_idoc_alv .
    TYPE-POOLS slis .
    METHODS create_field_catalog
      IMPORTING
        !iv_alv_type TYPE char1
      EXPORTING
        !et_fcat_alv TYPE slis_t_fieldcat_alv .
ENDCLASS.

CLASS ZCL_IDOC_DETAIL_REPORT IMPLEMENTATION.

* <SIGNATURE>---------------------------------------------------------------------------------------+
* | Instance Private Method ZCL_IDOC_DETAIL_REPORT->CREATE_FIELD_CATALOG
* +-------------------------------------------------------------------------------------------------+
* | [--->] IV_ALV_TYPE                    TYPE        CHAR1
* | [<---] ET_FCAT_ALV                    TYPE        SLIS_T_FIELDCAT_ALV
* +--------------------------------------------------------------------------------------</SIGNATURE>
  METHOD CREATE_FIELD_CATALOG.
*------------------------------------------------------------------------------------------
*                    A D M I N I S T R A T I O N
*------------------------------------------------------------------------------------------
* Author                         : Sravya Talanki
* Created On                     : 22.11.2012
* Description                    : The method creates for displaying the Idoc meta data
*                                  in the ALV pop up and Idoc Data in the ALV List
*--------------------------------------------------------------------------------------------
*                    C H A N G E  H I S T O R Y
*--------------------------------------------------------------------------------------------
* Change Id   :
* Author      :
* Changed On  :
* Description :
*
*--------------------------------------------------------------------------------------------
    DATA lt_fcat_alv      TYPE               slis_t_fieldcat_alv.
    DATA ls_fcat_alv      TYPE   LINE OF     slis_t_fieldcat_alv.

    CASE iv_alv_type.

      WHEN 'P'.

        CLEAR ls_fcat_alv.
        ls_fcat_alv-fieldname        =          'CHKBOX'.
        ls_fcat_alv-tabname          =          'GT_IDOC_STRUCT'.
        ls_fcat_alv-reptext_ddic     =           text-014.
        ls_fcat_alv-outputlen        =          '1'.
        ls_fcat_alv-edit             =          'X'.
        ls_fcat_alv-checkbox         =          'X'.
        APPEND ls_fcat_alv TO lt_fcat_alv.
        CLEAR ls_fcat_alv.
        ls_fcat_alv-fieldname        =          'IDOCSEGNAME'.
        ls_fcat_alv-tabname          =          'GT_IDOC_STRUCT'.
        ls_fcat_alv-reptext_ddic     =           text-004.
        ls_fcat_alv-outputlen        =          '30'.
        APPEND ls_fcat_alv TO lt_fcat_alv.
        CLEAR ls_fcat_alv.
        ls_fcat_alv-fieldname        =          'IDOCSEGFLDN'.
        ls_fcat_alv-tabname          =          'GT_IDOC_STRUCT'.
        ls_fcat_alv-reptext_ddic     =           text-005.
        ls_fcat_alv-outputlen        =          '20'.
        APPEND ls_fcat_alv TO lt_fcat_alv.
        CLEAR ls_fcat_alv.
        ls_fcat_alv-fieldname        =          'IDOCSEGFLDD'.
        ls_fcat_alv-tabname          =          'GT_IDOC_STRUCT'.
        ls_fcat_alv-reptext_ddic     =           text-006.
        ls_fcat_alv-outputlen        =          '50'.
        APPEND ls_fcat_alv TO lt_fcat_alv.
        CLEAR ls_fcat_alv.
        ls_fcat_alv-fieldname        =          'IDOCSEGFLDVF'.
        ls_fcat_alv-tabname          =          'GT_IDOC_STRUCT'.
        ls_fcat_alv-reptext_ddic     =           text-014.
        ls_fcat_alv-outputlen        =          '20'.
        ls_fcat_alv-edit             =          'X'.
        APPEND ls_fcat_alv TO lt_fcat_alv.
        CLEAR ls_fcat_alv.
        ls_fcat_alv-fieldname        =          'IDOCSEGFLDVT'.
        ls_fcat_alv-tabname          =          'GT_IDOC_STRUCT'.
        ls_fcat_alv-reptext_ddic     =           text-015.
        ls_fcat_alv-outputlen        =          '20'.
        ls_fcat_alv-edit             =          'X'.
        APPEND ls_fcat_alv TO lt_fcat_alv.

      WHEN 'D'.

        CLEAR ls_fcat_alv.
        ls_fcat_alv-fieldname        =          'IDOCNUM'.
        ls_fcat_alv-tabname          =          'GT_IDOC_REPORT'.
        ls_fcat_alv-reptext_ddic     =           text-007.
        ls_fcat_alv-outputlen        =          '16'.
        APPEND ls_fcat_alv TO lt_fcat_alv.
        CLEAR ls_fcat_alv.
        ls_fcat_alv-fieldname        =          'IDOCSTAT'.
        ls_fcat_alv-tabname          =          'GT_IDOC_REPORT'.
        ls_fcat_alv-reptext_ddic     =           text-008.
        ls_fcat_alv-outputlen        =          '2'.
        APPEND ls_fcat_alv TO lt_fcat_alv.
        CLEAR ls_fcat_alv.
        ls_fcat_alv-fieldname        =          'IDOCSTATTXT'.
        ls_fcat_alv-tabname          =          'GT_IDOC_REPORT'.
        ls_fcat_alv-reptext_ddic     =           text-009.
        ls_fcat_alv-outputlen        =          '70'.
        APPEND ls_fcat_alv TO lt_fcat_alv.
        CLEAR ls_fcat_alv.
        ls_fcat_alv-fieldname        =          'IDOCSEGFLDN'.
        ls_fcat_alv-tabname          =          'GT_IDOC_REPORT'.
        ls_fcat_alv-reptext_ddic     =           text-010.
        ls_fcat_alv-outputlen        =          '57'.
        APPEND ls_fcat_alv TO lt_fcat_alv.
        CLEAR ls_fcat_alv.
        ls_fcat_alv-fieldname        =          'IDOCSEGFLDD'.
        ls_fcat_alv-tabname          =          'GT_IDOC_REPORT'.
        ls_fcat_alv-reptext_ddic     =           text-011.
        ls_fcat_alv-outputlen        =          '150'.
        APPEND ls_fcat_alv TO lt_fcat_alv.
        CLEAR ls_fcat_alv.
        ls_fcat_alv-fieldname        =          'IDOCSEGFLDV'.
        ls_fcat_alv-tabname          =          'GT_IDOC_REPORT'.
        ls_fcat_alv-reptext_ddic     =           text-012.
        ls_fcat_alv-outputlen        =          '100'.
        APPEND ls_fcat_alv TO lt_fcat_alv.

    ENDCASE.

    et_fcat_alv[] = lt_fcat_alv[].
  ENDMETHOD.                    "CREATE_COLUMNS

* <SIGNATURE>---------------------------------------------------------------------------------------+
* | Instance Public Method ZCL_IDOC_DETAIL_REPORT->READ_IDOC_DATA
* +-------------------------------------------------------------------------------------------------+
* | [--->] IT_IDOCNUM                     TYPE        STANDARD TABLE
* | [--->] IT_STATUS                      TYPE        STANDARD TABLE
* | [--->] IT_CRDAT                       TYPE        STANDARD TABLE
* | [--->] IV_EMPTY                       TYPE        CHAR1
* +--------------------------------------------------------------------------------------</SIGNATURE>
  METHOD READ_IDOC_DATA.
*------------------------------------------------------------------------------------------
*                    A D M I N I S T R A T I O N
*------------------------------------------------------------------------------------------
* Author                         : Sravya Talanki
* Created On                     : 22.11.2012
* Description                    : The method reads the idoc structure and data blocks.
*--------------------------------------------------------------------------------------------
*                    C H A N G E  H I S T O R Y
*--------------------------------------------------------------------------------------------
* Change Id   :
* Author      :
* Changed On  :
* Description :
*
*--------------------------------------------------------------------------------------------
    "Data Declaration
    DATA lt_idoc        TYPE TABLE OF          edids.
    DATA lt_edidd       TYPE TABLE OF          edidd.
    DATA ls_idoc        TYPE                   edids.
    DATA ls_edidd       TYPE                   edidd.
    DATA lt_idoc_range  TYPE RANGE OF          edids-docnum.
    DATA lt_stat_range  TYPE RANGE OF          edids-status.
    DATA lt_crdt_range  TYPE RANGE OF          edids-credat.
    DATA lt_segstruct   TYPE TABLE OF          edisegstru .
    DATA ls_segstruct   TYPE                   edisegstru .
    DATA lt_qualif      TYPE TABLE OF          edisegment.
    DATA ls_qualif      TYPE                   edisegment.
    DATA lv_offset      TYPE                   i.
    DATA ls_dd04v       TYPE                   dd04v.
    DATA ls_dd07v       TYPE                   dd07v .
    DATA lt_dd07v       TYPE TABLE OF          dd07v .

    lt_idoc_range[]   =   it_idocnum[].
    lt_stat_range[]   =   it_status[].
    lt_crdt_range[]   =   it_crdat[].

    "Read Idoc and Stat Information for the given selection criteria
    SELECT docnum status statxt
           stapa1 stapa2 stapa3 stapa4
             FROM edids
                 INTO CORRESPONDING FIELDS OF TABLE lt_idoc
                 WHERE docnum IN lt_idoc_range
                   AND status IN lt_stat_range
                   AND credat IN lt_crdt_range.

    SORT lt_idoc BY docnum status statxt stapa1 stapa2 stapa3 stapa4.
    DELETE ADJACENT DUPLICATES FROM lt_idoc COMPARING docnum status statxt stapa1 stapa2 stapa3 stapa4.

    LOOP AT lt_idoc INTO ls_idoc.

      CLEAR lt_edidd[].

      REPLACE  '&1' IN ls_idoc-statxt WITH ls_idoc-stapa1.
      REPLACE  '&2' IN ls_idoc-statxt WITH ls_idoc-stapa2.
      REPLACE  '&3' IN ls_idoc-statxt WITH ls_idoc-stapa3.
      REPLACE  '&4' IN ls_idoc-statxt WITH ls_idoc-stapa4.

      REPLACE FIRST OCCURRENCE OF '&' IN ls_idoc-statxt WITH ls_idoc-stapa1.
      REPLACE FIRST OCCURRENCE OF '&' IN ls_idoc-statxt WITH ls_idoc-stapa2.
      REPLACE FIRST OCCURRENCE OF '&' IN ls_idoc-statxt WITH ls_idoc-stapa3.
      REPLACE FIRST OCCURRENCE OF '&' IN ls_idoc-statxt WITH ls_idoc-stapa4.

      "Read Idoc Segment Data Blocks and update the table
      CALL FUNCTION 'IDOC_READ_COMPLETELY'
        EXPORTING
          document_number         = ls_idoc-docnum
        TABLES
          int_edidd               = lt_edidd
        EXCEPTIONS
          document_not_exist      = 1
          document_number_invalid = 2
          OTHERS                  = 3.

      IF sy-subrc NE 0.
        MESSAGE ID 'ZPM_ORDER' TYPE 'E' NUMBER '023' DISPLAY LIKE 'E'.
      ENDIF.

      " Select Idoc Segment Qualifiers
      SELECT segtyp qualifier
             FROM edisegment
             INTO CORRESPONDING FIELDS OF TABLE lt_qualif
             FOR ALL ENTRIES IN lt_edidd
             WHERE segtyp = lt_edidd-segnam.

      "Read Segment Structure
      LOOP AT lt_edidd INTO ls_edidd WHERE sdata IS NOT INITIAL.

        CLEAR lt_segstruct[].
        "Read the segment structure for the segment name
        CALL FUNCTION 'SEGMENT_READ'
          EXPORTING
            segmenttyp           = ls_edidd-segnam
          TABLES
            segmentstructure     = lt_segstruct
          EXCEPTIONS
            no_authority         = 1
            segment_not_existing = 2
            OTHERS               = 3.

        IF sy-subrc NE 0.
          MESSAGE ID 'ZPM_ORDER' TYPE 'E' NUMBER '023' DISPLAY LIKE 'E'.
        ENDIF.

        lv_offset = 0.
        LOOP AT lt_segstruct INTO ls_segstruct.

          " Read each segment field and value
          CLEAR : gs_idoc_report,ls_qualif.

          READ TABLE lt_qualif INTO ls_qualif WITH KEY segtyp = ls_edidd-segnam.

          READ TABLE gt_idoc_struct INTO gs_idoc_struct
                     WITH KEY idocsegname = ls_edidd-segnam
                              idocsegfldn = ls_segstruct-fieldname
                              chkbox      = 'X'.

          IF sy-subrc EQ 0.
            "Read Segment field value
            MOVE ls_edidd-sdata+lv_offset(ls_segstruct-expleng)
               TO  gs_idoc_report-idocsegfldv.

            "Delete the Idoc where  segment field values doesnt match the filter criteria
            "Select all Idocs with segment field values that
            "match the filter criteria defined in the ALV Metadata pop up

            IF       gs_idoc_struct-idocsegfldvf IS NOT INITIAL
                AND  gs_idoc_struct-idocsegfldvt IS INITIAL
                AND  gs_idoc_report-idocsegfldv NE gs_idoc_struct-idocsegfldvf.
              DELETE gt_idoc_report WHERE idocnum = ls_edidd-docnum.
              DELETE lt_edidd       WHERE docnum = ls_edidd-docnum.
              EXIT.
            ENDIF.

            IF       gs_idoc_struct-idocsegfldvf IS INITIAL
                AND  gs_idoc_struct-idocsegfldvt IS NOT INITIAL
                AND  gs_idoc_report-idocsegfldv > gs_idoc_struct-idocsegfldvt.
              DELETE gt_idoc_report WHERE idocnum = ls_edidd-docnum.
              DELETE lt_edidd       WHERE docnum = ls_edidd-docnum.
              EXIT.
            ENDIF.

            IF         gs_idoc_struct-idocsegfldvf IS NOT INITIAL
                  AND  gs_idoc_struct-idocsegfldvt IS NOT INITIAL
                  AND  ( gs_idoc_report-idocsegfldv < gs_idoc_struct-idocsegfldvf
                  OR  gs_idoc_report-idocsegfldv > gs_idoc_struct-idocsegfldvt ).
              DELETE gt_idoc_report WHERE idocnum = ls_edidd-docnum.
              DELETE lt_edidd       WHERE docnum = ls_edidd-docnum.
              EXIT.
            ENDIF.

            IF   ( iv_empty = 'X' )
                 OR ( iv_empty = ' '
                 AND gs_idoc_report-idocsegfldv IS NOT INITIAL ).
              IF gs_idoc_report-idocsegfldv BETWEEN gs_idoc_struct-idocsegfldvf AND gs_idoc_struct-idocsegfldvt.
              ENDIF.

              gs_idoc_report-idocnum         =      ls_idoc-docnum.
              gs_idoc_report-idocstat        =      ls_idoc-status.
              gs_idoc_report-idocstattxt     =      ls_idoc-statxt.

              CONCATENATE ls_edidd-segnam ls_segstruct-fieldname
              INTO gs_idoc_report-idocsegfldn
              SEPARATED BY '-'.

              "Read Segment field desctription
              CALL FUNCTION 'DDIF_DTEL_GET'
                EXPORTING
                  name          = ls_segstruct-rollname
                  state         = 'A'
                  langu         = sy-langu
                IMPORTING
                  dd04v_wa      = ls_dd04v
                EXCEPTIONS
                  illegal_input = 1
                  OTHERS        = 2.

              IF sy-subrc NE 0.
                MESSAGE ID 'ZPM_ORDER' TYPE 'E' NUMBER '023' DISPLAY LIKE 'E'.
              ENDIF.

              gs_idoc_report-idocsegfldd = ls_dd04v-ddtext.

              IF sy-tabix = 1 AND ls_qualif-qualifier = 'X'.

                "If the segment is the qualifier we want another description, which depends on the
                " value of the qualifier: the description for this value of the domname
                CALL FUNCTION 'DDIF_DOMA_GET'
                  EXPORTING
                    name          = ls_dd04v-domname
                    state         = 'M'
                    langu         = sy-langu
                  TABLES
                    dd07v_tab     = lt_dd07v  " we get the values here
                  EXCEPTIONS
                    illegal_input = 1
                    OTHERS        = 2.

                IF sy-subrc NE 0.
                  MESSAGE ID 'ZPM_ORDER' TYPE 'E' NUMBER '023' DISPLAY LIKE 'E'.
                ENDIF.

                "Read the domain text for the segment qualifier
                LOOP AT lt_dd07v INTO ls_dd07v WHERE domvalue_l = gs_idoc_report-idocsegfldv.
                  MOVE ls_dd07v-ddtext TO gs_idoc_report-idocsegfldd.
                ENDLOOP.

              ENDIF.

              "Write the Idoc Report
              APPEND gs_idoc_report TO gt_idoc_report.

            ENDIF.
          ENDIF.
          lv_offset = lv_offset + ls_segstruct-expleng.
        ENDLOOP.

      ENDLOOP.

    ENDLOOP.
    " Display Idoc Data block as ALV List
    CALL METHOD me->set_idoc_alv.

  ENDMETHOD.                    "read_idoc_data
  "READ_IDOC_DATA

* <SIGNATURE>---------------------------------------------------------------------------------------+
* | Instance Public Method ZCL_IDOC_DETAIL_REPORT->READ_IDOC_METADATA
* +-------------------------------------------------------------------------------------------------+
* | [--->] IV_IDOCTYPE                    TYPE        LEDID_IDOCTYPE
* +--------------------------------------------------------------------------------------</SIGNATURE>
  METHOD READ_IDOC_METADATA.
*------------------------------------------------------------------------------------------
*                    A D M I N I S T R A T I O N
*------------------------------------------------------------------------------------------
* Author                         : Sravya Talanki
* Created On                     : 22.11.2012
* Description                    : The method reads the idoc meta data and displays fields
*                                  of the segment in an ALV Pop up
*--------------------------------------------------------------------------------------------
*                    C H A N G E  H I S T O R Y
*--------------------------------------------------------------------------------------------
* Change Id   :
* Author      :
* Changed On  :
* Description :
*
*--------------------------------------------------------------------------------------------
    "Data Declaration
    DATA lt_seg_struc     TYPE             ledid_t_segment_struct.
    DATA ls_seg_struc     TYPE LINE OF     ledid_t_segment_struct.
    DATA lt_fcat_alv      TYPE             slis_t_fieldcat_alv.
    DATA lt_idoc_struct   TYPE             ledid_t_idoc_struct.
    DATA lt_seg           TYPE             ledid_t_segment  .
    DATA ls_grid          TYPE             lvc_s_glay.

    CLEAR gt_idoc_struct[].
    "Read Idoc Meta Data
    CALL FUNCTION 'IDOC_TYPE_COMPLETE_READ'
      EXPORTING
        idoctype             = iv_idoctype
      TABLES
        idoc_struct          = lt_idoc_struct[]
        segments             = lt_seg[]
        segment_struct       = lt_seg_struc[]
      EXCEPTIONS
        idoctype_unknown     = 1
        idocstruct_unknown   = 2
        segment_data_missing = 3
        illegal_struct_type  = 4
        OTHERS               = 5.

    IF sy-subrc NE 0.
      MESSAGE ID 'ZPM_ORDER' TYPE 'E' NUMBER '023' DISPLAY LIKE 'E'.
    ENDIF.

    "Move Segment, fieldname, description to another internal
    "table with chckbox for ALV pop up
    LOOP AT lt_seg_struc INTO ls_seg_struc.
      "Populate Idoc Segment Name, Field Name,Field Description

      CLEAR gs_idoc_struct.
      gs_idoc_struct-idocsegname    =   ls_seg_struc-segment_type.
      gs_idoc_struct-idocsegfldn    =   ls_seg_struc-fieldname.
      gs_idoc_struct-idocsegfldd    =   ls_seg_struc-field_attrib-descrp.
      APPEND gs_idoc_struct TO gt_idoc_struct.

    ENDLOOP.

    "Create Catalog for Idoc Meta Data ALV Pop Up
    CALL METHOD me->create_field_catalog
      EXPORTING
        iv_alv_type = 'P'
      IMPORTING
        et_fcat_alv = lt_fcat_alv[].

    ls_grid-edt_cll_cb = 'X'.

    "Display Idoc Meta Data in the Popup Window
    CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
      EXPORTING
        i_grid_settings       = ls_grid
        i_grid_title          = text-013
        i_screen_start_column = 1
        i_screen_start_line   = 1
        i_screen_end_column   = 150
        i_screen_end_line     = 20
        it_fieldcat           = lt_fcat_alv[]
      TABLES
        t_outtab              = gt_idoc_struct
      EXCEPTIONS
        program_error         = 1
        OTHERS                = 2.

    IF sy-subrc NE 0.
      MESSAGE ID 'ZPM_ORDER' TYPE 'E' NUMBER '023' DISPLAY LIKE 'E'.
    ENDIF.

  ENDMETHOD.                    "READ_IDOC_METADATA

* <SIGNATURE>---------------------------------------------------------------------------------------+
* | Instance Private Method ZCL_IDOC_DETAIL_REPORT->SET_IDOC_ALV
* +-------------------------------------------------------------------------------------------------+
* +--------------------------------------------------------------------------------------</SIGNATURE>
  METHOD SET_IDOC_ALV.
*------------------------------------------------------------------------------------------
*                    A D M I N I S T R A T I O N
*------------------------------------------------------------------------------------------
* Author                         : Sravya Talanki
* Created On                     : 22.11.2012
* Description                    : The method is used to display idoc segment data
*                                  in ALV format
*--------------------------------------------------------------------------------------------
*                    C H A N G E  H I S T O R Y
*--------------------------------------------------------------------------------------------
* Change Id   :
* Author      :
* Changed On  :
* Description :
*
*--------------------------------------------------------------------------------------------
    "Data Dec
    DATA lt_fcat_alv      TYPE               slis_t_fieldcat_alv.
    DATA ls_layout        TYPE               slis_layout_alv.

    "Create field catalogue for displaying Idoc Segment Detail in ALV
    CALL METHOD me->create_field_catalog
      EXPORTING
        iv_alv_type = 'D'
      IMPORTING
        et_fcat_alv = lt_fcat_alv.

    ls_layout-colwidth_optimize = 'X'.

    "Displays the data in the table gt_idoc_report in ALV format
    CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
      EXPORTING
        i_grid_title  = text-002
        is_layout     = ls_layout
        it_fieldcat   = lt_fcat_alv
      TABLES
        t_outtab      = gt_idoc_report
      EXCEPTIONS
        program_error = 1
        OTHERS        = 2.

    IF sy-subrc NE 0.
      MESSAGE ID 'ZPM_ORDER' TYPE 'E' NUMBER '023' DISPLAY LIKE 'E'.
    ENDIF.

  ENDMETHOD.                    "SET_IDOC_ALV
ENDCLASS.

  • No labels