How To Add Two Heading in ALV Report

Hello Guys,
Currently I am Working on a report Contain 45 Column. Each 45 Column have there own heading like Days Target,Days Achieve..like this.
Our Requirement is That
1.Upper side of the First 10 Column one more heading required like Production  Details .
2. From 11 to 20 One More Heading Called Furnace Oil. like that only.
I ask users That is not possible in ALV but they are adhere to that requirement.
Can it's is possible in ALV Grid To have a two Heading Column.
Thanks in Advance.
Regards
Swati Namdev

Hi swati,
Normally the specified requirment is not possible with the ALV...
But you can try with the tricky way... where you need to use the Hierarchical ALV.
Here you need to specify the two fields in the header table for the specified headings, and you need to declare these two fields in the item table also.
But in this case you will have one blank line on the report output(for the header data).
Regards,
Satya.

Similar Messages

  • How to add two columns in OBIEE report?

    Hi to All,
    Can anyone tell me how to add two columns in OBIEE report and get that result in a new column?
    Thanks in Advance,
    Thenmozhi

    Assume you already have two columns SalesAmt1 and SalesAmt2, and you want to derive 3rd column say SalesAmt3 which would be the sum of SalesAmt1 and SalesAmt2.
    For this, as I mentioned above pull SalesAmt1 and SalesAmt2 columns in Report. Now pull another column (say SalesAmt1) and open the fx. Clear the contents of fx. Now locate the columns button in the bottom of the fx. From Here, first select SalesAmt1 and + sign and the select SalesAmt2.
    Now in this new column, the fx should look like SalesAmt1 + SalesAmt2.
    Let me know if you are looking for something else.
    Thanks

  • How to display two lables in alv report

    Is there any chance to display two lables in alv report
    for example..
    AMOUNT
    Rs | Ps
       |
    like that this for an example.
    thanks,
    JB

    Hai Babu
    Go through the following Code
    using Classes & Methods
    try with the following Code( Just copy the code & try with in SE38 Tcode & Execute it that all)
    REPORT ZALV_SALES_HEADER_DETAIL MESSAGE-ID Z50650(MSG) .
    TABLES
    TABLES: VBAK . "SALES DOCUMENT HEADER
    DATA OBJECTS DECLARATION
    DATA: IT_VBAK TYPE STANDARD TABLE OF ZVBAK_STRUC,
    IT_VBAP TYPE STANDARD TABLE OF ZVBAP_STRUC,
    GS_LAYOUT TYPE LVC_S_LAYO,
    GS1_LAYOUT TYPE LVC_S_LAYO,
    GRID TYPE REF TO CL_GUI_ALV_GRID,
    CUSTOM_CONTAINER TYPE REF TO CL_GUI_CUSTOM_CONTAINER,
    VBAK_CONTAINER TYPE REF TO CL_GUI_CONTAINER,
    VBAP_CONTAINER TYPE REF TO CL_GUI_CONTAINER,
    WA_VBAK LIKE LINE OF IT_VBAK,
    WA_VBAP LIKE LINE OF IT_VBAP,
    SPLITTER TYPE REF TO CL_GUI_SPLITTER_CONTAINER,
    TOP_OF_PAGE_CONTAINER TYPE REF TO CL_GUI_CONTAINER,
    GRID_VBAP TYPE REF TO CL_GUI_ALV_GRID,
    TOP_PAGE TYPE REF TO CL_DD_DOCUMENT,
    FLAG(1).
    *"EVENT RECIEVER CLASS DEFINITION
    CLASS LCL_EVENT_RECIEVER DEFINITION DEFERRED.
    DATA: OBJ_EVENT TYPE REF TO LCL_EVENT_RECIEVER.
    SELECTION-SCREEN
    SELECTION-SCREEN: BEGIN OF BLOCK B1 WITH FRAME TITLE TEXT-001.
    SELECT-OPTIONS: S_VBELN FOR VBAK-VBELN.
    PARAMETERS: P_VBTYP LIKE VBAK-VBTYP DEFAULT 'C'.
    SELECTION-SCREEN: END OF BLOCK B1.
    CLASS DEFINITION AND DECLARATIONS
    CLASS LCL_EVENT_RECIEVER DEFINITION.
    PUBLIC SECTION.
    EVENTS:DOUBLE_CLICK,
    TOP_OF_PAGE.
    METHODS:HANDLE_DOUBLE_CLICK FOR EVENT DOUBLE_CLICK OF CL_GUI_ALV_GRID
    IMPORTING E_ROW .
    METHODS: HANDLE_TOP_OF_PAGE FOR EVENT TOP_OF_PAGE OF CL_GUI_ALV_GRID.
    ENDCLASS. "LCL_EVENT_RECIEVER DEFINITION
    CLASS LCL_EVENT_RECIEVER IMPLEMENTATION
    CLASS LCL_EVENT_RECIEVER IMPLEMENTATION.
    METHOD: HANDLE_DOUBLE_CLICK.
    READ TABLE IT_VBAK INDEX E_ROW-INDEX INTO WA_VBAK.
    PERFORM FETCH_ITEM_DETAILS USING WA_VBAK.
    PERFORM ALV_GRID.
    ENDMETHOD. "HANDLE_DOUBLE_CLICK
    METHOD: HANDLE_TOP_OF_PAGE.
    CALL METHOD TOP_PAGE->ADD_TEXT
    EXPORTING
    TEXT = 'SALES HEADER & ITEM DETAILS'.
    CALL METHOD TOP_PAGE->DISPLAY_DOCUMENT
    EXPORTING
    PARENT = TOP_OF_PAGE_CONTAINER.
    ENDMETHOD. "HANDLER_TOP_OF_PAGE
    ENDCLASS. "LCL_EVENT_RECIEVER IMPLEMENTATION
    AT SELECTION-SCREEN
    AT SELECTION-SCREEN.
    IF S_VBELN IS NOT INITIAL.
    SELECT COUNT(*)
    FROM VBAK
    WHERE VBELN IN S_VBELN.
    IF SY-DBCNT = 0.
    MESSAGE E000 WITH 'NO TABLE ENTRIES FOUND FOR LOW KEY SPECIFIED'.
    ENDIF.
    ENDIF.
    START-OF-SELECTION.
    START-OF-SELECTION.
    PERFORM FETCH_SALES_HEADER_RECORD.
    PERFORM CREATE_CALL. "CREATION OF OBJECTS & CALLING METHODS
    END-OF-SELECTION.
    END-OF-SELECTION.
    *& Module STATUS_0100 OUTPUT
    text
    MODULE STATUS_0100 OUTPUT.
    SET PF-STATUS 'ZSTATUS'.
    SET TITLEBAR 'xxx'.
    ENDMODULE. " STATUS_0100 OUTPUT
    *& Form FETCH_SALES_HEADER_RECORD
    text
    --> p1 text
    <-- p2 text
    FORM FETCH_SALES_HEADER_RECORD .
    SELECT
    VBELN
    AUDAT
    VBTYP
    AUART
    AUGRU
    NETWR
    WAERK
    FROM VBAK
    INTO CORRESPONDING FIELDS OF TABLE IT_VBAK
    WHERE VBELN IN S_VBELN
    AND VBTYP = P_VBTYP.
    ENDFORM. " FETCH_SALES_HEADER_RECORD
    *& Form CREATE_CALL
    text
    --> p1 text
    <-- p2 text
    FORM CREATE_CALL .
    IF CUSTOM_CONTAINER IS INITIAL.
    CREATE OBJECT CUSTOM_CONTAINER
    EXPORTING
    PARENT =
    CONTAINER_NAME = 'CUSTOM_CONTAINER'
    STYLE =
    LIFETIME = lifetime_default
    REPID =
    DYNNR =
    NO_AUTODEF_PROGID_DYNNR =
    EXCEPTIONS
    CNTL_ERROR = 1
    CNTL_SYSTEM_ERROR = 2
    CREATE_ERROR = 3
    LIFETIME_ERROR = 4
    LIFETIME_DYNPRO_DYNPRO_LINK = 5
    OTHERS = 6
    IF SY-SUBRC <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
    WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    ENDIF.
    CREATE OBJECT SPLITTER
    EXPORTING
    TOP = 5
    PARENT = CUSTOM_CONTAINER
    ROWS = 3
    COLUMNS = 1
    EXCEPTIONS
    CNTL_ERROR = 1
    CNTL_SYSTEM_ERROR = 2
    OTHERS = 3
    IF SY-SUBRC <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
    WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    ENDIF.
    CALL METHOD SPLITTER->GET_CONTAINER
    EXPORTING
    ROW = 1
    COLUMN = 1
    RECEIVING
    CONTAINER = TOP_OF_PAGE_CONTAINER.
    CALL METHOD SPLITTER->GET_CONTAINER
    EXPORTING
    ROW = 2
    COLUMN = 1
    RECEIVING
    CONTAINER = VBAK_CONTAINER.
    CALL METHOD SPLITTER->GET_CONTAINER
    EXPORTING
    ROW = 3
    COLUMN = 1
    RECEIVING
    CONTAINER = VBAP_CONTAINER.
    CREATE OBJECT GRID
    EXPORTING
    I_SHELLSTYLE = 0
    I_LIFETIME =
    I_PARENT = VBAK_CONTAINER
    I_APPL_EVENTS = space
    I_PARENTDBG =
    I_APPLOGPARENT =
    I_GRAPHICSPARENT =
    I_NAME =
    EXCEPTIONS
    ERROR_CNTL_CREATE = 1
    ERROR_CNTL_INIT = 2
    ERROR_CNTL_LINK = 3
    ERROR_DP_CREATE = 4
    OTHERS = 5
    IF SY-SUBRC <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
    WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    ENDIF.
    GS_LAYOUT-GRID_TITLE = 'SALES HEADER DETAILS.'(100).
    CALL METHOD GRID->SET_TABLE_FOR_FIRST_DISPLAY
    EXPORTING
    I_BUFFER_ACTIVE =
    I_BYPASSING_BUFFER =
    I_CONSISTENCY_CHECK =
    I_STRUCTURE_NAME = 'ZVBAK_STRUC'
    IS_VARIANT =
    I_SAVE =
    I_DEFAULT = 'X'
    IS_LAYOUT = GS_LAYOUT
    IS_PRINT =
    IT_SPECIAL_GROUPS =
    IT_TOOLBAR_EXCLUDING =
    IT_HYPERLINK =
    IT_ALV_GRAPHICS =
    IT_EXCEPT_QINFO =
    CHANGING
    IT_OUTTAB = IT_VBAK
    IT_FIELDCATALOG =
    IT_SORT =
    IT_FILTER =
    EXCEPTIONS
    INVALID_PARAMETER_COMBINATION = 1
    PROGRAM_ERROR = 2
    TOO_MANY_LINES = 3
    OTHERS = 4
    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.
    CREATE OBJECT OBJ_EVENT .
    SET HANDLER OBJ_EVENT->HANDLE_DOUBLE_CLICK FOR GRID.
    SET HANDLER OBJ_EVENT->HANDLE_TOP_OF_PAGE FOR GRID.
    CREATE OBJECT TOP_PAGE
    EXPORTING
    STYLE = 'ALV_GRID'
    CALL METHOD TOP_PAGE->INITIALIZE_DOCUMENT.
    CALL METHOD GRID->LIST_PROCESSING_EVENTS
    EXPORTING
    I_EVENT_NAME = 'TOP_OF_PAGE'
    I_DYNDOC_ID = TOP_PAGE.
    CALL SCREEN 100.
    ENDFORM. " CREATE_CALL
    *& Module USER_COMMAND_0100 INPUT
    text
    MODULE USER_COMMAND_0100 INPUT.
    CASE SY-UCOMM.
    WHEN 'EXIT'.
    LEAVE PROGRAM.
    WHEN 'BACK'.
    LEAVE TO SCREEN 0.
    ENDCASE.
    ENDMODULE. " USER_COMMAND_0100 INPUT
    *& Form FETCH_ITEM_DETAILS
    text
    --> p1 text
    <-- p2 text
    FORM FETCH_ITEM_DETAILS USING WA_VBAK TYPE ZVBAK_STRUC .
    SELECT
    VBELN
    POSNR
    MATNR
    MATWA
    PMATN
    CHARG
    FROM VBAP
    INTO TABLE IT_VBAP
    WHERE VBELN = WA_VBAK-VBELN.
    IF SY-SUBRC <> 0.
    MESSAGE E000 WITH 'NO RECORDS FOUND FOR SPECIFIED KEY'.
    ENDIF.
    ENDFORM. " FETCH_ITEM_DETAILS
    *& Module STATUS_0200 OUTPUT
    text
    MODULE STATUS_0200 OUTPUT.
    SET PF-STATUS 'ZSTATUS'.
    SET TITLEBAR 'xxx'.
    ENDMODULE. " STATUS_0200 OUTPUT
    *& Module USER_COMMAND_0200 INPUT
    text
    MODULE USER_COMMAND_0200 INPUT.
    CASE SY-UCOMM.
    WHEN 'EXIT'.
    LEAVE PROGRAM.
    WHEN 'BACK'.
    LEAVE TO SCREEN 0.
    ENDCASE.
    ENDMODULE. " USER_COMMAND_0200 INPUT
    *& Form alv_grid
    text
    --> p1 text
    <-- p2 text
    FORM ALV_GRID .
    IF FLAG = ''.
    FLAG = 'X'.
    CREATE OBJECT GRID_VBAP
    EXPORTING
    I_SHELLSTYLE = 0
    I_LIFETIME =
    I_PARENT = VBAP_CONTAINER
    I_APPL_EVENTS = space
    I_PARENTDBG =
    I_APPLOGPARENT =
    I_GRAPHICSPARENT =
    I_NAME =
    EXCEPTIONS
    ERROR_CNTL_CREATE = 1
    ERROR_CNTL_INIT = 2
    ERROR_CNTL_LINK = 3
    ERROR_DP_CREATE = 4
    others = 5
    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.
    GS1_LAYOUT-GRID_TITLE = 'SALES ITEM DETAILS.'(100).
    CALL METHOD GRID_VBAP->SET_TABLE_FOR_FIRST_DISPLAY
    EXPORTING
    I_BUFFER_ACTIVE =
    I_BYPASSING_BUFFER =
    I_CONSISTENCY_CHECK =
    I_STRUCTURE_NAME = 'ZVBAP_STRUC'
    IS_VARIANT =
    I_SAVE =
    I_DEFAULT = 'X'
    IS_LAYOUT = GS1_LAYOUT
    IS_PRINT =
    IT_SPECIAL_GROUPS =
    IT_TOOLBAR_EXCLUDING =
    IT_HYPERLINK =
    IT_ALV_GRAPHICS =
    IT_EXCEPT_QINFO =
    CHANGING
    IT_OUTTAB = IT_VBAP
    IT_FIELDCATALOG =
    IT_SORT =
    IT_FILTER =
    EXCEPTIONS
    INVALID_PARAMETER_COMBINATION = 1
    PROGRAM_ERROR = 2
    TOO_MANY_LINES = 3
    OTHERS = 4
    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_grid
    Thansk & regards
    Sreenivasulu P

  • How to add two heading in fieldcatlog

    Hello Exprets,
    I have an ALV report, in which I want two dispaly two header line... I don't no how to do that.
    for example.
    Class 10
    Class 11
    Class 12
    Class-A
    Class-B
    Class-C
    Class-D
    Class-A
    Class-B
    Class-C
    Class-D
    Class-A
    Class-B
    Class-C
    Class-D
    Can anyone please guide me in this issue.
    Thanks

    Hi Chetan,
    Try this program. It works.
    REPORT ZTEST_PROGRAM.
    DATA: BEGIN OF it_data OCCURS 0,
            header1 TYPE char50,
            header2 TYPE char50,
            arbgb TYPE t100-arbgb,
            msgnr TYPE t100-msgnr,
            text TYPE t100-text,
          END OF it_data.
    *ALV Declarations
    TYPE-POOLS:slis.
    TYPES:
       ty_fieldcat          TYPE slis_fieldcat_alv,
       ty_events            TYPE slis_alv_event,
       ty_layout            TYPE slis_layout_alv.
    DATA:
       wa_fieldcat          TYPE ty_fieldcat,
       wa_events            TYPE ty_events,
       wa_layout            TYPE ty_layout.
    DATA:
       it_events            TYPE STANDARD TABLE OF ty_events,
       it_fieldcat          TYPE STANDARD TABLE OF ty_fieldcat.
    DATA:
       g_program            TYPE sy-repid.
    START-OF-SELECTION.
      SELECT * FROM t100 INTO CORRESPONDING FIELDS OF TABLE it_data
      UP TO 20 ROWS WHERE sprsl = sy-langu.
    *Fieldcatalog.
      PERFORM fieldcatalog
      USING:                            "Field Lengths
      1 1 'HEADER1' 'IT_DATA' 'HEADER1' '30',
      1 2 'HEADER2' 'IT_DATA' 'HEADER2' '73',
      2 3 'ARBGB'   'IT_DATA' 'ARBGB'   '20',
      2 4 'MSGNR'   'IT_DATA' 'MSGNR'   '10',
      2 5 'TEXT'    'IT_DATA' 'TEXT'    '73'.
      wa_layout-info_fieldname = 'COLOR'.
      g_program = sy-repid.
      CALL FUNCTION 'REUSE_ALV_LIST_DISPLAY'
        EXPORTING
          i_callback_program = g_program
          is_layout          = wa_layout
          it_fieldcat        = it_fieldcat
          it_events          = it_events
        TABLES
          t_outtab           = it_data
        EXCEPTIONS
          program_error      = 1
          OTHERS             = 2.
    *&      Form  FIELDCATALOG
    FORM fieldcatalog USING row_pos col_pos field table f_txt outputlen.
      wa_fieldcat-row_pos   = row_pos.
      wa_fieldcat-col_pos   = col_pos.
      wa_fieldcat-fieldname = field.
      wa_fieldcat-tabname   = table.
      wa_fieldcat-seltext_l = f_txt.
      wa_fieldcat-outputlen = outputlen.
      APPEND wa_fieldcat TO it_fieldcat.
      CLEAR  wa_fieldcat.
    ENDFORM.                    " FIELDCATALOG
    Thanks
    Venkat.O

  • How to add link in the ALV report?

    Hi ,
      Now, I want to turn to a t-code (e.x.  Va03) after double click column for order of ALV report.
      Is it possible? what i should do?
    Thanl you all~

    Yes  , it is Possible  in ALV  .
    From the  Sales order Field (VBLEN)  in the Basic List to Sales Order Display TrascationCode  : (VA03).
    Here is the Sample code  for Purchase  Order Display .
    REPORT  zdemo_alvgrid                 .
    TABLES:     ekko.
    type-pools: slis.                                 "ALV Declarations
    *Data Declaration
    TYPES: BEGIN OF t_ekko,
      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,
          gt_events     type slis_t_event,
          gd_prntparams type slis_print_alv.
    *Start-of-selection.
    START-OF-SELECTION.
    perform data_retrieval.
    perform build_fieldcatalog.
    perform build_layout.
    perform build_events.
    perform build_print_params.
    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'.
      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-no_input          = 'X'.
      gd_layout-colwidth_optimize = 'X'.
      gd_layout-totals_text       = 'Totals'(201).
    gd_layout-totals_only        = 'X'.
    gd_layout-f2code            = 'DISP'.  "Sets fcode for when double
                                            "click(press f2)
    gd_layout-zebra             = 'X'.
    gd_layout-group_change_edit = 'X'.
    gd_layout-header_text       = 'helllllo'.
    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_events
                is_print                = gd_prntparams
                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 table it_ekko.
    endform.                    " DATA_RETRIEVAL
    Form  TOP-OF-PAGE                                                 *
    ALV Report Header                                                 *
    Form top-of-page.
    *ALV Header declarations
    data: t_header type slis_t_listheader,
          wa_header type slis_listheader,
          t_line like wa_header-info,
          ld_lines type i,
          ld_linesc(10) type c.
    Title
      wa_header-typ  = 'H'.
      wa_header-info = 'EKKO Table Report'.
      append wa_header to t_header.
      clear wa_header.
    Date
      wa_header-typ  = 'S'.
      wa_header-key = 'Date: '.
      CONCATENATE  sy-datum+6(2) '.'
                   sy-datum+4(2) '.'
                   sy-datum(4) INTO wa_header-info.   "todays date
      append wa_header to t_header.
      clear: wa_header.
    Total No. of Records Selected
      describe table it_ekko lines ld_lines.
      ld_linesc = ld_lines.
      concatenate 'Total No. of Records Selected: ' ld_linesc
                        into t_line separated by space.
      wa_header-typ  = 'A'.
      wa_header-info = t_line.
      append wa_header to t_header.
      clear: wa_header, t_line.
      call function 'REUSE_ALV_COMMENTARY_WRITE'
           exporting
                it_list_commentary = t_header.
               i_logo             = 'Z_LOGO'.
    endform.
          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.
      ENDCASE.
    ENDFORM.
    *&      Form  BUILD_EVENTS
          Build events table
    form build_events.
      data: ls_event type slis_alv_event.
      call function 'REUSE_ALV_EVENTS_GET'
           exporting
                i_list_type = 0
           importing
                et_events   = gt_events[].
      read table gt_events with key name =  slis_ev_end_of_page
                               into ls_event.
      if sy-subrc = 0.
        move 'END_OF_PAGE' to ls_event-form.
        append ls_event to gt_events.
      endif.
        read table gt_events with key name =  slis_ev_end_of_list
                               into ls_event.
      if sy-subrc = 0.
        move 'END_OF_LIST' to ls_event-form.
        append ls_event to gt_events.
      endif.
    endform.                    " BUILD_EVENTS
    *&      Form  BUILD_PRINT_PARAMS
          Setup print parameters
    form build_print_params.
      gd_prntparams-reserve_lines = '3'.   "Lines reserved for footer
      gd_prntparams-no_coverpage = 'X'.
    endform.                    " BUILD_PRINT_PARAMS
    *&      Form  END_OF_PAGE
    form END_OF_PAGE.
      data: listwidth type i,
            ld_pagepos(10) type c,
            ld_page(10)    type c.
      write: sy-uline(50).
      skip.
      write:/40 'Page:', sy-pagno .
    endform.
    *&      Form  END_OF_LIST
    form END_OF_LIST.
      data: listwidth type i,
            ld_pagepos(10) type c,
            ld_page(10)    type c.
      skip.
      write:/40 'Page:', sy-pagno .
    endform.
    Reward  Points if it is usefull,,,
    Girish

  • How to get two header colums using alv?

    Hi,
    experts,
    I want to display alv output with two header columns like shows below:
    Subjects
    |   English       |         Maths       |     Science     |    Social   |         Politics                   |                
    100
    56
    89
    12
    85
    25
    85
    36
    78
    100
    75
    55
    65
    74
    100
    How to acheive this by using ALV Grid dispaly. please end me any document on this .
    Thanks in advance,
    Shabeer Ahmed.

    Hi,
    Please check the link given below :
    Two column header in ALV Report
    hope it will help you.
    Thanks & Regards,
    Sarita Singh Rathour

  • How we add & grandtotal of sales order report in alv

    hi guru how we add & grandtotal of sales order report in alv
    regards
    subhasis

    hi subhasis,
    since u want the grand total in ALV use the following code...
    clear gs_fieldcat.
    gs_fieldcat-fieldname = field.
    gs_fieldcat-tabname = DB table
    gs_fieldcat-seltext_m = text.
    gs_fieldcat-do_sum = 'X'
    gs_fieldcat-datatype = data type (Curr or Quant)
    gs_fieldcat-ref_fieldname = reference field name
    gs_fieldcat-ref_tabname  = reference table name
    append gs_fieldcat to gt_fieldcat.
    hope this will work...
    please reward points in case usefull
    regards,
    prashant

  • How to create check box in ALV Reports?

    how to create check box in ALV Reports?

    Hi
    check the report  BCALV_TEST_GRID_EDITABLE
    or
    check this report
    REPORT ZRFC346_TST.
    TABLES:SFLIGHT,RL034.
    TYPE-POOLS:SLIS.
    INCLUDE:<ICON>,<SYMBOL>.
    DATA: G_REPID          LIKE SY-REPID,
          G_FIELDCAT       TYPE SLIS_T_FIELDCAT_ALV,
          G_IT_SORT        TYPE SLIS_T_SORTINFO_ALV,
          G_LAYOUT         TYPE SLIS_LAYOUT_ALV,
          G_TABNAME_HEADER TYPE SLIS_TABNAME,
          G_TABNAME_ITEM   TYPE SLIS_TABNAME,
          G_KEYINFO        TYPE SLIS_KEYINFO_ALV,
          G_VARIANT        LIKE DISVARIANT,
          G_EXTAB          TYPE SLIS_T_EXTAB,
          I_SLIS_EXIT_BY_USER TYPE SLIS_EXIT_BY_USER.
    DATA: XEVENT         TYPE SLIS_T_EVENT,
          AEVENT         TYPE SLIS_ALV_EVENT,
          VARIANT        LIKE DISVARIANT,
          LAYOUT         TYPE SLIS_LAYOUT_ALV,
          ASP_GROUP      TYPE SLIS_SP_GROUP_ALV,
          GT_SP_GROUP TYPE SLIS_T_SP_GROUP_ALV,
          EXTAB          TYPE SLIS_T_EXTAB WITH HEADER LINE,
          XFIELD         TYPE SLIS_T_FIELDCAT_ALV,
          AFIELD         TYPE SLIS_FIELDCAT_ALV,
          G_SUCOMM      LIKE SY-UCOMM,
          G_SELFLD       TYPE SLIS_SELFIELD.
    DATA: SAV_SY_REPID      LIKE SY-REPID.
    CONSTANTS: CON_SFLIGHT TYPE LVC_FNAME VALUE 'SFLIGHT',
               CON_DISPLAY_FULL TYPE I VALUE 3.
    Data to be displayed
    DATA: BEGIN OF GT_SFLIGHT OCCURS 0.
            INCLUDE STRUCTURE SFLIGHT.
    DATA:ACTIVATE(1).
    DATA: END OF GT_SFLIGHT.
    INITIALIZATION.
    *........Initialisierung...............................................
      PERFORM INITIALIZATION_RL034.
    *........Field cata....................................................
      PERFORM FIELD_CAT.
    *........SPECIAL GROUP.................................................
      PERFORM E07_SP_GROUP_BUILD USING GT_SP_GROUP[].
    START-OF-SELECTION.
    Selection
      SELECT * FROM SFLIGHT INTO TABLE GT_SFLIGHT.
    *........ALV CALL.......................................................
      PERFORM ALV_CALL.
      PERFORM USER_COMMAND_LOCAL USING G_SUCOMM G_SELFLD.
          FORM USER_COMMAND_LOCAL                                       *
    -->  G_UCOMM                                                       *
    -->  G_SELFIELD                                                    *
    FORM USER_COMMAND_LOCAL USING G_UCOMM LIKE SY-UCOMM
                                  G_SELFIELD TYPE SLIS_SELFIELD.
      CASE G_UCOMM.
        WHEN 'ACT'.
      ENDCASE.
    ENDFORM.
          FORM ALV_CALL                                                 *
    FORM ALV_CALL.
    Call ABAP List Viewer (ALV)
    G_LAYOUT-BOX_FIELDNAME = 'ACTIVATE'.
      CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
                 EXPORTING
                I_BACKGROUND_ID         = 'ALV_BACKGROUND'
                   I_BYPASSING_BUFFER                = SPACE
                   I_BUFFER_ACTIVE                   = SPACE
                    I_CALLBACK_PROGRAM                = SAV_SY_REPID
                    I_CALLBACK_PF_STATUS_SET          = 'STATUS'
                   I_CALLBACK_USER_COMMAND           = 'USER_COMMAND_LOCAL'
                I_CALLBACK_TOP_OF_PAGE            = ' '
                I_CALLBACK_HTML_TOP_OF_PAGE       = ' '
                I_CALLBACK_HTML_END_OF_LIST       = ' '
                 I_STRUCTURE_NAME                  = 'SFLIGHT'
                I_BACKGROUND_ID                   = ' '
                I_GRID_TITLE                      =
                I_GRID_SETTINGS                   =
                  IS_LAYOUT                         = G_LAYOUT
                  IT_FIELDCAT                       = XFIELD[]
                IT_EXCLUDING                      =
                  IT_SPECIAL_GROUPS                 = GT_SP_GROUP[]
                IT_SORT                           =
                IT_FILTER                         =
                 IS_SEL_HIDE                       = 'X'
                I_DEFAULT                         = 'X'
                  I_SAVE                            = 'A'
                IS_VARIANT                        =
                 IT_EVENTS                         = XEVENT
                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_ADD_FIELDCAT                   =
                IT_HYPERLINK                      =
                I_HTML_HEIGHT_TOP                 =
                I_HTML_HEIGHT_END                 =
                IT_EXCEPT_QINFO                   =
              IMPORTING
                E_EXIT_CAUSED_BY_CALLER           =
                ES_EXIT_CAUSED_BY_USER            =
                  TABLES
                    T_OUTTAB                          = GT_SFLIGHT
              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.
          FORM status                                                   *
    -->  EXTAB                                                         *
    FORM STATUS USING EXTAB TYPE SLIS_T_EXTAB.
      SET PF-STATUS 'STAT' EXCLUDING EXTAB.
    ENDFORM.                               " STATUS
    *&      Form  INITIALIZATION_RL034
          text
    -->  p1        text
    <--  p2        text
    FORM INITIALIZATION_RL034.
      SAV_SY_REPID = SY-REPID.
    ENDFORM.                    " INITIALIZATION_RL034
    *&      Form  DEFINE_EVENTS_RL034
          text
    -->  p1        text
    <--  p2        text
    FORM DEFINE_EVENTS_RL034.
      CALL FUNCTION 'REUSE_ALV_EVENTS_GET'
           EXPORTING
                I_LIST_TYPE = 0
           IMPORTING
                ET_EVENTS   = XEVENT.
       exceptions
            list_type_wrong = 1
            others          = 2.
    ENDFORM.                    " DEFINE_EVENTS_RL034
    *&      Form  FIELD_CAT
          text
    -->  p1        text
    <--  p2        text
    FORM FIELD_CAT.
      DATA: LS_FCAT TYPE SLIS_FIELDCAT_ALV,
            L_LIN   TYPE I.
      REFRESH XFIELD.
           1. per Default eingeblendete Felder                          *
    *........Ikone/Symbol..................................................
      CLEAR AFIELD.
      DATA: LS1_FCAT TYPE SLIS_FIELDCAT_ALV,
            L_LIN1   TYPE I.
      CALL FUNCTION 'REUSE_ALV_FIELDCATALOG_MERGE'
           EXPORTING
                I_STRUCTURE_NAME       = CON_SFLIGHT
                I_BYPASSING_BUFFER     = SPACE
                I_BUFFER_ACTIVE        = SPACE
           CHANGING
                CT_FIELDCAT            = XFIELD
           EXCEPTIONS
                INCONSISTENT_INTERFACE = 1
                PROGRAM_ERROR          = 2
                OTHERS                 = 3.
      DESCRIBE TABLE XFIELD LINES L_LIN1.
      ADD 1 TO L_LIN1.
      CLEAR LS_FCAT.
      LS1_FCAT-FIELDNAME = 'ACTIVATE'.
      LS1_FCAT-CHECKBOX  = 'X'.
    LS1_FCAT-KEY       = 'X'.
      LS1_FCAT-INPUT     = 'X'.
      LS1_FCAT-EDIT     = 'X'.
      LS1_FCAT-INTTYPE   = 'C'.
      LS1_FCAT-DATATYPE  = 'CHAR'.
      LS1_FCAT-INTLEN    = 1.
      LS1_FCAT-COL_POS   = L_LIN1.
      LS1_FCAT-SELTEXT_S = LS1_FCAT-FIELDNAME.
      LS1_FCAT-SELTEXT_M = LS1_FCAT-FIELDNAME.
      LS1_FCAT-SELTEXT_L = LS1_FCAT-FIELDNAME.
      LS1_FCAT-SP_GROUP = 'A'.
      APPEND LS1_FCAT TO XFIELD.
      ADD 1 TO L_LIN.
    ENDFORM.                    " FIELD_CAT
    FORM E07_SP_GROUP_BUILD USING E07_LT_SP_GROUP TYPE SLIS_T_SP_GROUP_ALV.
      DATA: LS_SP_GROUP TYPE SLIS_SP_GROUP_ALV.
      CLEAR  LS_SP_GROUP.
      LS_SP_GROUP-SP_GROUP = 'A'.
      LS_SP_GROUP-TEXT     = 'SPECIAL'.
      APPEND LS_SP_GROUP TO E07_LT_SP_GROUP.
    ENDFORM.
    Regards
    Shiva

  • Header in ALV Report

    Hi All,
    I want to print a report in the following manner:
    DATE:
    CLASS GROUP :
    MATNR   CLASS     ADSIZE
    123          c             col1
    124          c            col2
    156          c             col2
    DATE:
    CLASS GROUP :
    MATNR   CLASS     ADSIZE
    125         a            col3
    128         a            col4
    150          a             col5
    How do i do it...I am planning to do it with REUSE_ALV_LIST _DISPLAY...but i dont know how to print the header..plz help

    <b>Note : In the below   i am passing  my purchase  order Ebeln  with internal table to the Form header so that all purchase  order are passed to Header  by this way you can also pass it  .</b>
    <b>Add Title(heading) to ALV Grid</b>
    In order to insert a report heading in to the ALV grid you need to perform the following steps:
    1. Update 'REUSE_ALV_GRID_DISPLAY' FM call to include 'top-of-page' FORM
    2. Create 'top-of-page' FORM
    call function 'REUSE_ALV_GRID_DISPLAY'
           exporting
                i_callback_program      = gd_repid
                i_callback_top_of_page   = 'TOP-OF-PAGE'  "see FORM
                is_layout               = gd_layout
                it_fieldcat             = fieldcatalog[]
                i_save                  = 'X'
           tables
                t_outtab                = it_ekko
           exceptions
                program_error           = 1
                others                  = 2.
    Form top-of-page.
    *ALV Header declarations
    data: t_header type slis_t_listheader,
          wa_header type slis_listheader,
          t_line like wa_header-info,
          ld_lines type i,
          ld_linesc(10) type c.
    * Title
      wa_header-typ  = 'H'.
      wa_header-info = EKKO-ebeln.
      append wa_header to t_header.
      clear wa_header.
    endform.
    reward points if it is usefull .....
    Girish

  • How to add Traffic Lights to a Report?

    Hi,
    How do U create a Traffic Light? and how to you change the Light? That's all I need.
    Thanks,
    Kishan

    hi dude,
    This is the way u add lights to ur alv report.
    I'm following this method and i'm getting lights. This will work for sure.
    In data declaration along with your alv display structure as a field named lights(any name).
    DATA : BEGIN OF wa_srr,
    vbeln LIKE vbak-vbeln, "Sales Order number
    posnr LIKE vbap-posnr, "Item nunmber
    matnr LIKE makt-matnr, "Material number Desc
    maktx LIKE makt-maktx, "Material Description
    gbstk LIKE vbuk-gbstk, "Completion status
    bukrs LIKE knb1-bukrs, "Company Code
    butxt LIKE t001-butxt, "Company Code description
    vkorg LIKE vbak-vkorg, "Sales organization
    vtext LIKE tvkot-vtext, "Sales Org description
    vtweg LIKE vbak-vtweg, "Distribution Channel
    dtext LIKE tvtwt-vtext, "Dist Channel description
    spart LIKE vbak-spart, "Division
    dvtxt LIKE tspat-vtext, "Division Description
    kunnr LIKE vbak-kunnr, "Customer Number
    name1 LIKE kna1-name1, "Customer Name
    land1 LIKE kna1-land1, "Country
    regio LIKE kna1-regio, "State
    ort01 LIKE kna1-ort01, "City
    erdat LIKE vbak-erdat, "Creation Date
    vdatu LIKE vbak-vdatu, "Due date
    kwmeng LIKE vbap-kwmeng, "Material Quantity
    netpr LIKE vbap-netpr, "unit net price
    netwr LIKE vbap-netwr, "Price
    wavwr LIKE vbap-wavwr, "Cost price
    bzirk LIKE vbkd-bzirk, "Sales District
    bztxt LIKE t171t-bztxt, "Sales District Discription
    lights, "Diplaying Status
    END OF wa_srr.
    While you are building the field cat do as follows
    FORM build_layout CHANGING l_wa_layout TYPE slis_layout_alv.
    l_wa_layout-zebra = cb_zebr. "Set alterante colored line
    l_wa_layout-colwidth_optimize = cb_colop. "Optimize column width
    l_wa_layout-no_vline = cb_novli. "No vertical line
    l_wa_layout-no_colhead = cb_nocol. "no column Header
    l_wa_layout-lights_fieldname = 'LIGHTS'. "Set light field
    (assigning the field u have added in ur structure here as light field in alv report)
    ENDFORM. " BUILD_LAYOUT
    Then as per the logic, u make green, yellow or red light
    Example,
    FORM build_light .
    LOOP AT it_srr INTO wa_srr. "for all entries in the table
    IF wa_srr-gbstk = 'C'. "If status is 'completed',
    wa_srr-lights = '3'. "Show green signal light
    ELSEIF wa_srr-gbstk = 'B'. "If status is 'Partial'
    wa_srr-lights = '2'. "Show yellow signal light
    ELSE. "If status is 'incomplete'
    wa_srr-lights = '1'. "Show red signal light
    ENDIF.
    MODIFY it_srr FROM wa_srr. "Update to table
    ENDLOOP.
    ENDFORM. " build_light
    after building ur layout, Pass it to ur alv function module like this.
    CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
    EXPORTING
    i_callback_program = sy-repid
    i_callback_top_of_page = 'TOP_OF_PAGE'
    i_background_id = 'ALV_BACKGROUND'
    i_grid_title = text-011
    pass ur layout structure here********
    is_layout = wa_layout
    it_fieldcat = it_fcat
    it_sort = it_sort
    i_save = v_save
    is_variant = wa_variant
    is_print = wa_print
    TABLES
    t_outtab = it_srr
    EXCEPTIONS
    program_error = 1
    OTHERS = 2.
    IF sy-subrc <> 0.
    MESSAGE i001. "List cannot be displayed
    ENDIF.
    wat all i did to add light is,
    1) adding an extra field in the main structure.
    2)create internal table with this structure as data table for alv report
    3) add 'field name' field in layout
    4) I have passed values(3, 2, 1) for green, yellow and red light resp, to the field(LIGHTS) in the internal table that is passed to alv function module.(Based on some condition)
    5) pass the layout structure layout to alv function module
    Thats it. If u do all this teps, u r done with it.
    Lemme know u solved it by giving points.
    with regards,
    praveen.

  • How to handle interactive list in alv reports

    hi experts.
    how to handle interactive list in alv reports.
    regards.
    subhasis

    HI Subhasis,
    below is the sample code for handling an interactive ALV report, hope this helps you ..
    REPORT  ZTEST_ALV123.                           
    TYPE-POOLS:SLIS.
    DATA :   IT_FIELDCAT TYPE SLIS_T_FIELDCAT_ALV,
              IT_FIELDCAT1 TYPE SLIS_T_FIELDCAT_ALV.
    DATA: BEGIN OF ITAB OCCURS 0,
           VBELN LIKE VBAK-VBELN,
           POSNR LIKE VBAP-POSNR,
           END OF ITAB.
    DATA: BEGIN OF ITAB1 OCCURS 0,
           VBELN LIKE LIKP-VBELN,
           POSNR LIKE LIPS-POSNR,
           VGBEL LIKE LIPS-VGBEL,
           VGPOS LIKE LIPS-VGPOS,
           END OF ITAB1.
    DATA: IT_LIPS LIKE ITAB1 OCCURS 0 WITH HEADER LINE.
    SELECT  VBELN
            POSNR
            FROM VBAP
            INTO TABLE ITAB.
    IF SY-SUBRC = 0.
      SORT ITAB BY VBELN .
      SELECT VBELN
       POSNR
       VGBEL
       VGPOS
       INTO TABLE ITAB1
       FROM LIPS
       FOR ALL ENTRIES IN ITAB
       WHERE VGBEL = ITAB-VBELN
         AND    VGPOS = ITAB-POSNR.
    ENDIF.
    DATA: X_FIELDCAT TYPE SLIS_FIELDCAT_ALV.
    X_FIELDCAT-FIELDNAME = 'VBELN'.
    X_FIELDCAT-TABNAME = 'ITAB'.
    X_FIELDCAT-COL_POS  = 1.
    APPEND X_FIELDCAT TO IT_FIELDCAT.
    CLEAR X_FIELDCAT.
    X_FIELDCAT-FIELDNAME = 'POSNR'.
    X_FIELDCAT-TABNAME = 'ITAB'.
    X_FIELDCAT-COL_POS  = 1.
    APPEND X_FIELDCAT TO IT_FIELDCAT.
    CLEAR X_FIELDCAT.
    CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
      EXPORTING
        I_CALLBACK_PROGRAM       = SY-REPID
        I_CALLBACK_PF_STATUS_SET = 'PFSTATUS'
        I_CALLBACK_USER_COMMAND  = 'HANDLE_USER_COMMAND'
        IT_FIELDCAT              = IT_FIELDCAT
      TABLES
        T_OUTTAB                 = ITAB
      EXCEPTIONS
        PROGRAM_ERROR            = 1
        OTHERS                   = 2.
    IF SY-SUBRC  = 0.
    ENDIF.
    *&      Form  POPUP
          text
         -->P_EXTAB    text
    FORM POPUP USING P_EXTAB TYPE SLIS_T_EXTAB.
    "here double click on PFSTATUS and create the status, "activate, before that set PICK for choose(F2).
    *- Pf status
      SET PF-STATUS 'PFSTATUS'.
    ENDFORM.                 " POPUP
    *&      Form  HANDLE_USER_COMMAND
          text
         -->R_UCOMM      text
         -->RS_SELFIELD  text
    FORM HANDLE_USER_COMMAND USING R_UCOMM     LIKE SY-UCOMM
                                   RS_SELFIELD TYPE SLIS_SELFIELD.
      CASE R_UCOMM.
        WHEN '&IC1'.
          IF RS_SELFIELD-FIELDNAME = 'VBELN'.
            READ TABLE ITAB INDEX RS_SELFIELD-TABINDEX.
            LOOP AT ITAB1 WHERE VGBEL = ITAB-VBELN
                              AND VGPOS = ITAB-POSNR.
              MOVE-CORRESPONDING ITAB1 TO IT_LIPS.
              APPEND IT_LIPS.
            ENDLOOP.
            PERFORM INTERACTIVE_REPORT.
          ENDIF.
      ENDCASE.
    ENDFORM.                    "HANDLE_USER_COMMAND
    *&      Form  interactive_report
          text
    FORM INTERACTIVE_REPORT .
      X_FIELDCAT-FIELDNAME = 'VBELN'.
      X_FIELDCAT-SELTEXT_L = 'VBELN'.
      X_FIELDCAT-TABNAME = 'IT_LIPS'.
      X_FIELDCAT-COL_POS  = 1.
      APPEND X_FIELDCAT TO IT_FIELDCAT1.
      CLEAR X_FIELDCAT.
      X_FIELDCAT-FIELDNAME = 'POSNR'.
      X_FIELDCAT-SELTEXT_L = 'ITEM'.
      X_FIELDCAT-TABNAME = 'IT_LIPS'.
      X_FIELDCAT-COL_POS  = 2.
      APPEND X_FIELDCAT TO IT_FIELDCAT1.
      CLEAR X_FIELDCAT.
      X_FIELDCAT-FIELDNAME = 'VGBEL'.
      X_FIELDCAT-SELTEXT_M = 'SO #'.
      X_FIELDCAT-TABNAME = 'IT_LIPS'.
      X_FIELDCAT-COL_POS  = 3.
      APPEND X_FIELDCAT TO IT_FIELDCAT1.
      CLEAR X_FIELDCAT.
      X_FIELDCAT-FIELDNAME = 'VGPOS'.
      X_FIELDCAT-SELTEXT_M = 'SO ITEM'.
      X_FIELDCAT-TABNAME = 'IT_LIPS'.
      X_FIELDCAT-COL_POS  = 4.
      APPEND X_FIELDCAT TO IT_FIELDCAT1.
      CLEAR X_FIELDCAT.
      CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
        EXPORTING
          I_CALLBACK_PROGRAM = SY-REPID
          IT_FIELDCAT        = IT_FIELDCAT1
        TABLES
          T_OUTTAB           = IT_LIPS
        EXCEPTIONS
          PROGRAM_ERROR      = 1
          OTHERS             = 2.
      IF SY-SUBRC  = 0.
      ENDIF.
    ENDFORM.                    " interactive_report
    Regards,
    Ranjita
    null

  • How to add two X Axis in the Column chart?Need Help

    Hi,
    I have a requirement to add two X axis in the SSRS column chart.Can someone please help how to add two X axis. I tried the secondary axis for horizontal axis but current x axis is shifting to other side, second X axis is not coming.
    Regards
    Jon

    Hi Jon,
    According to your description, you want to add secondary X axis for one series in a column chart, right?
    The secondary axis is useful when comparing two value sets with two distinct data ranges that share a common category. In Reporting Services, it’s not supported to create two X axis for one series. We can create secondary X axis when there are two series
    in a column chart. As we tested in our local environment, we can add secondary X axis for specific series. Please refer to the screenshots below:
    So I would like to know what’s your exact needs about creating two X axis for one series. If possible please share some detail information about your data and expected looking of the chart.
    Reference: Plot Data on a Secondary Axis (Report Builder and SSRS)
    If you have any question, please feel free to ask.
    Best regards,
    Qiuyun Yu

  • Add New Column in ALV Report of Standard SAP ME28.

    Hi anybody,
    I want add new column in alv report of standard SAP Program ME28 Screen.
    Add Last PO Price column inside ALV Report ME28 Screen.
    Can u please anybody tell me how to add new column in ME28 Screen.
    Thanks
    S.Muthu.

    Try to find any BADI for the same
    Follow the below steps to find out what all BADI's are called when you press any button in any transaction.
    1) Goto se24 (Display class cl_exithandler)
    2) Double click on the method GET_INSTANCE.
    3) Put a break point at Line no.25 (CASE sy-subrc).
    Now
    4) Execute SAP standard transaction
    5) Press the required button for which you need to write an exit logic, the execution will stop at the break point.
    6) Check the values of variable 'exit_name', it will give you the BADI name called at that time.
    7) This way you will find all the BADIs called on click of any button in any transaction.
    OR
    Also one more option is to copy ME28 and, make modifications to the copied program.

  • How to add company logo in z report

    Hi !
    i want to know how to add company logo into custom report ...
    generally we used below mentioned code for sap logo
    CALL FUNCTION 'REUSE_ALV_COMMENTARY_WRITE'
    EXPORTING
    IT_LIST_COMMENTARY       = IT_LIST[]
       I_LOGO                   = 'ENJOYSAP_LOGO'.
    ENDFORM.            "top_of_page"
    what changes we need to do to add company logo into custom report
    Please guide
    Regards
    Sheetal

    First upload  ur  required logo in  SAp  by  t-code  SE78.
    Use teh  above mentioned  ALV code  for the same.
    Try  to  search  on SDN for  the  u can find the  full  ALV code for the same.
    ..lakhan

  • How to add a header line to excel sheet?

    Hi Guru's
    I have download the scheduling agreement report in a excel sheet, I want to know how to add the header line  to that excel sheet.

    Hi
    See this sample code:
    Tables : zacg_cca,zacg_exsh.
    data: P_file like RLGRAP-FILENAME.
    Data: Begin of it_header occurs 0,
    Header(15) ,
    end of it_header.
    Data : begin of it_final occurs 0,
    ccode type zacg_cca-ccode,
    mat_cd type zacg_cca-mat_cd,
    ingr_desc type zacg_cca-ingr_desc,
    conc type zacg_cca-conc,
    quantity type zacg_cca-quantity,
    percqty type zacg_cca-percqty,
    flag ,
    APP_DATE type zacg_cca-app_date,
    rsamnos type zacg_cca-rsamnos,
    end of it_final.
    SELECTION-SCREEN : BEGIN OF BLOCK blk WITH FRAME TITLE text-000.
    select-options : s_Date for zacg_cca-app_date.
    SELECTION-SCREEN : END OF BLOCK blk.
    it_header-Header = 'Samp_code'.
    Append it_header.
    it_header-Header = 'Mat_code'.
    Append it_header.
    it_header-Header = 'Ingr_Desc'.
    Append it_header.
    it_header-Header = 'Conc'.
    Append it_header.
    it_header-Header = 'Quan'.
    Append it_header.
    it_header-Header = 'Perc'.
    Append it_header.
    it_header-Header = 'Flag'.
    Append it_header.
    it_header-Header = 'Date'.
    Append it_header.
    it_header-Header = 'Rsamnos'.
    Append it_header.
    it_header-Header = 'Mat_code'.
    Append it_header.
    select ccode
    mat_cd
    ingr_desc
    conc
    quantity
    percqty
    app_date
    rsamnos
    from zacg_cca into corresponding
    fields of table
    it_final where zacg_cca~app_date in s_date.
    loop at it_final.
    it_final-flag = 'T'.
    modify it_final.
    it_final-quantity = it_final-quantity * 2 .
    Modify it_final.
    endloop.
    CALL FUNCTION 'MS_EXCEL_OLE_STANDARD_DAT'
    EXPORTING
    FILE_NAME = 'E:\IT\P_FILE'
    CREATE_PIVOT = 0
    DATA_SHEET_NAME = ' '
    PIVOT_SHEET_NAME = ' '
    PASSWORD = ' '
    PASSWORD_OPTION = 0
    TABLES
    PIVOT_FIELD_TAB =
    DATA_TAB = it_final[]
    FIELDNAMES = it_header[]
    EXCEPTIONS
    FILE_NOT_EXIST = 1
    FILENAME_EXPECTED = 2
    COMMUNICATION_ERROR = 3
    OLE_OBJECT_METHOD_ERROR = 4
    OLE_OBJECT_PROPERTY_ERROR = 5
    INVALID_PIVOT_FIELDS = 6
    DOWNLOAD_PROBLEM = 7
    OTHERS = 8
    IF SY-SUBRC 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
    WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    regards
    Satish

Maybe you are looking for

  • After installing Lion, my iomega ex. hard drive no longer recognized for time machine

    Is all my back up gone? Lion does not see the iomega external hard drive. No more automatic backup? How can I restore to Leopard if Lion doesn't recogize the Iomega?

  • Photoshop CS3 crashes when saving MAC OSX

    Having problems with Photoshop CS3 crashing (Photoshop unexpectedly quit) when trying to save a file. Go to Photoshop/Preferences/File Handling/uncheck Version Cue. Seems that Version Cue is causing a lot of problems.

  • Unit Test Framework Bug: Removing a test vector file causes LV to crash

    Labview 2010 f2 crashes every time I try to remove a test vector file from a project. Repro: 1. Start Labview and open a new project. 2. Save the project. 3. Right-click My Computer and select New -> Test Vectors 4. Right-click the new file (Untitled

  • Pictures missing from iphoto...?

    my friend gave me a cd with pictures, i uploaded the cd onto my mac and then clicked to open the pictures after transferring the file on the cd to my desktop. the pictures he'd put on there opened up on iphoto...but now every time i open iphoto those

  • Macbook pro won't install updates

    Little bit about my mac: Mac OS X. Version 10.6.8    I have 47GB available. I have tried updating my software, and it will only update the certain things that does not require the macbook to restart. If I try to update the software it will show the d