Application Development 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: 

how to compare 1 function in 2 different progs in debugging

former_member186143
Active Contributor
0 Kudos
228

I'm working with ECC6.0 and I was wondering if there is a neat way to compare a function with variable values in debugging with another function in debugging.

I have build an z programm which uses the function CV100_DOCUMENT_SEARCH

I give or at least I try to give alle the values in the same manner as this function is working in tcode CV04N

somehow I still don't get any results back in my zprogramm while all the variables are the same . is there perhaps an easy way to compare the variable and table values from CV04N with the variables and table values from my z programm ??

I'm getting nuts checking all the variables from the structures between the 2 programms by clicking on every one and scrolling down all the time

ofcourse points for the one who prevents me from getting rsi on these kind of things

9 REPLIES 9

messier31
Active Contributor
0 Kudos
154

Hi,

Set a break point exactly before the function module in both program i.e in trasaction CV04N and ur Z program. now execute both and compare values for each import variable and tables u r passing to this function module with values in CV04 transaction.

I doubt if there is any other way..

EnjoySAP.

Pankaj Singh.

0 Kudos
154

yep that's the way I'm working now and it's totally inefficient when you have tables and structures with a lot of values which I have to compare

hope that there is a smarter way to compare ?

0 Kudos
154

and to make things more confusing I manually checked all the variables from CV04N and put them in testing data for the function CV100_DOCUMENT_SEARCH

but in testing mode no results show up while in cv04n with the same data I get results ??

what is happening here ?

Former Member
0 Kudos
154

We have a functionality to download the internal table to excel sheet. in the frist program download the data to excel sheet and save it .

Use the excel sheet to compare the data when in debugger of other program.

Hope this help, Just an idea

0 Kudos
154

yep I know that option for downloading to excel but still when you have multiple structures or tables then it's still a lot of work.

it would be handy if you could just set all the data in debugging for a specific funtion to testdata for that function. and also from the other program and let sap compare both of the datasets perhaps an idea for the next release ??

oh and I solved the problem with the function above

in the function


  CALL FUNCTION 'CV100_DOCUMENT_SEARCH'
    EXPORTING
      max_rows              = restrict

the global variable restrict is used inside the function (instead of max_rows) which caused it to return no results.

thank god it's almost weekend

kind regards

arthur

former_member186143
Active Contributor
0 Kudos
154

to old have to close down

0 Kudos
154

Moderator message - When closing old threads, there is no need to add a comment. Adding a pasted answer like "to old have to close down" only brings old threads to the top of the forum list and pushes current ones down. If you do add a comment, please indicate just how the problem was resolved. Rob

0 Kudos
154

OK will leave out an auto reply when cleaning up, but then there is no clue for those who search for answers on sdn where the answer is since the question can only be marked as answered. so then you search for an answer in the replies and will find none that's why I put the reason in the topic why I mark it as answered so it will save time for those searching.

if a topic is not answered and I want to close it down why can't I just push a button 'closed no-answer'

tha fact that you always have to mark it as answered while they are not is a bit weird.

kind regards

arthur

0 Kudos
154

Yes - I agree. Forcing people to mark threads as "answered" when they are not is confusing and is something that the powers that be are looking at. Hopefully, it will be resolved soon.

Rob