on 02-19-2013 4:37 PM
Hello Friends,
Can we use ABAP Program with UPDATE statement to update the client number instead of using local client copy.
What are drawbacks or consequences of the same.
Thanks and Best Regards,
Aman
Open-sql statements wont allow to change a primary key value, so client/mandt field, so answer would be NO, else you should be required to use native sql at your own risks, and you will get some problems with cluster and pool tables.Some data like logical systems are related to client but not in client dependant table, or even not with the mandt they refer to... Try to raise an OSS message after that...
Of course there won't be any longer data in the original client, why don't you want to use client copy ?
Regards,
Raymond
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello Raymond,
I have written a small piece of code and tested the same and it is working fine.
REPORT zupdate.
TYPES : BEGIN OF ty_dd02l,
tabname TYPE tabname,
END OF ty_dd02l.
DATA itab_dd02l TYPE STANDARD TABLE OF ty_dd02l.
DATA wa_dd02l TYPE ty_dd02l.
DATA wa_dd03l TYPE char30.
SELECT tabname FROM dd02l INTO TABLE itab_dd02l WHERE tabclass = 'TRANSP'
AND clidep = 'X'.
LOOP AT itab_dd02l INTO wa_dd02l.
SELECT SINGLE fieldname FROM dd03l INTO wa_dd03l WHERE tabname = wa_dd02l-tabname
AND Position = '0001'.
IF wa_dd03l = 'CLIENT'.
UPDATE (wa_dd02l-tabname) CLIENT SPECIFIED SET client = '300'
WHERE client = '100'.
ELSEif wa_dd03l = 'MANDT'..
UPDATE (wa_dd02l-tabname) CLIENT SPECIFIED SET mandt = '300'
WHERE mandt = '100'.
ENDIF.
Do you think it can cause issues. Client copy is taking a very long time in copying the data.That is the reason i do not want to use the same.
Thanks and Best Regards,
Aman
It seems the client specified bypass the update rules when using SET WHERE, But what will you do if a problem arise during an update (e.g. undo/rollback space is full) you will get 2 client unavailable ?
And what with the other table with mandt in, not in the key. And with T000 table ? And not TRANSP tables ? And system parameters/profiles values related to mandt ? And other objects that neither you nor me have knowledge of ?
I never dare to try this, but ask for a new sandbox to test first time. And you should analyze the list of tables as some may get unpredictable result.
I can not advise you to persist in this idea.
Regards,
Raymond
Hello Raymond,
To overcome the update we can commit the changes after every table and then check the log how many tables are completed.
To overcome the T000 table and other table, I have found a FM SCC1_BUILD_SELTAB_EXT_CLIENTCP which returns a table list which get transferred during the client copy.
So I hope this list should be fine. and we can update the client for these tables.
Please let me know if you think there can be any other issues with this approach.
Regards,
Aman
I think this is looking for the cat's 5th leg
Theres plenty of procedures that can be performed using "alternative" ways... does that make them correct?... I don't thinks so.
If we all proceeded our own way SAP couldn't possibly provide support.
My best advice, is to migrate the client using the standard procedure. If for X, Y or Z reason the standard procedure was not an option then explain the scenario and we could suggest alternative solutions.
Thats my 2 cents...
Regards, Juan
Hello Juan,
Only the reason is that standard client copy procedure is taking approx. 8 weeks to finish.
Our scenario is that we have two clients in QAS.We want to copy all data from client 100 to 200 and delete the client 100 once the copy is done.
So what could be best alternative to save time.
Regards,
Aman
BTW, This reminded me when use to quote SAP Note 7
Regards, Juan
hello,
what do you mean by update client number ?
best regards,
swanand
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello,
The best way would be doing Client copy. As you do not know internally there may be dependancies for the table and also you are not aware what happens behind the scenes of a client copy. I guess just changing the name in client field of the tables is not going to help you.
best regards,
swanand
User | Count |
---|---|
93 | |
10 | |
10 | |
9 | |
9 | |
7 | |
6 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.