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: 

How to use log object in report?

Former Member
0 Kudos

Hi,

I created lock object in se11 with name ELOC. In program Called FM ENQUEUE & DEQUEUE .

But it not working properly. What might be the reason. Can any one give here 1 sample program.

Thanks.

1 ACCEPTED SOLUTION

Former Member
0 Kudos

First were you really able to create Lock object ELOC ?????

Because all cutomer lock objects should start with EZ , so i m taking EZLOC as your lock object name to proceed further.

Once you have created lock object in se11 SAP system automatically creates two FM

ENQUEUE_EZLOC - For locking

DENQUEUE_EZLOC - For unlocking

You have to use the above FM to lock the table and unlock while you do any DML operation in database.

Based on your lock object creation the exporting fields are created in the FM .

CALL FUNCTION 'ENQUEUE_EZLOC'

EXPORTING

XXXXXXX = 'E' ( Lock Type )

XXXXXXX = XXXXXXX

XXXXXXX = XXXXXXX

  • _SCOPE = '2'

_wait = 'X'

  • _COLLECT = ' '

EXCEPTIONS

foreign_lock = 1

system_failure = 2

OTHERS = 3.

CHECK sy-subrc EQ 0.

  • DML Operation of the database

Update XXXXXXXXXXXXXXXXX

CALL FUNCTION 'DEQUEUE_EZLOC'

EXPORTING

XXXXXXX = 'E'

XXXXXXX = XXXXXXX

XXXXXXX = XXXXXXX .

  • _SCOPE = '3'

  • _SYNCHRON = ' '

  • _COLLECT = ' '

Thanks,

Karthik

3 REPLIES 3

GauthamV
Active Contributor
0 Kudos

hi,

check this.

[http://help.sap.com/saphelp_nw70/helpdata/en/a2/3547360f2ea61fe10000009b38f839/content.htm]

Former Member
0 Kudos

First were you really able to create Lock object ELOC ?????

Because all cutomer lock objects should start with EZ , so i m taking EZLOC as your lock object name to proceed further.

Once you have created lock object in se11 SAP system automatically creates two FM

ENQUEUE_EZLOC - For locking

DENQUEUE_EZLOC - For unlocking

You have to use the above FM to lock the table and unlock while you do any DML operation in database.

Based on your lock object creation the exporting fields are created in the FM .

CALL FUNCTION 'ENQUEUE_EZLOC'

EXPORTING

XXXXXXX = 'E' ( Lock Type )

XXXXXXX = XXXXXXX

XXXXXXX = XXXXXXX

  • _SCOPE = '2'

_wait = 'X'

  • _COLLECT = ' '

EXCEPTIONS

foreign_lock = 1

system_failure = 2

OTHERS = 3.

CHECK sy-subrc EQ 0.

  • DML Operation of the database

Update XXXXXXXXXXXXXXXXX

CALL FUNCTION 'DEQUEUE_EZLOC'

EXPORTING

XXXXXXX = 'E'

XXXXXXX = XXXXXXX

XXXXXXX = XXXXXXX .

  • _SCOPE = '3'

  • _SYNCHRON = ' '

  • _COLLECT = ' '

Thanks,

Karthik

Former Member
0 Kudos

check this thread. U have sample program.