Sie sind auf Seite 1von 23

Dynpro Trace

Goal:Learn how to use the Dynpro Trace

Learn how to record traces of the screen processor


use them to understand the processing of dynpros
Information provided by the trace

11

Example: Traces of transaction VA01

22

Exercise: Recording a trace of transaction


33
VA01

SAP AG 1999 Debug_WS_2_08 (E.S.,B.G.,K.K.) / 1

Dynpro Trace - Overview


Trace analysis list

Technical summary

Y
Y
Y
Y
Y
Y
Y
Y
Y
Y
Y
Y
Y
Y
Y
Y
Y
Y
Y
Y
Y
Y
Y
Y
Y
Y
Y
Y
Y
Y
Y
Y
Y
Y
Y
Y
Y
Y
Y
Y
Y
Y
Y

Which information do I obtain?


How to record trace files?
How do I read them?

SAP AG 1999 Debug_WS_2_08 (E.S.,B.G.,K.K.) / 2

->module VBAK-ORGDATEN_PRUEF
Fri Jun 16 09:29:18 2000
<module
->input: VBAK-AUART
- intern: tab(46)-fld(65)
- (4)<ta >
- modified
- to uppercase (2UPC)
- user convert <AUART>
- users field exit <AUART>
- 0x20202020
->module VBAK-AUART_PRUEFEN
set focus VBAK-AUART ->0
===> ===> ===> ===> ===> message: ERX V1 046
->output: VBAK-AUART
- intern: tab(46)-fld(65)
- 0x20202020
- user convert <AUART>
- (0)<>
->output: TVAKT-BEZEI
- intern: tab(52)-fld(8)
- 0x2020202020202020202020202020202020202020
- (0)<>
->output: VBAK-VKORG
- intern: tab(46)-fld(107)
- 0x30303031
- (4)<0001>
->output: VBAK-VTWEG
- intern: tab(46)-fld(111)
- 0x3031
- (2)<01>
->output: VBAK-SPART
- intern: tab(46)-fld(113)
- 0x3031
- (2)<01>
DYNP end of work
NO subscreens
SETfocus in MAIN-screen: SAPMV45A 0101
field = VBAK-AUART
offs_in_field = 0
row = 3, column = 24
Fri Jun 16 09:29:19 2000
send data to SAPGUI

Dynpro Trace - Technical Summary


ABAP Runtime
Set screen ...
Leave to screen ...
Call screen ...
Call dialog ...
Call transaction ...
...
Set cursor ...
...
Message ...

DYNPRO Runtime

Control of screen flow


Field transport to/from screen
Message handling
F4 help support
Batch input processing

Screen processing steps


PBO - Process before output
DCO - Data communication output
- %_ctl_output

Screen
processo
r
trace

send
receive

- %_ctl_input
DCI - Data communication input
PAI - Process after input
POV - Process on value request

POH - Process on help request


SAP AG 1999 Debug_WS_2_08 (E.S.,B.G.,K.K.) / 3

SAPGUI

Dynpro Trace - Screen processing steps in


detail
Resizing (subscreens, tab strips, table views)
PBO - Process before output

Processing of PBO modules and loops


Field transport of all loop fields

DCO - Data comm. output

Field transport of all non-loop fields

- %_ctl_output

Output communication with controls


Set transaction variants, ...
Screen compression
Communication with SAPGUI

- %_ctl_input

Input communication with controls, ...

DCI - Data comm. input

Field transport of all non-loop fields


and fields without explicit transport

PAI - Process after input

Remaining field transports


Processing of PAI modules

POV - Process on value request


POH - Process on help request

SAP AG 1999 Debug_WS_2_08 (E.S.,B.G.,K.K.) / 4

Dynpro Trace - Information


Trace level 1
severe errors only

Trace level 2

Trace level 3

focus
OK-Code
data received flag

field contents
- conversion exits
- field exits
- global fields

loading dynpro
PBO,PAI,DCI,DCO steps
application modules
system modules
dark processing
main screen, subscreen
set screen, leave screen
call screen, skip screen
call dialog, call transaction
submit

set/get parameter
modify screen
batch input processing
screen resize
screen compression
subscreen tree

step loop processing


messages

send/receive data from SAPGUI

SAP AG 1999 Debug_WS_2_08 (E.S.,B.G.,K.K.) / 5

Dynpro Trace - Trace recording: Report


RSTRC000
See also OSS/CSS
note 87150

1. Start report RSTRC000

3. Keep work process

6. Work process number


and start timestamp
are displayed

4. Select trace component

7. Start your transaction


in the same window

2. Select trace level

5. Activate trace

SAP AG 1999 Debug_WS_2_08 (E.S.,B.G.,K.K.) / 6

Dynpro Trace - RSTRC000: Stopping and


displaying the trace

10. Press Display

8. Press Default val.


9. Press Change

SAP AG 1999 Debug_WS_2_08 (E.S.,B.G.,K.K.) / 7

Dynpro Trace - How to trace a batch


process?
You cannot lock a batch process

You need to guess which batch process will run y


background job

Use transaction SM50 (Process Overview)

SAP AG 1999 Debug_WS_2_08 (E.S.,B.G.,K.K.) / 8

Dynpro Trace - Example: Starting


transaction VA01
M

WP_LOCK_SET

990617140308

...
Y ======================== DYNP entry 2:
...
Y receive data from SAPGUI
Y
GETfocus in MAIN-screen: RSTRC000 1010
Y

field = TRC_LEVEL

offs_in_field = 0

row = 10, column = 26

OK-code "/NVA01"

...
Y ->load dynpro SAPMSYST 0040
Y

loading dynpro: langu init

loading dynpro: langu merge

Y
Y

<load dynpro
->PBO SAPMSYST 0040

SAP AG 1999 Debug_WS_2_08 (E.S.,B.G.,K.K.) / 9

receive data from SAPGUI

focus
OKcode
>loaddynpro
<load
>PBO
>module
<module

<PBO
>DCO
<DCO

Dynpro Trace - Example: VA01 - output


...
Y Start Compression of SAPMSYST
0040
Y ---------------------------------------Y [suppress_dialog]
Y ======================== process dark
...
Y ->PAI SAPMSYST 0040
...
Y load program SAPMV45A
Y ->load dynpro SAPMV45A 0101
...
Y ->module TRANSAKTION_INIT
Y
SET PARAMETER VTV(1)
Y
<module
...
Y ->module FELDAUSWAHL_101
Y
modify screen field RV45A-DOCNUM
Y
<module
...
Y
<PBO
Y ->DCO SAPMV45A 0101
Y
->output: RV45A-TXT_AUART
Y
- intern: tab(368)-fld(581)
Y
- 0x4F72646572207479706520202020
Y
- (20)<Order type
>
...

SAP AG 1999 Debug_WS_2_08 (E.S.,B.G.,K.K.) / 10

screen compression
suppress dialog / process dark

load program / load dynpro

set parameter

modify screen field

field contents on output


- field name
- reference to ABAP
- field content as hex code
- field content as text

Dynpro Trace - Example: VA01 - input


...
Y

OK-code (empty)

- YES data rec main SAPMV45A 0101

OK-Code
data received flag

...
Y

->PAI SAPMV45A 0101

input of a modified field

->input: VBAK-VKORG

- intern: tab(46)-fld(107)

- (4)<0001>

- modified

- to uppercase (2UPC)

- modified flag
- conversion to upper case

SET PARAMETER VKO(4)


- 0x30303031

...
Y

input of an empty field

->input: VBAK-VKBUR

- intern: tab(46)-fld(118)

- (4)<

- empty

>

DELETE PARAMETER VKB

- del param id <VKB

- 0x20202020

SAP AG 1999 Debug_WS_2_08 (E.S.,B.G.,K.K.) / 11

- empty flag
>

Dynpro Trace - Example: Input with


conversion and field exit

conversion exits and field exits cannot be debugged at runtime


they are only visible in the screen processor trace

Y
Y

->input: VBAK-AUART
- intern: tab(46)-fld(65)

field content before exits


Y
Y

- (4)<ta

>

- modified

- conversion exit <data element>


- field exit <data element>

field content after field exit processin


Y

- to uppercase (2UPC)

- user convert <AUART>

- users field exit <AUART>

SAP AG 1999 Debug_WS_2_08 (E.S.,B.G.,K.K.) / 12

field <...> module <...> statement


error message

Dynpro Trace - Example: Transaction with


standard variant
Y
OK-code "/NSM35
...
Y load program SAPMSHD0
...
Y ======================== process dark
...
Y load program SAPMSBDC
Y ->load dynpro SAPMSBDC 0100
...
Y ->DCO SAPMSBDC 0100
Y
->output: D0100-MAPN
...
Y

- (12)<*

Program SAPMSHD0 is processed


dark and sets the standard transacti
variant
Now the initial screen of SM35
is loaded

At DCO, the variant is not yet mixed

>

...
Y ->OUT SAPMSBDC 0100
Y ->module %_CTL_OUTPUT
Y
->input: D0100-MAPN
Y
- simulated input
Y
- (12)<TRICK
>
...
Y
modify screen field D0100-SPERR

T-Code is SM35

SAP AG 1999 Debug_WS_2_08 (E.S.,B.G.,K.K.) / 13

Field modifications due to the varian


are carried out in module
%_CTL_OUTPUT

Dynpro Trace - Example: Messages


Very often you need a quick way to find out where a certain
message is output by an application and in which context this
happened.
You can use the dynpro trace level 2 to gain an overview of
message processing.
This information helps you to effectively set breakpoints in the
ABAP debugger.
ABAP coding:
Messagee199(vp)withKUAGVKUNNR.
(Nocustomermasterrecordexistsforsoldto
party...)

Still the old R2 keys for the


message type are used in the
trace:

SET means set message


(type S)

class
Y>PAISAPMV45A4701
Y>moduleKUNDEN_PRUEFEN
Y===>===>===>===>===>message:ERXVP199
Y===>Var_1<1000000015>

type

id

NAT means information


(type I)
DIA means warning
W)

(type

ERX means error message


(type E)

ABE means abend message


(type A)
SAP AG 1999 Debug_WS_2_08 (E.S.,B.G.,K.K.) / 14

Dynpro Trace - Example: Subscreens


Y set screen SAPMV45A 4001
...
Y ->load dynpro SAPMV45A 4001
Y loading dynpro: langu init
Y loading dynpro: langu merge
Y
<load dynpro
Y Start of Resize-----------...
Y End of Resize-------------Y ->PBO SAPMV45A 4001
...
Y ->system module: syscalsc
Y
- call subscreen SAPMV45A 4021
Y ->load dynpro SAPMV45A 4021
..
Y
<load dynpro
Y ->PBO SAPMV45A 4021
Y ->system module: syscalsc
Y
- call subscreen SAPMV45A 4701
Y ->load dynpro SAPMV45A 4701
...

SAP AG 1999 Debug_WS_2_08 (E.S.,B.G.,K.K.) / 15

loading the main screen

resizing of subscreen areas

calling a subscreen of the main scree

calling a subscreen of a subscreen

Dynpro Trace - Example: Subscreen tree


Y Start Compression ...
...
Y
Y
Y
Y
Y
Y
Y
Y
Y
Y
Y
Y
Y
Y
Y
Y
Y
Y
Y

DYNP end of work


->subscreen tree
1 SAPMV45A 4001 ^0
SUBSCREEN_HEADER (1,2) ->5
SUBSCREEN_BODY (8,3) ->2
2 SAPMV45A 4400 ^1
SUBSCREEN_TC (10,2) ->3
3 SAPMV45A 4900 ^2
SUBSCREEN_BUTTONS (19,2) ->4
4 SAPMV45A 4050 ^3
5 SAPMV45A 4021 ^1
PART-SUB (2,2) ->6
6 SAPMV45A 4701 ^5
<subscreen tree
SETfocus in SUB-screen: SAPMV45A 4701
field = KUAGV-KUNNR
offs_in_field = 0
row = 1, column = 19
send data to SAPGUI

SAP AG 1999 Debug_WS_2_08 (E.S.,B.G.,K.K.) / 16

compression of all screens


trace of subscreen hierarchy
- main screen (screen 1)
- subscreen areas
- screen 2 is subscreen of screen 1

- screen 5 is subscreen of screen 1


- screen 6 is subscreen of screen 5

focus information

Dynpro Trace - Tracing batch input


sessions (BDC)
...
Y
***
Y
*** BDC - Start Mappenabspielen / dybisbdc
Y
*** BDC - BDC_START_GROUP
Y
*** BDC - Mappeninformationen:
Y
*** BDC - QID
: <20000622155312884101>
Y
*** BDC - Mappenname: <VA01_TEST
>
Y
*** BDC - Mandant
: <800>
Y
*** BDC - Benutzer : <SODTKE
>
Y
*** BDC - Server
: <hs0023 >
Y
*** BDC - Abspielmod: <E>
Y
*** BDC - Logmodus : < >
Y
*** BDC - Expert.mod: < >
Y
*** BDC - Dynprosize: <S>
Y
***
Y
Y ======================== DYNP entry 14:
Y RollEnvir 00526_00_0000000067 00 SODTKE
Y start BDC transaction
...

SAP AG 1999 Debug_WS_2_08 (E.S.,B.G.,K.K.) / 17

Start of BDC session

Queue ID
session name
client
user
server
additional flags

Start of the first BDC transactio

Dynpro Trace - Tracing BDC: Processing a


single screen
...
Y

Start Compression of SAPMV45A

---------------------------------------------

0101

DYNP end of work

*** BDC -

*** BDC - Dynprodaten laden

*** BDC - Aktuelles Dynpro: <SAPMV45A 0101>

***

- noch nicht prozessiert

***

- BI Dynpro

*** BDC - default window size exist

*** BDC -

*** BDC - Einmischen Daten

*** BDC - BDC_OKCODE:

<=ENT2>

*** BDC - Cursor

<VBAK-SPART> (0)

*** BDC - Feldname:

<VBAK-AUART> (0)

*** BDC - Feldwert:

<ta>

: <SAPMV45A 0101>

...

/ dybigndy

SAP AG 1999 Debug_WS_2_08 (E.S.,B.G.,K.K.) / 18

/ dybimsgi

actual screen
already processed by BDC ?
actual screen in session data

BDC data output


- OK Code
- cursor position
- field name
- BDC field value

Dynpro Trace - Tracing BDC: Screens that


are skipped
The BDC runtime does not process screens within
F1 / F4 excursions
error-, warning- or info dialogs
Y
Y
Y

*** BDC - Aktuelles Dynpro: <SAPMSDYP 0010>


***
- Info-Dialog im aktuellen Dynpro
***
- Kein Einmischen der Daten erlaubt

Y
Y
Y

*** BDC - Aktuelles Dynpro: <SAPMV45A 4001>


***
- Err./Warn.-Dialog im aktuellen Dynpro
***
- Kein Einmischen der Daten erlaubt

Y
Y
Y

*** BDC - Aktuelles Dynpro: <SAPMSSY0 0120>


***
- Meldungs- oder Hilfedialog
***
- Kein Einmischen der Daten erlaubt

SAP AG 1999 Debug_WS_2_08 (E.S.,B.G.,K.K.) / 19

Dynpro Trace - Tracing BDC: COMMIT WORK

COMMIT WORK always means successful end. BDC processing

COMMIT WORK: imode= , vb=X, vbmode=S, bdc=X

Mon May 31 16:52:59 1999

COMMIT WORK by application

...
Y

*** BDC - Ende Transaktion

<ME21> / dybieltc

***

- TRANS# qcb:

***

- Status: Finish

*** BDC - COMMIT WORK - Transaktion ist fertig

<1>

Transaction is marked as finishe


(successfully processed)

...
Y
Y

*** BDC - Ende

Mappenabspielen / dybiebdc

===> ===> ===> ===> ===> message: EOT 00 345

SAP AG 1999 Debug_WS_2_08 (E.S.,B.G.,K.K.) / 20

If it was the last transaction: BD


stops with message 00 345

Dynpro Trace - Tracing BDC: out-of-sync


situations
...
Y

->(res) PAI SAPLCPDI 3400

->(res) module OK_CODE

call screen SAPLSPO1 0100: (6;25) (9;70)

->load dynpro SAPLSPO1 0100

a certain screen is called by the


application, but ..

...
Y

Start Compression of SAPLSPO1

0100

...
Y

*** BDC -

*** BDC - Dynprodaten laden

*** BDC - Aktuelles Dynpro: <SAPLSPO1 0100>

***

- noch nicht prozessiert

***

- BI Dynpro

/ dybigndy

: <SAPLCPDI 3400>

===> ===> ===> ===> ===> message: SET 00 344

===> Var_1<SAPLSPO1>

===> Var_2<0100>

...

... according to the bdc session


data, BDC runtime expects a
different one!

SAP AG 1999 Debug_WS_2_08 (E.S.,B.G.,K.K.) / 21

message 00 344:
No batch input data for screen

Dynpro Trace - Exercise


Make yourself familiar with recording a dynpro trace of a dialog work
process

Lock the work process with report RSTRC000

Start transaction VA01 (sample data for the first screen are, e.g.,
TA/0001/01/01). You may also use a transaction that is more familiar to
you

Unlock the work process and display the trace with RSTRC000

Compare traces recorded with level 2 and 3

Evaluate which level of information you normally need to solve a problem

See how level 2 can be used to obtain an overview of the flow of screens
and level 3 for a more detailed analysis

SAP AG 1999 Debug_WS_2_08 (E.S.,B.G.,K.K.) / 22

Dynpro Trace - Summary


You learned how you record traces of the dynpro processor
You obtained an overview of the information in different trace levels

SAP AG 1999 Debug_WS_2_08 (E.S.,B.G.,K.K.) / 23