ALV Grid values only via F4?

Hello,
Currently i have a ALV grid with 2 fields, both defined as 'Editable' in the field catalog.
however i wish to restrict users enter values manually(keyboard) and wish to provide them option to enter values only via F4.
Is this possible?Is there any property which makes a grid editable via F4 only?
Thanks
Mahadevan

Hi,
I think this line will solve your problem.
clear ls_fieldcat.
  ls_fieldcat-col_pos  =  12.
  ls_fieldcat-fieldname = 'STATUS'.
  ls_fieldcat-ref_fieldname = 'STATUS'.       /////////Name of field for F4 Help
  ls_fieldcat-ref_tabname = 'Y0BS_UPG_TRACKER'.           ////Table name of f4 help field
  ls_fieldcat-tabname = 'T_OUTPUTDATA'.
  ls_fieldcat-seltext_m = 'Status'.
  ls_fieldcat-edit = 'X'.
Thanks,
Smita

Similar Messages

  • ALV GRID - export only columns not faded out

    Hello,
    I hope that this is possible but till now I have no idea.
    The request is to provide a download/export function (moving the export file directly to a specific location the user is not allowed to modify-> so standard function not allowed based on specification) which will only export the columns from the ALV GRID which are not faded out.
    With the standard files download from the menu bar this is possible. 
    But how to do this starting with a self defined button?
    best regards
    Dirk

    hi,
    if u need a custmozied button with all standard ALV fucntions,
    1. goto <b>SE80</b>, under thre <b>function group SALV</b>, there will be <b>GUI_STATUS named as ST</b>ANDARD.
    2. copy that into ur program, and add ur own button in that , then write the code for that by chekcing SY-UCOMM.
    With Rgds,
    S.Barani

  • How to print multiple ALV Grids with only one print dialog?

    Hi,
    I have a report that has multiple ALV grids in splitter containers. The users want to be able to print those ALVs by pushing only one print button. I got it to work (parameter IS_PRINT and method SET_FRONTEND_PRINT before calling SET_TABLE_FOR_FIRST_DISPLAY) but I can't find a way to avoid that the printer dialog pops up for every grid I print.
    I tried to use the function module approach with REUSE_ALV_LIST_DISPLAY but have the same issue. Any thoughts?
    Thanks,
    Guenther

    Hi Peluka,
    Well, that's exactly what I am doing. Putting one central button in the app is not the problem; the issue is that the print dialog (to select the printer) pops up for every  individual ALV grid. E.g. if I place 4 ALV grids on my screen and trigger their print from a central button, I am getting 4 print dialogs.
    Cheers,
    Guenther

  • REFRESH ALV GRID VALUES

    Hi gurues...
    How come my output internal table isn't being updated (ceckbox for example) at the user-commannd even when I'm activating REFRESH_TABLE_DISPLAY.
    How can I make my internal table update itself within the user-command module??
    Thanks,
    Rebeka

    you need to call method CHECK_CHANGED_DATA method in your pai in the beginning.
    module user_command input.
    call method grid->check_changed_data.
    "this method will update the checkbox changes to internal table
    endmodule.

  • Multiple selection in DISPLAY only ALV GRID

    Hi,
    I would like to make the rows of the ALV Grid Display only at the same time I would like to make multiple selection possible.
    Multiple selection is possible by giving EDIT = 'X' at the layout level. But then if we give EDIT = ' ' at the fieldcatalogue level or no_input = 'X' at the layout level it is still in Editable mode. Kindly help me.
    Thanks

    Hi,
    Setting and getting selected rows (Columns) and read line contents
    You can read which rows of the grid that has been selected, and dynamic select rows of the grid using methods get_selected_rows and set_selected_rows. There are similar methods for columns.
    Note that the grid table always has the rows in the same sequence as displayed in the grid, thus you can use the index of the selected row(s) to read the information in the rows from the table. In the examples below the grid table is named gi_sflight.
    Data declaration:
    DATA:
    Internal table for indexes of selected rows
    gi_index_rows TYPE lvc_t_row,
    Information about 1 row
    g_selected_row LIKE lvc_s_row.
    Example 1: Reading index of selected row(s) and using it to read the grid table
      CALL METHOD go_grid->get_selected_rows
        IMPORTING
          et_index_rows = gi_index_rows.
      DESCRIBE TABLE gi_index_rows LINES l_lines.
      IF l_lines = 0.
        CALL FUNCTION 'POPUP_TO_DISPLAY_TEXT'
             EXPORTING
                  textline1 = 'You must choose a valid line'.
        EXIT.
      ENDIF.
      LOOP AT gi_index_rows INTO g_selected_row.
         READ TABLE gi_sflight INDEX g_selected_row-index INTO g_wa_sflight.
        ENDIF.
      ENDLOOP.
    Example 2: Set selected row(s).
      DESCRIBE TABLE gi_index_rows LINES l_lines.
      IF l_lines > 0.
        CALL METHOD go_grid->set_selected_rows
            exporting
              it_index_rows = gi_index_rows.
      ENDIF.
    Make an Exception field ( = Traffic lights)
    There can be defined a column in the grid for display of traffic lights. This field is of type Char 1, and can contain the following values:
    1 Red
    2 Yellow
    3 Green
    The name of the traffic light field is supplied inh the gs_layout-excp_fname used by method set_table_for_first_display.
    Example
    TYPES: BEGIN OF st_sflight.
            INCLUDE STRUCTURE zsflight.
    TYPES:  traffic_light TYPE c.
    TYPES: END OF st_sflight.
    TYPES: tt_sflight TYPE STANDARD TABLE OF st_sflight.
    DATA: gi_sflight TYPE tt_sflight.
      Set the exception field of the table
        LOOP AT gi_sflight INTO g_wa_sflight.
          IF g_wa_sflight-paymentsum < 100000.
            g_wa_sflight-traffic_light = '1'.
          ELSEIF g_wa_sflight-paymentsum => 100000 AND
                 g_wa_sflight-paymentsum < 1000000.
            g_wa_sflight-traffic_light = '2'.
          ELSE.
            g_wa_sflight-traffic_light = '3'.
          ENDIF.
          MODIFY gi_sflight FROM g_wa_sflight.
        ENDLOOP.
      Name of the exception field (Traffic light field)
        gs_layout-excp_fname = 'TRAFFIC_LIGHT'.
      Grid setup for first display
        CALL METHOD go_grid->set_table_for_first_display
          EXPORTING i_structure_name = 'SFLIGHT'
                                  is_layout               = gs_layout
          CHANGING  it_outtab                 = gi_sflight.
    Color a line
    The steps for coloring a line i the grid is much the same as making a traffic light.
    To color a line the structure of the  table must include a  Char 4 field  for color properties
    TYPES: BEGIN OF st_sflight.
            INCLUDE STRUCTURE zsflight.
          Field for line color
    types:  line_color(4) type c.
    TYPES: END OF st_sflight.
    TYPES: tt_sflight TYPE STANDARD TABLE OF st_sflight.
    DATA: gi_sflight TYPE tt_sflight.
    Loop trough the table to set the color properties of each line. The color properties field is
    Char 4 and the characters is set as follows:
    Char 1 = C = This is a color property
    Char 2 = 6 = Color code (1 - 7)
    Char 3 = Intensified on/of = 1 = on
    Char 4 = Inverse display = 0 = of
         LOOP AT gi_sflight INTO g_wa_sflight.
          IF g_wa_sflight-paymentsum < 100000.
            g_wa_sflight-line_color    = 'C610'.
          ENDIF.
          MODIFY gi_sflight FROM g_wa_sflight.
        ENDLOOP.
    Name of the color field
    gs_layout-info_fname = 'LINE_COLOR'.
    Grid setup for first display
    CALL METHOD go_grid->set_table_for_first_display
          EXPORTING i_structure_name = 'SFLIGHT'
                                 is_layout                = gs_layout
          CHANGING  it_outtab                 = gi_sflight.
    Refresh grid display
    Use the grid method REFRESH_TABLE_DISPLAY
    Example:
    CALL METHOD go_grid->refresh_table_display.
    ALV Grid Control with column and row selection
    Selecting and Deselecting Rows
    Use
    Depending on where the ALV grid control is used, there are various methods for selecting and deselecting cells and rows:
    If no pushbuttons are displayed on the left edge of the list:
    You can only select one row at a time.
    You can select multiple rows.
    If pushbuttons are displayed on the left edge of the list:
    You can select several rows or individual cells.
    You can select several rows as well as several cells or individual cells.
    Procedure
    If no pushbuttons are displayed on the left edge of the list, you select a row by clicking an entry in the row.
    If pushbuttons are displayed on the left edge of the list, you select a row by clicking the pushbutton on the relevant row.
    In this case, you select the relevant cell by selecting the entry in the row.
    In both cases:
    To select several rows, press the Shift button and choose the cells as described above.
    Adjacent rows:
    Select a row, choose Shift or Control, and select the desired rows,
    or
    Choose Shift, and select the first and the last of the desired rows,
    or
    Select a row, keep the mouse button pressed, and pass over the desired rows.
    Rows that are not adjacent:
    Select a row, choose Control, and select the desired rows.
    All rows:
    You can only select all rows at once if pushbuttons are displayed on the left side of your list. To select all rows, choose .
    To deselect individual rows, press the Ctrl button and click the relevant row.
    Result
    The selected cells have an orange background. The position of your cursor is indicated with a yellow background.

  • Problem with ALV Grid (created via FM)

    Dear forumers,
    When double-clicking on any data row of an ALV grid, the following runtime error occurs:
    Runtime error: PERFORM_NOT_FOUND
    Exception: CX_SY_DYN_CALL_ILLEGAL_FORM
    Short Text
    =======
    Call (PERFORM) to a non-existent routine.
    What happened?
    ==========
    There exist various options:                                                     
    Error in the ABAP Application Program                                                                               
    The current ABAP program "SAPLSLVC_FULLSCREEN" had to be terminated
    because it has come across a statement that unfortunately cannot be executed.                   
    or                                                                               
    Error in the SAP kernel.                                                         
    The current ABAP "SAPLSLVC_FULLSCREEN" program had to be terminated because the  
    ABAP processor detected an internal system error.
    How can I resolve this error for an ALV grid? The ALV grid is created via the FM, 'REUSE_ALV_GRID_DISPLAY' and the field catalog is built via the FM, 'REUSE_ALV_FIELDCATALOG_MERGE'.
    Please help. Thanks so much.
    I also noticed in the Data Browser, SE16 - that if the table contents are displayed in an ALV Grid, double-clicking on any data row will not generate the same error. It also has an additional column on the leftmost to aid the data row selection. Any other ideas on this?
    Edited by: Deborah Tan on Jun 23, 2010 8:16 AM

    Hi Deborah,
    While calling 'REUSE_ALV_GRID_DISPLAY', You should have also passed the parameter I_CALLBACK_USER_COMMAND with any form name, or You have passed table IT_EVENTS with form name 'USER_COMMAND' with a form mentioned in it.
    If You do not require any user interaction on your ALV, comment the line where I_CALLBACK_USER_COMMAND is passed, or delete the line for 'USER_COMMAND' from the table that is passed in IT_EVENTS.
    Else, if You require user interaction, You need to code a form for user command in your program as FORM_USER_COMMAND USING  OK_CODE  SELFIELD.
    Remember the name of the form (for e.g. 'FORM_USER_COMMAND') should be the same that you pass in CALLBACKUSER_COMMAND or the one in 'USER_COMMAND' in table for IT_EVENTS.
    Regards,
    Birendra

  • How to validate the columns in dynamic alv grid

    Hi Friends,
    I want to validatethe value of all the columens (min 1 and max 40) which i create dynamically in alv grid.
    value must be between 0 and 1 only.
    Please help ,, need urgently.

    method handle_data_changed.
         data: ls_good type lvc_s_modi,
               li_diff type i,
               value type p DECIMALS 3,
               old_value type p DECIMALS 3,
               lw_outtab1 type gt_tab.
    clear value.
           loop at er_data_changed->mt_good_cells into ls_good.
           value = ls_good-value.
           old_value = ls_good-value.
            if value lt 0 or value gt 1.
               MESSAGE 'Value is out of range' TYPE 'I'.
              Read table gt_outtab1 into lw_outtab1 index ls_good-row_id .
               perform show_alv.
               clear ls_good.
            ENDIF.
          ENDCASE.
           ENDLOOP.
    I again created the table.. actually data is not changed in the internal table but still it shows the changed value in the alv grid. even in build the table again and call the refersh alv grid method..

  • Printing multiple screen objects (ALV+GFW) with only 1 print dialog pop-up?

    All,
    This is related to my previous post at:
    Re: How to print multiple ALV Grids with only one print dialog?
    but there is still one open question...
    My requirement is to create reports that will be called through portals; those reports are a combination of charts and the associated list output describing the data of each chart.
    In my first report (4 charts), I created a screen with 8 custom containers: 4 on the left hand side for the charts and 4 to the right for the list output.
    To create the charts I am using the Graphical Framework (GFW) and for the ALVs the new CL_SALV* classes.
    Everything works fine on the screen, but the users also want to print the report. I got them to the point where they will accept a separate printout (page) for every object (e.g. chart and ALV) of the report.
    I put a print button through the GUI status on the screen and trigger the associated print events in the program; this works fine as well, but the problem is that for every output (in this case 8) a print dialog appears and prompts the user for a printer selection. This the users won't accept and - quite frankly - I wouldn't either ;).
    Now, in my previous post someone pointed me to the use of the REUSE* function modules to append the ALVs and then print them together; this works and reduces the print dialog to only one for the ALVs.
    Even though this is an option, I am still kind of hesitant: why using all the great new OO stuff via the CL_SALV* classes to bring the ALVs on the screen, just to go back to the old approach for the printouts???
    Especially since I still can’t figure out how to combine the GFW objects in one print – or even better – how to suppress the dialog by passing the information behind the scenes either.
    As of now, I have 2 options:
    - 8 print dialogs (OO only)
    - 5 print dialogs (using the REUSE approach for the ALVs and triggering the chart prints individually)
    Does anyone see a way to bring it down to ONE?
    Thanks,
    Guenther
    Message was edited by: Guenther Schober
    Update: I found the solution for the ALVs!
    Even though I am using the
    "new-page print on parameters G_S_PRINT_PARAMETERS no dialog" statement, the dialogs still appeared; reason for this was that I also set:
    "L_O_PRINT->SET_PRINT_ONLY( IF_SALV_C_BOOL_SAP=>TRUE )" before I output the ALV table.
    After removing this, the ALVs are printing without pop-up!!!
    Unfortunately the GFWs still prompt for the printer selection

    Hi,
    Mine is also same requirement and i could not even generate multiple print dialogs.Can i have your code to compare with my code please.
    I am displaying container information on 200 screen PBO. I have added one custom print button to the grid tool bar(remaing container toolbar print buttons i have disabled). Once i click on custom print button a popup is coming and when i click on continue(one container informtion print is coming) and  it is coming to 100 screen(in this, i am calling selection screen as a subscree) and subsequent print dialog is not coming.
    Thanks & Regards
    Ramu

  • ALV GRID update internal table

    Hi all,
    I have an internal table display in a ALV GRID. Only one column is editable. When I change the field value, ALV GRID display the change, but when I click on refresh return the old value.
    I've checked in DEBUG mode and when I click on refresh (in the PAI module), the internal table haven't data modified.
    For example: the field qta have value 15. I change it in 18 and then press Refresh. In debug, the field qta still have the value 15.
    What I have to do?

    Hi
    The Example prg is using Classes, then you need to use the same approach in the way i mentioned below...
    You need to Update the ITAB with the Modifeid values.
    *       CLASS lcl_event_handler DEFINITION
    CLASS LCL_EVENT_HANDLER DEFINITION .
      PUBLIC SECTION .
        METHODS:
    **Handler to Check the Data Change
        HANDLE_DATA_CHANGED FOR EVENT DATA_CHANGED
                             OF CL_GUI_ALV_GRID
                             IMPORTING ER_DATA_CHANGED
                                       E_ONF4
                                       E_ONF4_BEFORE
                                       E_ONF4_AFTER.
    ENDCLASS.                    "lcl_event_handler
    DEFINITION
    **Handle Data Change
      METHOD HANDLE_DATA_CHANGED.
        DATA: X_CHANGE TYPE LVC_S_MODI,
              X_FINAL TYPE T_FINAL,
              X_OCRC TYPE ZSD_OC_HOLD,
              L_FLAG.
        LOOP AT ER_DATA_CHANGED->MT_GOOD_CELLS INTO X_CHANGE.
          IF X_CHANGE-FIELDNAME = 'ZZOCHOLDRC'.
            READ TABLE IT_FINAL INTO X_FINAL INDEX X_CHANGE-ROW_ID.
            IF SY-SUBRC = 0.
              READ TABLE IT_OCRC INTO X_OCRC WITH KEY
                                             ZZOCHOLDRC = X_CHANGE-VALUE
                                            TRANSPORTING ZZRCDESC.
              IF SY-SUBRC = 0.
                X_FINAL-ZZRCDESC = X_OCRC-ZZRCDESC.
                MODIFY IT_FINAL FROM X_FINAL INDEX X_CHANGE-ROW_ID
                                             TRANSPORTING ZZRCDESC.
                L_FLAG = 'X'.
              ENDIF.
            ENDIF.
          ENDIF.
          IF X_CHANGE-FIELDNAME = 'ZZPROMDT'.
            READ TABLE IT_FINAL INTO X_FINAL INDEX X_CHANGE-ROW_ID.
            IF SY-SUBRC = 0.
              X_FINAL-ZZPROMDT = X_CHANGE-VALUE.
              MODIFY IT_FINAL FROM X_FINAL INDEX X_CHANGE-ROW_ID
                                           TRANSPORTING ZZPROMDT.
              L_FLAG = 'X'.
            ENDIF.
          ENDIF.
        ENDLOOP.
        IF L_FLAG = 'X'.
          CLEAR V_DATA_CHANGE.
          V_DATA_CHANGE = 'X'.
        ENDIF.
      ENDMETHOD.                    "data_changed
    **you need to SET the HANDLER after the method first display.
      CREATE OBJECT G_HANDLER.
      SET HANDLER G_HANDLER->HANDLE_DATA_CHANGED FOR G_GRID.
    try this
    vijay

  • How I can update data in ALV GRID?

    Hi all,
    I have to update data in an ALV GRID and only one column is editable. I've exclude insert and delete row pushbutton, and I inserted a save pushbutton.
    What I have to write under the "save function" to update my internal table displayed in ALV GRID?
    Thanks advance
    Christian
    Message was edited by: Christian Marchiol

    REPORT  ZTESTDFALV1                             .
    *Data Declaration
    DATA: BEGIN OF T_EKKO,
      EBELN TYPE EKPO-EBELN,
      EBELP TYPE EKPO-EBELP,
    END OF T_EKKO.
    DATA: BEGIN OF IT_EKKO OCCURS 0.
            INCLUDE STRUCTURE T_EKKO.
    DATA: END OF IT_EKKO.
    DATA: BEGIN OF IT_BACKUP OCCURS 0.
            INCLUDE STRUCTURE T_EKKO.
    DATA: END OF IT_BACKUP.
    *ALV data declarations
    TYPE-POOLS: SLIS.                                 "ALV Declarations
    DATA: FIELDCATALOG TYPE SLIS_T_FIELDCAT_ALV WITH HEADER LINE,
          GD_LAYOUT    TYPE SLIS_LAYOUT_ALV,
          GD_REPID     LIKE SY-REPID.
    *Start-of-selection.
    START-OF-SELECTION.
      PERFORM DATA_RETRIEVAL.
      PERFORM BUILD_FIELDCATALOG.
      PERFORM BUILD_LAYOUT.
      IT_BACKUP[] = IT_EKKO[].
      PERFORM DISPLAY_ALV_REPORT.
    *&      Form  build_fieldcatalog
    *       text
    FORM BUILD_FIELDCATALOG.
      REFRESH FIELDCATALOG.
      CLEAR FIELDCATALOG.
      FIELDCATALOG-FIELDNAME   = 'EBELN'.
      FIELDCATALOG-SELTEXT_M   = 'Purchase Order'.
      FIELDCATALOG-INPUT     = 'X'.
      FIELDCATALOG-EDIT     = 'X'.
      FIELDCATALOG-COL_POS     = 2.
      APPEND FIELDCATALOG.
      CLEAR  FIELDCATALOG.
      FIELDCATALOG-FIELDNAME   = 'EBELP'.
      FIELDCATALOG-SELTEXT_M   = 'PO Item'.
      FIELDCATALOG-COL_POS     = 3.
      APPEND FIELDCATALOG.
      CLEAR  FIELDCATALOG.
    ENDFORM.                    " BUILD_FIELDCATALOG
    *&      Form  BUILD_LAYOUT
    *       Build layout for ALV grid report
    FORM BUILD_LAYOUT.
      "Permet d'ajuster les colonnes au text
    *  gd_layout-colwidth_optimize = 'X'.
      GD_LAYOUT-TOTALS_TEXT       = 'Totals'(201).
    *  gd_layout-box_fieldname = 'SELECT'.
    *  gd_layout-box_tabname   = 'IT_EKKO'.
    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_top_of_page   = 'TOP-OF-PAGE'
                I_CALLBACK_PF_STATUS_SET  = 'SET_PF_STATUS'
                I_CALLBACK_USER_COMMAND   = 'USER_COMMAND'
    *            i_grid_title             = 'My Title'
                IS_LAYOUT                 = GD_LAYOUT
                IT_FIELDCAT               = FIELDCATALOG[]
           TABLES
                T_OUTTAB                  = IT_EKKO
           EXCEPTIONS
                PROGRAM_ERROR             = 1
                OTHERS                    = 2.
      IF SY-SUBRC <> 0.
        WRITE:/ SY-SUBRC.
      ENDIF.
    ENDFORM.                    " DISPLAY_ALV_REPORT
    *&      Form  DATA_RETRIEVAL
    *       Retrieve data form EKPO table and populate itab it_ekko
    FORM DATA_RETRIEVAL.
      SELECT EBELN EBELP
       UP TO 10 ROWS
        FROM EKPO
        INTO CORRESPONDING FIELDS OF TABLE  IT_EKKO.
    ENDFORM.                    " DATA_RETRIEVAL
    *                      FORM SET_PF_STATUS                              *
    FORM SET_PF_STATUS USING RT_EXTAB   TYPE  SLIS_T_EXTAB.
      <b>SET PF-STATUS 'STANDARD_FULLSCREEN1' EXCLUDING RT_EXTAB.</b>
    ENDFORM.                    "set_pf_status
    *&      Form  user_command
    *       text
    *      -->R_UCOMM    text
    *      -->RS_SELFIELDtext
    FORM USER_COMMAND  USING R_UCOMM LIKE SY-UCOMM
                             RS_SELFIELD TYPE SLIS_SELFIELD.
    <b> DATA: GD_REPID LIKE SY-REPID, "Exists
      REF_GRID TYPE REF TO CL_GUI_ALV_GRID. "new
    </b>
    *then insert the following code in your USER_COMMAND routine...
      <b>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.</b>
      CASE R_UCOMM.
        WHEN '&IC1'.
          CHECK RS_SELFIELD-TABINDEX > 0.
          IF RS_SELFIELD-VALUE EQ '6000000001'.
            CALL TRANSACTION 'ZDF2'.
          ENDIF.
        WHEN 'REFRESH'.
          READ TABLE IT_EKKO INDEX  RS_SELFIELD-TABINDEX.
          IF SY-SUBRC = 0.
            READ TABLE IT_BACKUP INDEX RS_SELFIELD-TABINDEX.
            IF SY-SUBRC = 0.
              IF IT_EKKO <> IT_BACKUP.
    *  then do your check
              ENDIF.
            ENDIF.
          ENDIF.
          PERFORM DATA_RETRIEVAL.
          RS_SELFIELD-REFRESH = 'X'.
      when 'SAVE'.
    ***do your save**
      ENDCASE.
    ENDFORM.                    "user_command
    concentrate on Bold....
    regards
    vijay

  • Save operations in ALV Grid

    Halo experts ,
    I have an CL_GUI_ALV grid with editable fiedls which I call in the subscreen. The user can generate new detail ids from the grid by saving lines in the application .
    When next time the grid is displayed the grid should come back with the generated ID from the database .So that if there is a modifcation operation, it will not be treated as an insert operation
    For that I am freeing all the gird container and  alv grid values after SAVE operation in PAI like
    case ok_code.
    when 'SAVE'.
    l_gui->save( ).
          FREE: g_cont_1927.
          FREE g_gui_tab_1927.
    When the screen is being shown again in the PBO of the subscreen its taking up the generated id from the database .
    the PBO of the subscreen is like
      IF g_cont_1927 IS INITIAL.
        CREATE OBJECT g_cont_1927
          EXPORTING
            container_name = 'G_CONT_1927'.
      ENDIF.
      IF g_gui_tab_1927 IS INITIAL.
           lt_records = g_gui_tab_1927->get_records_from_database( )
            g_gui_tab_1927->first_display(  lt_reocrds )."" Which calls alv_grids set_table_for_first_display_method using lt_records
      ELSE.
       g_gui_tab_1927->refresh_display( )." Whihc calls alv_grids refresh_table_display method
      ENDIF.
    Now when i do again a modification operation by selecting the grid line id field is empty . it is coming up as insert operation again in the database.

    Halo Naimesh,
    l_gui is a global class reference type . it is having attribute my_grid type ref to cl_gui_alv_grid. Inside save I am calliong my_grid->check_changed_data( ).
    But that is not the problem here
    When the screen is shown second time after save  with set_table_for_first_display method
    f it is having the new generated ids from the database( in debugger ) .
    But when i do some modification operations( ie again triigerr PAI ) the display_records seems to be the old one again( not with genereated ids ) strange
    I tried using cl_gui_cfw=>set_new_ok_code , cl_gui_cfw=>flush everyhting in on_data_changed and on_user_commnad event handlers but no avail
    When i go back to another screen and come again it is getting the new ids

  • ALV Grid update

    Hi All,
    I have a requirement.
    In the ALV grid, I have to select a row. When I click the change ICON, the data in the rows should be populated in the customized screen.
    I had already done this part.
    Now I had changed the values in the customized screen. When I click the 'SAVE' button in the customized screen, the data in the screen should be passed to the GRID.
    Here, I had updated the table which is used in the GRID. But, how to refresh the GRID, so that I can see the changed values in the GRID.
    I had used refresh_table_display method.. But it prompts me an error.. and the program is exited.
    If anyone had done this.. kindly send me the code.... or help me out how to proceed.
    Thanks in advance.
    Jaffer Ali.S

    From what you say, since you are using an Information Message, irrespective of whether the user wants it or not, the ALV Grid has to be updated with the calculations that you do. He cannot choose to cancel the operation. Am I correct?
    If yes, then all you need to do is to update the ALV output table with the calculations that you have done and call the method refresh_table_display.
    see this example program
    believe that the after the info message you are updating the ALV grid value. Then try these out,
    to update the ALV grid,
    call method addressbook_grid->set_ready_for_input
    exporting
    i_ready_for_input = 1. " Sets to edit mode
    data : w_intab1 like table of zc1address with header line .
    Here update is performed using a work area
    you can also specify the partcular column and update it.
    update zc1address from table t_intab1.
    if sy-subrc = 0.
    message i000. " success message
    else.
    message i001. " unsuccess message
    endif.
    refreshing the grid to display the modified values
    call method addressbook_grid->refresh_table_display.
    sets ALV grid to display mode.
    call method addressbook_grid->set_ready_for_input
    exporting
    i_ready_for_input = 0.

  • How to display a field that has more than 136 char length in ALV GRID

    Hi Experts,
    I have an issue and need to solve ASAP.
    I want to display a text of length 400 character in a particular column in ALV GRID DISPLAY. After executing the report it is displaying only 136 length char in the output and when I download the report to an excel it is showing only 255 characters, but my field length is almost 400 char and want to display in the report output.
    I checked in SDN and didnt get any answers which will solve this.
    Please help me to complete this issue.
    Thanks
    Retheesh

    Currently I'm in a same problem with you.
    And this is what I found
    Size of data fields: While the list-based ALVList can display only tables of up to 90 columns, the control-based *ALVGrid and ALVFullscreen have a limitation of 128 characters per data cell.*
    So it means that maximum for alv grid is only 128.
    Please refer to this documentation
    [https://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/4544e790-0201-0010-c29c-e46c389f5a96]
    you can find the statement above in page 5.
    Please let me know if you have another solution, because I would like to see it too.
    Thanks
    Regards
    Hadi

  • ALV Grid with out data in editable mode

    Hi,
    I need an ALV Grid , which only contains empty cells. User should be able to enter data in the cells later.
    Thanks
    Satya

    REPORT sapmz_hf_alv_grid .
       TABLES: zsflight.
    G L O B A L   I N T E R N  A L   T A B L E S
       DATA: gi_sflight TYPE STANDARD TABLE OF sflight.
    G L O B A L   D A T A
       DATA: ok_code LIKE sy-ucomm,
             g_wa_sflight LIKE sflight.
    Declare reference variables to the ALV grid and the container
       DATA:
         go_grid             TYPE REF TO cl_gui_alv_grid,
         go_custom_container TYPE REF TO cl_gui_custom_container.
    S T A R T - O F - S E L E C T I O N.
       START-OF-SELECTION.
         SET SCREEN '100'.
       *&      Module  USER_COMMAND_0100  INPUT
       MODULE user_command_0100 INPUT.
         CASE ok_code.
           WHEN 'EXIT'.
             LEAVE TO SCREEN 0.
         ENDCASE.
       ENDMODULE.                 " USER_COMMAND_0100  INPUT
       *&      Module  STATUS_0100  OUTPUT
       MODULE status_0100 OUTPUT.
    Create objects
         IF go_custom_container IS INITIAL.
           CREATE OBJECT go_custom_container
             EXPORTING container_name = 'ALV_CONTAINER'.
           CREATE OBJECT go_grid
             EXPORTING
               i_parent = go_custom_container.
           PERFORM load_data_into_grid.
         ENDIF.
       ENDMODULE.                 " STATUS_0100  OUTPUT
       *&      Form  load_data_into_grid
       FORM load_data_into_grid.
    Read data from table SFLIGHT
         SELECT *
           FROM zsflight
           INTO TABLE gi_sflight.
    Load data into the grid and display them
         CALL METHOD go_grid->set_table_for_first_display
           EXPORTING i_structure_name = 'SFLIGHT'
           CHANGING  it_outtab        = gi_sflight.
       ENDFORM.                    " load_data_into_grid

  • How to make alv grid cell as image cell

    Dear All,
                  I want to create one alv report in abap.  Acutually i  need a output in report like machine number , machine name, model,
    finally i want to display the images in the last colum( cell )  corresponding to the machines for each row.  Machine no,name,model ..etc.. i fetched from the custom table. I maintaned the  machines images in se78.  Can any one help for this requirment..
    Thanks and Regards,
      Kavin

    in my opinion you will not be able to do that in a ALV grid
    the only way to do it is to build a HTML content and to display it into HTML viewer
    then the images should be loaded as mime objects (SMW0) and not as text elements (SE78)

Maybe you are looking for

  • Error in Stock transfer between plants.

    Here user is transfering materials from one plant to another against a sales order.  However, the system is issuing error messages like this: "1.  Sales Order (SOBKZ = ) is not provided for this goods movement. 1.  Account xxxxx (Inventory change a/c

  • Rate (% Excise Duty) in picking wrong...

    Hi, I have a report of Gross Margin (FI).... My problem is that when i m picking the % Excise Duty from J_1IEXCTAX table against the Chapter ID....it is showing the 4 values against it...means 4 time % Excise Duty....i.e. periodic changed... like....

  • Adding a second controller

    I have one 50 license wlan controller and have maxed out it licenses. I want to add a second controller and convert the remaining APs I have to lightweight. How do I setup the second controller will all the same SSIDS, WLANs, etc? Is there an automat

  • Question about MapListener behavior

    can any body tell me about MapListener behavior when it in distributed cache model and in replicated cache model. when i type some code implement MapListener interface to change another NamedCache(named 'log') element, but MapListener.entryUpdated ru

  • Error in running LV2013 example for 6023

    Hi all,    I have PCI6023E card installed in the system where LV2013 was installed also. I am running the example by "Find Example" to test "Counter Continuous Output.vi", the description of the example said that it supports PCI6023E but when I run i