01-29-2009 12:34 PM
Hi All,
Is it possible to call a report or submit a report in a different (sap) system when i execute the program in another sap system?
My requirement is like this : When i execute the report in one sap system then it should trigger the report in another system and i need to get the datas in one system.
01-29-2009 12:44 PM
Hi Raja,
Create an RFC function module in system2 with the the help of code of repot2. then call this RFC function module from your System1.
thanks and regards,
Antony Thomas
01-29-2009 12:44 PM
Hi Raja,
Create an RFC function module in system2 with the the help of code of repot2. then call this RFC function module from your System1.
thanks and regards,
Antony Thomas
01-29-2009 12:47 PM
Just little suggestion further to Antony's response.
You can use Submit report option in calling RFC. Just two line of code in RFC
01-29-2009 1:42 PM
Hi amit,
Thanks for ur reply. I tried to use the submit statement but i could nt able to get the output. If possible could you please let me know how to use the submit statement in the RFC?.
Regards
Raja
01-29-2009 1:45 PM
Hit F1 on SUBMIT statement and look for some additions to be mentioned..... I guess you should not mention Return addition...Help should say you better...
01-29-2009 1:53 PM
Sorry ignore my earlier reply.
If your Report done,And you have transaction attached to it,than you can use the below statement
call TRANSACTION '<Your transaction>'."Caps Must on
01-29-2009 10:03 PM
I just give you more details. Assuming zreport is the report in system2, that you want to call from system1. You must create an RFC function module.
In system2:
First, in zreport, you must [export all the data|http://help.sap.com/abapdocu/en/ABAPEXPORT_SHORTREF.htm] you want to get in system1:
EXPORT variable itab ... TO MEMORY ID 'Z_MY_MEMORY'.
Second, create function module Z_MY_RFC_FUNCTION, in the attributes you must activate RFC-enabled checkbox. Define all importing (parameters needed to call zreport, which are received from system1), and exporting parameters (data you want to take back to system1). SUBMIT the report, and [import data of zreport back from memory|http://help.sap.com/abapdocu/en/ABAPIMPORT_SHORTREF.htm].
FUNCTION z_my_rfc_function.
SUBMIT zreport
WITH ...
AND RETURN.
IMPORT variable itab ... FROM MEMORY ID 'Z_MY_MEMORY'.
In your program of system1, [call the RFC function module|http://help.sap.com/abapdocu/en/ABAPCALL_FUNCTION_SHORTREF.htm] in system2:
CALL FUNCTION 'Z_MY_RFC_FUNCTION'
DESTINATION 'system2'
EXPORTING
(params of zreport)
IMPORTING
(variable, itab, etc.)