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

transfer table through RFC

Former Member
0 Likes
1,120

hi,

I am an ABAP beginner....

please get me a example program on how to transfer a table that does not exist in 1 server but exists in the other through RFC...for eg take 2 servers as ECC and BIW.

it would be helpful if u explain me with all the steps..

THANKS in advance

hi,

I am an ABAP beginner....

please get me a example program on how to transfer a table that does not exist in 1 server but exists in the other through RFC...for eg take 2 servers as ECC and BIW.

it would be helpful if u explain me with all the steps..

THANKS in advance

3 REPLIES 3
Read only

Former Member
0 Likes
770

Hi..,

check this program !! i am calling the function module <b>ZBAPI_COMPANY_CODE </b> which is in <b>R3S system</b> from my <b>R3X system</b> ... for this i need to have a destination defined in R3X system to R3S system !! all the destinations are stored in <b><u>RFCDES</u></b> table...

you can define your own destination in <b>SM59</b> transaction..

*"Selection screen elements............................................

Parameters : p_matnr type mara-matnr value check.

" Material number

  • Declaration of fieldstring to hold material data...

data :

begin of fs_material,

matnr type mara-matnr, " Material Number

mfrnr type mara-mfrnr, " Manufacturar number

end of fs_material.

  • Declaration of Internal table to hold material data...

data

t_material like standard table

of fs_material

initial size 0.

data:

w_dest(30) type c value <b>'R3S800'</b>, " Destination for R3S system

w_function(30) type c

value 'ZBAPI_COMPANY_CODE'.

*BAPI function module name

  • Return structure which holds the Messages from Bapi Function module..

data:

fs_return type bapireturn.

CONDENSE W_DEST NO-GAPS.

translate p_matnr to upper case.

  • Calling the RFC function module...

call function w_function

destination w_dest

  • exporting matnr = p_matnr

  • importing return = fs_return

  • tables t_material = t_material.

.

check sy-subrc eq 0.

  • Displaying message if received...

if fs_return is not initial.

write : / fs_return-type , fs_return-message.

endif. " If fs_return is not initial.

  • Displaying materials and manufacturer's number if exists...

if t_material is not initial.

loop at t_material into fs_material.

write : / fs_material-matnr, fs_material-mfrnr.

endloop. " Loop at t_material...

endif. " If t_material is not initial.

reward all helpful answers,

sai ramesh

Read only

0 Likes
770

hi sai ramesh

thank u for ur answer

but it would be better if u get me an easier example than this.

Read only

Former Member
0 Likes
770

YOu can use the RFC enabled FM : RFC_READ_TABLE.

Regards,

Ravi