Additional Blogs by Members
cancel
Showing results for 
Search instead for 
Did you mean: 
Former Member

Applies to:

ABAP Developers

Summary:

  To check “Remote Version Comparison” of a ABAP Objects on Multiple systems at a time

Author(s): 

Company:   Mouritech LLC
Created on: 02-20-2015
Author(s)  : Kiran Singh, Senior SAP Technical Consultant

Table of Contents

1) Overview

2) Attachment to create ABAP program/Function Module and steps  involved

3) Examples

Overview:

I was wondering to check how far my previous code changes moved in my SAP landscape before taking up new code changes in Development Environment while working on the Production Support.

A typical SAP landscape we usually work DEVELOPMENT => QUALITY => PRODUCTION, I’ve also seen landscape like DEVELOPMENT=>SANDBOX=>QUALITY=>PRODUCTION.

When ABAPer made code changes per say incident INCIDENT#1 while changes are on the flow to Production, my biz team created INCIDENT#2 if ABAPer start working on code changes for INCIDENT#2 before making sure INCIDENT#1 already reached to Production and fix assured.

To assure this ABAP objects are in synchronization throughout the landscape, ABAPer can compare the object system by system. This Multi Version Compare tools helps to compare all the system in the landscape at once.

You can run this tool to check Remote versions in you landscape.

I’ve tested for below Objects:

  1) ABAP Program(Type 1, I, M, F and S)

  2) ABAP Dictionary Objects(Table, View, Data Element, Structure, Table Type, Search Help and Lock Objects)

  3) Function Group and Function Modules

  4) Web Dynpro Component Controller, VIEW and Window


      Example#1. Enter object which you want to validate into Selection screen.

 

The list of version from SandBox(S), Quality(Q) and Production(P). Not all the systems in the Landscape have same version of the Function Module. 



    Example#2. If there are more than one Object by same name a pop-up with List Box selection appears for the selection.


  This Object has the same active version throughout the landscape.

 


    Example#3. For all Web Dynpro Components user can enter Component name directly.

      But for sub objects Components for WINDOW/VIEW user must enter

    <ZCOMPONENT> <SPACE> <WINDOW/VIEW> OR

    <ZCOMPONENT> <*> <WINDOW/VIEW>

 





    Example#4. For Web Dynpro Window/View


    Here my Web  Dynpro Component Z****DISP_CMP and View VW_HEADER


 

    Can choose one Controller OR VIEW.

 

 

 


__________________________________________________________________________________________________

Download the attached programs


CLICK HERE


OR


https://drive.google.com/folderview?id=0B-K87T3z8Y3sfnM4NEFDLWhCblRFd05weVNqTURmeXVEZFVBUE1mOEpnQlRN...

______________________________________________________________________________________________________________________________

1. Create a executable ABAP Program; by name Z_MULTI_SYST_REMOTE_COMPARE(or you wish to use). Copy the code from attachment Z_MULTI_SYST_REMOTE_COMPARE.txt.

Pls Note: you have to enter you Remote systems list

<SSS> you Sand Box ,

<QQQ> your Quality and

<PPP> your Production, you may add or remove to a list.

************************************************************************
* You must define your remote system's RFC destinations with Admin Access, if not you may have to enter the password for Super User access.

You can access list of RFC destination from Transaction Code SM59

Code Change#1

Line#46 in the program MULTI_SYST_REMOTE_COMPARE
CONSTANTS: lc_sand TYPE rfcdest VALUE 'TMSADM@<SSS>.DOMAIN_CSP',
lc_qlty
TYPE rfcdest VALUE 'TMSADM@<QQQ>.DOMAIN_CSP',
lc_prod
TYPE rfcdest VALUE 'TMSADM@<PPP>.DOMAIN_CSP'.

Code Change#2

Line#151 in the program MULTI_SYST_REMOTE_COMPARE

**********************************************************************
* List all the system in the Landscape exept the DEvelopment where you
* are intend to run the program
**********************************************************************

lwa_destinations
-rfcdest      = lc_sand.
APPEND lwa_destinations TO t_destinations.

lwa_destinations
-rfcdest      = lc_qlty.
APPEND lwa_destinations TO t_destinations.

lwa_destinations
-rfcdest      = lc_prod.
APPEND lwa_destinations TO t_destinations.
*************************************************************

You may want to give some meaning full text to you input parameters:

 

2. Create a Function Group: ZK_REMOTE_SYS(or you wish to use).

3. Create a Function Module: Z_FUNC_MULTI_SYST_REMOTE_COMP and assign it to Function Group created in Step(2).

 

3.1 Define Import parameters.

 

Import Parameters:


DESTINATION          LIKE  RFCDES-RFCDEST(OPTIONAL)(PASS BY VALUE)                       

OBJECT_NAME        LIKE  VRSD-OBJNAME          (PASS BY VALUE)

OBJECT_TYPE          LIKE  VRSD-OBJTYPE            (PASS BY VALUE)                 

IM_DEV_TRANS      TYPE VERSKORRNO              (PASS BY VALUE)           

 

3.2 Define Table parameters as below

 


Tables Parameters:


T_VRSDYNPRO LIKE  VRSDYNPRO(OPTIONAL)

T_DESTINATIONS    TYPE  STCC_RFCDEST_TAB(OPTIONAL)

3.3 Define Exceptions as below

 

Exceptions:


NO_DIRECTORY

NO_SELECTION

3.4 Copy and paste the code from file Z_FUNC_MULTI_SYST_REMOTE_COMP.txt


 

3.5 Copy TOP include LZK_REMOTE_SYSTOP from file LZK_REMOTE_SYSTOP.txt.

3.6 Copy SUB include LZK_REMOTE_SYSSUB from file LZK_REMOTE_SYSSUB.txt.

 

4. Activate the above created Program and Function Module.

ABAP Program: Z_MULTI_SYST_REMOTE_COMPARE

Function Group: ZK_REMOTE_SYS

Function Group Includes:  LZK_REMOTE_SYSSUB

                                          LZK_REMOTE_SYSTOP

                                          LZK_REMOTE_SYSUXX

Function Module: Z_FUNC_MULTI_SYST_REMOTE_COMP