This website is not affiliated with, sponsored by, or approved by SAP AG.

ALV Colums Width

Development (ABAP Development WorkBench, ABAP/4 programming)

Moderators: Snowy, thx4allthefish, YuriT, Gothmog

ALV Colums Width

Postby trippled » Mon Jul 07, 2014 1:20 am

Hi,

This is my first post here and I'm a new comer to ABAP.


I'm having a problem with a report I need to display using the REUSE ALV GRID DISPLAY function module,
for some reason one of the columns is displayed much wider then the others resulting the other table columns to
be at the other side of the screen (the field is char 8 long).

Here is the display form of the program:

Code: Select all
TYPE-POOLS : slis.

  DATA : it_field TYPE slis_t_fieldcat_alv,
         wa_field TYPE slis_fieldcat_alv.


  CALL FUNCTION 'REUSE_ALV_FIELDCATALOG_MERGE'
    EXPORTING
*     I_PROGRAM_NAME         =
*     I_INTERNAL_TABNAME     =
      i_structure_name       = 'ZPP_PLACEMENT_ON_SHAFT'
*     I_CLIENT_NEVER_DISPLAY =
*     I_INCLNAME             =
*     I_BYPASSING_BUFFER     =
*     I_BUFFER_ACTIVE        =
    CHANGING
      ct_fieldcat            = it_field
    EXCEPTIONS
      inconsistent_interface = 1
      program_error          = 2
      OTHERS                 = 3.
  IF sy-subrc <> 0.
* Implement suitable error handling here
  ENDIF.


  CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
    EXPORTING
      it_fieldcat = it_field
    TABLES
      t_outtab    = gt_display.
Last edited by Baz on Mon Jul 07, 2014 10:18 am, edited 1 time in total.
Reason: [CODE] Tags added...
trippled
 
Posts: 1
Joined: Mon Jul 07, 2014 1:06 am

Re: ALV Colums Width

Postby Gothmog » Tue Jul 08, 2014 4:11 am

Hi,
We don't have much information here on the problematic field...
However, have you tried to optimize the columns width of th ALV?
Fill field colwidth_optimize in parameter IS_LAYOUT of REUSE_ALV_GRID_DISPLAY.
68 74 74 70 3a 2f 2f 74 69 6e 79 75 72 6c 2e 63 6f 6d 2f 62 64 6f 37 6d 77 67
Gothmog
 
Posts: 1941
Joined: Wed Sep 12, 2007 4:46 am
Location: Probably not home


Return to ABAP

Who is online

Users browsing this forum: No registered users and 6 guests





loading...


This website is not affiliated with, sponsored by, or approved by SAP AG.