Skip to Content
0
Former Member
Dec 10, 2009 at 11:26 AM

Problem with Export to Excel from ALV view.

250 Views

Hello @all,

i have a problem on my webdynpro application. I use the component SALV_WD_TABLE. I become display my data but when i want to export the table to ecel, i became a short dump with the message in the browser: Access via 'NULL' object reference not possible.

When i look at ST22. The system show this text.

What happened?

Error in the ABAP Application Program

The current ABAP program "CL_SALV_WD_A_MODEL_TABLE======CP" had to be

terminated because it has

come across a statement that unfortunately cannot be executed.

Error analysis

An exception occurred that is explained in detail below.

The exception, which is assigned to class 'CX_SY_REF_IS_INITIAL', was no

caught in

procedure "IF_SALV_BS_MODEL_COLUMN~GET_HEADER_BIND_DDIC_FIELD" "(METHOD)

was it propagated by a RAISING clause.

Since the caller of the procedure could not have anticipated that the

exception would occur, the current program is terminated.

The reason for the exception is:

You attempted to use a 'NULL' object reference (points to 'nothing')

access a component (variable: "LR_HEADER").

An object reference must point to an object (an instance of a class)

before it can be used to access components.

Either the reference was never set or it was set to 'NULL' using the

CLEAR statement.

How to correct the error

If the error occures in a non-modified SAP program, you may be able to

find an interim solution in an SAP Note.

If you have access to SAP Notes, carry out a search with the following

keywords:

"OBJECTS_OBJREF_NOT_ASSIGNED" "CX_SY_REF_IS_INITIAL"

"CL_SALV_WD_A_MODEL_TABLE======CP" or "CL_SALV_WD_A_MODEL_TABLE======CM0

"IF_SALV_BS_MODEL_COLUMN~GET_HEADER_BIND_DDIC_FIELD"

If you cannot solve the problem yourself and want to send an error

notification to SAP, include the following information:

1. The description of the current problem (short dump)

To save the description, choose "System->List->Save->Local File

(Unconverted)".

2. Corresponding system log

Display the system log by calling transaction SM21.

Restrict the time interval to 10 minutes before and five minutes

after the short dump. Then choose "System->List->Save->Local File

(Unconverted)".

3. If the problem occurs in a problem of your own or a modified SAP

program: The source code of the program

In the editor, choose "Utilities->More

Utilities->Upload/Download->Download".

4. Details about the conditions under which the error occurred or which

actions and input led to the error.

The exception must either be prevented, caught within proedure

"IF_SALV_BS_MODEL_COLUMN~GET_HEADER_BIND_DDIC_FIELD" "(METHOD)", or its

possible occurrence must be declared in the

RAISING clause of the procedure.

To prevent the exception, note the following:

Information on where terminated

Termination occurred in the ABAP program "CL_SALV_WD_A_MODEL_TABLE======CP" -

in "IF_SALV_BS_MODEL_COLUMN~GET_HEADER_BIND_DDIC_FIELD".

The main program was "SAPMHTTP ".

In the source code you have the termination point in line 19

of the (Include) program "CL_SALV_WD_A_MODEL_TABLE======CM030".

The termination is caused because exception "CX_SY_REF_IS_INITIAL" occurred in

procedure "IF_SALV_BS_MODEL_COLUMN~GET_HEADER_BIND_DDIC_FIELD" "(METHOD)", but

it was neither handled locally nor declared

in the RAISING clause of its signature.

The procedure is in program "CL_SALV_WD_A_MODEL_TABLE======CP "; its source

code begins in line

1 of the (Include program "CL_SALV_WD_A_MODEL_TABLE======CM030 ".

Source Code Extract

Line SourceCde

1 method if_salv_bs_model_column~get_header_bind_ddic_field.

2

3 data:

4 ls_column type if_salv_bs_model_columns=>s_type_column.

5

6 ls_column = me->if_salv_bs_model_columns~get_column( column ).

7

8 *... get column

9 data:

10 lr_column type ref to cl_salv_wd_column.

11

12 lr_column ?= ls_column-r_column.

13

14 data:

15 lr_header type ref to cl_salv_wd_column_header.

16

17 lr_header = lr_column->get_header( ).

18

>>>>> value = lr_header->get_ddic_binding_field( ).

20

21 endmethod.

i hope anybody can help me.

Regards

Chris