on 03-01-2006 1:23 PM
Hi,
I have a user-exit, that must modify a value. But this value have a lock entry (it's my own transaction that set this lock-entry). So I would like to call a function in background task to modify the value when the lock entry disapear.
But ...
I don't see anything append in the SM50.
If I call the function not in background, I could debug the function.
When I set background debugging nothing append.
I have set the RFC option in the function module.
CALL FUNCTION 'ZCALL_MB26_CONFIRMATION_OT'
IN BACKGROUND TASK AS SEPARATE UNIT DESTINATION 'NONE'
Rgd
Frédéric
Use the Commit work statement.
See the help on calling in background task...
<i>The function modules registered for the current SAP LUW are started at the COMMIT WORK statement in the sequence, in which they were registered. The statement ROLLBACK WORK deletes all previous registrations of the current SAP LUW.</i>
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello Fred,
This is a sample code to wait for unlock (but if a user is in modification it can be endless).
data : w_garg like seqg3-garg.
data : t_enq like seqg3 occurs 0.
concatenate sy-mandt tplnr into w_garg.
do.
refresh t_enq.
call function 'ENQUEUE_READ'
exporting
gclient = sy-mandt
gname = 'IFLOT'
garg = w_garg
GUNAME = SY-UNAME
LOCAL = ' '
IMPORTING
NUMBER =
SUBRC =
tables
enq = t_enq
EXCEPTIONS
COMMUNICATION_FAILURE = 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.
if t_enq[] is initial.
exit.
endif.
enddo.
David
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Have you included an endless loop in the FM to "catch" it at background debugging?
e.g.
data a type i value 1.
while a eq 1.
change value in the debugger to continue
endwhile.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
90 | |
10 | |
10 | |
10 | |
7 | |
7 | |
6 | |
5 | |
4 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.