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

GETWA_NOT_ASSIGNED Dump for OO ALV F4 Calendar

Hi everyone! Please help.

My requirement is to modify a program in such a way that one of its field, will have an F4 value of a calendar or F4_Date. I am using set_table_first_display. The field is already editable.

However, I am encountering this dump GETWA_NOT_ASSIGNED.

Here are the steps that I've done.

1. Declared the following:

ts_g_f4 TYPE lvc_t_f4 WITH HEADER LINE.


2. Field catalog

move: 'X' TO e_g_fieldcat-f4availabl,

'SYST' TO e_g_fieldcat-ref_table,

'DATUM' TO e_g_fieldcat-ref_field.


3. After the call method ob_g_alvgrid->set_table_for_first_display and CALL METHOD ob_g_alvgrid->register_edit_event.


ts_g_f4-fieldname = 'NDAT01'.

ts_g_f4-register = 'X' .

ts_g_f4-getbefore = 'X' .

APPEND ts_g_f4.

CALL METHOD ob_g_alvgrid->register_f4_for_fields

EXPORTING

it_f4 = ts_g_f4[].

SET HANDLER gr_event_handler->on_f4 FOR ob_g_alvgrid.


4. Class definitions


CLASS lcl_event_handler DEFINITION.

PUBLIC SECTION.

METHODS:

on_f4

FOR EVENT onf4 OF cl_gui_alv_grid

IMPORTING e_fieldname

es_row_no

er_event_data

et_bad_cells

e_display.

ENDCLASS.

CLASS lcl_event_handler IMPLEMENTATION.

METHOD on_f4.

PERFORM on_f4_help USING e_fieldname

es_row_no-row_id

er_event_data

et_bad_cells

e_display.

er_event_data->m_event_handled = 'X'.

ENDMETHOD.


5. on_f4 definition


FORM on_f4_help USING p_e_fieldname row_id p_er_event_data TYPE REF TO cl_alv_event_data p_et_bad_cells p_e_display.

DATA:

l_select_date LIKE workflds-gkday,

l_select_week LIKE scal-week.

* pop up calendar.

CALL FUNCTION 'F4_DATE'

EXPORTING

date_for_first_month = sy-datum

IMPORTING

select_date = l_select_date

select_week = l_select_week

EXCEPTIONS

calendar_buffer_not_loadable = 1

date_after_range = 2

date_before_range = 3

date_invalid = 4

factory_calendar_not_found = 5

holiday_calendar_not_found = 6

parameter_conflict = 7

OTHERS = 8.

IF sy-subrc <> 0.

EXIT.

ENDIF.

ENDFORM.


----------------------------------


Question:

1. Why does this result to a dump? I have checked into ST22 and the code that results to an error is sap standard.


>>>> read table <l_field> into ls_style

57 with table key fieldname = is_col_id-fieldname.

This code is from Class CL_GUI_ALV_GRID method IS_READY_FOR_INPUT.

Assumptions:

1. The field NDAT01 is defined in the field catalog.

2. Here is my alv style

MOVE: 'FIELD_STYLE' TO e_g_layout-stylefname,

'X' TO e_g_layout-zebra.

Can you please help on how to resolve this? thanks!

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

1 Answer

  • Best Answer
    author's profile photo Former Member
    Former Member
    Posted on Aug 10, 2016 at 03:57 PM

    Hi Vincent,

    This Dump is coming because field symbol <l_field> is not assigned. I checked the logic where this is being assigned in method S_READY_FOR_INPUT. This assignment is related to "LVC_S_LAYO" .

    You can check by passing the layout in method SET_TABLE_FOR_FIRST_DISPLAY in parameter IS_LAYOUT. Then Dump will not come. Check in debug mode the assignment of field symbols.

    Regards,

    Praphul

    Add a comment
    10|10000 characters needed characters exceeded

    • Former Member

      Hi Praphul,

      You're correct. Actually, I have already solved this. I have debugged this one and it is related to what you said. In the program, the IS_LAYOUT structure contains a variable named stylefname which contains the value 'FIELD_STYLE' - this should be omitted. Once done, I have deleted the class implementation and stick with the field catalog method for f4.

      Anyway, there's another way of doing so if I have to stick with the class f4 implementation. You can handle lvc_t_styl and it would work. For more information, check out program BCALV_TEST_GRID_F4_HELP.

      Once again, thank you!

      Regards,

      veepi

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.