Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

help with "REUSE_ALV_GRID_DISPLAY" in ECC6.0

Former Member
0 Kudos

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

1 ACCEPTED SOLUTION

Former Member
0 Kudos

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

8 REPLIES 8

Former Member
0 Kudos

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

former_member181962
Active Contributor
0 Kudos

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

former_member194669
Active Contributor
0 Kudos

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

Former Member
0 Kudos

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

0 Kudos

just add column positions ..

gt_fieldcat-col_pos = col_pos.

former_member194669
Active Contributor
0 Kudos

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

Former Member
0 Kudos

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.

Former Member
0 Kudos

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