Skip to Content
0
Former Member
Dec 23, 2005 at 09:18 AM

Transfer tables between 2 clients (mandants)

428 Views

Hi every one.

I want to transfer data i have in some tables from client (mandant) 305 to another another to create an environnement of test with real data so we can test new programs in real conditions.

For the moment here's what i did :

I used RFC on just one table. And this works.

BUT the problem is that to work, we need to declare the table in the parameters of the function.

So Is there any way to avoid that declaration ? Because i have like 500 tables to transfer, and i 'm sure there's a better way than mine to do that. But as i just started on SAP and ABAP, can't figure it out.

My solution for the moment will the same but with a loop on all the tables i need to trasfer the data ... but i'll have to decalare the 500 tables in the parameters of my function :s

Maybe there's another solution to communicate between mandants so if you have, ideas, documentation, links etc, it will be really helpful

thx a lot !

REPORT ZTESTHDAFUNC .

DATA : t_ZVOITSUPOFF LIKE ZVOITSUPOFF OCCURS 0 WITH HEADER LINE.

CALL FUNCTION 'ZTESTHDAFUNC' DESTINATION 'DO2_305'
  TABLES ZVOITSUPOFF  = t_ZVOITSUPOFF.
CALL FUNCTION 'ZTESTHDAFUNCW'
 TABLES ZVOITSUPOFF  = t_ZVOITSUPOFF.

CALL FUNCTION 'ZTESTHDAINSERT'
 TABLES ZVOITSUPOFF = t_ZVOITSUPOFF.

FUNCTION ZTESTHDAFUNC.
select *
  from ZVOITSUPOFF
  into table ZVOITSUPOFF
  WHERE ZIDENT_CANAL = 'FFR'.


ENDFUNCTION.

FUNCTION ZTESTHDAINSERT.
LOOP AT ZVOITSUPOFF.
  INSERT INTO ZVOITSUPOFF VALUES ZVOITSUPOFF.
ENDLOOP.

ENDFUNCTION.