Skip to Content
avatar image
Former Member

Problem using Field symbols

Hi All,

We have recently upgraded to ECC6.0 and one of the zprogram is giving dump now. Previously with 4.6C it was working fine. Can someone please help me.

I researched prvious posts but did not find any answer.

Thanks,

Veni.

Runtime Errors GETWA_NOT_ASSIGNED

Short text

Field symbol has not yet been assigned.

What happened?

Error in the ABAP Application Program

The current ABAP program "SAPLKKBL" had to be terminated because it has

come across a statement that unfortunately cannot be executed.

----


  • FORM GEN_FIELD_OUT2 *

----


  • ........ *

----


form gen_field_out2.

field-symbols <l_initial>.

case gs_out-field_colcount.

when 001.

if gs_out_flags-slave ne 'X'.

>>>> assign <fm01> to <field>.

gs_fc = gs_mfc01.

else.

assign <fs01> to <field>.

gs_fc = gs_sfc01.

endif.

when 002.

if gs_out_flags-slave ne 'X'.

assign <fm02> to <field>.

gs_fc = gs_mfc02.

else.

assign <fs02> to <field>.

gs_fc = gs_sfc02.

endif.

Add comment
10|10000 characters needed characters exceeded

  • Follow
  • Get RSS Feed

8 Answers

  • Best Answer
    avatar image
    Former Member
    Sep 18, 2008 at 09:17 PM

    Hi,

    I would do the following...

    **Comment the checkbox column in the field catalog.
    **Add checkbox to the Field Catalog
    *    CLEAR w_fieldcat.
    *    w_fieldcat-fieldname = 'CHECKBOX'.
    *    w_fieldcat-checkbox = 'X'.
    *    w_fieldcat-key = 'X'.
    *    w_fieldcat-outputlen = 2.
    *    w_fieldcat-seltext_l = 'Selection Indicator'.
    *    w_fieldcat-col_pos = 1.
    *    w_fieldcat-edit = 'X'.
    *    APPEND w_fieldcat TO t_fieldcat.                        " index 1.
    
    ** Add the checkbox as the box field name in the layout.
      g_layout-box_fieldname = 'CHECKBOX'.

    Thanks

    Naren

    Add comment
    10|10000 characters needed characters exceeded

    • Former Member

      Hi Naren,

      Thankyou very much. Now no dump, it is giving me output. But after the output not able to get the checked records.

      This is the modified code. Anything should I change.

      FORM alv_output.

      clear t_fieldcat.

      refresh t_fieldcat.

      clear pfkey.

      g_repid = sy-repid.

      CALL FUNCTION 'REUSE_ALV_FIELDCATALOG_MERGE'

      EXPORTING

      i_program_name = g_repid

      i_internal_tabname = 'ITAB'

      i_inclname = g_repid

      CHANGING

      ct_fieldcat = t_fieldcat[]

      EXCEPTIONS

      inconsistent_interface = 1

      program_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.

      EXIT.

      ELSE.

      CLEAR w_fieldcat-key.

      MODIFY t_fieldcat FROM w_fieldcat TRANSPORTING key WHERE key = 'X'.

      CLEAR w_fieldcat.

      **Comment the checkbox column in the field catalog.

      **Add checkbox to the Field Catalog

      • w_fieldcat-fieldname = 'CHECKBOX'. "CHECKBOX

      • w_fieldcat-checkbox = 'X'.

      • w_fieldcat-key = 'X'.

      • w_fieldcat-outputlen = 2.

      • w_fieldcat-seltext_l = 'Selection Indicator'.

      • w_fieldcat-col_pos = 1.

      • w_fieldcat-edit = 'X'.

      • APPEND w_fieldcat TO t_fieldcat. " index 1.

      • CLEAR w_fieldcat.

        • Add the checkbox as the box field name in the layout.

        g_layout-box_fieldname = 'CHECKBOX'.

        *Add the right descriptions

        w_fieldcat-col_pos = 2.

        modify t_fieldcat from w_fieldcat transporting col_pos

        where fieldname = 'KUNNR'.

        clear w_fieldcat.

        w_fieldcat-seltext_l = 'Customer Name'.

        w_fieldcat-col_pos = 3.

        MODIFY t_fieldcat FROM w_fieldcat TRANSPORTING seltext_l col_pos

        WHERE fieldname = 'NAME1'.

        CLEAR w_fieldcat.

        w_fieldcat-col_pos = 4.

        w_fieldcat-seltext_l = 'Net Sales'.

        MODIFY t_fieldcat FROM w_fieldcat TRANSPORTING seltext_l col_pos

        WHERE fieldname = 'NETWR'.

        CLEAR w_fieldcat.

        Thanks,

        Veni.

    • avatar image
      Former Member
      Sep 04, 2008 at 10:16 PM

      You are assigning a field symbold that is not assigned in the first place.

      That's what you need to find out, why is that field symbols never assigned

      Add comment
      10|10000 characters needed characters exceeded

    • Sep 04, 2008 at 10:30 PM

      Looks like this is coming from the ALV call. This commonly happens when you specify a field in the field catalog, that does not have a corresponding field in the internal table which is used in the ALV grid. Check to make sure that all fields in your field catalog have a corresponding field in the internal table, and that it is they are spelled correctly.

      Regards,

      Rich Heilman

      Add comment
      10|10000 characters needed characters exceeded

    • avatar image
      Former Member
      Sep 04, 2008 at 11:23 PM

      When you field symbols is unassign, sy-subrc is different 0 ... try ...

      ASSIGN g_var TO <fs_var>.

      IF sy-subrc = 0.

      ... LOGIC

      ASSIGN <fs_var> TO <fs_var2>.

      IF sy-subrc = 0.

      ... logic

      ENDIF.

      ENDIF.

      David Carballido ^^

      Add comment
      10|10000 characters needed characters exceeded

      • Former Member Former Member

        Follow Rich's suggestions.

        IF you see the assignment of <fm01>.

        assign component gs_out_fieldcat-fieldname
                     of structure t_outtab_master to <fm01>.
        

        There is something wrong between your field catalog and your internal table. Maybe something changed in the update

    • avatar image
      Former Member
      Sep 17, 2008 at 11:26 AM

      Hi Venni,

      This is problem regrading fieldcatlog. this type of error usually not come in grid alv it only comes inalv list

      Analysing your program dump i think the problem is, the fieldcatlog of one of your field(which you want to display) in alv list has given reference table name but i think for that field no reference table exist.

      so what it is trying to get output length to display. but the field symbol is not assigned so it giving a short dump.

      Hopefully it will definitely solve your problem..

      Thanks,

      Nitin

      Add comment
      10|10000 characters needed characters exceeded

    • avatar image
      Former Member
      Sep 18, 2008 at 08:24 PM

      Hi,

      I tried your code in my system (ECC 6.0) ...I am not getting any dump..is it during display or after that...please explain

      DATA: BEGIN OF itab OCCURS 100,
      kunnr LIKE vbpa-kunnr,
      name1 LIKE kna1-name1,
      netwr LIKE vbrp-netwr,
      kbetr LIKE konp-kbetr,
      cnetwr LIKE vbrp-netwr,
      adjust(12) TYPE c,
      mnetwr LIKE vbrp-netwr,
      wrbtr LIKE bseg-wrbtr,
      owrbtr LIKE bseg-wrbtr,
      ualloc LIKE bseg-wrbtr,
      twrbtr LIKE bseg-wrbtr,
      texcess LIKE bseg-wrbtr,
      treserve LIKE bseg-wrbtr,
      END OF itab.
      
      TYPE-POOLS: slis.
      DATA : print TYPE slis_print_alv, "Printer settings
      g_repid LIKE sy-repid, "Program calling ALV
      t_fieldcat TYPE slis_t_fieldcat_alv, "ALV FieldCatalog
      g_layout TYPE slis_layout_alv, "Layout for ALV
      w_fieldcat LIKE LINE OF t_fieldcat, "ALV FieldCat WorkArea
      t_alv_headers TYPE slis_t_listheader, "ALV headers
      t_alv_events TYPE slis_t_event WITH HEADER LINE,
      t_sortcat TYPE slis_t_sortinfo_alv,
      g_variant LIKE disvariant,
      g_filter TYPE slis_t_filter_alv,
      g_status TYPE slis_formname VALUE 'STANDARD_02',
      g_user_command TYPE slis_formname VALUE 'USER_COMMAND',
      w_sortcat_ln LIKE LINE OF t_sortcat.
      
      PERFORM alv_output.
      
      *&---------------------------------------------------------------------*
      *&      Form  alv_output
      *&---------------------------------------------------------------------*
      *       text
      *----------------------------------------------------------------------*
      FORM alv_output.
        CLEAR t_fieldcat.
        REFRESH t_fieldcat.
        g_repid = sy-repid.
        CALL FUNCTION 'REUSE_ALV_FIELDCATALOG_MERGE'
          EXPORTING
            i_program_name         = g_repid
            i_internal_tabname     = 'ITAB'
            i_inclname             = g_repid
          CHANGING
            ct_fieldcat            = t_fieldcat[]
          EXCEPTIONS
            inconsistent_interface = 1
            program_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.
          EXIT.
        ELSE.
          CLEAR w_fieldcat-key.
          MODIFY t_fieldcat FROM w_fieldcat TRANSPORTING key WHERE key = 'X'.
      
      *Add checkbox to the Field Catalog
          CLEAR w_fieldcat.
          w_fieldcat-fieldname = 'CHECKBOX'.
          w_fieldcat-checkbox = 'X'.
          w_fieldcat-key = 'X'.
          w_fieldcat-outputlen = 2.
          w_fieldcat-seltext_l = 'Selection Indicator'.
          w_fieldcat-col_pos = 1.
          w_fieldcat-edit = 'X'.
          APPEND w_fieldcat TO t_fieldcat.                        " index 1.
          CLEAR w_fieldcat.
      *Add the right descriptions
          w_fieldcat-col_pos = 2.
          MODIFY t_fieldcat FROM w_fieldcat TRANSPORTING col_pos
          WHERE fieldname = 'KUNNR'.
          CLEAR w_fieldcat.
          w_fieldcat-seltext_l = 'Customer Name'.
          w_fieldcat-col_pos = 3.
          MODIFY t_fieldcat FROM w_fieldcat TRANSPORTING seltext_l col_pos
          WHERE fieldname = 'NAME1'.
          CLEAR w_fieldcat.
          w_fieldcat-col_pos = 4.
          w_fieldcat-seltext_l = 'Gross Co-op Sales'.
          MODIFY t_fieldcat FROM w_fieldcat TRANSPORTING seltext_l col_pos
          WHERE fieldname = 'NETWR'.
          CLEAR w_fieldcat.
          w_fieldcat-seltext_l = 'Accrual Rate(%)'.
          w_fieldcat-col_pos = 5.
          MODIFY t_fieldcat FROM w_fieldcat TRANSPORTING seltext_l col_pos
          WHERE fieldname = 'KBETR'.
          CLEAR w_fieldcat.
          w_fieldcat-seltext_l = 'Credits Accrued'.
          w_fieldcat-col_pos = 6.
          MODIFY t_fieldcat FROM w_fieldcat TRANSPORTING seltext_l col_pos
          WHERE fieldname = 'CNETWR'.
          CLEAR w_fieldcat.
          w_fieldcat-seltext_l = 'Adjustments'.
          w_fieldcat-col_pos = 7.
          MODIFY t_fieldcat FROM w_fieldcat TRANSPORTING seltext_l col_pos
          WHERE fieldname = 'ADJUST'.
          CLEAR w_fieldcat.
          w_fieldcat-seltext_l = 'Max.Allowable Credits'.
          w_fieldcat-col_pos = 8.
          MODIFY t_fieldcat FROM w_fieldcat TRANSPORTING seltext_l col_pos
          WHERE fieldname = 'MNETWR'.
          CLEAR w_fieldcat.
          w_fieldcat-seltext_l = 'Credits Issued'.
          w_fieldcat-col_pos = 9.
          MODIFY t_fieldcat FROM w_fieldcat TRANSPORTING seltext_l col_pos
          WHERE fieldname = 'WRBTR'.
          CLEAR w_fieldcat.
          w_fieldcat-seltext_l = 'Chargebacks Outstanding'.
          w_fieldcat-seltext_m = 'Outstanding'.
          w_fieldcat-col_pos = 10.
          MODIFY t_fieldcat FROM w_fieldcat TRANSPORTING seltext_l col_pos
          seltext_m WHERE fieldname = 'OWRBTR'.
          CLEAR w_fieldcat.
          w_fieldcat-seltext_l = 'Unallocate Chargebacks'.
          w_fieldcat-seltext_m = 'Unallocated'.
          w_fieldcat-col_pos = 11.
          MODIFY t_fieldcat FROM w_fieldcat TRANSPORTING seltext_l col_pos
          seltext_m WHERE fieldname = 'UALLOC'.
          CLEAR w_fieldcat.
          w_fieldcat-seltext_l = 'Total Charges'.
          w_fieldcat-col_pos = 12.
          MODIFY t_fieldcat FROM w_fieldcat TRANSPORTING seltext_l col_pos
          WHERE fieldname = 'TWRBTR'.
          CLEAR w_fieldcat.
          w_fieldcat-seltext_l = 'Excess Credits Issued'.
          w_fieldcat-seltext_m = 'Excess Credit'.
          w_fieldcat-col_pos = 13.
          MODIFY t_fieldcat FROM w_fieldcat TRANSPORTING seltext_l col_pos
          seltext_m WHERE fieldname = 'TEXCESS'.
          CLEAR w_fieldcat.
          w_fieldcat-seltext_l = 'Reserve Remaining'.
          w_fieldcat-seltext_m = 'Res. Remaining'.
          w_fieldcat-col_pos = 14.
          MODIFY t_fieldcat FROM w_fieldcat TRANSPORTING seltext_l col_pos
          seltext_m WHERE fieldname = 'TRESERVE'.
          CLEAR w_fieldcat.
        ENDIF.
        g_variant-report = g_repid.
        CALL FUNCTION 'REUSE_ALV_LIST_DISPLAY'
          EXPORTING
            i_callback_program       = g_repid
            i_callback_pf_status_set = g_status
            i_callback_user_command  = g_user_command
            is_layout                = g_layout
            it_sort                  = t_sortcat
            i_default                = 'A'
            i_save                   = 'A'
            is_variant               = g_variant
            it_fieldcat              = t_fieldcat[]
            it_events                = t_alv_events[]
            is_print                 = print
          TABLES
            t_outtab                 = itab
          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.
      
      
      ENDFORM. " alv_output

      Thanks

      Naren

      Add comment
      10|10000 characters needed characters exceeded

      • Former Member

        Hi Naren,

        It is during display only. After giving selection screen parameters, when I execute it is giving me dump.

        Thanks,

        Veni.

        Edited by: veni reddy on Sep 18, 2008 10:49 PM

    • avatar image
      Former Member
      Sep 18, 2008 at 08:55 PM

      Hi,

      Try this..add the CHECKBOX field to the internal table declaration..as you have added in your field catalog..

      DATA: BEGIN OF itab OCCURS 100,
      kunnr LIKE vbpa-kunnr,
      name1 LIKE kna1-name1,
      netwr LIKE vbrp-netwr,
      kbetr LIKE konp-kbetr,
      cnetwr LIKE vbrp-netwr,
      adjust(12) TYPE c,
      mnetwr LIKE vbrp-netwr,
      wrbtr LIKE bseg-wrbtr,
      owrbtr LIKE bseg-wrbtr,
      ualloc LIKE bseg-wrbtr,
      twrbtr LIKE bseg-wrbtr,
      texcess LIKE bseg-wrbtr,
      treserve LIKE bseg-wrbtr,
      CHECKBOX TYPE char1,             " Code added.
      END OF itab.

      Thanks

      Naren

      Add comment
      10|10000 characters needed characters exceeded

      • Former Member

        Hi Naren,

        I added the checkbox to ITAB. Should I change any thing in w_fieldcat,

        w_fieldcat-fieldname = 'CHECKBOX'. "CHECKBOX

        w_fieldcat-checkbox = 'X'.

        w_fieldcat-key = 'X'.

        w_fieldcat-outputlen = 2.

        w_fieldcat-seltext_l = 'Selection Indicator'.

        w_fieldcat-col_pos = 1.

        w_fieldcat-edit = 'X'.

        APPEND w_fieldcat TO t_fieldcat. " index 1.

        CLEAR w_fieldcat.

        Thanks,

        Veni.

    • avatar image
      Former Member
      Sep 18, 2008 at 10:09 PM

      Hi,

      In the user command subroutine just loop at the internal table ITAB ...WHERE CHECKBOX = 'X'...to get the records that are checked..

      Thanks

      Naren

      Add comment
      10|10000 characters needed characters exceeded

      • Former Member

        Hi Naren,

        It was not reading the Custnum properly. I fixed it now and working fine. I really appriciate all your help.

        • move sy-lisel+4(14) to ftab-kunnr.

        move sy-lisel+3(13) to ftab-kunnr.

        Thanks,

        Veni.

        form user_command using r_ucomm like sy-ucomm

        rs_selfield type slis_selfield.

        pfkey = sy-pfkey.

        clear sy-pfkey.

        case r_ucomm.

        WHEN 'SALE'.

        SET PF-STATUS 'NORM1'.

        PERFORM display_data.

        CLEAR: vbpa, vbrk.

        LOOP AT ftab.

        IF ftab-ind = 'X'.

        SKIP.

        ULINE (33).

        FORMAT COLOR COL_HEADING ON.

        WRITE: /01 sy-vline,

        02 'Sales for Customer:', ftab-kunnr, sy-vline.

        .............

        .............

        FORM display_data.

        cnt1 = 4.

        ipage = 1.

        • move sy-lisel+4(14) to ftab-kunnr.

        move sy-lisel+3(13) to ftab-kunnr.

        ftab-ind = 'X'.

        append ftab.

        CLEAR ftab.

        ENDFORM. "display_data