Problem Executing RFC to File Scenario
I am currently working on RFC to File Scenario which is Asynchronous in Nature i.e. The RFC will send some data to XI and then it'll be dumped in an XML File on the shared drive.
Following are the steps which were performed by me :
1. i created an RFC Destination in R/3 using SM59 and entered the Required values as mentioned in the blog
2. Then i entered the same values in the communication channel of the sender RFC adapter.
I tested it from R/3 and the connection was successful.
3. i created an RFC in SE37 in the R/3 and just added an existing table under the "tables" tab. No further code was written in it. I saved it and activated it.
4. All the IR and ID objects were made and activated and then the scenario was run by sending a single data row by pressing F8. The RFC showed a message of "System Failure" and while looking into the XI Server (SXMB_MONI) the message gave absurd values with a error symbol(it a Red Light symbol and there was no Red Flag).
Initially, the XML file was getting posted in the shared drive but after further execution it stopped.
I am unable to figure out the problem. Kindly let me know where i am going wrong and what needs to be done to correct it ?
Arpil Gupta replied
You can use data of any bapi and send it to XI, lets say BAPI_GET_COMPANYDETAILS. So u create a RFC without any code, just copy the export parameters of BAPI_GET_COMPANYDETAILS as it's import parameters. This RFC you have to import in XI.
Code For Triggering data from R/3
CALL Function "RFC Name" IN BACKGROUND TASK destination <sm59 destination>