Filter Issue in ALV Grid

I am displaying the table in ALV Grid format. I have 4 fields in the table. The filter works for the first 3 fields, but doesnot work for the last field.
Please let me know what might be the issue.
Find the table declaration and the table population as in the below code
TYPES : BEGIN OF ty_message,
          avm_nr  TYPE avm_nr,
          motiv   TYPE motiv_nr,
          text    TYPE t100-text,
          msg     TYPE merep_orderstat,
        END OF ty_message.
DATA: gt_message TYPE STANDARD TABLE OF ty_message,
          gs_message TYPE ty_message.
    gs_message-avm_nr   = gs_upload-avm_nr.
    gs_message-motiv      = gs_upload-motiv.
    gs_message-text        = 'Order Successfully Changed'.
    gs_message-msg       = 'Success'.
    APPEND gs_message TO gt_message.
    CLEAR gs_message.
Regards,
Salil

Since the field MSG refer to MEREP_ORDERSTAT which is CHAR10, it will convert the content to UpperCase.
So, try like:
    gs_message-avm_nr   = gs_upload-avm_nr.
    gs_message-motiv      = gs_upload-motiv.
    gs_message-text        = 'Order Successfully Changed'.
    gs_message-msg       = 'SUCCESS'.
    APPEND gs_message TO gt_message.
    CLEAR gs_message.
Regards,
Naimesh Patel

Similar Messages

  • Issue with ALV grid print preview/spool

    Hello everyone,
    I am working on a report and I am having some issues with ALV grid. Currently in our DEV and QA environments the user can run the report, view the ALV grid, and print the grid without any issues.
    However this isn't the case in the Prod environment. The user is able to run the report and view the grid without any issues. But when they click print preview or click print, the spool is incorrect. It shows the proper values from the grid, but the first field is reduced in length. Rather than showing a numeric field of length 10 it shows 99999999# or 99999999...
    The programs are identical through every environment, including user parameters, formats, and spool settings. I have been told printing grids may have some issues, does anyone have any advice or dealt with this issue before?
    I appreciate the help.
    Thanks,
    C

    I was waiting to hear from the functional team on the matter and no one has mentioned any more issues.  I am assuming the problem is solved.  I just noticed the thread was still un-answered and wanted to give an update. 
    Thank you for you help Vijay.
    Regards
    C

  • "Control + F5"  standard filter functionality for ALV Grids

    Hi all,
    After an ALV Grid is displayed on screen there is a standard functionality to filter a selected column.
    You can select a column (click on the head) of the ALV, then "Control + F5" and a pop-up appears to insert a value or a range by which the filtration is going to be done.
    But a I have problem with a concrete field. It doesn`t seem different on comparison with other fields (CHAR30), but I don`t know why it doesn`t work correctly as others.
    Have you had any situation like this ??
    Thanks & sorry for my bad english,
    Rubè

    Hi Frank,
    When you are entering  89012  and pressing enter the additional zeros are adding up because of the data type of VBELN We have standard conversion routine attached with this .So when ever u wrtie any text that routine will works.
    Can you please check what data type are you using in the internal table that you are binding  to the node?
    Thanks and Regards,
    NSingh
    Edited by: Nsingh on Feb 17, 2012 4:52 AM

  • Issue with ALV Grid and events

    Hi,
    I am creating an ALV Grid with fields Matnr,Charg,Labst,Meins. The first three fields are editable and the last (MEINS) is read only.
    Now I am trying to fill the MEINS field programmaticly after entering the MATNR and confirm with enter/return.
    I think that I have to "overload" the enter event of the alv grid to fill the MEINS everytime when a MATNR was entered. But I don't know how I could implementing this. Could you give me a hint how I could solve this problem?
    (The behavior should look like in transaction MIGO)
    Thanks

    Hi Alex
    When you press enter an event is triggerd and function code is filled in sy-ucoom or you can say in ok_code. At that time PAI event occurs. In PAI of that screen you need to check ok_code and load new data in table which you passed to ALV and also refresh the ALV.
    data: ok_code like sy-ucomm.
    PAI----screen 100
    case ok_code.
    when 'ENTER'.
    select data
    and refresh ALV
    then again call
    funtion to display ALV
    Regards
    Aditya

  • Performance issue with ALV Grid in Module Pool

    Hi Experts,
    I am using an editable ALV Grid on a screen. This ALV does not have too many fields and is called in modal dialog box.
    I call this screen from a standard transaction. The problem is this screen is taking 3-4 seconds to load. I checked that fetching the data is not a problem and only after the call screen statement, the processing becomes very slow. Is this due to ALV grid. Please help as this is urgently needed and I cannot change from ALV to table control. Please suggest if anything can b done?
    Regards
    Satish

    Hi Satish,
    I hope there is a chance to do the SET_TABLE_FOR_FIRST_DISPLAY or preparation of field catalog earlier, i.e. in INITILIZATION event and then later just exchange table contents before display. That will reduce time.
    Regards,
    Clemens

  • Issue in ALV Grid Grand Totals

    Hi Friends,
       Hwo can i display  grand total text in ALV Grid? Eventhough i am using Totals_text parameter in layout i am unable to display.  any one vcan help me out in this refgard.
    if pos send the code
    Regards,
    Vijay

    <REMOVED BY MODERATOR>
    SAMPLE PROGRAM:
    REPORT ysalesorder_alv_subtotals.
    * Type Pools
    TYPE-POOLS:slis.
    * Tables
    TABLES: vbak, "Sales Document: Header Data
    vbap. "Sales Document: Item Data
    * Global Structures
    DATA:gt_fieldcat TYPE slis_t_fieldcat_alv,
    wa_fieldcat TYPE slis_fieldcat_alv,
    gt_sortcat TYPE slis_t_sortinfo_alv,
    wa_sortcat LIKE LINE OF gt_sortcat.
    * Internal Table
    DATA: BEGIN OF gt_salesorder OCCURS 0,
    vbeln LIKE vbak-vbeln, " Sales Document Number
    posnr LIKE vbap-posnr, " Sales Doc Item
    netwr LIKE vbap-netwr, " Net Value
    END OF gt_salesorder.
    * SELECT OPTIONS
    SELECTION-SCREEN BEGIN OF BLOCK b1 WITH FRAME
    TITLE text-001.
    SELECT-OPTIONS: s_vbeln FOR vbak-vbeln. " Sales Document
    Number.
    SELECTION-SCREEN END OF BLOCK b1.
    * Initialization
    INITIALIZATION.
    PERFORM initialization.
    * Start Of Selection
    START-OF-SELECTION.
    PERFORM field_catalog. "For Structure Creation
    PERFORM fetch_data. "Get the Data From DB Table
    PERFORM sorting USING gt_sortcat.
    * End Of Selection
    END-OF-SELECTION.
    PERFORM display_data.
    *& Form initialization
    * text
    * --> p1 text
    * <-- p2 text
    FORM initialization .
    s_vbeln-sign = 'I'.
    s_vbeln-option = 'BT'.
    s_vbeln-low = '4969'.
    s_vbeln-high = '5000'.
    APPEND s_vbeln.
    ENDFORM. " initialization
    *& Form field_catalog
    * text
    * --> p1 text
    * <-- p2 text
    FORM field_catalog .
    REFRESH : gt_fieldcat.
    CLEAR : wa_fieldcat.
    wa_fieldcat-col_pos = '1'. "Column Position
    wa_fieldcat-tabname = 'IT_SALESORDER'. "Internal Table
    wa_fieldcat-fieldname = 'VBELN'. "Field Name
    wa_fieldcat-key = 'X'. "Blue Color
    wa_fieldcat-seltext_m = 'Sales Doc No'. "Display Text In Screen
    APPEND wa_fieldcat TO gt_fieldcat.
    CLEAR wa_fieldcat.
    wa_fieldcat-col_pos = '2'. "Column Position
    wa_fieldcat-tabname = 'IT_SALESORDER'. "Internal Table Name
    wa_fieldcat-fieldname = 'POSNR'. "Field Name
    wa_fieldcat-seltext_m = 'Sales Doc Item'."Display Text In Screen
    APPEND wa_fieldcat TO gt_fieldcat.
    CLEAR wa_fieldcat.
    *SubTotal on the Field NETWR
    wa_fieldcat-col_pos = '3'. "Column Position
    wa_fieldcat-tabname = 'IT_SALESORDER'. "Internal Table
    wa_fieldcat-fieldname = 'NETWR'. "Field Name
    wa_fieldcat-do_sum = 'X'. "Sum
    wa_fieldcat-seltext_m = 'Net Value'. "Display Text In Screen
    APPEND wa_fieldcat TO gt_fieldcat.
    CLEAR wa_fieldcat.
    ENDFORM. " field_catalog
    *& Form sorting
    * text
    * -->P_IT_SORTCAT text
    FORM sorting USING p_it_sortcat TYPE slis_t_sortinfo_alv.
    CLEAR wa_sortcat.
    wa_sortcat-fieldname = 'VBELN'.
    wa_sortcat-up ='X'.
    wa_sortcat-subtot = 'X'.
    APPEND wa_sortcat TO p_it_sortcat.
    ENDFORM. " sorting
    *& Form display_data
    * text
    * --> p1 text
    * <-- p2 text
    FORM display_data .
    CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
    EXPORTING
    * I_INTERFACE_CHECK = ' '
    * I_BYPASSING_BUFFER = ' '
    * I_BUFFER_ACTIVE = ' '
    i_callback_program = sy-repid
    * 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 =
    * I_GRID_SETTINGS =
    * IS_LAYOUT =
    it_fieldcat = gt_fieldcat
    * IT_EXCLUDING =
    * IT_SPECIAL_GROUPS =
    it_sort = gt_sortcat
    * IT_FILTER =
    * IS_SEL_HIDE =
    * I_DEFAULT = 'X'
    * I_SAVE = ' '
    * 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
    * IT_ALV_GRAPHICS =
    * IT_HYPERLINK =
    * IT_ADD_FIELDCAT =
    * IT_EXCEPT_QINFO =
    * I_HTML_HEIGHT_TOP =
    * I_HTML_HEIGHT_END =
    * IMPORTING
    * E_EXIT_CAUSED_BY_CALLER =
    * ES_EXIT_CAUSED_BY_USER =
    TABLES
    t_outtab = gt_salesorder
    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_data
    *& Form fetch_data
    * text
    * --> p1 text
    * <-- p2 text
    FORM fetch_data .
    REFRESH : gt_salesorder.
    CLEAR : gt_salesorder.
    SELECT a~vbeln
    posnr
    b~netwr
    FROM vbak AS a
    INNER JOIN vbap AS b ON a~vbeln = b~vbeln
    INTO TABLE gt_salesorder
    WHERE a~vbeln IN s_vbeln.
    ENDFORM. " fetch_data
    Edited by: Alvaro Tejada Galindo on Apr 11, 2008 12:24 PM

  • Field Catelog Issue for ALV Grid

    Hi,
    I have generated the ALV Dynamically based on the Date Range entered on the selection screen, now I am able to fill the values into the structure also, here my problem is date is like S858-spbup ( mm/yyyy format), what ever the values I have moved is S858-umwavwr(Currency values), now I want to sub total these values. Since my field catelog is date format that is why it is not doing subtotals.
    code is
        gs_fc-seltext_l = date.
        gs_fc-seltext_m = date.
        gs_fc-seltext_s = date.
        gs_fc-ref_fieldname = 'umwavwr'.
        gs_fc-ref_tabname = 'S858'.
        gs_fc-do_sum = 'X'.
        gs_fc-outputlen = 20.
        APPEND gs_fc TO gt_fc.
    it is doing subtotal but the issue is in ALV header it is not displaying like date (for example 06/2005),instead it is displaying the name as ref_fieldname text. How to resolve this issue. Please help me.
    Thanks & Regards,
    Sivaram Kandula

    Hi Rich,
    Thanks for your speedy reply. But in my case scenario is different.
    if i remove the ref_fieldname = date means it is dumping bcz,
    output is like this
    suppose my input is 06/2005 to 08/2005
    CSR   District  06/2005 07/2005 08/2005 totals
    xxx   newyork    30.00    3.00   5.00    38.00
    xxx   newyork    40.00    5.00   6.00    20.00
    xxx              70.00    8.00  11.00    58.00
    now I am able to display the output like this, but the problem here is i am unable to subtotal these, bcz my field catelog is date type that is why do_sum is not working, that is why I took ref_feield name as UMWAVWR and S858, it is subtotaling but I am unable to see the header like above, instead it is displaying like
    CSR  District   invoice:Cost  invoice:Cost Invoice:cost tot
    so please advise me how to proceed further.
    Thanks & Regards,
    Sivaram Kandula

  • Layout Issue In ALV Grid

    Dear All,
    I have made an editable ALV andafter entreing data and successful update it will show another ALV.
    The issue is that user has saved different Layouts for the 2 ALV's and made it user specific. But again when the report is executed then the 2 saved layouts are not coming.
    The respective layout should come for the 2 ALVs.
    Thanks & Regards,
    Bharti Jain

    Hi, let us try with the following code,
    type-pools SLIS.
    data : lv_vbeln type vbak-vbeln.
    select-options : so_vbeln for lv_vbeln.
    initialization.
    so_vbeln-low = '4970'.
    so_vbeln-high = '4975'.
    append so_vbeln.
    types : begin of ty_vbak,
             vbeln type vbak-vbeln,
             erdat type vbak-erdat,
             erzet type vbak-erzet,
             ernam type vbak-ernam,
           end of ty_vbak.
    data : lt_vbak type standard table of ty_vbak,
           ls_vbak type ty_vbak.
    data : ls_variant like DISVARIANT.
    data : ls_layo type  SLIS_LAYOUT_ALV.
    data : lt_fcat type SLIS_T_FIELDCAT_alv.
    start-of-selection.
    perform getvbak.
    if sy-subrc eq 0.
    perform displayvbak.
    endif.
    FORM GETVBAK .
    select vbeln erdat erzet ernam from vbak
      into table lt_vbak
      where vbeln in so_vbeln.
    ENDFORM.                    " GETVBAK
    FORM DISPLAYVBAK .
    CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
    EXPORTING
       I_CALLBACK_PROGRAM                = sy-repid
       I_STRUCTURE_NAME                  = 'ZMYVBAk'
       IS_LAYOUT                         = ls_layo
       IT_FIELDCAT                       = lt_fcat[]
       I_SAVE                            = 'X'
       IS_VARIANT                        = ls_variant
      TABLES
        T_OUTTAB                          = lt_vbak[].
    ENDFORM.                    " DISPLAYVBAK
    After execution select the fields which you want to hide and after that goto SETTINGS menu -->Layout --->save it
    it will ask the save variant and name .
    After that goto layout management and select the variant which you created and execute the alv program
    then you can observe the fields will hide .
    Thanks & Regards,
    Raghunadh . K

  • Back button issue in ALV Grid(Factory method)

    Hi All,
    I have displayed a report using factory method(CL_SALV_TABLE).In that i have added buttons in application bar too.So when clicking on refresh button ALV should display again with latest number of records,that is working fine but when clicking on back button it should go to selection screen instead of that it is going a step back and displaying previous list of grid and then back and then selection screen.
    Can any one help me how to directly go to input selection screen instead of going step back...
    Regards,
    Ram

    HI,
    Use this syntax (CALL SELECTION-SCREEN 1000)...Try this one
    regards,
    balaji

  • Filter issue in ALV

    Hi All,
    Hope you all are doing fine!!
    Am displaying an alv output list for about 15fields among which VBELN ( sales document ) is one of the fields...,am able to filter all the fields in the output except for VBELN field ,,,, i really dont understand wats happening the filter is working for all the fields except sales document field(VBELN)..?
    Wud be greatful for any kind of fix for this problem!
    Thanks
    John

    Hi Raymond,
    Im pasting the code wherever am using VBELN in the program...ok
    TYPES: BEGIN OF ty_data,
          rufnm TYPE char30, "sales resp
           aubel TYPE vbeln_va, "sales doc
           vbeln TYPE char10, "doc doc       bstkd TYPE bstkd,  "po
           bstdk TYPE bstdk, "po item
           erdat TYPE erdat, "created on
           name1 TYPE name1_gp, "customer
           posnr_r TYPE posnr_vf, "billing item
           prctr TYPE prctr, "profit center
           netwr TYPE netwr, "net value
           augdt TYPE datum, "payment date
           terdt TYPE dzfbdt, "base line date
           net_val TYPE netwr_fp, "net val
           profit TYPE netwr_fp, "profit
           END OF ty_data.
    PERFORM build_fieldcat USING:
      'KUNRG' 'IT_DATA' 30 text-019 CHANGING it_fieldcat,
      'VKORG' 'IT_DATA' 30 text-001 CHANGING it_fieldcat,
      'VKBUR' 'IT_DATA' 30 text-020 CHANGING it_fieldcat,
      'SPART' 'IT_DATA' 30 text-021 CHANGING it_fieldcat,
      'VTWEG' 'IT_DATA' 30 text-022 CHANGING it_fieldcat,
      'AUBEL' 'IT_DATA' 30 text-023 CHANGING it_fieldcat,
      'POSNR_A' 'IT_DATA' 30 text-024 CHANGING it_fieldcat,
      'VBELN' 'IT_DATA' 30 text-003 CHANGING it_fieldcat, 
    'BSTKD' 'IT_DATA' 30 text-025 CHANGING it_fieldcat,
      'BSTDK' 'IT_DATA' 30 text-026 CHANGING it_fieldcat,
      'ERDAT' 'IT_DATA' 30 text-011 CHANGING it_fieldcat,
      'NAME1' 'IT_DATA' 30 text-004 CHANGING it_fieldcat,
       'AUGDT' 'IT_DATA' 30 text-012 CHANGING it_fieldcat.
    FORM build_fieldcat USING
             lw_fieldname TYPE slis_fieldcat_alv-fieldname
             lw_tabname TYPE slis_fieldcat_alv-tabname
             lw_outputlen TYPE slis_fieldcat_alv-outputlen
             lw_seltext_l TYPE slis_fieldcat_alv-seltext_l
             CHANGING lit_fieldcat TYPE slis_t_fieldcat_alv.
      DATA: lwa_fieldcat TYPE slis_fieldcat_alv.        "Field string
      lwa_fieldcat-fieldname      = lw_fieldname.
      lwa_fieldcat-tabname        = lw_tabname.
      lwa_fieldcat-outputlen      = lw_outputlen.
      lwa_fieldcat-seltext_l      = lw_seltext_l.
      APPEND lwa_fieldcat TO lit_fieldcat.
      CLEAR: lwa_fieldcat.
    ENDFORM.                    " build_fieldcat
    Thanks
    John

  • Filter Not working in ALV grid

    Hi All,
    The filter button in ALV Grid is not working for some fields. if the filter button is selected for a particular field in the ALV grid then no entries are getting displayed in the ALV. For few fields it is working. for few fields is it not displaying any entries after selecting filter.
    Please let me know what may be the possible causes for this issue.
    Thanks in Advance!
    Thanks & Regards,
    Preethi G

    Hi,
      Ex: your output is something like this
      A                     B                         C
      1                    2                             3
      4                    2                              5
      5                    3                              6
    When you filter B for value 2, then internally it creates one more internal table like this
    A                    B                         C
    1                002                         3
    4                002                         5
    5                003                         6
    it tries to matches value 2 to 002 and it fails to retrive the record.
    The solution is try to do the conversion exit on the column/field you are trying to filter it. It will work.
    Regards,
    Ramesh.

  • ALV Grid Filter

    Hi,
    i tried to send a filter options to alv grid with 'it_filter' but it didn't work.
    can somebody help me pls?
    Thanks,
    my code is
    data:
          gt_filter   TYPE LVC_T_FILT     ,
          gs_filter   TYPE LVC_s_FILT     .
        gs_filter-fieldname  = 'VBELN' .
        gs_filter-sign       = 'E'     .
        gs_filter-option     = 'BT'    .
        gs_filter-low        = '0000000001'     .
        gs_filter-high       = '0000000003'     .
        APPEND gs_filter TO gt_filter  .
      call method gr_alvgrid->set_table_for_first_display
        exporting
          is_variant           = variante
          i_save               = 'X'
          i_default            = 'X'
          is_layout            = gs_layout
    *        it_toolbar_excluding = lt_excl_func
        changing
          it_outtab            = table
          it_fieldcatalog      = fcat
          IT_FILTER            = gt_filter[]

    from your code i can see one thing the layout variant(default one) may be overriding the filter settings. do you have any Default variant ..? try to comment that i_default = 'X'
    call method gr_alvgrid->set_table_for_first_display
        exporting
         " is_variant           = variante "remove these three
         " i_save               = 'X'
         " i_default            = 'X'
          is_layout            = gs_layout
    *        it_toolbar_excluding = lt_excl_func
        changing
          it_outtab            = table
          it_fieldcatalog      = fcat
          IT_FILTER            = gt_filter[]

  • Update values in AlV grid display after entering value

    Hi,
         I have an issue in ALV grid display.
        Let me explain.
        i have 8 fields to display in which one is editiable.
       Fields are: date
                       material,
                       material Description,
                       Opening Stock,
                       Closing stock-  (  this field is editiable)
                       Closing stock,
                       Received Stock,
                       Actual production.
    Actual production = Closing stock + removal stock
                                 - receipt stock - opening stock.
    when i change the value of closing stock and press enter, actual production should get update, the new values should display.
    Thany you in advance.

    Hi,
    Please refer the code below:
    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
    Thanks,
    Sriram Ponna.

  • ALV grid export to Excel 2003-f.01

    Hi all,
    I have an issue with ALV grid export to excel 2003 ,when i tried to download with the option as local file > xls file ,the report downloads with page breaks which the user does not want , each break comeswith header .
    With the option of list>export>xml sheet - the report downloads with out page break but with no header information like the name of the report and reporting period .The tcode is f.01 and the system is ECC6.
    Can any one suggest  how to download the report with tiltle of the report with no page break ?
    Thanks
    ske

    Hi
    What happens if you use the export/local file option - does that help at all or can you change the layout? Haven't got access to your release to check.
    Cheers
    David
    Edited by: David Berry on Oct 28, 2010 9:38 PM

  • ALV Grid output

    Hi,
    I have one issue on ALV Grid output.
    Some times we will not have any values to display in ALV Grid output.
    In such cases we usually have to display 'No Data found' in report output message(Below report header).
    How to acheive this as all my ALV grid fields are of less length.
    Note: Message should be displayed below ALV Header (Where we usually get 1st record to be displayed).
    What is the solution for the same!
    Thanks,
    Deep.

    Hello Deep,
    You can try with,
    MESSATE 'Data not Found' TYPE 'I'.
    Bye
    Gabriel P.-

Maybe you are looking for

  • Downpayment clearing for opentext automatic invoice posting

    Hello everyone. My client is using OpenText VIM ( Vendor Invoice Management ) for incoming invoices. VIM automatically triggers FB60 (in case of PO invoice) & MIRO ( In case of PO invoice ). The invoice posting happens automatically in the background

  • Macbook turns off while installing

    Some days ago I bought a used macbook. It had Snow Leopard 10.6.8 installed. I wanted to repartition and make a fresh installation. I made it but when the half of installation was ready it suddenly turned of... i tried it 4 or 5 times and the same ha

  • Sms from a midlet, but directly

    I have a problem with a gsm phone that won't send sms messages through the regular interface that comes with the phone (it recieves though), i guess its blocked or something... Anyways, i tought a way to make it send sms messages is making something

  • Oracle 817 ZIP File

    Hello Everyone ! Recently I downloaded Oracle 817 , that means nt817se.zip from the server in UK. When i tried to unzip (WinZip 9.0) I got the following errors : creating: C:\OracleInstall\ZIP\Ora817\stage\Components\oracle.bali.ewt\3.3.6.0.0a\1\Data

  • Only half the photo prints on my envy. Is it sick?

    i've printed from my ipad and windows 7 and it fails the same way. normal a4 prints well. Frustrating. Anyone have thevame problem?