Unable to display Refreshed editable alv

hi
I have developed editable alv which contains 7 colums. the final column is the addition of 4th n 5th cplumn. when i refresh after changing the values, the final column is not changing. but while debugging the changed values are reflected in internal table but its reflected in alv.
help me out

in the user_comand form you have to put rs_selfield-refresh = 'X'.
like this:
*& Form user_comand
FORM user_command USING r_ucomm LIKE sy-ucomm
rs_selfield TYPE slis_selfield.
rs_selfield-refresh = 'X'.

Similar Messages

  • Supress error log display in editable ALV

    Hi,
    I am using an editable ALV to get input. Some of the fields in the grid are assigned a check table. So when a entry which does not exist in the check table is made for these fields ALV by default displays a error log.
    Is there any way to supress the display of this error log and collect the errors in this log to some internal table? I want to do this because apart from the standard validations done by the ALV i am performing some validations in the program and displaying a log. So i want to capture the error log of the ALV and display them in my log so that 2 error logs wont be displayed.
    Thanks in advance,
    Tongston Immanuel.

    I'm building a kind of feature, where you can go different ways in a tree, based on a condition. The values for this condition are entered in an ALV-grid, which is a table with fields of type C(30). However to have a F4 help, I fill in ref_field and ref_table in the fieldcatalog. Most of the time, this works fine, but for fields of type NUMC, even if no F4 help is available, this doesn't work since internally it wants to convert this NUMC field to my CHAR field and it fails.
    I refreshed my log table in the DATA_CHANGED event. Thanks for your suggestion!

  • Display in editable alv grid.

    Hi,
    This is my source code of uploading excel into sap and displaying the list.Please give the code for displaying the excel  data in editable alv.
    <<The code came from [here|https://wiki.sdn.sap.com/wiki/display/Snippets/ABAP-UploaddatafromExceltoSapusing+OO]>>
    Thanks in advance.
    am just a beginner in learning abap objects.pls help.
    Edited by: Matt on Aug 6, 2009 4:26 PM

    It wasn't your source code, was it?
    Please take the time to read the rules of engagement.  As it stands, your question is far too general.  There are examples of editable alvs in many location on the net.  You must search for them.  Please note these are not training forums, they are expert forums.  When you have a specific question, we'll be glad to assist.
    Post locked
    matt

  • Displaying Refresh, Edit Page, Customize Page buttons from Banner Template

    I have built a customized banner template which displays button images for refresh, edit page, and customize page. The functions all work well, but these functions should not be invisible to the user when they do not have the proper privileges
    For Example, when page caching is enabled, I need to see the Refresh Link (icon), or when the user cannot edit the page, then the icon for page editing should not be displayed.
    What are the API calls that I can make from a banner template to decide if the page is cached or not?
    How do I tell whether the user had edit page privilege? Customize Page?
    null

    All these solutions offered above are correct related to the refresh of the page, but it seems to be other problem, it seems that when the Save button is pressed, the commit is done(after I press Save I checked the database and the row is updated), but the transaction is not ended, it seems to get stuck, this is the reason why a refresh is not done on the page, only when Cancel is pressed, the transaction finishes and the page refreshes.
    Is this possible for the inline popup, not to end the transaction even if on the task flow I have a task flow return for Save, where at the End Transaction property I have Commit?
    I have changed the task flow by setting Behaviour to <No Controler Transaction>, for the task flow returns I changed End Transaction from Commit/Rollback to none and added on the jspx page of the inline popup the Save and Cancel buttons, with actionListener="#{bindings.Commit/Rollback.execute}" but the problem remains the same.
    I suppose that it's a problem with the way I use the VO instance in the popup. Do you have any idea in what situations this can happen or did you encounter similar situations?
    Thanks,
    Georgiana

  • ALV Refresh Editable ALV

    Hi Friends,
    I am having one editable ALV. I have one quanity field in which i want to change the values.
    I am using FM REUSE_ALV_GRID_DISPLAY.
    When i change the values, the changed values in the ALV are not getting reflected in the internal table and the ALV.
    Any body having idea how to reflect the changed values in ALV and in internal table.
    Many thanks in advance.
    Regards,
    Tarun

    Hi Check this code.
    use the user_command form code from below code and check now.
    REPORT ZTEST_ALV_CHECK MESSAGE-ID ZZ .
    TYPE-POOLS: SLIS.
    DATA: X_FIELDCAT TYPE SLIS_FIELDCAT_ALV,
    IT_FIELDCAT TYPE SLIS_T_FIELDCAT_ALV,
    L_LAYOUT TYPE SLIS_LAYOUT_ALV,
    X_EVENTS TYPE SLIS_ALV_EVENT,
    IT_EVENTS TYPE SLIS_T_EVENT.
    DATA: BEGIN OF ITAB OCCURS 0,
    VBELN LIKE VBAK-VBELN,
    POSNR LIKE VBAP-POSNR,
    CHK(1),
    color(4),
    END OF ITAB.
    SELECT VBELN
    POSNR
    FROM VBAP
    UP TO 20 ROWS
    INTO TABLE ITAB.
    X_FIELDCAT-FIELDNAME = 'CHK'.
    X_FIELDCAT-TABNAME = 'ITAB'.
    X_FIELDCAT-COL_POS = 1.
    X_FIELDCAT-INPUT = 'X'.
    X_FIELDCAT-EDIT = 'X'.
    X_FIELDCAT-CHECKBOX = 'X'.
    APPEND X_FIELDCAT TO IT_FIELDCAT.
    CLEAR X_FIELDCAT.
    X_FIELDCAT-FIELDNAME = 'VBELN'.
    X_FIELDCAT-SELTEXT_L = 'VBELN'.
    X_FIELDCAT-HOTSPOT = 'X'.
    X_FIELDCAT-TABNAME = 'ITAB'.
    X_FIELDCAT-COL_POS = 2.
    APPEND X_FIELDCAT TO IT_FIELDCAT.
    CLEAR X_FIELDCAT.
    X_FIELDCAT-FIELDNAME = 'POSNR'.
    X_FIELDCAT-SELTEXT_L = 'POSNR'.
    X_FIELDCAT-TABNAME = 'ITAB'.
    X_FIELDCAT-COL_POS = 3.
    APPEND X_FIELDCAT TO IT_FIELDCAT.
    CLEAR X_FIELDCAT.
    L_LAYOUT-info_fieldname = 'COLOR'.
    *L_LAYOUT-ZEBRA = 'X'.
    CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
    EXPORTING
    I_CALLBACK_PROGRAM = SY-REPID
    IS_LAYOUT = L_LAYOUT
    I_CALLBACK_PF_STATUS_SET = 'STATUS'
    I_CALLBACK_USER_COMMAND = 'USER_COMMAND'
    IT_FIELDCAT = IT_FIELDCAT
    TABLES
    T_OUTTAB = ITAB
    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 STATUS
    text
    -->P_EXTAB text
    FORM STATUS USING P_EXTAB TYPE SLIS_T_EXTAB.
    Pf status
    SET PF-STATUS 'STATUS'.
    ENDFORM. " STATUS
    *& Form USER_COMMAND
    text
    -->R_UCOMM text
    -->RS_SELFIELD text
    FORM USER_COMMAND USING R_UCOMM LIKE SY-UCOMM
    RS_SELFIELD TYPE SLIS_SELFIELD.
    DATA: GD_REPID LIKE SY-REPID, "Exists
    REF_GRID TYPE REF TO CL_GUI_ALV_GRID.
    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.
    loop at itab where chk = 'X'.
    itab-color = 'C300'.
    modify itab index sy-tabix transporting color.
    endloop.
    RS_SELFIELD-refresh = 'X'.
    break-point.
    ENDFORM. "USER_COMMAND

  • Like SM30 ,table should be display in editable ALV Grid(for Dynamic DB )

    Hi Friends,
    plese help me how to display  ALV grid in editable mode for differnt types of data base tables.
    same as like SM30 transaction.
    Moderator message: please search for available information/documentation/previous discussions before asking.
    Edited by: Thomas Zloch on Nov 11, 2010 6:40 PM

    Hi,
    In SLIS_T_FIELDCAT_ALV you specify the field as edit = X.
    Give it as mentioned, where you assign fieldname and positions etc.
    Thanks&Regards

  • Refresh Editable ALV Grid inside a custom Container

    Hello all,
    I am having a screen with custom container in which i am populating datas and a entry screen which is going to have my
    filtering condition for this custom container screen..
    The problem i am facing is whenever i come out of the custom container screen after displaying and again give the
    necessary filtering data in the previous screen...
    the custom container screen displays wrong values...
    But when i refresh the data with the refresh icon in the container right datas are coming...
    I even used CALL METHOD C_ALVGD->REFRESH_TABLE_DISPLAY
    EXPORTING
    IS_STABLE = STABLE
    EXCEPTIONS
    FINISHED = 1
    OTHERS = 2. after displaying the values using
    CALL METHOD C_ALVGD->SET_TABLE_FOR_FIRST_DISPLAY
    EXPORTING
    IT_TOOLBAR_EXCLUDING = T_FUNC
    IS_LAYOUT = IT_LAYOUT
    I_SAVE = 'A'
    CHANGING
    IT_OUTTAB = IT_ZCAWNT_V
    IT_FIELDCATALOG = IT_FCAT
    EXCEPTIONS
    INVALID_PARAMETER_COMBINATION = 1
    PROGRAM_ERROR = 2
    TOO_MANY_LINES = 3
    OTHERS = 4.
    IF SY-SUBRC 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
    WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    ENDIF.
    I have refreshed my internal table once when i display and again fetched from the DB according to the filtering conditions given
    in the first screen.
    I have tried clearing the Object created once when i display and again recreated it.But could not get the output.
    solution would be really helpful...

    Hey all,
    Thanks a lot for helping me...
    The problem is solved....
    i just used,
            CALL METHOD C_ALVGD->FREE. 'Grid inside the container
            CLEAR C_ALVGD.
            CALL METHOD C_CCONT->FREE. "Container
            CLEAR C_CCONT.
    when i click BACK Button from screen 2 to screen1.

  • Unable to display or Edit shopping cart?

    Hi,
    We are in process upgrade stage from SRM 5.0 to SRM 7.0.
    When we select the shopping cart and click on DISPLAY or EDITin portal nothing is happened.
    From HTTP watch , we found that ..it is going to the URL and it is stucked.
    When we try to access the URL directly , we are getting below error.
    Error when processing your request
    What has happened?
    The URL http:// ........./sap/bc/webdynpro/sap/powl was not called due to an error.
    Note
    The following error text was processed in the system RST : An exception occurred that was not caught.
    The error occurred on the application server fsp55a02_RST_00 and in the work process 0 .
    The termination type was: RABAX_STATE
    The ABAP call stack was:
    Method: INITIALIZE of program CL_POWL_MODEL=================CP
    Method: HANDLEDEFAULT of program /1BCWDY/J9ZTOJ20D6QLEKKWJHSF==CP
    Method: HANDLEDEFAULT of program /1BCWDY/J9ZTOJ20D6QLEKKWJHSF==CP
    Method: IF_WDR_VIEW_DELEGATE~WD_INVOKE_EVENT_HANDLER of program /1BCWDY/J9ZTOJ20D6QLEKKWJHSF==CP
    Method: INVOKE_EVENTHANDLER of program CL_WDR_DELEGATING_IF_VIEW=====CP
    Method: DISPLAY_TOPLEVEL_COMPONENT of program CL_WDR_CLIENT_COMPONENT=======CP
    Method: INIT of program CL_WDR_CLIENT_APPLICATION=====CP
    Method: IF_WDR_RUNTIME~CREATE of program CL_WDR_MAIN_TASK==============CP
    Method: HANDLE_REQUEST of program CL_WDR_CLIENT_ABSTRACT_HTTP===CP
    Method: IF_HTTP_EXTENSION~HANDLE_REQUEST of program CL_WDR_MAIN_TASK==============CP
    Could any one please let me know the issue.
    Regards
    Prashanth P

    Dear Poster,
    As no response has been provided to the thread in some time I must assume the issue is resolved, if the question is still valid please create a new thread rephrasing the query and providing as much data as possible to promote response from the community.
    Best Regards,
    SDN SRM Moderation Team

  • Update the Billing orders after display/ modifiy in the Editable ALV

    Hi Experts,
    I have created one Editable ALV to display theBilling order with BP details,
    Once user get the ALV output he can modify the content and same will be updated once he hits UPDATE button.
    my requirement is after user hits the UPDATE button a background should be created and update of BO should happen also user user should able to see the status by checking the SPOOL.
    currently i am using the FM crm_order_maintain to update, kindly guide me how to process this step in background for all the entries which are selected in ALV by user.
    i think i can use SUBMIT with JOB_OPEN and JOB_CLOSE, but i need some same code & guidance.
    Thanks in Advance.
    Regards,
    Pradeep

    problem solved

  • Editable alv: add custom validation and display "errors" in protocol list

    Hi,
    What I want to do:
    PAI validation of editable alv with displaying error's in the protocol list by adding custom entries to the existing protocol object.
    What is my problem:
    After registering "data_changed event", the protocol list don't appear.
    My understanding is, that the object "er_data_changed" is passed by the event "data_changed"
    an so I thought I can add some more entries to the protocol list.
    After "de-registering" the "data_changed" event, the protocol appears with the standard errros messages (e.g. "input to numeric" by enter charachters)
    One more hint:
    By creating a new object "er_data_changed" in the handler method the protocol list works, but I would like to append entries to the object that was passed with the event.
    Probably I've misunderstand something, please help !
    My coding:
    PAI:
    trigger event "data_changed" -> calls handler method
      CALL METHOD r_myalv->check_changed_data
        IMPORTING
          e_valid = is_valid.
    stop processing
      IF is_valid NE 'X'.
        MESSAGE 'invalid input' TYPE 'E' .
      ENDIF.
    handler method:
    handle_data_changed FOR EVENT data_changed  OF cl_gui_alv_grid  IMPORTING e_ucomm
                                                                                    er_data_changed.
    METHOD handle_data_changed.
        data: ls_mod_cell type lvc_s_modi.
         CALL METHOD er_data_changed->add_protocol_entry
                    EXPORTING
                           i_msgid     = 'SU'
                           i_msgty     = 'E'
                           i_msgno     = '000'
                           i_msgv1     = 'This is a test !'
                           i_fieldname = ls_mod_cell-fieldname.
         er_data_changed->refresh_protocol( ).
         er_data_changed->DISPLAY_PROTOCOL( ).
    ENDMETHOD.                    "handle_data_changed

    Dear Olaf,
        If understood correctly, you want to Edit an ALV and do some data validations when some data is changed in an ALV.   To do this follow the following steps:
    1.   Before displaying ALV, Register the edit event.
    * Set cell modified to trigger data_changed
    CALL METHOD go_alv_grid->register_edit_event
    EXPORTING
    i_event_id = cl_gui_alv_grid=>mc_evt_modified.
    2.  Register the event DATA_CHANGED of class CL_GUI_ALV_GRID & handle the event.
    SET HANDLER lo_event_receiver->handle_data_changed FOR go_alv_grid.
    The event DATA_CHANGED of class CL_GUI_ALV_GRID has a parameter ER_DATA_CHANGED which is of type CL_ALV_CHANGED_DATA_PROTOCOL.
    This er_data_changed has internal table MT_MOD_CELLS(contains index of records changed ) & MP_MOD_ROWS(contains the changed row), using these update your internal table accordingly.
    DATA : wa_mod_cell TYPE lvc_s_modi.
    FIELD-SYMBOLS: <fs> TYPE table.
    LOOP AT er_data_changed->mt_mod_cells INTO wa_mod_cell.
    ASSIGN er_data_changed->mp_mod_rows->* TO <fs>.
    READ TABLE <fs> INTO wa_output INDEX wa_mod_cell-tabix.
    MODIFY lt_output FROM wa_output INDEX wa_mod_cell-row_id.
    ENDLOOP.
    3.   Here it self you can do the required data validations(No need of any PAI modules) as below.
    IF wa_orders-zfstfirmtyp = c_9.
    MESSAGE s288(zcsp).
    DELETE er_data_changed->mt_mod_cells.
    EXIT.
    ENDIF.
    Regards
    Kesava

  • How to display the editable fields in output of an ALV report?

    Hi all,
    I have a requirement of displaying values in ALV Grid format and above this grid display i have to put some fields , that are editable.
    I know making ALV grid fields as editable, but here requirement is to display some fields before displaying the ALV grid dispaly and to enable these fields editable to user and when printing this the values entered by user also has tobe printed.
    Please help me on solving this problem? Is it possible to do this with ALV function modules?
    Thanks,
    Vamshi.

    Hi all,
    Thanks for your replies.
    But this is not  my requirement. I mentioned in my question that i too know how to edit the fields in ALV grid report.
    Here my requirement is .
                                             name :_____________
                                             amount:____________
    alv grid display
    Like above i need to display.  after name the user can be enter value and after amount also the user can be enter some value at output . But this is not the header of ALV .
    Is this possible in classical ALV or Classical report? If not please specify alternative?
    Thanks,
    Vamshi.

  • Editable ALV refreshing problem

    Hello,
    I have an editable ALV and i modify my db table with this alv.
    when i run the report and see the alv, i can make changes and modify the db  table.
    But after first change, alv doesnt see the othe changes, I change editable fields and save but when i debug i see no change at my internal table.
    i refresh the internal table but after first change and save,  this code doesnt work :
    CALL METHOD go_grid2->check_changed_data.
    Is there a trick that i dont know?

    the code which i give above is for refresh, for data change  try this declaration
        SET HANDLER event_receiver->handle_data_changed FOR g_grid.
        CALL METHOD g_grid->register_edit_event
          EXPORTING
            i_event_id = cl_gui_alv_grid=>mc_evt_modified.
    when you clicked SAVE button first you must call this method : CALL METHOD g_grid->check_changed_data .

  • Regarding editable alv

    Hi all,
              Frnds i am working in editable alv using function modules not object oriented abap.
    i m trying to edit a Field(MATNR ) in my output list and finally update it with changed values in the DB table.
    But i m getting syntax error like
    "the work area i_final is not alligned properly
    below i m providing my code.
    <code>
    *& Report  ZEDITABLE_ALV1
    REPORT  ZEDITABLE_ALV1.
    TABLES: vbak,vbap.
    TYPE-POOLS: slis. "ALV Declarations
    data: BEGIN OF i_final occurs 0,
          vbeln like vbap-vbeln,
          posnr like vbap-posnr,
          matnr like vbap-matnr,
          erdat like vbap-erdat,
    END OF i_final.
    DATA : C_X(1) TYPE C VALUE 'X',
           C_FC_MODIFY(6) TYPE C VALUE 'MODIFY'.
    *DATA: i_final TYPE STANDARD TABLE OF T_FINAL with header line.
         i_temp type standard table of T_FINAL with header line.
    *wa_final like line of i_final.
    *DATA:i_final LIKE vbap OCCURS 0.
    *DATA:wa_final LIKE vbap.
    *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.
    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 = 'VBELN'.
    fieldcatalog-seltext_m = 'sales order'.
    fieldcatalog-col_pos = 0.
    APPEND fieldcatalog TO fieldcatalog.
    CLEAR fieldcatalog.
    fieldcatalog-fieldname = 'ERDAT'.
    fieldcatalog-seltext_m = 'date'.
    fieldcatalog-col_pos = 1.
    APPEND fieldcatalog TO fieldcatalog.
    CLEAR fieldcatalog.
    fieldcatalog-fieldname = 'MATNR'.
    fieldcatalog-seltext_m = 'material no.'.
    fieldcatalog-col_pos = 2.
    fieldcatalog-edit = 'X'.
    APPEND fieldcatalog TO fieldcatalog.
    CLEAR fieldcatalog.
    fieldcatalog-fieldname = 'POSNR'.
    fieldcatalog-seltext_m = 'line item no.'.
    fieldcatalog-col_pos = 3.
    APPEND fieldcatalog TO fieldcatalog.
    CLEAR fieldcatalog.
    fieldcatalog-FIELDNAME = 'REC_SEL'.
    fieldcatalog-NO_OUT = C_X.
    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-totals_only = 'X'.
         gd_layout-f2code = 'DISP'. "Sets fcode for when double
         "click(press f2)
         gd_layout-zebra = 'X'.
         gd_layout-group_change_edit = 'X'.
         gd_layout-header_text = 'helllllo'.
    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_user_command = 'USER_COMMAND'
    i_callback_pf_status_set = 'GUI_STAT'
    *i_grid_title = outtext
    is_layout = gd_layout
    it_fieldcat = fieldcatalog[]
    *it_special_groups = gd_tabgroup
    *it_events = it_events
    i_save = 'X'
    *is_variant = z_template
    TABLES
    t_outtab = i_final
    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_ALV_REPORT
    **& Form DATA_RETRIEVAL
    *•     Retrieve data form EKPO table and populate itab it_ekko
    FORM data_retrieval.
    *SELECT avbeln aerdat bmatnr bposnr FROM vbak AS a
    *INNER JOIN vbap AS b ON avbeln = bvbeln
    *INTO TABLE i_final WHERE a~vbeln = b~vbeln.
    select VBELN ERDAT MATNR POSNR up to 10 rows from vbap into corresponding fields of  table i_final.
    ENDFORM. " DATA_RETRIEVAL
    *•     FORM GUI_STAT *
    *•     --> RT_EXTAB *
    FORM gui_stat USING rt_extab TYPE slis_t_extab.
    SET PF-STATUS 'MODIFY' EXCLUDING rt_extab.
    ENDFORM.
    *•     FORM USER_COMMAND *
    *•     --> U_COMM *
    *•     --> RS_SELFIELD *
    FORM user_command USING u_comm LIKE sy-ucomm
    rs_selfield TYPE slis_selfield.
    DATA:selfield TYPE slis_selfield.
    *RS_SELFIELD-REFRESH = C_X.
    CASE u_comm.
    *IF U_COMM = C_FC_MODIFY.
    WHEN 'UPDATE'.
    LOOP AT i_final. " into wa_final."into wa_final.
    *READ TABLE I_TEMP WITH KEY VBELN = I_FINAL-VBELN.
    *IF SY-SUBRC = 0.
    i_final-matnr = vbap-matnr.
    *MODIFY I_final INDEX SY-TABIX.
    *ENDIF.
    ENDLOOP.
    *ENDIF.
    MODIFY VBAP FROM TABLE i_final.
    IF SY-SUBRC = 0.
    COMMIT WORK AND WAIT.
    *MESSAGE I000 WITH SY-DBCNT
    *' Record(s) has been Updated'(020).
    ENDIF.
    *append i_final.
    *it_temp = i_final.
    *append it_temp.
    **UPDATE sflight FROM TABLE sflight_tab.
    *ENDLOOP.
    *update vbap from table i_final.
    *IF sy-subrc = 0.
    *MESSAGE s000(0) WITH 'records updated successfully'.
    *ENDIF.
    ENDCASE.
    ENDFORM.
    </code>
    Frnds plz help me in this regard.
    Thanks,
    satya

    Try something like this...ur code was not clear..i have done something u can understand.
    First check that u r not trying to update the primary key field.
    first before updating.
    Before updating select the record u r going to update from the main table.
    select single * from VBAP where <pass the key values>.
    if sy-subrc = 0.
    move the rest of the values to the table header except the key values.
    vbap-<field1> = value1.
    vbap-<field2> = value2.
    after moving the values.
    update <table>.
    if sy-subrc = 0.
    commit work.
    endif.
    data:st_vbap type vbap.
    WHEN 'UPDATE'.
    LOOP AT i_final. " into wa_final."into wa_final.
    select single * from vbap where vbeln = I_FINAL-VBELN.
    move-corresponding i_final to vbap.
    update vbap.
    if sy-subrc = 0.
    commit work.
    wk_cnt = wk_cnt + 1.
    endif.
    at last.
    *MESSAGE I000 WITH SY-DBCNT
    *' Record(s) has been Updated'(020).
    endat.
    endloop

  • Problem While Saving the editable ALV GRID

    Dear Experts,
    I have a scenario in which i am display the ALV(using class) with some data in the custom container of module pool screen in the non-editable mode.Also i have save and edit buttons.If i click the edit button i have written the code to edit the some columns in the ALV grid, it is working fine.After editing it,when i click the save button then ALV has to refreshed with edited data and then it should go to non editable mode but it is not working.I have written the code for changing the editable ALv to non editable mode as follows :
      call method c_alvgd->set_ready_for_input
        exporting
          i_ready_for_input = 0.
    *****Row and column of the alv are refreshed after changing values
      stable-row = 'X'.
      stable-col = 'X'.
    *REfreshed ALV display with the changed values
    *This ALV is non editable and contains new values
      call method c_alvgd->refresh_table_display
        exporting
          is_stable = stable
        exceptions
          finished  = 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.
    Could you Suggest me solution for this issue ?
    Thanks & Regards,
    R.Dhineshraj.

    Dhinesh,
    I suppose that you are able to get your changes values on screen but not able to get your field in DISPLAY mode from editable mode, let me know if this is not your problem.
    When you press SAVE, after the PAI, again PBO will run and hence the editable code for that field will overwrite which will keep it editable.
    So, do something like this.
    data: gv_edit value 'X'.....  "global variable in TOP include
    PBO....
    loop at ...
    if gv_edit = 'X'.
    CALL METHOD lo_alv->set_ready_for_input
      EXPORTING
        i_ready_for_input = 1.
    else.
    CALL METHOD lo_alv->set_ready_for_input
      EXPORTING
        i_ready_for_input = 0.
    endif.
    endloop.
    PAI.
    when 'SAVE'.
    gv_edit =  space.
    When 'EDIT'.
    gv_edit = 'X'.
    Regards,
    Diwakar

  • Get data in editable ALV back to internal table without data_changed ev?

    Hi,
       I have an editable ALV using classes to whch I have users the option to edit directly on the screen or upload data from an excel. The event data_changed gets triggered when users edit the table on the screen.
    However when EXCEL is uploaded, I refresh the table display. So, I need a way to get the data from the ALV into a internal table to check which rows were update using the excel and save them into the db table.
    Prakash

    Hi!
    For more information, inspect programs suiting the mask "BCALVEDIT*" and the thread with header "How to make a row of ALV editable " (I know this is some more steps further from your demand but it may be useful) at URL " How to make a row of ALV editable " .
    If you want to study more BC412 "EnjoySAP Controls" may help you.
    *--Serdar

Maybe you are looking for

  • How do i access my iCloud back up files?

    it shows that my last back up was done on 1/22 how do i access that back up files??

  • Win 8.1 Adobe Air installation problem

    Purchased a program that runs on Adobe Air. Downloaded Air and have attempted to install. Keeps giving an error and says I need to see my admin. I am the admin and am installing with admin credentials. Anyone have a work around on this or even an ide

  • What webcam should I get for my Mac Mini 2011?

    I was hoping to get one that's affordable. Thank you!

  • Hiding or untag element (ID CS3 JS)

    Hi<br /><br />In Xml file  <br /><br />.... percent.<xref type="fn" rid="fn1"><sup>1</sup></xref>.....<br /><br />I want to insert footnote through script. The footnote is inserted but the numbers are occuring twice (one is the number in <xref> and o

  • Lens correction for Panasonic 8mm fisheye

    I am shooting with Panasonic lumix G 8 mm fisheye and Olympus PEN - EPM1. I cannot find this lens in the list of lens profile available in LR 5. Is there an update planned for it? Would someone have manual parameter or is there a procedure to find th