Transfer tables between 2 clients (mandants)
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.
Hi Helder,
Let me explain you the implication whatz gonna happen if you use the following loop.
LOOP AT tab_info.
ASSIGN COMPONENT tab_info-fieldname OF STRUCTURE <wa> TO <value>.
MOVE string+tab_info-offset(tab_info-intlen) TO <value>.
ENDLOOP.
Say if I have 20 fields in my table with 2000 records, for this one table, the processor would loop for 40000 times. Which is surely pretty huge time.
Now coming to option b), it is pretty simpler. The table which I was referring is not required as we created it for a specific requirement.
List all the tables which you need for data transfer. Let us assume here as we had done and we came up with two. They are:
ZTESTA
ZTESTB
The function module has the following interface parameters:
FUNCTION zrfc_read_table.
IMPORTING
tabname TYPE dd02l-tabname
TABLES
t_ztesta
t_ztestb.
All that you do in your FM is:
FIELD-SYMBOLS: <fs_table> TYPE STANDARD TABLE.
DATA: l_inttab TYPE char64.
CONCATENATE 'T_'
tabname
INTO l_inttab.
ASSIGN (l_inttab) TO <fs_table>
SELECT * FROM (tabname) INTO TABLE <fs_table>.
ENDFUNCTION.
Now in your original program:
*After selecting all the tables you want(here in this case
*you would have only ZTESTA and ZTESTB in MY_TABLES)
TYPE-POOLS: abap.
DATA : table TYPE REF TO data,
WA TYPE REF TO DATA,
it_param TYPE STANDARD TABLE OF
abap_func_parmbind,
wa_param TYPE abap_func_parmbind.
FIELD-SYMBOLS : <FS> TYPE STANDARD TABLE,
<WA> TYPE ANY.
LOOP AT MY_TABLES.
CREATE DATA table TYPE STANDARD TABLE OF
(MY_TABLES-TABNAME).
CREATE DATA WA TYPE (MY_TABLES-TABNAME).
ASSIGN WA->* TO <WA>.
ASSIGN TABLE->* TO <fs>
Pass the interface parameters dynamically using
it_parm which is of type abap_func_parmbind(4.7) or
abap_parmbind(4.6c) in type-pools abap.(I am not sure if
we can do it in a version less than 4.7). Let me know
in case you dont know how to pass interface parameters
to a function module dynamically.
CALL FUNCTION 'ZRFC_READ_TABLE' DESTINATION 'DO2_305'
PARAMETER-TABLE
it_parm.
IF sy-subrc <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
LOOP AT <fs> INTO <wa>.
INSERT (MY_TABLES-TABNAME) FROM <WA>.
ENDLOOP.
ENDLOOP.
Here you need not have to loop no. of rows * no.of columns. Also your FM is quicker as it is just one select statement and do not do anything else.
All that you need to do is to identify all the tables and add tables parameters as t_<tabname>. But the code nover change.
Regards,
Srikanth
Similar Messages
-
Questions on scripts, tables & transfer objects between clients.
1. In script, how to use the same print program for two different layouts? with procedure.!
2. Why cant sapscripts be client independent.?
3. Want to maintain a table in dev server and if i update the data, it should simultanously update in Quality and Production servers. How? please explain in details.
4. How to transfer object between clients.? explain.
Points will be promptly rewarded for HELPFULL answers.!Hi!
3. With SE01, you can create a transport request for all table entries.
SE01 - Create button - Workbench request - Give description and save
Select the created request and click on Display object list.
Click on Display - Change button
Insert line button
ProgID: R3TR
Object: TABU
Object name: Z_YOUR_TABLE
Double click on the table name
Insert line
Key: *
Save everything
Release the transport in SE10 transaction and transport with STMS transaction.
Regards
Tamá -
Procedure for transfer data between clients using ALE
Hi all ,
I am new to this concept .
I want to transfer the material master data from quality client (200) to Development Client(100) using ALE and IDOC, how to do ?
What would be the procedure ? plz let them explain step by step of definition along with screenshot / process ....
Regards
Deepa.T.Code: BD54
Step 1:create a logical system qaout in quality system
Step 2:create a logical system devin in quality system
Step 3:create a logical system qaout in development system
Step 4:create a logical system devin in development system
T.Code: SCC4
Step 5:Assign qaout to 200 client in quality system
Step 6:Assign qaout to 100 client in development system
T.Code: SM59
Step 7: Create R/3 type (or ABAP type in ECC)RFC destination RFCDEV in quality system
T.Code: WE21
Step 8: create Port with above rfc reference in quality system
T.Code:BD64
Step 9:Create distribution Model (use matmas message type) in quality system
then Environment ->Generate Partner profiles
Then Edit ->modelview -> distribute
T.Code: BD10
Step 10: select the material for distribution in Quality System. -
Transfer tables between workflow container and BSP
Hi experts,
I've a BSP which I call from a workflow. I connected the workflow with the BSP through the use of transaction wf_extsrv. This all works perfect, only I can't transfer internal tables, multiline container elements or strings that are longer than the max. CHAR255. This raises a problem:
In my BSP I've a text box where a user can fill in a rejection reason. I want this filled textbox transferred back and forward bewteen my workflow and my BSP.
Does anyone have a solution to this problem?
Thanks in advance.
Kind regards,
Joost van PoppelHi Martin,
Tanks for you reply. I was already thinking this would be the easiest solution, so I applied it like you suggested.
The transferal is done by connecting the BSP via wf_extsrv through characterstrings. From this transaction I generated a task and connected my wf container to the container of the generated task.
I suppose there are also other options like Karri suggested. Haven't tried it yet to use SAP_WAPI_WRITE_CONTAINER, but will take it into account the next time I run in to the same situation. So Karri I also want to thank you for answering. It probably will be very useful in the future.
For now it is just one text box, so it is managable to give the text box back as seperate lines.
Kind regards,
Joost van Poppel -
How to transfer table data from one client to another client?
How to transfer table data from one client to another client?
Hi,
Look at the Blog
/people/community.user/blog/2007/01/07/transport-table-entries
Regards
Sudheer -
Difference between client dependent table and client independent table
hi all,
i m new in sap pls tell me the difference between client dependent table and client independent table.
tell me in detail.
thanks and regards
vikas sainiHI
Client dependent Means if you create that data in one client is limited to that client only and it is not accessable in other clients
Like SAP SCRIPTS and STD texts data
where as Client Independent means the data if you create in one client that is available in that as well as in other clients
Like SMARTFORMS, All dictionary Objects data and Repository objects data like Programs, Fun modules, tables etc..
There is no specific reason behind why scripts are client dep[endent and smartforms are client independent!!!
As for SAP -- Scripts are called client dependent because if you create client in say,200 it would be available in that only.If you want to test the script in client 300 then it won't be there,you will have to go to transaction se71 in 300 .Then Utilities-> Copy from client.Give the source as 200 & form name(i.e. script name) & copy.
Few more reasons why....? Please read below:
SAPscript technology is based on a mainframe product from the 1980s.SAPscript forms have always been -- under the hood -- relatively passive objects, with minimal embedded logic. These forms were designed to be driven and controlled by ABAP programs, much in the way ABAP programs read in database tables to produce reports;
if you ever download a SAPscript form (e.g., via utility program RSTXSCRP), and look at the portable text file it produces you'll see what I mean.
Many text objects (e.g., invoice header texts) are bound directly to documents which are client-dependent, so it makes sense for these text objects to also be client-dependent. From a complexity standpoint, SAPscript forms are close enough to these text objects where I can see how it made sense at the time to make them client-dependent too.
What is client dependent and Client Independent
https://www.sdn.sap.com/irj/sdn/forums -
Swapping between client database and web database
Hi i have completed tutorials etc so can now create the
sqlite database for my application which is downloaded by the user
and will run on thier desktop so i am calling it the "client
database" which contains data they are working with but there is
another database containing identical tables which i am calling the
"global database" the idea of this is to transfer data between the
different clients and backup that information.
so i am looking for a tutorial or a sample app where the app
takes information from a web based database and copy's that rob
into a sqlite database on the clients machine?
this is the main problem im having and seen people mentioning
blaze DS and stuff like that, ideally i wouldn't like to use PHP
but atm is looking like i may have to.
i will sell my soul to anyone who can help with this lol
(also i am using FLEX 3.0)Hi,
Yes, if you use LCDS everything is there already for you, so
that you can complete this application in very less time. Since you
want to use PHP, you can use Zend PHP, which will support Remoting
using AMF. Using Zend PHP, write PHP classes which will help you to
synchronize data between server and client and just invoke those
from your Flex application when required.
Hope this helps. -
Transfer Config between Different Boxes
Hi,
We need to transfer complete configuration from one SAP Client (Development client) to another and both the clients are in different boxes (Server) in order to bring configuration in both the boxes in sync.
Kindly suggest the best practice and the process to be followed.
Regards,
GhanapriyaWe can transfer config between systems by migrating table data. We need to identify all tables to be migrated to other systems and upload them in destination system. Basis team will be the best contact to migrate standard tables data.
Thanks. -
Transfer pricing between the same plant
Our multimational client has desired, transfer pricing between the profit centres. The profit centres have been designed as a combination of product lines and plant. My first query is that whether it is possible to have Transfer pricing in the same plant, i.e. when the finished goods one material is moved & fed as raw material from one product line to another product line. How will the same be mapped in MM and PCA/ COPA??
Suraj ,
Could you please elaborate on that .Iam not very clear on that
Regards
Deepesh S -
Copy tables between two different computer?
Hi experts,
I don't know if is this the correct place to make this question, but I need help with independent tables. Is it possible to copy independent tables to one 6.0 computer to other computer with the same version 6.0?
Thanks in advance for your answers,
Best Regards,
Rebeca> We want to copy independent tables from one system in 6.0 to another system in 6.0. We have system A (that was in 4.7 and now is in 6.0) with data relative to Spain and another system, system 2, that is also in 6.0 with data from other countries. In system B we have a particular mandant for Spain and the problem is that we want to include all the independent tables information from system A to system B and we don't know how to do that... is there anyway that we can do this?
There is no standard way of putting data of two systems to one system together. It's not just copying tables around (many HR tables are cluster tables and can't be read through SQL without a logic on top) but also speaking of dependent things.
The only supported way of doing such things is booking an SLO service and let SAP assist you in doing it. Only then you can be sure that it works as expected. But don't underestimate the whole thing. Check
http://service.sap.com/slo
--> Consolidate and unite system landscapes
--> Optimization for HCM
SAP has the tools and the knowledge to do such things and you can be sure it works. I would not do it on my own by copying tables (most HR tables are client dependent, you'd have to map client numbers, plants, adapt T512W and all that stuff manually).
Markus -
What exactly is the diff between client dependant and client independant te
Hi gurus,
What is the diff between client independant and client dependant term.. I initially had a confusion related to client independant and client dependant Transport requests, where else are these words applicable, do they apply to data as well, if so how? any links to help me understand the difference..
regards,
kishoreHi Kishore,
Client Independant: These objects are not specific to any client. And it is universal which can be viewed,changed across the clients.
Client Dependant: These are the objects can be viewed, changed for the client for which it has been assigned. Other clients do not have access on these objects.
In SAP, all objects are finally stored as tables. "Mandt" is key field which determines whether the object is client dependant or not.
Client Independant transport requests will make the transported objects available across the clients. and Client dependent transport request make the objects available only for the client mentioned by field "Mandt"
Regards,
Dinesh D -
IDOC Transfer data between SAP 2 System
Hi All,
I have SAP two systems. I want to transfer data between SAP by IDOC. please let me know about how to
set "LOGICAL SYSTEM" for receiver for use on distribution model setting. If you have other method please recomended.
Regards,
Moderator message: please search for available information before asking, do not ask basic questions.
locked by: Thomas Zloch on Sep 2, 2010 10:54 AMHi,
The steps which u need to do for logical system setup:
outbound configurations (Sender)
s1) Goto BD54 - DEFINE SOURCE SYSTEM & RECEIVER SYSTEM HERE
s2) BASIC SETTINGS --> LOGICAL SYSTEM -->Assign Logical system to client.
s3) a) Goto TCODE u2013 WE21
create port for sender.
s4) a. Maintain Distribution Model in Detail.
Execute BD64 and click on change.
Click on Display/ Change button
s4) b. Click on Edit menu -> Model View -> Create
s4) c. Select your model view and click on Edit menu -> Add Message type
s4) d. Click on Environment Menu -> Generate Partner profile
s4) e. Click on Edit Menu -> Model View -> Distribute.
s5) Goto TCODE u2013 WE20
Click on Partner Type LS (Logical System) and press Create Button
INbound configurations (Receiver)
S1) Goto TCODE u2013 WE21
create port for receiver.
s2) Goto TCODE u2013 WE20
Click on Partner Type LS (Logical System) and press Create Button.
A profile is created for RECEIVER (client) so that we have to use the same profile every time we transfer a new message
type to this Receiver. -
Difference between client system and logical system
Hi all
Can any one explain about the client system and logical system??
When this message type will comes in to picture at the time idoc processing??
Thanks and Regards
Arun Josephhi Arun,
I am giving the complete info on idoc.pls chk once.then ur issue will be solved.ok
and to know the diffrence between client and logical system very keenly go thru this link
https://www.sdn.sap.com/irj/sdn/advancedsearch?cat=sdn_all&query=abouttheclientsystemandlogicalsystem&adv=false&sortby=cm_rnd_rankvalue
IDOC Administration
Step 1: Tcode: WE 46
Setting the Global Parameter for IDOC Interface
Step 2: Maintaing a Logical System
Path: From the ALE Customizing in IMG, choose Sending and Recieving Systems,
Logical Systems, Define Logical systems
Go to Spro transaction
Step 3: Allocating Logical systems to the Client
Path: From the ALE Customizing in IMG, choose Sending and Recieving Systems,
Logical Systems, Assign Client to Logical systems
Go to Spro transaction
Step 4: Setting up an RFC destination
Tcode: SM 59
Path: From the ALE Customizing in IMG, choose Communication, Define RFC
Destination
You can also do the Advanced Settings in the RFC Destination
Step 5: The PORT definition
TCode: WE 21
Path: From the ALE Customizing in IMG, choose Sending and Recieving Systems,
Systems in Network, Asynchronous Processing, Assign Ports, Define Port
Step 6: Generating Partner Profiles
TCode: BD 82
Path: From the ALE Customizing in IMG,choose Modeling and Implemantation Business
Process, PArtner Profiles and Time of Processing, Generate Partner Profiles
Step 7: Distributing the Model
TCode: BD 64
Path: From the ALE Customizing in IMG,choose Modeling and Implemantation Business
Process, Maintain Distribution Model and Distribute Views
Technques for Distributing the Master Data:
Technique 1: The Push Approach
Executing the Process:
TCode: BD 10
Path: from the ALE Main Menu, choose Material Data Distribution, Cross
Application, Material, Send
Technique 2: The Change Pointer Technique
Enable Change Pointers Globally
TCode: BD 61
Path: From the ALE Customizing in IMG,choose Modeling and Implemantation Business
Process, MAster Data distribution, Replication of Modified Data, Activate
Change Pointers
Enable Change Pointers Globally
TCode: BD 50
Path: From the ALE Customizing in IMG,choose Modeling and Implemantation Business
Process, MAster Data distribution, Replication of Modified Data, Activate
Change Pointers for Message Type
Specify the Fields for which Change Pointers are to be written
TCode: BD 52
Path: From the ALE main Menu, Choose ALE Development, IDOCs, Change , Define
Change-Relevant Fields
How the Classification system works:
Creating a Class Type
TCode: O1 CL(it is CAPITAL O)
Path: From the ALE Customizing in IMG,choose Modeling and Implemantation Business
Process, MAster Data distribution,Distribution using Object Classes, Maintain Class Types
Maintaing Status for the Class Types:
TCode: O1 CL(it is CAPITAL O)
Path: From the ALE Customizing in IMG,choose Modeling and Implemantation Business
Process, MAster Data distribution,Distribution using Object Classes, Maintain Class Types
Maintaing Classification Status:
TCode: O1 CL(it is CAPITAL O)
Path: From the ALE Customizing in IMG,choose Modeling and Implemantation Business
Process, MAster Data distribution,Distribution using Object Classes, Maintain Class Types
Maintaing Classes:
TCode: CL 01 (it is zero)
TCode: O1 CL(it is CAPITAL O)
Path: From the ALE Customizing in IMG,choose Modeling and Implemantation Business
Process, MAster Data distribution,Distribution using Object Classes, Maintain Classes
Allocating classes to the Logical Syatems
TCode: BD 68
TCode: O1 CL(it is CAPITAL O)
Path: From the ALE Customizing in IMG,choose Modeling and Implemantation Business
Process, MAster Data distribution,Distribution using Object Classes, Assign classes
to Logical systems
Filering at the IDOC level:
Identify the Filter Object:
TCode: BD 59
Path: From the ALE main Menu, Choose ALE Development, IDOCs,Data Filtering, Assign Filter Objects
Type to IDOC Field
Modify the Distribution model
How Segment Filtering Works:
Configuration:
Configring the segment-filtering technique is a one-step process.Just specify the segments to be filtered
TCode: BD 56
Path: From the ALE Customizing in IMG,choose Modeling and Implemantation Business
Process, MAster Data distribution,Scope of the Data for Distribution, Filter IDOC Segments
The Reduced IDOC Type:
The reduced IDOC type allows to get down to the field level and specify the fields a recieving system does not need.
The System still needs the fields, but this has no effect on the recieving system because each field has a null value,
represented by a forward slash(/) in the field.
TCode: BD 53
Path: From the ALE Customizing in IMG,choose Modeling and Implemantation Business
Process, MAster Data distribution,Scope of the Data for Distribution, Message Reduction,
Create Reduced Message Type
IDOC:
Complete Documentaion on any IDOC using TCode: WE 60
IDOC Display Tool: TCode: WE 02 or WE 05
IDOC DEfinition components:
Segment Components:
1. Segment Type (E1, Z1)
2. Segment Definition(E2, Z2)
3. Segment Documentation(E3, Z3)
E- SAP Defined
z- Custom Defined
IDOC runtime componets:
control Record:
Data Record:
Staus Record:
First Create the Segments using TCode: WE 31
and then create the IDOC using TCode: We3 30
first release the segments and then IDOC.
Creating a new Basic IDOC Type:
STEP 1: Analyze the Data:
STEP 2: Create Data Elements:
STEP 3: Create Segments:
STEP 4: Create Basic IDOC Type:
1. Execute TCode: WE 30
2. Select the Create new option and enter a description for your basic IDOC type
3. click the IDOC name, and click the create icon.
Enter the segment type and its attributes.
4. Keep on adding the segments as in step 3.
5. Save the basic IDOC type
Step 5: Release the Segment Type and Basic IDOC Type
STEP 6: Transport the Segments and Basic IDOC Type
Extending a Basic IDOC type:
STEP 1: Analyze the Data:
STEP 2: Create Custom Segments:
STEP 3: Create the IDOC Type:
STEP 4: Release the custom Segment and IDOC Extension
Develop the function module for fteching the Data and then inserting the data into IDOC using
EDIDD(for control Record) and EDIDC table(for DATA Record)
Configuring the Systen for IDOCs
Configure an Outboubd Process that uses Message Control
Step 1: Create a new Message Type
TCode: We 81
Path: From the Area menu of EDI, choose Development, IDOC Type/ Message
Step 2: link the IDOC type to the Message Type
TCode: We 82
Path: From the Area menu of EDI, choose Development, IDOC Type/ Message
Step 3: Create a new Process Code
TCode: We 41
Path: From the Area menu of EDI, choose Control,Outbound Process COde
Step 4: Create or Change a Partner Profile
TCode: We 41
Path: From the Area menu of EDI, choose IDOC,Partner Profile
Configure an Outboubd Process for Stand-Alone Programs
1. Create a new message type
2. Link the IDOC type to the Message Type
3. Add the message to the ALE Distribution Model(use BD 64)
4. Create or change the Partner Profile
go through the following site to have screen shots.
http://www.****************/Tutorials/ALE/ALEMainPage.htm
thanks
karthik
reward me points if usefull -
HOW TO COPY STANDARDTEXT BETWEEN CLIENTS
Hi All,
HOW TO COPY STANDARDTEXT BETWEEN CLIENTS. I WANT TO COPY BETWEEN 200 TO 110 CLIENTS.
Thanks & Regards,
suman.Hi Suman,
Check below points.
2. goto se09 and create a new
customizing rqeuest.
3. after that
in the object list,
go in edit mode
and a new window will come
where u can add the objects(in table control)
4. there u put
program id = R3TR
object type = TEXT
object name = TEXT,YHRS_FNF_LTR,YHR1,E
where
YHRS_FNF_LTR = name of standard text
YHR1 = TEXT ID
E = english language
How To Transport STANDARD TEXTS??
Transporting standard text
Thanks
Ramakrishna -
Difference Between "Client Level & Company Code Level"
Hello
Can any explain me the difference between client level and company code level?
What is the configuration that we do on client level and company code level?Message: Dear,
Client : Unit within SAP system, self-contained, separate master data with independent set of tables. It represent corporate group.
Company Code : Smallest organizational unit of external account for which a complete, self-contained bookkeeping system can be replicated.
e.g, company within a corporate group
Note: You will do the configuration at company code level by logging into the client for master tables etc..
Maybe you are looking for
-
Opening CDR file - Extremely Fatal to CS6 64-bit apps
I'm trying to get down the bottom of what's causing an extremely serious error in the 64-bit version of Adobe Illustrator CS6. Adobe Illustrator can open CorelDRAW .CDR files, to a certain extent. The .CDR files need to be saved down to version 9 or
-
My CS can't start with error code 16
How can I find the CS5.5 serial number under MAC OS X if I want to reinstall it? My CS can't start with error code 16, it says configuration error.
-
Which Kind of Report should be in BI system?
Dear Expert, I faced the requirement to move R/3 reports onto the BI system. Most of them are customized reports which select data from a larget number of tables. Determine First Date and Last Date of the selected period. Read Material Master MARA
-
Hi, I have to insert in a database a lot of images, documents, audio and video files, (2G/mounth) My database should keep this entire files and any time to have the possibility to recover the information in case of disaster. If I will use bfile filed
-
Sync Contribution FileSystem with Oracle DB
Hi All Just a quick question How do you sync contribution filesystem with Oracle DB? What is the best practice for this? Cheers Nck