SAP R/3 форум ABAP консультантов
Russian ABAP Developer's Club

Home - FAQ - Search - Memberlist - Usergroups - Profile - Log in to check your private messages - Register - Log in - English
Blogs - Weblogs News

Change originating SID of any object



 
Post new topic   Reply to topic    Russian ABAP Developer's Club Forum Index -> Transport and Upgrade | Транспорт и Обновления
View previous topic :: View next topic  
Author Message
admin
Администратор
Администратор



Joined: 01 Sep 2007
Posts: 1640

PostPosted: Sat Nov 17, 2007 6:52 pm    Post subject: Change originating SID of any object Reply with quote

Code:
REPORT YCHORIG .
TABLES: SSCRFIELDS, TADIR.
************************************************************************
SELECTION-SCREEN SKIP.
SELECTION-SCREEN COMMENT 5(72) AAA.
SELECTION-SCREEN COMMENT /5(72) BBB.
SELECTION-SCREEN COMMENT /5(72) CCC.
SELECTION-SCREEN SKIP.
SELECTION-SCREEN BEGIN OF BLOCK BLOCK WITH FRAME.
SELECTION-SCREEN COMMENT /2(72) DDD.
SELECTION-SCREEN COMMENT /2(72) EEE.
SELECTION-SCREEN COMMENT /2(72) FFF.
SELECTION-SCREEN COMMENT /2(72) GGG.

SELECTION-SCREEN BEGIN OF LINE.
PARAMETERS: A LIKE E071-PGMID.
PARAMETERS: B LIKE E071-OBJECT.
PARAMETERS: C LIKE E071-OBJ_NAME.
SELECTION-SCREEN END OF LINE.

SELECTION-SCREEN SKIP 1.
SELECTION-SCREEN COMMENT /1(72) HHH.
SELECTION-SCREEN COMMENT /1(72) III.
SELECTION-SCREEN SKIP 2.
SELECTION-SCREEN PUSHBUTTON 3(30) MMM USER-COMMAND DISP.
SELECTION-SCREEN PUSHBUTTON 36(8) JJJ USER-COMMAND PROC.
SELECTION-SCREEN PUSHBUTTON 47(8) KKK USER-COMMAND EXIT.
SELECTION-SCREEN SKIP.
SELECTION-SCREEN COMMENT /1(72) LLL.

SELECTION-SCREEN END OF BLOCK BLOCK .
************************************************************************
INITIALIZATION.
  AAA = 'This program changes the specifyed object''s original system.'.
  BBB = 'The new SID will be the login SID.'.
  CCC = 'USE THIS PROGRAM WITH EXTREME CARE!!!'.
  DDD = 'Name of R/3 ABAP/4 Development Workbench object'.
  EEE = '|      Object type'.
  FFF = '|      |      Object name'.
  GGG = '|      |      |'.
  HHH = 'Example:'.
  III = 'R3TR PROG ZLOAD'.
  JJJ = 'PROCEED'.
  KKK = 'EXIT'.
  MMM = 'DISPLAY RECENT ORIGINAL SYSTEM'.
  LLL = ' '.

AT SELECTION-SCREEN.
  IF SSCRFIELDS-UCOMM = 'EXIT'.
    SET SCREEN 0.LEAVE SCREEN.
  ELSEIF SSCRFIELDS-UCOMM = 'PROC'.
    CLEAR TADIR.
    SELECT SINGLE * FROM TADIR WHERE PGMID = A AND OBJECT = B AND
    OBJ_NAME = C.
    IF TADIR-PGMID IS INITIAL.
      LLL = 'THIS OBJECT DOES NOT EXIST'.
    ELSE.
      IF SY-SYSID <> TADIR-SRCSYSTEM.
        TADIR-SRCSYSTEM = SY-SYSID.
        MODIFY TADIR.
        COMMIT WORK.
        LLL = 'THE ORIGINAL SYSTEM CHANGED TO:'.
        LLL+31(3) = SY-SYSID.
      ELSE.
   LLL = 'NO CHANGE: THE ORIGINAL SYSTEM AND LOGIN SYSTEM ARE THE SAME'.
      ENDIF.
    ENDIF.
  ELSEIF SSCRFIELDS-UCOMM = 'DISP'.
    CLEAR TADIR.
    SELECT SINGLE * FROM TADIR WHERE PGMID = A AND OBJECT = B AND
    OBJ_NAME = C.
    IF TADIR-PGMID IS INITIAL.
      LLL = 'THIS OBJECT DOES NOT EXIST'.
    ELSE.
      LLL = 'THE RECENT ORIGINAL SYSTEM IS: '.
      LLL+31(3) = TADIR-SRCSYSTEM.
    ENDIF.
  ENDIF.
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    Russian ABAP Developer's Club Forum Index -> Transport and Upgrade | Транспорт и Обновления All times are GMT + 4 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


All product names are trademarks of their respective companies. SAPNET.RU websites are in no way affiliated with SAP AG.
SAP, SAP R/3, R/3 software, mySAP, ABAP, BAPI, xApps, SAP NetWeaver and any other are registered trademarks of SAP AG.
Every effort is made to ensure content integrity. Use information on this site at your own risk.