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: 

Enqueue - Dequeue

Former Member
0 Kudos

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

8 REPLIES 8

Former Member
0 Kudos

Hi,

you must be checking the sy-subrc before call the FM 'Dequeue'...

0 Kudos

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).

matt
Active Contributor
0 Kudos

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

0 Kudos

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.

0 Kudos

Hi

I think we do not have any programable solution, we should contact basis team to remove the lock

Regards

MD

0 Kudos

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

0 Kudos

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.

Former Member
0 Kudos

CALL FUNCTION 'ENQUEUE...'.

CALL FUNCTION 'DO_SOMETHING'.

MOVE SY-SUBRC TO W_SUBRC.

CALL FUNCTION 'DEQUEUE'....

IF W_SUBRC NE 0.

*ERROR MESSAGE

ENDIF.