Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

Enqueue Function Module

Former Member
0 Kudos

Hi there,

Is there any generic enqueue function module which will lock the program? I do not want to create a custom Enqueue FM.

Shylesh

1 ACCEPTED SOLUTION

RichHeilman
Developer Advocate
Developer Advocate
0 Kudos

Yes, there is.....



call function 'ENQUEUE_E_TRDIR'
 EXPORTING
*   MODE_TRDIR           = 'X'
    NAME                 = <report_name>
*   X_NAME               = ' '
*   _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.




Regards,

Rich Heilman

3 REPLIES 3

RichHeilman
Developer Advocate
Developer Advocate
0 Kudos

Yes, there is.....



call function 'ENQUEUE_E_TRDIR'
 EXPORTING
*   MODE_TRDIR           = 'X'
    NAME                 = <report_name>
*   X_NAME               = ' '
*   _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.




Regards,

Rich Heilman

0 Kudos

Hi Rich,

Do we have same kind of Function Module in BW systems also?

0 Kudos

I would think so.

Regards,

Rich Heilman