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

ALV Grid - Columns Displays?

Any way to display an ALV grid in different sections?

Meaning, The top half of the report lines up columns differently then the bottom half of the report.

For instance, The first two columns are always the same for all fields, but becuse the rest of the fields are not related to one another in any way the report breaks and displays te columns differently at a certain point in the output of the display?

Thank -You

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 Sep 26, 2006 at 04:11 PM

    In the field catalog give the <b>emphasize</b>.

    For first 2 columns:

    ls_fcat-emphasize = 'C310'.

    For all other columns:

    ls_fcat-emphasize = 'C400'.

    These make the ALV columns in different colors.

    In case if u want to color a particular row or particular cell, do the below things:

    Assign a variable celltab TYPE lvc_t_styl, in the internal table which u dispaly the data.

    In the layout give, wa_layout-stylefname = 'CELLTAB'.

    Modify the final internal table like this sample code:

    DATA : lt_celltab TYPE lvc_t_styl,

    ls_celltab TYPE lvc_s_styl.

    READ TABLE i_final_data INTO wa_final_data INDEX 1.

    ls_celltab-fieldname = 'LNG_TYPES'.

    ls_celltab-style = '00000060'.

    INSERT ls_celltab INTO TABLE lt_celltab.

    CLEAR ls_celltab.

    ls_celltab-fieldname = 'LNG_QUANTITY'.

    ls_celltab-style = '00003060'.

    INSERT ls_celltab INTO TABLE lt_celltab.

    CLEAR ls_celltab.

    ls_celltab-fieldname = 'NG_TYPES'.

    ls_celltab-style = '00000666'.

    INSERT ls_celltab INTO TABLE lt_celltab.

    CLEAR ls_celltab.

    ls_celltab-fieldname = 'NG_QUANTITY'.

    ls_celltab-style = '00000066'.

    INSERT ls_celltab INTO TABLE lt_celltab.

    CLEAR ls_celltab.

    wa_final_data-celltab[] = lt_celltab[].

    MODIFY i_final_data FROM wa_final_data INDEX 1.

    CLEAR: ls_celltab, lt_celltab, wa_final_data.

    Here ls_celltab-style = '00003060' will make that particular cell in different color.

    Regards,

    Prakash.

    Message was edited by: Prakash Ramu

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Sep 26, 2006 at 04:23 PM

    hi,

    Emphasize (highlight columns in color): As name suggests, this field parameter is used to highlight certain field with chosen colors.

    Value set: SPACE, 'X' or 'Cxyz' (x:'1'-'9'; y,z: '0'=off ,'1'=on).

    'X' = column is colored with the default column highlight color.

    'Cxyz' = column is colored with a coded color:

    - C: Color (coding must begin with C)

    - X: color number

    - Y: bold

    - Z: inverse

    Regards,

    Sailaja.

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Sep 26, 2006 at 04:33 PM

    I have an ALV report with 2 different internal tables displayed in 2 separate ALV grids. Is that what you're trying to do? If so, I can share how I got it to work.

    -Beth

    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.