‎2006 Sep 26 9:48 PM
DEAR all,
I am trying to build a function module to tranfer data from a internal table created through a program to an unix table on a different server, I know i may have to use RFC but can some one give me step by procedure to achive this.
Regards,
VJ
‎2006 Sep 26 10:48 PM
Exactly...You must create a RFC enabled FM and use a TABLES parameter...Actually, you could just use
RFC_READ_TABLE...or copied it and modified it according to your needs.
Read this...
<a href="/people/alvaro.tejadagalindo/blog/2006/02/17/tasting-the-mix-of-php-and-sap the mix of PHP and SAP</a>
<a href="/people/alvaro.tejadagalindo/blog/2006/08/24/tasting-the-mix-of-ruby-and-sap the mix of Ruby and SAP</a>
Greetings,
Blag.
‎2006 Sep 26 10:49 PM
1. create a structure similar to the fields of the internal table (itab).
while declaring the internal table include structure you created.
2. create function module 'Z_CUST_RFC' as remote enabled
in the tables section add the structure you created and add eceptions as shown in below call function.
3. provide RFC destination s_rfcdes-low and call
CALL FUNCTION 'Z_CUST_RFC'
DESTINATION s_rfcdes-low
TABLES
employee = itab
EXCEPTIONS
communication_failure = 1 MESSAGE w_msg_text
system_failure = 2 MESSAGE w_msg_text
OTHERS = 3.
IF sy-subrc NE 0.
WRITE: w_msg_text.
ROLLBACK WORK.
ELSE.
WRITE: 'O.K.'.
COMMIT WORK.
ENDIF.
Nataraju