Rpr_abap_source_scan Submit Via Program Z

Posted on

Sep 20, 2013  Use t-code CODESCANNER or program AFXCODESCANNER to scan the ABAP source code. Suppose you want to search all the programs where the user name is hardcoded, then go to transaction code CODESCANNER. Enter the packages that you want to scan for the ABAP programs and string that you want to search and press Execute. ERPWorkbench.com helps bring all this information together in one place to help you find what you need including full ABAP code listings, simple code snippets and step by step guides for all SAP development topics from ALV reporting and BDC development to Web application development using BSP's, Web Dynpro and Fiori / SAPUI5.

  1. Rpr_abap_source_scan Submit Via Program Zone
  2. Rpr_abap_source_scan Submit Via Program Z Edge
  3. Rpr_abap_source_scan Submit Via Program Zoo

RPRABAPSOURCESCAN It works as a Where Used within code to find any particular statement. It’s provided by SAP, but like so many thing, it isn’t advertised. Jer deals with a highly customized environment, so this tool is invaluable.

I am trying to write a program that outputs a Z pattern that is n number of * across the top, bottom, and connecting line using for loops.

Example:

This is my current code, it's producing a half pyramid upside down.

Tunaki
94.7k23 gold badges216 silver badges298 bronze badges
KyleKyle
322 gold badges2 silver badges10 bronze badges

3 Answers

This is the logic in the following code:

Rpr_abap_source_scan Submit Via Program Zone

  • Loop over each row of the output (so from 0 to n excluded so that we have n rows)
  • Loop over each column of the output (so from 0 to n excluded so that we have n columns)
  • We need to print a * only when it is the first row (x 0) or the last row (x n - 1) or the column is in the opposite diagonal (column n - 1 - row)

Code:

Sample output for n = 6:

(Note that this output has trailing white-spaces for each row, you did not specify whether they should be included, but it is easy to remove them by adding another check).

TunakiTunaki
94.7k23 gold badges216 silver badges298 bronze badges
RyanRyan
1,7671 gold badge10 silver badges26 bronze badges
Arijit Mukherjee
2,7982 gold badges25 silver badges43 bronze badges
Swïsh SãtîkâñtSwïsh Sãtîkâñt
Submit

Not the answer you're looking for? Browse other questions tagged java or ask your own question.

I assume that I have an ABAP program that takes long time on running. So I want to check what the program is doing at the moment, which line of code is executing or what tables the program is writing to at that exact moment.

I think there is a transaction to check the running programs. Am I right ? If I'm what is that ?

MtokMtok
7509 gold badges31 silver badges51 bronze badges

3 Answers

What you want to do is go to the process overview.

Transaction SM66 shows you all active processes of the current system. This is especially helpful if you have more than one application server.

SM50 will show you all processes of the current application server where you are logged on. To view the available application servers, go to SM51.

From the process overview (in SM66) you can click on the process and click the 'Debugging' button.

Similarly, from SM50, you can choose Administration -> Program -> Debugging from the menu to debug the program.

You can identify the process in which your program is executing from the detail on the item in the process overview.

Another thing you might want to do, if you are able to test your program with a limited set of data, is run it through runtime analysis (transaction SE30, or SAT in newer systems). This will allow you to identify bottlenecks in processing more easily.

mydoghaswormsmydoghasworms
13.6k8 gold badges51 silver badges80 bronze badges

You can check the status of an ABAP process on a rather limited scale using the SM50 overview. If the program is running in a background process (and you have the appropriate permissions), you can debug the background job from transaction SM37.

vwegert

Rpr_abap_source_scan Submit Via Program Z Edge

vwegert
17.2k3 gold badges31 silver badges54 bronze badges

If the DB accesses in particular are your concern, you can use transaction ST05 to start a SQL Trace. When you display the trace, it will show you the SQL statements executed and provide some info on them, such as how long it took, how many records were returned, and what indexes were used. It also allows you to see where the statement was called in the source.

ST05 is a system-wide trace, but you can filter the trace by username/transaction/program/table to narrow down the results. Also note that only one trace can be running the the system at a time, so be sure to turn it off when you're done so that the next person can use it.

Rpr_abap_source_scan Submit Via Program Zoo

Alex D. CampbellAlex D. Campbell

Not the answer you're looking for? Browse other questions tagged sapabap or ask your own question.