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

Lock object on database table

Have a requirement to create a lock object on database table. Can anyone table if lock object can be created individually on any database table? Not sure if i can apply on any database table. Please confirm

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

3 Answers

  • Best Answer
    author's profile photo Former Member
    Former Member
    Posted on Oct 31, 2008 at 10:33 AM

    Hi,

    You can create the locks for tables and views too.

    There might not be any issues while you lock the any database table it all depends on the table that you lock and the data follow from the table.

    Cheers!!

    VEnk@

    Edited by: Venkat Reddy on Oct 31, 2008 4:04 PM

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Oct 31, 2008 at 10:42 AM

    Hello,

    You try with this FMs.

    You will get it?

    CONSTANTS: y_lk_plaf TYPE rstable-tabname VALUE 'PLAF',

    y_lk_plnum TYPE rstable-varkey VALUE 'PLNUM'.

    *Lock Table

    CALL FUNCTION 'ENQUEUE_E_TABLEE'

    EXPORTING

    mode_rstable = 'E'

    tabname = y_lk_plaf

    varkey = y_lk_plnum

    EXCEPTIONS

    foreign_lock = 1

    system_failure = 2

    OTHERS = 3.

    IF sy-subrc = 0.

    • Update Field PLAF-YYSHORT

    UPDATE plaf

    SET yyshort = y_k_x

    WHERE plnum = y_lv_plnum.

    ENDIF.

    • Unlock Table

    CALL FUNCTION 'DEQUEUE_E_TABLEE'

    EXPORTING

    mode_rstable = y_k_e

    tabname = y_lk_plaf

    varkey = y_lk_plnum.

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Oct 31, 2008 at 11:30 AM

    This message was moderated.

    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.