In alv report , how to reserve 20 lines from beginning of page

hi experts
in alv report , how to reserve 20 lines from beginning of page.
regards
subhasis.

If by reserve you mean should not move on scrolling then make them KEY from fieldcatalog.
But I think maximum of 10-12 can be handled by that.
Regards,
Amit
Reward all helpful replies.

Similar Messages

  • In ALV reports how double click event works?

    in ALV reports how double click event works? Explain in detail.....

    hi,
    last lines is used for clicking
    *& Report  Z_SWAS_FUNCTIONAL
    report  z_swas_functional.
    tables: qmel,viqmel,iloa,afko.
    -- global data declerations--
    data: ok_code like sy-ucomm,
          gt_itab type table of zfunctional,
          t_output type table of zfunctional,
          g_container type scrfname value 'CUSTOM_CONTROL',
          grid1  type ref to cl_gui_alv_grid,
          g_custom_container type ref to cl_gui_custom_container,
          e_row type lvc_s_row,
          e_column type lvc_s_col,
          es_row_no type lvc_s_roid.
    *CLASS DECLARATION
    class z_functional definition.
    public section.
    class-methods : handle_double_click
                    for event double_click of cl_gui_alv_grid
                         importing e_row  e_column.
    endclass.
    *CLASS IMPLEMENTATION
    class z_functional implementation.
    method handle_double_click.
           perform handle_double_click using e_row e_column es_row_no.
    endmethod.
    endclass.
    *CODE FOR SELECTION SCREEN
    selection-screen begin of block 84433  with frame title text-t01.
    parameters : n_number like viqmel-qmnum,
                    n_type like qmel-qmart,
                    f_loca like iloa-tplnr,
                    name like qmel-qmnam.
    selection-screen end of block 84433.
                        screen validation event                          *
    at selection-screen on n_number.
      select single *
        from viqmel
          where qmnum eq n_number.
    if sy-subrc ne 0.
      MESSAGE 'NOTIFICATION NUMBER DOESNOT EXIST' TYPE 'E'.
    endif.
    select qmart from qmel into qmel where qmart eq N_TYPE.
    endselect.
    if sy-subrc ne 0.
      MESSAGE 'NOTIFICATION TYPE DOES NOT EXIST' TYPE 'E'.
    endif.
    *START OF SELECTION EVENT
    start-of-selection.
        perform fetchdata.
    end-of-selection.
    *Call screen event
    call screen 100.
    *PERFORM DISPLAY.
    *&      Form  FETCHDATA
          text
    -->  p1        text
    <--  p2        text
    form fetchdata .
    *SELECT VIQMEL~QMNUM VIQMEL~QMTXT VIQMEL~QMDAT VIQMEL~LTRMN VIQMEL~PRIOK
          VIQMELBEZDT VIQMELAUFNR VIQMELTPLNR AFKOGLTRP into corresponding fields of table GT_ITAB
             FROM VIQMEL INNER JOIN AFKO ON VIQMELAUFNR = AFKOAUFNR
                   WHERE VIQMELQMNUM IN N_NUMBER and VIQMELQMART IN N_TYPE AND VIQMEL~QMNAM IN NAME.
    call function 'ZSWAS_TEST'
      exporting
        qmnum         = n_number
       qmart         = n_type
       tplnr         = f_loca
       qmnam         = name
      tables
        output        = gt_itab
    if sy-subrc ne 0.
       message e000(z84433_msg_class).
    endif.
    endform.                    " FETCHDATA
    *&      Module  STATUS_0100  OUTPUT
          text
    module status_0100 output.
      set pf-status 'MAIN'.
    SET TITLEBAR 'xxx'.
    *creating custom container and grid instance
    if g_custom_container is initial.
        create object g_custom_container
               exporting container_name = g_container.
        create object grid1
               exporting i_parent = g_custom_container.
        call method grid1->set_table_for_first_display
          exporting
            i_structure_name = 'ZFUNCTIONAL'
          changing
            it_outtab        = gt_itab.
    *set handler events
        set handler z_functional=>handle_double_click for grid1.
      endif.
    endmodule.                 " STATUS_0100  OUTPUT
    *&      Module  USER_COMMAND_0100  INPUT
          text
    module user_command_0100 input.
    case ok_code.
       when 'EXIT'.
        perform exit_program.
    endcase.
      clear ok_code.
    endmodule.                 " USER_COMMAND_0100  INPUT
    *&      Form  EXIT_PROGRAM
          text
    -->  p1        text
    <--  p2        text
    form exit_program .
    leave program.
    endform.                    " EXIT_PROGRAM
    *&      Form  handle_double_click
          text
         -->P_E_ROW  text
         -->P_E_COLUMN  text
         -->P_ES_ROW_NO  text
    form handle_double_click  using   e_row type lvc_s_row
                                      e_column type lvc_s_col
                                      es_row_no type lvc_s_roid.
    data: t_output type  zfunctional.
        read table gt_itab into t_output index e_row-index .
      if sy-subrc = 0 and e_column-fieldname eq 'QMNUM'.
        set parameter id 'K01' field t_output-qmnum.
        call transaction 'ZSMART' and skip first screen .
      endif.
    endform.                    " handle_double_click
    regards,
    swaroop.

  • Check boxes in ALV Report how to do ?

    ALV report how to keep check box  in the first field?
    thanks in advance..
    chalapathi

    hi,
        Check this small code..  U will get clear idea.
    Report.
    data : begin of it occurs 0,
            MATNR TYPE MATNR,
            c1 ,                  " CHECK BOX FIELDS
            c2,
            end of it.
    type-pools : slis.
    data itlog type slis_t_fieldcat_alv.
    data walog type slis_fieldcat_alv.
    SELECT MATNR
    FROM MARA
    INTO TABLE IT .
    ****INSERTING  CHECKBOX  IN CHANGE MODE
    WALOG-FIELDNAME = 'C1'.
    WALOG-TABNAME = 'IT'.
    WALOG-SELTEXT_M = 'CHECKBOX1'.
    walog-CHECKBOX = 'X'.
    WALOG-EDIT = 'X'.
    APPEND WALOG TO ITLOG.
    ****INSERTING  CHECKBOX  IN DISPLAY MODE
    WALOG-FIELDNAME = 'C2'.
    WALOG-TABNAME = 'IT'.
    WALOG-SELTEXT_M = 'CHECKBOX2'.
    walog-CHECKBOX = 'X'.
    WALOG-EDIT = ''.
    APPEND WALOG TO ITLOG.
    WALOG-FIELDNAME = 'MATNR'.
    WALOG-TABNAME = 'IT'.
    WALOG-SELTEXT_M = 'MATERIAL'.
    walog-CHECKBOX = ''.
    WALOG-EDIT = 'X'.
    WALOG-NO_ZERO = 'X'.              " LEFT ZEROS WILL CUT
    APPEND WALOG TO ITLOG.
    *WALOG-FIELDNAME = 'ICON'.
    *WALOG-TABNAME = 'IT'.
    *WALOG-SELTEXT_M = 'ICON'.               "IN FIELDCATALOG ADDING THAT ICON
    *walog-ICON = 'X'.
    *walog-just = 'R'.                   " RIGHT JUSTIFICATION OR LEFT
    **WALOG-EDIT = ''.
    *APPEND WALOG TO ITLOG.
    CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
    EXPORTING
      I_INTERFACE_CHECK                 = ' '
      I_BYPASSING_BUFFER                = ' '
      I_BUFFER_ACTIVE                   = ' '
       I_CALLBACK_PROGRAM                = 'ZALV_SIMPLE1'
      I_CALLBACK_PF_STATUS_SET          = ' '
      I_CALLBACK_USER_COMMAND           = ' '
      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                         =
       IT_FIELDCAT                       =   ITLOG
      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                          =  IT
    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.
    Thanks and Regards,
    surya

  • In ALV reports how can we capture separate data in 3 internal table

    HI
       In ALV reports how can we capture data in 3 Internal tables and combine them in another internal table to display........

    Hello Sudhanshu
    Another option would be to display all three itabs together which is a piece of cake using OO-based ALV lists. Please refer to thread
    Re: Alv
    for a sample report.
    Regards
      Uwe

  • How to transfer files from MacBook Pro pages app to iPad mini pages app?

    How to transfer files from MacBook Pro pages app to iPad mini pages app?

    The above assumes you are running current software.
    Mac - OX X 10.9.2, Pages 5.1.
    iPad - iOS 7.0.6, Pages 2.1.

  • How can I call from my home page ?

    Nosotros estamos construyendo un web site en un servidor IAS con Portal. Necesito colocar un buscador interno de mi web site.
    Yo pense hacerlo con el porlet "buscar" del producto Portal pero no se como invocarlo.
    We have a server IAS with the Portal product. Portal have a porlet named "search"
    We have buided a web site with xhtml and css. I need to place a search engine of my web site. (self search engine)
    How can I invoce from my home page ? Como puede invocarlo (llamarlo) desde mi home page?
    Thanks

    Do you need something like in the picture I have posted???
    Then, click Firefox menu, click Options. Click the General tab, and enter about:home in the Homepage field.
    Or, you want to make Firefox your default browser???
    Then, click Firefox menu, click Options. Click the Advanced tab. Click the General tab UNDER ADVANCED TAB. Click Check now. It will tell you whether Firefox is the default browser or not. If it is the default browser, then you can click OK. If it is not the default browser you need to click Yes to make it default.

  • ALV Report how to display from and to date values in the header.

    I develoeped alv report . i want to display selection screen from and to date values in  top of page...
    any sample code pls guide me..

    You have to do many things...
    first find the selection details using the FM.
    RS_REFRESH_FROM_SELECTOPTIONS
    use the Blog to Align/populate the Header  from the selection table
    /people/community.user/blog/2007/05/07/alignment-of-data-in-top-of-page-in-alv-grid

  • Coloring of a (specific) row in ALV report-How?

    Hi Experts,
    Am looking to assign a color for a (specific)row in ALV report.......so, pls. let me know How to get it done?
    thanq

    TABLES:LFA1.
    SELECT-OPTIONS:LIFNR FOR LFA1-LIFNR.
    DATA:BEGIN OF ITAB OCCURS 0,
    LIFNR LIKE LFA1-LIFNR,
    NAME1 LIKE LFA1-NAME1,
    LAND1 LIKE LFA1-LAND1,
    ORT01 LIKE LFA1-ORT01,
    REGIO LIKE LFA1-REGIO,
    SORTL LIKE LFA1-SORTL,
    CFIELD(4) TYPE C,
    END OF ITAB.
    data:col(4).
    data:num value '1'.
    SELECT * FROM LFA1 INTO CORRESPONDING FIELDS OF TABLE ITAB WHERE LIFNR
    IN LIFNR.
    LOOP AT ITAB.
    concatenate 'C' num '10' into col .
    ITAB-CFIELD = col.
    num = num + 1.
    if num = '8'.
    num = '1'.
    endif.
    MODIFY ITAB.
    ENDLOOP.
    TYPE-POOLS:SLIS.
    DATA:FCAT TYPE SLIS_T_FIELDCAT_ALV.
    DATA:LAYOUT TYPE SLIS_LAYOUT_ALV.
    DATA:SORT TYPE slis_t_sortinfo_alv WITH HEADER LINE.
    DATA:EVE TYPE SLIS_T_EVENT WITH HEADER LINE.
    LAYOUT-COLWIDTH_OPTIMIZE = 'X'.
    LAYOUT-WINDOW_TITLEBAR = 'VENDORS DETAILS SCREEN'.
    LAYOUT-EDIT = 'X'.
    LAYOUT-info_fieldname = 'CFIELD'.
    CALL FUNCTION 'REUSE_ALV_FIELDCATALOG_MERGE'
    EXPORTING
    I_PROGRAM_NAME = SY-REPID
    I_INTERNAL_TABNAME = 'ITAB'
    I_INCLNAME = SY-REPID
    CHANGING
    CT_FIELDCAT = FCAT.
    CALL FUNCTION 'REUSE_ALV_LIST_DISPLAY'
    EXPORTING
    I_CALLBACK_PROGRAM = SY-REPID
    IS_LAYOUT = LAYOUT
    IT_FIELDCAT = FCAT
    TABLES
    T_OUTTAB = ITAB.
    this is for coloring cols
    REPORT ZBHCOLOR_COLS.
    TABLES:LFA1.
    SELECT-OPTIONS:C_LIFNR FOR LFA1-LIFNR. " FOR GRID ONLY
    PARAMETERS:LIST RADIOBUTTON GROUP ALV DEFAULT 'X',
    GRID RADIOBUTTON GROUP ALV.
    DATA:BEGIN OF ITAB OCCURS 0,
    LIFNR LIKE LFA1-LIFNR,
    NAME1 LIKE LFA1-NAME1,
    LAND1 LIKE LFA1-LAND1,
    ORT01 LIKE LFA1-ORT01,
    SORTL LIKE LFA1-SORTL,
    REGIO LIKE LFA1-REGIO,
    COL TYPE LVC_T_SCOL,
    END OF ITAB.
    DATA:COLR TYPE LVC_S_SCOL.
    SELECT * FROM LFA1 INTO CORRESPONDING FIELDS OF TABLE ITAB.
    LOOP AT ITAB.
    IF ITAB-LIFNR IN C_LIFNR.
    COLR-FNAME = 'NAME1'.
    COLR-COLOR-COL = '5'.
    COLR-COLOR-INT = '1'.
    COLR-COLOR-INV = '0'.
    COLR-NOKEYCOL = 'X'.
    APPEND COLR TO ITAB-COL.
    COLR-FNAME = 'LIFNR'.
    APPEND COLR TO ITAB-COL.
    MODIFY ITAB.
    ENDIF.
    ENDLOOP.
    TYPE-POOLS:SLIS.
    DATA:FCAT TYPE SLIS_T_FIELDCAT_ALV.
    DATA:LAYOUT TYPE SLIS_LAYOUT_ALV.
    LAYOUT-ZEBRA = 'X'.
    layout-coltab_fieldname = 'COL'.
    CALL FUNCTION 'REUSE_ALV_FIELDCATALOG_MERGE'
    EXPORTING
    I_PROGRAM_NAME = SY-REPID
    I_INTERNAL_TABNAME = 'ITAB'
    I_INCLNAME = SY-REPID
    CHANGING
    CT_FIELDCAT = FCAT.
    IF LIST = 'X'.
    CALL FUNCTION 'REUSE_ALV_LIST_DISPLAY'
    EXPORTING
    I_CALLBACK_PROGRAM = SY-REPID
    IS_LAYOUT = LAYOUT
    IT_FIELDCAT = FCAT
    TABLES
    T_OUTTAB = ITAB.
    ELSEIF GRID = 'X'.
    CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
    EXPORTING
    I_CALLBACK_PROGRAM = SY-REPID
    IS_LAYOUT = LAYOUT
    IT_FIELDCAT = FCAT
    TABLES
    T_OUTTAB = ITAB.
    ENDIF.
    Reward points if useful.

  • Alv report to have 2 lines for column header

    How do I set the column header to have 2 lines?
    eg
              Week Ending  --- 1st  line
               09.10.2007    ---  2nd line
    My report always ends up with 2 detail lines when I tried to insert it into the catalog.

    Try this it may help you for multiple values for one instance....
    *Type-pools
    TYPE-POOLS: slis.
    Data declarations.
    DATA: BEGIN OF t_vbak OCCURS 0,
    vbeln TYPE vbeln,
    bstnk TYPE vbak-bstnk,
    erdat TYPE vbak-erdat,
    kunnr TYPE vbak-kunnr,
    END OF t_vbak.
    DATA: BEGIN OF t_vbap OCCURS 0,
    vbeln TYPE vbeln,
    matnr TYPE vbap-matnr,
    netpr TYPE vbap-netpr,
    waerk TYPE vbap-waerk,
    kwmeng TYPE vbap-kwmeng,
    meins TYPE vbap-meins,
    END OF t_vbap.
    DATA: t_fieldcatalog1 TYPE slis_t_fieldcat_alv.
    DATA: t_fieldcatalog2 TYPE slis_t_fieldcat_alv.
    DATA: v_repid TYPE syrepid.
    DATA: s_layout TYPE slis_layout_alv.
    DATA: v_tabname TYPE slis_tabname.
    DATA: t_events TYPE slis_t_event.
    start-of-selection event.
    START-OF-SELECTION.
    v_repid = sy-repid.
    Get the fieldcatalog for the first block
    PERFORM get_fieldcat1 CHANGING t_fieldcatalog1.
    Get the fieldcatalog for the second block
    PERFORM get_fieldcat2 CHANGING t_fieldcatalog2.
    Get the data for the first block
    SELECT vbeln bstnk erdat kunnr UP TO 10 ROWS
    INTO TABLE t_vbak
    FROM vbak WHERE vbeln > '0060000100'.
    Get the data for the second block
    SELECT vbeln matnr netpr waerk kwmeng meins UP TO 10
    ROWS
    INTO TABLE t_vbap
    FROM vbap WHERE vbeln > '0060000100'.
    init
    CALL FUNCTION 'REUSE_ALV_BLOCK_LIST_INIT'
    EXPORTING
    i_callback_program = v_repid.
    First block
    v_tabname = 'ITAB1'.
    CALL FUNCTION 'REUSE_ALV_BLOCK_LIST_APPEND'
    EXPORTING
    is_layout = s_layout
    it_fieldcat = t_fieldcatalog1
    i_tabname = v_tabname
    it_events = t_events
    TABLES
    t_outtab = t_vbak.
    Second block
    v_tabname = 'ITAB2'.
    CALL FUNCTION 'REUSE_ALV_BLOCK_LIST_APPEND'
    EXPORTING
    is_layout = s_layout
    it_fieldcat = t_fieldcatalog2
    i_tabname = v_tabname
    it_events = t_events
    TABLES
    t_outtab = t_vbap.
    *Display
    CALL FUNCTION 'REUSE_ALV_BLOCK_LIST_DISPLAY'
    FORM GET_FIELDCAT1
    Get the field catalog for the first block
    FORM get_fieldcat1 CHANGING lt_fieldcatalog TYPE
    slis_t_fieldcat_alv.
    DATA: s_fieldcatalog TYPE slis_fieldcat_alv.
    Order number
    s_fieldcatalog-col_pos = '1'.
    s_fieldcatalog-fieldname = 'VBELN'.
    s_fieldcatalog-tabname = 'T_VBAK'.
    s_fieldcatalog-ref_tabname = 'VBAK'.
    s_fieldcatalog-ref_fieldname = 'VBELN'.
    APPEND s_fieldcatalog TO lt_fieldcatalog.
    CLEAR s_fieldcatalog.
    Customer purchase order.
    s_fieldcatalog-col_pos = '2'.
    s_fieldcatalog-fieldname = 'BSTNK'.
    s_fieldcatalog-tabname = 'T_VBAK'.
    s_fieldcatalog-ref_tabname = 'VBAK'.
    s_fieldcatalog-ref_fieldname = 'BSTNK'.
    APPEND s_fieldcatalog TO lt_fieldcatalog.
    CLEAR s_fieldcatalog.
    Creation date.
    s_fieldcatalog-col_pos = '3'.
    s_fieldcatalog-fieldname = 'ERDAT'.
    s_fieldcatalog-tabname = 'T_VBAK'.
    s_fieldcatalog-ref_tabname = 'VBAK'.
    s_fieldcatalog-ref_fieldname = 'ERDAT'.
    APPEND s_fieldcatalog TO lt_fieldcatalog.
    CLEAR s_fieldcatalog.
    Customer
    s_fieldcatalog-col_pos = '4'.
    s_fieldcatalog-fieldname = 'KUNNR'.
    s_fieldcatalog-tabname = 'T_VBAK'.
    s_fieldcatalog-ref_tabname = 'VBAK'.
    s_fieldcatalog-ref_fieldname = 'KUNNR'.
    APPEND s_fieldcatalog TO lt_fieldcatalog.
    CLEAR s_fieldcatalog.
    ENDFORM.
    FORM GET_FIELDCAT2
    Get the field catalog for the second block
    FORM get_fieldcat2 CHANGING lt_fieldcatalog TYPE
    slis_t_fieldcat_alv.
    DATA: s_fieldcatalog TYPE slis_fieldcat_alv.
    Order number
    s_fieldcatalog-col_pos = '1'.
    s_fieldcatalog-fieldname = 'VBELN'.
    s_fieldcatalog-tabname = 'T_VBAP'.
    s_fieldcatalog-ref_tabname = 'VBAP'.
    s_fieldcatalog-ref_fieldname = 'VBELN'.
    APPEND s_fieldcatalog TO lt_fieldcatalog.
    CLEAR s_fieldcatalog.
    Material number
    s_fieldcatalog-col_pos = '2'.
    s_fieldcatalog-fieldname = 'MATNR'.
    s_fieldcatalog-tabname = 'T_VBAP'.
    s_fieldcatalog-ref_tabname = 'VBAP'.
    s_fieldcatalog-ref_fieldname = 'MATNR'.
    APPEND s_fieldcatalog TO lt_fieldcatalog.
    CLEAR s_fieldcatalog.
    Net price
    s_fieldcatalog-col_pos = '3'.
    s_fieldcatalog-fieldname = 'NETPR'.
    s_fieldcatalog-tabname = 'T_VBAP'.
    s_fieldcatalog-ref_tabname = 'VBAP'.
    s_fieldcatalog-ref_fieldname = 'NETPR'.
    s_fieldcatalog-cfieldname = 'WAERK'.
    s_fieldcatalog-ctabname = 'T_VBAP'.
    APPEND s_fieldcatalog TO lt_fieldcatalog.
    CLEAR s_fieldcatalog.
    Currency.
    s_fieldcatalog-col_pos = '4'.
    s_fieldcatalog-fieldname = 'WAERK'.
    s_fieldcatalog-tabname = 'T_VBAP'.
    s_fieldcatalog-ref_tabname = 'VBAP'.
    s_fieldcatalog-ref_fieldname = 'WAERK'.
    APPEND s_fieldcatalog TO lt_fieldcatalog.
    CLEAR s_fieldcatalog.
    Quantity
    s_fieldcatalog-col_pos = '5'.
    s_fieldcatalog-fieldname = 'KWMENG'.
    s_fieldcatalog-tabname = 'T_VBAP'.
    s_fieldcatalog-ref_tabname = 'VBAP'.
    s_fieldcatalog-ref_fieldname = 'KWMENG'.
    s_fieldcatalog-qfieldname = 'MEINS'.
    s_fieldcatalog-qtabname = 'T_VBAP'.
    APPEND s_fieldcatalog TO lt_fieldcatalog.
    CLEAR s_fieldcatalog.
    UOM
    s_fieldcatalog-col_pos = '6'.
    s_fieldcatalog-fieldname = 'MEINS'.
    s_fieldcatalog-tabname = 'T_VBAP'.
    s_fieldcatalog-ref_tabname = 'VBAP'.
    s_fieldcatalog-ref_fieldname = 'MEINS'.
    APPEND s_fieldcatalog TO lt_fieldcatalog.
    CLEAR s_fieldcatalog.
    ENDFORM.
    ALV Report to have two different Reports
    Plz Reward points if contents are useful,,,

  • ALV Report: How to pass the variable in Work area to the FM ? Please help !

    I want to pass the field in the work area which contains the floating point numbers to FM 'FLTP_CHAR_CONVERSION_FROM_SI'. This the correct FM, I have tested.
    If I specify the field with Tab name in FM , It says its not an internal table with header line.
    Please help me, How should can I proceed further and pass the field to FM and get it back in work area.
    And an other issue is I want to sum the particular field in the output.
    Is there a way to do using 'PF-STATUS', if so how ? or what is the alternative for this ?
    Please help me with my issues.
    I'm new to ALV reports.
    Thanks in Advance !

    Hi,
    For your FM issue, i think you are trying to pass the field in the FM as ITAB-field, while you should be taking the data in the work area first and then pass this work area in the FM as WA_ITAB-field.
    I hope this will resolve your prob.
    I mean loop at the table and take the values into work area, update the internal table with changed value. This way by the end of loop you will have all your fields converted.
    Please explain a little more about your second doubt, it is unclear(to me atleast).
    Edited by: DeepakNagar on Jul 28, 2011 6:08 PM

  • ALV Report: Input on some line items

    Dear All,
    Can you please help me out in this requirement..
    I have a ALV report with checkbox. If I select some checkbox line items and click on Edit button(Custom button) those line items should get enabled and user should be able to input value for those line items. INPUT in fieldcatalog enables the entire set of output, not individually those line items.
    Please can you suggest on that?
    Thanks and regards,
    Atanu

    Hi,
    Herewith i am sending the sample code for the CHECKBOX ALV REPORT.
    TYPE-POOLS: slis.
    DATA: t_fieldcatalog TYPE slis_t_fieldcat_alv.
    DATA: s_fieldcatalog TYPE slis_fieldcat_alv.
    DATA: s_layout TYPE slis_layout_alv.
    DATA: BEGIN OF itab OCCURS 0,
    icon TYPE icon-id,
    vbeln TYPE vbeln,
    kunnr TYPE kunnr,
    erdat TYPE erdat,
    box TYPE c,
    END OF itab.
    DATA: v_repid TYPE syrepid.
    START-OF-SELECTION.
    Get the data.
    SELECT vbeln kunnr erdat UP TO 100 ROWS
    FROM vbak
    INTO CORRESPONDING FIELDS OF TABLE itab.
    IF sy-subrc <> 0.
    MESSAGE s208(00) WITH 'No data found'.
    LEAVE LIST-PROCESSING.
    ENDIF.
    Modify the record with red light.
    itab-icon = '@0A@'.
    MODIFY itab TRANSPORTING icon WHERE NOT vbeln IS initial.
    v_repid = sy-repid.
    Get the field catalog.
    CLEAR: s_fieldcatalog.
    s_fieldcatalog-col_pos = '1'.
    s_fieldcatalog-fieldname = 'ICON'.
    s_fieldcatalog-tabname = 'ITAB'.
    s_fieldcatalog-seltext_l = 'Status'.
    s_fieldcatalog-icon = 'X'.
    APPEND s_fieldcatalog TO t_fieldcatalog.
    CLEAR: s_fieldcatalog.
    s_fieldcatalog-col_pos = '2'.
    s_fieldcatalog-fieldname = 'VBELN'.
    s_fieldcatalog-tabname = 'ITAB'.
    s_fieldcatalog-rollname = 'VBELN'.
    APPEND s_fieldcatalog TO t_fieldcatalog.
    CLEAR: s_fieldcatalog.
    s_fieldcatalog-col_pos = '3'.
    s_fieldcatalog-fieldname = 'KUNNR'.
    s_fieldcatalog-tabname = 'ITAB'.
    s_fieldcatalog-rollname = 'KUNNR'.
    APPEND s_fieldcatalog TO t_fieldcatalog.
    CLEAR: s_fieldcatalog.
    s_fieldcatalog-col_pos = '4'.
    s_fieldcatalog-fieldname = 'ERDAT'.
    s_fieldcatalog-tabname = 'ITAB'.
    s_fieldcatalog-rollname = 'ERDAT'.
    APPEND s_fieldcatalog TO t_fieldcatalog.
    Set the layout.
    s_layout-box_fieldname = 'BOX'.
    CALL FUNCTION 'REUSE_ALV_LIST_DISPLAY'
    EXPORTING
    i_callback_program = v_repid
    is_layout = s_layout
    i_callback_pf_status_set = 'SET_PF_STATUS'
    i_callback_user_command = 'USER_COMMAND'
    it_fieldcat = t_fieldcatalog[]
    TABLES
    t_outtab = itab.
    FORM SET_PF_STATUS *
    --> EXTAB *
    FORM set_pf_status USING extab TYPE slis_t_extab.
    SET PF-STATUS 'TEST2'.
    ENDFORM.
    FORM user_command *
    --> UCOMM *
    --> SELFIELD *
    FORM user_command USING ucomm LIKE sy-ucomm
    selfield TYPE slis_selfield.
    Check the ucomm.
    IF ucomm = 'DETAIL'.
    LOOP AT itab WHERE box = 'X'.
    itab-icon = '@08@'.
    MODIFY itab TRANSPORTING icon.
    ENDLOOP.
    ENDIF.
    selfield-refresh = 'X'.
    ENDFORM.
    Thanks,
    Shankar

  • Save alv report as excel file directly from program

    Hello guys,
    I require this in my work.
    I want to save the ALV report tat is to be generated in the filepath that is given in the selection screen (want to save it locally eg: my windows desktop) and in the layout which is also given in the selection screen.
    your comments will be very much appreciated.
    Thanks in Advance,
    Johny

    Hi Johny,
    Actually we have an option to download report output in ALV but it does not download the specified on Selection-screen. For this Create on button for Excell download by setting PF status. and use USER_COMMAND event to trigger when u click on the button and download data to specified path.
    1.
    declare events table like this.
    data :
          i_events  type slis_t_event,
          w_events  like line of i_events.
    2.
    Build events table .
    w_events-name = 'USER_COMMAND' .
    w_events-form = 'USER_COMMAND' .
    append w_events to i_events.
    clear w_events.
    w_events-name = 'PF_STATUS_SET' .
    w_events-form = 'PF_STATUS_SET' .
    append w_events to i_events.
    clear w_events.
    3.
    pass this events table through REUSE_ALV_GRID_DISPLAY.
    4.
    USER_COMMAND and PF_STATUS_SET call back subroutines should be like this in your case. These are nowhere called using PERFORM statement in ur program.
    5.
    PF_STATUS_SET' subroutine should be like this.
    *&      Form  pf_status_set
    form pf_status_set    using extab type slis_t_extab.
    set pf-status 'STATUS1' excluding g_extab.
    "If you write like above Standard status will be gone.
    "For that u have to copy standard status of any ALV program which has standard status.
    "1. goto SE41 tcode. give program SAPLKKBL and status :STANDARD_FULLSCREEN .
    2.Click on the Copy status button below program is ur program and status ur program status.
    3. After that create your own button for Excel downlod.
    endform.                    "pf_status_set
    6.
    USER_COMMAND subroutine should be like this.
    *&      Form  user_command
    form user_command using ucomm like sy-ucomm
                      selfield type slis_selfield.
      case ucomm .
        when 'XLS_DOWN'.
        perform download_to_xls.
      endcase.
    endform.                    "user_command
    Here is the sample program to download data into Excel file with header and Columns..
    Check this program by running.
    *& Report  ZVENKAT_DOWNLOAD_XLS_WITH_HEAD
    REPORT  zvenkat_download_xls_with_head.
    "  Data retrieval related declarations
    TYPES:
         BEGIN OF t_emp_dat,
           pernr TYPE pa0001-pernr,
           persg TYPE pa0001-persg,
           persk TYPE pa0001-persk,
           plans TYPE pa0001-plans,
           stell TYPE pa0001-stell,
         END OF t_emp_dat,
         t_attachment TYPE  solisti1.
    DATA:
         w_emp_data TYPE t_emp_dat,
         w_attachment     TYPE  t_attachment.
    DATA:
         i_emp_data TYPE STANDARD TABLE OF t_emp_dat,
         i_attachment     TYPE STANDARD TABLE OF t_attachment.
    PARAMETERS: p_file TYPE string DEFAULT 'c:\tmp\test.xls'.
    "Start-of-selection.
    START-OF-SELECTION.
      PERFORM get_data.
      PERFORM build_xls_data_and_download.
      "Form  get_data from PA0001
    FORM get_data.
      SELECT pernr
             persg
             persk
             plans
             stell
       FROM pa0001
       INTO CORRESPONDING FIELDS OF TABLE i_emp_data
       UP TO 4 ROWS.
    ENDFORM.                    " get_data
    "Form  build_xls_data_and_download
    FORM build_xls_data_and_download.
      "If you have Unicode check active in program attributes then
      "you will need to declare constants as follows.
      CLASS cl_abap_char_utilities DEFINITION LOAD.
      CONSTANTS:
          con_tab  TYPE c VALUE cl_abap_char_utilities=>horizontal_tab,
          con_cret TYPE c VALUE cl_abap_char_utilities=>cr_lf.
      DATA :l_lines TYPE char10.
      DESCRIBE TABLE i_emp_data LINES l_lines.
      CONCATENATE 'Total no of records:' l_lines
             INTO  w_attachment
    SEPARATED BY  con_tab.
      CONCATENATE con_cret
                  w_attachment
             INTO w_attachment.
      APPEND w_attachment TO i_attachment.
      CLEAR  w_attachment.
      CONCATENATE 'PERNR' 'PERSG' 'PERSK' 'PLANS' 'STELL'
             INTO  w_attachment
    SEPARATED BY  con_tab.
      CONCATENATE con_cret
                  w_attachment
             INTO w_attachment.
      APPEND w_attachment TO i_attachment.
      CLEAR  w_attachment.
      LOOP AT i_emp_data INTO w_emp_data.
        CONCATENATE w_emp_data-pernr
                    w_emp_data-persg
                    w_emp_data-persk
                    w_emp_data-plans
                    w_emp_data-stell
               INTO w_attachment
       SEPARATED BY con_tab.
        CONCATENATE con_cret w_attachment
               INTO w_attachment.
        APPEND w_attachment TO i_attachment.
        CLEAR  w_attachment.
      ENDLOOP.
      CALL FUNCTION 'GUI_DOWNLOAD'
        EXPORTING
          filename              = p_file
          write_field_separator = con_tab
        TABLES
          data_tab              = i_attachment.
      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.                    "build_xls_data_and_download
    I hope that it helps u .
    Regards,
    Venkat.O

  • Alv report headings in two lines

    Hi all,
    I have created an ALV report. Now the requirement is that the 60 odd columns should be divided into 3 parts.
    The first 20 colums come under a common heading above the column heading.
    21 to 40 come under another heading and so on.
    How can I give two lines of column headings.
    It should look like this.
    Project                 No of Enquiries                           Sales orders
                       col1     col2     col3.....                  col21   col22        col23...
    Please help.
    Regards,
    BP

    in the field catalog u will have an option to mention the row position.. check that..
    fc-fieldname = 'KUNRES'.
    fc-row_pos = '2'.            "<< this is what u needed..
    fc-seltext_s = 'Total'.
    fc-do_sum = 'X'.
    APPEND fc. CLEAR fc.
    CALL FUNCTION 'REUSE_ALV_HIERSEQ_LIST_DISPLAY'
    EXPORTING
    i_interface_check = ' '
    i_callback_program = alv_repid
    i_callback_pf_status_set = 'SET_STATUS'
    i_callback_user_command = 'USER_COMMAND'
    is_layout = alv_layout
    it_fieldcat = fc[]             "<<<<<<<<<<<<fiedl catalog here..
    i_default = 'X'
    i_save = 'A'
    is_variant = alv_variant
    i_tabname_header = 'HEADER'
    i_tabname_item = 'LIST'
    is_keyinfo = alv_keyinfo
    is_print = alv_print
    TABLES
    t_outtab_header = header
    t_outtab_item = list.

  • In ALV report how to do this..

    Hi,
         I worte one zreport,  it displays the output in the Grid format.
         Goto tr code : coois-> give some material number u will get output in the grid format..->above the grid u will look the bar on that u will see  ENDUSER DOC, DISPLAY GRAPHIC, LAYOUT SETTINGS....
    My requirement is :  I have to add this bar to my grid report, please explain to me.
    Thanks and Regards,
    Surya

    Hi Jai.
    We can not display barcode in ALV but in Smartform  and Script is possible becuase we can set font "BARCODE" or any fonts to our variable.
    What you should do is create general ALV report ,Smatform for printing barcode and botton for call
    Smartform  in ALV program.When a line is selected and click botton then take data in that line and call
    Smartform for printing barcode that what I have done.
    Hope it help .
    SayC.

  • ALV Graphs: How to set line type graph as default graph

    Hi All,
    I need to develop a line graph. The fields on the X-axis will change dynamically. Some times they may be 10 field and some times they may be more than 100 fields. I tried with Function Module GFW_PRES_SHOW_MULT. But I can only display maximum 32 fields. Can anyone tell me exact program which helps me to full fill my requirement. It will be a great help if you could told how do display line type graph as default graph in ALV.  In REUSE_ALV_GRID_DISPLAY there is a Exporting parameter MT_CHART_TYPES but this help you only to enter description for X-axis and Y-axis.
    Many thanks in advance.

    I would call GRAPH_MATRIX_2D with options depending on representation you wish
    look at the program GRBUSG_1 to see how to use it
    there you have some options to display bar chart, but you could use other values (complete list of options is available in documentation of function module GRAPH_MATRIX_2D - click on parameter OPTS in help display to see full explanation)
    exemple:
    P2TYPE = LN to display lines

Maybe you are looking for

  • I have messages in mail that are color-coded as if by a rule, but I have no rules set. How can I correct this?

    The only rule that I ever had in Mail was the default one that color coded messages from Apple blue. I notice that some messages are color-coded brown and I have no rules set at al (hence no rule to turn off.)  Some of the messages are related to vie

  • Warning message displayed in Check Status transaction

    Hello SRM experts, In Check status transaction, in some case a warning message is displayed: Warning: 'Delete (BBP)' (shopping cart 2325215). It's not blocking message but I would like to know in which case this message, in which include it's display

  • A normal question on programming

    When programming, samples are very important. When I get a new function of java, how can I find some samples of it. The java language specification is very useful, but it doesn't include code samples. Please recommend a good way or a good place to so

  • 64 bit version of Ultranav driver not available for download

    Using either Update Retriever or System Update, version 7.202.1616.206 of the ThinkPad UltraNav Driver 2 (Alps) 64 bit is missing from the System Update catalogue. Package ID: 6EGY02WW is not presented. Only the 32 bit version (Package ID: 6EGX02WW)

  • Two users, one mail account

    We have one e-mail account in this household, but two adults living here. How do I set up Mail so that my wife can used the dropdown FROM menu in the New Message pane to show that any e-mail she sends came from her rather than from me? I've tried set