Application Development and Automation 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: 
Read only

Enqueue - Dequeue

Former Member
0 Likes
1,525

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
Read only

Former Member
0 Likes
1,235

Hi,

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

Read only

0 Likes
1,235

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

Read only

matt
Active Contributor
0 Likes
1,235

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

Read only

0 Likes
1,235

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.

Read only

0 Likes
1,235

Hi

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

Regards

MD

Read only

0 Likes
1,235

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

Read only

0 Likes
1,235

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.

Read only

Former Member
0 Likes
1,235

CALL FUNCTION 'ENQUEUE...'.

CALL FUNCTION 'DO_SOMETHING'.

MOVE SY-SUBRC TO W_SUBRC.

CALL FUNCTION 'DEQUEUE'....

IF W_SUBRC NE 0.

*ERROR MESSAGE

ENDIF.