Locking a custom table

Hi All !!
I want to update one custom table which has key fields K1, K2 and K3.
I am using ENQUEUE_E_TABLE  to lock the table.But I dont know how to send the table for enqueue.
Nextly, I need to send keys of table .Should I use any structure where I append the key fields and export the structure. The function call is as :
  CALL FUNCTION 'ENQUEUE_E_TABLE'
   EXPORTING
     MODE_RSTABLE         = 'E'
     TABNAME             = ?
     VARKEY               =?
   EXCEPTIONS
     FOREIGN_LOCK         = 1
     SYSTEM_FAILURE       = 2
     OTHERS               = 3
Please help in this regard..
Thanks in advance..
Prabhas.

Hai.
Check this.
Lock objects are use in SAP to avoid the inconsistancy at the time of data is being insert/change into database.
SAP Provide three type of Lock objects.
- Read Lock(Shared Locked)
protects read access to an object. The read lock allows other transactions read access but not write access to
the locked area of the table
- Write Lock(exclusive lock)
protects write access to an object. The write lock allows other transactions neither read nor write access to
the locked area of the table.
- Enhanced write lock (exclusive lock without cumulating)
works like a write lock except that the enhanced write lock also protects from further accesses from the
same transaction.
You can create a lock on a object of SAP thorugh transaction SE11 and enter any meaningful name start with EZ Example EZTEST_LOCK.
Use: you can see in almost all transaction when you are open an object in Change mode SAP could not allow to any other user to open the same object in change mode.
Example: in HR when we are enter a personal number in master data maintainance screen SAP can't allow to any other user to use same personal number for changes.
Technicaly:
When you create a lock object System automatically creat two function module.
1. ENQUEUE_<Lockobject name>. to insert the object in a queue.
2. DEQUEUE_<Lockobject name>. To remove the object is being queued through above FM.
You have to use these function module in your program.
check this link for example.
http://help.sap.com/saphelp_nw04s/helpdata/en/cf/21eea5446011d189700000e8322d00/content.htm
tables:vbak.
call function 'ENQUEUE_EZLOCK3'
exporting
mode_vbak = 'E'
mandt = sy-mandt
vbeln = vbak-vbeln
X_VBELN = ' '
_SCOPE = '2'
_WAIT = ' '
_COLLECT = ' '
EXCEPTIONS
FOREIGN_LOCK = 1
SYSTEM_FAILURE = 2
OTHERS = 3
if sy-subrc <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
endif.
Normally ABAPers will create the Lock objects, because we know when to lock and how to lock and where to lock the Object then after completing our updations we unlock the Objects in the Tables
http://help.sap.com/saphelp_nw04s/helpdata/en/cf/21eea5446011d189700000e8322d00/content.htm
purpose: If multiple user try to access a database object, inconsistency may occer. To avoid that inconsistency and to let multiple user give the accessibility of the database objects the locking mechanism is used.
Steps: first we create a loc object in se11 . Suppose for a table mara. It will create two functional module.:
1. enque_lockobject
1. deque_lockobject
before updating any table first we lock the table by calling enque_lockobject fm and then after updating we release the lock by deque_lockobject.
http://help.sap.com/saphelp_nw04/helpdata/en/cf/21eea5446011d189700000e8322d00/content.htm
GO TO SE11
Select the radio button "Lock object"..
Give the name starts with EZ or EY..
Example: EYTEST
Press Create button..
Give the short description..
Example: Lock object for table ZTABLE..
In the tables tab..Give the table name..
Example: ZTABLE
Save and generate..
Your lock object is now created..You can see the LOCK MODULES..
In the menu ..GOTO -> LOCK MODULES..There you can see the ENQUEUE and DEQUEUE function
Lock objects:
http://www.sap-img.com/abap/type-and-uses-of-lock-objects-in-sap.htm
http://help.sap.com/saphelp_nw04s/helpdata/en/cf/21eea5446011d189700000e8322d00/content.htm
Match Code Objects:
http://help.sap.com/saphelp_nw2004s/helpdata/en/41/f6b237fec48c67e10000009b38f8cf/content.htm
http://searchsap.techtarget.com/tip/0,289483,sid21_gci553386,00.html
See this link:
http://www.sap-img.com/abap/type-and-uses-of-lock-objects-in-sap.htm
Check these links -
lock objects
Lock Objects
Lock Objects
Regards.
Sowjanya.B.

Similar Messages

  • Locking the Custom table

    I have a custom tble zcustom_tab. I am modifying the entries in the program .  Right now i am locking the table.
    Now instead of table locking, i want the record level locking.
    How ?

    Hi,
    try if this code helps.
    *& Report  ZLOCKING                                                    *
    REPORT  zlocking                                .
    DATA : tab_emp TYPE TABLE OF zemp_51772,
           wa_emp TYPE zemp_51772.
    wa_emp-emp_no = '102'.
    wa_emp-emp_id = '157'.
    wa_emp-emp_name = 'SIVA'.
    wa_emp-emp_dept = 'SAP'.
    APPEND wa_emp TO tab_emp.
    CLEAR wa_emp.
    wa_emp-emp_no = '128'.
    wa_emp-emp_id = '138'.
    wa_emp-emp_name = 'RAMA'.
    wa_emp-emp_dept = 'SAP'.
    APPEND wa_emp TO tab_emp.
    CLEAR wa_emp.
    wa_emp-emp_no = '133'.
    wa_emp-emp_id = '121'.
    wa_emp-emp_name = 'KRISHNA'.
    wa_emp-emp_dept = 'SAP'.
    APPEND wa_emp TO tab_emp.
    CLEAR wa_emp.
    CALL FUNCTION 'ENQUEUE_E_TABLEE'
    EXPORTING
       mode_rstable         = 'X'
       tabname              = 'ZEMP_51772'
      varkey               =
      X_TABNAME            = ' '
      X_VARKEY             = ' '
      _SCOPE               = '2'
      _WAIT                = ' '
      _COLLECT             = ' '
    EXCEPTIONS
       foreign_lock         = 1
       system_failure       = 2
       OTHERS               = 3
    IF sy-subrc EQ 0.
      INSERT zemp_51772 FROM TABLE tab_emp.
    ENDIF.
    CALL FUNCTION 'DEQUEUE_E_TABLEE'
    EXPORTING
       mode_rstable       = 'X'
       tabname            = 'ZEMP_51772'
      VARKEY             =
      X_TABNAME          = ' '
      X_VARKEY           = ' '
      _SCOPE             = '3'
      _SYNCHRON          = ' '
      _COLLECT           = ' '
    IF sy-subrc EQ 0.
      WRITE:/ 'Unlocked the Table'.
    ENDIF.
    Thanks&regards,
    Sravani.

  • Lock object problem on custom table

    Hi all.
    I am having a bit of an issue with a lock object on a home made table. We're using the UWL and a custom IView to display an extended invoice. No problem releasing the workitem lock, just the table entry lock.
    I can see the lock in SM12. Tried dequeue/dequeue all RFCs from backend, no luck.
    The lock is set from a custom RFC. This RFC succesfully releases the lock when used in SAPGUI, and we have an RFC enabled wrapper around it. However, once used in the portal, the locks aren't released. My suspicion is that it has to do with sessions and I can't see a way to control that since dynpro uses a connection pool IIRC.
    Anyone have any ideas on how to solve this?

    Small correction if you are not aware. Do not create your custom tables in APPS schema? Custom tables are supposed to created in custom schema such as XXPO and a synonym created for the table in APPS schema.
    When creating an EO, you do not need to provide the schema name. You would need to enter only the table name.
    Hope this helps.

  • Lock Objects Problem while updating entries in custom table

    Hi Friends,
    Iam updating a custom table ztable from internal table entries.
    ie : Modify ZTABLE from table ITAB.
    Now the entries are updating and inserting perfectly..
    But my problem is i need to use lock objects before doing this..
    I have created a lock obect EZTABLE with all th ekey fields of the table.. ie : it has 2 key fields
    item & matnr .
    Now how to use lock objects here.. do i need to loop the internal table and use enque & deque function module each and every time in loop or use it out side the loop..
    Can any one explain me this..
    Regards,
    Kumar

    hi kumar,
    **check if the equipment is already locked by user, if yes, trigger a mail
                CALL FUNCTION 'ENQUEUE_EIEQUI'
                 EXPORTING
                MODE_EQUI            = 'E'
                MANDT                = SY-MANDT
                   equnr                = lv_equi_temp
                X_EQUNR              = ' '
                _SCOPE               = '2'
                _WAIT                = ' '
                _COLLECT             = ' '
                 EXCEPTIONS
                   foreign_lock         = 1
                   system_failure       = 2
                   OTHERS               = 3.
                IF sy-subrc <> 0.
                  lv_subrc1 =  sy-subrc.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
            WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
                ELSE.
                  CALL FUNCTION 'DEQUEUE_EIEQUI'
                   EXPORTING
                MODE_EQUI       = 'E'
                MANDT           = SY-MANDT
                     equnr           =  lv_equi_temp
                X_EQUNR         = ' '
                _SCOPE          = '3'
                _SYNCHRON       = ' '
                _COLLECT        = ' '
                ENDIF.
    try like this to check if the object is locked....
    u can also use
    call function 'ENQUEUE,.
    do the needful changes update the database then commit work
    then call function 'DEQUEUE'
    hope this helps,
    tanmaya

  • Lock custom tables

    Hi,
    I am writing program to upload data from excel to custom tables.
    Here i add/ update/delete records from the table based on entries from excel sheet.
    While i run this program, how do i maintain locks on the table, so that any other user is not modifying the tables at the same time.
    Points will be awarded immediately.
    Thanks

    <b>Lock objects</b> are used to lock the database table while making the modifications on the database table.
    you can create your own lock objects using SE11.
    if you create lock objects on any table system will create two function modules.
    <b>1.ENQUEUE....
    2.DEQUEUE.....</b>
    first one is used to lock the table
    second one used to removing lock on the table.
    <b>This lock object</b> facilitates synchronous process. That is suppose if you are changing the table entries, and simultaneously there might be several programs running in the background or by anything else which also does changes to the same table. In this case you can lock the table so that other program will not able to update/insert/ do any other operation unless or until your program executes successfully.
    You can create lock objects for this purpose in transaction SE11. SAP by default create 2 function modules. One for locking ( Enqueue) and other for unlocking ( Dequeue ). You can call these function module in appropriate places in your program.
    ex...
    lock Table
    CALL FUNCTION 'ENQUEUE_E_TABLE'
    EXPORTING
    tabname = table_name
    EXCEPTIONS
    foreign_lock = 1
    system_failure = 2
    OTHERS = 3.
    Unlock Table
    CALL FUNCTION 'DEQUEUE_E_TABLE'
    EXPORTING
    tabname = table_name
    <b><u>check the below links:</u></b>
    http://help.sap.com/saphelp_40b/helpdata/en/cf/21eea5446011d189700000e8322d00/content.htm
    Re: lock objects
    Regards,
    Moqeeth.

  • Multiple Users need (maintenance) access to a customized table.

    Hi Gurus
    We created a z table and maintained couple of values in it
    The _attributes _ are as follows:
    Delivery Class : A (Application table (master and transaction data)
    Table Maintenance : Display and Maintenance allowed
    ISSUE :
    This table does not allow multiple access. In other words, multiple users have to enter this table and change values in this table. Is that possible?
    Could you let me know how can this be done?
    Thanks a lot
    Sridevi

    By default, I think SM30, and probably SE16 as well, will lock the entire table if someone is trying to change it.  So, only one person can maintain the table at a time.  This is the simplest way that it can ensure data integrity. 
    If I wanted multiple users to be able to maintain a table simultaneously, I'd create a custom screen (dynpro, user dialog, whatever you want to call it) to do it, using lock objects (ENQUEUE and DEQUEUE function modules that you create for the key of your table) to lock / unlock specific rows when a user wanted to change them.  I also might use some sort of reference number generator to ensure unique keys. 
    Not a terrifically complicated piece of development but you'd need to get a Abaper to do it.

  • "DBIF_RSQL_SQL_ERROR" "CX_SY_OPEN_SQL_DB" while updating the custom table

    hi friends...
    i am posting fico document using bapi BAPI_ACC_GL_POSTING_POST.
    after that i am updating the document number to my custom table.
    but in some cases while updating the document in my custom table i am getting the fallowing dump..
    in ST22
    How to correct the error:
    Database error text........: "[1205] Transaction (Process ID 66) was deadlocked
    on lock resources with another process and has been chosen as the deadlock
    victim. Rerun the transaction."
    Internal call code.........: "[RSQL/UPDT/ZIF004_PKT ]"
    Please check the entries in the system log (Transaction SM21).
    If the error occures in a non-modified SAP program, you may be able to
    find an interim solution in an SAP Note.
    If you have access to SAP Notes, carry out a search with the following
    keywords:
    "DBIF_RSQL_SQL_ERROR" "CX_SY_OPEN_SQL_DB"
    "ZFI_01_MONTHLY_RESULT_FRM_PKT" or "ZFI_01_MONTHLY_RESULT_FRM_PKT"
    "UPLOAD_SAP"
    Source Code Extract
    LOOP AT i_zif004_pkt_sum .
    UPDATE zif004_pkt SET xblnr = i_zif004_pkt_sum-xblnr ---> i am getting DUMP here
                              gjahr = i_zif004_pkt_sum-gjahr
                              sap_flag_posting = i_zif004_pkt_sum-sap_flag_posting
                          WHERE compcode = i_zif004_pkt_sum-compcode
                         AND ccode = i_zif004_pkt_sum-ccode
                          AND wbselement = i_zif004_pkt_sum-wbselement
                          AND kostl = i_zif004_pkt_sum-kostl
                          AND code = i_zif004_pkt_sum-code
                          AND month1 = l_ltx
                          AND year1 = p_year.
        IF sy-subrc = 0.
          WRITE :/ 'Document ', i_zif004_pkt_sum-xblnr, 'is posted for ', i_zif004_pkt_sum-code.
        ENDIF.
      ENDLOOP.
    kindly give some inputs..
    regards
    Selva

    Hi,
    You will face this issue if your oracle data base is lack of work processes. try to check the work processes and increase them if possible with the helps basis guys.
    check the below thread.
    DI job failed ORA-12537: TNS:connection closed.
    Regards,
    Venkatesh

  • Updating Custom Table Only in Debug Mode

    Hi All!
    I have been encountering issues in updating a custom table. It would work successfully only in debug mode otherwise it won't update an entry in the table.
    This is the piece of code that would update an entry in the table specifically used in a user exit. The functionality of this code is to automatically remove a transportation block:
    SELECT SINGLE *
    INTO wa_zblock
    FROM zblock
    WHERE zzblknum EQ c_tr01
    AND vbeln EQ p_lvbeln
    AND zzprocessed EQ space.
    IF sy-subrc EQ 0.
    DO.
    CALL FUNCTION 'ENQUEUE_E_TABLES'
    EXPORTING
    MODE_RSTABLE = 'S'
    TABNAME = c_lzblock
    EXCEPTIONS
    FOREIGN_LOCK = 1
    SYSTEM_FAILURE = 2
    OTHERS = 3.
    IF sy-subrc EQ 0.
    wa_zblock-zzprocessed = c_x.
    wa_zblock-zzapproveby = sy-uname.
    wa_zblock-zzapproveon = sy-datum.
    MODIFY zblock FROM wa_zblock.
    if sy-subrc EQ 0.
    COMMIT WORK AND WAIT.
    endif.
    EXIT.
    ENDIF.
    ENDDO.
    CALL FUNCTION 'DEQUEUE_E_TABLES'
    EXPORTING
    MODE_RSTABLE = 'S'
    TABNAME = c_lzblock.
    ENDIF.
    How can I make this update the custom table successful in undebugged mode? Please let me know your thoughts on this.
    Thanks!

    I also suggest you to lock only the entry that will be updated (and not the whole table!) : you will have then far less problems of conflict with updating this table.
    For that, you have to create a lock object on your table (via SE11 - for example EZ_MY_TABLE). This will create 2 function modules named ENQUEUE_E<name of your lock object> (in my example ENQUEUE_EZ_MY_TABLE) and DEQUEUE_E<...>.
    You can then call those FM like this :
    CALL FUNCTION 'ENQUEUE_EZ_MY_TABLE'
      EXPORTING
        MODE_RSTABLE = 'S'
        KEYFIELD1 = ld_keyfield1  " Here are the key values for the entry that you have to update
        KEYFIELD2 = ld_keyfield2
      EXCEPTIONS
        FOREIGN_LOCK = 1
        SYSTEM_FAILURE = 2
        OTHERS = 3.
    Best regards,
    Samuel

  • Tracking the custom table changes

    Hai,
    plz let me know how to track the changes in custom table?
    thankyou.
    Moderator message: please search for available information before asking.
    locked by: Thomas Zloch on Sep 17, 2010 12:55 PM

    Please SEARCH in SCN before posting.

  • Best way to update custom table

    Hello experts,
    Iu2019m writing a report program and after pulling data from a custom table Iu2019m modifying certain fields within internal table and then eventually update custom table. The way Iu2019m updating custom table is working fine. However Iu2019m concern about performance issues because Iu2019m doing update on custom table within loop.
    Here is my code for reference.
    *&      Form  update_contracts
          text
    -->  p1        text
    <--  p2        text
    FORM update_contracts .
    Update record in an internal table first
      loop at izsc_compliance into wa_zsc_compliance..
        wa_zsc_compliance-zapproval = c_accepted.
        wa_zsc_compliance-CHANGED_DT = sy-datum.
        wa_zsc_compliance-CHANGED_TM = sy-uzeit.
        wa_zsc_compliance-CHANGED_BY = sy-uname.
        modify izsc_compliance from wa_zsc_compliance index sy-tabix.
        write:/ sy-tabix, wa_zsc_compliance-vbeln_new, wa_zsc_compliance-zapproval.
        if p_test is initial.
          move wa_zsc_compliance to zsc_compliance.
          update zsc_compliance.
        endif..
      endloop.
    Write records to database
      if p_test = 'X'.
        skip.
        write:/ 'Test mode'.
      endif.
    ENDFORM.                    " update_contracts
    Iu2019m not certain if there is any better way by not doing update within loop and update custom table outside this loop.
    Many thanks in advance.

    Hi,
    Yes, there is a better way to update the custom table. That will be more performance oriented and will be a much cleaner approach. As, I am not much aware of the custom table structure which you have in your program, the best way that I can suggest is to remove the update statement from that check. I guess you are checking against the mode - test or production. Once you have done the check, put the selected entries in an internal table which is same as database table. And then in a single command - a single array operation as it is commonly called, you can update the custom table.
    Have a look at the following link
    [Overwriting Several Lines Using an Internal Table|http://help.sap.com/saphelp_bw33/helpdata/en/fc/eb3a94358411d1829f0000e829fbfe/content.htm]
    [Inserting or Changing Lines|http://help.sap.com/saphelp_bw33/helpdata/en/fc/eb3ac8358411d1829f0000e829fbfe/content.htm]
    You can also scan the forum for multiple links and references and sample examples.
    Hope this will help. The above approach will be much more performance oriented and will help to optimize. Also, check where exactly you are providing the locking feature if at applicable in your business functionality.
    Regards,
    Samantak.

  • Mass upload of data into Custom table

    Hello all,
                I made search in SDN and could not find the best solution to my problem and hence posting .
               What is the best way for Mass upload of data into Custom database table ?
               I think LSMW would not be a viable option as it would take longer time .
               Locking of the table also needs to be taken care.
               PLease let me know if you have a alternative to this and the best way to do this .
    Comradely,
    K.Sibi

    Hi Sibi,
    See Lock objects are required when we enter the data through screen level, or multiple users should not enter the data at same time.
    Create one Lock object in SE11, It automatically creates FM.
    DEQUEUE_EYTEST2                Release lock on object EYTEST2
    ENQUEUE_EYTEST2                Request lock for object EYTEST2
    Call these FM in your program.
    EX: Refer this links
    1 http://help.sap.com/saphelp_nw70/helpdata/en/41/7af4c8a79e11d1950f0000e82de14a/content.htm
    2 http://wiki.sdn.sap.com/wiki/display/Snippets/lockingandunlockingofthe+tables
    Rgds
    Aeda

  • I want to update the Custom table using the data available in ITAB.

    Hi,
    I want to updaste the Custom Table which is created by me (Ztable) using the data available in itab.(which i got from defferent standard tables)
    I want to update the custom table using the itab data How is it possible?
    Is any possible by using Modify ?
    DPK.

    example here
    modifying datbase table useing internal table
    advises before updating this datbase table plz lock that table to avoid incosistency
    write the logic for modifying
    Modify the database table as per new dunning procedure
    MODIFY fkkvkp FROM TABLE lt_fkkvkp .
    and finally unlock the table
    example
    *To lock table for further operations
    constants: lc_tabname TYPE rstable-tabname VALUE 'FKKVKP' . "FKKVKP
    CALL FUNCTION 'ENQUEUE_E_TABLE'
    EXPORTING
    tabname = lc_tabname
    EXCEPTIONS
    foreign_lock = 1
    system_failure = 2
    OTHERS = 3.
    IF sy-subrc EQ 0.
    To fetch all the contract accounts for customers of the segment
    Households/SME.
    PERFORM fetch_contract_accounts using lc_tabname .
    ENDIF. " IF sy-subrc EQ 0.
    *wrote the logic
    Modify the database table as per new dunning procedure from internal table
    MODIFY fkkvkp FROM TABLE lt_fkkvkp .
    *unlock the tbale
    CALL FUNCTION 'DEQUEUE_E_TABLE'
    EXPORTING
    TABNAME = uc_tabname .

  • Custom Table Attribute - How to handle the PropertyScriptElement

    Hi All,
    I have a custom Table attribute that I'd like to process via snippets.
    I've added kCellObjectScriptElement to my ScriptProviderBoss and I can see the request coming in to my ScriptProvider.
    The trouble is, I need to extract the ITableModel and GridID from the IScript in my AccessProperty() method in order to access my custom attribute, and I have no idea how.
    GetObjectType() for the IScript returns c_Cell (i.e. 'ccel')
    The scripting DOM provides the following info:
    cell (kCellObjectScriptElement-object)
    ScriptID = 'ccel', Name = "cell", Description = A table cell., BaseObject = kIDBasedObjectScriptElement, Suite = kTableSuiteScriptElement, Plugin = Table Model.InDesignPlugin CollectionScriptID = 'Cels', CollectionName="cells"
    When I just hard-code a string to represent the attribute, it appears in the snippet as follows:
    <Cell Self="ucbie1i0" Name="0:0" RowSpan="1" ColumnSpan="1" AppliedCellStyle="CellStyle/$ID/[None]" AppliedCellStylePriority="0" Sgdata="Hardcoded String">
        <ParagraphStyleRange AppliedParagraphStyle="ParagraphStyle/$ID/NormalParagraphStyle">
            <CharacterStyleRange AppliedCharacterStyle="CharacterStyle/$ID/[No character style]"/>
        </ParagraphStyleRange>
    </Cell>
    Can anyone tell me how to proceed?
    Any help much appreciated.
    - Jackeen

    Moderator message - Please search before asking - post locked
    Moderator message - Cross post locked

  • Update PA0105 subtype-fields, PA0006 fields to Custom table

    Hi Experts,
    Please tell how can we UPDATE subtype-fields from PA0105 infotype to Custom tables. Is any functoin module is there. PA0105-USRTY(Subtype Fields:Primary Work Phone,Secondary Work Phone,Work Fax,Voice Mail,Pager,Email Address.) and UPDATE fields from PA0006 infotype (Fields:Mailcode,Building,Floor,Address1,City,State,Zip) to Custom table.
    Thanks,
    Spreddy

    Hi Srinivas,
    use like this
    call function 'HR_READ_INFOTYPE'
           exporting
                pernr           = pernr
                infty           =  '0267' "INfotype no
                begda           = datum
                endda           = datum
          importing
               subrc           = retcd
           tables
                infty_tab       = i0267 " table type table of p0267
           exceptions
                infty_not_found = 1
                others          = 2.
      read table i0267 into p0267 index 1.
    Change the fields here u want to change
    Fill infotype record
      p0267-infty = '0267'.
      p0267-subty = lgart.
      p0267-pernr = pernr.
      p0267-begda = datum.
      p0267-endda = datum.
      p0267-opken = ' '.
      p0267-lgart = lgart.
      p0267-betrg = betrg.
      p0267-waers = 'USD'.
      p0267-ocrsn = '0001'.
    ENDIF.
    Enqueue personnel number
    lock that particular personal no which u r updating
      CALL FUNCTION 'BAPI_EMPLOYEE_ENQUEUE'
        EXPORTING
          number = pernr
        IMPORTING
          return = return.
      IF NOT return IS INITIAL.
        MESSAGE ID return-id TYPE return-type NUMBER return-number
                 WITH return-message_v1 return-message_v2
                      return-message_v3 return-message_v4.
        RAISE action_stopped.
      ENDIF.
    Perform PA30 via infotype_operation
    Function that update the record
      CALL FUNCTION 'HR_INFOTYPE_OPERATION'
        EXPORTING
          infty         = '0267'
          number        = pernr
          validityend   = datum
          validitybegin = datum
          record        = p0267
          operation     = 'INS'
          dialog_mode   = '2'
        IMPORTING
          return        = return.
      IF NOT return IS INITIAL.
        MESSAGE ID return-id TYPE return-type NUMBER return-number
                 WITH return-message_v1 return-message_v2
                      return-message_v3 return-message_v4.
        RAISE action_stopped.
      ENDIF.
    Thanks & Regards,
    Ruchi Tiwari

  • Retriction of access the custom table

    Hi Experts,
        I created a custom table. Here I have 5users. the first 3 user want to access the custom table in change mode. the remaining 2 users want to see table in diplay mode only.
        But here SAP is allow access the table in change mode only to one user. Is it not possible to do this one to multiple users?
       Please tell me.
      Thanking  you.

    Hi,
    Here lock concept comes into picture, as you are saying like 3 users in change mode where if one is editing the records and if another opens then obviously table locks. Check this and ask your Basis guys for the authorizations setting like for 3 users change action and for the another 2 users display action.
    Cheers!!
    VEnk@

Maybe you are looking for

  • Error in starting up the database . . . .

    Dears,, While startup DB, i faced the following error: ORA-01190: control file or data file 1 is from before the last resetlogs ORA-01110: data file 1: ' /oracle/..../system01.dbf ' How can solve this please ?

  • The same condition type calculates different amount !

    Hi there, On the print out of an invoice (VF03) I have realized that two different rows at the end of the invoice with the same description (Min Freight Charge) display 2x different amount of freight, once I check the condition type, on the header le

  • Sorting problems in LT03

    The problem is the sorting of TO items for a pick delivery (LT03). In some cases we have the situation that the TO item sort is incorrect. Then we cancel the TO's (LT15) and recreate the pick TO's (LT03) and the item sort is correct! This process req

  • Edit or delete a post?

    Hi there! I am trying to delete a post - maybe an Apple Host could help me out. http://discussions.apple.com/message.jspa?messageID=13207390#13207390 "Time Machine Freezes During Backup" This post contains personal email and information, when I googl

  • CD Rom for Photoshop Elements 12

    I have just recently purchased Photoshop Elements 12 but I do not have a CD Rom.  To install it do I have to purchase an external drive or is there an online code?