Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Programatic code comparison

Former Member
0 Likes
5,920

Dear Forum,

I'd like to perform a code comparison between two systems programatically similar to what I can do manually in

SE80 -> Utilities -> Version Management...

Does anybody know a function module providing this functionality, in the best case even with RFC functionality?

Best regards & Thanks in advance

Wolfgang

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
5,526

try transaction SE39

here u can compare progs over two different systems by specifying an RFC destination

rgds,

PJ

10 REPLIES 10
Read only

Former Member
0 Likes
5,527

try transaction SE39

here u can compare progs over two different systems by specifying an RFC destination

rgds,

PJ

Read only

Lakshmant1
Active Contributor
0 Likes
5,526

Hi ralf,

Check SE39 transaction code.

Also have a look at program RSVRSRS3

Thanks

Lakshman

Read only

Former Member
0 Likes
5,526

Thanks for your answers, they helped already.

However, it would be nice to have some module just telling that the programs differ or not. I want to perform a mass comparison - let's say I get all DDIC objects for one user from TADIR - then I'd like to get a list telling me whic objects differ in coding and which not.

Read only

0 Likes
5,526

well this might sound a bit silly but u can try this...

there is an option to download ur program source code in a local text file....u can do so for the two programs u want to compare...

Utilities -> More Utilities->Upload/Download->download

then u can read the two files in two internal tables in another program and then compare the two internal tables for equality.

using something like

if itab1[] = itab2[].

....<your code here>...

endif.

Note : u can create internal tables as

data : itab1 type table of edpline with header line,

itab2 type table of edpline with header line.

and fill them using GUI_UPLOAD to read file

Message was edited by: Priyank Jain

Read only

Former Member
0 Likes
5,526

hi,

I don't thing there is such a function module. you create on custom function module with rfc enabled.

using READ_TEXT we can read program lines (i'm not sure )

Name - program name and Id = TXT

sasi

Read only

0 Likes
5,526

Hi,

try fm SVRS_GET_VERSION_DIRECTORY_46

Andreas

Read only

Former Member
0 Likes
5,526

For other system use RFC_READ_REPORT .

You may use the same FM for Logon system also

or READ REPORT ......into itab .

Later compare the entries in QTAB . You may put logic to compare only executable statements .

Cheers .

Read only

Former Member
0 Likes
5,526

Hi Sanjay,

your hint was helpful, but the output length is limited to 72 characters. Our coding often has lines with more characters.

In the moment I'm favoring the idea of using modules of func group SVRR. It provides modules to read coding into internal tables.

Read only

0 Likes
5,526

Hi,

sorry i've fogot:

1) get version with fm SVRS_GET_VERSION_DIRECTORY_46

2) get program with fm SVRS_GET_VERSION_REPO_40

both ate available in 4.6 and 6.2

Andreas

Read only

Former Member
0 Likes
5,526

Dear All,

thanks to your ideas. I'll do the following now:

1) read TADIR

2) Loop at TADIR and

3) Get coding of most recent version by using

SVRS_GET_VERSION_*

in local and remote system

4) Compare coding using

SVRS_COMPUTE_DELTA_REPT

Thanks again to all. Best regards

Wolfgang