Change and Save records on ALV List

Hi,
i made alv list with fieldcatalog-edit to change records on alv list. But i want to save it to my dictionary table after changed. I think i should use dialog program to do that. The problem is how i can use dialog program.(i dont have an idea which user-command perform fields on alv list) I have used dialog programs before but i am new on this so i am not sure how i can do that. I will be pleased if you can help me.
Regards.

Hello Masuke,
You have to code that in the AT- USER COMMAND event.
Follow the below sample code.
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'.
Hope it helps you.
Best Regards
Santosh

Similar Messages

  • Insert ,Change and Delete  records  in OO ALV

    Hi All,
    This is regarding the functionlaties  Insert ,Change and Delete records  in OO ALV ,
    I have gone through the threads posted here and checked the standard  program BCALV_EDIT_04,
    but still I am not able to capture the Deleted and Inserted records,
    as  I am new to OO ALV,can some one help me out pls.
    Thanks and regrds,
    Sree.

    Hi Sree,
    A lot of material is available on SDN.
    Please see this link. This link contains good example of insertr, delete records in OOPS ALV.
    [OOPS ALV.|Re: Insert ,Delete & Add a row in ALV;
    May it helps you.
    Regards.
    DS.

  • I have created a form in InDesign, exported to a pdf, created an editable form and saved.  When I open the form and make changes and save, the reopen the changes are there.  If try to email this form as an attachment after editing, the attachment is alway

    I have created a form in InDesign, exported to a pdf, then created an editable form and saved.  When I open the form and make changes and save, then reopen the changes are there.  If try to email this form as an attachment after editing, the attachment is always minus the edits.   ????

    Hi chuck,
    If you ave created the form and then filling it yourself and saving the form, the filled data should be there when you reopen the same form.
    Can you please send the form to me at [email protected]  so that I can have a look.
    Regards,
    Rave

  • I keep getting a warnin that my pages document could not be auto saved. The file has been changed by another application. Click save anyway to keep your changes and save the changes made by the other application as a version, or click revert to keep the c

    I keep getting a warning stating that the document could not be auto saved in pages. The file has been changed by another application. Then it says click save any way to keep your changes and save the changes made by the other application as a version, or click revert to keep the changes from the other application and save your changes to a version.
    What in the heck does all that mean, and why are they trying to behave like a Windows product or a Microsoft office product. I just don't get it.
    Why is another application changing my documents? It's like they've created a virus within their own programs. It's a pain in the neck and makes no sense.

    I am also having the issue of a warning saying "could not be auto-saved in Pages. The file has been changed in another application. I then hit "save anyway", the warning will go away for a time, sometimes minutes, sometimes hourr, but then the warming reapprears saying the same thing. This is not the case with all Pages documents but it is the case with many.
    Working with a Retina Macbook Pro and current software
    These are newly created documents

  • How to change and save a new file in Edge web Lumira server for Team ?

    Hi Lumira folks,
    I've installed SAP Lumira 1.0, Edge edition and View a sample 'Dairy Wholesaler-Sample"
    I'd like to change it and save as new file, but "Save" button is disabled and when I put my mouse over the button,
    it says "Save Option is disabled in this version".
    Is there any idae how to change and save as a new file in Lumira Edge ?
    Many Thanks.
    JH

    I've just found the reason as below.
    http://scn.sap.com/community/lumira/blog/2015/03/20/lumira-server-for-teams-edge-edition-version-compatibility
    The current version of Lumira
    server for teams is 1.0. This version uses Lumira 1.22 as its 'engine' as this
    was the version of Lumira Desktop that was shipped at the same time.
    Hence with the current Lumira
    version compatibility; namely that a newer version of the product can open an
    older document, but an older version cannot open a newer document, care must be
    taken when deploying Lumira server for teams.
    Lumira server for teams is only
    compatible with Lumira desktop 1.22. If you intend to deploy Lumira server for
    teams, ensure your desktop users do not move to a later version of the desktop.
    Content created in a later version of Lumira desktop can be uploaded and shared
    via Lumira server for teams, but it cannot be viewed or edited online in the
    browser.
    Ensure desktop users disable the
    auto update capabilities in the desktop preferences, and set the update to
    none.

  • How can I save my original IMovie and then use that same movie, make a few changes and save as something else?

    I made an IMovie.  Now I want to keep that original Imovie but make another one using the original IMovie, make changes and save it as another IMovie.  How do I do this.

    In iMovie version 10 select your Project in the Libaray and choose Edit>Duplicate Movie to create a copy of your Project. Then make your changes to the copy.
    In iMovie verison 9 select your Project and choose File>Duplicate Project.
    Matt

  • Layout change and save for ALV report

    Hi,
    I ahve created R3 report in which report has been displayed using ALV grid, I am able to change the layout as I can see the layout -> change option in settings menu, but save and choose option is disabled.
    Please advise how to enable layoutr save and choose option for ALV grid.
    Thanks,
    Piyush

    Hi,
    According to sap help you need authorization to save Layout
    [ALV -Layout|http://help.sap.com/saphelp_sm32/helpdata/en/82/839d37664e4d45e10000009b38f8cf/content.htm]
    To save layouts for all users, you need the authorization S_ALV_LAYO with activity 23 as of Release 4.6C. You can only go to the layout administration if you have this authorization.
    You must maintain the authorization object S_ALV_LAYO using the user administration.
    If you would like to use or save the Excel view in your layout, you also require the additional authorization S_BDS_DS with activity 01,02,03,06,30; CLASSNAME ALVLAYOUTTEMPLATES and CLASSTYPE OT.
    Furthermore, there are applications that have their own authorization checks installed.
    In some ALV lists, you can only save user-specific layouts. In these cases, the indicator "user-specific" is active , on a grey background and unable to be changed. This is related to the parameter I_SAVE. This controls which options you have to save the layout.
    To be able to define default layouts, the parameter I_DEFAULT must have the value 'X'.
    Notes 409190 and 601803 also provide further information on authorizations.

  • Multiple Lines Header and Records in ALV List

    Dear All,
    I am faced with a wierd user requirement to print multiple line header in ALV. Currently we have a classical report where we are displaying a huge text for example 400 characters in a single cell of a column of the report.
    Now we will have to convert this to ALV report where I need to show that data in a single cell. I am wondering how is it possible in ALV list/grid. Please let me know if you guys have any clue.
    Regards,
    Bikramjit

    Hi,
    Did you find a solution for this?, I am also having a similar requirement.
    If you have any work around please share.
    Thanks.

  • Disabling 'Change' and 'Delete' button in Attachment List in ME52N

    Hi Friends,
    The reuqirement is this:
    A user attaches doucments  ( using the Generic Object Services to attach document ) while creating/changing Purchase Requisition (ME51N / ME52N).
    Now when any user goes to see the docuemnts attached to the PR, he selects the 'Attachement List' from the context menu, he should only be able to read it and should not be allowed to change or delete the document. For this we need to disable the 'change' and 'delete' buttons from the toolbar.
    Awaiting your response.......
    Regards,
    Fawaz

    Hi,
    Probably you have uncommented the call to super class when you reimplement the method on child class (z class)
    I just implement the same thing now and it worked for me. Take a look:
    1 - Modify the SGOSATTR table by SM30, just write a Z class (in my case CL_GOS_SRV_ATTACHMENT_CREATE) .
    2 - Create/inheridt a subclass (not a copy) in SE24 of the standard class.
    3 - Implement the method CHECK_STATUS in the z class. Note that the call to method on super class came commented. You only uncomment if you want to also execute a standard code in the super class.
    Here is my code:
    method CHECK_STATUS.
    NOTE - In my real implementation I have uncommented the code below because I want do standard code be executed before my own check.
    *CALL METHOD SUPER->CHECK_STATUS
    EXPORTING
       IS_LPORB  = IS_LPORB
       IS_OBJECT = IS_OBJECT
    IMPORTING
       EP_STATUS = EP_STATUS
       EP_ICON   = EP_ICON
      Check for BUS2012 = Bussinnes Object for Purchase Order
      IF IS_LPORB.TYPEID = BUS2012
      Check authorization and disable create attachment item if the user does not have authority...
    IF IS_LPORB-TYPEID = 'BUS2012'.
    AUTHORITY-CHECK OBJECT 'Z_MM001' ID 'ACTVT' FIELD '01'.
      IF sy-subrc <> 0.
        ep_status = mp_status_inactive.
      ENDIF.
    ENDIF.
    endmethod.
    Regards,
    Alexandre

  • Disabling 'Change' and 'Delete' buttons in Attachment List in ME52N

    Hi Friends,
    The reuqirement is this:
    A user attaches doucments ( using the Generic Object Services to attach document ) while creating/changing Purchase Requisition (ME51N / ME52N).
    Now when any user goes to see the docuemnts attached to the PR, he selects the 'Attachement List' from the context menu, he should only be able to read it and should not be allowed to change or delete the document. For this we need to disable the 'change' and 'delete' buttons from the toolbar.
    Awaiting your response.......
    Regards,
    Fawaz

    Hi,
    I have solved the issue Alhamdulillah by the foll. method:
    1. Copied CL_GOS_SRV_ATTACHMENT_LIST to ZCL_GOS_SRV_ATTACHMENT_LIST
    2. In ZCL_GOS_SRV_ATTACHMENT_LIST there is a method called: CHECK_STATUS. I overwrote with my check;
    on_mode_changed( 'D' ). --- For display
    on_mode_changed( 'E' ). --- For edit mode.
    3. In SGOS tcode, added VIEW_ATTA to point to ZCL_GOS_SRV_ATTACHMENT_LIST
    Regards,
    Fawaz

  • My subtotal and total text in ALV list does not show...

    Hello Experts,
    Please see my code below on what I am doing wrong. I want to display the subtotal and total text in my ALV list.
    CLEAR gs_layout.
        gs_layout-colwidth_optimize = 'X'.
        gs_layout-zebra             = 'X'.
        gs_layout-subtotals_text    = 'Subtotal'.
        gs_layout-totals_text       = 'Total'.
    CALL FUNCTION 'REUSE_ALV_LIST_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                         = gs_layout
            it_fieldcat                       = gt_fieldcat
    *       IT_EXCLUDING                      =
    *       IT_SPECIAL_GROUPS                 =
            it_sort                           = gt_sort
    *       IT_FILTER                         =
    *       IS_SEL_HIDE                       =
    *       I_DEFAULT                         = 'X'
    *       I_SAVE                            = ' '
    *       IS_VARIANT                        =
            it_events                         = gt_events
    *       IT_EVENT_EXIT                     =
            is_print                          = gs_print
    *       IS_REPREP_ID                      =
    *       I_SCREEN_START_COLUMN             = 0
    *       I_SCREEN_START_LINE               = 0
    *       I_SCREEN_END_COLUMN               = 0
    *       I_SCREEN_END_LINE                 = 0
    *       I_HTML_HEIGHT_TOP                 = 0
    *       I_HTML_HEIGHT_END                 = 0
    *       IT_ALV_GRAPHICS                   =
    *       IT_HYPERLINK                      =
    *       IT_ADD_FIELDCAT                   =
    *       IT_EXCEPT_QINFO                   =
    *       IR_SALV_FULLSCREEN_ADAPTER        =
    *     IMPORTING
    *       E_EXIT_CAUSED_BY_CALLER           =
    *       ES_EXIT_CAUSED_BY_USER            =
          TABLES
            t_outtab                          = lt_output_fin
         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.

    Use on Thread. Don't Cross post. and Follow the Rules.

  • Track New, Open, Close and Save Recording Info.

    Hi,
    New to the Photoshop SDK and as such would appreciate a push in the right direction
    I need i way to track New, Open, Close and Save commands and record document name and ID.
    Anyone have some sample code showing this?
    Kind Regards
    Flemming

    Thanks for pointing me in the right direction!
    It's fine in almost any situations, except one.
    When working on a new document and the user chooses to save, but in another format than psd, let's say a jpg file.
    Photoshop of cause saves it as a copy and then there is no way to detect the full path and name of that file.
    At least not in any way I can see.
    Any help would be greatly appreciated!

  • Distributing fillable form to a Group so they can save changes and "save as" ?

    How do I distribute my finalized document to a group who can fill in the information and save or save as the document to their files?

    HI;
    It sounds like distributing your form as a PDF is probably the way you want to go.  The following FAQs will help you decide.
    Should I distribute a Web or PDF form?
    Tutorial: Creating and Distributing fillable PDF forms
    This page has some more PDF related FAQs as well if you do choose to distribute as PDF
    Thanks,
    Josh

  • Alv data change and save in database

    hello sir,
       i had  done display data in alv from any custom table and that was edit and change..but now i want that data save in database through internal table ...what is coding for save butten.....
    thanks

    Hi
    OOPS ALV....
    U should check the method handle_data_changed (in BCALV_EDIT_04), this method is triggered as soon as the table is modified.
    Here you can understand if a new record is inserted or old record is updated or deleted.
    Normal ALV
    Here is the sample code.If you executed the program and edited something,then after pressing back you will get the changed value in output.For that,I have used loop..Endloop. after FM.SInce your requirement is to update DB,you use
    modify db from table itab.
    That will insert/update the entries in db.
    Kindly reward points by clicking the star on the left of reply,if it helps.
    TYPE-POOLS: slis.
    DATA: report_id LIKE sy-repid.
    DATA: ws_title TYPE lvc_title VALUE 'An ALV Report'.
    DATA: i_layout TYPE slis_layout_alv.
    DATA: i_fieldcat TYPE slis_t_fieldcat_alv.
    types : begin of ty,
    pernr type pa0001-pernr,
    SEQNR type pa0001-seqnr,
    end of ty.
    data itab type standard table of ty.
    data wa type ty.
    select pernr seqnr from pa0001 into table itab.
    report_id = sy-repid.
    PERFORM f1000_layout_init CHANGING i_layout.
    PERFORM f2000_fieldcat_init CHANGING i_fieldcat.
    CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
    EXPORTING
    i_callback_program = report_id
    i_grid_title = ws_title
    is_layout = i_layout
    it_fieldcat = i_fieldcat
    i_save = 'A'
    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.
    *Use modify statement here instead of loop
    loop at itab into wa.
    write : / wa-pernr, wa-seqnr.
    endloop.
    FORM f1000_layout_init USING i_layout TYPE slis_layout_alv.
    CLEAR i_layout.
    i_layout-colwidth_optimize = 'X'.
    i_layout-edit = 'X'.
    ENDFORM.
    FORM f2000_fieldcat_init CHANGING i_fieldcat TYPE slis_t_fieldcat_alv.
    DATA: line_fieldcat TYPE slis_fieldcat_alv.
    CLEAR line_fieldcat.
    line_fieldcat-fieldname = 'PERNR'. " The field name and the table
    line_fieldcat-tabname = 'ITAB'. " name are the two minimum req.
    line_fieldcat-key = 'X'. " Specifies the column as a key (Blue)
    line_fieldcat-seltext_m = 'Personal No.'. " Column Header
    APPEND line_fieldcat TO i_fieldcat.
    CLEAR line_fieldcat.
    line_fieldcat-fieldname = 'SEQNR'.
    line_fieldcat-tabname = 'ITAB'.
    line_fieldcat-seltext_l = 'No. of records with same key'.
    line_fieldcat-edit = 'X'. APPEND line_fieldcat TO i_fieldcat.
    ENDFORM. " f2000_fieldcat_init
    Regards
    Vasu

  • Tracking changes and reserved record errors FRM-40501,ORA-00054,FRM-40400

    Forms [32 Bit] Version 10.1.2.2.0 (Production)
    Oracle9i Enterprise Edition Release 9.2.0.8.0 - 64bit Production
    I'm working on a form with a lot of post-query triggers, and filling in values from selects, etc. I keep getting the message asking me to save changes when I haven't manually changed anything after just doing a querying and cancelling it (f8 to find record, f7 to cancel) Is there a way I can track what oracle thinks has changed so i can find out whats causing it?
    Possibly related, when I start up my form it starts in enter query mode, hitting f8 queries all records, but when I do so, im sometimes getting a FRM-40501 error saying oracle is unable to reserve record for update. (Just checking now this seems to have gone away so maybe someone else also had it open, shared environment) I assume this is also being caused by the fact that something is being changed in/after the query.

    I keep getting the message asking me to save changes when I haven't manually changed anything after just doing a querying and cancelling it
    This error will come when you are assigning any value to the DATABASE ITEM in the post query trigger.
    Appropriate solution:- Please check the properties of the items to which you are assigning values in the post query trigger.
    FRM-40501 error saying oracle is unable to reserve record for update.
    You generally get this error when you try to update the same record which is used somewhere else or in some other screen/block/canvas.
    Appropriate solution:- If you have 2 blocks based on same table then please make sure you are not updating the same record in one block while that recors is active/queried in other block.
    Or this may occur if you are using same record somewhere else.
    Please mark if it helps

Maybe you are looking for

  • No Longer Can Connect to Server on Apple TV?

    Hi Everyone, Where to begin.  My Apple TV stopped working approximately three weeks ago.  I remember it well.  I had just purchased an album on iTunes using my Apple TV and the screen blinked about six times.  Then, it turned off.  I'm honestly not s

  • Auto fill not working with sign-in accounts (in Safari)

    Could anyone suggest me how to have the AUTO FILL form work in my Sign-in accounts (in Safari) ? Could not find anything specifically on this forum, yet. Thanks for your help.

  • Toolkit.getDefaultToolkit() in Java service never returns on Windows

    I'm stumped by this problem. It appears to be specific to a single machine as I can reproduce it reliably there but not on other machines. I'm hoping someone has some thoughts on what could be going on. Here's the scenario: I have Tomcat 5 running as

  • Dell 2405FPW 24" display problem. Please help

    Can anyone help me with this, I can't seem to get an answer from either Dell tech support nor from Apple. I just received my dell 2405FPW 24" display. Connected it to DVI port 1 on my powermac G5. It started to work just fine for the first hour or so

  • Help Viewer

    After backing up my hard drive, I erased it and then and copied its contents back from my external drive, Now I can no longer access Help from the menu bar in Pages '08. Help Viewer is not activated and I cannot locate it on my hard drive. Same probl