Skip to Content

Archived discussions are read-only. Learn more about SAP Q&A

REUSE_ALV_GRID_DISPLAY - the internal table are different showed table

Hello

I'm using REUSE_ALV_GRID_DISPLAY. The internal table-filed X = 1000. The same field on ALV list is showed as 1000 000.

The field is :

SORTAMOUNT CURR 12 decimal 5

Following the code (i not used particular option):

REFRESH lt_fieldcat.

CLEAR lt_fieldcat.

CALL FUNCTION 'REUSE_ALV_FIELDCATALOG_MERGE'

EXPORTING

i_program_name = 'ZFI_FLASH_FILES'

i_internal_tabname = 'ZFI_FLASH_FILES'

  • i_inclname = sy-repid

i_inclname = 'ZFI_FLASH_FILES'

i_structure_name = 'ZFI_FLASH_FILES'

CHANGING

ct_fieldcat = lt_fieldcat

EXCEPTIONS

OTHERS = 1.

IF sy-subrc NE 0.

REFRESH lt_fieldcat.

CLEAR lt_fieldcat.

ENDIF.

LOOP AT lt_fieldcat INTO ls_slis_fieldcat.

CASE ls_slis_fieldcat-fieldname.

WHEN 'UNITCODE'.

MOVE 'Code IC' TO ls_slis_fieldcat-seltext_s.

WHEN 'ACCCODE'.

MOVE 'Code Account' TO ls_slis_fieldcat-seltext_s.

WHEN 'DIM1CODE'.

MOVE 'Brand-code' TO ls_slis_fieldcat-seltext_s.

WHEN 'DIM2CODE'.

MOVE 'Product-type-code' TO ls_slis_fieldcat-seltext_s.

WHEN 'DIM3CODE'.

MOVE 'Pays FH' TO ls_slis_fieldcat-seltext_s.

WHEN 'CURRCCODE'.

MOVE 'Devise' TO ls_slis_fieldcat-seltext_s.

WHEN 'SORTAMOUNT'.

MOVE 'Cumul' TO ls_slis_fieldcat-seltext_s.

MOVE '5' TO ls_slis_fieldcat-decimals_out. "@6I

ENDCASE.

MODIFY lt_fieldcat FROM ls_slis_fieldcat.

ENDLOOP.

alv_layout-colwidth_optimize = 'X'.

CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'

  • CALL FUNCTION 'REUSE_ALV_LIST_DISPLAY'

EXPORTING

i_callback_program = 'ZFI_FLASH_FILES'

i_grid_title = 'Fichier Flash'

i_structure_name = 'ZFI_FLASH_FILES'

is_layout = alv_layout

  • i_callback_user_command = 'USER_COMM'

it_fieldcat = lt_fieldcat

  • i_default = 'X'

  • i_save = 'A'

  • it_sort = i_sort

i_save = 'A'

is_variant = ls_variant

  • it_events = event_tb

is_print = alv_print

TABLES

t_outtab = t_datatab

EXCEPTIONS

program_error = 1

OTHERS = 2.

Any idea ?

Former Member
Not what you were looking for? View more on this topic or Ask a question