cancel
Showing results for 
Search instead for 
Did you mean: 

Problem Executing RFC to File Scenario

arkesh_sharma
Active Participant
0 Kudos

Hi,

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 ?

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi Arkesh,

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>

COMMIT WORK.

Answers (6)

Answers (6)

dharamveer_gaur2
Active Contributor
0 Kudos

hi Arkhesh,

u can import any bapi in Xi.No need to fill any manual data,data would be fechted from R/3 using RFC.u just import RFC.

arkesh_sharma
Active Participant
0 Kudos

Hi DharamVeer and Arpil,

Thank you for guiding me and helping me out with this Async RFC Scenario. The Scenario is working fine. Thanks a lot to both of you.

)

Points are being awarded to both of you.

)

dharamveer_gaur2
Active Contributor
0 Kudos

No code require for register program id.

arkesh_sharma
Active Participant
0 Kudos

Hi Dharamveer,

i am asking for a code/ report which is required to call the RFC and fill in with values and send the data Asunchronously.

Former Member
0 Kudos

Hi,

For Sending RFC asynchronously check for these points:

For RFC creation and importing please follow this discussion. Very useful:

Specially reply by Udo Martens.

Also for sender RFC, check two things.

1) First step is Register your ProgramId using activiating the communication channel(XI). You should be able to see it in smgw(R/3)

smgw->Goto->Looged on Clients(Check it here)

2) Then use this registered programid in your RFC Destination,in R/3 (it is Case-Sensitive).

These are just common errors i have encountered sometimes.

arkesh_sharma
Active Participant
0 Kudos

Hi Arpil,

Thank You for providing me with the solution. It helped me to a greater extent. cud u pls provide me with the code to be written in R/3 ? ?

I need to fill -in values present in the table which is present in RFC.

Former Member
0 Kudos

hi,

1) Go to transaction sm59.

2) Give some name.

3) Connection type TCP/IP.

4) Activation Type Registered Server Program.

5) Give some programid. You have to use this program id in RFC sender communication channel.

6) In gateway host give the host name of R/3.Give gateway service.

Before testing this connection create a RFC sender communication channel in XI.There specify the parameters like R/3 hostname,program id created above, authorization credentials for R/3 etc.Then activate the communication channel.Then test your TCP/IP connection in R/3. You have to test connection only after you create RFC CC in XI because it will go and check for the program id in XI.

Regards.

Siddhesh Naik

arkesh_sharma
Active Participant
0 Kudos

Hi Siddhesh,

Thank You for providing me the solution but the things you have mentioned have already been implemented which were written in the blog-link i provided in my query post.

It was of little help to me but still a help-in-need is a help indeed. Thank You Again.

Former Member
0 Kudos

Hi,

Check two things..

1. Check under attributes in SE37 of your RFC if you have made it remote enabled.

2. Check if you have imported this RFC in XI.

Finally you need to write an ABAP program in SE38 and use the abov RFC in this program to send the data from R3 to XI. You can not send the data from SE37 directly.

Regards,

Sarvesh

arkesh_sharma
Active Participant
0 Kudos

I forgot to mention that the XML file which was getting posted on the shared drive was INCORRECT and the data coming into it was NOT the required one.

Former Member
0 Kudos

Hi ,

Make sure that u r using the same program ID in both TCP/ID destination on R3 side and in RFC sender channel in XI ID. Also check the connectivity of the TCP/IP destination by using the test option.

And for testing RFC sender scenario go to se37 give u r FM name and press execute ; here First mention u r TCP/IP connection name which connects to the XI server using program ID ; then enter the input fields and execute .

I think you dont need to write program just for testing RFC sender.

Regards,

Ganesh.

arkesh_sharma
Active Participant
0 Kudos

Hi,

Thank you informing me about the various solutions. I had beaten around the bush for long and finally i came to know that to execute an asynchronous scenario, you always have to write a program to call the RFC which will pass the data to XI. If you do it directly, it wont work and give you a system failure message.

If you are working with a synchronous scenario then you can trigger the RFC directly from SE37.

Now, i need a ABAP Code for calling the RFC in asynchronous way and filling a random value in the table and executing it. Cud u pls provide me with a code ? ?