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: 

Background/RFC/Submit problem

Former Member
0 Kudos

Hi,

Here is our scenario.

We have system A which is ECC 5.0 and system B that is 4.0B

In system A, there is a program that generates data and calls a custom RFC function in system B, passing the generated data to system B.

The RFC function in system B, takes this data, creates a file on the file server and then does a submit statement to program RFTBFF00.

<u>Here's the problem.</u>

The process works just fine until the create file part and then fails on the submit.

<u>Here's what we did.</u>

<b>User Id used for RFC connection is type background.</b>

The problem occured when the calling program in system A was executed in foreground and background.

<b>Now, the User Id was changed to type dialog. </b>

The process succeded when the calling program in system A was executed in foreground/online.

The problem occured when the calling program was executed in background even for Dialog type user.

The requirement is to execute the calling program in background and make the whole process succesful.

All variations of the SUBMIT statement within the RFC(including VIA JOB) were tested and failed.

The SUBMIT was succesful when tested independently in system B.

Also, tried the SUBMIT on a custom program. That failed too.

Any help on this is greatly appreciated.

TIA.

Regards,

-Ramesh

1 ACCEPTED SOLUTION

Former Member
0 Kudos

Hi Ramesh,

I am not sure I fully understand why the submit does not work, but here is an alternative that should do the job ok.

Rather than using SUBMIT in the RFC function in SYSTEM B, you can get your function to call the standard function BP_EVENT_RAISE with a valid event id (you can create your own events via SM62 if required).

Then, all you need to do is have a job scheduled on SYSTEM B, which is triggered by this event (you can do this in SM37). The job would have one step, which would be to execute the program RFTBFF00.

I think that should work for you.

Cheers,

Brad

5 REPLIES 5

Former Member
0 Kudos

When you run the program in foreground, is the connection to the remote automatic or do you have to enter a userid and password?

Rob

0 Kudos

The connection is automatic Rob.

Former Member
0 Kudos

Hi Ramesh,

I am not sure I fully understand why the submit does not work, but here is an alternative that should do the job ok.

Rather than using SUBMIT in the RFC function in SYSTEM B, you can get your function to call the standard function BP_EVENT_RAISE with a valid event id (you can create your own events via SM62 if required).

Then, all you need to do is have a job scheduled on SYSTEM B, which is triggered by this event (you can do this in SM37). The job would have one step, which would be to execute the program RFTBFF00.

I think that should work for you.

Cheers,

Brad

0 Kudos

Thanks for the tip Brad.

My buddy tried it and it worked.

He did not use this solution though since there was further processing to be done after the submitted program completes execution.

Instead he used JOB_OPEN and JOB_SUBMIT. That worked. A solution derived from your insight.

0 Kudos

Thanks for the feedback.

Good to hear you got it up and running.

Cheers,

Brad