Skip to Content
avatar image
Former Member

ALV MESSAGE_TYPE_X DUMP

Hi, I´m doing an grid display ALV. Everything works perfect unatil I execute it and when it shows me the grid when I press CTRL+End to go to de end of the it I get a short ALV DUMP and the error comes from a standard program.

It says the following:

The current application program detected a situation which really

should not occur. Therefore, a termination with a short dump was

triggered on purpose by the key word MESSAGE (type X).

Anál.errores

Short text of error message:

Long text of error message:

Technical information about the message:

Message class....... "0K"

Number.............. 000

Variable 1.......... " "

Variable 2.......... " "

Variable 3.......... " "

Variable 4.......... " "

Programa SAPLSLVC

Include LSLVCF36

Línea 2.734

Tp.módulo (FORM)

Nombre módulo FILL_DATA_TABLE

is_subtottxt_info = ls_subtot_info

ip_subtot_line = lr_data

changing

c_subtottxt = l_subtottxt.

ls_lvc_data-value = l_subtottxt.

append ls_lvc_data to ct_lvc_data.

endif.

  • Column per Fieldcat Entry

    ls_lvc_data-value = space.

    clear ls_lvc_data-style.

    loop at it_fcat_local assigning .

    endif.

    l_from = ls_grpl-index_from.

    l_to = ls_grpl-index_to.

    if ls_grpl-index_from is initial and

    PLEASE I NEED HELP, I DONT KNOW WHAT ELSE TO TRY!

    Add comment
    10|10000 characters needed characters exceeded

    • Get RSS Feed

    7 Answers

    • Best Answer
      avatar image
      Former Member
      Feb 02, 2007 at 02:20 PM

      Hi guys, sorry I´m so mixed up with all these programs that I posted anoted internat table and fieldcats. Here goes the right ones.

      data: begin of i_ordenes occurs 0,

      aufnr like viaufkst-aufnr, "Nro de Orden

      ktext like viaufkst-ktext, "Texto

      ntanf like viauf_afvc-ntanf, "Limitación Inicio

      ntend like viauf_afvc-ntend, "Limitación Fin

      real like pmco-wrt01, "Costo Real

      plan like pmco-wrt01, "Costo Plan

      auart like viaufkst-auart, "Clase de Orden

      arbpl like crhd-arbpl, "Puesto de Trabajo

      tecnica like viaufkst-tplnr, "Ubicacion Tecnica

      fecha like viaufkst-addat, "Período

      ilart like viaufkst-ilart, "Clase de Actividad

      end of i_ordenes.

      fieldcatalog-fieldname = 'AUFNR'.

      fieldcatalog-seltext_l = text-t02.

      fieldcatalog-col_pos = '1'.

      APPEND fieldcatalog TO fieldcatalog.

      CLEAR fieldcatalog.

      fieldcatalog-fieldname = 'KTEXT'.

      fieldcatalog-seltext_l = text-t11.

      fieldcatalog-col_pos = '2'.

      APPEND fieldcatalog TO fieldcatalog.

      CLEAR fieldcatalog.

      fieldcatalog-fieldname = 'NTANF'.

      fieldcatalog-seltext_l = text-t19.

      fieldcatalog-col_pos = '3'.

      APPEND fieldcatalog TO fieldcatalog.

      CLEAR fieldcatalog.

      fieldcatalog-fieldname = 'NETND'.

      fieldcatalog-seltext_l = text-t20.

      fieldcatalog-col_pos = '4'.

      APPEND fieldcatalog TO fieldcatalog.

      CLEAR fieldcatalog.

      fieldcatalog-fieldname = 'REAL'.

      fieldcatalog-seltext_l = text-t05.

      fieldcatalog-col_pos = '5'.

      fieldcatalog-do_sum = 'X'.

      APPEND fieldcatalog TO fieldcatalog.

      CLEAR fieldcatalog.

      fieldcatalog-fieldname = 'PLAN'.

      fieldcatalog-seltext_l = text-t06.

      fieldcatalog-col_pos = '6'.

      fieldcatalog-do_sum = 'X'.

      APPEND fieldcatalog TO fieldcatalog.

      CLEAR fieldcatalog.

      fieldcatalog-fieldname = 'AUART'.

      fieldcatalog-seltext_l = text-t21.

      fieldcatalog-col_pos = '7'.

      APPEND fieldcatalog TO fieldcatalog.

      CLEAR fieldcatalog.

      fieldcatalog-fieldname = 'ARBPL'.

      fieldcatalog-seltext_l = text-t22.

      fieldcatalog-col_pos = '8'.

      APPEND fieldcatalog TO fieldcatalog.

      CLEAR fieldcatalog.

      fieldcatalog-fieldname = 'TECNICA'.

      fieldcatalog-seltext_l = text-t25.

      fieldcatalog-col_pos = '9'.

      fieldcatalog-do_sum = 'X'.

      APPEND fieldcatalog TO fieldcatalog.

      CLEAR fieldcatalog.

      fieldcatalog-fieldname = 'FECHA'.

      fieldcatalog-seltext_l = text-t23.

      fieldcatalog-col_pos = '10'.

      APPEND fieldcatalog TO fieldcatalog.

      CLEAR fieldcatalog.

      fieldcatalog-fieldname = 'ILART'.

      fieldcatalog-seltext_l = text-t18.

      fieldcatalog-col_pos = '11'.

      APPEND fieldcatalog TO fieldcatalog.

      CLEAR fieldcatalog.

      IM REALLY SORRY!!!

      Add comment
      10|10000 characters needed characters exceeded

    • Feb 02, 2007 at 01:05 PM

      Hi Lucila,

      Can you show how you have populated the field catalog information?

      REgards,

      Ravi

      Add comment
      10|10000 characters needed characters exceeded

    • avatar image
      Former Member
      Feb 02, 2007 at 01:06 PM

      Sorry, I forgot to mark where the error in the DUMP is. Its the line with message x000(0k).

      Add comment
      10|10000 characters needed characters exceeded

      • Former Member

        x000 will obviously gives a short dump as it is meant for program termination,

        change that to i000 -


        > Information message OR

        s000 -


        > success message OR

        e000 -


        > error message OR

        w000 -


        > warning message

    • avatar image
      Former Member
      Feb 02, 2007 at 01:19 PM

      Hi Lucila,

      the error occurs because the field catalog does not match the structure of the internal table.

      Possibly you defined BOX or COLOR field in the layout but this is not defindes correctly in internal table to be displayed.

      Regards,

      Clemens

      Add comment
      10|10000 characters needed characters exceeded

    • avatar image
      Former Member
      Feb 02, 2007 at 01:40 PM

      The internal table is:

      DATA: BEGIN OF i_list OCCURS 0,

      nusol LIKE eban-banfn,

      nupos LIKE eban-bnfpo,

      tdias type i.

      DATA END OF i_list.

      fieldcatalog-fieldname = 'NUSOL'.

      fieldcatalog-seltext_m = text-001.

      APPEND fieldcatalog TO fieldcatalog.

      CLEAR fieldcatalog.

      fieldcatalog-fieldname = 'NUPOS'.

      fieldcatalog-seltext_m = text-002.

      APPEND fieldcatalog TO fieldcatalog.

      CLEAR fieldcatalog.

      fieldcatalog-fieldname = 'TDIAS'.

      fieldcatalog-seltext_m = text-003.

      APPEND fieldcatalog TO fieldcatalog.

      CLEAR fieldcatalog.

      gd_repid = sy-repid.

      CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'

      EXPORTING

      i_callback_program = gd_repid

      i_callback_top_of_page = 'TOP_OF_PAGE'

      is_layout = gd_layout

      it_fieldcat = fieldcatalog[]

      i_save = 'X'

      • IT_EXCLUDING =

      • IT_SPECIAL_GROUPS =

      • it_sort =

      TABLES

      t_outtab = i_list

      EXCEPTIONS

      program_error = 1

      OTHERS = 2

      Add comment
      10|10000 characters needed characters exceeded

    • avatar image
      Former Member
      Feb 02, 2007 at 01:47 PM

      Chandrasekhar, I´m not able to change it because it´s a standard program and I can´t modify it.

      Add comment
      10|10000 characters needed characters exceeded

      • Former Member

        Hi,

        this is my solution for ALV field catalog for any kind of internal table:

        In your proram, add the 2 forms and

        perform alv_fieldcat_for_itab tables i_list changing fieldcatalog[],

        if you want other seltexts, proceed according to RAVIs proposal and modify the field catalog.

        For this purpose, I use my own form too, you will find at the bottom...

        Regards,

        Clemens

        *&---------------------------------------------------------------------*
        *&      Form  ALV_FIELDCAT_FOR_ITAB
        *&---------------------------------------------------------------------*
        *       Feldkatalog from (arbitrary) internal Table (c) Clemens Li
        *       * build field catalog from        type description
        *----------------------------------------------------------------------*
        FORM alv_fieldcat_for_itab                                  "#EC *
          TABLES   pt_outtab                      TYPE table        "#EC *
          CHANGING pt_alv_fieldcat                TYPE slis_t_fieldcat_alv."#EC *
          DATA:
            lv_desc                               TYPE sydes_desc,
            ls_alv_fieldcat                       TYPE slis_fieldcat_alv,
            lv_longfield                          TYPE text80."CRM<=R/3 fname.
          FIELD-SYMBOLS:
            <typeinfo>                            TYPE sydes_typeinfo,
            <nameinfo>                            TYPE sydes_nameinfo.
          DESCRIBE FIELD pt_outtab INTO lv_desc.                    "#EC *
        
          LOOP AT lv_desc-types
              ASSIGNING <typeinfo>
              WHERE NOT idx_name IS INITIAL
                AND table_kind IS INITIAL "no entries for deep table like color
                AND back                          = 1. "top-level-entries only.
            READ TABLE lv_desc-names INDEX <typeinfo>-idx_name
              ASSIGNING <nameinfo>.
            CHECK <nameinfo>-name                 <> 'INCLUDE'.
            ls_alv_fieldcat-fieldname             = <nameinfo>-name.
            WHILE NOT <nameinfo>-continue IS INITIAL.
              ADD 1 TO <typeinfo>-idx_name.
              READ TABLE lv_desc-names INDEX <typeinfo>-idx_name
                ASSIGNING <nameinfo>.
              CONCATENATE
                ls_alv_fieldcat-fieldname
                <nameinfo>-name
                INTO ls_alv_fieldcat-fieldname.
            ENDWHILE." not <nameinfo>-continue IS INITIAL.
            READ TABLE lv_desc-names INDEX <typeinfo>-idx_help_id
              ASSIGNING <nameinfo>.
            IF sy-subrc                           = 0.
        
        * Caution: Help-ID may be Tablename-Fieldname and thus longer
        * than 30 Chars; ls_alv_fieldcat-rollname is 30 Chars only
              ls_alv_fieldcat-rollname            = <nameinfo>-name.
              lv_longfield                        = <nameinfo>-name.
              WHILE NOT <nameinfo>-continue IS INITIAL.
                ADD 1 TO <typeinfo>-idx_help_id.
                READ TABLE lv_desc-names INDEX <typeinfo>-idx_help_id
                  ASSIGNING <nameinfo>.
                CONCATENATE
                  lv_longfield
                  <nameinfo>-name
                  INTO lv_longfield.
              ENDWHILE." not lv_desc-continue is initial.
        
        * help id may be data element or <table>-<field>
              IF lv_longfield CA '-'.
        
        * get data                                type for table field
                PERFORM get_rollname_4_tabfield
                  USING lv_longfield CHANGING ls_alv_fieldcat.
              ENDIF." lv_longfield ca '-'.
            ELSE.
        
        * No Help-ID: Use Fieldname as text
              ls_alv_fieldcat-seltext_s           =
              ls_alv_fieldcat-seltext_m           =
              ls_alv_fieldcat-seltext_l           =
              ls_alv_fieldcat-reptext_ddic        =
              <nameinfo>-name.
            ENDIF." sy-subrc                      = 0.
        
        * Starting 4.7: get edit mask
            IF NOT <typeinfo>-idx_edit_mask IS INITIAL.
              READ TABLE lv_desc-names INDEX <typeinfo>-idx_edit_mask
                ASSIGNING <nameinfo>.
              ls_alv_fieldcat-edit_mask           = <nameinfo>-name.
              IF NOT <nameinfo>-continue IS INITIAL.
                ADD 1 TO <typeinfo>-idx_edit_mask.
                READ TABLE lv_desc-names INDEX <typeinfo>-idx_edit_mask
                  ASSIGNING <nameinfo>.
                CONCATENATE
                  ls_alv_fieldcat-edit_mask
                  <nameinfo>-name
                  INTO ls_alv_fieldcat-edit_mask.
              ENDIF." not <nameinfo>-continue IS INITIAL.
            ENDIF." not <typeinfo>-IDX_EDIT_MASK is initial.
        
        * assign length, output length and decimals
            ls_alv_fieldcat-intlen                = <typeinfo>-length.
            ls_alv_fieldcat-outputlen             = <typeinfo>-output_length.
            ls_alv_fieldcat-decimals_out          = <typeinfo>-decimals.
            ls_alv_fieldcat-inttype               = <typeinfo>-type.
            APPEND ls_alv_fieldcat TO pt_alv_fieldcat.
            CLEAR:  "prevent anything 2 B  taken for subsequent fields
              ls_alv_fieldcat.
          ENDLOOP." at lv_desc-types where not IDX_NAME is in initial.
        ENDFORM.                    " ALV_FIELDCAT_FOR_ITAB
        
        
        *&---------------------------------------------------------------------
        *&      Form  get_rollname_4_tabfield
        *&---------------------------------------------------------------------
        *       Get Data                          type for Table field
        *----------------------------------------------------------------------
        FORM get_rollname_4_tabfield
          USING    p_fname                        TYPE text80 ""CRM<=R/3 fname
          CHANGING p_alv_fieldcat                 TYPE slis_fieldcat_alv.
          FIELD-SYMBOLS:
            <dfies>                               TYPE dfies.
          DATA:
            lv_tabname                            TYPE tabname,
             lt_dfies                             TYPE TABLE OF dfies,
            lv_fieldname                          TYPE fieldname.
          SPLIT p_fname AT '-'
            INTO lv_tabname lv_fieldname.
          CLEAR p_alv_fieldcat-rollname.
          CALL FUNCTION 'DDIF_FIELDINFO_GET'
            EXPORTING
              tabname                             = lv_tabname
              fieldname                           = lv_fieldname
        *   LANGU                                 = SY-LANGU
        *   LFIELDNAME                            = ' '
        *   ALL_TYPES                             = ' '
        * IMPORTING
        *   X030L_WA                              =
        *   DDOBJTYPE                             =
        *   DFIES_WA                              =
        *   LINES_DESCR                           =
           TABLES
             dfies_tab                            =  lt_dfies
        *   FIXED_VALUES                          =
           EXCEPTIONS
             not_found                            = 1
             internal_error                       = 2
             OTHERS                               = 3
                    .
          IF sy-subrc                             <> 0.
            MESSAGE ID sy-msgid                   TYPE sy-msgty NUMBER sy-msgno
                    WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
          ELSE.
            READ TABLE   lt_dfies ASSIGNING <dfies> INDEX 1.
            p_alv_fieldcat-rollname               = <dfies>-rollname.
        * Und wenn keinerlei Twexte gepflegt sind?
            IF <dfies>-reptext IS INITIAL AND
               <dfies>-scrtext_s IS INITIAL AND
               <dfies>-scrtext_m IS INITIAL AND
               <dfies>-scrtext_l IS INITIAL.
        * No Text: Use Fieldname as text
              p_alv_fieldcat-seltext_s            =
              p_alv_fieldcat-seltext_m            =
              p_alv_fieldcat-seltext_l            =
              p_alv_fieldcat-reptext_ddic         =
              p_alv_fieldcat-fieldname.
            ENDIF." <dfies>-reptext IS INITIAL AND
          ENDIF.
        ENDFORM.                    " get_rollname_4_tabfield
        
        * Addition: How to adapt an automatically created field catalog
        * Take it for reference - may be adapted to your needs.
        * You can iclude it "as is" - no error if components do not exist
        *&---------------------------------------------------------------------*
        *&      Form  alv_fieldcat_enhance
        *&---------------------------------------------------------------------*
        *       Individual Enrichment of field catalog
        *----------------------------------------------------------------------*
        FORM alv_fieldcat_enhance
          CHANGING pt_alv_fieldcat                TYPE slis_t_fieldcat_alv.
          FIELD-SYMBOLS:
            <alv_fieldcat>                        TYPE slis_fieldcat_alv.
          LOOP AT pt_alv_fieldcat ASSIGNING <alv_fieldcat>.
            CASE <alv_fieldcat>-fieldname.
              WHEN 'LIGHTS'.
                <alv_fieldcat>-icon               = c_true.
              WHEN  'MANDT' OR 'SEL'.
                <alv_fieldcat>-tech               = c_true.
              WHEN 'REFERENCE'.
                <alv_fieldcat>-seltext_s          =
                <alv_fieldcat>-seltext_m          =
                <alv_fieldcat>-seltext_l          =
                <alv_fieldcat>-reptext_ddic       = 'Where-used'(103).
                <alv_fieldcat>-hotspot            = c_true.
        
            ENDCASE." <alv_fieldcat>-fieldname.
          ENDLOOP." at pt_alv_fieldcat assigning <fieldcat_alv>.
        ENDFORM.                    " alv_fieldcat_enhance
        
        
        

    • avatar image
      Former Member
      Feb 02, 2007 at 02:45 PM

      THANKS GUYS, YOU ARE THE BEST!!!

      Clemens, I can´t believe I didn´t see that! Ravi thank to you too.

      Points will be rewarded for both, you made my Friday.

      Regards,

      Lucila

      Add comment
      10|10000 characters needed characters exceeded