Hide grand total field on ALV report, But keep the sub total fields

Dear Experts,
1) How to hide grand total field on ALV report, But keep the sub total fields.
2) How to populate rate per ton & calculate total price according to the qty in delivering document.

Dear Experts,
1) How to hide grand total field on ALV report, But keep the sub total fields.
2) How to populate rate per ton & calculate total price according to the qty in delivering document.

Similar Messages

  • Regd: Calculation of TOTAL field in ALV report

    Hi All,
    We have a scenario that we are not getting the total value for numeric fields in ALV report.
    Below i have given the code used for it.
    G_KEY = 'X'.
      G_NOKEY = SPACE.
      G_SUM = 'X'.
      G_NOSUM = SPACE.
      PERFORM BUILD_FIELDCAT USING 'VBELN'  G_KEY G_NOSUM.
      PERFORM BUILD_FIELDCAT USING 'BLDAT'  G_NOKEY G_NOSUM.
      PERFORM BUILD_FIELDCAT USING 'VGBEL'  G_KEY G_NOSUM.
      PERFORM BUILD_FIELDCAT USING 'POSNR'  G_KEY G_NOSUM.
      PERFORM BUILD_FIELDCAT USING 'MATNR'  G_KEY G_NOSUM..
      PERFORM BUILD_FIELDCAT USING 'LFIMG'  G_NOKEY G_NOSUM.
      PERFORM BUILD_FIELDCAT USING 'VRKME'  G_NOKEY G_NOSUM.
      PERFORM BUILD_FIELDCAT USING 'NETPR'  G_NOKEY G_NOSUM.
      PERFORM BUILD_FIELDCAT USING 'BRTWR'  G_NOKEY G_NOSUM.
      PERFORM BUILD_FIELDCAT USING 'VALUE_INR'  G_NOKEY G_SUM.
      PERFORM BUILD_FIELDCAT USING 'B_DUTY'     G_NOKEY G_SUM.
      PERFORM BUILD_FIELDCAT USING 'S_TOTAL1'   G_NOKEY G_SUM.
      PERFORM BUILD_FIELDCAT USING 'CV_DUTY'    G_NOKEY G_SUM.
      PERFORM BUILD_FIELDCAT USING 'C_CVD'      G_NOKEY G_SUM.
      PERFORM BUILD_FIELDCAT USING 'S_TOTAL2'   G_NOKEY G_SUM.
      PERFORM BUILD_FIELDCAT USING 'C_DUTY'     G_NOKEY G_SUM.
      PERFORM BUILD_FIELDCAT USING 'S_TOTAL3'   G_NOKEY G_SUM.
      PERFORM BUILD_FIELDCAT USING 'A_DUTY'     G_NOKEY G_SUM.
      PERFORM BUILD_FIELDCAT USING 'T_DUTY'     G_NOKEY G_SUM.
    PERFORM BUILD_LAYOUT.
      PERFORM BUILD_DISPLAY.
    *&      Form  DISPLAY
          text
    FORM BUILD_DISPLAY.
      CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
       EXPORTING
      I_INTERFACE_CHECK                 = ' '
      I_BYPASSING_BUFFER                = ' '
      I_BUFFER_ACTIVE                   = ' '
      I_CALLBACK_PROGRAM                = ' '
      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                      = TEXT-000
      I_GRID_SETTINGS                   =
       IS_LAYOUT                         = IG_LAYOUT
         IT_FIELDCAT                       = IG_FIELDCAT
      IT_EXCLUDING                      =
      IT_SPECIAL_GROUPS                 =
      IT_SORT                           =
      IT_FILTER                         =
      IS_SEL_HIDE                       =
      I_DEFAULT                         = 'X'
         I_SAVE                            = 'A'
      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
      I_HTML_HEIGHT_TOP                 = 0
      I_HTML_HEIGHT_END                 = 0
      IT_ALV_GRAPHICS                   =
      IT_HYPERLINK                      =
      IT_ADD_FIELDCAT                   =
      IT_EXCEPT_QINFO                   =
      IR_SALV_FULLSCREEN_ADAPTER        =
    IMPORTING
      E_EXIT_CAUSED_BY_CALLER           =
      ES_EXIT_CAUSED_BY_USER            =
        TABLES
          T_OUTTAB                          = IG_INBOUND
       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
    *&      Form  BUILD_FIELDCAT
          text
         -->G_FIELDNAME  text
         -->L_KEY        text
         -->L_SUM        text
    FORM BUILD_FIELDCAT USING L_FIELDNAME LIKE DD03L-FIELDNAME L_KEY TYPE C L_SUM TYPE C.
      CLEAR WG_FIELDCAT_LN.
      ADD 1 TO G_COL_POS.
      WG_FIELDCAT_LN-REF_TABNAME = 'IG_INBOUND'.
      WG_FIELDCAT_LN-FIELDNAME = L_FIELDNAME.
      WG_FIELDCAT_LN-KEY = L_KEY.
      WG_FIELDCAT_LN-DO_SUM = L_SUM.
      WG_FIELDCAT_LN-COL_POS = G_COL_POS.
      WG_FIELDCAT_LN-NO_OUT = SPACE.
      WG_FIELDCAT_LN-QFIELDNAME = SPACE.
      WG_FIELDCAT_LN-HOTSPOT = SPACE.
      APPEND WG_FIELDCAT_LN TO IG_FIELDCAT.
    ENDFORM.                    "BUILD_FIELDCAT
    *&      Form  BUILD_LAYOUT
          text
    FORM BUILD_LAYOUT.
    IG_LAYOUT-TOTALS_TEXT = 'Total Amount'.
    *IG_LAYOUT-SUBTOTALS_TEXT = 'A'.
    IG_LAYOUT-ZEBRA = 'X'.
    ENDFORM.
    Help and Sugesstions will be much appreciated.
    Thanks & Regds.
    Ramesh.

    This is sample program for the same
    REPORT  Z_50657_ALV_EX2
            NO STANDARD PAGE HEADING
            LINE-COUNT 65(3)
            LINE-SIZE 220
            MESSAGE-ID ZZ.
    *                             Type Pools                               *
    TYPE-POOLS: SLIS, ICON.
    *                              Tables                                  *
    TABLES: VBAK. "Sales Document Data
    *                         Internal Tables                              *
    * TABLE TO HOLD DATA OF SALES DOCUMENT
    DATA: BEGIN OF IT_VBAK OCCURS 0,
          VBELN LIKE VBAK-VBELN, "Sales Document
          VBTYP LIKE VBAK-VBTYP, "SD document category
          AUDAT LIKE VBAK-AUDAT, "Document date (date received/sent)
          AUGRU LIKE VBAK-AUGRU, "Order reason (reason for the business)
          AUART LIKE VBAK-AUART, "Sales Document Type
          NETWR LIKE VBAK-NETWR, "Net Sales Order in Doc. Currency
          WAERK LIKE VBAK-WAERK, "SD document currency
          ICON TYPE ICON-ID,     "traffic lights
          END OF IT_VBAK.
    *                             Work Areas                               *
    *WORK AREAS DEFINED FOR ALV'S
    DATA: WA_FIELDCAT TYPE SLIS_FIELDCAT_ALV,      "field catalog
          IT_FIELDCAT TYPE SLIS_T_FIELDCAT_ALV,     "field catalog ITAB
          WA_SORT TYPE SLIS_SORTINFO_ALV,           "SORT work area
          IT_SORT TYPE SLIS_T_SORTINFO_ALV,         "SORT ITAB
          LAYOUT TYPE SLIS_LAYOUT_ALV,              "LAYOUT
          WA_FCODE TYPE SLIS_EXTAB,                 "FUN CODE
          I_FCODE_EXTAB TYPE SLIS_T_EXTAB,
          WA_EVENTS TYPE SLIS_ALV_EVENT,
          IT_EVENTS TYPE SLIS_T_EVENT.
    *                       Selection-Screen                               *
    SELECTION-SCREEN BEGIN OF BLOCK B1 WITH FRAME.
    SELECT-OPTIONS: S_VBELN FOR VBAK-VBELN.
    PARAMETERS: P_VBTYP LIKE VBAK-VBTYP DEFAULT 'C'.
    SELECTION-SCREEN END OF BLOCK B1.
    SELECTION-SCREEN BEGIN OF BLOCK B2 WITH FRAME.
    PARAMETERS: LIST RADIOBUTTON GROUP G1,
                GRID RADIOBUTTON GROUP G1.
    SELECTION-SCREEN END OF BLOCK B2.
    *                     At  Selection-Screen                             *
    *VALIDATION
    *                       Start of Selection                             *
    START-OF-SELECTION.
    *POPULATION OF DATA INTO INTERNAL TABLE ITAB
      PERFORM GET_DATA.
    *DEFINE USER DEFINED FIELDCATALOG
      PERFORM DEFINE_FIELDCATALOG.
    *SUBTOTALS AND TOTALS DISPLAY USING SORT
      PERFORM SORT_LIST.
    *CHANGE FCODE OF STATUS
      PERFORM CHANGE_FCODE.
    *CHECK RADIOBUTTON OPTION AND ACCORDINGLY FINAL DISPLAY
      PERFORM CHECK_OPTION.
    *&      Form  GET_DATA
    *       text
    FORM GET_DATA.
      SELECT VBELN
             VBTYP
             AUDAT
             AUGRU
             AUART
             NETWR
             WAERK FROM VBAK INTO TABLE IT_VBAK
             WHERE VBELN IN S_VBELN AND VBTYP = P_VBTYP
             AND ERDAT > '01.01.2004' AND NETWR > 0.
      LOOP AT IT_VBAK.
        IF IT_VBAK-NETWR < 10000.
          IT_VBAK-ICON = '@08@'.
        ELSEIF IT_VBAK-NETWR > 100000.
          IT_VBAK-ICON = '@0A@'.
        ELSE.
          IT_VBAK-ICON = '@09@'.
        ENDIF.
        MODIFY IT_VBAK INDEX SY-TABIX.
      ENDLOOP.
    ENDFORM.                    "GET_DATA
    *&      Form  CHECK_OPTION
    *       text
    FORM CHECK_OPTION.
      WA_EVENTS-NAME = 'TOP_OF_PAGE'.
      WA_EVENTS-FORM = 'TOP'.
      APPEND WA_EVENTS TO IT_EVENTS.
      CLEAR WA_EVENTS.
      WA_EVENTS-NAME = 'END_OF_LIST'.
      WA_EVENTS-FORM = 'END_LIST'.
      APPEND WA_EVENTS TO IT_EVENTS.
      CLEAR WA_EVENTS.
      IF LIST = 'X'.
        PERFORM LIST_DISP.
      ENDIF.
      IF GRID = 'X'.
        PERFORM GRID_DISP.
      ENDIF.
    ENDFORM.                    "CHECK_OPTION
    *&      Form  DEFINE_FIELDCATALOG
    *       text
    FORM DEFINE_FIELDCATALOG.
      WA_FIELDCAT-COL_POS = 1.
      WA_FIELDCAT-FIELDNAME = 'ICON'.
      WA_FIELDCAT-SELTEXT_L = 'ICON'.
      WA_FIELDCAT-ICON = 'X'.
      WA_FIELDCAT-OUTPUTLEN = 8.
      WA_FIELDCAT-TABNAME = 'IT_VBAK'.
      APPEND WA_FIELDCAT TO IT_FIELDCAT.
      CLEAR WA_FIELDCAT.
      WA_FIELDCAT-COL_POS = 2.
      WA_FIELDCAT-FIELDNAME = 'VBELN'.
      WA_FIELDCAT-SELTEXT_L = 'SALES DOC NO.'.
      WA_FIELDCAT-OUTPUTLEN = 10.
      WA_FIELDCAT-TABNAME = 'IT_VBAK'.
      APPEND WA_FIELDCAT TO IT_FIELDCAT.
      CLEAR WA_FIELDCAT.
      WA_FIELDCAT-COL_POS = 3.
      WA_FIELDCAT-FIELDNAME = 'AUDAT'.
      WA_FIELDCAT-SELTEXT_L = 'CREATED ON'.
      WA_FIELDCAT-OUTPUTLEN = 10.
      WA_FIELDCAT-TABNAME = 'IT_VBAK'.
      APPEND WA_FIELDCAT TO IT_FIELDCAT.
      CLEAR WA_FIELDCAT.
      WA_FIELDCAT-COL_POS = 4.
      WA_FIELDCAT-FIELDNAME = 'VBTYP'.
      WA_FIELDCAT-SELTEXT_L = 'CATEGORY'.
      WA_FIELDCAT-OUTPUTLEN = 1.
      WA_FIELDCAT-TABNAME = 'IT_VBAK'.
      APPEND WA_FIELDCAT TO IT_FIELDCAT.
      CLEAR WA_FIELDCAT.
      WA_FIELDCAT-COL_POS = 6.
      WA_FIELDCAT-FIELDNAME = 'AUGRU'.
      WA_FIELDCAT-SELTEXT_L = 'REASON'.
      WA_FIELDCAT-OUTPUTLEN = 3.
      WA_FIELDCAT-TABNAME = 'IT_VBAK'.
      APPEND WA_FIELDCAT TO IT_FIELDCAT.
      CLEAR WA_FIELDCAT.
      WA_FIELDCAT-COL_POS = 5.
      WA_FIELDCAT-FIELDNAME = 'AUART'.
      WA_FIELDCAT-SELTEXT_L = 'DOC TYPE'.
      WA_FIELDCAT-OUTPUTLEN = 4.
      WA_FIELDCAT-TABNAME = 'IT_VBAK'.
      APPEND WA_FIELDCAT TO IT_FIELDCAT.
      CLEAR WA_FIELDCAT.
      WA_FIELDCAT-COL_POS = 7.
      WA_FIELDCAT-FIELDNAME = 'NETWR'.
      WA_FIELDCAT-SELTEXT_L = 'NET VALUE'.
      WA_FIELDCAT-OUTPUTLEN = 17.
      WA_FIELDCAT-DECIMALS_OUT = 2.
    *  WA_FIELDCAT-DO_SUM = 'X'.
      WA_FIELDCAT-TABNAME = 'IT_VBAK'.
      APPEND WA_FIELDCAT TO IT_FIELDCAT.
      CLEAR WA_FIELDCAT.
      WA_FIELDCAT-COL_POS = 8.
      WA_FIELDCAT-FIELDNAME = 'WAERK'.
      WA_FIELDCAT-SELTEXT_L = 'UNIT'.
      WA_FIELDCAT-OUTPUTLEN = 50.
      WA_FIELDCAT-TABNAME = 'IT_VBAK'.
      APPEND WA_FIELDCAT TO IT_FIELDCAT.
      CLEAR WA_FIELDCAT.
    ENDFORM.                    "DEFINE_FIELDCATALOG
    *&      Form  DEFINE_LAYOUT
    *       text
    FORM DEFINE_LAYOUT.
      LAYOUT-ZEBRA = 'X'.
      LAYOUT-SUBTOTALS_TEXT = 'SUBTOTAL SUM'.
      LAYOUT-WINDOW_TITLEBAR = 'EXERCISE 2'.
      LAYOUT-TOTALS_TEXT  = 'TOTAL'.
    ENDFORM.                    "DEFINE_LAYOUT
    *&      Form  SORT_LIST
    *       text
    FORM SORT_LIST.
      WA_SORT-FIELDNAME = 'VBELN'.
      WA_SORT-TABNAME = 'IT_VBAK'.
      WA_SORT-SPOS = 1.
      WA_SORT-UP = 'X'.
      WA_SORT-SUBTOT = 'X'.
      APPEND WA_SORT TO IT_SORT.
      CLEAR WA_SORT.
      WA_SORT-FIELDNAME = 'NETWR'.
      WA_SORT-TABNAME = 'IT_VBAK'.
      WA_SORT-UP = 'X'.
      WA_SORT-SPOS = 2.
      WA_SORT-SUBTOT = 'X'.
      APPEND WA_SORT TO IT_SORT.
      CLEAR WA_SORT.
    ENDFORM.                    "SORT_LIST
    *&      Form  LIST_DISP
    *       text
    FORM LIST_DISP.
      PERFORM DEFINE_LAYOUT.
      CALL FUNCTION 'REUSE_ALV_LIST_DISPLAY'
       EXPORTING
         I_CALLBACK_PROGRAM             = SY-REPID
         IT_FIELDCAT                    = IT_FIELDCAT
         IS_LAYOUT                      = LAYOUT
         IT_SORT                        = IT_SORT
         I_CALLBACK_PF_STATUS_SET       = 'STATUS'
         IT_EXCLUDING                   = I_FCODE_EXTAB
         I_CALLBACK_USER_COMMAND        = 'USER_COMMAND'
         IT_EVENTS                      = IT_EVENTS[]
    *   IMPORTING
    *     E_EXIT_CAUSED_BY_CALLER        =
    *     ES_EXIT_CAUSED_BY_USER         =
        TABLES
         T_OUTTAB                       = IT_VBAK
    *   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.                    "LIST_DISP
    *&      Form  GRID_DISP
    *       text
    FORM GRID_DISP.
      PERFORM DEFINE_LAYOUT.
      CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
        EXPORTING
          I_CALLBACK_PROGRAM       = SY-REPID
          IS_LAYOUT                = LAYOUT
          IT_FIELDCAT              = IT_FIELDCAT
          IT_SORT                  = IT_SORT
          I_CALLBACK_PF_STATUS_SET = 'STATUS'
          IT_EXCLUDING             = I_FCODE_EXTAB
          I_CALLBACK_USER_COMMAND  = 'USER_COMMAND'
          IT_EVENTS                = IT_EVENTS[]
        TABLES
          T_OUTTAB                 = IT_VBAK.
    * 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.                    "GRID_DISP
    *&      Form  STATUS
    *       text
    *      -->P_EXTAB    text
    FORM STATUS USING P_EXTAB TYPE SLIS_T_EXTAB.
      SET PF-STATUS 'STATUS' EXCLUDING P_EXTAB.
    ENDFORM.                    "STATUS
    *&      Form  USER_COMMAND
    *       text
    *      -->R_UCOMM      text
    *      -->RS_SELFIELD  text
    FORM USER_COMMAND USING R_UCOMM     LIKE SY-UCOMM
                                   RS_SELFIELD TYPE SLIS_SELFIELD.
      CASE R_UCOMM.
        WHEN 'BACK' OR 'CANC' OR 'EXIT'.
          LEAVE TO SCREEN 0.
        WHEN '&IC1'.
          SET PARAMETER ID 'AUN' FIELD RS_SELFIELD-VALUE.
          CALL TRANSACTION 'VA03' AND SKIP FIRST SCREEN.
      ENDCASE.
    ENDFORM.                    "USER_COMMAND
    *&      Form  CHANGE_FCODE
    *       text
    FORM CHANGE_FCODE.
      WA_FCODE = 'PRNT'.
      APPEND WA_FCODE TO I_FCODE_EXTAB.
      WA_FCODE = '&OAD'.
      APPEND WA_FCODE TO I_FCODE_EXTAB.
      WA_FCODE = '&AVE'.
      APPEND WA_FCODE TO I_FCODE_EXTAB.
      WA_FCODE = '&EB9'.
      APPEND WA_FCODE TO I_FCODE_EXTAB.
      WA_FCODE = '&SUM'.
      APPEND WA_FCODE TO I_FCODE_EXTAB.
      WA_FCODE = '&UMC'.
      APPEND WA_FCODE TO I_FCODE_EXTAB.
      WA_FCODE = '&XPA'.
      APPEND WA_FCODE TO I_FCODE_EXTAB.
      WA_FCODE = '&OMP'.
      APPEND WA_FCODE TO I_FCODE_EXTAB.
    ENDFORM.                    "CHANGE_FCODE
    *&      Form  TOP
    *       text
    FORM TOP.
      IF LIST = 'X'.
        WRITE:/ SY-ULINE.
        WRITE:/ 'DATE:', SY-DATUM,55 'INTELLIGROUP ASIA PVT LTD'.
        WRITE:/ 'TIME:', SY-UZEIT.
        WRITE:/ 'USER NAME:', SY-UNAME,60 SY-TITLE.
        WRITE:/ 'PAGE', SY-PAGNO.
        WRITE:/ SY-ULINE.
      ENDIF.
      IF GRID = 'X'.
        DATA: LS_LINE TYPE SLIS_LISTHEADER,
              E04_LT_TOP_OF_PAGE TYPE SLIS_T_LISTHEADER.
    *   Listenüberschrift: Typ H
        CLEAR LS_LINE.
        LS_LINE-TYP  = 'H'.
    *   LS_LINE-KEY:  not used for this type
        LS_LINE-INFO = 'Summary'.
        APPEND LS_LINE TO E04_LT_TOP_OF_PAGE.
    *   Kopfinfo: Typ S
        CLEAR LS_LINE.
        LS_LINE-TYP  = 'S'.
        LS_LINE-KEY  = 'Intelligroup'.
        LS_LINE-INFO = ''.
        APPEND LS_LINE TO E04_LT_TOP_OF_PAGE.
        LS_LINE-KEY  = 'ASIA'.
        LS_LINE-INFO = 'PVT LTD'.
        APPEND LS_LINE TO E04_LT_TOP_OF_PAGE.
    *   Aktionsinfo: Typ A
        CLEAR LS_LINE.
        LS_LINE-TYP  = 'A'.
    *   LS_LINE-KEY:  not used for this type
        LS_LINE-INFO = 'truman'.
        APPEND LS_LINE TO  E04_LT_TOP_OF_PAGE.
        CALL FUNCTION 'REUSE_ALV_COMMENTARY_WRITE'
          EXPORTING
            IT_LIST_COMMENTARY = E04_LT_TOP_OF_PAGE
            I_LOGO             = 'ENJOY_SAP_LOGO'.
      ENDIF.
    ENDFORM.                    "TOP
    *&      Form  END_LIST
    *       text
    FORM END_LIST.
      IF LIST = 'X'.
        SKIP 2.
        WRITE:/60 'END OF PAGE'.
      ENDIF.
      IF GRID = 'X'.
          DATA: LS_LINE TYPE SLIS_LISTHEADER,
              E04_LT_END_OF_LIST TYPE SLIS_T_LISTHEADER.
    *   Listenüberschrift: Typ H
        CLEAR LS_LINE.
        LS_LINE-TYP  = 'H'.
    *   LS_LINE-KEY:  not used for this type
        LS_LINE-INFO = 'Summary'.
        APPEND LS_LINE TO E04_LT_END_OF_LIST.
    *   Kopfinfo: Typ S
        CLEAR LS_LINE.
        LS_LINE-TYP  = 'S'.
        LS_LINE-KEY  = 'Intelligroup'.
        LS_LINE-INFO = ''.
        APPEND LS_LINE TO E04_LT_END_OF_LIST.
        LS_LINE-KEY  = 'ASIA'.
        LS_LINE-INFO = 'PVT LTD'.
        APPEND LS_LINE TO E04_LT_END_OF_LIST.
    *   Aktionsinfo: Typ A
        CLEAR LS_LINE.
        LS_LINE-TYP  = 'A'.
    *   LS_LINE-KEY:  not used for this type
        LS_LINE-INFO = TEXT-105.
        APPEND LS_LINE TO  E04_LT_END_OF_LIST.
        CALL FUNCTION 'REUSE_ALV_COMMENTARY_WRITE'
          EXPORTING
            IT_LIST_COMMENTARY = E04_LT_END_OF_LIST.
      ENDIF.
    ENDFORM.                    "END_LIST

  • Urgent: regarding sub total button in alv report

    hi,
    i had made dis report and it is is fine till now,but now i want add the sub total field in it ,by making double click on the field sub-total should be displayed in it.
    here is d code as i had tried the sub - total but when i execute it is giving some diferrent result.
    *& Report  ZTET2
    REPORT  ZTET2.
    TABLES: ISEG,MARA.
    TYPE-POOLS : SLIS.
    DATA : DATE1(15) TYPE C,
    DATE2(15) TYPE C,
    TITLE(65) TYPE C,
    DT(25) TYPE C.
    DATA : ITEVENT TYPE SLIS_T_EVENT.
    DATA: lv_sort TYPE slis_sortinfo_alv,
          t_sort type slis_t_sortinfo_alv.
    DATA : repid LIKE sy-repid.
    INTERNAL TABLE FOR INVENTORY STOCK *****************
    DATA: BEGIN OF ITS1 OCCURS 0,
          MATNR LIKE ISEG-MATNR,
          ITEMID(6) TYPE C,
          MEINS LIKE ISEG-MEINS,
          MENGE LIKE ISEG-MENGE,
          WRTZL LIKE ISEG-WRTZL,
          BUCHM LIKE ISEG-BUCHM,
          WRTBM LIKE ISEG-WRTBM,
          WERKS LIKE ISEG-WERKS,
          BUDAT LIKE ISEG-BUDAT,
          ZLDAT LIKE ISEG-ZLDAT,
          MTART LIKE MARA-MTART,
          ITEMDESC LIKE MAKT-MAKTX,
          DIFFQTY LIKE ISEG-BUCHM,
          DIFFVALUE LIKE ISEG-WRTBM,
          GRUND LIKE ISEG-GRUND,
          GRTXT LIKE T157E-GRTXT,
          BWART LIKE T157E-BWART,
          REAS TYPE C LENGTH 15,
          END OF ITS1.
    data: t_heading type slis_t_listheader.
    SELECTION-SCREEN BEGIN OF BLOCK PAR1 WITH FRAME TITLE TEXT-001.
    *SELECTION-SCREEN : BEGIN OF BLOCK blk1 WITH FRAME TITLE text-001.
    *********PARAMETERS*********
    PARAMETERS : PLANT LIKE ISEG-WERKS OBLIGATORY.
    *********SELECTION SCREEN OPTIONS*********
    SELECT-OPTIONS : R_DATE FOR ISEG-BUDAT OBLIGATORY NO-EXTENSION,
                     M_TYPE  FOR MARA-MTART,
                     IT_M FOR MARA-MATNR.
    *********DEFINING VARIABLES*********
    SELECTION-SCREEN END OF BLOCK par1.
    CONCATENATE R_DATE-LOW6(2) '.' R_DATE-LOW4(2) '.' R_DATE-LOW+0(4) INTO DATE1.
    CONCATENATE R_DATE-HIGH6(2) '.' R_DATE-HIGH4(2) '.' R_DATE-HIGH+0(4) INTO DATE2.
    TOP-OF-PAGE.
      PERFORM PG_HEADER.
       START-OF-SELECTION.
      SELECT AMATNR AMEINS AMENGE AWRTZL ABUCHM AWRTBM AWERKS ABUDAT AZLDAT BMTART AGRUND CBWART
       FROM ISEG AS A INNER JOIN MARA AS B ON BMATNR = AMATNR
       INNER JOIN MSEG AS C ON AMBLNR = CMBLNR
       INTO CORRESPONDING FIELDS OF TABLE ITS1 WHERE BMATNR = AMATNR  AND BMEINS = AMEINS AND AWERKS = PLANT AND ABUDAT IN R_DATE AND BMTART IN M_TYPE AND BMATNR IN IT_M.
    LOOP AT ITS1.
         ITS1-ITEMID = ITS1-MATNR+12(6).
         ITS1-DIFFQTY = ITS1-MENGE - ITS1-BUCHM.
         ITS1-DIFFVALUE = ITS1-WRTZL - ITS1-WRTBM.
         SELECT SINGLE MAKTX FROM MAKT INTO ITS1-ITEMDESC WHERE MATNR = ITS1-MATNR.
         SELECT SINGLE GRTXT INTO ITS1-GRTXT FROM T157E WHERE GRUND = ITS1-GRUND AND SPRAS = 'E' AND BWART = ITS1-BWART.
         MODIFY ITS1.
    ENDLOOP.
    PERFORM PRN_SMSTOCK_ALV.
    WRITING DATA FROM D TABLES**********
    FORM PG_HEADER.
    WRITE : 'PHYSICAL INVENTORY AUDIT REPORT             PLANT : ', PLANT.
    ENDFORM.
    *&      Form  PRN_SMSTOCK_ALV
          text
    -->  p1        text
    <--  p2        text
    form PRN_SMSTOCK_ALV .
    data: w_title   type lvc_title,
          w_repid   type syrepid,
          w_comm    type slis_formname,
          w_status  type slis_formname,
          x_layout  type slis_layout_alv,
          t_event   type slis_t_event,
          t_fieldcat type slis_t_fieldcat_alv,
          t_subtot TYPE slis_t_sortinfo_alv,
          subtot LIKE LINE OF t_subtot.
    refresh t_fieldcat.
    refresh t_event.
    refresh t_sort.
    clear x_layout.
    clear w_title.
      perform set_fieldcat2 using:
    1  'MTART'     'MTART'     'MARA'  '15'  space 'MATERIAL TYPE'        space  space  space space space space space space SPACE t_fieldcat 'L' 'L',
    2  'ITEMID'    'ITEMID'    'MARA'  '7'   space 'ITEM ID'              space  space  space space space space space space SPACE t_fieldcat 'R' 'C',
    3  'ITEMDESC'  'MAKTX'     'MAKT'  '25'  space 'MATERIAL DESCRIPTION' space  space  space space space space space space SPACE t_fieldcat 'L' 'C',
    4  'MEINS'     'MEINS'     'MARA'  '5'   space 'UOM'                  space  space  space space space space space space SPACE t_fieldcat 'C' 'C',
    5  'MENGE'     'MENGE'     'ISEG'  '13'  space 'ORG.INV.QTY'          space  space  space space space space space space SPACE t_fieldcat 'R' 'C',
    6  'WRTZL'     'WRTZL'     'ISEG'  '13'  space 'ORG.INV.VALUE'        space  space  space space space space space space SPACE t_fieldcat 'R' 'C',
    7  'BUCHM'     'BUCHM'     'ISEG'  '13'  space 'PHY.INV.QTY'          space  space  space space space space space space SPACE t_fieldcat 'R' 'C',
    8  'WRTBM'     'WRTBM'     'ISEG'  '13'  space 'PHY.INV.VALUE'        space  space  space space space space space space SPACE t_fieldcat 'R' 'C',
    9  'DIFFQTY'   'MENGE'     'ISEG'  '13'  space 'DIFF.INV.QTY'         space  space  space space space space space space SPACE t_fieldcat 'R' 'C',
    10 'DIFFVALUE' 'WRTZL'     'ISEG'  '13'  space 'DIFF.INV.VALUE'       space  space  space space space space space space SPACE t_fieldcat SPACE 'P',
    11 'BUDAT'     'BUDAT'     'ISEG'  '18'  space 'CORRECTED DATE'       space  space  space space space space space space SPACE t_fieldcat  'C' 'C',
    12 'GRTXT'     'GRTXT'     'ISEG'  '18'  space 'REASON'               space  space  space space space space space space SPACE t_fieldcat  'L' 'L',
    13 'REAS'      'REAS'      'ISEG'  '18'  space 'AUTH.BY'              space  space  space space space space space space SPACE t_fieldcat  'C' 'C'.
    x_layout-zebra = 'X'.
    perform set_top_page_heading using t_heading t_event.
    perform set_events using t_event.
    perform get_subtotals.
      w_status = ''.
      w_repid = sy-repid.
    w_comm   = 'USER_COMMAND'.
      call function 'REUSE_ALV_GRID_DISPLAY'
        exporting
          i_callback_program       = w_repid
          it_fieldcat              = t_fieldcat
          i_Callback_top_of_page   = 'Top-of-page'
          is_layout                = x_layout
          it_sort                  = t_sort
          i_callback_pf_status_set = w_status
          i_callback_user_command  = w_comm
          i_save                   = 'X'
          it_events                = t_event
          i_grid_title             = w_title
          tables
          t_outtab                 = ITS1
          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 set_fieldcat2 USING
          p_colpos p_fieldname p_ref_fieldname p_ref_tabname
          p_outputlen p_noout
          p_seltext_m p_seltext_l p_seltext_s p_reptext_ddic p_ddictxt
          p_hotspot p_showasicon p_checkbox p_edit
          p_dosum
        p_subtot
          t_fieldcat TYPE slis_t_fieldcat_alv
          P_JUST
          P_FTYPE.
      DATA: wa_fieldcat TYPE slis_fieldcat_alv.
      CLEAR wa_fieldcat.
    General settings
      wa_fieldcat-fieldname = p_fieldname.
      wa_fieldcat-col_pos = p_colpos.
      wa_fieldcat-no_out = p_noout.
      wa_fieldcat-hotspot = p_hotspot.
      wa_fieldcat-checkbox = p_checkbox.
      wa_fieldcat-icon = p_showasicon.
      wa_fieldcat-do_sum = p_dosum.
    wa_fieldcat-t_subtot = p_subtot.
    Set output length.
      IF NOT p_outputlen IS INITIAL.
        wa_fieldcat-outputlen = p_outputlen.
      ENDIF.
    Set text headers.
    IF NOT p_seltext_m IS INITIAL.
        wa_fieldcat-seltext_m = p_seltext_m.
    ENDIF.
    IF NOT p_seltext_l IS INITIAL.
        wa_fieldcat-seltext_l = p_seltext_l.
    ENDIF.
    IF NOT p_seltext_s IS INITIAL.
        wa_fieldcat-seltext_s = p_seltext_s.
    ENDIF.
      IF NOT p_reptext_ddic IS INITIAL.
        wa_fieldcat-reptext_ddic = p_reptext_ddic.
      ENDIF.
    IF NOT p_ddictxt IS INITIAL.
        wa_fieldcat-ddictxt = p_ddictxt.
    ENDIF.
      IF NOT P_JUST IS INITIAL.
        WA_FIELDCAT-JUST = P_JUST.
      ENDIF.
      IF NOT p_edit IS INITIAL.
        wa_fieldcat-Input     = 'X'.
        wa_fieldcat-edit     = 'X'.
        wa_fieldcat-do_sum = 'x'.
       wa_fieldcat-p_subtot = 'x'.
      ENDIF.
    APPEND wa_fieldcat TO t_fieldcat.
    ENDFORM.                   "set_fieldcat2
    ======================== Subroutines called by ALV ================
    *&      Form  top_of_page
          Called on top_of_page ALV event.
          Prints the heading.
    form top_of_page.
      call function 'REUSE_ALV_COMMENTARY_WRITE'
         exporting
              it_list_commentary = t_heading.
    ENDFORM.
    form set_top_page_heading using t_heading type slis_t_listheader
                                    t_events  type slis_t_event.
    data: x_heading type slis_listheader,
          x_event   type line of slis_t_event.
    Report title
      clear t_heading[].
      clear x_heading.
      x_heading-typ = 'H'.
      x_heading-info = 'PHYSICAL INVENTORY AUDIT REPORT'.
      append x_heading to t_heading.
    Plant Name
    clear x_heading.
      x_heading-typ = 'S'.
      x_heading-key = 'PLANT        : '.
      x_heading-info = PLANT.
      append x_heading to t_heading.
    IF DATE2 = '00.00.0000'.
      CONCATENATE DATE1 'to' DATE1 INTO DT SEPARATED BY SPACE.
    ELSE.
      CONCATENATE DATE1 'to' DATE2 INTO DT SEPARATED BY SPACE.
    ENDIF.
    X_heading-TYP = 'S'.
    X_heading-key = 'PERIOD         :'.
    X_heading-INFO = DT.
    APPEND x_heading TO t_heading.
    Control Date
      clear x_heading.
      x_heading-typ = 'S'.
      x_heading-key = 'CONTROL NO. :'.
      x_heading-info = ' ASDFADDFAAS  DATE : 11.04.2007'.
      append x_heading to t_heading.
    Control date
    clear x_heading.
    x_heading-typ = 'S'.
    x_heading-key = 'CONTROL DATE : '.
    x_heading-info = ''.
    append x_heading to t_heading.
    Time of execution
    clear x_heading.
    x_heading-typ = 'S'.
    x_heading-key = 'DATE : '.
    write sy-DATUM to x_heading-info.
    append x_heading to t_heading.
    Top of page event
      x_event-name = slis_ev_top_of_page.
      x_event-form = 'TOP_OF_PAGE'.
      append x_event to t_events.
    endform.
    FORM get_subtotals.
    CLEAR lv_sort.
    lv_sort-fieldname = 'MENGE'.
    lv_sort-up = 'X'.
    lv_sort-subtot = 'X'.
    APPEND lv_sort TO t_sort.
    clear lv_sort.
    *lv_sort-fieldname = 'MENGE'.
    *lv_sort-tabname = 'ITS1'.
    *lv_sort-subtot = 'X'.
    *APPEND lv_sort TO t_sort.
    lv_sort-fieldname = 'WRTZL'.
    lv_sort-tabname = 'ITS1'.
    lv_sort-subtot = 'X'.
    APPEND lv_sort TO t_sort.
    clear lv_sort.
    lv_sort-fieldname = 'BUCHM'.
    lv_sort-tabname = 'ITS1'.
    lv_sort-subtot = 'X'.
    APPEND lv_sort TO t_sort.
    clear lv_sort.
    lv_sort-fieldname = 'WRTBM'.
    lv_sort-tabname = 'ITS1'.
    lv_sort-subtot = 'X'.
    APPEND lv_sort TO t_sort.
    clear lv_sort.
    lv_sort-fieldname = 'DIFFQTY'.
    lv_sort-tabname = 'ITS1'.
    lv_sort-subtot = 'X'.
    APPEND lv_sort TO t_sort.
    clear lv_sort.
    lv_sort-fieldname = 'DIFFVALUE'.
    lv_sort-tabname = 'ITS1'.
    lv_sort-subtot = 'X'.
    APPEND lv_sort TO t_sort.
    clear lv_sort.
    ENDFORM.
    form set_events using t_events type slis_t_event.
    data: x_event   type line of slis_t_event.
    endform.
    PLZ HELP ME and definately get rewarded.

    hi,
    how did u declared ur internal table?
    Declare a dummy field in your internal table to trigger subtotal text event.
    TYPES: BEGIN OF ty_ekpo,
              lifnr TYPE ekko-lifnr,    "vendor number
              ebeln TYPE ekko-ebeln,    "purchase document number
              ebelp TYPE ekpo-ebelp,    "Item Number of Purchasing Document
              matnr TYPE ekpo-matnr,    "Material Number
              bukrs TYPE ekpo-bukrs,    "Company Code
              werks TYPE ekpo-werks,    "Plant
              d,                        "Dummy field to fire the Subtotal text event
          END OF ty_ekpo.
    Prepare field catalog for that dummyfield also and set attributes like below
    wa_fcat-col_pos = 7.
      wa_fcat-fieldname = 'D'.
      wa_fcat-tabname = 'IT_EKPO'.
      wa_fcat-ref_fieldname = 'NETPR'.
      wa_fcat-ref_tabname = 'EKPO'.
      wa_fcat-no_out = 'X'.
      APPEND wa_fcat TO it_fcat.
    Fill sortinfo table as follows
    wa_sort-spos = 1.
      wa_sort-fieldname = 'LIFNR'.
      wa_sort-tabname = 'IT_EKPO'.
      wa_sort-up = 'X'.
      wa_sort-group = 'UL'.
      APPEND wa_sort TO it_sort.
      CLEAR wa_sort.
      wa_sort-spos = 2.
      wa_sort-fieldname = 'D'.
      wa_sort-tabname = 'IT_EKPO'.
      wa_sort-up = 'X'.
      wa_sort-group = 'UL'.
      wa_sort-subtot = 'X'.
      APPEND wa_sort TO it_sort.
    fill the event table
    wa_event-name = 'SUBTOTAL_TEXT'.  "--> this event is used to trigger subtotal text
      wa_event-form = 'SUBTOTAL'.
      APPEND wa_event TO it_event.
    *&      Form  subtotal
    FORM subtotal USING i_listhead STRUCTURE wa_ekpo  i_subtotal TYPE slis_subtot_text.
      READ TABLE it_sort INTO wa_sort WITH KEY fieldname = 'D'.
      IF sy-subrc = 0.
        IF i_subtotal-criteria = 'D'.
          i_subtotal-display_text_for_subtotal = 'Sub total'.
        ENDIF.
      ENDIF.
    ENDFORM.                    "subtotal
    Thanks & REgards

  • How to calculate totals in Blocked ALV Report

    Hi All,
    Can any body tell how to calculate totals & sub totals in
    Blocked ALV Report[Blocked List].
    Thanks in advance
    Thanks & Regards,
    Rayeezuddin.

    read this it might help
    Sums                                                       
    15. No_sumchoice(1) TYPE c : This parameter allows the choice for summing up
    Only by fieldcatalog.
    Value set: SPACE, 'X'
    'X' = fields which are to be summed, passed by the calling program (FIELDCAT-DO_SUM = 'X'). The user should not be able to change this value interactively.
    16. No_totalline(1) TYPE c : Removes the option of having totals after sub-totals.
    Value set: SPACE, 'X'
    'X' = no total record is to be output. Subtotals can still be calculated and output. The fields in the subtotals are flagged DO_SUM = 'X' in the field list.
    17. No_subchoice(1) TYPE c : Does not allow the user to interactively change the field chosen for subtotals.
    Value set: SPACE, 'X'
    'X' = value whose change triggers subtotals, provided by the calling program. The user should not be able to change this value interactively.
    18. No_subtotals(1) TYPE c : No subtotals possible          
    Value set: SPACE, 'X'
    'X' = no subtotals.
    19. Numc_sum(1)  TYPE c : Totals only possible for NUMC-Fields.
    20. No_unit_splitting TYPE c: No separate total lines by inh.units   
    21.totals_before_items TYPE c: Display totals before the items   
    22. Totals_only(1) TYPE c :  Show only totals      
    Value set: SPACE, 'X'
    'X' = only total records are output.
    23. Totals_text(60) TYPE c : Text for 1st col. in totals   
    Value set: SPACE, string (max.60)
    ' ' = The first column in the total record contains an appropriate number of '*'s to indicate the total by default. If the first column is wide enough, the string 'Total' is output after the asterisks.
    'String’ = The string passed is output after the total indicated by '*', if the column is wide enough.
    24. Subtotals_text(60) TYPE c : Texts for subtotals
    Value set: SPACE, string (max.60)
    ' ' = In the first column of subtotal records, the subtotal is indicated by an appropriate number of '*' by default. If the first column is not a subtotal criterion, the string 'Total' is output after the asterisks, if the column is wide enough.
    'String’ = the string passed is output after the subtotal indicated by '*', if the column is wide enough and the first column is not a subtotal criterion. If it is a subtotal criterion, its value is repeated after the total, if the column is wide enough.
    ELSE TELL ME I WILL PASTE COMPLETE HELP
    regards

  • How to find out the total, subtotal in alv report

    hi dears,
    how to find out the total, subtotal in alv report?
    pls tell me logic ,
    i will be waiting for eply
    regards
    eswar

    Hi,
    <b>ALV Grid List with sub-totals</b>
    REPORT z_demo_alv_sort.
    * This program lists orders (VBAK) with sort and sub-total for        *
    * 'sold-to-party' (KUNNR) and 'Sales organization' (VKORG)            *
    TABLES : vbak.
    TYPE-POOLS: slis.                      " ALV Global types
    SELECT-OPTIONS :
      s_vkorg FOR vbak-vkorg,              " Sales organization
      s_kunnr FOR vbak-kunnr,              " Sold-to party
      s_vbeln FOR vbak-vbeln.              " Sales document
    SELECTION-SCREEN :
      SKIP, BEGIN OF LINE,COMMENT 5(27) v_1 FOR FIELD p_max.
    PARAMETERS p_max(2) TYPE n DEFAULT '20' OBLIGATORY.
    SELECTION-SCREEN END OF LINE.
    DATA:
      BEGIN OF gt_vbak OCCURS 0,
        vkorg LIKE vbak-vkorg,             " Sales organization
        kunnr LIKE vbak-kunnr,             " Sold-to party
        vbeln LIKE vbak-vbeln,             " Sales document
        netwr LIKE vbak-netwr,             " Net Value of the Sales Order
        waerk LIKE vbak-waerk,             " Document currency
      END OF gt_vbak.
    INITIALIZATION.
      v_1 = 'Maximum of records to read'.
    START-OF-SELECTION.
      PERFORM f_read_data.
      PERFORM f_display_data.
    *      Form  f_read_data
    FORM f_read_data.
      SELECT * INTO CORRESPONDING FIELDS OF TABLE gt_vbak
               FROM vbak
                 UP TO p_max ROWS
              WHERE kunnr IN s_kunnr
                AND vbeln IN s_vbeln
                AND vkorg IN s_vkorg.
    ENDFORM.                               " F_READ_DATA
    *      Form  f_display_data
    FORM f_display_data.
      DEFINE m_fieldcat.
        add 1 to ls_fieldcat-col_pos.
        ls_fieldcat-fieldname   = &1.
        ls_fieldcat-ref_tabname = 'VBAK'.
        ls_fieldcat-do_sum      = &2.
        ls_fieldcat-cfieldname  = &3.
        append ls_fieldcat to lt_fieldcat.
      END-OF-DEFINITION.
      DEFINE m_sort.
        add 1 to ls_sort-spos.
        ls_sort-fieldname = &1.
        ls_sort-up        = 'X'.
        ls_sort-subtot    = &2.
        append ls_sort to lt_sort.
      END-OF-DEFINITION.
      DATA:
        ls_fieldcat TYPE slis_fieldcat_alv,
        lt_fieldcat TYPE slis_t_fieldcat_alv,
        lt_sort     TYPE slis_t_sortinfo_alv,
        ls_sort     TYPE slis_sortinfo_alv,
        ls_layout   TYPE slis_layout_alv.
      m_fieldcat 'VKORG' ''  ''.
      m_fieldcat 'KUNNR' ''  ''.
      m_fieldcat 'VBELN' ''  ''.
      m_fieldcat 'NETWR' 'X' 'WAERK'.
      m_fieldcat 'WAERK' ''  ''.
      m_sort 'VKORG' 'X'.                  " Sort by vkorg and subtotal
      m_sort 'KUNNR' 'X'.                  " Sort by kunnr and subtotal
      m_sort 'VBELN' ''.                   " Sort by vbeln
      ls_layout-cell_merge = 'X'.
      CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
           EXPORTING
                is_layout   = ls_layout
                it_fieldcat = lt_fieldcat
                it_sort     = lt_sort
           TABLES
                t_outtab    = gt_vbak.
    ENDFORM.                               " F_DISPLAY_DATA
    ***************** END OF PROGRAM Z_DEMO_ALV_SORT **********************
    Regards
    Sudheer

  • How to get the total pages in ALV report?

    Hi guys,
    Since I used page breaks can somebody please help me on how to get the total pages in ALV report?sincerely please...thanks guys.

    automatic display total page.
    https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/uuid/e8a1d690-0201-0010-b7ad-d9719a415907
    r

  • Just the sub totals in ALV ... is it possible

    Report RCATS_APPROVE_ACTIVITIES
    transaction called cats_appr_lite that displays a ALV report output
    This report displayes the employees entered times in CATS and can be used by HR admins or managers for approval.
    When the manager executes the report shows the times for each day
    like it will show
    PERN Date Time Unit
    1000 1st jan monday 8 hours
    1000 2nd jan monday 8 hours
    1000 3rd jan monday 8 hours
    1000 4th jan monday 8 hours
    1000 5th jan monday 8 hours
    And after i set the totals / sub totals for PERNR it also shows me another line
    1000 40 hours
    In this ALV report I just want to see the totals line like
    1000 40 hours
    and not the line items.
    Idela scenario is I want to see the line items when clicked on the Totals line
    1000 40 hours
    Like i double click on the totals and see
    1000 1st jan monday 8 hours
    1000 2nd jan monday 8 hours
    1000 3rd jan monday 8 hours
    1000 4th jan monday 8 hours
    1000 5th jan monday 8 hours
    and from there on I can further navigate as required and currently avialable.
    IS this something thatsome has every worked on. IS it technicallyfeasible with ALV reporting to show just the sub totals on the first page ( that is by not modifying the program but by just changing the layouts).

    You can achieve this with the layouts:
    First run your ALV.. now do the subtotal based on your employe... you will have
    new line with * in front of it.
    1000 1st jan monday 8 hours
    1000 2nd jan monday 8 hours
    1000 3rd jan monday 8 hours
    1000 4th jan monday 8 hours
    1000 5th jan monday 8 hours
    *1000 40 hours
    Click on this astrick ... it will collepse the line items...
    Now, save you layout by pressing the "Save layout" button.
    Next time run your report with this newly crated layout.
    Regards,
    Naimesh Patel

  • Color the sub-total row in an alv-grid

    Hi all.
    I work on SAP 4.7 WAS6.20 and output a table with the cl_gui_alv_grid. I´m able to color special rows (or columns) in the alv grid. But I want to color individually the sub-total lines (like the lines before) and don´t want the yellow color for all of the sub-total lines.
    Do you know how to color the sub-total-lines?
    Thanks a lot.
    Michael

    Hi,
    U can color an individula row see the link below
    Color a line
    The steps for coloring a line i the grid is much the same as making a traffic light.
    * To color a line the structure of the  table must include a  Char 4 field  for color properties
    TYPES: BEGIN OF st_sflight.
            INCLUDE STRUCTURE zsflight.
    *       Field for line color
    types:  line_color(4) type c.
    TYPES: END OF st_sflight.
    TYPES: tt_sflight TYPE STANDARD TABLE OF st_sflight.
    DATA: gi_sflight TYPE tt_sflight.
    * Loop trough the table to set the color properties of each line. The color properties field is
    * Char 4 and the characters is set as follows:
    * Char 1 = C = This is a color property
    * Char 2 = 6 = Color code (1 - 7)
    * Char 3 = Intensified on/of = 1 = on
    * Char 4 = Inverse display = 0 = of
         LOOP AT gi_sflight INTO g_wa_sflight.
          IF g_wa_sflight-paymentsum < 100000.
            g_wa_sflight-line_color    = 'C610'.
          ENDIF.
          MODIFY gi_sflight FROM g_wa_sflight.
        ENDLOOP.
    * Name of the color field
    gs_layout-info_fname = 'LINE_COLOR'.
    * Grid setup for first display
    CALL METHOD go_grid->set_table_for_first_display
          EXPORTING i_structure_name = 'SFLIGHT'
                                 is_layout                = gs_layout
          CHANGING  it_outtab                 = gi_sflight
    see the link
    http://www.sapgenie.com/abap/controls/alvgrid.htm

  • ALV Report to display the status of the requests raised through ESS

    Hi All,
    We have to develop a ALV report to display the status of the requests raised through ESS
    for Leave, Travel & Event Management, Travel and Appraisal workflows.
    ESS Travel, ESS TEM, ESS Apraisal workflows are associted with SAP Business Objects.
    we are using the function module SWI_WORKITEMS_OF_OBJTYPE_GET to get
    the top level work item id's by passing the object type like PDRELA_025, BUS2089.
    By using SWP_WORKFLOW_LOG_READ function we are getting the workflow log
    by passing top level work item id's as imort parameter. 
    The report output should have the following fields
    Initiator, Initiator Personal No, Request Type( Leave, Travel etc.. )
    Date of application of the request, Status ( Approved by RM, Rejected etc )
    Name of the Approver, Approved / Rejected Date.
    The logic should be work for all the above ESS workflows and should be generalized.
    Can any one please let me know the procedure to get the required information from the workflow log.
    It would be great if any one suggest on the same how to proceed further to get the information as mentioned above.
    Thanks & Regards,
    Jagadeeswara Rao Balla.

    Hello,
    You can get most of that information from fm SAP_WAPI_GET_HEADER, input is workitem_id.
    regards
    Rick Bakker
    Hanabi Technology

  • I need a field like "System.RelatedLinkCount" but where the count is linked items with a field in a certain state

    I need a field like "System.RelatedLinkCount" but where the count is linked items with a field in a certain state.
    e.g. I've got a WI with a field on it that tells me how many active bugs are linked to it. (I'm not actually counting active bugs, but hopefully you get the idea). 
    The only way I can think to do this is with a TFS plugin and catching the workitemchanged event. I'd prefer to do this entirely in the WI if possible? is there a way to do this? Thanks

    Hi TimB33, 
    Thanks for your post.
    As far as I know there’s no default WI rule support to get the specific WIT linked count, I think you need to create your custom work item control to achieve that if you want this field.
    For this scenario, please submit it to User Voice site at: http://visualstudio.uservoice.com/forums/121579-visual-studio. Microsoft engineers will evaluate them
    seriously.  
    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click
    HERE to participate the survey.

  • Is there a way to change the actual song file but keep the 'info'?

    I have a compilation that took me a really long time to edit (by which I mean put the date for each individual song in because they were all released different years becaues it's a Bob Dylan compilation and I have smart playlists for each decade from the 50's upwards) and I want to change the actual file in itunes but keep the data, is there any way? It'd take ages to do again because it's a 3-cd album. I'm trying to change the file because the one I have is approx 200kbps bit rate and i want to have a different, 320kbps version that i've downloaded. I've tried opening the file in explorer and deleting it so that i can 'locate' the file again to the one i want to replace it with, but it changes the song title, album artist, and tags etc to the new file, whereas i thought it would just retain the information but change the actual file it played.
    i've had a really hard time explaining this i'm sorry if it's unclear. i was just wondering if there was any way to avoid the painstaking process of googling each song to find its release date and manually entering it when i already have a perfectly organised album.
    i can't find anything anywhere about this, presumably because i've no idea what the key words for the search would be, so i'm sorry if this is common knowledge.
    thanks in advance

    VBR vs. CBR isn't a concern as far as the strategy is concerned. As given it is slightly easier if the replacement files have exactly the same files names and folders as the files they are replacing (case doesn't matter) but if that isn't possible we can work around that too.
    Not my area but I think CBR gives larger files and less processing overhead for the same quality, which is a somewhat nebulous term. I'm not sure there is any real benefit.
    Yes a script is just another kind of a program.
    iTunes gives each track in the database a unique ID and knows the path that the file is supposed to live on. If you replace the original file with a different file of higher bitrate that has the same filename then iTunes will use that new file next time it wants to play the track. When it does so it will also read the tag and update itself if any of the information is different.
    The original function of the ExportImport script was to help someone else rescue play counts from an old library database. If works by scanning through selected tracks and writing out a text file that contains an ID for each track and the data that wants to be copied back later.
    Here is a sample output from the export:
    <#>iTunes Metadata - Exported 19/12/2012 20:03:58
    <ID>E5C69360-306A28AF
    <#>AC-DC\AC-DC Live\1 Thunderstruck
    <Plays>12
    <ID>7C1D487C-3414298C
    <#>AC-DC\AC-DC Live\2 Shoot To Thrill
    <Plays>12
    <ID>0DCF32CE-1079174E
    <#>AC-DC\AC-DC Live\3 Back In Black
    <Plays>15
    Each block consists of the iTunes track ID, a comment so we humans can see which track this is, followed by one or more properties. I can write you a custom version of this script but I need to know exactly which properties you need to save and then restore. For example Name, Year, Genre, etc. You need to compare a new and old version of one of your songs and work out which fields need resetting in the new song to make it match the old one.
    Having saved a file with the information that would otherwise change, you can then delete the older copies of the file, or better yet move them to a backup location, then copy in the new versions. If the filenames match iTunes will "see" the new files automatically, otherwise my FindTracks script can normally fix the broken links. Once iTunes is connected to all of the new files you drag and drop the saved text file onto the ExportImport script to run the import phase. This applies the saved data to each track in turn.
    tt2

  • If my Ipad was stolen, I had erased all the data, but keep the Ipad on my account - nobody can use it without my permission?

    If my Ipad was stolen, I had erased all the data, but keep the Ipad on my account - nobody can use it without my permission?

    If the iPad was running iOS 7, the thief/finder will not ever be able to use it.
    iCloud: Find My iPhone Activation Lock in iOS 7
    http://support.apple.com/kb/HT5818
    Apple (and no one else) can not assist (with serial number or iCloud) in finding a lost or stolen iPad.
    Report to police along with serial number. Change all your passwords.
    These links may be helpful.
    How to Track and Report Stolen iPad
    http://www.ipadastic.com/tutorials/how-to-track-and-report-stolen-ipad
    Reporting a lost or stolen Apple product
    http://support.apple.com/kb/ht2526
    What to do if your iOS device is lost or stolen
    http://support.apple.com/kb/HT5668
    How to Find a Missing iPad with FindMyiPad
    http://www.dummies.com/how-to/content/how-to-find-a-missing-ipad-with-findmyipad .html
    iCloud: Locate your device on a map
    http://support.apple.com/kb/PH2698
    iCloud: Lost Mode - Lock and Trace
    http://support.apple.com/kb/PH2700
    iCloud: Remotely Erase your device
    http://support.apple.com/kb/PH2701
    Report Stolen iPad Tips and iPad Theft Prevention
    http://www.stolen-property.com/report-stolen-ipad.php
    General steps to follow for a Stolen iPad
    http://stolen-ipad.com/
    How to recover a lost or stolen iPad
    http://ipadhelp.com/ipad-help/how-to-recover-a-lost-or-stolen-ipad/
    How to Find a Stolen iPad
    http://www.ehow.com/how_7586429_stolen-ipad.html
    What NOT to do if your iPhone or iPad is lost or stolen
    http://www.tomahaiku.com/what-not-to-do-if-your-iphone-or-ipad-lost-or-stolen/
    Apple Product Lost or Stolen
    http://sites.google.com/site/appleclubfhs/support/advice-and-articles/lost-or-st Len
    Oops! iForgot My New iPad On the Plane; Now What?
    http://online.wsj.com/article/SB10001424052702303459004577362194012634000.html
    If you don't know your lost/stolen iPad's serial number, use the instructions below. The S/N is also on the iPad's box.
    How to Find Your iPad Serial Number
    http://www.ipadastic.com/tutorials/how-to-find-your-ipad-serial-number
    iOS: How to find the serial number, IMEI, MEID, CDN, and ICCID number
    http://support.apple.com/kb/HT4061
    Check the serial number (located on back/bottom) in this lost/stolen iPad database. However, most owners are not aware of this database and don’t enter the serial number.
    Stolen iPad Database
    http://www.stolenlostfound.org/online-stolen-ipad-database
    Also do a search, using the serial number, on your local Craig’s List. Some users list the serial number of a stolen iPad to thwart the sale of a stolen device.
     Cheers, Tom

  • I purchased (and have now deleted Aperture from my computer and want to use only iPhoto.  How do I delete Aperture albums but keep the pics in iPhoto?

    I purchased (and have now deleted) Aperture from my computer and want to use only iPhoto.  (Aperture was simply too much program for me.)  How do I delete Aperture albums but keep the pics in iPhoto?  Please accept my apologies in advance if this is a dumber than dumb question.  I simply want all vestiges of Aperture to go away with losing all my albums.  Any help would be appreciated!

    Aperture added  a second view to your library.
    You now have an additional section in your Source list , called events. But this section lists exactly the same events that you are seeing in the "Events" view. Don't delete anything from there, or you will delete your photos. But you can press the "Hide" button to collaps that section. But someday you may want to use this list. It makes it very easy to move photos between events.

  • Is it possible to delete the table of contents in a pdf but keep the bookmarks?

    Is it possible to delete the table of contents in a pdf but keep the bookmarks?

    If the TOC is located on certain pages, you can simply delete those (from the Pages panel).
    Make sure it doesn't screw up with how your bookmarks work, though...

  • Removing podcast episodes from iTunes 12 but keeping the files

    I want to be able to remove a podcast episode from iTunes 12 but keep the audio file on my computer. This used to be an option, but now I am no longer asked if I want to keep the file. It's just automatically moved to the Trash. I like to archive podcast episodes on my external drive, but I don't always feel like getting the drive out when I'm done listening, plugging it in and dragging and dropping the files. I'm lazy like that. I would keep the episodes I plan to archive on iTunes until I feel like breaking out the drive, except that brings me to my second issue: my podcasts seem to all be set to automatically delete played episodes after 24 hours, at least depending on what view I'm in. I have "Delete Played Episodes" set to "Off" in my default podcast settings, and when I context click a podcast in the "My Podcasts" view and select "Podcast Settings" it says "Delete Played Episodes" is "Off". However when I go to the Playlists view, select an episode and click the "Settings..." button at the bottom, it always says the selected podcast has "Delete Played Episodes" set to "On", even if I click to change it to "Off" in that view. So there's obviously a contradiction there. I don't want to take the chance that my played episodes will be automatically deleted so the sooner I get them off iTunes the better. Unfortunately that means deleting them, then dragging them from Trash back to the iTunes Media/Podcasts folder and into each appropriate podcast folder, which is annoying. Please tell me that the removal of the "Keep the file" option is just a bug. If Apple is, for whatever reason, trying to discourage me from moving my played episodes out of iTunes and onto another drive, then I'm just going to stop using iTunes altogether.

    The iTunes Store reads your feed at intervals and caches the contents (the information, not the actual media files): when you make a change to the feed it usually takes 1-2 days for this to be reflected in the Store. Pinging doesn't seem to make a lot of difference. Very occasionally it all slows down and can take several days.

Maybe you are looking for

  • Reporting Services 2012 for SharePoint and SQL Server Agent "Subscriptions and Alerts"

    After installing Reporting Services for SharePoint (Denali) in my test farm, I'm trying to configure the "SQL Server Agent" access for Reporting Services.  From Central Admin I'm going to the Reporting Service applicaiton configuration screen and sel

  • Problems setting up email account

    Have recently got a blackberry 9300 and having problems setting up my aol email account.  Do not know how to fix this problem, can anyone please give advice?

  • Illustrator CS6 crashes when GOM Player is on

    Whenever I have an open video file with GOM Player (my vide file player) Illustrator will casually crash upon opening, Illustartor would load completely and then just crash. The same thing would happen if Illustrator is open and I want to open a vide

  • Adobe CC - My Accounting Horror Story - Help!

    I had signed up with others in my department and was on CC for two months - no problems.  Then in October, for some reason the charge to the credit card for my account didn't go through while everyone else's did.  The department manager called and ta

  • Deploying a package used by all of my other applications

    I have several applications that all use a CryptWorker object for encrypting strings. Currently I place this package/class into all of my apps for use. How can I put this in a single place for all my apps to use? What do you recommend?