Unlock custom table entries after user exits using /n

Hello,
I want to lock a record in a custom table at the beginning when users execute a transaction. Users do various activities and save the change then the lock can be released. My issue here is after I lock when the user execute the transaction, if the user does not save or come out using exit keys, for example press /n or just close the session, I need to still unlock the record. Could any one pls suggest what is the best approach. How does sap handles when we use VA02 and just close the session?
Many thanks
Ramesh

Ramesh,
You need to check for the other actions besides save.  Perform the same unlock for other action as you currently do for a save. 
If SAVE.
unlock.
Else
unlock
endif.
Bruce

Similar Messages

  • Adding entries to Custom table from IDOC User-Exit

    Hi All,
       I need to add an entry into a Ztable, based on the entries in the IDOC.. The user-exit available to me is EXIT_SAPLVEDF_002.  But it is called a number of times... Is there any way to update the Ztable getting the data from different segments?..
    Please help..
    Regards.
    Asha

    The table INT_EDIDD type EDIDD conatined the interface tables of the FM contain all the segmanent data, you can read that and populate the Z table respectively ...
    Thanks,
    Adi.

  • Update the database table inside an user exit.

    Hi Experts,
    I have a issue where i have to update a custom table in an User exit.
    I am using Lock object for ENQUE/DEQUE.
    I have tried to use statements like UPDATE/MODIFY inside the user exit.
    But the problem is that it's not updating the database table at the same time.
    I know if i use COMMIT WORK it can update at the same time but it's not advisable to use COMMIT inside a work.and also it gives a short dump.
    The real issue is that this custom table is read for batch creation at the same time for different users.
    Now if it the program does not update the database table at the same time then other users also read the same data and create the same Batch number..
    While requirement is to create a different/unique batch numbers.
    Program is updating the table but it's taking time..so in between other users are creating the same batch number.
    Please guide me what would be the best solution for this.
    Regards,
    Amit Kumar Singh

    Thanks for your quick reply.
    My actually requirement is like that.
    I have to create a Process Order using tcode COR1.
    After passing some input value it goes inside an User Exit.
    There one Custom table is maintained which stores some fields like month,year,numeric key field,etc.
    The new batch number is created using the combination of these table fields.
    Once a new batch number is created it increment the numeric key field number by one.
    Issue is we have to update this new numeric field value into the database field so that other users can read a diffrent numeric field value.hence it will create a new/different batch number.
    Here i am not able to update the database table inside this User Exit.
    Table is geeting updated but after some time and out of this User Exit.
    Please suggest what's required in that case?
    Regards,
    Amit Kumar Singh
    Edited by: Amit  Singh on Feb 3, 2009 11:33 AM

  • Custom table entry if transaction fails

    hey ppl,
    One doubt. I am using a exit in sales order and the requirement is that once the exit is triggered,few values must be updated on the custom table that i have created. My question s that, i am able to modify my custom table but if for some reason ,after my exit if the transaction fails :
    1. would the custom table entry be reversed back automatically?
    2. Else, is it our responsibility to reverse the entry in the custom table?If yes, can you please guide me how to do it?
    Thanks in advance.

    1. would the custom table entry be reversed back automatically? Can't be sure on this. the entry will be updated to table once the Current LUW is updated.
    2. Else, is it our responsibility to reverse the entry in the custom table?If yes, can you please guide me how to do it?
    Yes. If entry is there you wll require to DELETE it otherwise you can just to ROLLBACK WORK.

  • Filling custom VBAK field in user exit EXIT_SAPLVEDA_001

    Hai Experts,
    I created code and activated the user exit EXIT_SAPLVEDA_001.
    Via an iDoc i want to fill a custom field which is in VBAK.
    EXIT_SAPLVEDA_001 has an changing parameter type dxvbak, after user exit is triggered for the right segment, the custom field is not update in the database tabels!.
    Do i need to take further action?!
    Code below
    *&  Include           ZXVEDU03
    DATA: BEGIN OF lw_dxvbak.                  "Kopfdaten
            INCLUDE STRUCTURE vbak.
    DATA:  bstkd LIKE vbkd-bstkd.
    *DATA:  KURSK(8)   TYPE C.
    DATA:  kursk LIKE vbkd-kursk.          "Währungskurs
    DATA:  zterm LIKE vbkd-zterm.          "Zahlungsbedingungsschlüssel
    DATA:  inco1 LIKE vbkd-inco1.          "Incoterms Teil 1
    DATA:  inco2 LIKE vbkd-inco2.          "Incoterms Teil 2
    DATA:  prsdt LIKE vbkd-prsdt.          "Datum für Preisfindung
    DATA:  angbt LIKE vbak-vbeln.          "Angebotsnummer Lieferant (SAP)
    DATA:  contk LIKE vbak-vbeln.          "Kontraknummer Lieferant (SAP)
    DATA:  kzazu LIKE vbkd-kzazu.          "Kz. Auftragszusammenführung
    DATA:  fkdat LIKE vbkd-fkdat.          "Datum Faktura-/Rechnungsindex
    DATA:  fbuda LIKE vbkd-fbuda.          "Datum der Leistungserstellung
    DATA:  empst LIKE vbkd-empst.          "Empfangsstelle
    DATA:  valdt LIKE vbkd-valdt.          "Valuta-Fix Datum
    DATA:  kdkg1 LIKE vbkd-kdkg1.          "Kunden Konditionsgruppe 1
    DATA:  kdkg2 LIKE vbkd-kdkg2.          "Kunden Konditionsgruppe 2
    DATA:  kdkg3 LIKE vbkd-kdkg3.          "Kunden Konditionsgruppe 3
    DATA:  kdkg4 LIKE vbkd-kdkg4.          "Kunden Konditionsgruppe 4
    DATA:  kdkg5 LIKE vbkd-kdkg5.          "Kunden Konditionsgruppe 5
    DATA:  delco LIKE vbkd-delco.          "vereinbarte Lieferzeit
    DATA:  abtnr LIKE vbkd-abtnr.          "Abteilungsnummmer
    DATA:  dwerk LIKE rv45a-dwerk.         "disponierendes Werk
    DATA:  angbt_ref LIKE vbkd-bstkd.      "Angebotsnummer Kunde (SAP)
    DATA:  contk_ref LIKE vbkd-bstkd.      "Kontraknummer Kunde  (SAP)
    DATA:  currdec LIKE tcurx-currdec.     "Dezimalstellen Währung
    DATA:  bstkd_e LIKE vbkd-bstkd_e.      "Bestellnummer Warenempfänger
    DATA:  bstdk_e LIKE vbkd-bstdk_e.      "Bestelldatum Warenempfänger
    DATA: END OF lw_dxvbak.
    CASE segment-segnam.
      WHEN 'ZE1EDK18' . " Name of customer segment
        MOVE segment-sdata TO ze1edk18.
        lw_dxvbak-zkostl = ze1edk18-zkostl.
        MOVE lw_dxvbak TO dxvbak.
    ENDCASE.
    Edited by: Richard van Veen on Mar 9, 2011 1:43 PM

    Filled dxbdcdata with following values!
    DATA lw_dxbdcdata LIKE LINE OF dxbdcdata.
    CASE segment-segnam.
      WHEN 'ZE1EDK18' . " Name of customer segment
        MOVE segment-sdata TO ze1edk18. " Data receives structure
        lw_dxvbak-zkostl = ze1edk18-zkostl. " Copy to application table
        MOVE lw_dxvbak TO dxvbak.
        lw_dxbdcdata-program = 'SAPMV45A'.
        lw_dxbdcdata-dynpro = '0101'.
        lw_dxbdcdata-dynbegin = 'X'.
        lw_dxbdcdata-fnam = 'ZKOSTL'.
        lw_dxbdcdata-fval = ze1edk18-zkostl.
        append lw_dxbdcdata to dxbdcdata.
    ENDCASE.

  • Error for customer specific Authorization check (User Exit)

    Dear Experts,
    I am facing a problem in PM.
    I have created a maintenace plan for calibration via t code IP42 and mentioned the order type PM05. Scheduling is done for the order. I got the order number.
    I have released the order and got the inspection lot number.
    While entering the results recording through t code QE17, the reluts are out of the specified range, i have given the valuation Rejected, immediately system is giving an error message as below:
    "Error for customer specific Authorization check (User Exit)"
    Though there is no user exit activated in the system, this message is coming and not allowing the result recoring for rejection.
    If I'm entering the result recording within the specified range, then valuation is Accepted and its allowing to save.
    I have checked the following user exits:
    QQMA0002: QM: Authorization Check for Entry into Notif. Transaction
    QQMA0026: PM/SM: Auth. check when accessing notification transaction.
    The above 2 User Exits are not active.
    I have also checked a note 429066. But it says incase of any dump for that user exit only its applicable and more over the current version of the system is ECC 6.0 packae 15, where as that note is applicable upto 4.6C.
    Please some one help me on this issue.
    Thanks and Regards,
    Praveen.

    Dear Pete,
    I have cheked with my technical team, There is no hotpacks updated recently. This is the implementaion project I'm in, so performing the cycle for the first time.
    Any how I got it solved, in T code QE17, after entering the Inspection lot in next screen goto menu path Settings - User settings - Defects recording mention the reprt type and tick on Reprt type Changable.
    At the time of result recording if the valuation is Rejected then it ask for defects recording close that window if not rwequired then save, the error message no longer apperaing now.
    Regards,
    Praveen

  • Reagrding transporting of custom table entries from D to Q.

    Hi,
    I am trying to transport couple of entries which I did using table maintainence in SM30. But when I go to Maintain option -> Table View -> Transport, I see the Transport option inactive.
    Can someone tell me how to activate that option or how to move custom table entries from one system to other ?
    Regards,
    Rajesh.

    Hi rajesh,
    1. For this purpose, the delivery class of that table should be C = Customizing.
      (at present it would be A =  Application)
    2. This is done in se11 transaction.
    3. After changing the delivery class, we have to RE-GENERATE
       the table maintenance.
    4. Then, whenever we do SM30, it will automatically ask for a request number.
    regards,
    amit m.

  • How to find out the 'z' user exit used in a Particular Transaction

    Hi,
    I have requirement to analyse all the user exits used in a transaction say 'VA01' . How can i find the user exits in a VA01 transaction. Can anyone suggest how to find the User exits
    Thanks in Anticipation.
    With Best Regards
    mamatha

    you can execute the following program , give the transaction name and execute
    *& Report  YCHATEST                                                    *
    REPORT z_find_userexit NO STANDARD PAGE HEADING.
    *&  Enter the transaction code that you want to search through in order
    *&  to find which Standard SAP User Exits exists.
    *& Tables
    TABLES : tstc,     "SAP Transaction Codes
             tadir,    "Directory of Repository Objects
             modsapt,  "SAP Enhancements - Short Texts
             modact,   "Modifications
             trdir,    "System table TRDIR
             tfdir,    "Function Module
             enlfdir,  "Additional Attributes for Function Modules
             tstct.    "Transaction Code Texts
    *& Variables
    DATA : jtab LIKE tadir OCCURS 0 WITH HEADER LINE.
    DATA : field1(30).
    DATA : v_devclass LIKE tadir-devclass.
    *& Selection Screen Parameters
    SELECTION-SCREEN BEGIN OF BLOCK a01 WITH FRAME TITLE text-001.
    SELECTION-SCREEN SKIP.
    PARAMETERS : p_tcode LIKE tstc-tcode OBLIGATORY.
    SELECTION-SCREEN SKIP.
    SELECTION-SCREEN END OF BLOCK a01.
    *& Start of main program
    START-OF-SELECTION.
    * Validate Transaction Code
      SELECT SINGLE * FROM tstc
        WHERE tcode EQ p_tcode.
    * Find Repository Objects for transaction code
      IF sy-subrc EQ 0.
        SELECT SINGLE * FROM tadir
           WHERE pgmid    = 'R3TR'
             AND object   = 'PROG'
             AND obj_name = tstc-pgmna.
        MOVE : tadir-devclass TO v_devclass.
        IF sy-subrc NE 0.
          SELECT SINGLE * FROM trdir
             WHERE name = tstc-pgmna.
          IF trdir-subc EQ 'F'.
            SELECT SINGLE * FROM tfdir
              WHERE pname = tstc-pgmna.
            SELECT SINGLE * FROM enlfdir
              WHERE funcname = tfdir-funcname.
            SELECT SINGLE * FROM tadir
              WHERE pgmid    = 'R3TR'
                AND object   = 'FUGR'
                AND obj_name = enlfdir-area.
            MOVE : tadir-devclass TO v_devclass.
          ENDIF.
        ENDIF.
    * Find SAP Modifactions
        SELECT * FROM tadir
          INTO TABLE jtab
          WHERE pgmid    = 'R3TR'
            AND object   = 'SMOD'
            AND devclass = v_devclass.
        SELECT SINGLE * FROM tstct
          WHERE sprsl EQ sy-langu
            AND tcode EQ p_tcode.
        FORMAT COLOR COL_POSITIVE INTENSIFIED OFF.
        WRITE:/(19) 'Transaction Code - ',
        20(20) p_tcode,
        45(50) tstct-ttext.
        SKIP.
        IF NOT jtab[] IS INITIAL.
          WRITE:/(95) sy-uline.
          FORMAT COLOR COL_HEADING INTENSIFIED ON.
          WRITE:/1 sy-vline,
          2 'Exit Name',
          21 sy-vline ,
          22 'Description',
          95 sy-vline.
          WRITE:/(95) sy-uline.
          LOOP AT jtab.
            SELECT SINGLE * FROM modsapt
            WHERE sprsl = sy-langu AND
            name = jtab-obj_name.
            FORMAT COLOR COL_NORMAL INTENSIFIED OFF.
            WRITE:/1 sy-vline,
            2 jtab-obj_name HOTSPOT ON,
            21 sy-vline ,
            22 modsapt-modtext,
            95 sy-vline.
          ENDLOOP.
          WRITE:/(95) sy-uline.
          DESCRIBE TABLE jtab.
          SKIP.
          FORMAT COLOR COL_TOTAL INTENSIFIED ON.
          WRITE:/ 'No of Exits:' , sy-tfill.
        ELSE.
          FORMAT COLOR COL_NEGATIVE INTENSIFIED ON.
          WRITE:/(95) 'No User Exit exists'.
        ENDIF.
      ELSE.
        FORMAT COLOR COL_NEGATIVE INTENSIFIED ON.
        WRITE:/(95) 'Transaction Code Does Not Exist'.
      ENDIF.
    * Take the user to SMOD for the Exit that was selected.
    AT LINE-SELECTION.
      GET CURSOR FIELD field1.
      CHECK field1(4) EQ 'JTAB'.
      SET PARAMETER ID 'MON' FIELD sy-lisel+1(10).
      CALL TRANSACTION 'SMOD' AND SKIP FIRST SCREEN.

  • Making parmanent changes to a internal table inside a user exit

    Hi All,
    I am having a User exit to which I am passing a structure as importing parameter.
    The user exit is not exporting the same structure, but is exporting some other values.
    My problem is that I want to make parmanent changes in the structure I am passing to the user exit.
    Currently what is happening:
    I am passing the structure to the user exit. It has got 6 rows. Inside the user exit I am making some changes to a particular field of all the rows. Till the program control is inside the user exit the changes in the structure are visible. As soon as the control come out of the user exit, the values for the field are switched to teh old values(values before passing to teh user exit).
    My question is, is there any method to make changes to a internal table inside a user exit and these changes are visible outside it when the program control come out of the user exit. (This is when the internal table to which the change is made in not exported by the user exit)

    Hi Dear,
    Your changes done in import parameters will not reflect outside exit. You can only change the values of export parameters...
    If you have very urgent requirement then make changes in SAP''s Standard code.
    For your problem you can write to SAP. In many cases SAP provides the solution.
    Award Points If Useful.

  • User exit Used while defining the storage type

    Hi all,
      Can anybody tell me about the user exit Used while defining the storage type.
    or what is the user exit name?
    i want to define my own strategy.
    i.e combine manual sut entry with strategy 'k'

    HI all I Got the Exit     MWMTO003.
    Now  ,
    Following Logic is to be built. (Storage type strategy is K for putaway.)
    u201CManually selection of SUTu201D while Putaway , For Strg -K SUT selection is
    system guided.
    Which componant is required for this. Pls guide.
    Is the above requirement is possible?
    Edited by: dev .. on Feb 19, 2009 1:58 PM

  • Custom table entries suddenly deleted

    We have a custom table in our production system that had 14000+ entries last Friday.  Now, they're all gone.  Production system is not modifiable, no one has authorization to SE16 or SM30 for deletions.  No program that deletes the data has been run in this timeframe (based on ST03 data).   What other ways could this data have been deleted?  We're puzzled.

    Kirsten,
    you may want to check two things:
    1.) Is there a delete or clean-up report for your custom table (check via the where-used list)? If yes it is very likely that someone ran it...
    2.) It could also be that something happened directly on DB level. The admin accidentally dropped the wrong table, etc. This is not very likely but I have seen that happening before. Maybe the DB admins can even tell you at which time the table got deleted...
    Tim

  • Custom Table Entry not in Sync between Different Environment

    Hi All,
    we have different environment like Dev System, Quality system, performance testing system etc... these are all environment customs table entry not in syn .. Table entry should be syn. How to make it syn all the entry between all environment without do any manual work. Kindly help on this.
    Thanks

    Hello Mohammed,
    It depends on what type of tables you are referring to. If you have a table of type 'Customizing', you have to transport your table entries across different environments and they will be in Sync.
    If you are referring to tables of type 'Master Data', they have to be maintained in all environments.
    Table of type 'Transaction Data' by default have different records based on your day to day transactions.
    You cannot have all custom tables with same data in all environments. Hope this helps.
    Rgds,
    Vijay.

  • Reg user exit used for reading VB items

    Dear all,
    Please give me the details of user exit used when we run plant level MRP by MDBT, so that it will create
    purchase requisitions only for consumables VB items, please explain how it works.
    Thanks in advance

    Hi,
    Can you explain what you mean by
    create purchase requisitions only for consumables VB items
    So for others you want to have planned orders?
    Regards,
    Vivek

  • User exit used

    Hi,
    what is the user exit used and what is the requirement.
    Thi s was a ninterview question .
    What would be the best answer

    Hi Soumya,
    Check out the following links for user exits
    Reward points if helpful.
    http://www.sap-img.com/abap/a-short-tutorial-on-user-exits.htm
    http://expertanswercenter.techtarget.com/eac/knowledgebaseAnswer/0,295199,sid63_gci982776,00.html

  • User-exit using the dispatcher

    Hi,
    I am creating outbound files with file adapter and I need to generate the name of files dinamically. Where can I found documentation and examples about user-exits using the dispatcher?
    Tks,
    Douglas

    You can BADI ME_PROCESS_PO_CUST to make the changes to PO Line items.
    Use the method PROCESS_ITEM to get the values of the Line item conditions and populate the Items. In this method, you have an access to the item object using the parameter IM_ITEM. Use method GET_CONDITIONS, to get the conditions. Set the value of your field and use method SET_DATA to set values at line item.
    Regards,
    Naimesh Patel

Maybe you are looking for

  • Advance chapter menus without a button?

    Does anyone know where I can find advice about scripting a command to change menu pages by using the remote's up or down arrows? IE: on a menu with multiple chapter selection buttons, I want to be able to click through from top to bottom and upon rea

  • Conditional Invoice Blocking

    Dear Experts , I want to block all the invoices that have a value above 5000 INR . How is this possible ?? Pls tell me the settings . Regards Anis

  • Adobe form distribution problem

    Form created in LiveCycle and distributed with Adobe Pro...3 choices for distribution. 1) Through Acrobat.com (which stores the responses on Adobe servers) 2)  By email (This is not an option for me because these forms can not  invoke an email client

  • Camera Calibration Profile for Leica D-Lux Typ 109

    I have Lightroom 5.7 with Camera Raw 8.7, both supposedly the latest versions, and yet I do not see any choices other than Adobe Standard under the Camera Calibration Profile menu. I have the newly supported Leica D-Lux Typ 109, and was expecting to

  • Contacs sorting

    Is there a possibillity to sort the contacts on the iPhone by Company instead of name?