Skip to Content
0
Former Member
Nov 26, 2013 at 04:13 AM

Problem with ALV Interactive report

30 Views

I created a simple report extracting order details and when I click on any row it should select the row if and display the order item details. However on click of the first ALV item it displays 'cx_sy_dyn_call_illegal_form' dump. Could you share your thoughts.

I checked the form name multiple times and I see no issue with it.

Code:

*&---------------------------------------------------------------------*

*& Form GET_DATA

*&---------------------------------------------------------------------*

* text

*----------------------------------------------------------------------*

* --> p1 text

* <-- p2 text

*----------------------------------------------------------------------*

FORM get_data .

SELECT * FROM ekko INTO TABLE it_ekko UP TO 15 ROWS WHERE bstyp = p_bstyp.

ENDFORM. " GET_DATA

*&---------------------------------------------------------------------*

*& Form DISPLAY_DATA

*&---------------------------------------------------------------------*

* text

*----------------------------------------------------------------------*

* --> p1 text

* <-- p2 text

*----------------------------------------------------------------------*

FORM display_data .

CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'

EXPORTING

i_callback_program = sy-cprog

I_CALLBACK_USER_COMMAND = 'validateinput'

I_CALLBACK_TOP_OF_PAGE = 'print_heading'

i_structure_name = 'ekko'

IT_EVENTS = IT_EVENT

TABLES

t_outtab = it_ekko

EXCEPTIONS

program_error = 1

OTHERS = 2

.

IF sy-subrc <> 0.

* Implement suitable error handling here

ENDIF.

ENDFORM. " DISPLAY_DATA

*&---------------------------------------------------------------------*

*& Form FILL_EVENT

*&---------------------------------------------------------------------*

* text

*----------------------------------------------------------------------*

* --> p1 text

* <-- p2 text

*----------------------------------------------------------------------*

FORM fill_event .

CLEAR wa_event.

wa_event-name = 'TOP_OF_PAGE'.

wa_event-form = 'print_heading'.

APPEND wa_event TO it_event.

CLEAR wa_event.

wa_event-name = 'USER_COMMAND'.

wa_event-form = 'validateinput'.

APPEND wa_event TO it_event.

ENDFORM. " FILL_EVENT

*&---------------------------------------------------------------------*

*& Form print_heading

*&---------------------------------------------------------------------*

* text

*----------------------------------------------------------------------*

FORM print_heading.

clear wa_header.

wa_header-typ = 'H'.

wa_header-info = 'Purchase Orders List'.

append wa_header to it_header.

*DATA IT_LIST_COMMENTARY TYPE SLIS_T_LISTHEADER.

CALL FUNCTION 'REUSE_ALV_COMMENTARY_WRITE'

EXPORTING

it_list_commentary = it_header

I_LOGO = 'NAV'

* I_END_OF_LIST_GRID = I_END_OF_LIST_GRID

* I_ALV_FORM = I_ALV_FORM

.

ENDFORM. "print_heading

form validateinput using ucomm type sy-ucomm sel type slis_selfield.

case ucomm.

when '&IC1'.

read table it_ekko into wa_ekko index sel-tabindex.

select * from ekpo into table it_ekpo where ebeln = wa_ekko-ebeln.

CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'

EXPORTING

i_callback_program = sy-cprog

I_CALLBACK_USER_COMMAND = 'validateinput'

I_CALLBACK_TOP_OF_PAGE = 'print_heading'

i_structure_name = 'ekpo'

TABLES

t_outtab = it_ekpo

EXCEPTIONS

program_error = 1

OTHERS = 2

.

IF sy-subrc <> 0.

* Implement suitable error handling here

ENDIF.

ENDCASE.

ENDFORM.