‎2007 Jan 26 8:45 PM
Hello,
I am tring to run my first ALV report and I am getting a dump when I run it. it is dumping at
<b> Program SAPLSLVC
Include LSLVCF36
Row 3,221
Module type (FORM)
Module Name FILL_DATA_TABLE
macro_cell_data_get
<ls_fcat>
<ls_data>
<l_field_value>
ls_lvc_data-value. </b>
I searched the forum for the "macro_cell_data_get" and I found 1 response that gave a response of
<i>field symbol errors in ALV are usually down to fieldcat columns incorrectly defined. Check your internal table fields of the table you pass to the alv FM against the columns defined in the fieldcat</i>
I am not sure what I should be checking. I am looked at the structure that I have created for the ALV and the internal tables and I am not sure what to look for.
any help would be greatly appreciated.
‎2007 Jan 26 8:47 PM
Tim,
Could you please post your method call or FM call to invoke ALV?
Please check if all the entries defined in field catalog exist in your internal table?
‎2007 Jan 26 8:47 PM
Tim,
Could you please post your method call or FM call to invoke ALV?
Please check if all the entries defined in field catalog exist in your internal table?
‎2007 Jan 26 8:54 PM
I hope this is what you are looking for.
FORM create_fieldcatalog USING value(p1_repid) TYPE sy-repid
CHANGING p_it_fieldcat TYPE slis_t_fieldcat_alv.
Local data declarations
DATA: wa_fieldcat TYPE slis_fieldcat_alv.
CONSTANTS: c_l TYPE c VALUE 'L'.
Call the FM to build the required field catalog.
CALL FUNCTION 'REUSE_ALV_FIELDCATALOG_MERGE'
EXPORTING
i_program_name = p1_repid
i_internal_tabname = 'IT_OUTDATA'
i_structure_name = 'zfi_ap_unpln_dlvry_csts_STRUCT'
CHANGING
ct_fieldcat = p_it_fieldcat[]
EXCEPTIONS
inconsistent_interface = 1
program_error = 2
OTHERS = 3.
IF sy-subrc = 0.
LOOP AT p_it_fieldcat INTO wa_fieldcat.
wa_fieldcat-ddictxt = c_l.
Update the fieldcatalog parameters
CASE wa_fieldcat-fieldname.
WHEN 'BUKRS'.
wa_fieldcat-key = c_check.
WHEN OTHERS.
ENDCASE.
MODIFY p_it_fieldcat FROM wa_fieldcat INDEX sy-tabix.
ENDLOOP.
ENDIF.
ENDFORM. " FORM CREATE_FIELDCATALOG
$$----
$$ Form display_report
$$----
FORM display_alv CHANGING p_it_outdata TYPE ty_t_outdata
p_it_fieldcat TYPE slis_t_fieldcat_alv
p_it_alv_sort TYPE ty_t_sort_alv
p1_layout TYPE slis_layout_alv
value(p1_repid) TYPE sy-repid
value(p1_var) TYPE disvariant.
Call the FM to generate the ALV in grid format.
CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
EXPORTING
i_callback_program = p1_repid
i_callback_user_command = 'USER_COMMAND'
i_callback_top_of_page = 'TOP_OF_PAGE'
is_layout = p1_layout
i_structure_name = 'ZFI_AP_UNPLN_DLVRY_CSTS_STRUCT'
it_fieldcat = p_it_fieldcat
it_sort = p_it_alv_sort
i_save = 'A'
is_variant = p1_var
TABLES
t_outtab = p_it_outdata
EXCEPTIONS
program_error = 1
OTHERS = 2.
IF sy-subrc <> 0.
FREE: p_it_outdata.
ENDIF.
ENDFORM. "display_alv
also I checked all of the entries and they seemed to match. I am using the field BELNR which looks like it is a combination of two fields. I am not sure if this is causing my problem or not
‎2007 Jan 26 9:08 PM
Hello,
Could you tell me what is the reason of structure as well as fieldcatalog ??
i_structure_name = 'ZFI_AP_UNPLN_DLVRY_CSTS_STRUCT'
it_fieldcat = p_it_fieldcat
Comment the structure...use the field catalog only..
Hope it works.
Reward Points, If useful.
Kannu.
‎2007 Jan 26 10:47 PM
Hi,
use uppercase letters for the structure name zfi_ap_unpln_dlvry_csts_STRUCT' . Don't use i_internal_tabname = 'IT_OUTDATA' - if you defined TYPES ty_t_outdata TYPE table of ZFI_AP_UNPLN_DLVRY_CSTS then you should not use the parameter i_internal_tabname, also you don't need to specify i_program_name.
'REUSE_ALV_FIELDCATALOG_MERGE' can be used to create the field catalog according to a DDIC structure (i_structure_name) OR an internal table (i_internal_tabname) used in a program (i_program_name). I do not know what it does if you specify both and additionally the structure name mixing uppercase and lowercase letters.
Regards,
Clemens
‎2007 Jan 26 9:11 PM
Hi Timothy,
Check that fields defined in the field catalog routine are in the same order as defined in the structure/internal table being used to pass the ALV function module.
They need to be in the same sequence.
Cheers,
Vikram
Pls reward for helpful replies!!
‎2007 Jan 30 5:10 PM
Hello,
I was finally able to get back to this. I have tried all of the suggestions that you sent me and the problem still exists.
When I started this program, all I did was to highlight the code of an existing program, and paste it into my new program and modified it to perform my task. I did not do anything with variants or layouts or anything else concerning the ALV part of the program , due to the fact that I am not sure what to do. I have found some documentation on ALV that I have to read, I am not sure if my failure to do something within ALV is causing this error or not.
‎2007 Jan 31 8:33 AM
Hi Timothy,
how do you build the field catalog?
what is the structure of the internal table displayed?
Do you use any coloring or row selection?
Regards,
Clemens
‎2007 Jan 31 12:25 PM
Clemens,
the probelm that I was having was that I was using a field BELNR in the structure. I coded this field in the structure which is a combination of two fields. I was selecting the field from the RBKP table which is defined as RE_BELNR which is only one field. The program was getting hung up with the structure in that there was one to many fields.
Thanks for the help
‎2007 Jul 02 12:46 PM
hi Timothy
i am also fcing the same problem while upgrading from 4.6 to ecc6.0
plz tel me if you have found any solution for this problem
what solution u used to rectify this error
plz write me at anit.gautam@gmail.com
thanx in advance
‎2007 Jul 30 11:11 PM
Hi,
Check the definition of the field catalogue. Does it look like this:
g_fieldcat TYPE lvc_t_fcat. You have defined your field catalogue of type
slis_fieldcat_alv. This is causing the short dump.
Best regards,
Kris Chalasani