Modify Subtotals ALV

hi all,
I want to modify  subtotals in alv OO, somebody knows how can i do that?
regards.
Thanks.

Hi,
While modifying field catalog , try the following.
Field-symbols: <lfs_fieldcat> TYPE lvc_s_fcat.
LOOP AT i_fieldcat ASSIGNING <lfs_fieldcat>.
CASE <lfs_fieldcat>-fieldname.
WHEN 'LOSGR'.
<lfs_fieldcat>-coltext = text-007.
<lfs_fieldcat>-do_sum = c_x.
ENDCASE.
ENDLOOP.
Or if you want to use field symbols.
data: total type ref to data,
subtotal1 type ref to data.
field-symbols <total> like gt_sflight.
field-symbols <subtotal1> like gt_sflight.
call method grid1->get_subtotals
importing
ep_collect00 = total
ep_collect01 = subtotal1.
assign total->* to <total>.
assign subtotal1->* to <subtotal1>.
Hope this helps.
Thanks
Arun kayal

Similar Messages

  • How to modify Standard ALV Report

    Hello All,
    I have a standard report which displays the data in ALV Grid. This data can also be exported to Excel sheet. I have got an FBI assignment where I have to add some new fields besides the existing ones. Could you please provide me with some documents oe explain me in brief how to modify any standard ALV report.
    Thanks in Advance.
    Saras

    Can't you just add the fields with the layout option in the tcode ?? with other words are all the fields selected in that particular layout the programm comes up with
    if the fields can't be selected a quick sollution can be to make a query with SQ01
    Message was edited by:
            A. de Smidt

  • Reg.. Modifying an ALV

    Hi Experts,
        I have an ALV report, in which i need to modify a row i.e....
    i have displayed the report i need to modify the date and quantity fields.
    How do i capture the modified data (i.e...edit data like date, qty) into another internal table....
    can any one help me with the answers...
    Answers will be rewarded......
    Regards,
    Kumar

    http://www.sapdev.co.uk/reporting/alv/alvgrid_editable.htm
    Editable Alv & oops Concept
    Check demo pgm BCALV_EDIT_01 to 08.
    I think this will help you.

  • Modifying standard  ALV report

    Hi while modifying one of the standard alv reports,
    I had to include one more field..
    for that I have made changes to the feild cat and i_tab structure. but the final report is not displaying that additional column
    Can any one help me...
    The report is IW29

    Hi Kalyan,
    Though you have added a new column to the Field Catalog, it MIGHT not get displayed on the output. This is because, it would be in the hidden mode. Try this. Click on the Layout, add this new field and save the layout. You should be able to see your new column now.
    But dont forget to do the same in Quality and Production systems.
    Hope this clarifies your problem
    Enjoy SAP.
    Rajasekhar

  • How to update/modify the ALV internal table once it is displayed

    Hi All,
    I have a alv grid report using fm reuse_alv_grid_dispaly. My requirement is to create sales order using bapi (up to here it is working fine) and once the SO is created update the function module tables field with the created sales order.
    Example:
    My alv grid display before creating SO:
    Customer Material    SalesOrder
    1000001  material1 
    My alv grid display after creating SO:
    Customer Material    SalesOrder
    1000001  material1  3025642
    How can I achieve this functionality. Because the field catalog is already displayed, how can I modify/update it by adding the sales order number to it. Experts, suggest me.
    Thanks.

    FORM callback_ucomm USING ucomm LIKE sy-ucomm
                                   selfield TYPE slis_selfield.
    CASE ucomm.
        WHEN 'CRE'.
    * Logic to create sales order here...
    * Show the Sales order column
        CALL FUNCTION 'REUSE_ALV_GRID_LAYOUT_INFO_GET'
          IMPORTING
            et_fieldcat   = gt_fieldcat
          EXCEPTIONS
            no_infos      = 1
            program_error = 2
            OTHERS        = 3.
        if sy-subrc eq 0.
          read table gt_fieldcat into gs_fieldcat with key fieldname = 'VBELN'.
          if sy-subrc eq 0.
            gs_fieldcat-no_out = space.
            gs_fieldcat-tech   = space.
            modify gt_fieldcat from gs_fieldcat index sy-tabix transporting no_out tech.
          endif.
          CALL FUNCTION 'REUSE_ALV_GRID_LAYOUT_INFO_SET'
            EXPORTING
              it_fieldcat          = gt_fieldcat[].
        endif.
    ENDFORM.

  • Fields in ALV that is showing FM REUSE_ALV_HIERSEQ_LIST_DISPLAY

    Hello:
    I have problems with ALV that FM ALV FM <b>REUSE_ALV_HIERSEQ_LIST_DISPLAY </b>is showing.
    Problem 1:
    I have got a input field (fieldcat-input = 'X') but when this field is modified in ALV (in screen) it is not modified in internal table!.
    Problem 2:
    When user select or deselect a checkbox in ALV's any rows I need verify  some things, but after this, no event is executed where I could set my source code.
    Checkbox is a field of the ALV.
      CALL FUNCTION 'REUSE_ALV_HIERSEQ_LIST_DISPLAY'
        EXPORTING
    * I_INTERFACE_CHECK = ' '
      i_callback_program             = g_repid
    * I_CALLBACK_PF_STATUS_SET = ' '
    <b>I_CALLBACK_USER_COMMAND = 'USER_COMMAND' </b>
    is_layout                      = gs_layout
    it_fieldcat                    = gt_fieldcat[]
    * IT_EXCLUDING =
    * IT_SPECIAL_GROUPS =
    * IT_SORT =
    * IT_FILTER =
    * IS_SEL_HIDE =
    * I_DEFAULT = 'X'
    I_SAVE = 'A'
    * IS_VARIANT =
    IT_EVENTS = d_eventcat
    * IT_EVENT_EXIT =
    i_tabname_header               = 'GT_HEADER'
    i_tabname_item                 = 'GT_ITEM'
    * I_STRUCTURE_NAME_HEADER =
    * I_STRUCTURE_NAME_ITEM =
    is_keyinfo                     = gs_key
    * IS_PRINT =
    * IS_REPREP_ID =
    * I_BUFFER_ACTIVE =
    * I_BYPASSING_BUFFER =
    * IMPORTING
    * E_EXIT_CAUSED_BY_CALLER =
    * ES_EXIT_CAUSED_BY_USER =
        TABLES
          t_outtab_header                = gt_header[]
          t_outtab_item                  = gt_item[]
    * 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 user_command  USING r_ucomm     LIKE sy-ucomm
                             rs_selfield TYPE slis_selfield.
      MESSAGE S398(00) WITH r_ucomm.
      CASE r_ucomm.
      ENDCASE.
    ENDFORM.                    "user_command
    <b>I have tried with 'LIST_MODIFY' event and 'DATA_CHANGED' event too:</b>
    d_eventcat-name = 'LIST_MODIFY'.
    d_eventcat-form  =  'LIST_MODIFY'.
    APPEND d_eventca.
    d_eventcat-name = 'DATA_CHANGED'.
    d_eventcat-form  =  'DATA_CHANGED'.
    APPEND d_eventca.
    <b>Are OK these definitions? :</b>
    FORM LIST_MODIFY
                     USING P_tabname               TYPE SLIS_TABNAME
                                P_index                 type sy-tabix
                                P_index_slave           type sy-tabix
                                P_index_sum             type sy-tabix.
    endform.                    "LIST_MODIFY
    FORM DATA_CHANGED USING rr_data_changed TYPE REF TO
                                          cl_alv_changed_data_protocol.
    ENDFORM.
    Help me please!. Thank's
    Jose

    In field catalog pass:
    wa_alv_fieldcat-outputlen   = p_len
    Set p_len as 30.
    'FIELD'            text-001   '01' 'X'  '30'  'L'

  • Flush displayed ALV and display normal posting messages on same screen

    Hi,
    I have a requirement wherein i have displayed ALV with execute button on same screen with FI data displayed in ALV.
    Now when user select one particular row and excute it , the requirement is to flush that ALV displayed and display normal
    message such as POSTING DONE
    How can i achieve it ? I am using REUSE_ALV_LIST

    What do you mean by "Now when user select one particular row and excute it "???
    Meaning you do some event like double clicking on that particular row or after selecting it, you will trigger some button?
    For 1st condition, make sure you've created an ALV event.
    If 2nd one, either you create/modify the ALV toolbar.
    Then you can do a simple call screen to exit from that ALV. Or a simple pop up message.

  • Runtime Error - TABLE_FREE_IN_LOOP in editable ALV GRID

    While modifying editable ALV Grid, (CL_GUI_ALV_GRID) I am getting an unexpected dump as follows -
    "Runtime Error          TABLE_FREE_IN_LOOP".
       In a Editable ALV grid whenever new row is added using standard append row button, And while saving, i check for any initial values, in that case iam displaying a warning message. So after that when i try to modify the row, and press enter key, Iam getting this dump "TABLE_FREE_IN_LOOP".
    Can you please help on this regard.
    Thanks in advance..
    Best regards,
    Prasad.

    Hello Krishna
    take a additional internal table which is exactly of same type of the internal table which you want to modify . try modifying the second internal table. and then proceed for db update(if required).
    Regards,
    Suvendu

  • ALV Table - inhibit 'View' dropdown, filter button and settings button

    Can someone tell me what methods need to be used to modify an ALV table to inhibit the showing of the functioniality in the header?  I want to introduce this functionality to the users at a later date, but for now it should look like a standard table.

    Hi Bob.
    Hide / add function buttons in your ALV
    You can hide all function buttons of the ALV with one of these methods.
    Set toolbar visibility to false.
    data: lr_function_settings type ref to if_salv_wd_function_settings.
    lr_function_settings ?= wd_this->r_table. lr_function_settings->set_visible( CL_WD_UIELEMENT=>E_VISIBLE-NONE ).
    set default ALV Functions off
    data: lr_standard_functions type ref to if_salv_wd_std_functions.
    lr_standard_functions ?= wd_this->r_table.
    lr_standard_functions->set_sort_headerclick_allowed( ABAP_false ).
    lr_standard_functions->set_filter_filterline_allowed( ABAP_false ).
    lr_standard_functions->set_filter_complex_allowed( ABAP_false ).
    lr_standard_functions->set_sort_complex_allowed( ABAP_false ).
    You can set individual functions with these methods:
    CALL METHOD cl_salv_wd_config_table=>if_salv_wd_standard_functions~set_<x>_allowed
    EXPORTING
    Value = ABAP_true.
    Where <x> is to be replaced with the property of your choice.

  • How to build a fieldcatalog in webdynpro alv

    Hi friends,
    how to build a fieldcatalog in webdynpro alv ? can any give me with example
    Thnx
    Kumar Srini

    fieldcatalog in the sense, we can modify the alv table column names by using below code.
    DATA LO_CMP_USAGE TYPE REF TO IF_WD_COMPONENT_USAGE.
    LO_CMP_USAGE = WD_THIS->WD_CPUSE_ALV2( ).
    IF LO_CMP_USAGE->HAS_ACTIVE_COMPONENT( ) IS INITIAL.
      LO_CMP_USAGE->CREATE_COMPONENT( ).
    ENDIF.
    DATA LO_INTERFACECONTROLLER TYPE REF TO IWCI_SALV_WD_TABLE .
    LO_INTERFACECONTROLLER =   WD_THIS->WD_CPIFC_ALV2( ).
      DATA LO_VALUE TYPE REF TO CL_SALV_WD_CONFIG_TABLE.
      LO_VALUE = LO_INTERFACECONTROLLER->GET_MODEL(
      LO_VALUE->IF_SALV_WD_TABLE_SETTINGS~SET_VISIBLE_ROW_COUNT( 5 ).
    for title
    DATA: LR_TABLE_SETTINGS TYPE REF TO IF_SALV_WD_TABLE_SETTINGS.
    DATA: LR_HEADER TYPE REF TO CL_SALV_WD_HEADER.
    LR_TABLE_SETTINGS ?= LO_VALUE.
    LR_HEADER = LR_TABLE_SETTINGS->GET_HEADER( ).
    LR_HEADER->SET_TEXT( 'Waiting for Travel Advance Approval ' ).
    **lr_table_Settings->set_Read_only( abap_false ).
    DATA L_HEADER TYPE REF TO CL_SALV_WD_COLUMN_HEADER.
    DATA: LO_COLUMN1 TYPE REF TO CL_SALV_WD_COLUMN.
    LO_COLUMN1 = LO_VALUE->IF_SALV_WD_COLUMN_SETTINGS~GET_COLUMN( 'TRAVELID' ).
    L_HEADER = LO_COLUMN1->GET_HEADER( ).
    L_HEADER->SET_TEXT( 'Travel Adv ID' ).
    DATA: LO_COLUMN2 TYPE REF TO CL_SALV_WD_COLUMN.
    LO_COLUMN2 = LO_VALUE->IF_SALV_WD_COLUMN_SETTINGS~GET_COLUMN( 'PERNR' ).
    L_HEADER = LO_COLUMN2->GET_HEADER( ).
    L_HEADER->SET_TEXT( 'Employee Name' ).
    In get_column you have to pass the attribute name
    is this what you are looking?
    Regards
    Srinivas

  • Dynamic ALV that fits all screen sizes.

    Hi Pundits,
        Could you please help me with how i can modify an alv, which is created using OOPS, to fit all the screen sizes without having to change the container size.
    Thanks,
    Reson

    Hi Reson,
    For that u need to go for docking container,
    create an object of type ref to CL_GUI_DOCKING_CONTAINER.
    If u see the CONSTRUCTOR of that class, u have parameters like ratio, extension etc.
    ratio : Percentage of Screen, Takes Priority Over
            EXTENSION
    see this sample of code :
    data : o_dockingcontainer1 TYPE REF TO
           cl_gui_docking_container.
    CREATE OBJECT o_dockingcontainer1
          EXPORTING
    Ratio must be included in [5..95]
            ratio                     = '95'
         EXCEPTIONS
          cntl_error                  = 1
          cntl_system_error           = 2
          create_error                = 3
          lifetime_error              = 4
          lifetime_dynpro_dynpro_link = 5
          OTHERS                      = 6.
        IF sy-subrc NE 0.
          MESSAGE i050 WITH text-026. " Error in object
                                        creation
          LEAVE LIST-PROCESSING.
        ENDIF.
    Here the ratio takes the value between 5 and 95.
    Please reward the helpful answers.

  • ALV List -  Field Catalog - Change Column width

    Hi Friends,
    I am using Alv list to display the output of a report program. I have generated the field catalog using REUSE_ALV_FIELDCATALOG_MERGE function and to display the alv REUSE_ALV_LIST_DISPLAY.
    My Internal table has few fields like "text1 type string". So after generating the Fieldcatalog from internal table i have changed the field description, but i don't know how to change the column output display width. I have tried by changing OUTPUTLEN parameter to 50 but in the output it is taking only 10 characters instead of 50 characters.
      How can i change the field length(FOR STRING TYPE) for output display ??
    Which parameter do i need to change in field catalog for String type fields..
    Regards,
    Raju.
    Message was edited by: Narayana Raju Sampathirao

    Hi narayana,
    1. the STRING type is causing the problem.
    2. what u can do is,
      (i suppose u are modifying the alv field catalogue)
       One workaround is :
       and it works fantastic !
    3.  BOLD is important.
        (this will take care of the length)
    LOOP AT alvfc INTO alvwa.
      IF alvwa-fieldname = 'A'.
        alvwa-outputlen = '100'.
    <b>    alvwa-inttype = 'CHAR'.</b>
        MODIFY alvfc FROM alvwa.
      ENDIF.
    ENDLOOP.
    4. To get a TASTE of what i m saying,
       just copy paste in new program :
    REPORT abc.
    TYPE-POOLS : slis.
    Data
    DATA : BEGIN OF itab OCCURS 0,
           a TYPE string.
            INCLUDE STRUCTURE t001.
    DATA :  END OF itab.
    DATA : alvfc TYPE slis_t_fieldcat_alv.
    DATA : alvwa TYPE slis_fieldcat_alv.
    Select
    SELECT * FROM t001 INTO CORRESPONDING FIELDS OF TABLE itab.
    LOOP AT itab.
      itab-a = 'pppppppppppppppppppppp'.
      MODIFY itab.
    ENDLOOP.
    *-------  Field Catalogue
    CALL FUNCTION 'REUSE_ALV_FIELDCATALOG_MERGE'
      EXPORTING
        i_program_name         = sy-repid
        i_internal_tabname     = 'ITAB'
        i_inclname             = sy-repid
      CHANGING
        ct_fieldcat            = alvfc
      EXCEPTIONS
        inconsistent_interface = 1
        program_error          = 2
        OTHERS                 = 3.
    LOOP AT alvfc INTO alvwa.
      IF alvwa-fieldname = 'A'.
        alvwa-outputlen = '100'.
        alvwa-inttype = 'CHAR'.
        MODIFY alvfc FROM alvwa.
      ENDIF.
    ENDLOOP.
    Display
    CALL FUNCTION 'REUSE_ALV_LIST_DISPLAY'
      EXPORTING
        it_fieldcat             = alvfc
      TABLES
        t_outtab                = itab
      EXCEPTIONS
        program_error           = 1
        OTHERS                  = 2.
    regards,
    amit m.

  • Alv cell editing

    Hi ,
    can anybody tell me how to make a cell editable in alvgrid .

    In the field catalogue, change the attributes of that field as editable
    fcat-edit = 'X'.
    After creating the grid, register event entered and modified
    Create alv grid
        CREATE OBJECT w_grid_vend
          EXPORTING
            i_parent          = w_vend_contnr
          EXCEPTIONS
            error_cntl_create = 1
            error_cntl_init   = 2
            error_cntl_link   = 3
            error_dp_create   = 4
            others            = 5.
        IF sy-subrc <> 0.
      MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
                 WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
        ENDIF.
    Register edit event
        CALL METHOD w_grid_vend->register_edit_event
          EXPORTING
            i_event_id = cl_gui_alv_grid=>mc_evt_enter
          EXCEPTIONS
            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.
    Edit event for modified
        CALL METHOD w_grid_vend->register_edit_event
          EXPORTING
            i_event_id =  cl_gui_alv_grid=>mc_evt_modified
          EXCEPTIONS
          error      = 1
          OTHERS     = 2.
    Handle the changed data in the methods
    Handle data changed
        METHODS handle_data_changed FOR EVENT data_changed
                               OF cl_gui_alv_grid
                               IMPORTING er_data_changed.

  • Download editable ALV

    hello experts,
    i have a ALV output with oops with one field editable but when I download it as excel file after changing the editable field's value, then it gives me error that Field symbol has not yet been assigned.
    Please help me out.
    THanks in advance,
    Kush Sharma

    Hi,
    When you change some text in the editable column of alv. First modify that text into internal table.
    Reflect changes back into the ALV display and then click EXPORT to download to excel file.
    Refer this code:-
    This code will reflect all the changes into the internal table that is being displayed.
    * to reflect the data changed into internal table
          DATA : ref_grid TYPE REF TO cl_gui_alv_grid. "new
          IF ref_grid IS INITIAL.
            CALL FUNCTION 'GET_GLOBALS_FROM_SLVC_FULLSCR'
              IMPORTING
                e_grid = ref_grid.
          ENDIF.
          IF NOT ref_grid IS INITIAL.
            CALL METHOD ref_grid->check_changed_data.
          ENDIF.
          " at this point your internal table is modified from alv output.
          " and then use refresh_table_display
          CALL METHOD ref_grid->refresh_table_display.
          " to refresh the data from internal table back to alv output.
    After this alv output is modified, then try exporting to excel.
    Hope this helps you.
    Regards,
    Tarun

  • OSS Note 1401249 - Issue in GUI status

    Hi ,
    As per 1401249 Note instructions, i need to add a new push button 'Display Income Levy Data',  in the standard report HIECILC0 .
    In SE41 , I am giving the program name HIECILC0 and Status 'ALV', when I click on Change button,  I see 'Modify Status ALV in program HIECILC0' , where as in the Note instructions screen shot it is given as  'Maintain Status ALV in program HIECILC0'.
    Have anyone faced this issue before, why is it 'Modify Status ALV in program HIECILC0' instead of 'Maintain Status ALV in program HIECILC0'.
    I am not able follow the same steps given in the Note instruction because of this issue.
    Please let me know how to proceed with this.

    Hi ,
    The  below thread resolved the issue.
    Can't modify a gui Status
    In SE41 Menu path: Edit -> Modification Operations -> Swich off assistant
    Thanks

Maybe you are looking for

  • Can't access data after name change of account in Time Capsule

    I started using Time Capsule (TC). After transferring data to 3 different accounts. I noticed that the process of entering/ connecting to your account takes to much time. You have to connect every time to the account on TC. Because of this I changed

  • I CAN'T DELETE THESE 3 ITEMS

    fjnaohmeicdkcipkhddeaibfhmbobbfm_35647.crx nmpeeekfhbmikbdhlpjbfmnpgcbeggic_44769.crx obgoiaeapddkeekbocomnjlckbbfapmk_45352.crx ^ I have been trying to delete these, and I can't. I can't even drag them into the trash. These are apparently from googl

  • Production order settlement status table

    Hi All,        How shoud i know the production order is settled or not ? Some status i given here SETC Settlement rule created VCAL Variances calculated, REL released,CNF conformed ,in a month  10 order created some are conformed some are relesed son

  • What are Printing Security Best Practices for Advanced Features

    In the Networking > Advanced "Enabled Features" what are the best practices settings for security. Trying to find out what all of these are.  Can't find them in the documentation. Particularly eCCL & eFCL? Enabled Features IPv4 IPv6 DHCP DHCPv6 BOOTP

  • Elements Organizer 11 - Instant Fix - File Save Size

    Hi, I'm looking for some help with the size of the resultant file from the "Instant Fix" option in Elements 11 Organizer. If I use the "Instant Fix" option on a 10MB JPEG file, I end up with a 1MB JPEG file as the result ! Why? If I can control this,