Skip to Content

Archived discussions are read-only. Learn more about SAP Q&A

ALV short dump while clicking the hotspot

Hi all,

I get a short dump when I click on hotspot of an ALV report. I should goto me23n when I click on PO no. This is the short dump report.

Assignment error: Overwriting a protected field.

Error analysis

The program tried to assign a new value to a field even though

it is protected against changes.

The following objects are protected:

- Character or numeric literals,

- Constants (CONSTANTS),

- Function module and method parameters with the type IMPORTING

REFERENCE,

- Untyped field symbols to which a field has not yet been assigned

using ASSIGN,

- TABLES parameters, if the corresponding actual parameter is protected

against changes,

- USING reference parameters and CHANGING parameters in FORMS, if the

actual parameter is protected against changes,

- Field symbols, if the field assigned using ASSIGN is protected against

changes,

- External write access to attributes with the READ-ONLY property.

**********************************************************

How to correct the error

The field you want to overwrite is a parameter or a field symbol:

Declare the parameter as a VALUE parameter or pass an auxiliary field

to which you assigned the value from the constant before the call.

Alternatively, you can assign the auxiliary field to the field symbol

instead of the constant.

If the error occurred in one of your own programs or in an SAP program

that you modified, try to correct it yourself.

If the error occurred in a non-modified SAP program, you may be

able to find a solution in the SAP note system.

If you have access to the note system yourself, use the following

search criteria:

"MOVE_TO_LIT_NOTALLOWED_NODATA"

"SAPLSLVC_FULLSCREEN " or "LSLVC_FULLSCREENF02 "

"MARKS_SAVE"

Source code extract: Short dump occurs at

<l_box> = ' ' in the below code of ALV standard code.

else.

describe table lt_rows lines l_sel_lines.

describe table t_outtab lines l_tab_lines.

if l_sel_lines = 0.

l_ucomm = '&SAL'.

endif.

if l_sel_lines = l_tab_lines.

l_ucomm = '&ALL'.

endif.

endif.

  • set/unset <box> of all items

if l_ucomm eq '&SAL' or l_ucomm eq '&ALL'.

if l_ucomm eq '&SAL'.

loop at t_outtab.

l_tabix = l_tabix + 1.

<l_box> = ' '.

modify t_outtab index l_tabix.

endloop.

endif.

if l_ucomm eq '&ALL'.

loop at t_outtab.

l_tabix = l_tabix + 1.

<l_box> = 'X'.

modify t_outtab index l_tabix.

endloop.

endif.

else.

***************************************************

*******************************************************

These are the parameters I used in ALV FM

gd_repid = sy-repid.

gd_layout-box_fieldname = 'SELKZ'.

gd_layout-key_hotspot = 'X'.

MOVE 'X' TO GD_layout-zebra.

CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'

EXPORTING

  • i_callback_program = gd_repid

i_callback_program = 'ZIMRR00130_INTRANSIT_GL_REPORT'

i_callback_user_command = 'USER_COMMAND'

  • i_callback_top_of_page = 'TOP-OF-PAGE'

  • i_grid_title = outtext

is_layout = gd_layout

it_fieldcat = fieldcatalog[]

  • it_special_groups = gd_tabgroup

  • IT_EVENTS = GT_XEVENTS

i_save = 'U'

  • is_variant = z_template

TABLES

t_outtab = i_intransit

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. "display_alv_report

Can u guys help me.....?

Tags:
Former Member

Helpful Answer

by
Not what you were looking for? View more on this topic or Ask a question