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: 

ALV Display

Former Member
0 Kudos

Hi,

One of the fields in the ALV dispaly contains more than 150 character. But that is not displaying in the output.Is there any way to display that. Plz help.

7 REPLIES 7

Former Member
0 Kudos

When declaring column name try Giving as below

fieldcatalog-seltext_m = "NAME "

upto 150 characters

Former Member
0 Kudos

If you know the max charecter in that field you can populate the filedcatalog for that field as shown

fld_cat-outputlen = 150.
append fld_cat.

0 Kudos

i've given outputlen still it is not displaying

Former Member
0 Kudos

if possible post u r program.

venkat_o
Active Contributor
0 Kudos

Anu, Check the following procedure to set width of ALV. 1. define layout structure.

data:
      w_layout type slis_alv_layout.
2. Build layout structure.
w_layout-COLWIDTH_OPTIMIZE = 'X'.
3. Pass this structure through REUSE_ALV_GRID_DISPLAY or REUSE_ALV_LIST_DISPLAY.
CALL FUNCTION 'REUSE_ALV_LIST_DISPLAY'
   EXPORTING
*   I_INTERFACE_CHECK              = ' '
*   I_BYPASSING_BUFFER             =
*   I_BUFFER_ACTIVE                = ' '
 i_callback_program                =  'ZORAY1234'
**  i_callback_pf_status_set       = 'SET_PF_STATUS'
*   i_callback_user_command        = 'USER_COMMAND'
*   I_STRUCTURE_NAME               =
     is_layout                     = w_layout
     it_fieldcat                    = i_field
*   IT_EXCLUDING                   =
*   IT_SPECIAL_GROUPS              =
*   IT_SORT                        =
*   IT_FILTER                      =
*   IS_SEL_HIDE                    =
*   I_DEFAULT                      = 'X'
*   I_SAVE                         = ' '
*   IS_VARIANT                     =
   it_events                      = i_events
*   IT_EVENT_EXIT                  =
*   IS_PRINT                       =
*   IS_REPREP_ID                   =
*   I_SCREEN_START_COLUMN          = 0
*   I_SCREEN_START_LINE            = 0
*   I_SCREEN_END_COLUMN            = 0
*   I_SCREEN_END_LINE              = 0
* IMPORTING
*   E_EXIT_CAUSED_BY_CALLER        =
*   ES_EXIT_CAUSED_BY_USER         =
    TABLES
      t_outtab                       = i_mard
* 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.
I hope that it helps u . Regards, Venkat.O

Former Member
0 Kudos

HI,

Try this.

Fill the field catalog giving the out put length as '150' as shown below.

DATA : it_fldcat TYPE slis_t_fieldcat_alv,

wa_fldcat TYPE slis_fieldcat_alv.

FORM FILL_fldcat .

wa_fldcat-fieldname = 'EXTRA'(036).

wa_fldcat-col_pos = '7'.

wa_fldcat-seltext_m = 'EXTRA'(015).

wa_fldcat-OUTPUTLEN = '150'.

APPEND wa_fldcat TO it_fldcat.

Former Member
0 Kudos

If you set wa_layout-colwidth_optimize = 'X'. in ur prog

comment that and try.

Edited by: bhavana gurajada on Apr 1, 2008 5:49 PM