05-26-2006 3:40 PM
Hello,
I developed an ALV report with objects, The report works fine, but when I try to print it, the program dumps, Does any body know how can I fix it?
The excetion thrown is OBJECTS_NOT_CHARLIKE, but its thrown on standard code.
The objects Im using are:
DATA: containter TYPE REF TO cl_gui_custom_container,
grill TYPE REF TO cl_gui_alv_grid.
I create de ALV like this:
CREATE OBJECT container
EXPORTING
container_name = 'CONTAINER'
EXCEPTIONS
cntl_error = 1
cntl_system_error = 2
create_error = 3
lifetime_error = 4
lifetime_dynpro_dynpro_link = 5
OTHERS = 6.
IF sy-subrc <> 0.
MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
ENDIF.
CREATE OBJECT grill
EXPORTING
i_parent = container.
CALL METHOD grilla->set_table_for_first_display
EXPORTING
i_structure_name = 'ZSTRUCTURE'
CHANGING
it_outtab = ti_datos[].
ti_datos is the internal table where de data is.
How can I print this report with out getting dump?
Thanks for your help!!
Gabriel P.
05-26-2006 3:51 PM
Hi,
Every thinks fine but cross check with CALL METHOD grilla->set_table_for_first_display.
<b>cross check for the i_structure_name = 'ZSTRUCTURE'
'ZSTRUCTURE'----
> exists in DDIC structure.
and it_tab have the same structure</b>
otherwise u have to specify
EXPORTING
i_bypassing_buffer = space
i_save = 'A'
is_layout = ls_layout
CHANGING
it_outtab =
it_fieldcatalog =
<b>Very Important</b>.
u can call grilla->set_table_for_first_display. only once hence check
IF grill IS INITIAL.
...ur display logic
endif.
Mark Helpfull answers
Regards
Message was edited by: Manoj Gupta
05-26-2006 3:46 PM
Hi,
try to pass the layout and fieldcat also to the method set_table_for_first_display
CALL METHOD grilla->set_table_for_first_display
EXPORTING
i_structure_name = 'ZSTRUCTURE'
CHANGING
it_outtab = ti_datos[].
since you are not giving any info.
Regards
vijay
05-26-2006 3:49 PM
What kind of fields you have in the ZSTRUCTURE?
Alternatively, you might want to create a field catalog using LVC_FIELDCATALOG_MERGE and then pass the field catalog to the SET_TABLE method.
Regards,
Ravi
NOte :Please mark the helpful answers
05-26-2006 3:51 PM
Hi,
Every thinks fine but cross check with CALL METHOD grilla->set_table_for_first_display.
<b>cross check for the i_structure_name = 'ZSTRUCTURE'
'ZSTRUCTURE'----
> exists in DDIC structure.
and it_tab have the same structure</b>
otherwise u have to specify
EXPORTING
i_bypassing_buffer = space
i_save = 'A'
is_layout = ls_layout
CHANGING
it_outtab =
it_fieldcatalog =
<b>Very Important</b>.
u can call grilla->set_table_for_first_display. only once hence check
IF grill IS INITIAL.
...ur display logic
endif.
Mark Helpfull answers
Regards
Message was edited by: Manoj Gupta
05-26-2006 5:22 PM
Hi
CALL METHOD grilla->set_table_for_first_display
EXPORTING
i_structure_name = 'ZSTRUCTURE'
CHANGING
it_outtab = ti_datos[].
There is no object by name grilla. It should be
CALL METHOD grill->set_table_for_first_display
EXPORTING
i_structure_name = 'ZSTRUCTURE'
CHANGING
it_outtab = ti_datos[].
This is the only problem.