‎2008 May 02 4:43 PM
Hi,
I created a simple RFC FM and called from report program with a valid destination to XI system.
the only parameters i am passing is tables ITAB to XI.
But it is going in Synchronous mode to XI.. but i want in Asynchronous RFC...
Any idea how to achieve this?
CALL FUNCTION 'ZTEST_RFC' DESTINATION 'SAPXI'
TABLES
T_TAB = ITAB.
how can i change this to Asynchronous RFC?
Giri
‎2008 May 02 4:51 PM
Hi,
Use IN BACKGORND TASK.
CALL FUNCTION 'ZTEST_RFC' DESTINATION 'SAPXI'
IN BACKGOURND TASK
TABLES
T_TAB = ITAB.
Any error, you can check in the transaction SM58.
Edited by: Fernando Pinto on May 2, 2008 6:12 PM
‎2008 May 02 4:49 PM
CALL FUNCTION - RFC
INDEX @@CALL FUNCTION - RFC@@ABAP Statement@@
Syntax Forms
Synchronous RFC
1. CALL FUNCTION func DESTINATION dest
parameter_list.
Asynchronous RFC
2. CALL FUNCTION func STARTING NEW TASK task
[DESTINATION {dest|{IN GROUP {group|DEFAULT}}}]
parameter_list
[{PERFORMING subr}|{CALLING meth} ON END OF TASK].
Transactional RFC
3. CALL FUNCTION func IN BACKGROUND TASK
[DESTINATION dest]
parameter_list
[AS SEPARATE UNIT].
4. CALL FUNCTION func IN BACKGROUND UNIT
parameter_list.
‎2008 May 02 4:52 PM
Aparna,
I come across your answer by F1 help.... what i dont understand is
Asynchronous RFC
2. CALL FUNCTION func STARTING NEW TASK task
{IN GROUP {group
parameter_list
{CALLING meth} ON END OF TASK.
what task to be created?
how to modify my current RFC?
Giri
‎2008 May 02 5:14 PM
The task just has to be a valid input. you dont need to declare anything. You have to add one more form to receive results inside which you will use RECEIVE RESULTS FROM FUNCTION 'your_function_name '
‎2008 May 02 5:19 PM
CALL FUNCTION 'ZTEST_RFC' STARTING NEW TASK 'T_RFC' DESTINATION 'SAPXI'
PERFORMING receive_results ON END OF TASK
TABLES
T_TAB = ITAB.
FORM RECEIVE_RESULTS USING L_TASKMNAME.
RECEIVE RESULTS FROM FUNCTION 'ZTEST_RFC'
TABLES
T_TAB = ITAB.
EXCEPTIONS
COMMUNICATIONS_FAILURE = 1
SYSTEM_FAILURE = 2.
ENDFORM.
‎2008 May 02 5:27 PM
I GOT SHORT DUMP..
Exception condition "COMMUNICATION_FAILURE" raised.
A RAISE statement in the program "ZGIRI" raised the exception
condition "COMMUNICATION_FAILURE".
Since the exception was not intercepted by a superior
program, processing was terminated.
Giri
‎2008 May 02 6:43 PM
Add this to you main RFC call also
EXCEPTIONS
COMMUNICATIONS_FAILURE = 1
SYSTEM_FAILURE = 2.
‎2008 May 02 7:36 PM
APARNA,
Still same error, IN BACKGROUND TASK methods works for me but in my itab there are 2 fields .. but it sending only 1 field values and other fields r blank..
any idea?
Giri
‎2008 May 02 4:50 PM
Hello,
You need to put IN BACKGROUND MODE at the call function command.
Regards,
‎2008 May 02 4:51 PM
Hi,
Use IN BACKGORND TASK.
CALL FUNCTION 'ZTEST_RFC' DESTINATION 'SAPXI'
IN BACKGOURND TASK
TABLES
T_TAB = ITAB.
Any error, you can check in the transaction SM58.
Edited by: Fernando Pinto on May 2, 2008 6:12 PM
‎2008 May 02 5:16 PM
Hi Fernando,
the data is not passing to XI?
after call function i wrote write statemnt with the itab.
i can see values in basic list but its not passing to XI.
it showing there only empty structure
Regards
Giri
‎2008 May 02 7:48 PM
Hi,
Have you check the RFC destination SM59 connection ( Test Connection) ?
Looks like problems with XI.
In the XI, is the communication channel is OK?
Regards,
Fernando
‎2008 May 02 8:26 PM
If commnication channel is not setup correctly then why only 1 field values pass to XI?
i mean itab emp no: and emp name there
1 abc
2 xyz
3 dsf
in xi it is showing like
1
2
3
no values for emp name.
pls help on this issue..
Giri
‎2008 May 05 12:26 PM
Hi,
Please check in the SM59 , Tab "MDMP & Unicode" if Unicode is checked.
Regards,
Fernando