Skip to Content
author's profile photo Former Member
Former Member

minimize coulman in alv

i have a report in alv. my alv is very basic and i wont to decrease the size of two coulman in my alv . i copy the code from se 83 basic alv grid in the main program. i copy ,pbo ,pai screen 100 ,gui status ,in the pbo i give the name of the structre and changinig i write itab ,my table with fields . i build a structre with all the fields i wont to display . please write my detailed solution becouse i new with alv.

thanks.

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

3 Answers

  • Best Answer
    author's profile photo Former Member
    Former Member
    Posted on Oct 16, 2006 at 09:28 AM

    Hi,

    Declare following :

    DATA: fieldcatalog TYPE slis_t_fieldcat_alv WITH HEADER LINE,

    gd_tab_group TYPE slis_t_sp_group_alv,

    gd_event TYPE slis_t_event,

    gd_layout TYPE slis_layout_alv,

    gd_repid LIKE sy-repid,

    lt_report_header TYPE slis_t_listheader,

    lt_fieldcat TYPE slis_t_fieldcat_alv.

    Write following perform in the right place:

    PERFORM build_fieldcatalog.

    PERFORM alv_output TABLES t_output[].

    FORM build_fieldcatalog.

    *eg,

    fieldcatalog-fieldname = 'MATNR'.

    fieldcatalog-seltext_m = 'Article'.

    fieldcatalog-col_pos = 0.

    fieldcatalog-outputlen = 07."HEREINSTEAD of 18 I PUT 7

    fieldcatalog-emphasize = ' '.

    fieldcatalog-key = 'X'.

    fieldcatalog-no_zero = 'X'.

    APPEND fieldcatalog TO fieldcatalog.

    CLEAR fieldcatalog.

    fieldcatalog-fieldname = 'ZBDESC'.

    fieldcatalog-seltext_m = 'Article Description'.

    fieldcatalog-col_pos = 0.

    fieldcatalog-outputlen = 28.

    fieldcatalog-emphasize = ' '.

    fieldcatalog-key = 'X'.

    fieldcatalog-no_zero = 'X'.

    APPEND fieldcatalog TO fieldcatalog.

    CLEAR fieldcatalog.

    ENDFORM. "build_fieldcatalog.

    FORM alv_output TABLES pi_gi_data LIKE t_output[].

    gd_repid = sy-repid.

    SORT t_output BY matnr .

    pi_gi_data[] = t_output[].

    CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'

    EXPORTING

    i_callback_program = gd_repid

    i_callback_user_command = 'USER_COMMAND'

    is_layout = gd_layout

    it_fieldcat = fieldcatalog[]

    it_events = gd_event

    i_save = 'X'

    TABLES

    t_outtab = pi_gi_data

    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_output

    If helpful pl reward.

    Cheers...

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Oct 16, 2006 at 08:54 AM

    pls check last post in ur previous thread

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Oct 16, 2006 at 08:57 AM

    Hello,

    While builting the fieldcat use <b>outlength = 8 (As per ur requiremnt)</b>

    If useful reward.

    Vasanth

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.