Skip to Content
author's profile photo Former Member
Former Member

URGENT ISSUE ! PLS SEE IT ( related to cureency field in field catalog)

Hi Gurus,

I have populated the field catalog inf like this.

is_FIELDCATALOG-FIELDNAME = 'W_EXT_AMOUNT'.

is_FIELDCATALOG-SELTEXT_M = 'Extended Amount'.

is_FIELDCATALOG-COL_POS = 4.

IS_FIELDCATALOG-OUTPUTLEN = 16.

is_FIELDCATALOG-REF_FIELDNAME = 'WAERS'.

is_FIELDCATALOG-REF_TABNAME = 'T001'.

IS_FIELDCATALOG-CFIELDNAME = 'DMBTR'.

is_fieldcatalog-ctabname = 'BSIS'.

APPEND IS_FIELDCATALOG TO IT_FIELDCATALOG.

CLEAR IS_FIELDCATALOG.

Data : W_EXT_AMOUNT type DMBTR.

I calculated it using

W_EXT_AMOUNT = IS_ERROR-AMOUNT * P_NETAMT.( amount is of type

DMBTR)

in the out put Amount is displayed with value 0,00

W_EXT_AMOUNT displayed as blank

when i print it for spool generation, its giving following dump

DUMP analysis.

What happened?

Error in the ABAP Application Program

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

come across a statement that unfortunately cannot be executed.

You attempted to access an unassigned field symbol

(data segment 95).

This error may occur if

- You address a typed field symbol before it has been set with

ASSIGN

- You address a field symbol that pointed to the line of an

internal table that was deleted

- You address a field symbol that was previously reset using

UNASSIGN or that pointed to a local field that no

longer exists

- You address a global function interface, although the

respective function module is not active - that is, is

not in the list of active calls. The list of active calls

can be taken from this short dump.

SourceCde

2785 case gs_out-field_colcount.

2786 when 001.

2787 if gs_out_flags-slave ne 'X'.

2788 assign <fm01> to <field>.

2789 gs_fc = gs_mfc01.

2790 else.

2791 assign <fs01> to <field>.

2792 gs_fc = gs_sfc01.

2793 endif.

2794 when 002.

2795 if gs_out_flags-slave ne 'X'.

2796 assign <fm02> to <field>.

2797 gs_fc = gs_mfc02.

2798 else.

2799 assign <fs02> to <field>.

2800 gs_fc = gs_sfc02.

2801 endif.

2802 when 003.

2803 if gs_out_flags-slave ne 'X'.

2804 assign <fm03> to <field>.

2805 gs_fc = gs_mfc03.

2806 else.

2807 assign <fs03> to <field>.

2808 gs_fc = gs_sfc03.

2809 endif.

2810 when 004.

2811 if gs_out_flags-slave ne 'X'.

>>>> assign <fm04> to <field>.2813 gs_fc = gs_mfc04.

2814 else.

2815 assign <fs04> to <field>.

2816 gs_fc = gs_sfc04.

2817 endif.

Note : problem may be with field catalog population since if i remove W_EXT_AMOUNT it is working fine, not giving any dump.

Pls see.

Thanks & Regards

Srinivas Rao

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

2 Answers

  • author's profile photo Former Member
    Former Member
    Posted on Sep 10, 2007 at 06:59 AM

    Hi see this code and try again.

    REPORT zn_alv_complex .

    TABLES : vbrk .

    TYPE-POOLS : slis .

    CONSTANTS : gc_top_of_page TYPE slis_formname VALUE 'TOP_OF_PAGE'.

    TYPES : BEGIN OF ty_vbrk ,

    vbeln TYPE vbrk-vbeln ,

    vkorg TYPE vbrk-vkorg,

    vtweg TYPE vbrk-vtweg,

    kunrg TYPE vbrk-kunrg,

    END OF ty_vbrk,

    BEGIN OF ty_vbrp,

    vbeln TYPE vbrp-vbeln,

    posnr TYPE vbrp-posnr,

    matnr TYPE vbrp-matnr,

    netwr TYPE vbrp-netwr,

    END OF ty_vbrp,

    BEGIN OF ty_final,

    vbeln TYPE vbrk-vbeln ,

    posnr TYPE vbrp-posnr,

    matnr TYPE vbrp-matnr,

    netwr TYPE vbrp-netwr,

    vkorg TYPE vbrk-vkorg,

    vtweg TYPE vbrk-vtweg,

    kunrg TYPE vbrk-kunrg,

    END OF ty_final .

    DATA : it_vbrk TYPE TABLE OF ty_vbrk,

    it_vbrp TYPE TABLE OF ty_vbrp,

    it_final TYPE TABLE OF ty_final ,

    wa_vbrk TYPE ty_vbrk,

    wa_vbrp TYPE ty_vbrp,

    wa_final TYPE ty_final ,

    git_event TYPE slis_t_event,

    git_layout TYPE slis_layout_alv,

    git_fieldcat TYPE slis_t_fieldcat_alv,

    gwa_fieldcat TYPE slis_fieldcat_alv.

    SELECT-OPTIONS : s_vbeln FOR vbrk-vbeln,

    s_vkorg FOR vbrk-vkorg,

    s_vtweg FOR vbrk-vtweg.

    START-OF-SELECTION .

    SELECT vbeln vkorg vtweg kunrg

    FROM vbrk

    INTO TABLE it_vbrk

    WHERE vbeln IN s_vbeln

    AND vkorg IN s_vkorg

    AND vtweg IN s_vtweg .

    SELECT vbeln posnr matnr netwr

    FROM vbrp

    INTO TABLE it_vbrp

    FOR ALL ENTRIES IN it_vbrk

    WHERE vbeln = it_vbrk-vbeln .

    LOOP AT it_vbrp INTO wa_vbrp .

    READ TABLE it_vbrk INTO wa_vbrk WITH KEY vbeln = wa_vbrp-vbeln .

    wa_final-vbeln = wa_vbrk-vbeln.

    wa_final-posnr = wa_vbrp-posnr.

    wa_final-netwr = wa_vbrp-netwr.

    wa_final-matnr = wa_vbrp-matnr.

    wa_final-vkorg = wa_vbrk-vkorg.

    wa_final-vtweg = wa_vbrk-vkorg.

    wa_final-kunrg = wa_vbrk-kunrg.

    APPEND wa_final TO it_final.

    CLEAR : wa_vbrk , wa_vbrp , wa_final .

    ENDLOOP .

    PERFORM sub_fieldcatalog.

    PERFORM sub_layout_init CHANGING git_layout.

    PERFORM sub_build_event USING git_event[] .

    PERFORM sub_alv_display.

    &----


    *& Form SUB_FIELDCATALOG

    &----


    • text

    ----


    FORM sub_fieldcatalog.

    REFRESH git_fieldcat.

    gwa_fieldcat-col_pos = 0.

    gwa_fieldcat-fieldname = 'VBELN'.

    gwa_fieldcat-tabname = 'IT_FINAL'.

    gwa_fieldcat-outputlen = 14.

    gwa_fieldcat-seltext_l = 'Billing Doc.' .

    gwa_fieldcat-seltext_m = 'Billing Doc.' .

    gwa_fieldcat-seltext_s = 'Billing Doc.' .

    APPEND gwa_fieldcat TO git_fieldcat .

    gwa_fieldcat-col_pos = 1.

    gwa_fieldcat-fieldname = 'POSNR'.

    gwa_fieldcat-tabname = 'IT_FINAL'.

    gwa_fieldcat-outputlen = 5.

    gwa_fieldcat-seltext_l = 'Item.' .

    gwa_fieldcat-seltext_m = 'Item' .

    gwa_fieldcat-seltext_s = 'Item' .

    APPEND gwa_fieldcat TO git_fieldcat .

    gwa_fieldcat-col_pos = 2.

    gwa_fieldcat-fieldname = 'VKORG'.

    gwa_fieldcat-tabname = 'IT_FINAL'.

    gwa_fieldcat-outputlen = 14.

    gwa_fieldcat-seltext_l = 'Sales Org' .

    gwa_fieldcat-seltext_m = 'Sales Org' .

    gwa_fieldcat-seltext_s = 'Sales Org' .

    APPEND gwa_fieldcat TO git_fieldcat .

    gwa_fieldcat-col_pos = 3.

    gwa_fieldcat-fieldname = 'VTWEG'.

    gwa_fieldcat-tabname = 'IT_FINAL'.

    gwa_fieldcat-outputlen = 14.

    gwa_fieldcat-seltext_l = 'Dist. Ch.' .

    gwa_fieldcat-seltext_m = 'Dist. Ch.' .

    gwa_fieldcat-seltext_s = 'Dist. Ch.' .

    APPEND gwa_fieldcat TO git_fieldcat .

    gwa_fieldcat-col_pos = 4.

    gwa_fieldcat-fieldname = 'MATNR'.

    gwa_fieldcat-tabname = 'IT_FINAL'.

    gwa_fieldcat-outputlen = 18.

    gwa_fieldcat-seltext_l = 'Material' .

    gwa_fieldcat-seltext_m = 'Material' .

    gwa_fieldcat-seltext_s = 'Material' .

    APPEND gwa_fieldcat TO git_fieldcat .

    gwa_fieldcat-col_pos = 5.

    gwa_fieldcat-fieldname = 'NETWR'.

    gwa_fieldcat-tabname = 'IT_FINAL'.

    gwa_fieldcat-outputlen = 14.

    gwa_fieldcat-seltext_l = 'Price' .

    gwa_fieldcat-seltext_m = 'Price' .

    gwa_fieldcat-seltext_s = 'Price' .

    gwa_fieldcat-do_sum = 'X' .

    APPEND gwa_fieldcat TO git_fieldcat .

    ENDFORM . "SUB_FIELDCATALOG

    &----


    *& Form sub_alv_display

    &----


    • text

    ----


    FORM sub_alv_display .

    DATA : gv_repid TYPE sy-repid .

    gv_repid = sy-repid.

    CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'

    EXPORTING

    i_callback_program = gv_repid

    i_callback_user_command = 'USER-COMMAND'

    is_layout = git_layout

    it_fieldcat = git_fieldcat

    i_save = 'A'

    it_events = git_event[]

    TABLES

    t_outtab = it_final

    EXCEPTIONS

    program_error = 1

    OTHERS = 2.

    ENDFORM . "sub_alv_display

    &----


    *& Form

    &----


    • text

    ----


    FORM sub_layout_init CHANGING xyt_layout TYPE slis_layout_alv.

    CLEAR xyt_layout .

    xyt_layout-colwidth_optimize = 'X'.

    xyt_layout-zebra = 'X' .

    ENDFORM. "SUB_LAYOUT_INIT

    &----


    *& Form SUB_BUILD_EVENT

    &----


    • text

    ----


    • -->XT_EVENT text

    ----


    FORM sub_build_event USING xt_event TYPE slis_t_event .

    DATA : lwa_event TYPE slis_alv_event .

    CALL FUNCTION 'REUSE_ALV_EVENTS_GET'

    EXPORTING

    i_list_type = 0

    IMPORTING

    et_events = xt_event

    EXCEPTIONS

    list_type_wrong = 1

    OTHERS = 2.

    READ TABLE xt_event WITH KEY name = slis_ev_top_of_page INTO

    lwa_event.

    lwa_event-form = gc_top_of_page.

    IF sy-subrc EQ 0 .

    MODIFY xt_event FROM lwa_event TRANSPORTING form WHERE name =

    gc_top_of_page.

    ENDIF.

    ENDFORM. "SUB_BUILD_EVENT

    &----


    *& Form TOP_OF_PAGE

    &----


    • text

    ----


    FORM top_of_page .

    CONSTANTS : lc_s TYPE char01 VALUE 'S'.

    DATA : lv_ecfld(250) TYPE c ,

    lwa_header TYPE slis_listheader ,

    lv_date(10) TYPE c,

    lv_user(10) TYPE c,

    lit_alv_header TYPE slis_t_listheader .

    CLEAR : lv_user , lv_date .

    CLEAR : lwa_header .

    lwa_header-typ = 'S'.

    lv_ecfld = 'User'.

    lwa_header-key = lv_ecfld .

    lwa_header-info = sy-uname.

    APPEND lwa_header TO lit_alv_header .

    CLEAR : lwa_header .

    lwa_header-typ = 'S'.

    lv_ecfld = 'Date'.

    lwa_header-key = lv_ecfld .

    lwa_header-info = sy-datum .

    APPEND lwa_header TO lit_alv_header .

    CLEAR : lwa_header .

    lwa_header-typ = 'S'.

    APPEND lwa_header TO lit_alv_header .

    CALL FUNCTION 'REUSE_ALV_COMMENTARY_WRITE'

    EXPORTING

    it_list_commentary = lit_alv_header.

    ENDFORM . "TOP_OF_PAGE

    Regards,

    Nihar Swain .

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Sep 10, 2007 at 07:23 AM

    2811 if gs_out_flags-slave ne 'X'.

    <b>>>>> assign <fm04> to <field>.2813 gs_fc = gs_mfc04.</b>

    2814 else.

    2815 assign <fs04> to <field>.

    2816 gs_fc = gs_sfc04.

    2817 endif.

    In the following piece of code the <fm04> is not assigned - that is becuase of ur program logic itself - ensure this value is correctly populated. or you can out a check like -

    IF <fm04> IS ASSIGNED.
     assign <fm04> to <field>.
    ENDIF.

    This will prevent you from getting a dump.

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.