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

How to find a string within a coding

Former Member
0 Likes
1,770

Hi @ll,

There is a custom made transaction, which sometimes delivers a error message. I was wondering if anybody know how to find this message and the part which cause this error. Once again there are two questions:

1. How to find the coding behind the transaction (maybe via the menu "System -> Status -> Program ->Navigate")

2. If the coding exist of many includes and performs how to find the part which causes the problem.

Thanks for your help

Kami

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
1,676

Hi Kami,

You can find program related to your custom transaction code using Tcode SE93. Give your transaction name and click display , you will find program name , then open that program and find the code

You can also go like you mentioned path.."System -> Status -> Program ->Navigate

2.Put the break-point in the code and execute to find out exactly where the error is coming

Hope it helps you..

Regards,

KK

12 REPLIES 12
Read only

matt
Active Contributor
0 Likes
1,676

Do you have the error message id and number? You can do a where used of it from SE91. If you've only got the text, then look in T100 to find the message id and number.

If the text is hardcoded in some program, then if it's all in one place, just search the code... If it's a huge application, it's more difficult. SE38 - Utilities - Find in source code is a good start. Otherwise, you can write a program that uses READ REPORT to search through the source code of a selection of programs.

matt

Read only

Former Member
0 Likes
1,676

Thanks Matt,

But how to find out the source code which is executed once the transaction is performed. Is this over the "System->Status->Program->Navigate

Kami

Read only

Former Member
0 Likes
1,676

Hi Kami,

After opening the program, use FIND key and look for all error messages used in that program. Put break-point before that error messages. Then find out which error message is triggered.

Regards,

KK

Read only

matt
Active Contributor
0 Likes
1,676

Go to SE93, type in the name of the transaction, and see what code is executed.

matt

Read only

Former Member
0 Likes
1,677

Hi Kami,

You can find program related to your custom transaction code using Tcode SE93. Give your transaction name and click display , you will find program name , then open that program and find the code

You can also go like you mentioned path.."System -> Status -> Program ->Navigate

2.Put the break-point in the code and execute to find out exactly where the error is coming

Hope it helps you..

Regards,

KK

Read only

0 Likes
1,676

Hi Kishore Kumar

Thanks for you replay

If the message is a part of one of the includes how can I search for this. Since the "search" button delivers only the string within the includes and not if the string is part of the function which is called in one of the includes for example.

Kami

Read only

matt
Active Contributor
0 Likes
1,676

If you click on the "binocular" icon, you can search the whole program.

matt

Read only

0 Likes
1,676

but if a the string is part of a function which is called from one of the Includes would this be displayed as well ?

Kami

Read only

0 Likes
1,676

Hi Kami,

After pressing FIND button choose Main program Radio button, It will give all places(all related includes) where this error message is used and keep break-point before this error message and execute the transaction, then find out which one is getting trigger for that particular error message.

Hope u got it...

Regards,

KK

Read only

0 Likes
1,676

Hi KK,

The problem is the "FIND" button doesn't deliver any result for my search and that is the problem. I assume that the string is created in one of the many functions which are called in one of the includes.

Many thanks for you help

Kami

Read only

matt
Active Contributor
0 Likes
1,676

If you can make the error happen, and you have its message number, then you can set a watchpoint in the debugger for sy-msgno = 012 for example. The debugger will then stop execution at the exact point the error is raised.

matt

Read only

former_member585060
Active Contributor
0 Likes
1,676

Hi,

Just copy the error message and goto the particular transaction,

Same as you said, Menu, System>Status, Program(Screen) double click,

In Program, Click on Find, Give the error message,

Select the Radio button In Main Program,

See wether it displace the code where it is used, Try for Single words if full word not gives any result.

Regards

Bala Krishna