Application Development and Automation 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: 
Read only

Enqueue Function Module

Former Member
0 Likes
869

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
Read only

RichHeilman
Developer Advocate
Developer Advocate
0 Likes
647

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
Read only

RichHeilman
Developer Advocate
Developer Advocate
0 Likes
648

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

Read only

0 Likes
647

Hi Rich,

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

Read only

0 Likes
647

I would think so.

Regards,

Rich Heilman