‎2006 Oct 16 6:20 AM
Hi ,
I have 2 servers , 'development' 'Production' . Each are different servers . My requirment now is to fetch data from production server to development server .
Within development server i used
"Select query with client specified option"
But how to take data from a different server .
Any help is highly appreciated . Points assured.
Regards
Shiba
‎2006 Oct 16 6:24 AM
If you just need to access and table and extract data, you can consider FM: RFC_READ_TABLE.
Incase of reading data reading files on application server of different server, you have to use FM's: FTP_CONNECT, FTP_COMMAND, FTP_DISCONNECT.
Hope this helps you.
Kind Regards
Eswar
‎2006 Oct 16 6:33 AM
Hi Easwar ,
Say for example i need to read 'MARA' table content data from Production server , My development server has different data .
How to display a particular material detail that is in production sevever , but it must be displayed in Development server .
We have 2 seperate server for development and production .
My development server Client no = 101.
My production server client no = 999.
Can you give example how , which input to be passsed to those function modules to get MARA table data from production server in Development server .
Thanks
Shiba
‎2006 Oct 16 7:06 AM
Hi,
The follg. will help you to some extent.
Method1:
1. create a RFC enable function module to read you data
2. Create a rfc destination SM59
3. call this RFC enable function module using variant
DESTINATION of function module specifying the RFC
destination you created in step 2.
Method2:
-A) Trx SM59:
Choose R/3 connection and search the production system connection.
If there isn'r basis t, u or your basis should create it.
-B) Create a program using a RFC function module:
CALL FUNCTION <FUNCTION> DESTINATION <DEST>.
Where <DEST> is the name of the production system connection defined in SM59.
The function <FUNCTION> has to be a RFC (Remote Function Call) like a BAPI.
Method3:
you can use FM RFC_READ_TABLE to read table in prodcution system.
from your development system, create a RFC destination (SM59) pointing to production system and in your development system program call the above mentioned FM with destination pointing to the RFC destination created.
U can directly read data form any on different system using
RFC_READ_TABLE :- Function Module
input
-->Table Name ( name of the table from which data to be read )
-->Fields ( name of the fields )
Eg:-
*--
DATA : BEGIN OF T_DATA OCCURS 0.
INCLUDE STRUCTURE TAB512.
DATA : END OF T_DATA.
--
Table name ---> TADIR.
--
T_FIELDS-FIELDNAME = 'PGMID'.
T_FIELDS-OFFSET = 000000.
T_FIELDS-LENGTH = 000004.
T_FIELDS-TYPE = 'C'.
T_FIELDS-FIELDTEXT = 'Program ID in requests and tasks'.
APPEND T_FIELDS.
T_FIELDS-FIELDNAME = 'OBJECT'.
T_FIELDS-OFFSET = 000004.
T_FIELDS-LENGTH = 000004.
T_FIELDS-TYPE = 'C'.
T_FIELDS-FIELDTEXT = 'Object Type'.
APPEND T_FIELDS.
T_FIELDS-FIELDNAME = 'OBJ_NAME'.
T_FIELDS-OFFSET = 000008.
T_FIELDS-LENGTH = 000040.
T_FIELDS-TYPE = 'C'.
T_FIELDS-FIELDTEXT = 'Object Name in Object Directory'.
APPEND T_FIELDS.
*
*
--
CALL FUNCTION 'RFC_READ_TABLE'
DESTINATION P_RDEST
EXPORTING
QUERY_TABLE = 'TADIR'
TABLES
OPTIONS = T_OPTIONS
FIELDS = T_FIELDS
DATA = T_DATA
EXCEPTIONS
TABLE_NOT_AVAILABLE = 1
TABLE_WITHOUT_DATA = 2
OPTION_NOT_VALID = 3
FIELD_NOT_VALID = 4
NOT_AUTHORIZED = 5
DATA_BUFFER_EXCEEDED = 6
OTHERS = 7 .
‎2006 Oct 16 7:07 AM
Hi,
You can do this using RFC Interface. Develop a Remote enabled FM in Production Server with the logic that retrieves data from MARA table and passes through export parameters to the calling program. In development Server call this FM and receive the internal table through import parameters and display.
I hope this is clear.
Regards,
Rajesh