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

Similar Messages

  • Insert delete or update entry in Custom table from KONV entry changed

    Hi All,
    I have custom table ZKONV with only few required columns and should have same number of records as KONV has at any point in time.
    KONV is a cluster table so its not readable from ORACLE level. So ZKONV is created. But I dont know how to keep these both tables in sync.
    I need to perform insert delete or update entry in Custom table if insert delete or update happens on cluster table KONV from any transactions.
    As KONV is a cluster table and does not have changed time stamp I am not able to know the number of records changed in perticulat time period.
    Thanks,

    Thanks for reply,
    There is a Outside SAP system which needs to read KONV data to feed into their system, but as KONV is cluster table they are not able to read it from ORACLE level.
    To solve this we are thinking to create a transparent Z-table and will fill it with KONV and catch Update, delete or Insert statement and do same on ZKONv.
    Is this possible some how? by some database event or something....

  • Problem while downloading file from custom table

    Hi All,
    Im trying to download the file from the custom table where i have stored the uploaded files through apex.
    I have created the download procedure as mentioned in the oracle docs ,
    And given the execute grant for public user.
    and calling that procedure by calling the URL -- #OWNER#.download_my_file?p_file=#ID#
    But im getting the below error
    Forbidden
    You don't have permission to access /pls/apex/owner.download_my_file on this server.
    Oracle-Application-Server-10g/10.1.2.0.2 Oracle-HTTP-Server Server at servername Port number
    Can any one tell whats the problem here.
    Thanks in advance
    regards,
    Arumugam KR

    Your function apex_util.get_blob_file_src under region, the first argument must be the name of page item anywhere in your application that is of type "file browse." So if your form for uploading the blob content is on page 11 and the file browse item is "P11_FILE_NAME" then your query would look like below:
    SELECT FILE_ID
         , FILE_NAME
          , CASE WHEN NVL(dbms_lob.getlength(BLOB_CONTENT),0) = 0
           THEN NULL
            ELSE
                  CASE WHEN attach_mimetype like 'image%'
                THEN '<img src="'||apex_util.get_blob_file_src('P11_FILE_NAME',id)||'" />'
                ELSE
                     '<a href="'||apex_util.get_blob_file_src('P11_FILE_NAME',id)||'">Download</a>'
               end
           END new_img
        FROM TABLE_NAME
    GET_BLOB_FILE_SRC FunctionAs an alternative to using the built-in methods of providing a download link, you can use the APEX_UTIL.GET_BLOB_FILE_SRC function. One advantage of this approach, is the ability to more specifically format the display of the image (with height and width tags). Please note that this approach is only valid if called from a valid Oracle Application Express session. Also, this method requires that the parameters that describe the BLOB to be listed as the format of a valid item within the application. That item is then referenced by the function.>
    [url http://docs.oracle.com/cd/E14373_01/apirefs.32/e13369/apex_util.htm]GET_BLOB_FILE_SRC

  • Facing problem while updating IInfotype 0009-bank details through workflow

    Dear SAP Gurus,
    I am facing a problem while updating Infotype 0009 through workflow which is integrdated with portal.
    Scenario:
    Employee logins to portal and changes his/her bank details like payee name, bank key, account number, postal code and city of bank, bank name etc.
    Once he submits the request, my workflow is triggered through SAP_WAPI_START_WORKFLOW which is called from portal and goes through various approval steps and finally reaches the step where the container elements are finally to be updated in IT0009.
    Field bank account number (BANKN), which is part of table PA0009 are easily updates using the FM HR_INFOTYPE_OPERATION by first enqueuing the employee number and after the update dequeuing it.
    However fields like payee name (EMFTX) bank key (BANKL) , bank name(BANKA -structure BNKA_BF-this is automatically fetched based on bank key) and postal code(BKPLZ) and city of bank (BKORT) are from structure Q0009 (on the infotype 9 screen level) and from table BNKA (at table level). The problem is that these are not getting updated by HR_INFOTYPE_OPERATION as they are not the part of infotype 9.
    Can anyone help me to understand how can these fields be updated ?
    Quick help will be highly appreciated.

    Hi Spantaleoni,
    Thanks for your quick response.
    Well actually the table BNKA is a master table for the bank information and we must not create entries in it or update the table programatically,  rather we should  use the available data in it.
    Now say employee currently has bank as A and he wants to change it as B which is available in BNKA then he will just select the bank B from search help provided in portal which again comes from table BNKA only. Employee then submits the info and it must get updated in the infotype PA0009.
    As far as think, this should be done on screen level of infotype PA0009 as I have already mentioned that certain fields are coming from structure Q0009 and they cannot be updated on PA0009 table level.
    I am just looking for way through which I can update the screen of infotype PA0009 of employee through workflow.
    Regards

  • Problem while updating Delivery date uisng BAPI_PO_CHANGE

    Hi friends,
    Iam facing a problem while updating delivery date of a purchase order using the bapi BAPI_PO_CHANGE
    After the bapi is getting triggered iam geting sy-subrc = 0
    But in the return parameters iam getting 3 error messages so iam unable to update the  delivery date..
    Error meesage which iam getting are
    a) Purchase order still contains faulty items
    b) Enter Tax Code
    c) Instance 1000001 of object type PurchaseOrder could not be changed.
    How can i correct it..
    Please find my code below
    LOOP AT it_eket INTO wa_eket.
        wa_poschedule-po_item = wa_eket-ebelp.
        wa_poschedule-sched_line = wa_eket-etenr.
        wa_poschedule-delivery_date = wa_eket-eindt.
        APPEND wa_poschedule TO poschedule.
        wa_poschedulex-po_item = wa_eket-ebelp.
        wa_poschedulex-sched_line = wa_eket-etenr.
        wa_poschedulex-po_itemX = 'X'.
        wa_poschedulex-sched_lineX = 'X'.
        wa_poschedulex-delivery_date = 'X'.
        APPEND wa_poschedulex TO poschedulex.
    READ TABLE IT_EKPO INTO WA_EKPO WITH KEY EBELN  = WA_EKET-EBELN
                                             EBELP = WA_EKET-EBELP.
          IF SY-SUBRC = 0.
          WA_POITEM-PO_ITEM = WA_EKPO-EBELP.
          APPEND WA_POITEM TO POITEM.
          WA_POITEMX-PO_ITEM = WA_EKPO-EBELP.
          WA_POITEMX-PO_ITEMX = 'X'.
          APPEND WA_POITEMX TO POITEMX.
         ENDIF.
        CALL FUNCTION 'BAPI_PO_CHANGE'
          EXPORTING
            purchaseorder = wa_eket-ebeln
          TABLES
            return        = t_bapiret2
            POITEM        = POITEM
            POITEMX       = POITEMX
            poschedule    = poschedule
            poschedulex   = poschedulex.
        READ TABLE t_bapiret2 INTO wa_bapiret2 WITH KEY type = 'E'.
        IF sy-subrc NE 0.
          CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'
    * EXPORTING
    *   WAIT          =
    * IMPORTING
    *   RETURN        =.
          IF sy-subrc = 0.
            WRITE :  'DELIVERY DATE UPDATED'.
          ENDIF.
        ENDIF.
    how can i correct it...
    Regards
    Kumar

    Hi,
    Pass the following values...
    POACCOUNT LIKE BAPIMEPOACCOUNT...
    poaccount-TAX_CODE = ? (value)....
    That should take care of the missing field.
    Regards,
    Madan..

  • Problem while updating the Support Package 17 on my SAP WAS SP9

    Hi,
    I'm facing problem while updating the Support Package 17 on my SAP WAS SP9
    ERROR 2006-10-13 10:23:22
    FSL-06002  Error 2 (The system cannot find the file specified.
    ) in execution of a 'CreateProcess' function, line (284), with parameter (java.exe ...).
    Please help me in this regard.....
    Thanks in advance...
    Satya

    Hello gentlemen, I am also having problem with the following running on 64 bit Windows and SQL2005/64 bit. I am erroring in Step 8 'Updating JDBC' driver. I am attempting to update from SP9 to SP18. The WEBAS Jave installed went flawless but I seem to be stuck here. Any help is appreciated...
    ERROR 2006-11-22 10:13:57
    FSL-06002  Error 2 (The system cannot find the file specified.
    ) in execution of a 'CreateProcess' function, line (284), with parameter (java.exe ...).

  • There was a problem while updating ios 7.1 now my ipad isnt starting up just shows a symbol of itunes with a arrow towards it with its USB cable

    there was a problem while updating ios 7.1 now my ipad isnt starting up just shows a symbol of itunes with a arrow towards it with its USB cable

    YOU ARE IN RECOVERY MODE
    1. Turn off iPad
    2. Turn on computer and launch iTunes (make sure you have the latest version of iTune)
    3. Plug USB cable into computer's USB port
    4. Hold Home button down and plug the other end of cable into docking port.
    DO NOT RELEASE BUTTON until you see picture of iTunes and plug
    5. Release Home button.
    ON COMPUTER
    6. iTunes has detected iPad in recovery mode. You must restore this iPad before it can be used with iTunes.
    7. Select "Restore iPad"...
    Note:
    1. Data will be lost if you do not have backup
    2. You must follow step 1 to step 4 VERY CLOSELY.

  • Access Privileges problem while updating ipod

    Access Privileges problem while updating ipod
    so im having troubles updating my ipod when i attempt to update it i get a message that says The ipod "Mitch" cannot be updated you do not have enough access privileges for this opperation
    some of my things are updated but not all
    any help would be greatly appreciated!
    Dell   Windows XP  

    hi j.block!
    hmmmmmmmmmmm. one other thing that might be worth a try if all else fails. i have once seen something like this turn out to be caused by a really kinky version of this issue:
    iTunes: "privileges" or "permissions" issue when importing audio CD or adding music to library
    ... where the permissions were odd on the ipod itself ... but i've only seen that happen once. it's probably worth checking on only if nothing else seems to be working for you.
    love, b

  • Unable to delete last entry in Custom table

    Hi,
    I have one custom table which allows only some specific entries to be maintained in the table.I have used a standard table as a check table for dis.I found no issue while maintaining entries in the table.But when i try to delete the last entry in the table i get the message "No entry exist".Long textNo entries were found when importing data from the database.
    Kindly help.

    Hi,
    If it is not possible through table maintainence then write a small Z program to delete the entries in devlopment system and then if then if you want you can transfer those to other systems.
    delete from ZTABLE where {give your condition for the last record}.
    Regards,
    Sandipan

  • How to find out the volume of the data updated in the custom table

    Hi,
    I need to find out the the volume of the data inserted or updated in the the custom table(Y tables).I have tried by the sm37.the job running in to update the table but i didnot get thde amount of the data.and if get the volume of the data which being updated in the custom table is there any option to control that amount to being updated?
    Thanks in advance .....waiting for the respone.

    Hi Sreenivas.
    How did you find the solution to this? Trying to do the same thing!
    Cheers,
    Tom

  • 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.

  • Problem in updating entries in Table Maintenance of custom table

    Hi Gurus,
    Need help. When I update existing entries in the table maintenance generator, they do not get updated after save. Is there a setting in data dictionary that causes this?

    Just noticed that the field that I'm trying to update is a KEY FIELD.
    Usually, when a table maintenance is generated, key field columns are set to uneditable. But for apparent reason, previous programers set it as editable. Is there a way to edit the Key fields?

  • Problem while creatin a site customer

    dear all,
    I m facing a problem while creating Customer for the Site from WB01.
    The following Error is coming " KNVV_CHSPL does not exist in the status table (TMOD*)".
    Kindly help me solving this issue.
    Regards
    Harshita Saxena

    Hi Arshita,
    This issue is corrected. You should make a search in SAP Marketplace. There is a note to correct that issue.
    I cannot search from my place (mobile handy device) but you should be able to find it easily in LO-MD-BP-CM or FI-AP* or FI-AR* + TMOD* or the error number.
    The note is quite recent. Probably less than 6 months.
    reward points if helpful.
    BR

  • Problem while update and insert data in table

    Hi All,
    I have problem while save line data....
    I have an advance table.I take remove and duplicate line in message choice of advance table action layout.
    Also there is one temp table to save Po number data which is populated in advance table according to PO Number search.And In Temp table record number is column which use
    to insert and update data in temp table which mention in procedure
    Problem is that : When i Searched PO Number and duplicate line and save that record it insert a new line always and it insert record according to duplicate line no .It not update previous line,insert new line always according to duplicate line no.
    Please tell me what is solution?
    Thanks,
    Neil

    Hi,
    I am not cleared with your requirement.
    If possible send me the screenshots for the same.
    --Sushant
    [email protected]

  • Issue while modifying entries in custom infotype after enhancement.

    Hi All ,
    I have enhanced custom Infotype (Added 2 new fields).
    After enhancement, I am facing one issue while updating infotype through FM HR_INFOTYPE_OPERATION.
    Issue is that I am not able to update/modify records through FM HR_INFOTYPE_OPERATION.
    RETURN parameter of FM comes empty indicating no errors but actual records in database table are not updated. I debugged FM and found that SAVE button on PA30 screen is disabled.
    Anyone knows reason for above proble and also please help me in solving issue.
    Regards,
    Jigar Thakkar.

    Thanks for your response.
    Yes i am able to update IT9201 through PA30 but not with FM HR_INFOTYPE_OPERATION. Also I have activated PXXXX structure through PM01.
    While debugging FM HR_INFOTYPE_OPERATION i saw that SAVE button is disabled and processing stops there.
    Regards,
    Jigar.

Maybe you are looking for

  • Problem with checkbox in the selection screen

    Hi guys, I have a problem with the check box in the selection screen.When i select a check box then a field in the selection screen should be enabled for entering a value.Again if i unselect the checkbox then the field should be disabled for entering

  • How to find the list of  different material in other SAP system.

    We have two SAP different systems.  there is an integration between two systems. One system has 2 millions materails (parts) and other system has 6 millions materails (parts). I need to know the list of what are those 4 miilions of materials in the o

  • Problems changing from on account to the other after 10.5.8 update

    Since I updated to OS X 10.5.8 my Macbook which has two users accounts, refuses from time to time to switch to the other account (No second login screen appears when asked to switch) When I ask for the Main login screen the user screen turns and I ge

  • History of Table Alterations

    Hi , How can I find the table alteration made in the database tables? Is there is any system defined tables are there to store these history informations? Thanks Jobin .SP

  • VGA display powered off

    iMac in classroom, with VGA display connected for occaisional use.  When I open a new finder window it opens on this 'second display' which is not on, and thus invisible to me.  I want the window to appear on the iMac desktop, but it uses the externa