Output of alv grid

hi all,
there is a very typicall requirement to be achieved in ALV grid display.
i need to display the subtotal of a field for  which line item should not be shown.
In this case "Number of Purchase orders" should not have any line itme but it should get poplulated with the total number of Purchase order ducument number for a vendor.
here is the required ouput format
vendor number     Purchase order document number     Number of Purchase orders
  32915               1999009090     
               1999009091     
  SUM                                                            2
32916               1999009092     
SUM                                                             1
SUM total                                                             2
the value to be displayed has been calculated ina variable. the problem is how to display it.
please help.

Hi,
Try like this....
TYPE-POOLS slis.
TYPES : BEGIN OF ta ,
         d1(10) TYPE c,
         d2 TYPE i,
         d3 TYPE i,
         line_color(4),
         END OF ta .
DATA : it TYPE STANDARD TABLE OF ta,
       wa TYPE ta,
       it1 TYPE STANDARD TABLE OF ta,
       wa1 TYPE ta,
       n TYPE i,
       N1 TYPE I.
DATA : it_layout TYPE STANDARD TABLE OF slis_layout_alv WITH HEADER LINE,
       wa_fcat TYPE slis_fieldcat_alv,
       it_fcat TYPE slis_t_fieldcat_alv.
DATA : it_sort TYPE slis_t_sortinfo_alv WITH HEADER LINE,
count TYPE i.
wa-d1 = 1.
wa-d2 = 12.
APPEND wa TO it.
wa-d1 = 1.
wa-d2 = 13.
APPEND wa TO it.
wa-d1 = 1.
wa-d2 = 14.
APPEND wa TO it.
wa-d1 = 1.
wa-d2 = 15.
APPEND wa TO it.
wa-d1 = 2.
wa-d2 = 12.
APPEND wa TO it.
wa-d1 = 2.
wa-d2 = 12.
APPEND wa TO it.
wa-d1 = 2.
wa-d2 = 12.
APPEND wa TO it.
wa-d1 = 3.
wa-d2 = 12.
APPEND wa TO it.
wa-d1 = 3.
wa-d2 = 12.
APPEND wa TO it.
SORT it BY d1.
LOOP AT it  INTO wa .
  count = count + 1.
  n = n + 1.
  n1 = n1 + 1.
  IF count = 1.
    wa-d1 = wa-d1.
  ELSE.
    wa-d1 = ' '.
  ENDIF.
  wa1-d1    = wa-d1.
  wa1-d2 = wa-d2.
  APPEND wa1 TO it1.
  AT END OF d1.
    CLEAR count.
    wa1-d1 = 'SUM'.
    wa1-d2    = n.
*    wa1-d3 = n.
    wa1-line_color = 'C400' .                               "'C300'.
    APPEND wa1 TO it1.
    CLEAR : n  .
    CLEAR wa1-line_color.
  ENDAT.
ENDLOOP.
wa1-d1 = 'GRAND SUM'.
wa1-d2    = n1.
wa1-line_color = 'C511'.
APPEND wa1 TO it1.
it_layout-info_fieldname =      'LINE_COLOR'.
DEFINE macro4fcat.
  wa_fcat-col_pos = &1.
  wa_fcat-fieldname = &2.
  wa_fcat-tabname = &3.
  wa_fcat-seltext_l = &4.
  wa_fcat-do_sum = &5.
  append wa_fcat to it_fcat.
  clear wa_fcat.
END-OF-DEFINITION.
macro4fcat    '1'  'D1'          'IT1'  'First'    ' ' .
macro4fcat    '2'  'D2'             'IT1'  'Amount'    ' ' .
CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
EXPORTING
i_callback_program                = sy-repid
  is_layout                         = it_layout
it_fieldcat                       = it_fcat
i_save                            = 'A'
TABLES
t_outtab                          = it1
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.
Regards
Debarshi

Similar Messages

  • Want to export output of alv grid to excel automatically

    hi friends.............
      i want to export output of alv grid without displaying on screen to excel file .......................
    how i m able to do it ..............................
    in the same way as after alv grid display click on LOCAL FILE-> SPREADSHEET-> ........................
    plz rply me soon if anyone of u know abt that.................
    thanks allot.............

    actually in output through 'REUSE_ALV_GRID_DISPLAY' some title is also there through TOP_OF_PAGE how can download it also and data table in excel sheet ...................
    actually when an alv output is displayed then some title data  is also displayed in alv grid then we can download it by clicking on icon 'local file--> spreadsheet........and soon ' ..........
    my req. is download it automatically without doing this process and without displaying it on screen......... it means i want to interrupt to alv grid output to only download without displaying it in output screen............
    if u clear my question then reply me.............

  • Selecting a row in the output of alv grid

    hi,
    how do i select a row in the output of alv grid?plz help...
    regards,
    sheeba.

    Hi,
    Please refer the code below:
    *& Report  ZDEMO_ALVGRID_SELROW                                        *
    *& Example of a simple ALV Grid Report                                 *
    *& The basic ALV grid, Enhanced to display capture each row a user has *
    *& selected                                                            *
    REPORT  zdemo_alvgrid_selrow                 .
    TABLES:     ekko.
    type-pools: slis.                                 "ALV Declarations
    *Data Declaration
    TYPES: BEGIN OF t_ekko,
      SEl,                         "stores which row user has selected
      ebeln TYPE ekpo-ebeln,
      ebelp TYPE ekpo-ebelp,
      statu TYPE ekpo-statu,
      aedat TYPE ekpo-aedat,
      matnr TYPE ekpo-matnr,
      menge TYPE ekpo-menge,
      meins TYPE ekpo-meins,
      netpr TYPE ekpo-netpr,
      peinh TYPE ekpo-peinh,
    END OF t_ekko.
    DATA: it_ekko TYPE STANDARD TABLE OF t_ekko INITIAL SIZE 0,
          wa_ekko TYPE t_ekko.
    *ALV data declarations
    data: fieldcatalog type slis_t_fieldcat_alv with header line,
          gd_tab_group type slis_t_sp_group_alv,
          gd_layout    type slis_layout_alv,
          gd_repid     like sy-repid.
    *Start-of-selection.
    START-OF-SELECTION.
    perform data_retrieval.
    perform build_fieldcatalog.
    perform build_layout.
    perform display_alv_report.
    *&      Form  BUILD_FIELDCATALOG
    *       Build Fieldcatalog for ALV Report
    form build_fieldcatalog.
    * There are a number of ways to create a fieldcat.
    * For the purpose of this example i will build the fieldcatalog manualy
    * by populating the internal table fields individually and then
    * appending the rows. This method can be the most time consuming but can
    * also allow you  more control of the final product.
    * Beware though, you need to ensure that all fields required are
    * populated. When using some of functionality available via ALV, such as
    * total. You may need to provide more information than if you were
    * simply displaying the result
    *               I.e. Field type may be required in-order for
    *                    the 'TOTAL' function to work.
      fieldcatalog-fieldname   = 'EBELN'.
      fieldcatalog-seltext_m   = 'Purchase Order'.
      fieldcatalog-col_pos     = 0.
      fieldcatalog-outputlen   = 10.
      fieldcatalog-emphasize   = 'X'.
      fieldcatalog-key         = 'X'.
    *  fieldcatalog-do_sum      = 'X'.
    *  fieldcatalog-no_zero     = 'X'.
      append fieldcatalog to fieldcatalog.
      clear  fieldcatalog.
      fieldcatalog-fieldname   = 'EBELP'.
      fieldcatalog-seltext_m   = 'PO Item'.
      fieldcatalog-col_pos     = 1.
      append fieldcatalog to fieldcatalog.
      clear  fieldcatalog.
      fieldcatalog-fieldname   = 'STATU'.
      fieldcatalog-seltext_m   = 'Status'.
      fieldcatalog-col_pos     = 2.
      append fieldcatalog to fieldcatalog.
      clear  fieldcatalog.
      fieldcatalog-fieldname   = 'AEDAT'.
      fieldcatalog-seltext_m   = 'Item change date'.
      fieldcatalog-col_pos     = 3.
      append fieldcatalog to fieldcatalog.
      clear  fieldcatalog.
      fieldcatalog-fieldname   = 'MATNR'.
      fieldcatalog-seltext_m   = 'Material Number'.
      fieldcatalog-col_pos     = 4.
      append fieldcatalog to fieldcatalog.
      clear  fieldcatalog.
      fieldcatalog-fieldname   = 'MENGE'.
      fieldcatalog-seltext_m   = 'PO quantity'.
      fieldcatalog-col_pos     = 5.
      append fieldcatalog to fieldcatalog.
      clear  fieldcatalog.
      fieldcatalog-fieldname   = 'MEINS'.
      fieldcatalog-seltext_m   = 'Order Unit'.
      fieldcatalog-col_pos     = 6.
      append fieldcatalog to fieldcatalog.
      clear  fieldcatalog.
      fieldcatalog-fieldname   = 'NETPR'.
      fieldcatalog-seltext_m   = 'Net Price'.
      fieldcatalog-col_pos     = 7.
      fieldcatalog-outputlen   = 15.
      fieldcatalog-do_sum      = 'X'.        "Display column total
      fieldcatalog-datatype     = 'CURR'.
      append fieldcatalog to fieldcatalog.
      clear  fieldcatalog.
      fieldcatalog-fieldname   = 'PEINH'.
      fieldcatalog-seltext_m   = 'Price Unit'.
      fieldcatalog-col_pos     = 8.
      append fieldcatalog to fieldcatalog.
      clear  fieldcatalog.
    endform.                    " BUILD_FIELDCATALOG
    *&      Form  BUILD_LAYOUT
    *       Build layout for ALV grid report
    form build_layout.
      gd_layout-box_fieldname     = 'SEL'.
                                     "set field name to store row selection
      gd_layout-edit              = 'X'. "makes whole ALV table editable
      gd_layout-zebra             = 'X'.
    endform.                    " BUILD_LAYOUT
    *&      Form  DISPLAY_ALV_REPORT
    *       Display report using ALV grid
    form display_alv_report.
      gd_repid = sy-repid.
      call function 'REUSE_ALV_GRID_DISPLAY'
           exporting
                i_callback_program      = gd_repid
    *            i_callback_top_of_page   = 'TOP-OF-PAGE'  "see FORM
                i_callback_user_command = 'USER_COMMAND'
    *            i_grid_title           = outtext
                is_layout               = gd_layout
                it_fieldcat             = fieldcatalog[]
    *            it_special_groups       = gd_tabgroup
    *            IT_EVENTS                = GT_XEVENTS
                i_save                  = 'X'
    *            is_variant              = z_template
           tables
                t_outtab                = it_ekko
           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.                    " DISPLAY_ALV_REPORT
    *&      Form  DATA_RETRIEVAL
    *       Retrieve data form EKPO table and populate itab it_ekko
    form data_retrieval.
    select ebeln ebelp statu aedat matnr menge meins netpr peinh
    up to 10 rows
      from ekpo
      into corresponding fields of table it_ekko.
    endform.                    " DATA_RETRIEVAL
    *       FORM USER_COMMAND                                          *
    *       --> R_UCOMM                                                *
    *       --> RS_SELFIELD                                            *
    FORM user_command USING r_ucomm LIKE sy-ucomm
                      rs_selfield TYPE slis_selfield.
    * Check function code
      CASE r_ucomm.
        WHEN '&IC1'.
    *   Check field clicked on within ALVgrid report
        IF rs_selfield-fieldname = 'EBELN'.
    *     Read data table, using index of row user clicked on
          READ TABLE it_ekko INTO wa_ekko INDEX rs_selfield-tabindex.
    *     Set parameter ID for transaction screen field
          SET PARAMETER ID 'BES' FIELD wa_ekko-ebeln.
    *     Sxecute transaction ME23N, and skip initial data entry screen
          CALL TRANSACTION 'ME23N' AND SKIP FIRST SCREEN.
        ENDIF.
        WHEN '&DATA_SAVE'.  "user presses SAVE
        loop at it_ekko into wa_ekko.
          if wa_ekko-sel EQ 'X'.
    *       Process records that have been selected
          endif.
        endloop.
      ENDCASE.
    ENDFORM.
    Thanks,
    Sriram Ponna.

  • Wan to add push button in the output of ALV Grid display.

    Hi Friends,
    I wan to add a Push button in the output of ALV GRID display with STANDARD ikons.
    How to copy standard ikons of GRID output.
    How to apply the copied status into my code.
    Regards,
    Viji

    Hi,
    Goto SE41, create a pf-status for your alv report program.
    On the next screen, click menu EXTRAS --> click option ADJUST TEMPLATES and select radiobutton LIST VIEWER --> you will get all standard buttons of alv in the pf-status.
    Delete the unwanted buttons and also you can add new buttons if reqd.
    Activate pf-status --> and apply in alv program.
    Now to apply this pf-status in your alv report follow code:-
      CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
       EXPORTING
         i_callback_program                = v_rep_id       " report id
         i_callback_pf_status_set          = 'PF'           " for PF-STATUS
         i_callback_user_command           = 'USER_COMMAND' " for User-Command
         is_layout                         = wa_layout      " for layout
         it_fieldcat                       = it_field       " field catalog
         it_sort                           = it_sort        " sort info
        TABLES
          t_outtab                          = it_final      " internal table
       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.
    *&      Form  pf
    *       SUB-ROUTINE PF IS USED TO SET THE PF-STATUS OF THE SCREEN
    *       ON WHICH THE ALV GRID IS DISPLAYED
    *       -->RT_EXTAB
    FORM pf USING rt_extab TYPE slis_t_extab.
      SET PF-STATUS 'ZTG_STAT'. "<--pass pf-status name here
    ENDFORM.                    "pf
    *&      Form  USER_COMMAND
    *       SUB-ROUTINE USER_COMMAND IS USED TO HANDLE THE USER ACTION
    *       AND EXECUTE THE APPROPIATE CODE
    *      -->LV_OKCODE   used to capture the function code
    *                     of the user-defined push-buttons
    *      -->L_SELFIELD   text
    FORM user_command USING lv_okcode LIKE sy-ucomm l_selfield TYPE slis_selfield.
    * assign the function code to variable v_okcode
      lv_okcode = sy-ucomm.
    * handle the code execution based on the function code encountered
      CASE lv_okcode.
        WHEN '<function_code>'. "<--to handle user actions
      ENDCASE.
    ENDFORM.                    "USER_COMMAND
    Hope this helps you.
    Regards,
    Tarun

  • Regarding downlaod the output from ALV grid format

    Hi 
    i want to download the output ALV grid format into excel sheet .
    but condition is when ever user press the button (&ZDL) the should be downloaded.
    and also how to convert the output into CSV format.

    hi,
    when '&ZDL'.
    use this condition
    check this one for down loading
    try to download an ALV report in excel format using (list ->export -> local file-> soread sheet )
    Re: advantages of alv reports
    Excel Download to ALV report
    hi this is full program
    REPORT ZCR_BOMPLANT_DOWNLOAD.
    TABLES : MAST , "Material to BOM Link
    STKO , "BOM Header
    MARA . "General Material Data
    TYPES : BEGIN OF TY_MASTER ,
    MATNR TYPE MAST-MATNR , "Material Number
    WERKS TYPE MAST-WERKS , "Plant
    STLAN TYPE MAST-STLAN , "BOM Usage
    STLNR TYPE MAST-STLNR , "Bill of material
    STLAL TYPE MAST-STLAL , "Alternative BOM
    ANDAT TYPE MAST-ANDAT , "Date record created on
    AEDAT TYPE MAST-AEDAT , "Date of Last Change
    AENAM TYPE MAST-AENAM , "Name of Person Who Changed Object
    STLST TYPE STKO-STLST , "BOM status
    ZPLP1 TYPE MBEW-ZPLP1 , "Future Planned Price 1
    DWERK TYPE MVKE-DWERK , "Delivering Plant (Own or External)
    END OF TY_MASTER .
    TYPES : MY_TYPE(20) TYPE C.
    DATA : IT_MASTER TYPE STANDARD TABLE OF TY_MASTER,
    WA_MASTER TYPE TY_MASTER .
    DATA : IT_HEADER TYPE TABLE OF MY_TYPE.
    DATA : W_PTH TYPE RLGRAP-FILENAME.
    DATA : W_FILE TYPE RLGRAP-FILENAME.
    *--- Add Header Fields to Header Table ---
    APPEND 'Material Number' TO IT_HEADER .
    APPEND 'Plant' TO IT_HEADER .
    APPEND 'BOM Usage' TO IT_HEADER .
    APPEND 'Bill Code' TO IT_HEADER .
    APPEND 'Alternative BOM' TO IT_HEADER .
    APPEND 'Created On' TO IT_HEADER .
    APPEND 'Changed On' TO IT_HEADER .
    APPEND 'Changed By' TO IT_HEADER .
    APPEND 'BOM Status' TO IT_HEADER .
    APPEND 'Planned Price' TO IT_HEADER .
    APPEND 'Delivery Plant' TO IT_HEADER .
    IF SY-MANDT = '700'.
    W_PTH = '
    lkdb01\ISD\IS\Software Developments\Developments\Data Files\SAP Dumps\BOM_Available\'.
    ELSE.
    W_PTH = 'C:\'.
    ENDIF.
    START-OF-SELECTION.
    *--- Load Data to Internal Table ---
    SELECT MASTMATNR MASTWERKS MASTSTLAN MASTSTLNR MASTSTLAL MASTANDAT MASTAEDAT MASTAENAM STKO~STLST
    INTO TABLE IT_MASTER
    FROM MAST
    INNER JOIN STKO ON STKOSTLNR EQ MASTSTLNR
    AND STKOSTLAL EQ MASTSTLAL
    INNER JOIN MARA ON MARAMATNR EQ MASTMATNR
    WHERE MARA~MTART LIKE 'ZFG%'
    AND STKO~LKENZ NE 'X'
    AND STKO~LOEKZ NE 'X'
    AND STKO~STLST EQ '1'.
    SELECT MAST~MATNR MAST~WERKS MAST~STLAN MAST~STLNR MAST~STLAL MAST~ANDAT MAST~AEDAT MAST~AENAM STKO~STLST MBEW~ZPLP1 MVKE~DWERK
    INTO TABLE IT_MASTER
    FROM MAST
    INNER JOIN STKO ON STKO~STLNR EQ MAST~STLNR
    AND STKO~STLAL EQ MAST~STLAL
    INNER JOIN MARA ON MARA~MATNR EQ MAST~MATNR
    INNER JOIN MBEW ON MBEW~MATNR EQ MAST~MATNR
    AND MBEW~BWKEY EQ MAST~WERKS
    INNER JOIN MVKE ON MVKE~MATNR EQ MAST~MATNR
    WHERE MARA~MTART LIKE 'ZFG%'
    AND STKO~LKENZ NE 'X'
    AND STKO~LOEKZ NE 'X'
    AND STKO~STLST EQ '1'.
    IF SY-SUBRC <> 0.
    MESSAGE I014(ZLOAD).
    ENDIF.
    *--- Set Path to Function Module ---
    CONCATENATE W_PTH SY-DATUM ' - ' 'BOM_AVAILABLE_PLANT.XLS' INTO W_FILE.
    CALL FUNCTION 'WS_DOWNLOAD'
    EXPORTING
    FILENAME = W_FILE
    FILETYPE = 'DAT'
    TABLES
    DATA_TAB = IT_MASTER
    FIELDNAMES = IT_HEADER
    EXCEPTIONS
    FILE_OPEN_ERROR = 1
    FILE_WRITE_ERROR = 2
    INVALID_FILESIZE = 3
    INVALID_TYPE = 4
    NO_BATCH = 5
    UNKNOWN_ERROR = 6
    INVALID_TABLE_EIDTH = 7
    GUI_REFUSE_FILETRANSFER = 8
    CUSTOMER_ERROR = 9
    OTHERS = 10.
    IF SY-SUBRC = 0.
    SUBMIT ZI005_MARA_DUMP_SOLIDEAL_N.
    MESSAGE I023(ZLOAD) WITH text-001.
    ELSE.
    MESSAGE I022(ZLOAD) WITH W_FILE. "Errors while downloading.
    ENDIF.
    END-OF-SELECTION.
    SUBMIT ZI005_MARA_DUMP_SOLIDEAL_N.

  • Converting ME2N Output to ALV Grid

    Hello,
    Is there any Class or Function Module which converts the output of ME2N into ALV Grid.
    Thanks and Regards,
    Prabhjot Singh

    Hi Prabhjot Singh,
    you can select ALV Output in parameter "scope of list" within ME2n
    Regards
    REA

  • Regarding output using alv grid display

    Hi experts,
        i have a program
    FS_TAB1-A = P_T1.
    IF P_T1 = 0.
      TEMP1 = 1.
      DO TEMP1 TIMES.
        FS_TAB1-A = P_T1 * DUMMY1.
        APPEND FS_TAB1 TO T_TAB1.
        DUMMY1 = DUMMY1  + 1.
      ENDDO.
    now i have to diplay the p_t1*dummy1 using alv grid display like it goes into thew  loop for ten times then i have to show it 10 times like
    10 1  102 103 104 111 112  like that can u help me

    hi,
        you have to get the result of the multiplication at each row and then concatenate the result and the factor to show the final result in multiples value and multiplication factor...

  • To display output of ALV GRID in background.

    Hi,
    I have a report which is giving TIMEOUT error .This report is interactive( it calls a standard transaction based on user action ) If i run this report in background then I can see the output through spool in basic list .
      Whether it is possible  to run this report in BACKGROUND and after it gets executed , display the output in foreground so that it does not looses the functionality of intractableness.

    hi Tushar,
    one idea : you can save the output (which is an internal table in fact) to a Z table. Than in another program you read this Z table to internal table and display with ALV.
    ec

  • List output in ALV grid

    Hi all,
    I need the list output of  one program in my program in a grid(single column).
    I am doing the below..
      TYPES: BEGIN OF tp_ascitab ,
                    line(150),
                  END OF tp_ascitab.
      DATA:  dt_ascitab   TYPE TABLE OF tp_ascitab,
             ds_ascitab   TYPE tp_ascitab.
        SUBMIT zlist_program    WITH p-gmn EQ matno
        WITH p-plant EQ plant
        EXPORTING LIST TO MEMORY
        AND RETURN.
        CALL FUNCTION 'LIST_FROM_MEMORY'
          TABLES
            listobject = gmn_info_tab
          EXCEPTIONS
            not_found  = 1
            OTHERS     = 2.
        CALL FUNCTION 'LIST_TO_ASCI'
          TABLES
            listobject = gmn_info_tab
            listasci   = dt_ascitab.
        IF sy-subrc <> 0.
          MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
                  WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
        ENDIF.
        IF dg_gridcont IS INITIAL.
    Create controls
          CREATE OBJECT dg_gridcont
            EXPORTING container_name = 'GRID_CONT'.
        ENDIF.
        CREATE OBJECT dg_grid
                  EXPORTING i_parent = dg_gridcont.
        ds_layout-no_hgridln = 'X'.
        ds_layout-no_toolbar = 'X'.
        CALL METHOD dg_grid->set_table_for_first_display
          EXPORTING
            is_layout       = ds_layout
          CHANGING
            it_fieldcatalog = dt_fcat[]
            it_outtab       = dt_ascitab.
    The table dt_ascitab has data in correct format until it is passed to grid.
    After that, there is change in alignmentt. The grid output has data with
    improper alignment. Could anyone help me with this.
    thanks,
    Keerthi.

    Hi Keerthi,
    Try Using following FM before Method 'set_table_for_first_display'
    CALL FUNCTION 'LVC_FIELDCATALOG_MERGE'
             EXPORTING
                  i_buffer_active        = ' '
                  i_structure_name       = 'structure in which format u need output'
                  i_client_never_display = 'X'
                  i_bypassing_buffer     = 'X'
             CHANGING
                  ct_fieldcat            = dt_fcat[]
             EXCEPTIONS
                  inconsistent_interface = 1
                  program_error          = 2
                  OTHERS                 = 3.
    Hope, it will help u.

  • Check box as output of ALV grid display

    Hello Experts,
    I have an internal table consiting of 3 fields which i need to display this  using the grid display.
    The requirement is to place a check box before the 1 and the 3rd line item.
    Thanks in advance.

    Hi
    data:   it_check TYPE STANDARD TABLE OF st_check,
           wa_check TYPE st_check.
    to get the pop up data:
    LOOP AT it_ekko INTO wa_ekko WHERE check = 'X'.
        READ TABLE it_eine INTO wa_eine WITH KEY ebeln = wa_ekko-ebeln.
        IF sy-subrc NE 0.
          MESSAGE i020(z50871msg) WITH text-015 wa_ekko-ebeln .
        ELSE.
          wa_popup-ebeln = wa_eine-ebeln.
          wa_popup-ekorg = wa_eine-ekorg.
          wa_popup-ekgrp = wa_eine-ekgrp.
          APPEND wa_popup TO it_popup.
        ENDIF.
      ENDLOOP.
    to dispay pop up;
    FORM display_popup .
      LOOP AT it_ekko INTO wa_ekko WHERE check EQ 'X'.
        wa_check-check = wa_ekko-check.
        APPEND wa_check TO it_check.
      ENDLOOP.
      IF it_check[] IS INITIAL.
        MESSAGE i020(z50871msg) WITH text-018.
      ENDIF.
      IF NOT it_popup[] IS INITIAL.
        CALL FUNCTION 'REUSE_ALV_POPUP_TO_SELECT'
          EXPORTING
            i_title              = text-003
            i_allow_no_selection = 'X'
            i_scroll_to_sel_line = 'X'
            i_tabname            = 'IT_POPUP'
            it_fieldcat          = it_fieldcat
            i_callback_program   = sy-repid
          TABLES
            t_outtab             = it_popup
          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.
      ENDIF.
      REFRESH it_check.
      REFRESH it_popup.
    ENDFORM.                    " DISPLAY_POPUP

  • New field in ME28 output in ALV grid

    Dear All,
    In ME28 - PO release transection code, when we run in ALV gird, we have a TAX code field but not the tax code description.
    Can we have this, if yes let me know the procedure.
    Thanks,
    SAmir Bhatt

    Hi,
    As per my knowledge, system will not allow to add the " Description of Tax Code". Plz check in customization for Reporting.
    Regards,
    Raghunath

  • F4 - Help for field in ALV Grid Output

    Hi,
    I generated a report which gives output in ALV Grid output.
    In the output, 1 of the field is editable.Here, for this field I need to have my own F4-Help.
    I think the procedure to be followed is:--
    Create a Search Help in SE11.
    Link the Search Help to the editable field.
    Please let me know if its the correct procedure.
    I f yes, how can I link user defined Search Help to the editable field?
    Thanks,
    Shivaa........

    Hi siva,
    you can also do that way.
    while filling the fieldcatalog use the parameter F4AVAILABL
    for more info check
    F4 help in ALV Grid...
    f4 help for a field in alv grid
    hope it helps you
    Thanks!
    Edited by: Prasanth on Mar 6, 2009 3:59 PM

  • Problem while downloading ALV GRID Output to Local Spreadsheet(Excel) File.

    Hi,
    I am displaying output in ALV GRID. While downloading the output to Excel file using "Local File" option provided by ALV.
    But while downloading the columns and their respective values are coming in single column vertially of excel file instead of horizontal.
    e.g. Grid output is as follows.
    F1 F2
    V1 V2
    (F represents Field Title, and V represent Value)
    Downloaded Excel File content:-
    F1
    F2
    V1
    V2
    Please help.

    Hi ,
    Please use below FM :
    CALL FUNCTION 'GUI_DOWNLOAD'
    EXPORTING
    filename = 'C:\Documents and Settings\akshayr2403\Desktop\docs\rep.xls'
    FILETYPE = 'WK1'
    WRITE_FIELD_SEPARATOR = 'X'
    tables
    data_tab = it_vbak
    EXCEPTIONS
    FILE_WRITE_ERROR = 1
    NO_BATCH = 2
    GUI_REFUSE_FILETRANSFER = 3
    INVALID_TYPE = 4
    NO_AUTHORITY = 5
    UNKNOWN_ERROR = 6
    HEADER_NOT_ALLOWED = 7
    SEPARATOR_NOT_ALLOWED = 8
    FILESIZE_NOT_ALLOWED = 9
    HEADER_TOO_LONG = 10
    DP_ERROR_CREATE = 11
    DP_ERROR_SEND = 12
    DP_ERROR_WRITE = 13
    UNKNOWN_DP_ERROR = 14
    ACCESS_DENIED = 15
    DP_OUT_OF_MEMORY = 16
    DISK_FULL = 17
    DP_TIMEOUT = 18
    FILE_NOT_FOUND = 19
    DATAPROVIDER_EXCEPTION = 20
    CONTROL_FLUSH_ERROR = 21
    OTHERS = 22
    IF sy-subrc 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
    WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    ENDIF.
    Also, if your problem still persist, please refer SAP's demo code on ALV "BCALV_FULLSCREEN_DEMO".
    There are many sample codes available, what you need to do is just go to SE38 and put BCALV* and do F4.
    I hope this will help you.
    Regards,
    Rahul Mahajan

  • ALV Grid Output to PDF

    Hi All,
    I have a report which displays the output in ALV Grid. I need to create a PDF from ALV output when the user clicks on a button. Using FM 'CONVERT_ABAPSPOOLJOB_2_PDF' i am able to acheive this.
    But, as per my requirement if the user does any layout changes in the ALV output ( E.g. Sorting, Sub totaling ), it need to be captured and displayed in the PDF. Can you please tell me how can i get the values of changed ALV Grid Layout at the runtime?
    Thanks & Regards,
    Senthil.

    Hi,
    1) Get the Print parameters using this function GET_PRINT_PARAMETERS
    2) Set the print parameters using the statement: NEW-PAGE PRINT ON PARAMETERS print_parameters NO DIALOG.
    3) Generate the ALV Output using "REUSE_ALV_GRID_DISPLAY"
    4)  NEW-PAGE PRINT OFF.
    5) Get the Spool request id from tsp01 using the user id and client
    6) Pass the Spool id to the FM: CONVERT_ABAPSPOOLJOB_2_PDF
    7) Then, Use the function "GUI_DOWNLOAD" to download the generated PDF.
    Thanks & Regrads,
    Senthil.
    Edited by: senthil nathan on May 16, 2010 1:09 PM

  • Field Length in Alv Grid out put

    hi,
    How to increase the length of the filed in the output of alv grid,
    Actually i am getting one blank field in the alv grid out put, my requirement is to increase the length through out the column how to do that
    can anyone guide me plz
    SIRI

    in your fieldcat of the field
    wfieldcat-fieldname = '<your fieldname in caps>'
    wfieldcat-outputlen = 10 (or the length you want for the field)
    <you can define any other property also for that field>
    append wfieldcat to ifieldcat.
    now pass it in fm.
    regards
    shiba dutta

Maybe you are looking for

  • MSI TI 4200 - TD8X - PC freezes while playing games.. Dx problem? Settings? HELP!

    Hi I bought a MSI GF4 TI-4200 TD 8x about 2 months ago, and it has been running fine 'till now...I'm having a few problems in a few games (HALO, homeworld 2), ocasionally my computer freezes completely in the middle of these games, and I have to rebo

  • An error occurred while copying files to the backup volume.

    Hi, after weeks of flawless operation,TimeMachine reports the following problem: Oct 12 10:08:21 MacBook /System/Library/CoreServices/backupd[2429]: Starting standard backup Oct 12 10:08:21 MacBook /System/Library/CoreServices/backupd[2429]: Network

  • I downloaded Quicktime but iTunes still wont open

    I accidentally removed Quicktime from my programs list because I didn't know that I needed it to run iTunes. so I went online and downloaded it and iTunes still wont open. Saying that: "Quicktime was not found!" and "Please reinstall iTunes" so I re-

  • Problem using Soundsoap2  with FC Express

    Hi, I just starting using Soundsoap 2, and want to clean up some noisy audio on some clips of a FC Express project. FCE will host Soundsoap (it shows up in the Effects Folder) but it is a completely different, scaled-back interface. Does anyone know

  • Large Aggregates

    Hello Experts, We have recieved an early watch report from SAP which has highlighted large aggregates for certain infocubes. When I check the aggregates, I noticed that they have high utilization indicated by the +++ in the valuation column. As large