Application Development and Automation 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: 
Read only

FUNCTION MODULE TO TRANSFER DATA FROM INT TABLE

Former Member
0 Likes
428

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

2 REPLIES 2
Read only

Former Member
0 Likes
324

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.

Read only

Former Member
0 Likes
324

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