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: 

Error : CL_GUI_ALV_GRID===============CP Exception : NO_VALID_DOCUMENT

Former Member
0 Kudos
2,779

Hi,

M getting following short dump in Production.

I guess this error is due to some ALV layout or variant changes by the end user in ME55 transaction.

Is nebody aware of this error and the solution for the same ? Ne notes ?

Regards,

Nitin

A RAISE statement in the program "CL_GUI_ALV_GRID===============CP " raised the

exception

condition "NO_VALID_DOCUMENT".

Since the exception was not intercepted by a superior program

in the hierarchy, processing was terminated.

5 REPLIES 5

Former Member
0 Kudos
832

Check with this code

In PBO

DATA : o_alvgrid          TYPE REF TO cl_gui_alv_grid ,
*   For Layout
    PERFORM f9003_layout USING sy-title 'X' 'B' 'X' .
*   To display output
    PERFORM f9004_display_data TABLES i_output
                                      i_fieldcat.

FORM f9003_layout USING  value(ptitle)
                         value(pzebra)
                         value(pmode)
                         value(pwidth).

  wa_layout-grid_title  = ptitle.
  wa_layout-zebra       = pzebra.
  wa_layout-sel_mode    = pmode.
  wa_layout-cwidth_opt  = pwidth.
  wa_variant-report     = sy-repid.
ENDFORM.                    " f9003_layout

FORM f9004_display_data TABLES   p_output
                                 p_fieldcat.
  CALL METHOD o_alvgrid->set_table_for_first_display
    EXPORTING
      is_variant                    = wa_variant
      i_save                        = c_a
      is_layout                     = wa_layout
    CHANGING
      it_outtab                     = p_output[]
      it_fieldcatalog               = p_fieldcat[]
    EXCEPTIONS
      invalid_parameter_combination = 1
      program_error                 = 2
      too_many_lines                = 3
      OTHERS                        = 4.

  IF sy-subrc <> 0.
    MESSAGE i000 WITH 'Error in ALV report display'.
    LEAVE LIST-PROCESSING.
  ENDIF.

If u cant get a solution give me the part of the code where u r facing the problem.

Vinod_Chandran
Active Contributor
0 Kudos
832

Hi Nitin,

When the user try to take the excel view in the ALV, due to the authorisation issue or missing BDS template this error can happen.

Please see the following notes.

828910

316728

714984

Check whether you have the following BDS templates available.

SAP_OM.XLS and SAP_MM.XLS

To check this, pls follow the steps

Click on the 'Change layout' button in the ALV toolbar

Select the tab 'View'

Click on the 'Excel' button

Now on the right side of the screen you could see these templates.

If you cannot find this please look at the note 316728 to copy the templates from client 000.

Thanks

Vinod

Message was edited by: Vinod C

0 Kudos
832

What Trasaction should I use to view the method

Regards,

Nitin

0 Kudos
832

<b>SE24</b>

Goto SE24 > CL_GUI_ALV_GRID > search for set_table_for_first_display

Click parameters by placing the cursor on the method.

0 Kudos
832

this is raised by show_view method of CL_GUI_ALV_GRID

As Vinod has pointed out its a problem of excel view.

Regards

Raja