Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

ALV: program error on every function code (pushbutton)

Former Member
0 Kudos
826

Hi out there,

I display an ALV-Grid with following structure:

DATUM	CMST_DATE	DATS	8 Datum
DAYOFWEEK	LANGT	CHAR	20 Name des Tages
COUNTER	GWY_COUNT	CHAR	10 Allgemeiner Zähler

It has about 90 entries and display all data without errors.

Everytime I press

ANY

pushbutton the program aborts with following message:

Meldungsnr. 0K534 Programmfehler

So i searched in SAP coding for this Message and found statements like this (e.g. in method APPLY_SORT of class CL_GUI_ALV_GRID):

*... (1) Check Outtab
  assign mt_outtab->* to <tab1>.
  if not sy-subrc is initial.
    message a534(0k).
  endif.

My coding is really simple. only this

IF g_custom_container IS INITIAL.
*   create container first
    CREATE OBJECT g_custom_container
      EXPORTING
*       this name is used in dynpro
        container_name = g_container.
*   second, create the instance of the grid control
    CREATE OBJECT alv_grid
      EXPORTING
        i_parent = g_custom_container.
    CALL FUNCTION 'LVC_FIELDCATALOG_MERGE'
      EXPORTING
        i_structure_name = 'ZSPRM_OUTPUT_ALV'
      CHANGING
        ct_fieldcat      = lt_fieldcatalog.
    CALL METHOD alv_grid->set_table_for_first_display
      CHANGING
        it_outtab            = lt_alv_output[]
        it_fieldcatalog      = lt_fieldcatalog[].
   ENDIF.

Any suggestions?

Thanks.

1 ACCEPTED SOLUTION

Former Member
0 Kudos
157

Hi,

lt_alv_output[] should be a global internal table declared in the top include and not a local internal table declared inside the subroutine.

Sri

2 REPLIES 2

Former Member
0 Kudos
157

SAP-OSS-Note 865989 is only for an industry solution.

Message was edited by: Peter Gabler

Former Member
0 Kudos
158

Hi,

lt_alv_output[] should be a global internal table declared in the top include and not a local internal table declared inside the subroutine.

Sri