SAP R/3 форум ABAP консультантов
Russian ABAP Developer's Club

Home - FAQ - Search - Memberlist - Usergroups - Profile - Log in to check your private messages - Register - Log in - English
Blogs - Weblogs News

Asynchronous RFC: Avoiding errors



 
Post new topic   Reply to topic    Russian ABAP Developer's Club Forum Index -> Interfaces | Интерфейсы
View previous topic :: View next topic  
Author Message
admin
Администратор
Администратор



Joined: 01 Sep 2007
Posts: 1640

PostPosted: Thu Oct 04, 2007 9:10 pm    Post subject: Asynchronous RFC: Avoiding errors Reply with quote

Note 70087 - Asynchronous RFC: Avoiding errors

Symptom
When executing asynchronous RFCs with response with the syntax:
CALL FUNCTION func ...
STARTING NEW TASK taskname
PERFORMING form ON END OF TASK
....
the program remains active.

Additional key words
Asynchronous

Cause and prerequisites
When using asynchronous RFCs with response with the following syntax:
CALL FUNCTION func ...
STARTING NEW TASK taskname
PERFORMING form ON END OF TASK
....
the session remains active (in execution) and you may find some APPC TMs in the user list transaction (transaction code SM04) with terminal entries under the same user.

This situation can only occur if the FORM routine in which the responses from the previously executed asynchronous RFCs are received contains an ABAP/4 key word that causes an interruption of the program (such as CALL SCREEN, CALL DIALOG, CALL TRANSACTION, SUBMIT, COMMIT WORK, WAIT, Remote Function Calls, CPIC calls, and so on).

You may only use the FORM routines that are used for receiving the asynchronous RFCs for this purpose. Additional logic that depends on the asynchronous responses may only be executed (for example, after the key word WAIT UNTIL logexp) in the main program. Further information can be found in the online documentation for the key word RECEIVE RESULTS FROM FUNCTION func.

If synchronous RFCs are also used in the main program, in addition to asynchronous RFCs, the responses from the asynchronous RFCs may be received slightly before the responses from the synchronous RFCs. The responses from the synchronous RFCs may be lost if you use the key words that cause an interruption in the execution of the FORM routine. This would mean that the program cannot be exited.

Solution
An application error exists here. Please do not call the key words that cause an interruption in the program execution in the reception routine (RECEIVE RESULTS ... ) (such as CALL SCREEN, CALL DIALOG, CALL TRANSACTION, SUBMIT, COMMIT WORK, WAIT, Remote Function Calls, CPIC calls and so on).

Use only the FORM routine for receiving the asynchronous responses via RECEIVE RESULTS FROM FUNCTION func and move the execution of these commands into the main program, after the key word WAIT UNTIL logexp.
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    Russian ABAP Developer's Club Forum Index -> Interfaces | Интерфейсы All times are GMT + 4 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


All product names are trademarks of their respective companies. SAPNET.RU websites are in no way affiliated with SAP AG.
SAP, SAP R/3, R/3 software, mySAP, ABAP, BAPI, xApps, SAP NetWeaver and any other are registered trademarks of SAP AG.
Every effort is made to ensure content integrity. Use information on this site at your own risk.