Vous êtes sur la page 1sur 31

0

SAP AG 1999
Batch input sessions
Batch input monitor
Contents:
Batch Input Processing
SAP AG BC420 4-1

0.2
SAP AG 1999
Explain the structure of batch input sessions
Process and analyze batch input sessions using
the batch input monitor
t the conclusion of this unit! you "ill be able to:
Batch Input Processing: #nit $b%ecti&es
SAP AG BC420 4-2

0.'
SAP AG 1999
Course $&er&ie" (iagram
(aten)bernahme
(* +or,bench
-./ +or,bench
Principles of .tandard
(ata 0ansfer
(
i
r
e
c
t

I
n
p
u
t
BPI
0


1
e
c
o
r
d
e
r
Course $&er&ie"
B
a
t
c
h

I
n
p
u
t
C
a
l
l

0
r
a
n
s
a
c
t
i
o
n
'
E(I
Basics
2
3
4 50
6
50
6
55
53
5'
52
55
52
5
2
33
55
SAP AG BC420 4-3

0.3
SAP AG 1999
Batch Input Processing
Batch Input .essions
Batch Input .essions
Batch Input /onitor
Batch Input /onitor
SAP AG BC420 4-4

0.7
SAP AG 1999
$&er&ie": Batch Input Processing
(B
Processing with the
BI monitor
1.B(C.#B
Automatic
processing
Batch input, also known as Batch Data Communication (BDC) is an automated process used for
dialog-free transfer of data to the SAP System
!n order to ensure the same checks and updates are e"ecuted as in dialog processing, a user dialog is
simulated
#he central component of this method is the $atch input session
#hese sessions are created using a $atch input program and contain all data necessary to simulate the
user dialog
Processing the sessions using the BI monitor:
#hen you use the the $atch input monitor to process the sessions %rom here the data is transferred to
the &'( data$ase
Automatic processing:
)ith program &SBDCS*B B! sessions can $e processed automatically (see also +Special ,ethods +
and +Batch+ in the appendi")
SAP AG BC420 4-5

0.8
SAP AG 1999
Batch Input Program
ABAP Dictionary
.tructure
B(C(0
ABAP
B(C table
#he data is transferred into the session $y $atch input programs %or standard transfer these
programs are pro-ided in the D.-)B and for indi-idual transfers they ha-e to $e created
Batch input programs ha-e the following functions/
#hey pro-ide structured work areas for the data to $e transferred in the form of an internal ta$le
(BDC ta$le)
#hey import the data
#hey put the imported data into the BDC ta$le
#hey transfer the filled BDC ta$le into the session
#he BDC ta$le has always the same structure and contains the rele-ant transaction data for the
data transfer
SAP AG BC420 4-6

0.2
SAP AG 1999
9ormat of Batch Input .ession
Transaction
Transaction
.ession : complete
Client in "hich the session can be processed
.ession name
-oc, date
#ser for the bac,ground processing
.till ,eep session ;
.ession : header
Transaction
.ession : body
500 200 '00
A $atch input session consists of a header part (session header descri$ed $y the ABAP Dictionary
structure AP0!) and a data part (transactions descri$ed $y the ABAP Dictionary structure AP0D)
#he session header contains general data a$out the whole session
#he session $ody contains all the application-specific transaction data
#he session complete closes the session1 it can now $e processed in the $atch input monitor to
transfer it into the &'( data$ase
SAP AG BC420 4-7

0.4
SAP AG 1999
Creating Batch Input .ession
$pen batch input session
Insert data for transactions
Close batch input session
2ach $atch input session must $e opened and closed
#he data for the application functions (transactions) is inserted into the $atch input session
#he $atch input session contains screen data from indi-idual transactions
Data is inserted into the $atch input session for each transaction 3ne transaction is inserted at at ime
into the session header
A $atch input program can create one or more $atch input sessions in succession
Batch input sessions cannot $e created in parallel
SAP AG BC420 4-8

0.6
SAP AG 1999
.tructure of B(C 0able
.P/902( 0507 *
1902(:<#==1 >:00:00005
1902(:B#<1. 0005
1902(:<0$<( <#=
B(C?$<C$(E @00
.P/902( 0550 *
<=5:=1E( /r
<=5:=/E5 0reusch
<=5:.$10- xel
<=5:=/E2
<=<5:.01. /ain .t.
<=<5:P9CA
<=<5:$1005 =e" Bor,
<=<5:P.0-> 86560
<=<5:$1002
...
.P/902( 0507 *
1902(:<#==1 >:00:00005
1902(:B#<1. 0005
1902(:<0$<( <#=
B(C?$<C$(E @00
.P/902( 0550 *
<=5:=1E( /r
<=5:=/E5 0reusch
<=5:.$10- xel
<=5:=/E2
<=<5:.01. /ain .t.
<=<5:P9CA
<=<5:$1005 =e" Bor,
<=<5:P.0-> 86560
<=<5:$1002
...
P1$C1/ (B=P1$ (B=BECI= 9=/ 9D-
P1$C1/ P1$C1/ (B=P1$ (B=P1$ (B=BECI= (B=BECI= 9=/ 9=/ 9D- 9D-
Program
Name
Screen No. Start of
Screen
Field Name Field Value
#he data is structured within a BDCDA#A ta$le according to the screens in the transaction 2ach
screen that is processed in the transaction must $e identified in a BDCDA#A record #his record uses
the fields P&34&A,, D56P&3 and D56B24!6 A separate BDCDA#A record for each -alue
that can $e entered in a field comes after this record #hese records use the fields %6A, and %7A8
#he field name for the 39 code is always BDC:39C3D2 for all screens #he field -alue of the 39
code when a function key is pressed is made up of the $ackslash ;'; and the num$er of the function
$utton (eg ;'<<;) %or other types of application actions (menu choices, pressing the SA72 icon etc)
the field -alue of the 39 code is an =>= followed $y the function code (eg =>sa-e?)
#he BDCDA#A structure is defined in the ABAP Dictionary as follows/
%ield 6ame Data 2lement #ype 8ength Short Description
PROGRAM BDC_PROG CHAR 40 BDC Module pool
DYNPRO BDC_DYNR NUMC 4 BDC Screen number
DYNBEGIN BDC_SAR CHAR ! BDC S"#r" o$ %creen
&NAM &NAM_____4 CHAR !'( BDC &)eld n#me
&*A+ BDC_&*A+ CHAR !'( BDC &)eld ,#lue
SAP AG BC420 4-9

0.50
SAP AG 1999
Processing a Batch Input .ession
-og
0ransaction 5 0ransaction n
........
Monitor
Queue ID
20000502....
20000505....
(B
A $atch input session gathers the indi-idual screens of a transaction together
5ou process these sessions using the $atch input monitor #his process is the same as when you
e"ecute the corresponding application transaction on foreground1 the data is passed through the
screens and is then posted into the rele-ant SAP ta$les and the status records are written to the log
file
#he $atch input function starts the application functions specified in that session (transactions
identified $y their transaction codes)
#he data from the session is then merged into the screens of the specified online transaction
)ith change transactions the data from the SAP data$ase is first merged and then the data from the
session is merged into the screens
)ith the $atch input procedure data is always posted synchronously )ith other procedures, which
will $e descri$ed later, data can also $e posted asynchronously
SAP AG BC420 4-10

0.55
SAP AG 1999
Batch Input Processing
Batch Input .essions
Batch Input .essions
Batch Input /onitor
Batch Input /onitor
SAP AG BC420 4-11

0.52
SAP AG 1999
F!orite"
SAP ##
SAP SAP asy asy Access Access
Crete "e""ion
De$ete "e""ion
%"er &ro'i$e
Ser!i(e"
###
)e&ortin*
###
Batch input
F"t in&ut
Dire(t in&ut
Menu +,it F!orite" +-tr S."te/ 0e$&
.essions
-ogs
1ecorder
1estart transaction
(elete transaction
=ext transaction
Process foreground
(isplay errors only
Expert mode on
Expert mode off
Cancel
Initial screen of the
!atch input monitor
"S#$%&
These functions are
only acti'e during
(Process foreground)
of a session
0he Batch Input /onitor
Monitor
#he $atch input monitor can $e called from the system menu
#he functions greyed out are only a-aila$le when $atch input sessions are processed in the
foreground
SAP AG BC420 4-12

0.5'
SAP AG 1999
Batch input sessions
Batch input run logs
-oc,ed sessions
Batch input sessions
Batch input run logs
-oc,ed sessions
$&er&ie"
$&er&ie"
(isplay session contents
(isplay batch input data
-ogs Eextended logF
.tatistics
(isplay session contents
(isplay batch input data
-ogs Eextended logF
.tatistics
nalyze
nalyze
(elete sessions Eselecti&eF
-oc, sessions
1elease sessions
(elete sessions Eselecti&eF
-oc, sessions
1elease sessions
dmin
dmin
Process in foreground
(isplay errors only
Process in bac,ground
Process in foreground
(isplay errors only
Process in bac,ground
Process
Process
9unctions of the Batch Input /onitor
Monitor
#he $atch input monitor pro-ides a range of functions for processing the sessions
Sessions can $e processed further with the $atch input monitor 5ou can get information a$out the
status, screen se@uence, screen contents, processors (users), processing mode, ser-er and which user
has $een used for the user authoriAation
#he system always flags transactions that cannot $e processed $ecause of errors #hese transactions
remain the session (error session) 5ou can correct the errors and reprocess these transactions
#he functions can $e accessed from $uttons'menus in the monitor
SAP AG BC420 4-13

0.53
SAP AG 1999
Se""ion
An$.1e
Se$e(tion
Fro/2
01#01#1999
Pro(e"" Stti"ti(" 3o*
4o2 27#09#1999 Fir"t
...
5e6
7it8 error" Pro(e""e, In &ro(e"" B(9*roun, In (retion 3o(9e, ll
Se""ion n/e Cretor 4i/e 3o(9 ,te
BC320?/P5
Dte Aut8ori1# Sttu"
22.02.5666
BC420:MAP2
BC420:0815
Se""ion-7
###
<lingels 02:53 <lingels ne"
G G
###
###
###
From the list of BI sessions a session can !e selected
and* for e+ample* processed.
Initial .creen of Batch Input /onitor
3n the initial screen of the $atch input monitor you can select and process single sessions or look at
the logs of sessions already processed
SAP AG BC420 4-14

0.57
SAP AG 1999
Process@foreground
De"tintion
1un mode
(isplay errors only
Bac,ground
+-ten,e, $o*
+-&ert /o,e
D.n&ro "tn,r, "i1e
Process
Pass to !ac,ground processing- lea'e field (Target
computer( free so that load is automatically distri!uted.
.nline
Displays dialog steps only
if there are error or
termination messages
All message types are
included later in log
The screen standard si/e
is used for processing
data.
Processing /ode
#he following processing modes can $e selected/
Processing mode:
Process in foreground/ transactions run in a foreground dialog (interacti-e processing of the
session)
Display errors only/ transactions run in the $ackground !f an error is encountered, the appropriate
screen is displayed in the foreground for user correction
Background/ transactions run in a $ackground process
#arget system/ optionally allows you to specify the target computer for $ackground processing of
the session !f you do not specify this parameter, the system will choose an application ser-er
$ased on automatic load $alancing (recommendedB)
Additional functions:
2"tended log/ )C, +!C and +SC messages can also $e recorded in addition +2C messages 5ou can
also use this option when processing files in the $ackground
2"pert mode/ the e"pert mode only works in interacti-e $atch input !t switches the error message
(DD off - that is, you can e"ecute additional functions in $atch input without getting the message
each time - +Batch input data is not available for this screen+
Screen standard siAe/ automatic creation of screen standard siAe when processing in dialog
(rele-ant for ta$le controls or step loops)
SAP AG BC420 4-15

0.58
SAP AG 1999
F!orite"
SAP###
SAP asy Access SAP asy Access
Crete "e""ion
+n, "e""ion
%"er &ro'i$e
Ser!i(e"
%ti$itie"
)e&ortin*
Qui(9;ie6er
<ut&ut (ontro$$er
4=$e /intenn(e
Batch input
F"t entr.
Dire(t in&ut
Menu +,it F!orite" +-tr" S."te/ 0e$&
.essions
-ogs
1ecorder
1estart transaction
(elete transaction
=ext transaction
Process@foreground
(isplay errors only
Export mode on
Expert mode off
Cancel
Acti'e when processing !atch
input sessions in foreground
/enu 9unctions for Processing in 9oreground
Additional session functions are a-aila$le when processing $atch input sessions in the foreground
#hese can also $e called from the command line using special 39 codes
SAP AG BC420 4-16

0.52
SAP AG 1999
End running batch input transaction
and flag as incorrect
End running batch input transaction
and flag as incorrect
(elete running batch input transaction
in the session
(elete running batch input transaction
in the session
End batch input processing and
flag session as incorrect
End batch input processing and
flag session as incorrect
."itch display mode from H(isplay errors onlyH
after HProcess in foregroundH
."itch display mode from H(isplay errors onlyH
after HProcess in foregroundH
."itch display mode from process in foregroundH
to H(isplay errors onlyH
."itch display mode from process in foregroundH
to H(isplay errors onlyH
=ext transaction
=ext transaction
(elete transaction
(elete transaction
Cancel
Cancel
Process in foreground
Process in foreground
(isplay only errors
(isplay only errors
Functions 0 allowed ., codes
Description
Expert mode

Expert mode

+hen lea&ing BI processing
error messages are suppressed
+hen lea&ing BI processing
error messages are suppressed
@n
@bdel
@bend
@bda
@bde
0he 9unctions and $< codes
1estart transaction
1estart transaction
@bbeg
Bac, to start of transaction
Bac, to start of transaction
@bdx
!f you are processing a session interacti-ely, you can correct the transactions online or flag them as
incorrect transactions #he corrections will $e included in the session log
!f you are processing a session interacti-ely (process in foreground or display errors only), the
26#2& $utton must $e pressed to $e a$le to switch $etween screens 3n each screen you can correct
data, or process the session using specific menu functions (see slide) or 39 code entries
SAP AG BC420 4-17

0.54
SAP AG 1999
=e"
=e"
.ession created! but not yet processed
.ession created! but not yet processed
Error
Error
.ession processed! some transactions
contain errors
.ession processed! some transactions
contain errors
Processed
Processed
.ession processed successfully
.ession processed successfully
In processing
In processing
.ession currently being processed
.ession currently being processed
In bac,ground
In bac,ground
.ession currently being processed in
bac,ground
.ession currently being processed in
bac,ground
Creation
Creation
.ession currently being created
by a BI program or recording
.ession currently being created
by a BI program or recording
-oc,ed
-oc,ed
.ession is loc,ed and
cannot be processed
.ession is loc,ed and
cannot be processed
.ession .tatuses
A session is assigned a status, displayed in the session o-er-iew, $efore, during, and after processing
#he sessions are sorted $y the date and time they were created and displayed according to status
!n the o-er-iew, the following information is displayed for each session/
Session name/
6ame of the session
Date and time/
#he data and time the session was created
8ocked/
Session is locked until this date and cannot $e processed until then
Created $y/
*ser who created the session
#ransaction and screen/
6um$er of transactions and screens
AuthoriAation/
#he user whose authoriAation is used to process the session (only for $ackground processing)
SAP AG BC420 4-18

0.56
SAP AG 1999
(o not branch to other transactions EI@n...IF
Paging only possible using NT1
In 1@' 1elease 3.8! corrections during foreground
processing are noted in log
=otes for Processing BI .essions in 9oreground
=ote:
(ata from the session
is displayed in red
Do not na-igate to other transactions (using 'n"""" or 'o"""" while processing a $atch input session
)hen processing in foreground, mo-e from screen to screen $y pressing ENTER
SAP AG BC420 4-19

0.20
SAP AG 1999
Sttu" 4rn"(tion" S(reen"
+rror
0
0
Pro(e""e, 1
7
De$ete, 0
0
Sti$$ to =e &ro(e""e, 1
7
4ot$ 2 14
.tatistics
Session Statistics BC420_Map1
The session statistics show the num!er and
status of the transactions in the !atch input
session.
.ession .tatistics
Statistics can $e displayed for e-ery session #his includes the total num$er of transactions in the
session as well which transactions/
Ea-e errors
)ere processed
)ere deleted
Still need to $e processed
SAP AG BC420 4-20

0.25
SAP AG 1999
-og
5/e
-og ttributes
%"er )o=ert" BC320?/ap5
Crete, on Queue ID 1129273223## 02.55.5666
0ime /essage
13234225
13234245
13235203
13235204
13235204
13235204

>>> Fie$, )F02D-?%55) C8n*e,2 1-88-10002 @ Pre!iou"$.2 1-88-10001 A
>>> Se""ion BC420:M&1 )un =. )o=ert" in Se""ion A on ###
Pro(e""in* "tti"ti("
1 trn"(tion re,
1 trn"(tion &ro(e""e,
0 trn"(tion" @6it8 error"A
0 trn"(tion" ,e$ete,
13235204
Se$e(t 3o* 'or Bt(8 In&ut Se""ion
13234246
Cu"to/er B-00-80002 Crete, in Co/&n. Co,e 0001
.ession -og
A log is generated for e-ery $atch input session run
!f there are errors during processing, the session is marked with status +2rrorC !f the session is
processed again, an additional log is generated
All error messages from transactions in the session are logged in the session log #his log also
contains $atch input error messages generated due to pro$lems during processing of transactions
#he transaction error information includes the transaction code and the screen where the error
occurred #he log also contains +#otalC statistics
SAP AG BC420 4-21

0.22
SAP AG 1999
.ession nalysis
nalysis
$&er&ie" of all transactions contained in the session
$&er&ie" of transactions in session that ha&e errors
.creen description Elist of fields for each transactionF
.creen display for each screen in the transaction
Easy na&igation to the transaction logs
5ou can go to the session analysis e-en $efore you choose +Process ' foregroundC #his allows you
to display the transactions and screens
After the session is run, you can display se-eral different o-er-iews of errors that occurred during
the run as well as a list of the transactions not yet processed in the session
SAP AG BC420 4-22

0.2'
SAP AG 1999
.ession nalysis
nalysis
(isplay
ll Incorrect
S(reen" 3o* 'or 13#08#1999 0ransactions
In,e- 4rn"
1 CD01 +rror
Sttu"
2 CD01 +rror
3 CD01 +rror
.ession information
5/e
Crete, on
Crete, t
Crete, =.
# # #
4e"t "e""ion
13#08#1999
12224254
)o=ert"
.tatistics
4ot$
In(orre(t
Pro(e""e,
De$ete,
4rn"(tion" S(reen"
5 35
3 21
0 0
0 0
#he session analysis is di-ided into three ta$$ed areas/
+#ransactionsC/ Pro-ides a list of all transactions in the session along with their status
+ScreenC/ Displays an o-er-iew of the screens in each transaction 5ou can simulate (display) each
screen including the data it contains
+8ogC/ Pro-ides a list of all session logs
SAP AG BC420 4-23

0.23
SAP AG 1999
S(reen"
.creens 3o* 'or 13#08#1999 4rn"(tion"
Pro*r/
SAPMF02D 0105
S(reen
BDC:C%)S<)
Fie$,
BDC:<?C<D+
)F02D-?%55)
)F02D-B%?)S
SAPMF02D 0110
BDC:C%)S<)
BDC:<?C<D+
?5A1-A5)+D
?5A1-5AM+1
)F02D-?4<?D
;$ue
D00
B-88-10001
0001
?5A1-SP)AS
D00
M"#
)o=ert"
)F02D-?4<?D ?%5A
# # #
# # #
(isplay 9ield -ist
.ession nalysis : .creen 9ield -ist
#he field list display under the +ScreensC ta$ displays the screen data according to the BDCDA#A
structure
SAP AG BC420 4-24

0.27
SAP AG 1999
.creen Se$e(t @or ,ou=$e-($i(9A
.imulation of .creen .P/902( 0507
B-88-10001
Customer
0001
Company code
?%5A ccount group
4e/&$te
...
.ession nalysis : .creen (isplay
#o choose +Screen simulationC (screen display) dou$le-click a screen
SAP AG BC420 4-25

0.28
SAP AG 1999
%ti$itie" (efault &alues
Initial screen
Cen. o&er&ie"
=e"
Incorrect
Processed
In processing
In bac,ground
Being created
-oc,ed
.ession name
BC320?G
Created by
/iller
.ettings for user J/illerJ
#ser .ettings in BI /onitor
2ach user can specify in the +default settingsF his own $asic setttings for the $atch input monitor %or
e"ample, only sessions with the prefi" FBCDGHIF may $e selected
SAP AG BC420 4-26

0.22
SAP AG 2001
1@'
+cel
.ther
tools
+porting 2 importing BI sessions at operating system le'els
for further processing with other tools
+ternal system
Exporting and Importing BI .essions
*nder Utilities -> Export /import sessions (in $atch input monitor) session contents can $e imported
and e"ported at the operating system le-el
%urther processing would $e possi$le with an e"ternal software tool
SAP AG BC420 4-27

0.24
SAP AG 1999
Import or Export of Batch Input $b%ects
BC320:/ap5
%ti$itie" Import @ Export session
Export
$b%ect
.ession
1ecording
$b%ect name
Import
-ocation of the file to be imported or "ritten
9ile from application ser&er
-ogical file name
or
@tmp@B(C?$BKEC0?1$BE10.
Physical file name
. . .
This BI session is to !e
e+ported to this
directory under this file
name
Import @ Export Program $ptions
!mport and e"port are e"ecuted on the application ser-er using physical or logical file names, which
are set in &'( Basis CustomiAing (transaction %!82)
SAP AG BC420 4-28

0.26
SAP AG 1999
Explain the structure of batch input sessions
Process and analyse batch input sessions using
the batch input monitor
Batch Input Processing: #nit .ummary
Bou are no" able to:
SAP AG BC420 4-29

Exercises
Unit: Batch Input Processing
Topic: Working with Batch Input essions
)orking with the Batch !nput ,onitor
&unning of Batch !nput Sessions
#he $atch input session, which has $een created out of the D.-)B, is
run with the $atch input monitor #his is how the legacy data are
transfered to the &'( system
Processing a B! session with the B! monitor
< Copy the run B!-JJ of your proKect %!-JJ into the same proKect and su$proKect under run
B!-JJ-C3P5
G Delete task ,SC-JJ (B! session processing)in the run B!-JJ-C3P5
( Start the run and create B! sesssion B!-JJ-!6#
D Process the B! session B!-JJ-!6#
D-< !mport the B! session that you created $efore in the FDisplay all modeF in the &'(
system
)hile the system is running the session, change one address field of a customer,
eg change the place of residence
#hen switch the processing mode to FDisplay errors onlyF
D-G AnalyAe the log of the run and find out if errors occured Eas the change of the
customer address $een recorded during the runL ::::::::::
D-( AnalyAe the session statistics
M Create more B! sessions, $y starting the run again and processsing them in different
modes
SAP AG BC420 4-30

olutions
!hapter: Batch Input Processing
< Start the D.-)B
!n the tree structure select run B!-JJ in your proKect %!-JJ
Choose Copy to copy the run
Select your proKect %!-JJ and su$proKect D2B!-JJ 4i-e the run a new name/ B!-JJ-
C3P5 Choose Continue to confirm the name
#he run has now $een copied
G Delete task S*B-HH Select this task in your run and choose !elete tas"
( Select run B!-JJ-C3P5 and start it Create the B! session B!-JJ-!6#
D !n a new session start the Batch !nput ,onitor (#A/S,(M)
D-< Select your session B!-JJ-!6# Process the session with the processing mode
#rocess in $ore%round
During the B! session change a customer location and switch to F3nly display
errorsF/
Choose &'ystem->'ervices->Batch (nput->)nly display errors& or enter the
function code &/B!E& in the command field All su$se@uent customerss are
processed in the $ackground 5ou can see the result in the log
D-G Choose $utton *o% to $ranch to the B! session log %ield changes are logged #he
session has the status FprocessedF after changes in foreground processing
D-( 4o to the statistics ($utton 'tatistics)
SAP AG BC420 4-31

Vous aimerez peut-être aussi