07-27-2007 4:19 PM
Hello everyone:
I have a program that uses "REUSE_ALV_GRID_DISPLAY" and it displaying data in different format in ECC6.0. Let me explain what is going on:
I am creating ALV report from org. structure and here is the format
shortdesc, orgunit, cheifnum, cheifname, shortdesc, orgunit, cheifnum, cheifname.
I get the format above on older version 4.6C but in newer version ECC6.0 I get the format below:
shortdesc,shortdesc,orgunit, cheifnum, cheifname,orgunit, cheifnum, cheifname
I am not getting the desired column grouping. Here is how ALV was called from my code:
===
CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
EXPORTING
i_callback_program = g_repid
i_callback_user_command = 'PROCESS_USER_COMMANDS'
i_structure_name = ' '
is_layout = gs_layout
it_fieldcat = gt_fieldcat[]
it_sort = gt_sort[]
i_default = 'X'
it_events = i_events[]
TABLES
t_outtab = <fs_table>
EXCEPTIONS
program_error = 1
OTHERS = 2.
============
Could somone please help me how to resolve this? Did anyone had similar issue? Rewards assured.
Thanks.
Mithun
07-27-2007 4:22 PM
HI ,
Try giving the explicit column positions in the field catalog as required..
it_fieldcat-col_pos = 1 . for fiirstfield and so on
Thanks
mahesh
07-27-2007 4:22 PM
HI ,
Try giving the explicit column positions in the field catalog as required..
it_fieldcat-col_pos = 1 . for fiirstfield and so on
Thanks
mahesh
07-27-2007 4:23 PM
Hi Mithun,
Can you show how have you coded for populating the fieldcatalog information?
You can fix the position of the columns by specifying the serial number for col_pos attribute of the fielcatalog.
Regards,
Ravi
07-27-2007 4:23 PM
Hi,
Check the defualt layout for ALV in 4.6c and ECC6 . if not same then change the default layout in ECC6 and save.
aRs
07-27-2007 4:34 PM
Thanks everyone for such a quick reply. I did not write this program but I am trying to fix this issue! REUSE_ALV_GRID_DISPLAY is completely changed in ECC6.0!
gt_fieldcat has been populated as shown below and the some values are passed into itab_name etc..
==================
gt_fieldcat-tabname = itab_name.
gt_fieldcat-fieldname = field_name.
gt_fieldcat-seltext_l = field_head.
gt_fieldcat-ref_tabname = ref_table.
gt_fieldcat-ref_fieldname = ref_field.
gt_fieldcat-key = key_field.
gt_fieldcat-do_sum = sum_field.
if length > 0.
gt_fieldcat-ddic_outputlen = length.
endif.
translate: gt_fieldcat-tabname to upper case,
gt_fieldcat-fieldname to upper case,
gt_fieldcat-ref_tabname to upper case,
gt_fieldcat-ref_fieldname to upper case.
append gt_fieldcat.
======================
There is not of field symbols, dynamic tables etc have been used and I still new to ABAP..I can send the whole code but it is too much!! Please let me know what else I can provide.
Thanks
Mithun
07-27-2007 4:45 PM
07-27-2007 4:44 PM
Mithun,
I got this problem during upgrade. While upgrading some of REUSE grid layouts are not copied properly. So we done is run the ALV grid report and arrange the fields according to your order and select the change layout button and save layout as default.
aRs
07-27-2007 5:30 PM
Can you pl check the building part of gt_fieldcat[] and see the first colum(i.e shortdesc) is cleared after appending to the parameter.
07-27-2007 6:14 PM
Thanks everyone. Setting col_pos value took care of the issue. I wonder why it works fine in 4.6C and not in ECC6.0! I rewarded max points to the first reply and everyone points options is greyed out! I hope everyone is rewarded.
Thanks.Mithun