How to Debug a Screen or Transaction ?
Hi ,
I am developing a screen with table control. I would like to debug that one.
How can I do it ?
Bye,
Muttu.
Hi Satya,
You need not concatenate the transaction code with '/h'.
Simply write '/h' in the command editor and press Enter.
Now do whatever processing you need to do (e.g. press a button etc.).
The system will automatically switch to debugger mode.
Please reward points if helpful.
Thanks,
Himanshu.
Similar Messages
-
How to debug standard report that starts with a transaction?
I want to run a report in debug mode. The report name is RFFMEPGAX, which
is normally run using transaction FMRP_RFFMEP1AX.
I want to start the transaction, fill in the form with the values I need, then
hopefully the report code pops up in a debug window......
Is there a way to do this? I know how to open the debugger, but have not
yet figured out a way to get the initial transaction to open in debug mode.If the transaction starts with a pop-up message, you can create a text file with this...
[System]
Name=R/3
Client=
Description=
[User]
Name=
Language=
Password=
[Function]
Command=/H
Title=Title
Type=SystemCommand
Name it <b>Debug</b> and just drag it to the pop-up window...The debugger is going to start after a single Enter button...
Greetings,
Blag. -
How to add new tab screen in transaction BP
Hi,
Please let me know How to add new tab screen in transaction ukm_BP. Is there any SPRO configuration needed for this?
Thanks,
Debi.Hi,
You may also try the exits available with the MIGO transaction. To find exits you can use the fillowing code by giving tranasaction code as input.
REPORT zrmexitfinder .
TABLES: modsap, modact, tstc.
PARAMETERS: input1 LIKE tstc-tcode DEFAULT ' ',
input2 LIKE modsap-typ DEFAULT ' '.
DATA: search1(6),
search2(3),
search3 LIKE modsap-member.
DATA : first_row VALUE 'Y'.
CONCATENATE: '%' input1 '%' INTO search1,
'%' input2 INTO search2.
SELECT * FROM tstc WHERE tcode LIKE search1.
first_row = 'Y'.
CHECK tstc-pgmna NE space.
CONCATENATE '%' tstc-pgmna '%' INTO search3.
SELECT * FROM modsap WHERE typ LIKE search2
AND member LIKE search3.
SELECT SINGLE * FROM modact WHERE member = modsap-name.
IF first_row EQ 'Y'.
WRITE: /0 tstc-tcode, 6 tstc-pgmna, 16 modsap-name, 32 modsap-typ,
45 modsap-member, 70 modact-name.
first_row = 'N'.
ELSE.
WRITE: /16 modsap-name, 32 modsap-typ, 45 modsap-member, 70 modact-name.
ENDIF.
CLEAR : modsap, modact.
ENDSELECT.
IF sy-subrc NE 0.
WRITE : /0 tstc-tcode, 6 tstc-pgmna, 30 'No exits found'.
ENDIF.
CLEAR tstc.
ENDSELECT.
END-OF-SELECTION.
CLEAR: search1, search2, search3.
Regards,
Renjith Michael. -
How to Implement a screen exit to a standard SAP transaction
Hi All,
Can any body give How to Implement a screen exit to a standard SAP transaction??
Regards,
AKHey,
This link which gives the Step by step way of iimplement a screen exit:
http://wiki.ittoolbox.com/index.php/HOWTO:Implement_a_screen_exit_to_a_standard_SAP_transaction
Regards,
Arjun -
LSMW VD51 , Validations in Begin of Transaction; how to Debug the code?
Hi All,
I have written code for validations i Begin of Transaction in the field mapping 5th step of LSMW for VD51.
Now this code not getting triggered at the time of Conversion of Data. How to debug the code. I have put a static break point 'BREAK-POINT' still not getting triggered.
Any suggestion / solution for this issue.
Thanks and Regards,
Narsimha KulkarniHi Narshimha,
Make any mapping error during mapping and check the syntax of mapping it will drag you to the lsmw report there you can put your break point. You can check the report name from transaction code as well.
Remember this mapping block will execute when you execute the step Convert Data in LSMW.
Regards
Dhirendra -
How can we debug the screen pop up?
How can we debug the screen pop up?
Hi,
if you know where the popup is raised it is easy of course as you just have to uses F6 to keep the debug mode running.
But there is a way to get the popup into debug mode similar to typing /h into the ok code field of a sandard dynpro. Therefore you have to do the following steps:
1) click the "Create a Shortcut" button in the gui to get a shortcut on your desktop (the button next to new session)
2) in the oped screen for shortcut setting choose:
type -> system command
command -> /h
depending on gui release you have to enter a system ID -> use the one of your system and parameters -> just type abc
3) press finish to create the shortcut
If you have done this you can drag and drop the shortcut from the desktop to a sap session or popup to switch on the debug mode. One shortcut works for all systems you have, the system id in it does not matter.
Oh, while I often have the case that I forget to resize the window before the popup appears so i cannot access the shortcut directly on the desktop, just remeber that you can always open a small file explorer window go to the desktop folder and drag it from there ;o)
Best Regards
Roman -
how to debug a report
i am new to ABAPHi
<b>ABAP Debugger</b>
The ABAP Debugger is an integrated test tool within the ABAP Workbench. You use it to check the program logic and to find errors in the source code of an ABAP program. In the Debugger, you can step through the source code of a program. The running program is interrupted after each step, allowing you to check its processing logic and the results of individual statements.
As of Release 6.10, you can also run Business Server Pages (BSP) in the debugging mode. You can also display and set breakpoints here. Business Server Pages can be displayed in the Object Navigator when you select an appropriate application under BSP Application.
<b>Features</b>
The Debugger provides an efficient means of identifying errors in ABAP programs. It contains the following functions:
Ways of starting the Debugger
Choosing different views
Choosing different execution options in the Debugger
Displaying source code in the Debugger
Setting and deleting breakpoints
Setting and deleting watchpoints
Stopping a program at a particular statement or event
Displaying and changing field contents at runtime
Displaying ABAP Objects and references
Displaying and positioning strings
Setting and deleting database locks
Opening the ABAP Editor, or Object Navigator
System settings and runtime warnings
<b>Starting the Debugger</b>
There are two possible strategies for starting the Debugger in the ABAP Workbench:
By setting breakpoints then running the program
By running the program in debugging mode.
<b>Setting Breakpoints</b>
A breakpoint is a signal in a line of code that tells the ABAP runtime processor to interrupt the program at that line and start the ABAP Debugger. A distinction is made between static and dynamic breakpoints. For further information about the different types of breakpoints and how to use them, refer to Breakpoints.
Running a Program in Debugging Mode
You can start the Debugger without previously having set breakpoints. This is the best procedure to use when you want to test a program right from the beginning. It is also useful if you do not know the program very well and therefore are not sure where best to set breakpoints. You can start the Debugger as follows:
From the Object Navigator Select a report or transaction and program and choose Program Test Debugging.
From the ABAP Editor Choose Program  Execute  Debugging (or the Debugging pushbutton).
From any screen Choose System  Utilities  Debug ABAP.
From any screen Enter " /h " in the command field.
<b>Checking System Programs for Errors</b>
To check a program or program component that is part of the ABAP Workbench (for example, the Screen Painter), you must use the system Debugger. To start the system Debugger, choose System  Utilities  Debug system from any screen. To stop the system Debugger, choose Debugger  Debugging off.
<b>
Displaying Program Attributes</b>
You can display the attributes Fixed point arithmetic, System program and Unicode checks active of the program that has just been executed by choosing Goto  Further Information  Program Attributes.
<b>
Display Modes in the Debugger</b>
When you are debugging a program, there are various display modes that you can use. All of the display modes have the same structure. The top part of the screen displays an extract of the program source code. The bottom part displays the information specifically available in that display mode. There are also pushbuttons on the screen allowing you to switch to the most frequently-used display modes.
go to se38->give ur program name-.execute->give /h at command prompt->execute->now debugging will start->
f5-used for line by line debugging
f6-used for directly executing function modules or performs i.e. control won't go into that block.
f7-run to cursor
f8-direct executing.
fileds: here we can check fild values.
click fileds option and double click on the filed or type the filen name beside filed
tables : here we can check the data in the internal table.
click tables option and double click on the internal table.
Break points:
if you want to debug a particulr part you can use this.
place the cursor at any perform click breakpoint or double click on that line.it will be set.
if /h from report statement it will debug,so for debugging from particular point we will use break points.use f7 to traverse between multiple break points.
Watch-points: In some cases we need to check the data populated in the internal table for eample if we want to check the data of internal table record belongs to 100th vendor we will create watch point for this goto->breakpoints->create watch points->give filed itab-lifnr->=->100.
debugging procedure:
Use '/H' in the command line and execute the report/program, so that it goes to debugging mode
2. keep a hard coded break point in the code like BREAK-POINT and it stops there.
3.From the program Menu, Keep the Soft Break-points and do the debugging.
see the links
Refer to this thread
http://help.sap.com/saphelp_47x200/helpdata/en/c6/617ca9e68c11d2b2ab080009b43351/content.htm
http://www.sappro.com/downloads/Settings&SystemAreas.pdf
http://help.sap.com/saphelp_47x200/helpdata/en/c6/617ca9e68c11d2b2ab080009b43351/frameset.htm
https://forums.sdn.sap.com/click.jspa?searchID=2673672&messageID=3187106
https://forums.sdn.sap.com/click.jspa?searchID=2673672&messageID=850453
https://forums.sdn.sap.com/click.jspa?searchID=2673672&messageID=1546485
https://forums.sdn.sap.com/click.jspa?searchID=2673628&messageID=2048883
http://www.saplinks.net/index.php?option=com_content&task=view&id=24&Itemid=34
http://www.sap-img.com/abap/testing-and-debugging-abap-codes-functions.htm
Reward points if useful -
How to debug BDC , Dialog program and Script
Hi all,
Please let me know, how to debug BDC , Dialog program and Script
Thanks&Regards
Devi<b>SCRIPT DEBUGGING</b>
When we want to debug the SAPSCRIPT, we need to first activate the debugger, we have 2 ways to activate the Debugger.
1) Execute the program RSTXDBUG
2) Go to SE71, from the initial screen enter the form name and press Utilities --> Activate Debugger
When we are in the Debug screen,
3.1) F5 will be debug filed by field, that means if a single line is having 5 fields, if we press the F5 this will do field by field,
3.2) F6 will be line by line, that means when we press the F6, it will debug the line and it will go to the next line. F7 also do the same way
3.3) F8 will be very useful when we have any include statement in the SCRIPT, if any include is there and we press the F5 or F6 then this will go that Include (normally SO10 or any transaction text), then if we want line by line debugging then we can press the F5 or F6, or if you want to execute that in a single shot then press the F8, then the debugger will be executed that include and come back to the Script debugging.
Some times in the script, we may right lengthy lines, if we want to debug that whole line, we have an option called Left/Right, this we will find the Debug screen of the script, there is a Push button, we can make use this button to debug.
We can put the breakpoints in the SCRIPT DEBUGGER also, just press the BREAKPOINT Pushbutton from the debugging screen or press EDIT --> Breakpoint
If we want to debug the print program from the SCRIPT DEBUGGER, just press SHIFT+F7 or EDIT --> ABAP Debugging
If we want to see the Windows which are defined in the forms, just press the Go to --> Form --> Windows .if we want to see the pages go to --> Form --> pages. Here we have an option to see the page wise window also go to --> Form --> page Windows
If we want to see the paragraphs which are defined in that script, press go to --> Styles --> paragraphs.
If we want to see the Character formats which are defined in that script, press go to --> Styles --> Character Strings.
If we want to see the Page formats which are defined in that script, press go to --> OTF --> Page.
If we want to see the Elements which are used in the Script, then press go to --> Text Elements --> Form Elements.
If we want to see the commands which are used in the script, press go to --> Commands --> List
Finally, if we want to exit from the SCRIPT DEBUGING, simply press Debugger --> Exit
<b>DEBUG BDC</b>
ust go into debugging mode and do the BDC step by step, when it comes to the Call Transaction line, check the mode which will be 'N'....Now, overwrite this with 'A' and execute the BDC...It will run in All Screens Mode....
As suggested above the MODE 'A' will do the trick as it takes you to all screens.
Normally MODE N will be defaulted as it will be used for background processing,
Here is a simple tip,
This will be the call transaction part of the program,
CALL TRANSACTION 'IW32' USING BDCDATA MODE 'N'
MESSAGES INTO MESSTAB.
I would suggest you to make it like this,
DATA: V_MODE TYPE C VALUE 'N'.
*<In debug mode set V_MODE = 'A' for debugging>
CALL TRANSACTION 'IW32' USING BDCDATA MODE V_MODE
MESSAGES INTO MESSTAB.
This will be very useful because you just need to change the value of the V_MODE at runtime as A for debugging besides it has N which is the default to be used. (i.e. you need not change the code again and again).
This will be very useful when you have to debug some program in QA or PRD servers.
regards,
srinivas
<b>*reward for useful answers*</b> -
Can anyone explain me " How to debug updaterules?"
Can anyone explain me " How to debug updaterules?"
Hi ALI,
Transfer rules and Update rules are the main areas within a BW system where the BW professional can transform your transaction system data into the required format for what ever InfoObject / InfoProvider is being updated.
Quite often when ABAP is used as part of your transfer and update rules there is a need to debug the code to ensure you dont introduce any problems into your production environment.
When data is loaded into a BW system the a background process is used. This means you can not run the data load in debug mode as you would most other programs. What you need to do is run the load program in Simulation mode.
The first step to take is set a breakpoint in you coded Update/Transfer rule. This can be achieved by:
Setting a breakpoint within the generated program once the rule has been activated.
Locate the code manually during your debug session and setting a break-point.
Hard code a breakpoint in the rule as shown below:
o if sy-uname = 'MYUSERID'.
 break.
o endif.
My preferred method is the first option. I try not to hard code breakpoints (second option) as I sometimes forget to remove the code once I have finished debugging and the third option takes I find take too long.
To set a break-point in the activated code you have to find the activated program and then search for your code that you want to debug. Follow these 4 steps (Update Rule):
1, View the code for the Update Rule.
2, Locate the code that you want to debug and remember some content that will identify the code that you need to debug.
3, Come back out of the code and activate your Update rule. Once activated, select Display Activated program from the Extras menu.
4, Search for the code that you located in step 2 and set the break-point.
Once your beak-point has been set you then need to run the update/transfer rule in simulation mode. To achieve this you must have already loaded data into the PSA. Follow these steps:
1, Navigate to the PSA under the Monitoring section with transaction RSA1. Find the PSA Request that you want to debug and select the Simulate/Cancel update option from the right mouse click menu.
2, The screen will then show the details tab of the InfoPackage Monitor for the specific request. Right-click on a selected Data-Packet and select Simulate.
3, Select the appropriate Activate Debugging option for your rule (Update/transfer). Select the radio button to determine the number of records that you want to process in you debugging session and select the Perform Simulation button.
4, Select the Data Packets, Number of Records and then the continue button.
5, The update process will start and your screen will show the debug window. Press F8 to run through your program. It will then stop at the breakpoint you set earlier.
Regards]
Anil -
hi
how to debug the progrom which is running in the background.
could anybody explain this with steps.
thanx
rockyHi Rocky,
You can debug batch jobs by going to 'SM37', type in 'JDBG' in the
command line ( no '/' ), put the cursor on the job and press enter - will
take you to the job in debug mode.
You can do this only after the job has finished execution. This will simulate the exact background scenario with the same selection screen values as used in the job also sy-batch will set to 'X'.
So type in the transaction code 'JDBG' and place your cursor on the job after It has finished. It will take you to a SAP program in debug mode. Step through this program which is about 10 lines, after this your program will be executed in the debug mode.
Steps
1. Create variant called BACKGROUND for program to be debugged.
2. Execute ZDEBUGBG (pgm code below) in background for immediate processing.
3. Execute transaction SM50.
4. Select process that runs ZDEBUGBG.
5. Goto 'Program/Session' 'Program' 'Debugging'.
A se80 debug session will open.
6. Change variable W_EXIT to 'E'.
7. Step thru (F6) until ZWBTEST comes up.
1. Go to Transaction SM66 and find your work porocess.
Select the line work process is on and click on the Debugging button.
If this is a custom program, you can put a wait statement in the code to buy yourself sometime.
2. Go to Transaction SM50. From the tool bar "Program/session"->Program->Debugging.
goto SM37 and from Program menu(not sure.. try other menu's)
-->Catchjob . it will goto the active job in debugging mode.
best regards,
Thangesh -
How to debug the abap program ?
how to debug the abap program ?Can anybody explain me in details.
Hi
Debugger
This section of the ABAP Workbench documentation provides information on how to use the Debugger as a test tool for finding errors in the source code of an ABAP program.
Functional Overview
Use
The ABAP Debugger is an integrated test tool within the ABAP Workbench. You use it to check the program logic and to find errors in the source code of an ABAP program. In the Debugger, you can step through the source code of a program. The running program is interrupted after each step, allowing you to check its processing logic and the results of individual statements.
As of Release 6.10, you can also run Business Server Pages (BSP) in the debugging mode. You can also display and set breakpoints here. Business Server Pages can be displayed in the Object Navigator when you select an appropriate application under BSP Application.
Features
The Debugger provides an efficient means of identifying errors in ABAP programs. It contains the following functions:
Ways of starting the Debugger
Choosing different views
Choosing different execution options in the Debugger
Displaying source code in the Debugger
Setting and deleting breakpoints
Setting and deleting watchpoints
Stopping a program at a particular statement or event
Displaying and changing field contents at runtime
Displaying ABAP Objects and references
Displaying and positioning strings
Setting and deleting database locks
Opening the ABAP Editor, or Object Navigator
System settings and runtime warnings
Starting the Debugger
There are two possible strategies for starting the Debugger in the ABAP Workbench:
By setting breakpoints then running the program
By running the program in debugging mode.
Setting Breakpoints
A breakpoint is a signal in a specific line of the program source code. This signal indicates to the ABAP runtime processor to stop the program at the relevant line and start the ABAP Debugger. A distinction is made between static and dynamic breakpoints. For further information about the different types of breakpoints and how to use them, refer to Breakpoints.
Direct Processing
You can start the Debugger without previously having set breakpoints. This is the best procedure to use when you want to test a program right from the beginning. It is also a useful procedure if you are not overly familiar with the program and therefore are not sure where best to set breakpoints. You can start the Debugger as follows:
From the Object Navigator
Select a report or transaction and choose Program ® Test ® Debugging.
From the ABAP Editor
Choose Program ® Execute ® Debugging (or the Debugging pushbutton).
From any screen
Choose System ® Utilities ® Debug ABAP.
From any screen
Enter /h in the command field.
Display Modes in the Debugger
When you are debugging a program, there are various display modes that you can use. All of the display modes have the same structure. The top part of the screen displays an extract of the program source code. The bottom part displays the information specifically available in that display mode. There are also pushbuttons on the screen allowing you to switch to the most frequently-used display modes.
Display Modes Available Using Pushbuttons
Fields
The scrollable field display contains the contents of up to eight fields. The contents of the three most important system fields are always displayed. This is the default display mode in the Debugger. See also Processing Fields
Table
Displays the contents of an internal table. This mode allows you to display and edit the entries in an internal table. See also Processing Internal Tables
Breakpoints
A scrollable display containing up to 30 breakpoints. Next to each breakpoint is a counter. You can also delete breakpoints in this display. See also Managing Dynamic Breakpoints
Watchpoints
You can set a watchpoint for a field so that the program is interrupted whenever the value of that field changes. This display mode contains a list of watchpoints, the fields and programs to which they are assigned, the current values of the fields, and the conditions upon which the watchpoint is activated. See also Setting Watchpoints
Calls
This mode displays the current sequence of events, and the sequence of calls up to the current breakpoint. The last active call is displayed at the top of the list; previous calls are listed in reverse chronological order. When an event (for example, START-OF-SELECTION) concludes, it is deleted from the display.
Overview
This mode displays the structure of the program. It lists its events, subroutines, and modules, and shows which sections belong to which events. It also displays the section currently being processed.
Settings
This mode displays the current Debugger settings. You can change the settings by selecting or deselecting various options. For further information, refer to Settings and Warnings
Other Display Modes
You can access other display modes by choosing Goto ® Display data object.
Single field
Displays the contents and technical attributes of a field.
Structured
field
Displays the components of a structure, along with their contents and attributes. If you double-click a component, the system displays detailed information for it.
Strings
Display the content and current length of the string. You can also display part of the content by means of offset and length.
Internal table
Displays the type, line numbers and contents of an internal table.
Object
Displays the structure of an ABAP Object.
For further information on these displays, refer to Displaying Attributes and Displaying ABAP Objects
Checking System Programs for Errors
To check a program or program component that is part of the ABAP Workbench (for example, the Screen Painter), you must use the system Debugger. To start the system Debugger, choose System ® Utilities ® Debug System from any screen. To stop the system Debugger, choose Debugger ® Debugging off.
Displaying Program Attributes
You can display the attributes Fixed Point Arithmetic, System Program, and Unicode Checks of the program that has just been executed by choosing Goto ® Further Information ® Program Attributes.
Restarting the Debugger
If you choose Debugging ® Restart, debugging mode is stopped and the system takes you to the initial screen of the last transaction you called. If, for example, you started an ABAP program in debugging mode from transaction SE38 (ABAP Editor), choosing Debugging ® Restart will take you back to the screen titled ABAP Editor: Initial Screen. If you want to restart the program in debugging mode, choose Debugging.
Breakpoints
Apart from direct execution of an ABAP program in the Debugger, it is also possible to start the Debugger call by the exact setting of a breakpoint. This is achieved by setting one or more of these breakpoints in the program. A breakpoint is a signal at a particular point in the program that tells the ABAP runtime processor to interrupt processing and start the Debugger. The program runs normally until the breakpoint is reached.
There is also a special kind of breakpoint called a watchpoint. When you use watchpoints, the Debugger is not activated until the contents of a particular field change. For further information, refer to Watchpoints.
Breakpoint Variants
The Debugger contains different breakpoint variants:
Static
The BREAK-POINT statement in an ABAP program. Static breakpoints are not normally user-specific. However, you can make them user-specific.
Directly-set
dynamic breakpoints
Can be set in the ABAP Editor or the Debugger. Dynamic breakpoints are always user-specific, and are deleted when you log off from the R/3 System.
Breakpoints
at statement
The Debugger stops the program directly before the specified statement is executed.
Breakpoints
at subroutine
The Debugger stops the program directly before the specified subroutine is called.
Breakpoint at function module
The Debugger stops the program directly before the specified function module is called.
Breakpoint at method
The Debugger stops the program directly before the specified method is called.
Breakpoints at system exceptions
The Debugger stops the program directly after a system exception, that is, after a runtime error has been intercepted.
Static Breakpoints
Static breakpoints are not normally user-specific. Once a user has inserted the statement BREAK-POINT or BREAK name in an ABAP program, the system always interrupts the program at that point for that user or only for the user name. This procedure is only useful in the development phase of an application, when the program execution is always to be interrupted at the same place. For further information, refer to Static Breakpoints.
In HTTP sessions, a static breakpoint is skipped if you did not set additional dynamic HTTP breakpoints in the editor of a BSP page. Instead, a corresponding system log entry is written, which can be checked using transaction SM21.
Dynamic Breakpoints
Dynamic breakpoints are user-specific. Therefore, you should use them if you only want the program to be interrupted when you run it yourself, not when it is being executed by other users. All dynamic breakpoints are deleted when you log off from the R/3 System.
Dynamic breakpoints are more flexible than static breakpoints, because you can deactivate or delete them at runtime. They have the following advantages:
You do not have to change the program code
You can set them even when the program is locked by another programmer
You can define a counter that only activates the breakpoint after it has been reached
Special dynamic breakpoints are useful when you want to interrupt a program directly before a particular ABAP statement, a subroutine, or an event, but do not know exactly where to find it in the source code. Event here is used to refer to the occurrence of a particular statement, for example, or calling up a method. Special dynamic breakpoints are user-specific. You can only set them in the Debugger. For further information, refer to Dynamic Breakpoints.
In HTTP sessions, the system stops both at static and dynamic breakpoints if a dynamic breakpoint was set in the editor of a BSP page before program execution.
Lifetime and Transfer of Breakpoints
A static breakpoint remains intact as long as the BREAK-POINT or BREAK-POINT name statement is not removed from the source code. Without saving, dynamic breakpoints only remain intact in the relevant internal session. However, they are effective during the entire user session, if they are saved by choosing Breakpoints ® Save in the ABAP Debugger. For more details on the subject of sessions and user sessions, refer to Modularization Techniques in the ABAP keyword documentation.
If you call an HTTP session during a user session, only the HTTP breakpoints are loaded when the HTTP session is started. You activate HTTP debugging in the ABAP Editor by choosing Utilities ® Settings ® HTTP Debugging. Depending on the setting, the system then displays either the HTTP or standard breakpoints in the Editor.
If you call an update session during a user session, breakpoints that were defined beforehand in the calling processing unit are copied to the new update session, where they can be displayed under Breakpoints. If, in the ABAP Debugger, you check Update Debugging under Settings and then, for example, call the update module func using CALL FUNCTION func IN UPDATE TASK, a new window is opened in which you can debug this function module in the update session. All the breakpoints that were set in the calling processing unit can also be processed here.
Breakpoints at Statements
You can use this special kind of dynamic breakpoint to interrupt a program directly before an ABAP statement is processed.
Prerequisites
You must already be running the program in the Debugger.
Procedure
To set a breakpoint at an ABAP statement:
1.Choose Breakpoint ® Breakpoint at ® Statement...
The following dialog box appears:
2.Enter the ABAP statement.
The system sets a breakpoint at all points in the program at which the ABAP statement occurs.
3.Choose ENTER.
The breakpoint applies to all lines containing the specified statement.
Result
The system confirms the breakpoint and adds it to the list in the display. When you finish your debugging session, the breakpoint is automatically deleted unless you have explicitly saved it.
Breakpoints at Subroutines
You can use this special kind of dynamic breakpoint to interrupt a program directly before a subroutine is called.
Prerequisites
You must already be running the program in the Debugger.
Procedure
To set a breakpoint for a subroutine:
Choose Breakpoint ® Breakpoint at ® Event/Subroutine.
The following dialog box then appears:
Enter the name of the subroutine before which you want to interrupt the program. By default, the Program field contains the name of the program that is currently active. The system sets a breakpoint wherever the specified subroutine occurs in the program code.
Choose ENTER.
Result
The system confirms the breakpoint. The breakpoint is added to the breakpoints displayed.
Breakpoints at Function Module
You can use this kind of dynamic breakpoint to interrupt a program directly before a function module is called.
Prerequisites
You must already be running the program in the Debugger.
Procedure
To set a breakpoint for a function module:
Choose Breakpoint ® Breakpoint at ® Function module...
The following dialog box appears:
Enter the name of the function module before which you want to interrupt the program. The system sets a breakpoint wherever the specified event, module pool, or subroutine occurs in the program code.
Choose ENTER.
Result
If you entered a valid function module name, the system confirms that the breakpoint has been set. If the function module exists in the system, the new breakpoint is added to the display list.
Breakpoints at Methods
You can use this special kind of dynamic breakpoint to interrupt a program directly before a method is called.
Prerequisites
You must be already running the program in the debugger.
Procedure
To set a breakpoint for methods:
1. Choose Breakpoint ® Breakpoint at ® Method...
The following dialog box then appears:
2. Enter the name of the method and class before which you want to interrupt the program. A breakpoint is then set each time the specified processing block appears in the source code.
3. Choose ENTER.
Result
The system confirms the breakpoint. The breakpoint is added to the list in the display.
Breakpoints at System Exceptions
You can use this special form of dynamic breakpoint to interrupt a program immediately after a runtime error has occurred.
Prerequisites
You must already be running the program in the Debugger.
Procedure
To set a breakpoint at a system exception:
Choose Breakpoint ® Breakpoint at ® System exception.
Result
The system confirms the breakpoint. The breakpoint is added to the breakpoints displayed.
When a system exception is triggered, a warning triangle appears in the line containing the statement that caused it. If you double-click the warning triangle, the internal name of the runtime error appears.
Static Breakpoints
You should only use static breakpoints during the development phase of an application. You must remove them from your program before you transport it.
Setting Breakpoints
To set a static breakpoint, use the ABAP statement BREAK-POINT . Place the breakpoint in the line at which you want to interrupt the program.
program RSDEBUG_01.
if SY-SUBRC 0.
break-point.
endif.
When you run the program, the runtime processor interrupts it when the breakpoints occur. You can number your breakpoints to make them easier to identify ( BREAK-POINT 1, BREAK-POINT 2 ).
Static breakpoints are not normally user-specific. The program is, therefore, always interrupted as soon as the runtime processor reaches the line containing the breakpoint. The program is interrupted regardless of the user who executes it.
However, you can set user-specific static breakpoints using the BREAK statement followed by your user name. For example, if you use the statement BREAK SMITH , the program is only interrupted when user Smith runs it. Although user-specific breakpoints appear in the program code, they are not active when other users run the program. You should, however, be careful if an application is being used by several users with the same name.
Deleting Breakpoints
Since static breakpoints apply to all users, you must remove them from the program once you have finished testing it. In the ABAP Editor, you can find breakpoints quickly by choosing Utilities ® Global search. You can also use the Extended Program Check to find them.
If you do not remove static breakpoints from your program, they will be transported to your production system. This could cause serious problems in the production system.
Dynamic Breakpoints
You can set up to 30 dynamic breakpoints without changing the program code. Dynamic breakpoints can be set either in the ABAP Editor or directly in the Debugger.
Setting Dynamic Breakpoints in the ABAP Editor
You can set dynamic breakpoints in the ABAP Editor regardless of whether you are in display or change mode. You can also set breakpoints directly from within the Debugger at runtime. To set a dynamic breakpoint in the ABAP Editor:
Position the cursor on the line of the source code at which you want to set the breakpoint.
Choose Utilities ® Breakpoints ® Set or the Stop icon. The system confirms that the breakpoint has been set.
To display a list of all dynamic breakpoints in a program, choose Utilities ® Breakpoints ® Display. You can use this list to navigate to a particular breakpoint or to delete one or more breakpoints from the program.
Setting Dynamic Breakpoints in Debugging Mode
To set a dynamic breakpoint in the Debugger:
Position the cursor on the line in which you want to set the breakpoint.
Select the line by double-clicking it or choosing Breakpoint ® Set/delete.
The system sets the breakpoint, and displays a small stop sign to the left of the relevant line. If the line already contained a breakpoint, it is deleted.
When you finish your debugging session, the breakpoint is automatically deleted unless you have explicitly saved it.
Saving Breakpoints
If you want to leave the Debugger temporarily, you can save your dynamic breakpoints so that they are still active when you return to the Debugger within the same terminal session.
To save the breakpoints that you have set in the Debugger:
Choose Breakpoint ® Save.
The system saves all of the breakpoints that you have set in the current program. These breakpoints will remain active until you either explicitly delete them or log off from the system.
You can also delete breakpoints that you have saved:
By deleting individual breakpoints from the display and then saving again. In this case, only your selected breakpoints will be deleted.
By choosing Breakpoint ® Delete all. In this case, the system deletes all dynamic breakpoints.
Managing Dynamic Breakpoints
The ABAP Debugger provides a convenient user interface for managing breakpoints. To open the breakpoint display, choose Breakpoints, or, from the menu, Goto ® Control debugging ® Breakpoints.
Example
Functions
This display mode contains the following functions for breakpoints:
Breakpoint Display
The scrollable breakpoint display contains up to 30 dynamic breakpoints. For breakpoints that you set directly, the program name and line number at which the breakpoint occurs are displayed. For special breakpoint forms, the list displays the statements, events, subroutines, and module calls at which the relevant breakpoints are set.
Counter
In the breakpoint display, you can specify a counter. When you use a counter, the breakpoint is not activated until it has been reached a specified number of times. For example, if you enter 5 for the counter, the breakpoint is not activated until it is reached for the fifth time. After the breakpoint has been activated, it remains so, and the counter no longer appears in the breakpoint display.
Deleting Breakpoints
Position the cursor on the breakpoint that you want to delete, and either double-click the line or choose Breakpoint ® Set/delete. To delete all breakpoints, choose Breakpoint ® Delete all.
Activating and Deactivating Breakpoints
Position the cursor on the breakpoint that you want to activate or deactivate and choose Breakpoint ® Activate/deactivate.
Watchpoints
Like a breakpoint, a watchpoint is an indicator in a program that tells the ABAP runtime processor to interrupt the program at a particular point. Unlike breakpoints, however, watchpoints are not activated until the contents of a specified field change. Watchpoints, like dynamic breakpoints, are user-specific, and so do not affect other users running the same program. You can only define watchpoints in the Debugger.
Use
You set watchpoints in the Debugger to monitor the contents of specific fields. They inform you when the value of a field changes. When the value changes, the Debugger interrupts the program.
Features
You can set up to five watchpoints in a program.
See also Setting Watchpoints.
You can also specify the conditions on which a watchpoint is to become active.
You can specify logical conditions between up to five conditional watchpoints.
See Specifying a Logical Expression.
You can define watchpoints as either local or global. If you define a global watchpoint, it is active in all called programs. Local watchpoints are only active in the specified program.
You can change and delete watchpoints.
See Changing Watchpoints.
You can use watchpoints to display changes to the references of strings, data and object references, and internal tables.
See Memory Monitoring with Watchpoints
Setting Watchpoints
If you want to interrupt a program when the contents of a field or structure change, use a watchpoint. You can set up to five watchpoints, including watchpoints for strings.
A watchpoint can be either local or global. Local watchpoints are only valid in the specified program. Global watchpoints are valid in the specified program, and also in all the other programs it calls.
Procedure
To set a watchpoint, start the Debugger and proceed as follows:
Choose Breakpoint ® Create watchpoint or the corresponding pushbutton. The Create Watchpoint dialog box appears:
Decide whether you want to set a local or global watchpoint.
Enter the program and the name of the field for which you want to set the watchpoint. In the Program field, the name of the program currently running is always defaulted.
If you want your watchpoint to be activated each time the contents of the field change, the definition is now complete, and you can return to the Debugger by pressing ENTER .
To create a conditional watchpoint, that is only activated when a particular situation arises, choose one of the following relational operators.
Operator
Meaning
<
Less than
<=
Less than or equal
=
Equal
<>
Not equal
=
Greater than or equal
Greater than
You can use the Comparison field option to specify whether the comparison is to be carried out with a value that you specify or with the contents of another field. Depending on your choice from step 6, enter a value or a field for the comparison.
Result
The system confirms the watchpoint and adds it to the list in the display. When you finish your debugging session, the watchpoint is automatically deleted unless you have explicitly saved it.
Specifying Logical Links
If you have more than one conditional watchpoint, you can specify a logical link between them:
OR
Only one of the specified conditions must be met
AND
All of the conditions must be met.
Changing Watchpoints
Choose Goto ® Control debugging ® Watchpoints or the Watchpoints pushbutton to display the watchpoint list. The following dialog box appears:
Choose the pencil icon in the line containing the watchpoint you want to change.
Change the watchpoint attributes in the Create/Change Watchpoint.
Choose ENTER .
Deleting Watchpoints
You cannot delete watchpoints by choosing Breakpoint ® Delete or Breakpoint ® Deactivate/activate. Instead, proceed as follows:
Choose Goto ® Control debugging ® Watchpoints or the Watchpoints pushbutton to display the watchpoint list.
Choose the trashcan icon in the line containing the watchpoint you want to delete.
Memory Monitoring with Watchpoints
You can use watchpoints to display changes to the references of strings, data and object references, and internal tables. By placing an ampersand (&) in front of the object name, you can display the reference in question in hexadecimal format. With internal tables, you can also display the table header by placing an asterisk (*) at the beginning of the name.
&objectname
Displays the references of strings, internal tables as well as data and object references
*itab
Displays the table header of the internal table itab
Example
If a watchpoint is set for the object in question at runtime, the program is stopped as soon as the reference is changed. A short dump can be intercepted in this way to stop the program being terminated when the memory is overwritten.
Analyzing Source Code
The Debugger contains an extensive range of functions that help you to analyze the source code of a program. You can step through the source code of a program in four different ways. For further information, refer to Stepping Through the Source Code
For information about functions within the source code display, see Displaying the Source Code
There are also different display modes that provide various information and display the contents of individual fields, tables, and so on:
Reward if usefull -
How to debug for inbound mail in SAPconnect - ERMS
Hi,
How to debug from the point of receipt of an inbound mail in SAPconnect so that we can see the data being passed to the ERMS Workflow WS00200001.
Regards,
DeepakHi Ashish,
Thanks for your prompt reply. Let me explain the scenario in little bit details. If you want I can post the screen shots at flickr etc. for better understanding.
In transaction SWI1: we are getting Error at Invoking Service Manager for Workflow WS00200001. The error is "ERMS support object: Could not find DOCUMENT - Message no. CRM_ERMS020.
In transaction CRM_ERMS_LOGGING: We are getting error "Exception in method constructor (CL_CRM_ERMS_XPATH_TAG): Service CL_CRM_ERMS_ADD2FB_DOCUMENT failed. Cannot read email".
On providing valid email document id or work item id in transaction CRM_ERMS_LOGGING the required action is executed and everything is ok.
We tried to debug in SCOT by DBG+ but on receipt of inbound mail debug session does not start.
Actually we want to understand, on receipt of email what data is passed to the workflow as method call CL_CRM_ERMS_CONVERTER->CONVERT_DOCUMENT does not return XSL content and the error message is raised. It is possible that the previous method call SERVICE_MANAGER->GET_EMAIL_ID() does not retrieve a value for doc_id, but we are not sure without being able to debug through from the SAP connect process.
Regards,
Deepak -
How 2 debug a Perform subroutine in sap script
Hi,
I have a perform endperform in Script. But tht is not working in some case. i m trying to debug but i m not able to go inside the routine and see wht it is doing? . can any one help me how to debug a subroutine in sap script.Hi Panigrahi,
1) Put a break point in your perform.
2) YOu should change the dispatch option in your Output screen of the transaction which triggers your sap script. The dispatch option should be 1 (Send with a periodically scheduled job).
Then save your transaction.
3) Go to se38 and run the program RSNAST00.
Give the Object Key as the Document Number for which you are triggering the script output.
The control will stop in your perform.
Regards,
Ravi -
How To: Debug missing Drivers in MDT
The definitive post on missing drivers in MDT (most comprehensive list I've done so far)…
Please to NOT post questions from this thread, instead create a new thread.
How to debug Network Driver Problems
One of the earliest hurdles an MDT administrator will come across is the management of device drivers, specifically networking drivers. With most other drivers, like Audio, printer, and video drivers, a quick call to Windows Update or install over the network
will resolve the Installation. However unless the Network (and storage) Drivers are installed into Windows from the start, it will be much more difficult to install the rest of the system.
This post should help you get started if you find a machine that did not install a device driver properly, and you want to know how to find and import the correct drivers.
Installing network drivers in the
full OS
Step 1 - Try network connection again
It's possible that you might get a DHCP error from MDT, but when you try again later to connect the Deployment Share it works! This may be caused by a slow or malfunctioning DHCP server in your network. Re-check your DHCP servers, ensure that PortFast is enabled
on your routers. If all else fails get your network administrators to document the DHCP delay. A long delay in modern networks is unnecessary.
Step 2 - Verify connectivity
You may not have a driver problem but a network problem. Check the physical connection on the computer (Network installs on MDT *REQUIRE* a wired network connection, no Wi-Fi). Open a web browser. Check the IP Address (ipconfig.exe /all). Ping the Deployment
Server, manually connect to the Deployment Share. IF you can't connect to the Deployment Share, neither can MDT.
Step 3 - Find the Correct Driver Package
Before you load the driver into MDT, first verify that you have the correct driver. There are scenarios where you may *think* you have the correct driver, but the driver will never run because the package is designed for a different OS/SKU/Platform/whatever.
Install the driver package by:
○ Open the Device Manager (devmgmt.msc).
○ Find the network device in the list (ensure this is the wired device, not the wireless device)
○ Right click on "Properties" and click on the "Details" tab.
○ From the "Details" tab, select the property "Hardware Ids" select all the values, and copy to the clipboard, it would be a good idea to save for later. Should look something like:
PCI\VEN_8086&DEV_1502&SUBSYS_21F317AA&REV_04
PCI\VEN_8086&DEV_1502&SUBSYS_21F317AA
PCI\VEN_8086&DEV_1502&CC_020000
PCI\VEN_8086&DEV_1502&CC_0200
○ From the "Driver" tab, click on "Update Driver…", click on "Browse my computer for driver software" locate the driver package on the local machine or USB Drive, and install the package.
○ You should get a confirmation that the driver package was installed.
○ IF you do not get confirmation, MDT driver installation may not work.
Windows will install the driver starting with the *.inf install package, and will typically include a *.sys (binary) and a *.cat (digital Signature). If the driver package has been re-packaged into a *.cab, *.zip, or other compressed *.exe file, the
package must be extracted first. This is a hard requirement for any driver used by MDT and/or SCCM. All driver packages that are signed by Microsoft (WHQL) will be installed from the *.inf file, and you should only use devices that have the Microsoft WHQL
Logo as a sign of quality.
If you need a help on where to find driver packages for your devices, the 3 largest Computer OEM manufacturers supply drivers grouped by Make and Model that are easily imported into MDT and SCCM. See:
http://deploymentbunny.com/2014/07/08/back-to-basicwhere-to-find-drivers-for-servers-and-clients/
Step 4 - Load driver into MDT
If you have more than 20 driver packages, or if you anticipate you will have more than 20 drivers, you should start grouping your drivers in sub-folders for organization. One popular method is to group by Computer Make and Model. Ensure that you are using the
correct Driver Selection Profile in your task sequence. If you are unsure, disable any selection profile(s) to ensure the driver is installed correctly.
Step 5 - Run the full MDT installation
During installation MDT will perform the following:
○ Run the PNPEnum.exe utility and capture output to PnPEnum.xml. The VEN_Xxxx and DEV_Yyyy from the "HardwareIDs" property above must be present in this list. Otherwise we won't have a match.
○ Search through the %DeployRoot%\control\drivers.xml file looking for a match for the HardwareID. MDT may filter the search based on the folder search type.
○ MDT will copy each matching driver to the local c:\drivers directory using the xcopy.exe command. You can search (grep) for the string "xcopy" in the ZTIDrivers.log file, that will get you list of all driver packages matched by MDT.
○ MDT will allow the machine to boot into the NEW OS, and Driver Installation will begin in the OS. IF there are multiple drivers found and copied locally, the Windows (not MDT) will determine the best one. The c:\windows\inf\SetupAPI.*.log files
will detail which drivers copied locally were installed (or *not* installed).
Installing Network Drivers in
WinPE
Step 6 - Try the network connection again
(See above
Step 7 - Verify Connectivity from within WinPE
Verifying network connectivity will be a bit more difficult in WinPE, since we have a limited User Interface, so all investigation must be done in the debugging mode (Press F8) cmd.exe
○ Try connecting to the Deployment Share:
c:\> net use * \\MDT\DeploymentShare$ /u:UserDomain\UserName *
○ Try pinging the Deployment Server:
c:\> Ping.exe MDT.Corp.contoso.com
○ Verify that you have an IP address ( ipconfig /all ) If you have an AutoConfiguration address - Driver OK - WinPE can't reach the DHCP server. If you have "Media Disconnected" - Driver OK - Physical adapter not plugged to network. If
no devices are listed - Driver bad - Driver not installed.
○ Check the x:\windows\system32\WpeInit.log - This log will show the network driver (if found) being installed.
Step 8 - Verify driver packages are getting included into WinPE
Firstly, verify the correct driver package from within the full OS above. By default MDT will import *all* Storage and Networking drivers into your WinPE image. However it is possible to change the subset of files copied via "Selection Profile" or
other method. Cross check your WinPE Driver Settings.
○ From within the MDT console, right click on the root of your Deployment Share and select properties.
○ Click on the "Windows PE" tab, and the "Drivers and Patches" sub tab for both x86 and x64.
○ Your Network Drivers package must be in the "Selection Profile" if enabled.
Finally verify that the correct Network Driver package is being copied to WinPE. If necessary this may include setting up a debugger to watch the MDT Provider build the WinPE Image from scratch. My preference is to use the SysInternals
http://live.sysinternals.com/Dbgview.exe tool.
○ Open up the MDT console.
○ Download and run the DbgView.exe tool.
○ Update the deployment share in question.
○ The DbgView tool should show what drivers were copied to each WinPE Image.
Other
Whenever you add a driver into the MDT console, you must update the deployment share for that drivers to be added to your WinPE Image. If you are unsure, select "Completely regenerate the boot images." to ensure the drivers is imported. Additionally,
you must copy the updated LitetouchPE_x??.wim and *.iso files to the other consumers of the WinPE image like WDS/PXE and or any USB offline media.
Note that some Broadcom NetXtreme class of drivers have a multi-function driver architecture that may have difficulty loading in WinPE. Ensure that you load the "RIS" class of drivers from Broadcom in your MDT environment.
Note that by default MDT does *NOT* support the installation of Windows over Wireless network devices (Wi-Fi). The MDT installation sources must either be available through wired networking, or offline (USB Flash) media.
This post does not discuss origination of drivers within MDT ( Chaos vs. Total Control ), that is a different topic.
http://www.deploymentresearch.com/Research/tabid/62/EntryId/112/MDT-2013-Lite-Touch-Driver-Management.aspx
Further Help
If you are still having problems with drivers in via MDT, ask the experts in the MDT Technet Forum:
Include a short description of the problem. Including the Make/Mode if necessary.
Include the HardwareIDs from the Device Manager (Devmgmt.msc) into the post (from above).
Copy your known good driver package (step 3 above) to OneDrive.
Copy the following log files to a public site like OneDrive and include the link:
○ PnpEnum.xml (from Client)
○ Bdd.log (From Client) - or at least the ZTIDrivers.log file.
○ c:\windows\inf\SetupAPI.*.log (from client)
○ %DeployRoot%\control\Driver*.xml
○ %DeployRoot%\control\SelectionProfile*.xml
○ %DeployRoot%\control\settings.xml (if problems in WinPE)
○ x:\windows\System32\WpeInit.log (if problems in WinPE)
○ If the MDT server is not including your driver package in WinPE include the DBGView log.
This post is by Keith Garner - Keith was a developer on the MDT team where he developed the ZTIDrivers.wsf script, he also worked for the Windows Hardware Quality Labs as a technical PM on Driver Quality, and developed samples for the
Microsoft Device Driver Kit (DDK) specifically around the area of Device Driver installation in the OS (Windows NT 5.0, 2000 and Windows XP). (So yes, I know drivers :^).
Keith Garner - Principal Consultant [owner] -
http://DeploymentLive.comOK. I have redone the drivers for WinPE which has reduced the image size by about 200MB. Unfortunately the problem persists.
Is there anyway to turn on some sort of boot logging so I can see what driver it is failing on?
I am also still seeing the weird behavior of it working over PXE but blue screens when booting from USB. Can anyone explain that?
JJ -
How to find the screen name in a screen?
Hello experts
I am using loop at screen to make my selection screen dynamic
please tell me how to find all screen-name of a screen.
thanks in advance.
Chitta Ranjan Mahato
Moderator message: please think about it before asking, you are naming the selection fields yourself in your program, if still in doubt, just debug your "loop at screen"
Edited by: Thomas Zloch on Nov 9, 2010 12:57 PMI am writing a program where in selection screen there will be two radio button named application server and presentation server when user choose application server screen changes dynamically and the block containg related to appliction server will be displayed in selection screen. to achieve this i have write code like
at selection-screen output.
if <radiobutton-name> = 'X'.
loop at screen.
{color:green}
if screen-name = 'radiobutton-name'.
{color}
if scree
thanks
chitta ranjan mahato
Maybe you are looking for
-
Repeated problems - is there any way of saving my projects myself?
I'm sorry to keep filling up the forum with questions, but the more I try moving forward, the more problems I encounter. I am now finding that even simple edits of my work frequently result in the programme crashing, meaning that whatever I have done
-
Call RFC_READ_TABLE via VBA.
I try to get data from table LFBK (bank data for vendor). Here is my VBA code to get data, it's not works. Anyone can suggest me what's wrong? Thank you very much. Anek Public Sub RFC_Read_Table() Dim Functions As Object Dim RfcCallTransact
-
DHCP help not reading Netmasks correctly
Hello, I am trying to setup a dhcp server on Solaris 8 every time I go to add network .. say 10.10.10.0 255.255.255.0 it creates SUNWfiles1_10_0_0_0 in /var/dhcp checked /etc/inet/netmasks has 10.10.10.0 255.255.255.0 #/usr/sadm/admin/bin/dhcpmgr & o
-
Re: Select statement fails under Express, but works underForte whenusin
Roger, This was a bug with Express and was fixed in Express E.2.0.L.0. You might be able to get more details on Forte's website. Ajith Kallambella M From: "Metcalf, Roger" <[email protected]> Reply-To: "Metcalf, Roger" <[email protected]> To: "'[emai
-
Mailto: links in Exchange emails
We utilize a system that sends emails with embedded links to either email an approval or disapproval for requests. Each of these starts with mailto: followed by the mailing address. Prior to upgrading to 3.0 these links worked just fine. Now, with 3.