Sub-columns in alv grid

Hi SAP Friends,
      I need some help from u...I have an requirement of ALV grid report. It was already there byt now i have to divide one column in to twosub columns as folows
          Total
A in USD | B in INR
   plz help me in the above ..

check this thread, check the sample code in my post
Re: multiple headers in ALV.

Similar Messages

  • How to Display Sub-Columns using ALV Grid

    Hi ,
      Could someone tell me how to display sub-columns under a parent column using ALV Grid. Do we have any standard Program which has this scenario. Please let me know.
    Thanks,
    Abaper.
    Message was edited by:
            ABAP'er

    you can check all with <b>BCALV* or RSDEMO*</b> in SE38 for all Std
    check below
    BCALV_DND_01                   Drag ALV Row to Tree Folder
    BCALV_DND_02                   Drag Icons from Tree to Rows of the Grid
    BCALV_GRID_DND_TREE            ALV Grid: Drag and Drop with ALV Tree
    BCALV_GRID_DND_TREE_SIMPLE     ALV GRID: Drag and drop with ALV tree (simple)
    BCALV_TEST_COLUMN_TREE         Program BCALV_TEST_COLUMN_TREE
    Rewards if useful............
    Minal

  • Sub columns in alv grid display

    hi everyone,
        can anyone tell me the way in which we can include sub-column headings in alv grid display. i.e., for example as shown below.
        column1             column2              column3 
    scol1   scol2         scol3   scol4        scol5   scol6........................
    thanks in advance. Here we are generating the column headings by using fm field catalog merge.
    regards,
    rajsekhar.k

    check this thread, check the sample code in my post
    Re: multiple headers in ALV.

  • Maximum number of character we can print in a column uing ALV grid display

    Hi frnds,
    My requirment is to print 500 charcter data in a column using ALV grid display.
    Could any body tell me is it possible and the maximum character it can i print in a column using ALV grid dispaly.
    Regards,
    Sandipan

    Hi Sandipan,
    refer notes 857823, 910300 and 959775. All these say there is a limitation of 128 characters.
    857823 - ALV grid: Strings with a maximum of 128 characters
    Symptom
    Entries in cells of the type CHAR or string are truncated after 128
    characters in the SAP GUI.
    also refer,
    ALV Grid Control (cl_gui_alv_grid), function module (Full-screen) Grid
    (Reuse_alv_grid_display, SAPLSLVC_FULLSCREEN), SAPGUI, back end, front end
    Cause and Prerequisites
    The data table that is sent to the front end only allows character values
    with the length 128.
    Solution
    This is the standard system behavior and cannot be changed.

  • Hide a Column in ALV Grid Output

    Hi,
    I want to hide a column in ALV Grid Output through program.
    I am using   lwa_fieldcat-NO_OUT = 'X'. to hide the column in output but it is not working, column in not hided in the output.
    Kindly suggest.

    It should work..
    see the code :
    d_fieldcat_wa-fieldname = 'MATNR'.
    d_fieldcat_wa-seltext_l = 'material number'.
    d_fieldcat_wa-no_out = 'X'. * hide particular field
    append d_fieldcat_wa to d_fieldcat.
    clear d_fieldcat_wa.
    if not please paste your code here.
    Thanks
    Seshu

  • Want to display more than 300 charcters in a column using ALV grid display

    Hi Guru's,
    I am trying to display more than 500 charcters in a column using alv grid display but it in the output it is showing only 128 characters. Can you help me to display all the characters in particular column Or is there any limitation in maximum of no of charcters for a column?
    Thanks,
    Radha.

    Hi Paurl,
    Define a work area say
    wa_layout type slis_layout_alv.
    then fill this work area as
    wa_layout-zebra = X
    wa_layout-colwidth_optimize = X.
    wa_layout-max_linesize = 300.
    Then in FM 'REUSE_ALV_GRID_DISPLAY'
    EXPORTING
    is_layout = wa_layout
    etc.
    you provided this for the field which is displayed in alv grid will have more than 128 characters.
    from this code i want,how it refers to particular field.
    when i mentioned field catalog-OUTPUTLEN = '300'.
    it is not displayed the field morethan 128 characters.
    it only displays 128 characters.
    please provide me clear and breif information with suitable code.
    i am trying what your sending but it is not displayed more than 128 characters.
    if you don't mind please spend for me some time for this and
    give me clear and breif information with suitable code.
    Thanks & Regards,
    Radhakrishna.

  • How to insert the checkbox as a separate column  in alv grid display

    Hi
    How to insert the checkboxes as a separate column  in alv grid display with using the reuse_alv_fieldcatlog_mege.
    example
    matnr    maktx  ersda                 checkbox
    10        books  28/03/2009          checkbox
    Thanks
    chinnu

    Hi,
        Check the following code.
    TYPE-POOLS: slis.
    TYPES:
          BEGIN OF ty_output,
          chk TYPE c,
          number TYPE i,
          name(20) TYPE c,
          END OF ty_output.
    DATA: gt_output TYPE STANDARD TABLE OF ty_output,
          gs_output TYPE ty_output.
    DATA: wa_layout           TYPE slis_layout_alv.
    DATA: it_fieldcatalog TYPE slis_t_fieldcat_alv,
    After you populate the data, build the field catlog like shown below.
    wa_fieldcatalog TYPE slis_fieldcat_alv.
    wa_fieldcatalog-fieldname = 'CHK'.
      wa_fieldcatalog-outputlen = '3'.
      wa_fieldcatalog-col_pos = '1'.
      wa_fieldcatalog-seltext_m   = 'CHK'.
      wa_fieldcatalog-checkbox = 'X'.
      wa_fieldcatalog-edit = 'X'.
      APPEND  wa_fieldcatalog TO it_fieldcatalog.
    wa_fieldcatalog-fieldname = 'NUMBER'.
      wa_fieldcatalog-outputlen = '10'.
      wa_fieldcatalog-col_pos = '2'.
      wa_fieldcatalog-seltext_m   = 'NUMBER'.
      APPEND  wa_fieldcatalog TO it_fieldcatalog.
      CLEAR  wa_fieldcatalog.
      wa_fieldcatalog-fieldname = 'NAME'.
      wa_fieldcatalog-outputlen = '10'.
      wa_fieldcatalog-col_pos = '3'.
      wa_fieldcatalog-seltext_m   = 'NAME'.
      APPEND  wa_fieldcatalog TO it_fieldcatalog.
      CLEAR  wa_fieldcatalog.
      wa_layout-box_fieldname     = 'CHK' .
      wa_layout-box_tabname       = 'GT_OUTPUT' .
    Now call the FM
      CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
        EXPORTING
    *   I_INTERFACE_CHECK                 = ' '
    *   I_BYPASSING_BUFFER                = ' '
    *   I_BUFFER_ACTIVE                   = ' '
          i_callback_program                = sy-repid
          i_callback_pf_status_set          = 'PF_STATUS'
          i_callback_user_command           = 'USER_COMMAND_GRID'
    *   I_CALLBACK_TOP_OF_PAGE            = ' '
    *   I_CALLBACK_HTML_TOP_OF_PAGE       = ' '
    *   I_CALLBACK_HTML_END_OF_LIST       = ' '
    *   I_STRUCTURE_NAME                  =
    *   I_BACKGROUND_ID                   = ' '
    *   I_GRID_TITLE                      =
    *   I_GRID_SETTINGS                   =
          is_layout                         = wa_layout
          it_fieldcat                       = it_fieldcatalog
    *   IT_EXCLUDING                      =
    *   IT_SPECIAL_GROUPS                 =
    *   IT_SORT                           =
    *   IT_FILTER                         =
    *   IS_SEL_HIDE                       =
    *   I_DEFAULT                         = 'X'
    *   I_SAVE                            = ' '
    *   IS_VARIANT                        =
    *   IT_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
    *   IT_ALV_GRAPHICS                   =
    *   IT_HYPERLINK                      =
    *   IT_ADD_FIELDCAT                   =
    *   IT_EXCEPT_QINFO                   =
    *   I_HTML_HEIGHT_TOP                 =
    *   I_HTML_HEIGHT_END                 =
    * IMPORTING
    *   E_EXIT_CAUSED_BY_CALLER           =
    *   ES_EXIT_CAUSED_BY_USER            =
        TABLES
          t_outtab                          = gt_output
    * 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.

  • Sub headings in ALV Grid

    Hi,
    How to display sub headings in alv grid
    output format should be:
    <COL_HEADING1>                      <COL_HEADING2>
    <SUB_HEADING1> <SUB_HEADING2> <SUB_HEADING1><SUB_HEADING2>
    and i want separate templet with side headings?
    could you tell me grid supports this?
    thanks in advance
    cheers
    srini

    Hi Srinivas,
    Look ALV grid Multiple Header ... ? which has got a slightly more comprehensive information
    Regards,
    Anand Mandalika.

  • Hide column in alv grid

    Hi Everyone,
    I would like to know how to hide a column in alv grid. Is there any specific field to set in the field catalog.
    Thanks in advance,
    Prabs.

    Hello friends,
    I am using the following lines of code, but invisible of my column ( message ) is not working, would be nice if some one can give me any tip.
    Field-symbols: <lfs_fieldcat> TYPE lvc_s_fcat.
      LOOP AT pt_fieldcat ASSIGNING <lfs_fieldcat>.
        CASE <lfs_fieldcat>-fieldname.
          WHEN 'DUMMY'.
            <lfs_fieldcat>-coltext = 'Message'.
            <lfs_fieldcat>-no_out = 'X'.
        ENDCASE.
      ENDLOOP.
    I have also set the field catalog to no_out = 'X'.
    PS: Do I need to append the field catalog to internal table ??
    I am using the function
    CALL METHOD lalv->SET_TABLE_FOR_FIRST_DISPLAY
             EXPORTING I_STRUCTURE_NAME =  'abc'
                       IS_LAYOUT        = ps_layout
             CHANGING  IT_OUTTAB        = xyz.
    Do I have to implicit set the field catalog in ps_layout ??

  • Disable re-order columns in ALV Grid

    Hi,
    I want to disable the option of move/re-order of columns in ALV grid.
    Ex: My grid is displaying 5 fields in the order F1, F2, F3, F4 & F5. I can move the columns by dragging then on their header so I can change the fields order to F2, F3, F1, F4 & F5. I want to disable this option of re-arranging the columns in the ALV grid.
    Its not related FIX_COLUMN in field catalog.
    Thanks & Regards,
    Adithya M.

    Hi Hima,
    FIX_COLUMN is is used to fix the respective columns from moving when horizontal scroll bar is moved.
    I want to disable re-arranging of columns, i.e, after displaying the grid the user should not be able to re-arrange/drag the column from one position to other.
    Thanks & Regards,
    Adithya M

  • How to hide selection column from alv grid

    hi
    i want to hide selection columns form alv grid.. how can i do it.. Is there any fm for that?
    regards
    palak

    Hi,
    the ALV Grid Control allows you to directly hide key columns with NO_OUT (field KEY_SEL is not used).
    Field name:NO_OUT
    Comp. type:LVC_NOOUT
    Dtype(length):Char(1)
    SPACE, 'X'
    If you set this field, you hide the relevant column in the list. Nevertheless, the column is available in the field selection and can be interactively selected by the user as a display field. The ALV displays the contents of hidden fields on the detail screen for a row in the grid control.
    Regards,
    Neenu.
    Edited by: Neenu Jose on Oct 21, 2008 10:46 AM

  • Mix AVG and Total for the same column in ALV grid

    Hi,
    We are using CL_GUI_ALV_GRID=>SET_TABLE_FOR_FIRST_DISPLAY, and I'd like to know if the following situation is possible.
    Let's say we have a column which contains a number of hours, and we set it up to subtotal by period, but as an average rather than a total (DO_SUM = "C"). This is not a problem so far.
    The problem is that we'd like for the "Grand Total" at the bottom of the ALV grid to total all of the subtotal averages, instead of calculating an average.
    Ex:
    Period            Hours
    2010/01           6.0
    2010/02           7.0
    2010/03           2.0
                    5.0  (This is an average... 6.0 + 7.0 + 2.0 / 3)
    2011/01          12.0
    2011/02           5.0
    2011/03           4.0
                    7.0  (This is an average... 12.0 + 5.0 + 4.0 / 3)
                12.0 (We want this to be a total of 5.0 + 7.0)
    So we want the "grand total" line to be 12.0 which is the sum, but it currently comes out as an average.
    Therefore we're looking to average at the sub total level, but we want a total of the subtotal levels at the grand total level for the same column.
    Thanks,
    Denis

    Refer to the suggestion given by Naimesh here Can we modify a sub-total in ALV making use of function GET_GLOBALS_FROM_SLVC_FULLSCR and the method GET_SUBTOTALS. You can see the parameter ep_collect01 refered in case of subtotals. Can you please check ep_collect00 for grand total in your case.
    As said about EP_COLLECT00,here goes a classic example Modify grand total in ALV GRID
    BR
    Keshav
    Edited by: Keshav.T on Sep 21, 2011 9:39 AM

  • How to Display Sub-Columns using ALV

    Hi experts,
        Could someone tell me how to display sub-columns under a parent column using ALV. Do we have any standard Program which has this scenario. points are guaranteed for the right answer.
    Thanks in advance
    Sreenivas

    you can check all with <b>BCALV* or RSDEMO*</b> in SE38 for all Std
    check below
    BCALV_DND_01                   Drag ALV Row to Tree Folder
    BCALV_DND_02                   Drag Icons from Tree to Rows of the Grid
    BCALV_GRID_DND_TREE            ALV Grid: Drag and Drop with ALV Tree
    BCALV_GRID_DND_TREE_SIMPLE     ALV GRID: Drag and drop with ALV tree (simple)
    BCALV_TEST_COLUMN_TREE         Program BCALV_TEST_COLUMN_TREE
    Rewards if useful............
    Minal

  • Display one or more rows for a particular column in alv grid display

    Hi,
    My requirement in the report is to display users for a particular workitem id.If a workitem is in the inbox of one or more users(approvers) i have to display all the user names in one field in alv grid output (output-approver id).There are other fields which display details of the workitem also.
    Is there a way to populate multiple rows for a single column or creating one more internal table for users in the alv output table.
    Please suggest.
    regards,
    Sravanthi Chilal

    ALV only can show flat internal table data.
    you should set a sort on the field which you want to show only once.
    Then on the output of the ALV, the field with the same value will show only once.

  • Hiding a column in ALV GRID function module if it doesnt have data

    Hi ,
    I am using alv grid function module, in output i dont want to display the fields which dont have data

    we dont know which column has no data..... we have to do it dynamically
    This code does that dynamically, Here the field2 & Fiels4 are not displayed.
    TYPE-POOLS:slis,abap.
    TYPES:BEGIN OF ty_stru,
          field1 TYPE c,field2 TYPE c,field3 TYPE c,field4 TYPE c,
          END OF ty_stru.
    DATA:itab TYPE TABLE OF ty_stru,
         wa_stru TYPE ty_stru,
         lv_repid TYPE sy-repid,
         wa_fieldcat TYPE slis_fieldcat_alv,
         it_fieldcat TYPE TABLE OF slis_fieldcat_alv,
         it_details TYPE abap_compdescr_tab,
         wa_components TYPE abap_compdescr,
         lf_ref_descr TYPE REF TO cl_abap_structdescr,
         lv_field TYPE abap_compname.
    FIELD-SYMBOLS:<fs> TYPE ANY,
                  <fs1> TYPE ANY.
    lf_ref_descr ?= cl_abap_typedescr=>describe_by_data( wa_stru ).
    it_details[] = lf_ref_descr->components[].
    wa_stru-field1 = 'A'.wa_stru-field3 = 'C'.APPEND wa_stru TO itab.
    wa_stru-field1 = 'X'.wa_stru-field3 = 'Y'.APPEND wa_stru TO itab.
    IF NOT itab[] IS INITIAL.
      LOOP AT it_details INTO wa_components.
        ASSIGN wa_components-name TO <fs>.
        CHECK sy-subrc = 0.
        SORT itab BY (<fs>) DESCENDING.
        CONCATENATE 'WA_STRU' '-' <fs> INTO lv_field .
        ASSIGN (lv_field) TO <fs1>.
        CHECK sy-subrc = 0.
        READ TABLE itab INTO wa_stru INDEX 1 TRANSPORTING (<fs>).
        IF sy-subrc = 0 AND ( NOT <fs1> IS INITIAL ).
          wa_fieldcat-fieldname = wa_components-name.
          wa_fieldcat-seltext_m = wa_components-name.
          APPEND wa_fieldcat TO it_fieldcat.
          CLEAR wa_fieldcat.
        ENDIF.
      ENDLOOP.
      lv_repid = sy-repid.
      CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
           EXPORTING
                i_callback_program = lv_repid
                it_fieldcat        = it_fieldcat[]
           TABLES
                t_outtab           = itab[].
    ENDIF.

Maybe you are looking for

  • Downloading a file which is stored in FTP

    Hi, I am developing a webdynpro application where i need to display the flenames in the table which are stored in FTP. And by clickng the filename,it should be downloadable. Can anyone Please tell how to download a file through webdynpro application

  • HT4314 Problem with Game Centre accounts on iPod touch

    I have one Apple ID, and I have two sons who each have an iPod touch, each creating separate Game Centre 'accounts' using my ID.  It worked OK at first, but now we can only access the new account.  Is there a way I can correct this to the way it was

  • St02 - Swaps in Red( Common but complicated)

    Hello Friends, I am using SAP Netweaver 2004s, SAP_BASIS - 700, OS - Windows NT 6.1,  DB- MSSQL 8.00.194. In Tcode- ST02 i found many red alers while swapping. however many entires have hit ratio of 99% hopefully this can be ignored. please correct m

  • Question about how javac finds referenced files.

    Hi I am just beginning to learn Java and have got some questions related to packages. I have two classes: MyClass.java package pkg; public class MyClass {      public void prn(int x){      System.out.println("Integer: "+x); Test.java import pkg.*; pu

  • Aperture 3.0.3 - MobileMe doesn't work any more

    F*! I have installed new Aperture update and since then I'm only having problems. First I had to repair my library. Fortunately worked. But the sync of my MobileMe galleries doesn't work any more. I try to start the sync manually but it doesn't work.