In ALV report  list edit a field and insert our own text

Hi
In a report when I am in third list using ALV a field which is disabled should be enabled and have to insert the new value in it and save.
please tell me how to do it using classes and methods and also using ALV's.
Promise to reward points.
Regards
Mac

See these threads
Re: Making selected alv rows editable
Re: selective edit in ALV grid
Regards,
Ravi

Similar Messages

  • ALV print problems for reports with two sort fields and subtotal at each

    When a report has two sort fields and subtotal at each of them, the print function is not working correctly. Please see the report below.
    The second "" (single star) record (the 10 RL record) and the '*' (double star) record (the 12 RL record)  are not printing.
    This is happening for any standard SAP reports. Any resolution? Any OSS Notes?
         Material/Stock Code          Grade       Units Count     Unit Type     Set Position     LFT
         520085V000          7818     1     RL     A     19,682 LF
         520085V000          7818     1     RL     A     19,682 LF
    *     520085V000               2     RL          
         599098V000               1     RL          
         599098V000               1     RL          
         599098V000               1     RL          
         599098V000               1     RL          
         599098V000               1     RL          
         599098V000               1     RL          
         599098V000               1     RL          
         599098V000               1     RL          
         599098V000               1     RL          
         599098V000          7717     1     RL     A     36,167 LF
    *     599098V000               10     RL          
    **                    12     RL          
    ***                    12               
    Thanks
    Anand
    Edited by: Anand Velayudhan on Feb 9, 2009 11:50 PM

    Hi,
    Check these OSS Notes..
    Note 975777 - ALV total: Subtotals disappear from printout
    Note 1039655 - ALV total: Subtotals disappear from printout II
    Thanks
    Naren

  • Hi gurus in ALV how to edit the fields on out put list

    hi gurus in ALV how to edit the fields on out put list

    hi
    REPORT ZSB_ALV_EDITABLE_SAMPLE.
    TABLES: SFLIGHT.
    DATA: gc_container TYPE scrfname VALUE 'LIST_AREA',
    gc_custom_container TYPE REF TO CL_GUI_CUSTOM_CONTAINER,
    gc_grid TYPE REF TO CL_GUI_ALV_GRID,
    gs_layout TYPE LVC_S_LAYO,
    gt_fieldcat TYPE LVC_T_FCAT.
    DATA: ok_code TYPE SY-UCOMM.
    DATA: gt_outtab TYPE TABLE OF SFLIGHT.
    *DYNPRO
    CALL SCREEN 100.
    *& Module STATUS_0100 OUTPUT
    MODULE STATUS_0100 OUTPUT.
    SET PF-STATUS '100'.
    CREATE OBJECT gc_custom_container
    EXPORTING
    container_name = gc_container
    EXCEPTIONS
    cntl_error = 1
    cntl_system_error = 2
    create_error = 3
    lifetime_error = 4
    lifetime_dynpro_dynpro_link = 5
    OTHERS = 6.
    CREATE OBJECT gc_grid
    EXPORTING
    i_parent = gc_custom_container
    EXCEPTIONS
    error_cntl_create = 1
    error_cntl_init = 2
    error_cntl_link = 3
    error_dp_create = 4
    OTHERS = 5 .
    PERFORM prepare_field_catalog CHANGING gt_fieldcat .
    PERFORM prepare_layout CHANGING gs_layout .
    PERFORM get_alv_display.
    ENDMODULE.
    *& Module USER_COMMAND_0100 INPUT
    MODULE USER_COMMAND_0100 INPUT.
    OK_CODE = SY-UCOMM.
    IF OK_CODE = 'BACK'.
    SET SCREEN 0.
    LEAVE SCREEN.
    CLEAR OK_CODE.
    ENDIF.
    ENDMODULE.
    FORM prepare_field_catalog CHANGING gt_fieldcat TYPE LVC_T_FCAT.
    CALL FUNCTION 'LVC_FIELDCATALOG_MERGE'
    EXPORTING
    I_BUFFER_ACTIVE =
    I_STRUCTURE_NAME = 'SFLIGHT'
    I_CLIENT_NEVER_DISPLAY = 'X'
    I_BYPASSING_BUFFER =
    I_INTERNAL_TABNAME =
    CHANGING
    ct_fieldcat = gt_fieldcat[].
    ENDFORM.
    FORM prepare_layout changing p_gs_layout TYPE lvc_s_layo.
    p_gs_layout-zebra = 'X'.
    p_gs_layout-edit = 'X'.
    ENDFORM. " prepare_layout
    FORM get_alv_display .
    SELECT * FROM sflight INTO TABLE gt_outtab UP TO 10 ROWS.
    CALL METHOD gc_grid->set_table_for_first_display
    EXPORTING
    I_STRUCTURE_NAME = 'SFLIGHT'
    IS_LAYOUT = gs_layout
    CHANGING
    it_outtab = gt_outtab
    IT_FIELDCATALOG = gt_fieldcat
    ENDFORM. " get_alv_display

  • Can we control Font and Font size in Non-alv report list ?

    Hi Experts,
    Can we control Font and Font size in Non-alv report list ?
    Regards
    vishnu

    Hi,
    see if this is useful to you,
    PRINT-CONTROL SIZE 2 COLOR BLACK FONT 5.
    you can go through this link,
    http://help.sap.com/saphelp_47x200/helpdata/en/9f/dba62335c111d1829f0000e829fbfe/frameset.htm
    Regards,
    Abhijit G. Borkar

  • ALV report with internal in field symbol

    Hi Shifu ABAP,
    I have ALV report.
    My problem is when I tried to do sum using the sum icon. I got a message 'desired operation cannot be performed for column 'Dignostic delay'. Is it because I used field symbol, then when I clicked on the column it didn't recorgnise the field.
    FYI.
    1)The internal table for my ALV report is stored in field symbol.
    2)I dont have a problem to display the report.
    3)I had to set 'do_sum' at ALV field category, still doesn't work
    My source code to define ALV category.
    loop at i_qpcd into wa_qpcd.
    CLEAR ls_fieldcat2.
    ls_fieldcat2-col_pos = pos2.
    ls_fieldcat2-fieldname = wa_qpcd-code.
    ls_fieldcat2-reptext_ddic = wa_qpcd-desc.
    ls_fieldcat2-just = 'C'.
    ls_fieldcat2-do_sum = 'X'.
    APPEND ls_fieldcat2 TO gt_fieldcat2.
    endloop.
    My source code call the ALV FM
    CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
    EXPORTING
         i_callback_program         = 'ZMPMR001_Q1OOT'
         i_callback_pf_status_set = 'PF_STATUS_SET'
         is_layout                        = ls_layout
         it_fieldcat                       = gt_fieldcat2[]
         is_print                          = ls_print
    TABLES
         t_outtab                         = <l_table>
    EXCEPTIONS
         program_error                 = 1
    OTHERS = 2.
    IF sy-subrc <> 0.
    MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
    WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
    ENDIF.
    Thanks a lot in advance for your attention.

    my situation is like this, declare the internal tble
    1) data : begin of itab occurs 0,          
                code like qpcd-code,
                desc like QPCT-KURZTEXT,
              end of itab.
    2) populate the itab like this
    code           desc
    01              desc 1
    02              desc 2
    03              desc 3
    3) take the selected record converted it into new dynamic internal table using field symbol declare as table, now the component of this new table are 01, 02 and 03.
    4) populate the new table with some data, so technically my new table structure will be like this
    01         02         03
    1           0          1
    0           0          3
    2           2          2
    5) display the new table in ALV report, in ALV I tried to sum-up each of column.
    6) Question : HOW can I convert the componet 01, 02 and 03 as an integer/numeric field.
    Regards
    Nislina

  • How many lines we can print using Non-alv report list ?

    Hi Experts,
    How many lines we can print using Non-alv report list ?
    regards
    vishnu

    Hi,
    It depends on the page size according to the page size we can set the no. of lines as follows,
    REPORT  program_name   NO STANDARD PAGE HEADING
    LINE-SIZE 290
    LINE-COUNT 65.
    Hope it helps you,
    Regards,
    Abhijit G. Borkar

  • Any Orjinal SAP Reports which has currency field and currency key

    Hi Friends,
    I am looking for a report which has currency field and currency key at selection screen. I want to learn how SAP do selection with currency. Can you say a transaction deal with my desire?
    Thanks.

    try report RFSSLD00
    A.

  • How to copy standard SAP list edit tcode IW28 , IW29 to our Z transtions...

    Hi friends,
    Can any one help me on this plz.
    Need two reports for Notifications List Edit, one for change mode and one for display mode.
    These reports need to be copied from the standard SAP list edit transactions IW28 and IW29.
    I. The selection and display variants for the customized notification list edit (ZIW28 & ZIW29) need to include the following custom fields:
    a) SONGS custom Notification attributes include:
    •     Significance level
    •     MRule code
    •     ARC
    •     “Feedback Required? “ checkbox
    b) PPD custom Notification attributes include:
    •     Outage Issue checkbox
    •     “Feedback Required? “ checkbox
    c) Order attributes to be included:
    •     Order Type
    •     Order system statuses
    •     Order users statuses
    •     Order Maint activity type
    •     Order Revision code
    d) Non-Energy Notification custom field attributes include:
    •     Circuit ID
    •     Caller Name
    •     Caller SAP Personnel No
    •     Caller Pax
    •     Caller Alt Phone
    •     Caller email
    •     Caller Company
    •     Caller Bus Unit
    •     Caller Dept
    •     Contact Name
    •     Contact SAP PERNR
    •     Contact PAX
    •     Contact Alt Phone
    •     Contact email
    •     Peregrine #
    •     Created by
    •     Closed by
    e) EAM Notification custom field attributes include:
    •     Location
    •     Elevation
    •     Room
    •     Column
    II. These fields need to be available on both selection and display variant screens. They will be grouped together on the Selection screen (as given in the layout). Also, these fields need to be variant configurable (include/exclude) on the Display screen. Report should make use of the ABAP List Viewer (ALV) functionality to permit standard SAP display results sorting, filtering, etc.
    III. The above requirement specifies that the identified custom fields need to be added to the Custom List Edit Display Variant. In addition, the Order Header Short Text (CAUFVD-KTEXT) and Order Delay Code (WA_COCI_AUFK-ZZDCODES) should only be added to the Custom List Edit Display Variant.
    IV. Delete the standard SAP section for "Selection Using IS-U Objects" and Display Variant fields from the custom list edit report.
    Thanks and regards,
    Ankitha.

    Hi,
    Copy RIQMEL20 program to your Z Program, and insert your custom fields.
    But i think it will be very difficult since it has many enhancement point and it's not recommended. And it also will give you much trouble in upgrading time.
    May be you can find screen exit for this program and add your custom fields, or just create your new z program.
    Regards,

  • Our Windows PC crashed with all our music on it.  There are copies of both purchased (thru iTunes store) and from our own CDs on another HD in a backup file.  They are not linked to a Media file.  Is there any way I can put this music on my new computer?

    Our Windows PC crashed with all our music on it.  There are copies of both purchased (thru iTunes store) and from our own CDs on an external HD in a backup file.  They are not linked to a Media file.  Is there any way I can put this music on my new computer?

    The syncing of music is one way, computer to phone. See this helpful document from a fellow user. Credit goes to the author.
    https://discussions.apple.com/docs/DOC-3141

  • Hello ! how to change document sizes and use our own size (not A3, A2 ...) thank you !

    hello ! how to change document sizes and use our own size (not A3, A2 ...) thank you !

    Experiment. No harm in trying.
    If you are just starting to use Pages you need to make your own assessment given current events whether committing your work to a format and software given this support is a wise move.
    You also need to look at what will produce workable results. Particularly if your large posters are to be commercially printed and contain large bitmap (photographic) images.
    Always work backwards from your output. Ask your printer what they require to do their job.
    Peter

  • Create a Procedural ALV Report with editable fields and save the changes

    Hi,
    I am new to ABAP. I have created a Procedural ALV Report with 3 fields. I want to make 2 fields editable. When executed, if the fields are modified, I want to save the changes. All this I want to do without using OO concepts. Please help . Also, I checked out the forum and also the examples
    BCALV_TEST_GRID_EDIT_01
    BCALV_TEST_GRID_EDIT_02
    BCALV_TEST_GRID_EDIT_04_FORMS
    BCALV_TEST_GRID_EDITABLE
    BCALV_EDIT_01
    BCALV_EDIT_02
    BCALV_EDIT_03
    BCALV_EDIT_04
    BCALV_EDIT_05
    BCALV_EDIT_06
    BCALV_EDIT_07
    BCALV_EDIT_08
    BCALV_FULLSCREEN_GRID_EDIT
    But all these are using OO Concepts.
    Please help.
    Regards,
    Smruthi

    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,
      line_color(4) TYPE c,     "Used to store row color attributes
    END OF t_ekko.
    DATA: it_ekko TYPE STANDARD TABLE OF t_ekko INITIAL SIZE 0,
          wa_ekko TYPE t_ekko.
    *ALV data declarations
    DATA: fieldcatalog TYPE slis_t_fieldcat_alv WITH HEADER LINE,
          gd_tab_group TYPE slis_t_sp_group_alv,
          gd_layout    TYPE slis_layout_alv,
          gd_repid     LIKE sy-repid.
    START-OF-SELECTION.
      PERFORM data_retrieval.
      PERFORM build_fieldcatalog.
      PERFORM build_layout.
      PERFORM display_alv_report.
    *&      Form  BUILD_FIELDCATALOG
          Build Fieldcatalog for ALV Report
    FORM build_fieldcatalog.
      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-edit             = 'X'
      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-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-info_fieldname =      'LINE_COLOR'.
    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_pf_status_set = 'STATUS'
                i_callback_top_of_page   = 'TOP-OF-PAGE'
               i_callback_user_command = 'USER_COMMAND'
               i_grid_title           = outtext
                is_layout               = gd_layout
                it_fieldcat             = fieldcatalog[]
               it_special_groups       = gd_tabgroup
               IT_EVENTS                = GT_XEVENTS
                i_save                  = 'X'
               is_variant              = z_template
           TABLES
                t_outtab                = it_ekko
           EXCEPTIONS
                program_error           = 1
                OTHERS                  = 2.
    ENDFORM.                    " DISPLAY_ALV_REPORT
    *&      Form  DATA_RETRIEVAL
          Retrieve data form EKPO table and populate itab it_ekko
    FORM data_retrieval.
      DATA: ld_color(1) TYPE c.
      SELECT ebeln ebelp statu aedat matnr menge meins netpr peinh
       UP TO 10 ROWS
        FROM ekpo
        INTO TABLE it_ekko.
      LOOP AT it_ekko INTO wa_ekko.
        ld_color = ld_color + 1.
        IF ld_color = 8.
          ld_color = 1.
        ENDIF.
        CONCATENATE 'C' ld_color '10' INTO wa_ekko-line_color.
        MODIFY it_ekko FROM wa_ekko.
      ENDLOOP.
    ENDFORM.                    " DATA_RETRIEVAL
          FORM top-of-page                                              *
    FORM top-of-page.
      WRITE:/ 'This is First Line of the Page'.
    ENDFORM.
          FORM status                                                   *
    FORM status USING rt_extab TYPE slis_t_extab.  .
      SET PF-STATUS 'ALV'.
    ENDFORM.
          FORM USER_COMMAND                                          *
    -->  RF_UCOMM                                                      *
    -->  RS                                                            *
    FORM user_command USING rf_ucomm LIKE sy-ucomm
                             rs TYPE slis_selfield.            
      DATA ref1 TYPE REF TO cl_gui_alv_grid.
      CALL FUNCTION 'GET_GLOBALS_FROM_SLVC_FULLSCR'
        IMPORTING
          e_grid = ref1.
      CALL METHOD ref1->check_changed_data.
      CASE rf_ucomm.
    when 'SAVE'.
    get all the modified entries and store them in an internal table and udpate them in to the required transaction or your custom table.
    endcase.
    endform.
    ENDFORM.
    here u need to 2 performs for PF status and USER_COMMAND in the ALV parameters.
    create a custom PF status and create push buttons and assign your ok codes in your PF status.
    if the field has to be edited in the ALV then pass EDIT = 'X' for that field in the fieldcatlog preparation.
    Hope this will help you.
    Regards,
    phani.

  • OOPs ALV report Fieldcatalog Editing a currency field

    Hi all,
    I have created an OOP's ALV report. I have made one of the currency field editable. when I am changing the value in any cell and go out of the cell(or move to other cell using arrow keys or click some were in the grid) it is taking '.' after 2 digits from the right.
    for example if I take 10 it is converting to 0.10, if I take 100 it is becomnig 1.00, if I take 100.00 it is becoming 1.00. If I take 123.45 I am getting a pop up box with message "Too many decimal places"
    the fieldcatalog values are as follows
      WA_FIELDCAT-FIELDNAME   = 'ORD_VAL'.
      WA_FIELDCAT-SCRTEXT_M   = 'Ord Value'.
      WA_FIELDCAT-COL_POS     = 11.
    wa_fieldcat-no_zero     = 'X'.
      WA_FIELDCAT-OUTPUTLEN = 14.
       WA_FIELDCAT-CURRENCY  = 'INR'.
      wa_fieldcat-decimals_o = '2'.
      wa_fieldcat-no_zero = 'X'.
      WA_FIELDCAT-EDIT   = 'X'.
      APPEND WA_FIELDCAT TO IT_FIELDCAT.
      CLEAR  WA_FIELDCAT.
    Can anybody please help me. As If I edit the field it should take the values what I input.
    Thanks in Advance.

    Hi ,
    The CURR field is the currency unit field in the table ITAB.
    I am just confused with your answer. in my case the final internal table is T_CHKQTY1 shall I take that or anything else. I have taken WA_FIELDCAT-CTABNAME = 'CURR'. but the system is thrownig an error as The data object has no component with CTABNAME but there is a component called TABNAME.
    Can you please currect me.

  • Validation of data in editable ALV report output for particular field

    Hi Experts,
    I have one input enabled field in ALV output. How to validate the data once user enters  in that field and press enter? Is it possible to capture the value, hit the enter after user enters the data?
    Thanks,
    Surya Prakash

    Halo Prakash,
    1 First you should registeer the ENTER Event.
    call method g_grid->register_edit_event
                   exporting
                      i_event_id = cl_gui_alv_grid=>mc_evt_enter.
    2 Declare event handler method for Event data_changed of cl_gui_alv_grid.
    handle_data_changed
             for event data_changed of cl_gui_alv_grid
                 importing er_data_changed.
    3 Inside the Event handler method , you get the event parameter er_data_changed type ref to CL_ALV_CHANGED_DATA_PROTOCOL.
    loop at er_data_changed->mt_good_cells into ls_good.
          case ls_good-fieldname.
            when 'FIELD1'.
              call method check_FIELD1.
            when 'FIELD2 '.
              call method check_FIELD2
          endcase.
        endloop.
    4 Inside the Method check_FIELD1 and check_FIELD2 you can do the validation check .
    call method er_data_changed->get_cell_value( Passing the row no and field name).
    if the check  fails you can use add_protocol_entry to write the error.
    5 Finally call
    er_data_changed->display_protocol.
    Regards
    Arshad

  • Subtotals in ALV report for ALPHA-NUMERIC field

    Hi Experts,
    I have problem while subtotalling values in ALV report.
    I have 8 fields in my fieldcatalog. Now, I have to do the subtotal based on 3rd field having name 'ABC'. This field is having type CHAR & having lenght 3.
    Now I wanted to do subtotalling for field 7 & 8 as 'NETWR' & 'MENGE' based on 3rd field.
    How we can do the subtotal?

    Hi,
    Refer this code
    *&      Form  sub_display_data
          text
    FORM sub_display_data .
    *--To sort the output through material number
      DATA : lwa_sort TYPE slis_sortinfo_alv.
      DATA : lit_sort TYPE slis_t_sortinfo_alv.
    *--Pass the values to the table
      lwa_sort-fieldname = 'PERNR'.             "Field name in o/p inttable
      lwa_sort-tabname   = 'it_final2'.         "Output Internal table
      lwa_sort-spos      = '1'.                 "Sort  sequence
      lwa_sort-up        = 'X'.                 "Sort in ascending order
      lwa_sort-down      = ' '.                 "Sort in descending order
      lwa_sort-subtot    = 'X'.                 "Subtotal
      APPEND lwa_sort TO lit_sort.
    *--Pass the values to the table
      lwa_sort-fieldname = 'WORKDATE'.          "Field name in o/p inttable
      lwa_sort-tabname   = 'it_final2'.         "Output Internal table
      lwa_sort-spos      = '2'.                 "Sort  sequence
      lwa_sort-up        = 'X'.                 "Sort in ascending order
      lwa_sort-down      = ' '.                 "Sort in descending order
      lwa_sort-subtot    = ' '.                 "Subtotal
      APPEND lwa_sort TO lit_sort.
    *--Pass the values to the table
      lwa_sort-fieldname = 'WEKLY'.             "Field name in o/p inttable
      lwa_sort-tabname   = 'it_final2'.         "Output Internal table
      lwa_sort-spos      = '3'.                 "Sort  sequence
      lwa_sort-up        = 'X'.                 "Sort in ascending order
      lwa_sort-down      = ' '.                 "Sort in descending order
      lwa_sort-subtot    = ' '.                 "Subtotal
      APPEND lwa_sort TO lit_sort.
      wa_layout-colwidth_optimize = 'X'.
      IF NOT it_final2[] IS INITIAL.
    *--Call the function module to display the ALV report
        CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
          EXPORTING
            is_layout          = wa_layout
            i_callback_program = v_repid
            it_fieldcat        = it_fieldcat1[]
            i_default          = c_chk
            i_save             = c_save
            it_sort            = lit_sort
          TABLES
            t_outtab           = it_final2
          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.
      ELSE.
    *--Message No data found
        MESSAGE i888 WITH text-017.
        LEAVE LIST-PROCESSING.
      ENDIF.
    ENDFORM.                    " sub_display_data
    Regards,
    Prashant

  • Write stat below alv report .if i use field  catalog.

    hi experts,
    i want to use write statment  after alv report.
    note: i am useing fieldcatalog.
    i got it if i use standard table with : end_of_list event event.
    thank you.

    Hi snk,
    1. It won't work in GRID display.
    2. The reason is when grid comes,
       it comes on a screen which has container and the grid control.
    3. Write statement is displayed on a special screen,
       which is generally used for list output.
       Normal screens (where we can put textboxes/checkboxes etc),
       do not support write statements.
    regards,
    amit m.

Maybe you are looking for