Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

RFC delayed for more than 1 day

Former Member
0 Kudos

Hi ,

I am facing a strange problem .In my RFC function module . the structure is like this.

Loop.

<GET current system>.

TRY.

call <RFC FUNCTION MODULE> DESTInation <own system> .

ENDTRY.

ENDLoop

With in the Function module we have created a BDC seesion.

Here the loop is running for 10 times .for the first time it is the rfc call is perfect and a session is created in sm35.

For the second loop run the system is going to hang.and when i checked sm35 the next day 1 session is created (for the second loop)

Like this the session are created in different days .And the session created times are like00:00:04,00:00:08 etc.

I have checked if any hold time is there for the session but there is noting like this .

And i digged more and checked in SM50 there the call is running in background and it is connected some other system though i have given the target system as own system.

please advice me about this and how to find the root cause for this.

5 REPLIES 5

former_member182114
Active Contributor
0 Kudos

What is the purpose of loop try entry? You really need try 10 times to sucessfully create a batch (sm35)?

If you don't need an immediatelly answer when calling that function you can add IN BACKGROUND TASK on function call, and monitor it on SM58 if it raise problems. Do not forget put a COMMIT WORK after call function.

Regards, Fernando Da Ró

Former Member
0 Kudos

Jagadeesh,

Try to use RFC_CONNECTION_CLOSE at the end of each loop iteration

Thanks

Bala Duvvuri

0 Kudos

tried with RFC CONNECTION CLOSE also but it is not working.how i have to solve this plz assist me

Sandra_Rossi
Active Contributor
0 Kudos

JAGADEESH KUMAR, you didn't answer to Fernando. You can imagine that it doesn't motivate us to help you!

Why do you use synchronous RFC to submit BDC sessions?

Maybe the RFC destination is wrongly customized? (see SM59, ask the administrator)

Why don't you use 'NONE' destination? (it starts in the same application server)

Does your function module wait for the end of the BDC session? (that would explain why it lasts for 1 day)

If yes, the error is simply there: what is your algorithm to wait?

> the call is running in background and it is connected some other system though i have given the target system as own system.

Could you give more details? I would think that it simply runs on a different application server (because your destination is maybe an RFC group, see RZ12). Do you have several application servers in your SAP instance? (use SM51)

My feeling is that you need to do more investigation, and give us the details.

0 Kudos

Yes you may be correct Rossi i will check with this point .If my function module is not waiting for session to create the problem is there itself.

But i would like share one more point in this .When i run the program,for the first loop it is going into the function module and creating the session .When the cursor comes for the second loop and at function module it is hanging (this i checked in debugging mode) .i left it like that to see what happens but nothing useful .then i stopped the program waiting for long time