10-06-2008 8:29 AM
Hello!
We want enqueue the execution of a FM. So, we do:
CALL FUNCTION 'ENQUEUE...'.
CALL FUNCTION 'DO_SOMETHING'.
CALL FUNCTION 'DEQUEUE'....
If an error message occurs on FM 'DO_SOMETHING', the function dequeue is not executed. Do you know how we can resolve this problem?
Thanks a lot!
Edited by: LM on Oct 6, 2008 9:29 AM
10-06-2008 8:31 AM
Hi,
you must be checking the sy-subrc before call the FM 'Dequeue'...
10-06-2008 8:35 AM
When the type of message is E, the program abort its execution and we can not do noting (we can't consult the sy-subrc).
10-06-2008 8:39 AM
When a transaction finishes, locks are automatically released (usually!).
What is the nature of the function module? SAP Standard? Which one? If not, then change the function module so that it DOES set the sy-subrc.
matt
10-06-2008 9:17 AM
The Function Module is standard is "FMFR_CREATE_FROM_DATA". This function module show an error message and do not return. So, we can't do the dequeue.
10-06-2008 9:20 AM
Hi
I think we do not have any programable solution, we should contact basis team to remove the lock
Regards
MD
07-21-2009 5:13 PM
Hello LM,
Have you solved you problem with FMFR_CREATE_FROM_DATA showing message without return? Could you please share the solution?
Thank you in advance!
Kirill
11-18-2010 10:00 AM
Allthough this is a rather old question, I still would like to post a possible answer (maybe helpful for people facing the same problem):
Just disable all exceptions in the function module in the source code and add the generic statement "error_message = 1".
Ofcourse you now need to handle messages after execution of the function module - messages will not be shown on screen anymore,
So the code should look like this:
CALL FUNCTION 'FMFR_CREATE_FROM_DATA'
EXPORTING
i_flg_checkonly = space
i_flg_commit = 'X'
TABLES
t_posdata = pr_posdata
CHANGING
c_f_headdata = pr_head_data
EXCEPTIONS
doctype_not_allowed = 1
error_occured = 2
OTHERS = 3.
error_message = 1.
10-06-2008 8:42 AM
CALL FUNCTION 'ENQUEUE...'.
CALL FUNCTION 'DO_SOMETHING'.
MOVE SY-SUBRC TO W_SUBRC.
CALL FUNCTION 'DEQUEUE'....
IF W_SUBRC NE 0.
*ERROR MESSAGE
ENDIF.