‎2011 Jul 17 6:39 AM
Hi all. I have a tricky situation now, I am doing a POC on parallel processing.
I am getting an ABAP dump on the following Call Function line which is in class lcl_steer_114numc (See below for full program):
METHOD start.
CALL FUNCTION 'Z_ZZCLS_STEER_114NUMC'
STARTING NEW TASK me->id
CALLING me->finish ON END OF TASK.
ENDMETHOD. "start
However I get the following ABAP dump:
Short text
Statement "CALL FUNCTION .. DESTINATION/STARTING NEW TASK/IN BACKGROUND TASK"
The function module only contains a wait statement to simulate parallel processing. It is strange that it dumps here, because when I change the FM call to another call that has been triggered successfully from other classes, it still produces the same ABAP dump.
The background of the Proof Of Concept is to see if I can get an event to trigger the next process that depends on the outcome of the previous process. Parallel processes are run in the start methods by calling RFC.
<Garbled code removed>
Moderator Message: Please post relevant portions of the code only.
Edited by: Suhas Saha on Jul 17, 2011 1:17 PM
‎2011 Jul 17 9:01 AM
Hello Shahrin,
You've missed the addition DESTINATION 'NONE' addition in the call of the asynch-RFC. If you don't use the DESTINATION addition, the RFC will be treated like a normal FM.
Read the F1 documentation on STARTING NEW TASK addition for further details.
BR,
Suhas
PS: I suppose you should post the complete ST22 analysis for better responses.
‎2011 Jul 17 9:01 AM
Hello Shahrin,
You've missed the addition DESTINATION 'NONE' addition in the call of the asynch-RFC. If you don't use the DESTINATION addition, the RFC will be treated like a normal FM.
Read the F1 documentation on STARTING NEW TASK addition for further details.
BR,
Suhas
PS: I suppose you should post the complete ST22 analysis for better responses.
‎2011 Jul 17 9:28 AM
Well, the thing is I did manage to run 3 other Function Modules asynchronously succeesfully prior to that function call, with the same exact function call syntax. Further more, I have tried editing it with your suggestion but I get the exact same dump.
The complete function group can be downloaded here (slinkee file):
The complete program can be downloaded here (slinkee file):
The complete ST22 dump can be found here:
Basically I ST22 gives me the following:
Runtime Errors RPERF_ILLEGAL_STATEMENT
Date and Time 17.07.2011 05:29:54
----------------------------------------------------------------------------------------------------
----------------------------------------------------------------------------------------------------
|Short text |
| Statement "CALL FUNCTION .. DESTINATION/STARTING NEW TASK/IN BACKGROUND TASK" |
----------------------------------------------------------------------------------------------------
----------------------------------------------------------------------------------------------------
|What happened? |
| Error in the ABAP Application Program |
| |
| The current ABAP program "Z_ZZB1_CLOSE_PERIOD_TEST2" had to be terminated |
| because it has |
| come across a statement that unfortunately cannot be executed. |
And it explains it here (but is not helpful / relevant at all) as I ran the program from SE38.
----------------------------------------------------------------------------------------------------
|Error analysis |
| There is probably an error in the program |
| "Z_ZZB1_CLOSE_PERIOD_TEST2". |
| The program was probably called in a conversion exit |
| or in a field exit. These are implemented by |
| function modules called CONVERSION_EXIT_xxxxx_INPUT/OUTPUT or |
| USER_EXIT_xxxxx_INPUT. |
| Conversion exits are triggered during screen field transports or |
| WRITE statements, field exits during field transports from the |
| screen to the ABAP/4 program. |
| In this connection, the following ABAP/4 statements are not allowed: |
| |
I hope you try to download the slinkee files and you will notice the call function I performed was no different than the other call function RFC calls that really are working.
‎2011 Jul 17 2:37 PM
Hi Shahrin,
to me the code looks quite reasonable. I do not understand the explanation given in the dump, I assume that the dump content creation has not been adapted properly to the oo context by SAP.
My only idea right now is that the function group is active but function module 'Z_ZZCLS_STEER_114NUMC' is inactive.
Did you try to call the FM 'as is' in SE37 test environment?
Thanks a lot for the interesting code - did you create it, has it been put to a blog? At first glance I hope I can re-use it for some parallel processing tasks.
Regards,
Clemens
‎2011 Jul 17 5:19 PM
Hi Shahrin Shahrulzaman,
did you have a look at SAP note 675042 - RPERF_ILLEGAL_STATEMENT in asynchronous RFC, especially this comment: "As of Release 700, the execution of RFCs in the response routine also leads to the "RPERF_ILLEGAL_STATEMENT" ABAP runtime error."
BR
Sandra
‎2011 Jul 18 3:34 AM
Hi Sandra,
Thanks a lot. Will award you full points. You have saved me a lot of time chasing ghosts.
Hi Clemens,
Good news is that Sandra gave me the right answer. The bad news is the SAP Note is not really a fix, but explains the limitation of SAP in which you can't call an asynchronous RFC from the receiving call of another asynchronous RFC. It didn't occur to me at all that this might be a limitation. Though I triggered another RFC by raising an event, I still could not escape this limitation.
I worked around this by en-queuing the process in a table when a finish event was triggered, and a loop that constantly polls for processes that needs to be run every second (not really the ideal solution, but.. oh well). And yes, be my guest if you want to use the code .. use the following link.
For anyone that wants to know how I worked around this limitation:
[Z_ZZB1_CLOSE_PERIOD_TEST3|https://docs.google.com/leaf?id=0B3sua1Bw4XK4Mjk0OTIzMDctNGNmOC00MzFkLWJiZDgtODIxMjBmMDNhZmQ0&hl=en_US]
‎2011 Dec 08 4:29 AM
For those who are interested, the requirements to this has matured into the following project:
‎2012 Jan 23 10:06 AM
Hi,
I have got the same bug, have gone through your explainatino & link but could not able to sort out the resolution, would you be able to in deatils furnish me the code and solution because this has become a show stopper.
Could you please provide me your mail id.