‎2010 Jan 08 7:36 AM
Hi All,
I am using fm VIEW_ENQUEUE to enqueue the records of the table but the problem is even when a range is passed then also it is locking the whole table..
I want it to lock only those p[articular records so that some other user can update other records simultaneously..
please help
‎2010 Jan 11 6:37 AM
Yes I am passing X to that paramenter..
But instead of passing any view name i am passing table name to it..
So can you please suggest something
‎2010 Jan 08 1:56 PM
Hi,
are you passing an 'X' to parameter ENQUEUE_RANGE ??
DATA rangetab LIKE vimsellist OCCURS 1 WITH HEADER LINE.
CLEAR: rangetab, rangetab[].
rangetab-viewfield = 'TYPE'.
rangetab-operator = 'EQ'.
rangetab-value = etype.
rangetab-tabix = 2.
rangetab-ddic = 'S'.
rangetab-converted = 'X'.
APPEND rangetab.
CALL FUNCTION 'VIEW_ENQUEUE'
EXPORTING
action = 'E'
enqueue_mode = 'E'
view_name = 'VUSREXTID'
enqueue_range = 'X'
TABLES
sellist = rangetab
EXCEPTIONS
client_reference = 1
foreign_lock = 2
invalid_action = 3
invalid_enqueue_mode = 4
system_failure = 5
table_not_found = 6
OTHERS = 7.
‎2010 Jan 11 6:37 AM
Yes I am passing X to that paramenter..
But instead of passing any view name i am passing table name to it..
So can you please suggest something
‎2010 Jan 12 4:57 AM
Hi Palak,
Check this out,
ld_viewname LIKE ocus-table
ld_error.
DATA lt_sellist LIKE vimsellist OCCURS 0 WITH HEADER LINE.
CLEAR ld_error.
lt_sellist-viewfield = 'AFAPL'.
lt_sellist-operator = 'EQ'.
lt_sellist-value = ld_afapl.
lt_sellist-ddic = 'B'.
APPEND lt_sellist.
CALL FUNCTION 'VIEW_ENQUEUE'
EXPORTING
action = vcl_enq_action
enqueue_mode = 'E'
view_name = ld_viewname
enqueue_range = 'X'
TABLES
sellist = lt_sellist
EXCEPTIONS
client_reference = 1
foreign_lock = 2
invalid_action = 3
invalid_enqueue_mode = 4
system_failure = 5
table_not_found = 6
OTHERS = 7.
CASE sy-subrc.
WHEN 0.
CLEAR ld_error.
WHEN 2.
ld_error = 'L'. " Tabelle gelockt
WHEN OTHERS.
ld_error = 'X'. " Systemfehler.
ENDCASE.
CLEAR sy-subrc.
ENDFORM. " ENQUEUE_TABLES
Hope it helps you,
Abhijit G. Borkar