Skip to Content
0
Former Member
Dec 15, 2006 at 02:42 AM

My alv grid display is merged.

34 Views

My ALV out put display ( grid header headings ) is merged ( field heading are compressed ( just 3 to 4 letter are appearing as a heading of each field, other letters are hiding ) - as each time we cannot adjudt the field length in the output ). How can I diaplay the field clearly .

Is it needed to set my output length ?

Below is my coding .

Could you please correct me .

FORM alv_display .

  • Local data

DATA: y_x LIKE boole VALUE 'X'.

DATA: lh_index LIKE lf_fieldcat-col_pos.

  • For variant

DATA: ws_repid LIKE sy-repid,

g_save TYPE c VALUE 'A',

g_exit TYPE c,

g_variant LIKE disvariant,

gx_variant LIKE disvariant.

----


  • For 1st field.( RPT_LOC )

CLEAR lf_fieldcat.

lf_fieldcat-fieldname = 'RPT_LOC'.

lf_fieldcat-tabname = 'GT_ZGXMIT_L'.

lf_fieldcat-ref_tabname = 'ZGXMIT'.

lf_fieldcat-ref_fieldname = 'RPT_LOC'.

lh_index = lh_index + 1.

lf_fieldcat-col_pos = lh_index.

lf_fieldcat-key = y_x.

lf_fieldcat-no_sum = y_x.

APPEND lf_fieldcat TO lt_fieldcat.

  • For 2nd field.( BAL_XMIT )

CLEAR lf_fieldcat.

lf_fieldcat-fieldname = 'BAL_XMIT'.

lf_fieldcat-tabname = 'GT_ZGXMIT_L'.

lf_fieldcat-ref_tabname = 'ZGXMIT'.

lf_fieldcat-ref_fieldname = 'BAL_XMIT'.

lh_index = lh_index + 1.

lf_fieldcat-col_pos = lh_index.

lf_fieldcat-key = y_x.

lf_fieldcat-no_sum = y_x.

APPEND lf_fieldcat TO lt_fieldcat.

4,5,....fields appening

CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'

EXPORTING

i_callback_program = ws_repid

  • I_CALLBACK_PF_STATUS_SET = ' '

i_callback_user_command = 'USER_COMMAND'

  • I_CALLBACK_TOP_OF_PAGE = ' '

  • I_STRUCTURE_NAME =

  • I_BACKGROUND_ID = ' '

  • I_GRID_TITLE =

  • I_GRID_SETTINGS =

IS_LAYOUT = v_alv_layout

it_fieldcat = lt_fieldcat

  • IT_SORT =

  • IT_FILTER =

  • IS_SEL_HIDE =

  • I_DEFAULT = 'X'

i_save = 'A'

  • IS_VARIANT =

it_events = events[]

  • IT_EVENT_EXIT =

  • IS_PRINT =

  • IS_REPREP_ID =

TABLES

t_outtab = gt_zgxmit_l

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. " alv_display