Skip to Content

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

Lost leading zeros of material in spool but getting in ALV output

Hi ,

I am trying to run a report in background, In spool I dont have leading zeros of material

When I run report in foreground I am getting leading zeros in my alv report.

Could you Please help me out.

Thank in advance

replied

Hi,

do the changes

1. for the field values truncated

wa_fieldcat-no_convext = 'X'.

2.in

       i_grid_settings = lwa_grid

      is_layout       = lwa_layout


*Optimize column width in the layout
  lwa_layout-colwidth_optimize = 'X'.

*Do not optimize column width for printing
  lwa_grid-no_colwopt = 'X'.

  CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
    EXPORTING
      i_grid_settings = lwa_grid
      is_layout       = lwa_layout
      it_fieldcat     = gt_fieldcat
    TABLES
      t_outtab        = gt_out
    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.

0 View this answer in context
Not what you were looking for? View more on this topic or Ask a question