To add additonal rows(text)  in ALV report

Hi there,
I want to add additional ROWS at the bottom of each grouping.
Right now I am getting customer wise total comission amount but the requirement is on commsion amt ,i need to calculate 10 % tax and 2% tax and these taxes should get genrated below the commsion amt column as like below:
Company code Customer Commsion Amt
2000 101 1000
2000 101 2000
Total Comsion 3000
10% Service Tax 300
2% Edn Tax 6
Total 3306
2000 102 1230
2000 102 678
The output should be like this in ALV report .Could anyone plz help me out on this.
I will really appreciate your help.
Thanks,

Hi Archana,
You can have the subtotal displayed for each company code and commision in the alv.
At end of each  comp code and customer , pass the total of the whole amount into a line and you can display a line of this total. 
Your alv gets displayed like this .
2000 101 1000
2000 101 2000
Total Comsion 3000
10% Service Tax 300
2% Edn Tax 6
                        3306
Thanks,
Guru

Similar Messages

  • How to add the double headings in Alv Report.

    Hi All,
    Plz suggest me how to add the double headings in ALv Report.
    Ram

    Hi,
    Try out this program....
    REPORT  ypm_historycard_rep.
    TYPE-POOLS : slis.
    DATA : it_cbm TYPE STANDARD TABLE OF mara.
    DATA : it_layout TYPE STANDARD TABLE OF slis_layout_alv WITH HEADER LINE,
           wa_fcat TYPE slis_fieldcat_alv,
           it_fcat TYPE slis_t_fieldcat_alv.
    START-OF-SELECTION.
      SELECT  *
      FROM  mara
      INTO CORRESPONDING FIELDS OF TABLE  it_cbm
      where matnr = 'D80K7'.
    END-OF-SELECTION.
      it_layout-zebra = 'X'.
      it_layout-colwidth_optimize = 'X'.
      it_layout-f2code = '&ETA'.
      APPEND it_layout.
      DEFINE macro4fcat.
        wa_fcat-col_pos = &1.
        wa_fcat-fieldname = &2.
        wa_fcat-tabname = &3.
        wa_fcat-seltext_l = &4.
        append wa_fcat to it_fcat.
        clear wa_fcat.
      END-OF-DEFINITION.
      macro4fcat    '1'  'MATNR'         'IT_CBM'   'MATERIAL NO'    .
      DESCRIBE TABLE it_cbm.
      IF sy-ucomm = '&F03'.
        MESSAGE 'hi hello good morning "press enter button" this is quiz' TYPE 'S'.
      ENDIF.
      CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
      EXPORTING
      i_callback_program                = sy-repid
    i_callback_html_top_of_page       = 'HTML_TOP_OF_PAGE'
      is_layout                         = it_layout
      it_fieldcat                       = it_fcat
       i_save                            = 'A'
      TABLES
      t_outtab                          = it_cbm
      EXCEPTIONS
      program_error                     = 1
      OTHERS                            = 2
      IF sy-subrc <> 0.
    * MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
    *         WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
      ENDIF.
    *&      Form  html_top_of_page
    *       text
    *      -->TOP        text
    FORM html_top_of_page USING top TYPE REF TO cl_dd_document.
      DATA: l_text(255) TYPE c.
      DATA: text1(255)  TYPE c.
      DATA: t_header TYPE REF TO cl_dd_table_element ,
            wa_header TYPE REF TO cl_dd_table_area.
      CALL METHOD top->add_gap
        EXPORTING
          width = 10.
      CALL METHOD top->add_text
      EXPORTING
        text          = 'hello'
        sap_style     = 'HEADING'
    CALL METHOD top->add_gap
        EXPORTING
          width = 20.
      CALL METHOD top->add_text
      EXPORTING
        text          = 'HOW ARE YOU'
        sap_style     = 'HEADING'.
        CALL METHOD TOP->new_line
    *      EXPORTING
    *        repeat =
        CALL METHOD top->add_gap
        EXPORTING
          width = 50.
      CALL METHOD top->add_text
      EXPORTING
        text          = '____________________________________________________________'
        sap_style     = 'HEADING'.
        CALL METHOD TOP->new_line
    *      EXPORTING
    *        repeat =
        CALL METHOD top->add_gap
        EXPORTING
          width = 90.
      CALL METHOD top->add_text
      EXPORTING
        text          = 'YOU CAN TRY LIKE THIS'
        sap_style     = 'HEADING'.
    ENDFORM.                    "html_top_of_page
    Regards
    Debarshi

  • Display a Long Text in ALV report

    Hi,
    I want to display the PO header long text in ALV Report that is 255 character width.
    Please help me out how to do this.
    please it is very urgent
    Thanks and regards
    Krishna

    Use READ_TEXT and concatenate the first lines of the text.
          CALL FUNCTION 'READ_TEXT'
               EXPORTING
                    id       = 'F01'
                    language = sy-langu
                    name     = lv_name " purchase order with leading zeroes
                    object   = 'EKKO'
               TABLES
                    lines    = t_lines
               EXCEPTIONS
                    OTHERS   = 8.
    Regards

  • Can we adjust ROW height in ALV report as like of Excel ?

    Dear all,
    Can we adjust ROW height in ALV report as like of Excel sheet ?
    Can we increase/decrease the row height in the output display ?
    How ?

    kps204020 wrote:
    Thanks a lot for your response.
    I've tried your proposal, but it has no affect. The report cells show all their content using as much lines as necessary for this.This is the default behaviour for HTML table data (tables and cells expand to fit their content).
    So I still have rows with lots of lines and rows with only a few lines mixed in my IR dependant on the cell content. Because some rows filling nearly the whole screen, it is difficult to get an overview with regard to adjacent rows.
    I'm using Application Express 4.1.1.00.23. with Theme 21. Scarlet and Firefox 17.0.1.Are all users using Firefox?
    Actually I'm working on my first APEX Solution for usage in my company and the customers demanding a solution for this topic . So I'm very keen to find a solution.
    I'm very much looking forward to your response.I've been involved with similar issues in the past. My first response is simple: Does this data have to be shown in the report? Can the offending column(s) be removed from the primary report? They will still be visible in the single row view, and the detail view if there is one.
    The second option is to create a detail view for the report with a structure that is better suited to the data involved, and make this the default view. (For an example of this, see the treatment of the PRODUCT_DESCRIPTION column in the detail view of the Products report in the Sample Database Application: click on the View Detail button on the Products page.)
    The third possibility is some kind of customization of the presentation of the data. This will involve using some combination of HTML/CSS/Dynamic Actions/Plug-ins/JavaScript that you may not be familiar with: do you have experience of these? To go down that route you need to describe in detail how you want to present the data, or what behaviour is required when the data is too long, and share an example of the report on apex.oracle.com that we can work with.

  • Edit a selected row in an alv report after pressing a push button ?

    hi all ,
    I want to edit a selected row in an alv report but that too after i press a push button . After pressing the push button , a pop up shud *** showing all the entries of the selected row which shud be editable and after editing it shud be saved into the database table.
    How can i do this please help asap ???

    May this prog. of mine can solve your requirement.
    REPORT z_demo_alv_jg.
    TYPE-POOLS                                                          *
    TYPE-POOLS: slis.
    INTERNAL TABLES/WORK AREAS/VARIABLES                                *
    DATA: i_fieldcat TYPE slis_t_fieldcat_alv,
          i_index TYPE STANDARD TABLE OF i WITH HEADER LINE,
          w_field TYPE slis_fieldcat_alv,
          p_table LIKE dd02l-tabname,
          dy_table TYPE REF TO data,
          dy_tab TYPE REF TO data,
          dy_line TYPE REF TO data.
    FIELD-SYMBOLS                                                       *
    FIELD-SYMBOLS: <dyn_table> TYPE STANDARD TABLE,
                   <dyn_wa> TYPE ANY,
                   <dyn_field> TYPE ANY,
                   <dyn_tab_temp> TYPE STANDARD TABLE.
    SELECTION SCREEN                                                    *
    PARAMETERS: tabname(30) TYPE c,
                lines(5)  TYPE n.
    START-OF-SELECTION                                                  *
    START-OF-SELECTION.
    Storing table name
      p_table = tabname.
    Create internal table dynamically with the stucture of table name
    entered in the selection screen
      CREATE DATA dy_table TYPE STANDARD TABLE OF (p_table).
      ASSIGN dy_table->* TO <dyn_table>.
      IF sy-subrc <> 0.
        MESSAGE i000(z_zzz_ca_messages) WITH ' No table found'.
        LEAVE TO LIST-PROCESSING.
      ENDIF.
    Create workarea for the table
      CREATE DATA dy_line LIKE LINE OF <dyn_table>.
      ASSIGN dy_line->* TO <dyn_wa>.
    Create another temp. table
      CREATE DATA dy_tab TYPE STANDARD TABLE OF (p_table).
      ASSIGN dy_tab->* TO <dyn_tab_temp>.
      SORT i_fieldcat BY col_pos.
    Select data from table
      SELECT * FROM (p_table)
      INTO TABLE <dyn_table>
      UP TO lines ROWS.
      REFRESH <dyn_tab_temp>.
    Display report
      CALL FUNCTION 'REUSE_ALV_LIST_DISPLAY'
        EXPORTING
          i_callback_program       = sy-repid
          i_structure_name         = p_table
          i_callback_user_command  = 'USER_COMMAND'
          i_callback_pf_status_set = 'SET_PF_STATUS'
        TABLES
          t_outtab                 = <dyn_table>
        EXCEPTIONS
          program_error            = 1
          OTHERS                   = 2.
      IF sy-subrc <> 0.
      ENDIF.
    *&      Form  SET_PF_STATUS
          Setting custom PF-Status
         -->RT_EXTAB   Excluding table
    FORM set_pf_status USING rt_extab TYPE slis_t_extab.
      SET PF-STATUS 'Z_STANDARD'.
    ENDFORM.                    "SET_PF_STATUS
    *&      Form  user_command
          Handling custom function codes
         -->R_UCOMM      Function code value
         -->RS_SELFIELD  Info. of cursor position in ALV
    FORM user_command  USING    r_ucomm LIKE sy-ucomm
                               rs_selfield TYPE slis_selfield.
    Local data declaration
      DATA: li_tab TYPE REF TO data,
            l_line TYPE REF TO data.
    Local field-symbols
      FIELD-SYMBOLS:<l_tab> TYPE table,
                    <l_wa>  TYPE ANY.
    Create table
      CREATE DATA li_tab TYPE STANDARD TABLE OF (p_table).
      ASSIGN li_tab->* TO <l_tab>.
    Create workarea
      CREATE DATA l_line LIKE LINE OF <l_tab>.
      ASSIGN l_line->* TO <l_wa>.
      CASE r_ucomm.
      When a record is selected
        WHEN '&IC1'.
        Read the selected record
          READ TABLE <dyn_table> ASSIGNING <dyn_wa> INDEX
          rs_selfield-tabindex.
          IF sy-subrc = 0.
          Store the record in an internal table
            APPEND <dyn_wa> TO <l_tab>.
          Fetch the field catalog info
            CALL FUNCTION 'REUSE_ALV_FIELDCATALOG_MERGE'
              EXPORTING
                i_program_name         = 'Z_DEMO_PDF_JG'
                i_structure_name       = p_table
              CHANGING
                ct_fieldcat            = i_fieldcat
              EXCEPTIONS
                inconsistent_interface = 1
                program_error          = 2
                OTHERS                 = 3.
            IF sy-subrc = 0.
            Make all the fields input enabled except key fields
              w_field-input = 'X'.
              MODIFY i_fieldcat FROM w_field TRANSPORTING input
              WHERE key IS INITIAL.
            ENDIF.
          Display the record for editing purpose
            CALL FUNCTION 'REUSE_ALV_LIST_DISPLAY'
              EXPORTING
                i_callback_program    = sy-repid
                i_structure_name      = p_table
                it_fieldcat           = i_fieldcat
                i_screen_start_column = 10
                i_screen_start_line   = 15
                i_screen_end_column   = 200
                i_screen_end_line     = 20
              TABLES
                t_outtab              = <l_tab>
              EXCEPTIONS
                program_error         = 1
                OTHERS                = 2.
            IF sy-subrc = 0.
            Read the modified data
              READ TABLE <l_tab> INDEX 1 INTO <l_wa>.
            If the record is changed then track its index no.
            and populate it in an internal table for future
            action
              IF sy-subrc = 0 AND <dyn_wa> <> <l_wa>.
                <dyn_wa> = <l_wa>.
                i_index = rs_selfield-tabindex.
                APPEND i_index.
              ENDIF.
            ENDIF.
          ENDIF.
      When save button is pressed
        WHEN 'SAVE'.
        Sort the index table
          SORT i_index.
        Delete all duplicate records
          DELETE ADJACENT DUPLICATES FROM i_index.
          LOOP AT i_index.
          Find out the changes in the internal table
          and populate these changes in another internal table
            READ TABLE <dyn_table> ASSIGNING <dyn_wa> INDEX i_index.
            IF sy-subrc = 0.
              APPEND <dyn_wa> TO <dyn_tab_temp>.
            ENDIF.
          ENDLOOP.
        Lock the table
          CALL FUNCTION 'ENQUEUE_E_TABLE'
            EXPORTING
              mode_rstable   = 'E'
              tabname        = p_table
            EXCEPTIONS
              foreign_lock   = 1
              system_failure = 2
              OTHERS         = 3.
          IF sy-subrc = 0.
          Modify the database table with these changes
            MODIFY (p_table) FROM TABLE <dyn_tab_temp>.
            REFRESH <dyn_tab_temp>.
          Unlock the table
            CALL FUNCTION 'DEQUEUE_E_TABLE'
              EXPORTING
                mode_rstable = 'E'
                tabname      = p_table.
          ENDIF.
      ENDCASE.
      rs_selfield-refresh = 'X'.
    ENDFORM.                    "user_command
    Regards,
    Joy.

  • Totals text for ALV report

    In my ALV report I need to add descriptions for totals
                Col1        Col2          Col3
    Sum1       #Value      #Value      #Value
    Sum2       #Value      #Value      #Value
    Sum3       #Value      #Value      #Value
    How to add text Sum1, Sum2, Sum3 to the report?
    I tried to use subtotals_text and totals_text in slis_layout_alv for REUSE_ALV_GRID_DISPLAY but that did not work out. I also tried to look for methods using CL_SALV_TABLE class and have not been able to find a solution yet.
    Edited by: Megan Flores on Feb 25, 2008 8:28 PM

    it's a package in the systems above 6.4 with new ALV. There are nice examples. Main package is SALV.
    /wg

  • HOW TO ADD NEW VARIABLE DATAS ON ALV REPORT

    Hi gurus,
               I have cretaed one alv report using
    REUSE_ALV_GRID_DISPLAY.
    I HAVE CALCULATED SOME TOTALS AND STORED ON
    ONE VARIABLE .
    that variable name is 'toterror'.
    now i want to add  this variable on first line OF ALV REPORT.
    that is i should get LIKE THIS.
    PERNR   TEXT     ACTION  [ TITLES OF FIELDS ].THEN
    TOTAL ERROR RECORDS  '900'.
    THEN THE CORRESPONDING FIELDS DATA SHOULD BE DISPLAYED.
    HELP ME.
    THANKS IN ADVANCE.

    Hi
    Thanks Ajeet.
    The scenario is that I have to create a formula (contract end date-current date) and have to display the result using exeption to highlight the contracts ending in 30-60 days.
    The problem is that the info provider does not have any infoobject for date(only valid to and validity start date)
    I have created a formula variable on valid to date using replacement path. But dont have any variable to use for current date.
    The only time char in the cube is Fiscal yera variant.
    How should I go futher creating such formula? Shall I user customer exit variable? But I dont have any date char to create on.
    Can you shed some light on this problem
    Thanks

  • Static text in ALV Report

    Hi,
    I have a requirement to create an ALV report which has to display some static text on each page. In the format below, the line item texts and sub total texts will be the same for each page. Each page displays data for one company code. The company code should be displayed on the top of page.
    Line Items    Sub totals          Amounts
    Line item 1                              Amt1
    Line item 2                              Amt2
    Line item 3                              Amt3
                            Sub total          1-3
    Line item 4                              Amt4
    Line item 5                              Amt5
                            Sub total        1-5           
                                                 Total
    1. How to display the same item texts on each page? Can I use text symbols to avoid hard coding?
    2. How do I get sub totals?
    3. Display company code on top of page according to the viewed page?
    any sample code greatly appreciated.
    Thanks,
    MJ

    Hi,
    I have a requirement to create an ALV report which has to display some static text on each page. In the format below, the line item texts and sub total texts will be the same for each page. Each page displays data for one company code. The company code should be displayed on the top of page.
    Line Items                       Amounts
    Line item 1                        Amt1
    Line item 2                        Amt2
    Line item 3                        Amt3
    Sub total                             1-3
    Line item 4                         Amt4
    Line item 5                         Amt5
    Sub total                            1-5           
       Total                               1-5
    1. How to display the same item texts on each page? Can I use text symbols to avoid hard coding?
    2. How do I get sub totals?
    3. Display company code on top of page according to the viewed page?
    any sample code greatly appreciated.
    Thanks,
    MJ

  • Add $ and % to fields in ALV report

    Hi,
    How to add $ and % sybmbols to field values in ALV report. I cannot use a Char as I need to do totals and subtotals for those fields.
    Best Regards
    Suresh

    Hi,
    You cannot use % or $ or any special characters if you want to use the standard SAP totaling ans subtotaling.. you need to create another field adjacent to that field and show the currency or %.
    Otherwise you need to do the totaling logic yourself and then you can use $ or %
    Cheers:)
    Kothand

  • Row position in alv report

    Hi experts....
    I want to put data in first row in alv report. I am using reuse_alv_list_display for alv report output.
    I used "FIELDCAT_LN-ROW_POS = '1'. '
    but it doesn't make any effect in output.
    please help me.
    thank you.

    Hi..
    Code is like this...
    *& Report  Z_MATERIAL_ANALYSIS
    Report  Z_MATERIAL_ANALYSIS.
    TYPE-POOLS: SLIS , VRM.
    DATA: G_REPID LIKE SY-REPID,
    GS_PRINT            TYPE SLIS_PRINT_ALV,
    GT_LIST_TOP_OF_PAGE TYPE SLIS_T_LISTHEADER,
    GT_EVENTS           TYPE SLIS_T_EVENT,
    i_sort TYPE slis_t_sortinfo_alv,
    gs_layout           TYPE SLIS_LAYOUT_ALV,
    GT_FIELDCAT         TYPE SLIS_T_FIELDCAT_ALV,
    FIELDCAT_LN LIKE LINE OF GT_FIELDCAT,
    COL_POS TYPE I.
    DATA: gs_variant LIKE disvariant,
          g_save.
    TABLES : MSEG , MKPF.
    DATA : BEGIN OF ITAB1 OCCURS 0,
           601_602 LIKE MSEG-MENGE,
           END OF ITAB1.
    DATA : BEGIN OF ITAB OCCURS 0,
            LGORT LIKE MSEG-LGORT,
            BWART LIKE MSEG-BWART,
            ZEILE LIKE MSEG-ZEILE,
            MENGE LIKE MSEG-MENGE,
            MEINS LIKE MSEG-MEINS,
            MATNR LIKE MSEG-MATNR,
            WERKS LIKE MSEG-WERKS,
            SHKZG LIKE MSEG-SHKZG,
            MBLNR LIKE MKPF-MBLNR,
            BUDAT LIKE MKPF-BUDAT,
            SIGN(2),
            101_102 LIKE MSEG-MENGE,
            301 LIKE MSEG-MENGE,
            311 LIKE MSEG-MENGE,
            321 LIKE MSEG-MENGE,
            601_602 LIKE MSEG-MENGE,
            641_642 LIKE MSEG-MENGE,
            653 LIKE MSEG-MENGE,
            671 LIKE MSEG-MENGE,
            END OF ITAB.
    DATA: TOTAL_PLUS,
          TOTAL_MINUS,
          TOTAL.
    SELECT-OPTIONS : MATNR FOR MSEG-MATNR,
                     DAT  FOR MKPF-BUDAT.
    PARAMETERS :     LGORT LIKE MSEG-LGORT,
                     WERKS LIKE MSEG-WERKS,
                     BWART LIKE MSEG-BWART.
    SELECT MSEG~MATNR
           MSEG~LGORT
           MSEG~BWART
           MSEG~ZEILE
          MSEG~MENGE
           MSEG~MEINS
           MSEG~WERKS
           MSEG~SHKZG
           MKPF~MBLNR
           MKPF~BUDAT
           INTO CORRESPONDING FIELDS OF TABLE ITAB
           FROM MSEG
           INNER JOIN MKPF ON MSEGMBLNR = MKPFMBLNR
           WHERE MSEG~MATNR IN MATNR
           AND MSEG~LGORT EQ LGORT
           AND MKPF~BUDAT IN DAT
           AND MSEG~WERKS EQ WERKS.
    *LOOP AT ITAB.
    *IF ITAB-BWART EQ
    *WRITE : / 'MATNR', 10 'LGORT',20 'BWART', 30 'ZEILE',40 'MENGE',50
    *'101102', 60
    *'MEINS', 70 'MBLNR', 80 'BUDAT'.
    LOOP AT ITAB.
    IF ITAB-BWART = '101' OR ITAB-BWART = '102'.
      SELECT MENGE INTO (ITAB-101_102) FROM MSEG  WHERE MATNR = ITAB-MATNR
      AND MBLNR = ITAB-MBLNR
      AND LGORT = ITAB-LGORT
      AND WERKS = ITAB-WERKS
      AND ZEILE = ITAB-ZEILE.
      MODIFY ITAB.
      ENDSELECT.
    ENDIF.
    IF ITAB-BWART = '601' OR ITAB-BWART = '602'.
      SELECT MENGE INTO (ITAB-601_602) FROM MSEG WHERE MATNR = ITAB-MATNR
      AND MBLNR = ITAB-MBLNR
      AND LGORT = ITAB-LGORT
      AND WERKS = ITAB-WERKS
      AND ZEILE = ITAB-ZEILE.
    AND BWART IN ('601','602').
      MODIFY ITAB.
      ENDSELECT.
    ENDIF.
    IF ITAB-BWART = '641' OR ITAB-BWART = '642'.
        SELECT MENGE INTO CORRESPONDING FIELDS OF TABLE ITAB1 FROM MSEG
    WHERE MATNR = ITAB-MATNR
        AND MBLNR = ITAB-MBLNR
      AND LGORT = ITAB-LGORT
      AND WERKS = ITAB-WERKS
      AND ZEILE = ITAB-ZEILE.
      MODIFY ITAB.
    ENDSELECT.
    ENDIF.
    ENDLOOP.
    LOOP AT ITAB.
    IF ITAB-SHKZG = 'H'.
      ITAB-SIGN = '+'.
        MODIFY ITAB.
    ELSE.
      ITAB-SIGN = '-'.
    MODIFY ITAB.
    ENDIF.
    ENDLOOP.
    *LOOP AT ITAB.
    *WRITE : /
    ITAB-MATNR,
             ITAB-LGORT,
             ITAB-BWART,
             ITAB-ZEILE,
             ITAB-MENGE,
             ITAB-TOT ,
             ITAB-101_102,
             ITAB-SIGN,
             ITAB-601_602.
             ITAB-SIGN.
             ITAB-MEINS,
             ITAB-MBLNR,
             ITAB-BUDAT,
             ITAB-SHKZG.
    *AT LAST.
    *SUM.
    *WRITE : / ITAB-101_102.
    *ENDAT.
    *ENDLOOP.
    PERFORM BUILD.
    PERFORM CALL_ALV.
    FORM BUILD.
    DATA: FIELDCAT_IN TYPE SLIS_FIELDCAT_ALV.
    REFRESH GT_FIELDCAT.
    *CLEAR GT_FIELDCAT.
    CLEAR FIELDCAT_LN.
    FIELDCAT_LN-FIELDNAME = '101_102'.
    FIELDCAT_LN-TABNAME   = 'ITAB'.
    FIELDCAT_LN-ROW_POS = '1'.
    FIELDCAT_LN-COL_POS = '1'.
    APPEND FIELDCAT_LN TO GT_FIELDCAT.
    CLEAR FIELDCAT_LN.
    FIELDCAT_LN-FIELDNAME = '301 '.
    FIELDCAT_LN-TABNAME   = 'ITAB'.
    FIELDCAT_LN-NO_OUT    = 'X'.
    FIELDCAT_LN-SELTEXT_L = 'Description'.
    FIELDCAT_LN-OUTPUTLEN = 22.
    FIELDCAT_LN-DO_SUM        = 'X'.   "SUM UPON DISPLAY
    APPEND FIELDCAT_LN TO GT_FIELDCAT.
    CLEAR FIELDCAT_LN.
    FIELDCAT_LN-FIELDNAME = '601_602'.
    FIELDCAT_LN-TABNAME   = 'ITAB1'.
    FIELDCAT_LN-ROW_POS = '1'.
    FIELDCAT_LN-COL_POS = '1'.
    *FIELDCAT_LN-NO_OUT    = 'X'.
    FIELDCAT_LN-SELTEXT_L = 'Base qty'.
    FIELDCAT_LN-NO_ZERO = 'X'.
    FIELDCAT_LN-just = 'C'.
    *FIELDCAT_LN-DO_SUM        = 'X'.   "SUM UPON DISPLAY
    APPEND FIELDCAT_LN TO GT_FIELDCAT.
    g_repid = sy-repid.
        gs_variant-report = g_repid.
        g_save           = 'A'.
    ENDFORM.
    FORM EVENTTAB_BUILD CHANGING LT_EVENTS TYPE SLIS_T_EVENT.
    CONSTANTS:
    GC_FORMNAME_TOP_OF_PAGE TYPE SLIS_FORMNAME VALUE 'TOP_OF_PAGE'.
    *GC_FORMNAME_END_OF_PAGE TYPE SLIS_FORMNAME VALUE 'END_OF_PAGE'.
      DATA: LS_EVENT TYPE SLIS_ALV_EVENT.
      CALL FUNCTION 'REUSE_ALV_EVENTS_GET'
           EXPORTING
                I_LIST_TYPE = 0
           IMPORTING
                ET_EVENTS   = LT_EVENTS.
      READ TABLE LT_EVENTS WITH KEY NAME =  SLIS_EV_TOP_OF_PAGE
                               INTO LS_EVENT.
      IF SY-SUBRC = 0.
        MOVE GC_FORMNAME_TOP_OF_PAGE TO LS_EVENT-FORM.
        APPEND LS_EVENT TO LT_EVENTS.
      ENDIF.
    ENDFORM.
    FORM CALL_ALV.
      CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
      EXPORTING
      I_CALLBACK_PROGRAM = G_REPID
    I_STRUCTURE_NAME = 'ITAB'
      IS_LAYOUT =  gs_layout
      i_save                            = g_save
      is_variant                        = gs_variant
      IT_FIELDCAT = GT_FIELDCAT[]
       IT_SORT = I_SORT
        IT_EVENTS = GT_EVENTS[]
        IS_PRINT = GS_PRINT
      TABLES
      T_OUTTAB = ITAB
      EXCEPTIONS
      PROGRAM_ERROR = 1
      OTHERS = 2.
    ENDFORM.

  • Problem in display of text in ALV report

    Dear experts,
    I am working on a MM Report in which I need to display Material Basic data text maintained in MM01,02 Tcodes through ALV report.
    I have declared a string type variable for the Basic data text in the Final Internal Table.
    For reading the Standard text I am using Read_Text FM, from which I am looping the Text internal table and concatenating it into
    String variable.
    What I notice is all the content beyond 255 chars is not getting displayed, Even when the ALV report is downloaded to Excel file.
    Can you suggest some approach to over come this issue.
    Regards,
    Murthy

    Hi,
    Use the below code
    Data : lt_content  TYPE TABLE OF tline,
              lw_content   TYPE tline.
    Data : lt_text Type Table of solisti1,
              lw_text TYPE solisti1.
    CALL FUNCTION 'READ_TEXT'
        EXPORTING
          client                  = sy-mandt
          id                        = lv_id
          language            = tdspras
          name                  = lv_name
          object                 = lv_object
          archive_handle  = 0
          local_cat            = ' '
        TABLES
          lines                   = lt_content
        EXCEPTIONS
          id                      = 1
          language          = 2
          name                = 3
          not_found        = 4
          object               = 5
          reference_check = 6
          wrong_access_to_archive = 7
          OTHERS                  = 8.
    loop at lt_content into lw_content.
      lw_text-line = lw_content-tdline.
      APPEND lw_text TO lt_text.
      CLEAR: lw_content, lw_text.
    endloop.
    Now your whole text is in "lt_text".
    Regards,
    Avish Mittal

  • Standard Purchase Order Long Text In ALV Report

    Hi Gurus,
    I am able to get the charecter space for long text in the ALV report but i could not able to get the text in that space out put.
    I have used ekko and ekpo tables.
    Please provide me the code are solution to display the Text in that particular space.
    Thanks,
    SR

    Hi all,
    I am able to see the PO text, But when i moved it to production system  i find
    1) it is taking too much time to execute. 2) I find the first  PO text in the purchase document is getting repeated for all other purchase documents in the run where their is no Po text .
    Please help me how to restrict the repeated Text.
    And also to improve the performance
    regards,
    dileep

  • Displaying Header Text in ALV report.

    HI Gurus,
    I have one sales order which has header Text.
    I am displaying that Header Text in my ALV report.
    But while displaying in the ALV grid, the text is not coming full.
    I have taken the datatype of the column of the ALV grid is string, Still the Header text is not come full.
    Please help me.
    Thanks in advance.

    Hi,
        If the header text is morethan 60 characters, you can't print with REUSE_ALV_COMMENTARY_WRITE. To overcome above limit we can use dynamic document, which can be implemented through the class CL_DD_DOCUMENT. As dynamic documents use HTML viewer control so instead of triggering the TOP_OF_PAGE event we should trigger event of HTML TOP_OF_PAGE.
    First create a subroutine for top of page in HTML format and send that name in I_CALLBACK_HTML_TOP_OF_PAGE parameter of ALV function module. The input parameter for this subroutine will be a variable of class CL_DD_DOCUMENT.
    *       FORM html_top_of_page                                     *
    FORM html_top_of_page USING top TYPE REF TO cl_dd_document.
      data: l_text(255) type c.
    l_text = '*******************************Hellooooooooooooooooooo************************'.
      CALL METHOD top->add_text EXPORTING text = 'Hello world '
                                          sap_style = 'heading' .
      CALL METHOD top->add_gap EXPORTING width = 200.
      CALL METHOD top->add_picture EXPORTING picture_id = 'ENJOYSAP_LOGO'.
      CALL METHOD top->NEW_LINE( ).
      CALL METHOD top->add_text EXPORTING
      text = l_text.
    ENDFORM.
    * Display ALV grid
    CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
         EXPORTING
              i_callback_html_top_of_page = 'HTML_TOP_OF_PAGE'     " Use this event
              i_callback_program          = g_repid
              i_structure_name            = 'STRUCTURE'
         TABLES
              t_outtab                    = gt_outtab.
    Regards
    Bala Krishna

  • How to preselect all rows before displaying ALV report

    I would like to select all rows before sending ALV Grid Display. User then can unselect couple of rows for further processing. How do I do that ?. Im using Method grid1->SET_TABLE_FOR_FIRST_DISPLAY for ALV Report Display. Any help appreciated.

    Ok,
    I've started the editor and check my code. I made few small mistakes (like with this exporting/importing), here's the sample - correctly working - code:
    DATA: it_selected TYPE lvc_t_row,
          wa_selected TYPE lvc_s_row,
          wa_sflight TYPE sflight,
          ltp_layout TYPE lvc_s_layo.
         SELECT *
           FROM sflight
           INTO TABLE gi_sflight.
    ltp_layout-stylefname = 'CELLTAB'.
    ltp_layout-sel_mode = 'A'.
    LOOP AT gi_sflight INTO wa_sflight.
          wa_selected-index = sy-tabix.
          APPEND wa_selected TO it_selected.
    ENDLOOP.
    *   * Load data into the grid and display them
         CALL METHOD go_grid->set_table_for_first_display
           EXPORTING i_structure_name = 'SFLIGHT'
                     is_layout            = ltp_layout
                     i_save = 'A'
           CHANGING  it_outtab        = gi_sflight.
    CALL METHOD go_grid->set_selected_rows
          EXPORTING
            it_index_rows = it_selected.
    This time it is 100% correct.
    Edited by: Marcin Cudo on Apr 11, 2010 2:13 AM

  • Freezing of totaling row in an ALV report

    Hello friends,
                        I am doing the total of a particular field in an ALV report.The shows a lot of data so we have to scroll down to see the full report. I would like to show the total on first display of the report without scrolling down.It means that I would like to freeze the row showing the total.Is this possible.
    Please advice me on this issue.
      Regards
      Ashish

    One way is to implement the END-OF-PAGE event and do the total manually of all items and show the total value in the END-OF-PAGE.
    Regards,
    Naimesh Patel

Maybe you are looking for

  • Log in details number not working with CC updater?

    Just over the last week or so I seem unable to loggin and update apps. I updated everything to CC 2014 a few weeks back but now cannot seem to get the updater to accept my details. They are the same details that I used to successfully log in here tod

  • Chase GW letter? tips or suggestions?

    Hey everyone. I just love this forum -- so happy with the help I've gotten here. I've got several irons in the credit repair fire and one of them is a series of late payments on two closed Chase CC accounts. I was in a repayment plan, had set up auto

  • HP 650 NOTEBOOK PC SOME KEYBOARD KEYS NOT WORKING

    HELLO, I HAVE A PROBLEM WITH MY KEYBOARD KEYS. SOME OF THEM DONT WORK, SO  I THOUGHT IT WAS THE KEYBOARDs PROBLEM SO I JUST BOUGHT A NEW KEYBOARD  PART. I TOOK OF THE OLD AND INSTALLED THE NEW ONE...STILL THE SAME KEYBOARD KEYS  WONT WORK. PLEASE HEL

  • Netflow Config Question

    Hello, I'm setting up Netflow and wanted to make sure I wasn't missing anything or If it could be setup in a better manner? Router is 2801  Switch is C3560 IP flow export is version 9. On the router I have one fastethernet port going to the high spee

  • Missing Wikis?

    Before the 10.6.4 update, I had several users who could not view their wikis under "wikis" or updates but can access them with a direct url. The update has been done but the problem remains. I did stop and restart teams as well as web. If i remove an