‎2009 Mar 16 2:47 PM
Hello,
I have a problem with the function REUSE_ALV_GRID_DISPLAY.
When click to the button Local File... (CrtlShiftF9) my report give me a run timer error.
Runtime Errors GETWA_NOT_ASSIGNED
Date and Time 16.03.2009 11:43:34
Short text
Field symbol has not yet been assigned.
What happened?
Error in the ABAP Application Program
The current ABAP program "SAPLKKBL" had to be terminated because it has
come across a statement that unfortunately cannot be executed.
Error analysis
You attempted to access an unassigned field symbol
(data segment 75).
This error may occur if
- You address a typed field symbol before it has been set with
ASSIGN
- You address a field symbol that pointed to the line of an
internal table that was deleted
- You address a field symbol that was previously reset using
UNASSIGN or that pointed to a local field that no
longer exists
- You address a global function interface, although the
respective function module is not active - that is, is
not in the list of active calls. The list of active calls
can be taken from this short dump.
Trigger Location of Runtime Error
Program SAPLKKBL
Include LKKBLF99
Row 3.840
Module type (FORM)
Module Name GEN_FIELD_OUT2
Source Code Extract
Line SourceCde
3810 format hotspot on.
3811 elseif gs_fc-hotspot = 'V'
3812 and gs_out_flags-hotline is initial and not <field> is initial
3813 and gt_stack-is_layout-no_hotspot is initial.
3814 format hotspot on.
3815 endif.
3816 *>>> new API
3817 perform salv_set_cell_hotspot using l_celltype.
3818 *<<< new API
3819 if gs_fc-input = 'X' and
3820 gt_stack-is_layout-no_input is initial and
3821 gs_fc-checkbox is initial.
3822 format input on.
3823 format intensified off.
3824 endif.
3825 if not gs_fc-emphasize is initial and gs_out-info is initial.
3826 perform field_color_normal using gs_fc
3827 * gt_stack-is_layout
3828 gs_out-info.
3829 endif.
3830
3831 * complex logic with internal table for color description
3832 data: lr_tabledescr type ref to cl_abap_tabledescr,
3833 ls_lvc_color type lvc_s_scol,
3834 lt_kkbl_color type kkblo_t_specialcol,
3835 ls_kkbl_color type kkblo_specialcol.
3836
3837 if gs_out_flags-mcoltab = 'X' and gs_out_flags-slave ne 'X' and
3838 gs_out_flags-sum ne 'X'.
3839 lr_tabledescr ?= cl_abap_typedescr=>describe_by_name( 'LVC_T_SCOL' ).
>>>>> if lr_tabledescr->applies_to_data( <coltab_any> ) eq 'X'.
3841 loop at <coltab_lvc> into ls_lvc_color.
3842 move-corresponding ls_lvc_color to ls_kkbl_color.
3843 ls_kkbl_color-fieldname = ls_lvc_color-fname.
3844 append ls_kkbl_color to lt_kkbl_color.
3845 endloop.
3846 assign lt_kkbl_color to <coltab>.
3847 endif.
3848 perform field_color_complex using <coltab>
3849 gs_fc
3850 gs_out_flags-color
3851 gs_out_flags-intensified
3852 gs_out_flags-inverse.
3853 elseif gs_out_flags-scoltab = 'X' and gs_out_flags-slave = 'X' and
3854 gs_out_flags-sum ne 'X'.
3855 lr_tabledescr ?= cl_abap_typedescr=>describe_by_name( 'LVC_T_SCOL' ).
3856 if lr_tabledescr->applies_to_data( <coltab_any_slave> ) eq 'X'.
3857 loop at <coltab_lvc_slave> into ls_lvc_color.
3858 move-corresponding ls_lvc_color to ls_kkbl_color.
3859 ls_kkbl_color-fieldname = ls_lvc_color-fname.
I verify the internal table it has 315 values export to excel.
How can i solve this problem?
‎2009 Mar 16 3:51 PM
Check the structure of the field catalog .It can be an issue with the fieldcatalog.
Try to download the output from:
SYSTEM>LIST>SAVE LOCAL FILE.
If still it doesn't works:
Just paste the fieldcatalogs codes.
Regards,
Gurpreet
‎2009 Mar 16 3:51 PM
Check the structure of the field catalog .It can be an issue with the fieldcatalog.
Try to download the output from:
SYSTEM>LIST>SAVE LOCAL FILE.
If still it doesn't works:
Just paste the fieldcatalogs codes.
Regards,
Gurpreet
‎2009 Mar 16 4:01 PM
I try to download the output from SYSTEM>LIST>SAVE LOCAL FILE, but it was disable.
here is the report code:
REPORT zfir0021.
TABLES: bsid, yypcl_fiboleto.
TYPE-POOLS: slis.
TYPES: BEGIN OF tp_bsid,
bukrs TYPE bukrs,
kunnr TYPE kunnr,
umsks TYPE umsks,
umskz TYPE umskz,
augdt TYPE augdt,
augbl TYPE augbl,
zuonr TYPE dzuonr,
gjahr TYPE gjahr,
belnr TYPE belnr_d,
buzei TYPE buzei,
END OF tp_bsid.
TYPES: BEGIN OF tp_dd03l,
fieldname TYPE dd03l-fieldname,
position TYPE dd03l-position,
keyflag TYPE dd03l-keyflag,
rollname TYPE dd03l-rollname,
datatype TYPE dd03l-datatype,
END OF tp_dd03l.
+*----
*+
*** Variáveis
+*----
*+
DATA w_catalogo TYPE slis_fieldcat_alv.
DATA w_layout TYPE slis_layout_alv.
DATA t_catalogo TYPE slis_t_fieldcat_alv.
DATA: v_layout TYPE slis_layout_alv,
t_dd03l TYPE STANDARD TABLE OF tp_dd03l WITH HEADER LINE.
DATA t_bsid TYPE STANDARD TABLE OF bsid WITH HEADER LINE.
DATA: t_bsid_aux TYPE STANDARD TABLE OF bsid WITH HEADER LINE,
t_yypcl_fiboleto TYPE STANDARD TABLE OF yypcl_fiboleto WITH HEADER LINE,
t_reg_ok TYPE STANDARD TABLE OF yypcl_fiboleto3 WITH HEADER LINE,
t_reg_err TYPE STANDARD TABLE OF yypcl_fiboleto3 WITH HEADER LINE.
+*----
*+
*** Parâmetros de seleção
+*----
*+
SELECTION-SCREEN BEGIN OF BLOCK bl1 WITH FRAME TITLE text-s02.
SELECT-OPTIONS: s_blart FOR bsid-blart,
s_situa FOR yypcl_fiboleto-situacao,
s_data FOR bsid-budat.
SELECTION-SCREEN END OF BLOCK bl1.
************************************************************************
* Execução do Programa
************************************************************************
START-OF-SELECTION.
PERFORM seleciona_dados.
PERFORM imprime_resultado.
PERFORM catalogo.
PERFORM gerar_alv.
END-OF-SELECTION.
+*&----
*+
*& Form seleciona_dados
+*&----
*+
+* text+
+*----
*+
+* --> p1 text+
+* <-- p2 text+
+*----
*+
+FORM seleciona_dados .+
+* DATA lr_situacao TYPE RANGE OF yypcl_fiboleto-situacao WITH HEADER LINE.+
*
* lr_situacao-sign = 'I'.
* lr_situacao-option = 'EQ'.
* lr_situacao-low = '1'.
* APPEND lr_situacao.
*
* lr_situacao-low = '4'.
* APPEND lr_situacao.
SELECT * INTO TABLE t_bsid
FROM bsid
WHERE bukrs EQ '0050'
AND blart IN s_blart
AND budat IN s_data
AND anfbn <> ''.
SELECT *
INTO TABLE t_yypcl_fiboleto
FROM yypcl_fiboleto
WHERE empresa EQ '0050'
AND dtemissao IN s_data
AND situacao IN s_situa
AND tpdoc IN s_blart.
ENDFORM. " seleciona_dados
+*&----
*+
*& Form imprime_resultado
+*&----
*+
+* text+
+*----
*+
+* --> p1 text+
+* <-- p2 text+
+*----
*+
FORM imprime_resultado.
SORT t_bsid BY bukrs kunnr gjahr belnr buzei.
SORT t_yypcl_fiboleto BY empresa cdcliente gjahr nudoc_cont itdoc_cont.
LOOP AT t_bsid.
READ TABLE t_yypcl_fiboleto WITH KEY empresa = t_bsid-bukrs
cdcliente = t_bsid-kunnr
gjahr = t_bsid-gjahr
nudoc_cont = t_bsid-belnr
itdoc_cont = t_bsid-buzei
BINARY SEARCH.
IF NOT sy-subrc IS INITIAL.
t_bsid_aux = t_bsid.
APPEND t_bsid_aux.
ENDIF.
ENDLOOP.
ENDFORM. " imprime_resultado
+*&----
*+
*& Form catalogo
+*&----
*+
+* text+
+*----
*+
+* --> p1 text+
+* <-- p2 text+
+*----
*+
FORM catalogo.
DATA l_cont TYPE i.
SELECT fieldname position keyflag rollname datatype
INTO TABLE t_dd03l
FROM dd03l
WHERE tabname = 'BSID'
AND rollname <> '.INCLUDE' AND
rollname <> 'MANDT' .
SORT t_dd03l BY position.
LOOP AT t_dd03l.
ADD 1 TO l_cont.
PERFORM insert_catalogo USING:
t_dd03l-fieldname
''
t_dd03l-keyflag
'L'
' '
t_dd03l-datatype
' '
' '
' '
' '
' '
l_cont
'C410'.
ENDLOOP.
ENDFORM. " catalogo
+*&----
*+
*& Form INSERT_CATALOGO
+*&----
*+
FORM insert_catalogo USING f_campo
f_tamanho
f_texto
f_alinhamento
f_somatorio
f_tipo
f_decimais
f_checkbox
f_input
f_hotspot
f_no_out
f_pos
f_cor.
CLEAR w_catalogo.
w_catalogo-col_pos = f_pos.
w_catalogo-fieldname = f_campo.
w_catalogo-key = ' '.
w_catalogo-outputlen = f_tamanho.
w_catalogo-seltext_s = f_texto. " descrição curta
w_catalogo-seltext_m = f_texto. " descrição média
w_catalogo-seltext_l = f_texto. " descrição longa
w_catalogo-just = f_alinhamento.
w_catalogo-do_sum = f_somatorio. " totalizar coluna
w_catalogo-datatype = f_tipo.
w_catalogo-decimals_out = f_decimais.
w_catalogo-checkbox = f_checkbox. " exibir como checkbox
w_catalogo-input = f_input. " modificação permitida
w_catalogo-hotspot = f_hotspot. " chama form USER_COMMAND
w_catalogo-no_out = f_no_out. " Ocultar campo inicialmente
IF w_catalogo-datatype <> 'CHAR'.
w_catalogo-no_zero = 'X'.
ENDIF.
w_catalogo-emphasize = f_cor.
APPEND w_catalogo TO t_catalogo.
ENDFORM. " INSERT_CATALOGO
+*&----
*+
*& Form gerar_alv
+*&----
*+
+* Gera o ALV com as informações da T_YYPCL_FIBOLETO_AUX+
+*----
*+
FORM gerar_alv.
v_layout-colwidth_optimize = 'X'. " Largura melhor possÃvel da coluna
v_layout-no_input = 'X'.
v_layout-info_fieldname = 'COLOR_LINE'.
v_layout-coltab_fieldname = 'CELL_COLOUR'.
v_layout-zebra = 'X'.
CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
EXPORTING
i_callback_program = sy-repid
i_structure_name = 'BSID'
* i_callback_user_command = 'Z_USER_COMMAND'
is_layout = v_layout
it_fieldcat = t_catalogo
i_save = 'A'
TABLES
t_outtab = t_bsid_aux
EXCEPTIONS
program_error = 1
OTHERS = 2.
IF sy-subrc <> 0.
MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
ENDIF.
ENDFORM. " gerar_alv
‎2009 Mar 16 4:35 PM
You are not required to pass all the values to fieldcatlog.
Just pass-->Required fields
COL_POS
Fieldname
Key
DO_SUM "IF required
Try to comment Whole layout onnce and execute the report once.
Also try-->CTRLSHIFTF7
w_catalogo-col_pos = f_pos.
w_catalogo-fieldname = f_campo.
w_catalogo-key = ' '.
*w_catalogo-outputlen = f_tamanho.
*w_catalogo-seltext_s = f_texto. " descrição curta
*w_catalogo-seltext_m = f_texto. " descrição média
*w_catalogo-seltext_l = f_texto. " descrição longa
*w_catalogo-just = f_alinhamento.
w_catalogo-do_sum = f_somatorio. " totalizar coluna
*w_catalogo-datatype = f_tipo.
w_catalogo-decimals_out = f_decimais.
*w_catalogo-checkbox = f_checkbox. " exibir como checkbox
*w_catalogo-input = f_input. " modificação permitida
*w_catalogo-hotspot = f_hotspot. " chama form USER_COMMAND
*w_catalogo-no_out = f_no_out. " Ocultar campo inicialmente
IF w_catalogo-datatype 'CHAR'.
w_catalogo-no_zero = 'X'.
ENDIF.
w_catalogo-emphasize = f_cor.
APPEND w_catalogo TO t_catalogo.
ENDFORM. " INSERT_CATALOGO
*&---------------------------------------------------------------------
**& Form gerar_alv
*&---------------------------------------------------------------------
** Gera o ALV com as informações da T_YYPCL_FIBOLETO_AUX
*----------------------------------------------------------------------
FORM gerar_alv.
*v_layout-colwidth_optimize = 'X'. " Largura melhor possÃvel da coluna
v_layout-no_input = 'X'.
v_layout-info_fieldname = 'COLOR_LINE'.
v_layout-coltab_fieldname = 'CELL_COLOUR'.
v_layout-zebra = 'X'.Regards,
Gurpreet
‎2009 Mar 16 5:00 PM
Hi,
Your Issue us as below
FORM gerar_alv.
v_layout-colwidth_optimize = 'X'. " Largura melhor possÃvel da coluna
v_layout-no_input = 'X'.
v_layout-info_fieldname = 'COLOR_LINE'.
v_layout-coltab_fieldname = 'CELL_COLOUR'. " Why are you sending CELL_COLOR,,,,here we need to send the field name which we want to give the color..CELL_COLOUR is not defined in you output so it is giving dump.. Try comment and check...
v_layout-zebra = 'X'.
CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
EXPORTING
i_callback_program = sy-repid
i_structure_name = 'BSID'
i_callback_user_command = 'Z_USER_COMMAND'
is_layout = v_layout
it_fieldcat = t_catalogo
i_save = 'A'
TABLES
t_outtab = t_bsid_aux
EXCEPTIONS
program_error = 1
OTHERS = 2.
IF sy-subrc 0.
MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
ENDIF.
ENDFORM. " gerar_alv
Hope this helps you
Rj
‎2009 Mar 17 11:36 AM
Hi, thanks for the help.
I coment this
*w_catalogo-seltext_s = f_texto. " descrição curta
*w_catalogo-seltext_m = f_texto. " descrição média
*w_catalogo-seltext_l = f_texto. " descrição longa
and this
*v_layout-info_fieldname = 'COLOR_LINE'.
*v_layout-coltab_fieldname = 'CELL_COLOUR'.
Now i can to export the alv!
thanks!!!