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

Former Member
0 Kudos

Hi All,

i'm processing a rfc fm in background processing through

CALL FUNCTION 'Y_WS3_ALIASTEST' IN BACKGROUND TASK AS SEPARATE UNIT

DESTINATION 'rfc_bacground'

but i'm not getting any result but i can view some information related to my rfc in sm58.

pls tell me how to getting result of this background rfc.

regards,

anuj

1 ACCEPTED SOLUTION

Former Member
0 Kudos

Hi,

First find the definition of the source and destination server from sm59 and whether they are connected or not,

then write the follwoing logic

REPORT Z_CALL_FM.

Variables used

DATA: w_destination(10) TYPE c,

confirming the RFC destination

IF sy-sysid = 'RES'. "System id of R/3 (say)

assigning destination to variable to be passed

w_destination = 'DEMOCLNT100'. "Definition of destination server

Calling the RFC enabled FM

CALL FUNCTION 'Z_RM_CALL_RFC_FM'

DESTINATION w_destination

ENDIF.

You can check the output in the FM of destination server.

Regards ,

Rohan

8 REPLIES 8

Former Member
0 Kudos

Hi,

First find the definition of the source and destination server from sm59 and whether they are connected or not,

then write the follwoing logic

REPORT Z_CALL_FM.

Variables used

DATA: w_destination(10) TYPE c,

confirming the RFC destination

IF sy-sysid = 'RES'. "System id of R/3 (say)

assigning destination to variable to be passed

w_destination = 'DEMOCLNT100'. "Definition of destination server

Calling the RFC enabled FM

CALL FUNCTION 'Z_RM_CALL_RFC_FM'

DESTINATION w_destination

ENDIF.

You can check the output in the FM of destination server.

Regards ,

Rohan

Former Member
0 Kudos

Thanx Rohan,

my rfc destination is ok n i can check result in destinations server ,but how to check result in calling server?

regards,

Former Member
0 Kudos

Hello Anuj.

In background operation the result cannot be viewed.

But, it will have a spool request number and it can be entered in Transaction SP01.

Within this transaction you will find the appropriate option or pushbutton to display the output related to that spool request.

Hope that'll be fine.

Good Luck & Regards.

Harsh Dave

Former Member
0 Kudos

Harsh ,

can we generate a application to show data which is shown in sp01.

if yes then how?

regards,

Former Member
0 Kudos

if someone has some views then pls share with me.

regards,

0 Kudos

hi anuj

goto sm37 and select ur job (using check box)

and then put transaction jdbg and press enter

debugger will start and after debugging standard code you will get to your program code and then find out wat is the output that is coming

regards

vivek

Former Member
0 Kudos

Thanx vivek but rfc in background(tRFC) doesn't created any log in sm37., if i wrong , pls correct me.

regards,

Anuj

Former Member
0 Kudos

thanx