Skip to Content
author's profile photo Former Member
Former Member

how to check lock on table or transaction

Hi All,

I am performing BDC recording for transaction CJR2. Before doing the call transaction i want to check if the transaction is already open.

I am using the fm 'enqueue_e_Table' and passing the tables CCSS and COSS (which are updated by thr transaction) .

But, even when the transaction is open in change mode, the function module does not give me foreign lock., it returns sy-subrc 0.

My requirement is i should not perform the BDC if the transaction is already open.Kindly help me in this.

Regards,

S.Subasree

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

4 Answers

  • Posted on Feb 15, 2010 at 05:18 AM

    Hi,

    Try with below FM,

    ENQUEUE_EKCCSSS

    Before you call the BDC you need to dequeue with FM DEQUEUE_EKCCSSS.

    You can keep a break point in this FM and see what values are being passed.

    But BDC will do this validation for you. Messages are collected into messages table. So i don't think you need seperate validation for this.

    Thanks,

    Vinod.

    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on Feb 15, 2010 at 05:25 AM

    Hi,

    There is a System fields SY-TCODE. Use this for your requirement.

    Regards,

    Surendar Reddy.

    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on Feb 15, 2010 at 05:31 AM

    Hello Subasree,

    I am using the fm 'enqueue_e_Table' and passing the tables CCSS and COSS (which are updated by thr transaction)

    The check you are performing here does not validate that the transaction is open. You are trying to check the DB locks but ideally the Db locks will be maintained when the SAP DB is actually updated & not when the trxn is opened.

    Open CJR2, go to SM12 & check if lock entries are maintained against the user. I am sure you will find none.

    You should undersatnd the difference between SAP Lock & DB lock. Check this SAP documentation on [SAP Lock Concept|http://help.sap.com/saphelp_nw04/Helpdata/EN/c2/2d7037ecc92a7ee10000009b38f8cf/frameset.htm].

    BR,

    Suhas

    Edited by: Suhas Saha on Feb 15, 2010 11:03 AM

    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on Feb 15, 2010 at 05:34 AM

    Hi,

    If the transaction code CJR2 is already open in change mode for a particular data, the BDC will not allow to update the same data in CJR2. I think there is no need to use separate fm to check whether the tocde is open in change mode.

    Regards,

    Vinod

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.