02-14-2012 10:28 AM
Hello,
For a report, i need to display contents of the database table of both the clients into single report.In our landscape, i have 2 servers development and quality. In both the servers, i have same database table. If this report is executed in development or quality, it should display data of both the clients. How can i achieve it? How can i use RFC to do it? There is no BAPI for this as the data is only table specific. Do i need to write a FM with RFC enabled? If yes how do i pass the parameters to the FM?
Regards,
Yayati Ekbote
02-14-2012 11:42 AM
Yayati,
1.Create one rfc of type 3
2.Create a Remote enabled function module in development and also in Quality.
3.call the function like below
CALL FUNCTION 'ZGET_DATA_RFC' DESTINATION v_rfcdest
4.Within the function module write the select query
5.Pass the input paramters and output paramters to the function module as internal table.
Thanks,
K.Kiran.
02-14-2012 10:44 AM
Hi Yayati,
this can be done and follow the below logic.
Create an RFC to fetch the data you need and the tables parameter will have the table which will have all the fetched data. After creating this RFC in dev move it to QA.
The create a Program and call this RFC inside the program. The program should also have logic to fetch the data from the current system. After the RFC is executed you will now have data from both the system and all you have to do is to display it.
move this program to QA as well.
The RFC destination should vary as shown below.
IF SY-SYSID EQ <Dev system id>.
RFC destination <Quality system>.
ELSEIF SY-SYSID EQ <quality system id>.
RFC destination <Dev system>.
ENDIF.
Please let me know if you require further clarifications.
<removed by moderator>
Regards,
Praveenkumar T.
Edited by: Thomas Zloch on Feb 14, 2012
02-14-2012 10:46 AM
Hi,
Ask the basis team to create RFC in SM59 (Development to QA), and import the RFC Enabled Function Module to QA, (write your select query and pass the result in export/tables/changing).
in your report use select query from DB and call the imported function module by passing Created RFC Destination and get the result in tables tab / changing / export TAB from the function module and display the result.
Regards,
Srini.
02-14-2012 10:49 AM
Hi,
Is your data is in the same SAP system and different clients? or two different SAP systems?
thanks.
Aswath
02-14-2012 11:42 AM
Yayati,
1.Create one rfc of type 3
2.Create a Remote enabled function module in development and also in Quality.
3.call the function like below
CALL FUNCTION 'ZGET_DATA_RFC' DESTINATION v_rfcdest
4.Within the function module write the select query
5.Pass the input paramters and output paramters to the function module as internal table.
Thanks,
K.Kiran.
02-29-2012 6:31 AM