88
 0  SAP AG 1999 Principles of the TA Recorder  Recording function in the LSMW Using the TA Recorder  Principles of batch input and call transaction Integrating TA Recorder programs into the D!W" #ontents$ The Transaction Recorder$ TA Recorder © SAP AG BC420 12-1

BC420_46C - 012The Transaction Recorder

Embed Size (px)

Citation preview

Page 1: BC420_46C - 012The Transaction Recorder

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 188

0

983209 SAP AG 1999

Principles of the TA Recorder

Recording function in the LSMW

Using the TA Recorder

Principles of batch input and call transaction

Integrating TA Recorder programs into the DW

ontents$

The Transaction Recorder$ TA Recorder

copy SAP AG BC420 12-1

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 288

0amp

983209 SAP AG 1999

Use the recording function in the LSMW to create

a batch input session from the data in the eternal

s(stem

Use the TA recorder to create (our o)n data

transfer programs

Anal(e programs that )or+ )ith the batch input

or call transaction

Integrate the TA recorder programs into the

DW

At the conclusion of this unit (ou )ill be able to$

The TA Recorder$ Unit b-ecties

copy SAP AG BC420 12-2

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 388

0

983209 SAP AG 1999

ourse erie) Diagram

Datenbernahme

D Wor+bench

LSM Wor+bench

Principles of Standard

Data Tansfer

D i r e c t I n p u t

API

T A R

e c o r d e r

ourse erie)

a t c h

I n p u t

a l l T r a n s a c t i o n

1DI

asics

2

3

4

5 606

60

7

66

64

66

66

6amp

6

amp

6amp6amp

6

copy SAP AG BC420 12-3

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 488

04

983209 SAP AG 1999

The TA Recorder

Principles of RecordingPrinciples of Recording

Recording )ith the LSMWRecording )ith the LSMW

Using the TA Recorder Using the TA Recorder

Principles of I and TPrinciples of I and T

Integrating the TA Recorder into the DWIntegrating the TA Recorder into the DW

copy SAP AG BC420 12-4

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 588

02

983209 SAP AG 1999

erie) of Transaction Recorder

Flat SAP

Structure

SAP Record

Layout

Structure

SAP IDoc

Structure

API

If the SAP standard program does not provide the functions you need for data transfer you can use

the transaction record

Note For data transfer the transaction (TA) recorder reuires a fat fie that is a fie $ithout any

hierarchy or sustructures

copy SAP AG BC420 12-5

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 688

08

983209 SAP AG 2001

Uses of the TA Recorder

Flat SAP

Structure

atch

Input

all

Transaction

The TA ampecorder enaes you to transfer data into amp using atch input or ca transaction

The TA ampecorder can ony $or $ith a fat structure Fies $ith different record structures (for

eampe header structure) cannot e used

The TA ampecorder is used in the +S- to create recordings of transactions atch input sessions can

e created from the recordings

The TA ampecorder can itsef eecute a data transfer from the recording using atch input or ca

transaction

copy SAP AG BC420 12-6

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 788

03

983209 SAP AG 1999

The Recording

Recording

Screen

9ield alue

9ield nameModule pool

Transaction

Screen

111

Screen

106

Screen

130

The TA ampecorder can record transactions The recorder must e activated efore the transaction is

processed Then you can run the transaction as though you $ere processing it onine

After the transaction has finished the recording $i contain a the screen numers fied names

fied vaues and the associated modue poo and transaction code

copy SAP AG BC420 12-7

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 888

05

983209 SAP AG 1999

hanging ustomer Data$ Initial Screen

Vendor

Company code

Z-88-10000

Screen

106

Genera daa9ield ontents

BCC$Samp $SZAVBCamp(Camp )00

02-($++ -88-10000

02-0110

02-0130

$SZAV

9ield ame

Transaction 9D0amp

Addre

In the aove eampe the transaction Change customer F01 is recorded

In addition to the screen fieds the fieds 2324ampS5amp and 2356257 are aso

automaticay recorded

Note

You must change the field values for all the fields required later for the transfer For the

recording a change can simply mean overriting one single character in a field ith the

same character

f fields are to e filled using S$amp$ parameters the value must also e changed

(ith online transactions screen sequences may appear that are different than in therecording

copy SAP AG BC420 12-8

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 988

07

983209 SAP AG 1999

hanging ustomer Data$ Address

ustomer 5560000

+ame

Searc erm

Addre

Screen

111

9ield ontents

BCamp(Camp $PABCS$BSC SAPSZA1 0300ASS

BCS$BSC SAPSZA1 0301Camp$

BCC$Samp A1AA-amp$S+$1

A1AA-S Garden Sree

A1AA-amp$S+$1 02105

9ield ame

If there is a suscreen on the screens this is automaticay recorded In the recording the fied

23S4S2amp77N containing the name of the suscreen appears

-ith customer master data the address is a suscreen area The centra address management is

integrated here A the address input fieds are dispayed on one suscreen

2entra address management is ony used if you specificay seect this option on the initia screen

copy SAP AG BC420 12-9

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 1088

060

983209 SAP AG 1999

Results of the Recording

Recording

SAPM90ampD 0608

DltURSR R90ampD=UR

Dlt=D1 gt00

R90ampD=UR 5560000

R90ampDD0660

US1ltA

SAPM90ampD 0666

Dlt=D1 UPDA

DltSUSR SAPLSA6 000ADDR1SS DltSUSR SAPLSA6 006UTRltSR11

DltURSR SA6ltD0600T1LltUM1R

ADDR6ltDATASTR11T 4 Barden Street

ADDR6ltDATAPSTltD1 0amp602

ADDR6ltDATAIT6 oston

SA6ltD0600T1LltUM1 8638257755

The resut of the recording is a ist of a the fieds and fied vaues that $ere changed in the

recording

copy SAP AG BC420 12-10

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 1188

066

983209 SAP AG 1999

Special Recording 9ields

9unction code triggered on

this screen

9ield name )here cursor

)as last positioned on the

screen

Comer

Company code

Z-88-10000

Genera daa

Dlt=D1

DltURSR

uring a recording the foo$ing additiona fieds are automaticay recorded

The BDC_OKCODE fied contains the function code triggered on the screen

The BDC_CURSOR fied contains the fied name of the ast fied the cursor $as positioned in

efore eiting the screen

copy SAP AG BC420 12-11

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 1288

06amp

983209 SAP AG 1999

Determining the 9ield ame

Technical info

Screen field

R90ampD =UR

Comer

Company code

Z-88-10000

Genera daa

96help

Sa

Program SAPM90ampDScreen number 608

The information recorded in the TA recorder can aso e dispayed onine for each transaction

To find out the current modue poo name and the screen numer choose Systemrarr Status from the

menu

To determine the fied name pace the cursor on a fied and seect F8 hep The name of the screen

fied can e found under technical information

copy SAP AG BC420 12-12

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 1388

06

983209 SAP AG 1999

Subscreens

Comer Z-88-10000

+ame

+ame

ADDR6ltDATAAM16

DltSUSR

Information$

ode poo name

Screen nmer

Screen name

Some screens contain suscreen areas

To determine the fied name pace the cursor on the fied and choose F1 The name of the screen

fied is specified under Technical info

copy SAP AG BC420 12-13

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 1488

064

983209 SAP AG 2001

Tabstrips

$er Roberts

1ample$ User Profile Defaults

Sar men +

oon anae

ampp dece Pr1

ParameerDefaults

DltSUSR

USD19AULTSSPLD

The tastrip eement sho$n is used on the aintain User rofile (5$n data) screen

4nder the tastrip tite Defaults the user can set various vaues such as the defaut printer

The user profie are user9dependent settings (as the name impies)

copy SAP AG BC420 12-14

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 1588

062

983209 SAP AG 1999

Step Loops and Table ontrols

1ample$ an+ Details

Comer

ntr( an+ +e( Account

08154711

123456789

Z-00-12345

an+ Details

00708155546344536

Banlt daa

==A=C06)

==A=C0amp)

Step oops and tae contros are treated identicay for the recording

The fied names of the fieds isted are the same for every ro$

7ach ro$ contains a customers an detais The fieds must e accessed using an inde (this is

specified as an addition to the fied name for eampe 6N69AN6N(1) The inde must match

the ro$ numer

5ny the visie fieds on a screen can e fied $ith data If some fieds are ony visie after paging

the paging must e recorded as $e This means that for the recording you must eecute a the steps

in the onine transaction

For eampe age on $oud e eecuted using the function code 1 (Paging icons)

Paging to the end of a ist 1Page up 11

lto to first page 18

copy SAP AG BC420 12-15

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 1688

068

983209 SAP AG 2001

Recording Buidelines

Test the transaction before recording

Start the recording

hange field alues onl( for fields

releant to the recording

As of 48 all filled fields are recorded

Transaction must be properl( eitedCSA1

Use of scroll bars cannot be recorded

Specia recording notes

F8 F and your o$n F8 and F hep (Pamp527SS 5N =7+P9amp7gt47ST Pamp527SS 5N A+479

amp7gt47ST) are not recorded This aso appies to a commands under the System and $el

menus aues for defaut variants ( transaction variants) are not incuded

7rror and $arning diaogs are not recorded 5ny the 56 code and the fied contents reuired for

further processing on the current screen are recorded

Note uring recording the data entered is $ritten to the dataase

copy SAP AG BC420 12-16

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 1788

063

983209 SAP AG 2001

1n-o( SAP ontrols and Data Transfer

bull SAP Picture ontrolbull SAP ETML ie)er ontrol

bull SAP Tet 1dit ontrol

bull AL Brid ontrol

bull SAP Tree ontrol

bull

ranch 6

ranch amp

Root

These and other controls do not support batch input$

Root

ranch amp

ranch amp6

The ne$ 7noy SAP contros deveoped for ampeease B do not support atch input or ca

transaction

=o$ever tae contros and tastrips do support atch input

copy SAP AG BC420 12-17

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 1888

065

983209 SAP AG 1999

The Transaction Recorder

PrinciplesPrinciples

Recording )ith the LSMWRecording )ith the LSMW

Principles of atch Input and all TransactionPrinciples of atch Input and all Transaction

Integrating the TA Program into the DWIntegrating the TA Program into the DW

Using the TA Recorder Using the TA Recorder

copy SAP AG BC420 12-18

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 1988

067

983209 SAP AG 1999

Session

generator

Recording Using the LSMW

-ith the +S- you can create your o$n recordings

The +S- uses the standard TA recorder here yet evauates the recording itsef The information

from the recording is used to create atch input sessions

The created atch input session can e processed as usua $ith the atch input monitor

Note As $ith the standard procedure it is euay important that the data is converted

copy SAP AG BC420 12-19

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 2088

0amp0

983209 SAP AG 1999

reating Recording

Admnraon

ecordn

Goo

ame of recording

Description

)ner

ame of transaction

Start recording

lto into the +S- and seect the menu path ampoto (Recorings An overvie$ of a previousy

created recordings for your proect are dispayed To start a ne$ recording seect Create

To create a recording you must define the name the description and the o$ner

7nter the name of the transaction you $ant to record

7ecute the transaction and compete it propery

Note ampecordings are assigned to ony one proect 9 so the name of the recording must e uniue

copy SAP AG BC420 12-20

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 2188

0amp6

983209 SAP AG 1999

hanging ustomer Data$ Initial Screen

9ield ontents

BCC$Samp $SZAV

BCamp(Camp )00

02-($++ -88-10000

02-0110

02-0130

$SZAV

9ield ame

Comer

Company code

Z-88-10000

Genera daa

Comer Z-88-10000

+ame

9ield ontents

BCamp(Camp $PA

BCS$BSC SAPSZA1 0300ASS

BCS$BSC SAPSZA1 0301Camp$

BCC$Samp SZA10100-+$B

A1AA-S Garden Sree

A1AA-amp$S+$1 34

A1AA-PampSCamp1 02105

9ield ame

Screen

111

Screen

106

In the aove eampe the transaction Change customer F01 is recorded

Note

You must ma)e some modification to the field values for all the fields you ant to capture

for the data transfer For the purposes of recording a change can simply mean overriting

one single character in a field ith the same character

ven if fields are to e filled using S$amp$ parameters the values must still e changed on

the screen in order to capture them

(ith online transactions screen sequences may appear that are different than in the

recording

copy SAP AG BC420 12-21

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 2288

0ampamp

983209 SAP AG 1999

Results

RecordingRecording R1lt6 Demolt6

9D0amp hange customer Caccounting

SAPM90ampD 0608

DltURSR R90ampD=UR

Dlt=D1 gt00

R90ampD=UR 5560000

R90ampDD0660

US1ltA

SAPM90ampD 0666

Dlt=D1 UPDA

DltSUSR SAPLSA6

DltSUSR SAPLSA6

DltURSR SA6ltD0600T1LltUM1

ADDR6ltDATASTR11T 4 Barden Street

ADDR6ltDATAPSTltD1 0amp602

ADDR6ltDATAIT6 oston

SA6ltD0600T1LltUM1 8638257755

The resuts of the recording using the +S- are dispayed in a tree structure

After the recording has finished you can edit it Cou can deete fieds or add ne$ ones

copy SAP AG BC420 12-22

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 2388

0amp

983209 SAP AG 1999

Assigning 9ield ames

Recording R16 Demolt6

Dlt=D1 UPDA

DltSUSR SAPLSA6

DltSUSR SAPLSA6

DltURSR SA6ltD0600T1L

ADDR6ltDATAAM16 Lisa Eofmeister

ADDR6ltDATAPSTltD1 0amp602

ADDR6ltDATAIT6 oston

ame

+ame

ecrpon

e=a ae

A1AA-+A1

A1AA-+A1

Comer name

a o=meer

Screen =ed

ustomer name

double clic+

Cou can assign names for each recorded fied The specia fieds (2356257 2324ampS5amp

and 23S4S2amp77N) are not incuded here Cou can choose the fied names -hen the atch

input session is created the contents of these fieds are assigned to the target fieds specified in the

eft coumn

Functions

efaut Assigns to the fied names of the underying target fied and its fied description

ampeset eetes fied name and fied description

oue cic 7dits fied name fied description and defaut vaue

Note Cou can use fied names more than once =o$ever the fied name is ony avaiae once in thefied mapping For this reason it is not practica to use fied names more than once

For a those fieds for $hich you do not assign a name the defaut vaue is used $hen the atch

input session is created These defaut vaues can e seen as constants This is especiay usefu for

chec oes (for eampe 08 vie$ seection)

The +S- supports automatic fied mapping Source fieds and target fieds can e assigned to each

other automaticay The fieds are assigned to the corresponding fieds of the same name Therefore

the fied names of the source structure shoud e given the same or simiar names as the fied names

in the target structure

copy SAP AG BC420 12-23

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 2488

0amp4

983209 SAP AG 2001

Addinggtremoing screen fields

Repeating recording

9or identical field names the name and description are

assigned automaticall(

1diting Recording

02-($++

(+A1-A+

(+A1-+A1

(+A1-Samp

(+A1-+A2

(+A1-SAS

Comer accon nmer

e

+ame 1

Sor =ed

+ame 2

Sree

Selection of all

aailable screen

fields

Cou can ater add ne$ screen fieds if you need to 6eep in mind that fieds shoud ony e added in

paces $here they are aso provided on the screen other$ise you $i get an error $hen the I

session is processed

After saving you $i get the message The data has een saved successfuy No$ the recordings

are avaiae for the oect attriutes

If you repeat the recording you can record a ne$ screen seuence $ith ne$ fieds Provided that the

fied names (eg 6NA89NA78) are identica the names and descriptions are automaticay

assigned

copy SAP AG BC420 12-24

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 2588

0amp2

983209 SAP AG 1999

b-ect T(pe and Import Method$ Recording

Standard atch Input gt Direct Input

atch Input Recording

API

IDoc

ampgtec ype ) mpor meod

Bac np recordn

ecordn ec1

The recording is no$ avaiae $ith the oect attriutes

Net you create a proect or su9proect in the +S- and specify process the data transfer

Cou eecute the data transfer as in the standard system

efine the source fieds and structures

efine the fied mapping

ampead and convert the data

2reate and import a atch input session

copy SAP AG BC420 12-25

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 2688

0amp8

983209 SAP AG 1999

The Transaction Recorder

PrinciplesPrinciples

Recording )ith the LSMWRecording )ith the LSMW

Principles of atch Input and all TransactionPrinciples of atch Input and all Transaction

Integrating the TA Program into the DWIntegrating the TA Program into the DW

Using the TA Recorder Using the TA Recorder

copy SAP AG BC420 12-26

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 2788

0amp3

983209 SAP AG 1999

Transaction Recorder

Online

Transaction

RecordingTransfer Program

T

Included in the Batch Input Monitor

Cou use the transaction recorder to record transactions and then use the transaction recording to

generate a transfer program The program ao$s you to transfer data using either atch input or ca

transaction

copy SAP AG BC420 12-27

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 2888

0amp5

983209 SAP AG 1999

hanging ustomer Data$ Initial Screen

9ield ontents

BCC$Samp $SZAV

BCamp(Camp )00

02-($++ Z-88-10000

02-0110

02-0130

$SZAV

9ield ame

Comer

Company code

Z-88-10000

Genera daa

Comer Z-88-10000

+ame

9ield ontents

BCamp(Camp $PA

BCS$BSC SAPSZA1 0300ASS

BCS$BSC SAPSZA1 0301Camp$

BCC$Samp SZA10100-+$B

A1AA-S Garden Sree

A1AA-amp$S+$1 34

A1AA-PampSCamp1 02105

9ield ame

Screen

111

Screen

106

In the aove eampe the transaction Change customer F01 is recorded

copy SAP AG BC420 12-28

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 2988

0amp7

983209 SAP AG 2001

hange Debitor$ Pa(ment Transactions C6

Banlt dea

Screen

10

9ield ontent

BCC$Samp (+B(-BA+(+01

BCamp(Camp BA+((+B(-BA+(S01

(+B(-BA+(01 12345679

(+B(-BA+(+01 22222222

Debitor 5560000

9ield ame

Inde

copy SAP AG BC420 12-29

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 3088

00

983209 SAP AG 1999

hanging ustomer Data$ Pa(ment Transactions Camp

Addre

an+ countr( US

an+ code 6amp42837

Banlt dea

ustomer 5560000

9ield ontents9ield ame

BCC$Samp (+A1-(+ZA

BCamp(Camp $PA

(+B(-Z01

Screen

10

Screen

100

SAPLBA

9ield ontents

BCC$Samp B+(A-BA+(A

BCamp(Camp +

B+(A-BA+(A +aona Banlt

9ield ame

In different transactions the modue poo may change This is the case $ith for eampe customer

master data The TA recorder records modue poo changes automaticay

copy SAP AG BC420 12-30

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 3188

06

983209 SAP AG 1999

Eierarch( Displa( of the Recording

02amp

02

SAP02 0106

BCC$Samp 02-0130

BCamp(Camp )00

02-($++ -88-10000

02-0110

02-0130

SAP02 0111

BCamp(Camp V

BCC$Samp A1AA-amp$S+$1

A1AA-S Garden Sree

Recording

-ith the TA recorder the resuts are aso a ist in a hierarchy dispay =o$ever you cannot assign

your o$n fied names as you can in the +S-

copy SAP AG BC420 12-31

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 3288

0amp

983209 SAP AG 1999

Recording erie)

Recording

Transfer program

9unction module

ontains onl( the data

from the recording

Test data

Test

reate

reate

reate

reate

1dit hange recording

Process recording

Cou can edit the recording as needed

The recording can e tested and eecuted again The screens are run through in the same $ay as in

the recording

The recording can then e used to create

atch input sessions

Test data

ata transfer programs $ith atch input or ca transaction

Function modues

copy SAP AG BC420 12-32

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 3388

0

983209 SAP AG 1999

1 02 BS

2 SAP02 106

3 BCC$Samp $SZAV

4 BCamp(Camp )00 5 02-($++ -88-10000

6 02-0110

7 02-0130

8 $SZAV

9 SAP02 111

10 BCamp(Camp V

11 BCC$Samp A1AA-amp$S+$1

12 A1AA-S Garden Sree

Program Screen St 9ield ame 9ield alue

Recording 1ditor

Recording

Add gt delete lines 9ormat chec+

Import gt eport of recording

In the editor you can add or deete ines Cou can aso change the contents of individua ines

-ith the function Chec) you can specify $hether the edited version of the recording sti has the

correct synta

Cou can aso eport import recordings to from a seuentia fie

After editing save the recording changes

copy SAP AG BC420 12-33

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 3488

04

983209 SAP AG 1999

Recording Seeral Transaction Runs

RecordingF

Directl( after the first recordingG or

In the displa( mode of the recording

In this step you can record additiona transactions and add additiona transaction runs to the

recording

Cou can record the additiona transactions directy after a recording or in the edit screen of a

recording

copy SAP AG BC420 12-34

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 3588

02

983209 SAP AG 1999

1ditor$ Importing and 1porting Recordings

6 T 9D0amp S

amp SAPM90ampD 608

DltURSR

4

2

8 SAPM90ampD 666

60

66

Program Screen St 9ield name 9ield alue

cempA

e name

aa =orma

cemp

A

e name

aa =orma

1port

Import

Presentation Serer

If the editor functions in the systems do not provide a the functions you need you can do$noad the

recording to your presentation server using the Eort function and then edit the recording using a

P2 editor

Cou use the Import function to import the data ac into the amp System ae sure the fie is sti in

the correct format

copy SAP AG BC420 12-35

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 3688

08

983209 SAP AG 1999

Processing the Recording

Recording

Process )ith ALL TRASATI

Parameer

Proce mode$pdae mode

CA mode

e=a e

Con a=er comm

+o a B eon

nd +o a B mode

A

A

T

The recording can e eecuted directy The data from the recording is used and the transaction is

processed $ith ca transaction

2a transaction provides a range of options for caing appication transactions $hich are discussed

on the foo$ing t$o pages

copy SAP AG BC420 12-36

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 3788

03

983209 SAP AG 1999

Process mode

Update mode

ATT mode

Processing Recording )ith T 6

A

1

Displa( all screens

Displa( errors onl(

o displa(

L

S

A

Local

S(nchronous

As(nchronous

A

o ATT

ATT )ithout indiidual screen control

ATT )ith indiidual screen control

Processing mode

=ere you can specify the processing mode 9 it is the same as the processing mode for atch input

4pdate mode

=ere you can specify the update mode For more information see the unit ca transaction

2ATT mode

=ere you can mae specia settings if you $ant to test the recording under 2ATT conditions (ony

necessary for 2ATT runs) Specia functions are caed in the 2ATT too for each screen at the end of

P5 and at the start of PAI

copy SAP AG BC420 12-37

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 3888

05

983209 SAP AG 1999

Default sie

ont after commit

ot a I session

1nd$ ot a I mode

Processing Recording )ith T amp

The screen standard sie is used for the

processing

ommit )or+ does not end the processing

o I mode is actie The transaction )ill run

through as in online

I mode is selected nce the data in the D

table is processedG the I mode is set to inactie

Standard siDe

If you seect this the screens are processed in the standard siDe in the foreground (in foreground or

dispay errors ony) Note the standard siDe is a$ays used for acground processing

Further after commit

The first commit $or in a transaction does not ead to the end of the recording

Note A atch input transaction is ended $ith the first commit $or

No I mode

The system fied SC9INPT is not set (SC9INPT E ) So transactions are run through as in onine

7nd No I mode

5ny use if you choose the processing mode 7 (dispay errors ony) Then the transaction is processed in the acground in atch input mode and if there is an error the screens run through in

the foreground

copy SAP AG BC420 12-38

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 3988

07

983209 SAP AG 1999

I Mode

atch input

mode

nline

Some transactions behae differentl( in batch input mode

than in online Cbatch input capabilit(

atch input mode sets the s(stem field SIPT H

Not every transaction can run the same onine and in atch input mode The transaction must decide

itsef $hether it is caed onine or in atch input mode

The system sets the system fied SC9INPT E G if the atch input mode is active (this aso appies

to ca transaction) From this system fied the transaction can identify $hether to run onine or in

atch input mode

copy SAP AG BC420 12-39

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 4088

040

983209 SAP AG 1999

reating a Session 9rom the Recording

Recordingnl( contains the data

from the recording

Seon name 02amp

Aoraon ampBS(eep eon

oclt dae 10102000

Cou can create a atch input session directy from the recording that you can then process using the

atch input monitor

copy SAP AG BC420 12-40

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 4188

046

983209 SAP AG 1999

reating Test Data

Test Data

Recording

ranranpBC420AAe name

The file onl( contains the data from the recording

Rgt

Application Serer

Structure

Cou can create a fie from the recordingH the fie $i contain a the fieds from the recording The

fieds are added to the fie $ith the ength you specified in the definition

The fied order corresponds to the order in the recording overvie$ Technica fieds

(2356257 2324ampS5amp and so on) are incuded

The data can ony e stored on the appication server If you do not specify a path the fie is stored in

the $or directory of the appication server

If the specified test fie aready eists the ne$ data record is added to this fie

copy SAP AG BC420 12-41

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 4288

04amp

983209 SAP AG 1999

ed conen

reating a Program

Recording

ZBC420ampProram name

Transfer Program

e daa

ead =rom =e

ran=er =rom recordn

reate

9ile nameTest data

ranranpBC420AA

Cou can generate a program from the recording

In the foo$ing diaog o enter a program name In addition you can choose the type and method

for fiing the maintained fied contents from the recorded screens

4se the vaues used for the recording If you reuire feie data transfer you $i have to modify

this program ater

ParameteriDe the input vaues and read these vaues from a fie A data structure is created for

parameteriDationH the data records are read from an eterna fie into this data structure The

program assumes the fie $as taiored to this data structure

If you have decided to parameteriDe the input vaues you shoud aso create a test fie during

generation To do this seect the checo and enter a name for the fie

The attriute maintenance screen of the AAP editor appears aintain the attriutes and save the

program

copy SAP AG BC420 12-42

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 4388

04

983209 SAP AG 1999

Program 9unctions

Online

transaction

Transfer program

To

error

1rror

ption 6ption ampFlat SAP

structure

Monitor

Cou have no$ generated a data transfer program for importing data into the amp System The

program can eecute the data transfer using atch input or ca transaction

If you choose option 1 and there is an error the data record is paced into a atch input session

copy SAP AG BC420 12-43

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 4488

044

983209 SAP AG 1999

Benerating 9unction Modules

Recording

Zcreaedeor ncon mode

ncon rop

Sor eD

ZBC420

Creae comer

9unction module

nl( one data record can be processed at a time

In the net diaog o you can generate a function modue a function group and short tet from the

recording The function modue is automaticay created in the function group

copy SAP AG BC420 12-44

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 4588

042

983209 SAP AG 1999

9unction of 9unction Modules

Online

transaction

To

error

1rror

ption 6 ption amp

9unction module

Import

Parameter 1port

parameter

Tables

M1SSTA

Monitor

S$BC

Import interface

The import interface consists of a technica part and the fieds from the recording (A parameter is

created for each input fied of the recorded transactions)

7port interface

Simpy consists of the parameter S4amp2 The function modue $i return a vaue in the system

fied SC9S4amp2 after caing ca transaction This return vaue is set to Dero if the data record has

een correcty processed (5ny appies to 2T)

If a session is created you $i e notified $hether the data record coud e paced into the session

Tae interfaceThis is used ony if the function modue $ors $ith ca transaction The tae contains a the

system messages

copy SAP AG BC420 12-45

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 4688

048

983209 SAP AG 1999

Import Interface of 9unction Module

$

Technical

fields

Data

fields

BI session or CALL TRANSACTION

Processin $ode

pdate $ode

a$e oamp BI session iamp (T initial)

Bacround user iamp (T initial)

Delete session aampter processin

Loc date oamp session

ODATA indicator

TU

MD1

UPDAT1

BRUP

US1R

=11P

ELDDAT1

DATA

Cou can use parameter 2T4 to specify $hether the function modue creates a atch input session

(2T4 E ) or updates the data record directy using ca transaction (2T4 E G)

The other parameters are fied as for a atch input session header

Note 7very time the function modue is caed a atch input session is created

If the session is to contain severa transactions proceed as foo$s

ltenerate the transaction severa times This can e achieved y recording the transaction again The

function modue interface $i then contain more than one transaction -hen the function modue is

caed severa transactions can e generated for each session

copy SAP AG BC420 12-46

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 4788

043

983209 SAP AG 1999

The Transaction Recorder

PrinciplesPrinciples

Recording )ith the LSMWRecording )ith the LSMW

Principles of atch Input and all TransactionPrinciples of atch Input and all Transaction

Integrating the TA Program into the DWIntegrating the TA Program into the DW

Using the TA Recorder Using the TA Recorder

copy SAP AG BC420 12-47

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 4888

045

983209 SAP AG 1999

Benerated Program

9unction modules DltP1ltBRUP

DltIS1RT

DltLS1ltBRUP

AAP Program

Define structure of

data in seJuential

fileDefine D

table

pen seJuential file

pen I session

Read data recordCseJuential file

9ill D table

9ill I session gtALL TRASATI

Last data record K

lose I session

lose seJuential file

The generated program has the structure dispayed aove It uses the standard function modues for

creating atch input sessions

copy SAP AG BC420 12-48

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 4988

047

983209 SAP AG 1999

Structure of the Benerated Program

Benerated part

Define D

table

pen seJuential file

pen I session

Read data record

9ill D table

9ill I session gtALL TRASATI

Last data recordK

lose I session

lose seJuential file

Include DR16

Define filestructure

P1ltDATAS1T

P1ltBRUP

DltDPR

Dlt9I1LD

DltTRASATI

LS1ltBRUP

LS1ltDATAS1T

The generated program consists of t$o parts 9 a generated part and the incude 2amp72G8 The

incude is provided in the standard system

The incude contains the definition of the reuired 2 tae and a further seven suroutines These

suroutines eecute the foo$ing functions

5pen and cose fie

5pen and cose session

Fi 2 tae

Fi session

The generated part is the main program and cas the reevant suroutines A structure is aso

generated in the generated part to read the eterna data into the fie

See the Appendi for more information on the 2amp72G8 program

copy SAP AG BC420 12-49

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 5088

020

983209 SAP AG 1999

Structure of D Table

PRBRAM DPR D1BI 9AM 9ALPRBRAMPRBRAM DPRDPR D1BID1BI 9AM9AM 9AL9AL

SAPM90ampD 0602

R90ampD=UR 600000

R90ampDU=RS 0006

R90ampD=T=D =UA

SAPM90ampD 0660

=A6AM16 Smith

=A6PSTL 87000

=A6LAD6 US

=A6SPRAS 1

SAPM90ampD 06amp0

=A6ST1B US6amp428357DDATA

PRBRAM

DPR

D1BI

9AM

9AL

EAR

UM

EAR

EAR

EAR

40

4

6

6amp

6amp

D Module pool

D Screen number

D Start of screen

D 9ield name

D 9ield contents

9ield ame T(pe Length Short Tet

AAP Dictionar(

The 2 tae has the same structure as in a standard transfer

copy SAP AG BC420 12-50

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 5188

026

983209 SAP AG 1999

Read Structure

Recording

DATA BEGIN OF record data element BUKRS bukr$amp data element KTOKD ktokd$amp data element NA(EG) name$+amp data element SORT ortl$ampEND OF record-

record

Automaticall( generated

from recording

The structure of the fie is automaticay generated and is a$ays defined $ith the name amp725amp

The generated structure a$ays has the same ayout 7ach fied is defined y t$o generated ro$s

The first ro$ is a$ays a comment ro$ containing the tet J data eement and the data eement of

the screen fied from the recording In the net ro$ the fied itsef is defined $ith the name of the

data eement foo$ed y a three9digit position numer $hich specifies the ocation in the structure

The ength of the fied is set y the ength of the data eement If a fied is not defined through a data

eement the system uses the ength of the screen fied

copy SAP AG BC420 12-51

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 5288

02amp

983209 SAP AG 1999

pening and losing the 9ile

P1ltDATAS1T

LS1ltDATAS1T

FOR( oendataet USING dataet-O)EN DATASET dataet IN TET (ODE-

IF S01SUBR2 34 - 5RITE 6 te7t1e S01SUBR2-STO)-

ENDIF-

ENDFOR(-

FOR( cloedataet USING dataet-2OSE DATASET dataet-

ENDFOR(-

Include

DR16

The suroutine 5P7N3ATAS7T opens the seuentia fie

The suroutine 2+5S73ATAS7T coses the seuentia fie

copy SAP AG BC420 12-52

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 5388

02

983209 SAP AG 1999

9unction Modules for I Program

lient

Session name

Eold date

=eep session

D user name

RecordK

LI1T

BRUP

ELDDAT1

=11P

US1R

R1RD

DltP1ltBRUPDltP1ltBRUP

Transaction code

D table

TD1

DPRTA

DltIS1RTDltIS1RT

DltLS1ltBRUPDltLS1ltBRUP

pen Isessionpen Isession

Insert data for

transactions

Insert data for

transactions

lose I

session

lose I

session

The foo$ing function modues are provided for creating atch input sessions (function group

S2)

235P7N3ltamp54P

2reates a ne$ session and contains genera data for the $hoe session

23INS7ampT

Inserts a the data for a transaction into the session The transferred interna tae $ith the

structure 2ATA must contain a the data reuired for fuy processing the transaction

232+5S73ltamp54P

2oses the session after a the data has een inserted As soon as the session has een cosed it

can e processed

The interna tae $ith the structure 2ATA can ony contain atch input data for one singe

transaction run So the individua transactions are inserted into the atch input session in a oop

using severa 23INS7ampT cas

copy SAP AG BC420 12-53

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 5488

024

983209 SAP AG 2001

9unction Module DltP1ltBRUP

ALL 9UTI DltP1ltBRUPALL 9UTI DltP1ltBRUP

1PRTIB

LI1T client

BRUP session name

ELDDAT1 loc+ date

=11P delete flag

US1R bdc user name

R1RD recording

IMPRTIB

NID internal session +e(

11PTIS

1PRTIB

LI1T client

BRUP session name

ELDDAT1 loc+ date

=11P delete flag

US1R bdc user name

R1RD recording

IMPRTIB NID internal session +e(

11PTIS

-ith the function modue 235P7N3ltamp54P you can open a atch input session

The foo$ing parameters are mandatory

2+I7NT (cient)

ltamp54P (session name)

4S7amp (user name)

Note The 4S7amp must a$ays e specified This user name is reuired for processing the session

in atch mode

The foo$ing parameters are optiona

=5+AT7 specifies the eariest date on $hich the session can e started677P fag specifies $hether session shoud e deeted after it has een successfuy processed The

677P fag is ignored if the session contains errors

677P E K K means deete the session after processing (defaut vaue) H

677P E KGK means do not deete session

amp725amp E KGK ao$s you to create a recording instead of a I session

If gtI is specified the function modue returns the interna session ey This is needed to e ae to

differentiate sessions that have the same name

-ith 7G27PTI5NS you get various return vaues that can e ueried $ith SC9S4amp2

Note In onine mode the onine user is used for the authoriDation checs regardess of the user

name specified

copy SAP AG BC420 12-54

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 5588

022

983209 SAP AG 1999

Subprogram P1ltBRUP

P1ltBRUP

FOR( oen8rou-IF e9on -

2A FUN2TION BD2O)ENGROU) E)ORTING 2IENT lt1mandt GROU) 8rou USER uer KEE) kee

=ODDATE gtolddate-

ENDIF-ENDFOR(-

Include

DR16

The suprogram 5P7N3ltamp54P opens the atch input session

copy SAP AG BC420 12-55

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 5688

028

983209 SAP AG 1999

9unction Module DltIS1RT

ALL 9UTI DltIS1RTALL 9UTI DltIS1RT

IMPRT

TD1 Transaction code

PSTltLAL Update locall(

PRITIB print list

TAL1S DPRTA bdclttable

11PTIS

IMPRT

TD1 Transaction code

PSTltLAL Update locall(

PRITIB print list

TAL1S DPRTA bdclttable

11PTIS

-ith the function modue 23INS7ampT you can add transaction data to the session

Cou need an interna 2 tae to transfer the data

The foo$ing parameters are mandatory

T257 Transaction code

CNPamp5TA 2 tae

The foo$ing parameters are optiona

P5ST3+52A+ E KGK activates oca updating This means that the data to e updated is ept in the

appication server and updated in the ast step of the transaction This does not invove the update

process (For more information see course 28 Programming ataase 4pdates)

PampINTINlt E KGK 9 ists processed in I $i e printed immediatey -ith 7G27PTI5NS you get various return vaues that can e ueried $ith SC9S4amp2

copy SAP AG BC420 12-56

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 5788

023

983209 SAP AG 1999

Subprogram DltTRASATI

DltTRASATI

FOR( BD2TRANSA2TION USING tcode-

IF e9on -2A FUN2TION BD2INSERT

E)ORTING T2ODE tcode TABES D0N)ROTAB bdcdata-

ESE-

ENDIF-ENDFOR(-

T

Include

DR16

The suprogram 23TampANSA2TI5N moves the fied 2 tae either to a atch input session

or uses ca transaction to import the data into the system 5n the seection screen you can specify

$hether you $ant to create a session or you $ant to use ca transaction to process the data directy

The S7SSI5N fied is then set according to your seection

copy SAP AG BC420 12-57

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 5888

025

983209 SAP AG 1999

9unction Module DltLS1ltBRUP

ALL 9UTI DltLS1ltBRUP

11PTIS

TltP1 6

NU1U1lt1RRR amp

-ith the function modue 232+5S73ltamp54P you can cose a atch input session

In 7G27PTI5NS you get various return vaues that can e ueried $ith SC9S4amp2

copy SAP AG BC420 12-58

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 5988

027

983209 SAP AG 1999

Subprogram LS1ltBRUP

FOR( cloe8rou-IF e9on -cloe batcgt 9nut 8rou

2A FUN2TION BD22OSEGROU)-

ESE-IF e8rouoened -

2A FUN2TION BD22OSEGROU)-

ENDIF-ENDIF-

ENDFOR(-

LS1ltBRUPlose session

lose error session

Include

DR16

The suprogram 2+5S73ltamp54P coses the atch input session The suprogram differentiates

et$een a norma I session (S7SSI5N E G) and a session opened $hen ca transaction

encountered an error (73ltamp54P35P7N7 E G)

copy SAP AG BC420 12-59

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 6088

080

983209 SAP AG 1999

Subprograms DltDPRG Dlt9I1LD

DltDPR

Dlt9I1LD

FOR( bdc9eld USING nam al-IF al 34 nodata-2EAR bdcdata- bdcdata1nam nam- bdcdata1al al- A))END bdcdata-ENDIF-

ENDFOR(-

FOR( bdcdltnro USING ro8ram dltnro- 2EAR bdcdata-Bdcdata1ro8ram ro8ram-Bdcdata1dltnro dltnro-Bdcdata1dltnbe89n - A))END bdcdata-ENDFOR(-

Include

DR16

The incude 2amp72GG contains t$o suprograms 23CNPamp5 and 23FI7+

Suprogram 23CNPamp5 fis the 2 tae $ith program names and screen numers

Suprogram 23FI7+ fis the 2 tae $ith fied names and vaues

7ach suprogram creates an entry in the 2 tae

copy SAP AG BC420 12-60

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 6188

086

983209 SAP AG 1999

9illing the D Table

erorm bdcdltnro u9n8 SA)(FD +- erorm bdc9eld u9n8 BD22URSOR RFD1BUKRS- erorm bdc9eld u9n8 BD2OK2ODE 6- erorm bdc9eld u9n8 RFD1BUKRS record1BUKRS- erorm bdc9eld u9n8 RFD1KTOKD record1KTOKD-

erorm bdcdltnro u9n8 SA)(FD -

erorm bdc9eld u9n8 BD22URSOR KNA1S)RAS- erorm bdc9eld u9n8 BD2OK2ODE 6- erorm bdc9eld u9n8 KNA1NA(E record1NA(E-

erorm bdc9eld u9n8 KNA1SORT record1SORT-

Recording Benerated automaticall(

from the recording

)ERFOR( bdcdltnro USING SA)(FD +- )ERFOR( bdc9eld USING BD22URSOR RFD1BUKRS-)ERFOR( bdc9eld USING BD2OK2ODE 6-)ERFOR( bdc9eld USING RFD1BUKRS record1BUKRS-)ERFOR( bdc9eld USING RFD1KTOKD record1KTOKD-

)ERFOR( bdcdltnro USING SA)(FD -

)ERFOR( bdc9eld USING BD22URSOR KNA1S)RAS-)ERFOR( bdc9eld USING BD2OK2ODE 6-)ERFOR( bdc9eld USING KNA1NA(E record1NA(E-

)ERFOR( bdc9eld USING KNA1SORT record1SORT- ---

The 2 tae is fied $ith data from the recording The suroutines 23CNPamp5 and

23FI7+ are used for this

The suroutines are caed in the reuired structure or seuence

copy SAP AG BC420 12-61

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 6288

08amp

983209 SAP AG 1999

erie)

SAPDatabase

SeJuential9ile

SAPDatabase

ALL TRASATIALL TRASATI

SeJuential9ile

ATE IPUTATE IPUT

D TableD TableD TableD Table

I Monitor

T

In contrast to atch input you can use ca transaction to directy pass data to the diaog interface

$ithout using a atch input session Cou use an interna tae (2 tae same structure and ayout

as atch input) to temporariy store your screen data Then you ca the desired transaction in your

program

Note 5n average the 2a Transaction method is 8 to times faster than using atch Input

copy SAP AG BC420 12-62

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 6388

08

983209 SAP AG 1999

all Transaction Program$ 1ample

RE)ORT abcbdcdcdeb9ct-

)ARA(ETERS d9mode DEFAUT A

udmode DEFAUT S-FOR( calltranact9on-2A TRANSA2TION FD

USING bdcdata (ODE d9mode

U)DATE udmode-

IF lt1ubrc NE - 5RITE 6 ---

ENDIF-ENDFOR(-

Screen

00

Screen

100

Screen

An additiona system ro area is added for the caed transaction The system uses this area for

processing the individua screens in the transactionH the data from the tae is added here After the

transaction is processed the second ro area is reeasedH the system continues processing in the first

ro area

Notes

In contrast to atch input there is no error ogging (error sessions) here For processing the caed

transaction the system uses the authoriDations of the user that caed the transaction The 2 tae

can ony hod data for one transaction run at a time efore another transaction is caed and its data

can e added you must eecute a amp7Famp7S= for the 2 tae

copy SAP AG BC420 12-63

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 6488

084

983209 SAP AG 1999

ALL TRASATI C6

RE)ORT 777-

2A TRANSA2TION FD USING bdcdata (ODE E-

Default for MD1 is A

2A TRANSA2TION 3tranact9oncode4 USING 3bdc1table4 C (ODE A E N C-

-ith the parameter 57 you can seect a specific dispay mode for processing the transaction The

foo$ing three modes are avaiae

A (ispay a)

If you eecute the program a the screens and a their data are dispayed This is the defaut vaue

for the 57 in 2A++ TampANSA2TI5N

N (ispay nothing)

The screens are not dispayed at a regardess of $hether any of them contained errors As soon as

the transaction has een fuy processed contro is returned to your program (The vaue of the

parameter 4PAT7 determines $hether dataase updates are eecuted or not)

7 (ispay errors ony)As soon as an error occurs in a screen the transaction is s$itched to dispay mode so that you can

correct the errors

These dispay modes are the same as those in the atch input session processing

copy SAP AG BC420 12-64

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 6588

082

983209 SAP AG 1999

RE)ORT 777-

2A TRANSA2TION FD USING BD2DATA U)DATE -

ALL TRASATI Camp

RE)ORT 777-

2A TRANSA2TION FD USING bdcdata U)DATE -

2A TRANSA2TION 3tranact9oncode4 USING 3bdc1table4 C (ODE A E N C U)DATE A S C -

Default for UPDAT1 is A

-ith the parameter 4PAT7 you can contro ho$ dataase updates arising from a transaction are

carried out There are three options

A (asynchronous updating) The caed transaction does not $ait unti the dataase has een

updated it simpy for$ard the updates to the SAP update service This usuay speeds up the 2T

program This processing mode is N5T recommended for arge data sets as the caed transaction

does not receive a competion message from the update modue

The caing 2T program therefore cannot te if the transaction has een successfuy competed Cou

shoud use the updating administration function (transaction S8) to determine $hether updating

$as terminated eary The error anaysis correction functions for are ess hepfu than $ith

synchronous updating

S (synchronous updating) -ith synchronous updating the caed transaction $aits unti a the

updates have een competed So processing is so$er than $ith synchronous updating The caed

transaction can ho$ever report any updating errors to the program $hich maes error

anaysiscorrection easier

+ (local updating) $ith oca updating the dataase is not updated in a separate process it is

updated in the caers process (see appication hep documentation for the AAP ey$ord S7T

4PAT7 TAS6 +52A+)

copy SAP AG BC420 12-65

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 6688

088

983209 SAP AG 1999

ALL TRASATI C

RE)ORT 777-DATA mtab T0)E TABE OF bdcm8coll-

2A TRANSA2TION FD USING bdcdata (ESSAGES INTO mtab-

2A TRANSA2TION 3tranact9oncode4 USING 3bdc1table4 C (ODE A E N C U)DATE A S C (ESSAGES INTO 3metab4 C -

7SSAlt7S specifies that a system messages that are output during the eecution of a 2A++

TampANSA2TI5N are $ritten to the interna tae L7SSTA The interna tae must have the

structure 2Slt25++

4nie the cassica atch input processing $ith sessions 2A++ TampANSA2TI5N does not offer any

specia processing procedures for transactions containing errors There are no restart functions for

transactions that contain errors or that cause updating terminations

copy SAP AG BC420 12-66

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 6788

083

983209 SAP AG 1999

ALL TRASATI C4

RE)ORT 777-DATA mltot T0)E ctuaram-

2A TRANSA2TION FD USING BD2DATA

O)TIONS FRO( mltot-

2A TRANSA2TION 3tranact9oncode4 USING 3bdc1table4 C (ODE A E N C U)DATE A S C (ESSAGES INTO 3metab4 C O)TIONS FRO( ot C -

RE)ORT 777-DATA mltot T0)E ctuaram-2A TRANSA2TION FD USING bdcdata

O)TIONS FRO( mltot-

The addition 5PTI5NS enaes the ca transaction statement to e controed through a structure

The structure must have the dictionary type 2T43PAampAS

The addition 5PTI5NS Famp5 must not e comined either $ith the addition 57 or $ith

4PAT7 ore information on the net side

copy SAP AG BC420 12-67

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 6888

085

983209 SAP AG 1999

Structure TUltPARAMS

DISMD1 Procen mode anaoo o addon amp

UPDMD1 $pdae mode anaoo o addon $PA

ATTMD1 CA mode CA conro

D19SI1 orce de=a EndoE e drn procen

RAMMIT +o eD a Camp amp(

IPT +o a ac np eonF a F S-B+P SPAC

I1D +o a ac np eon a=er end o= BC daa

The components are defined as foo$s

The components 7FSIM7 ampA25IT N5INPT and N5I7N can have the foo$ing

vaues KGK E Ces or K K E No

If the addition 5PTI5NS Famp5 is not specified the foo$ing settings appy to the contro

parameters

IS57 from addition 57

4P57 from addition 4PAT7

2ATT57 2ATT not active

7FSIM7 o not not use defaut $indo$s siDe

ampA25IT Successfu eit at 25IT -5amp6

N5INPT atch input session active (SC9INPT E G)

N5I7N atch input session sti active after end of 2 data

copy SAP AG BC420 12-68

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 6988

087

983209 SAP AG 1999

SMSBID Message ID

SMSBT Message T(pe C1GIGWGSGA

SMSB Message umber

SMSB6 Message ariable 6

SMSBamp Message ariable amp

SMSB Message ariable

SMSB4 Message ariable 4

SMSBID Message ID

SMSBT Message T(pe C1GIGWGSGA

SMSB Message umber

SMSB6 Message ariable 6

SMSBamp Message ariable amp

SMSB Message ariable

SMSB4 Message ariable 4

Return code$

S(stem fields$

alue Meaning

0 Successful

6000 1rror in transaction

6000 1rror in processing call transaction

see also the s(stem fields specified

alue Meaning

0 Successful

6000 1rror in transaction

6000 1rror in processing call transaction

see also the s(stem fields specified

9ield name Meaning9ield name9ield name MeaningMeaning

Return ode and S(stem 9ields

The return code is used to specify $hether the caed transaction $as processed successfuy In

addition severa system fieds are fied The numer I type and variaes of the diaog message

output y the caed transaction Cou need this information to output the message tet

copy SAP AG BC420 12-69

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 7088

030

983209 SAP AG 1999

Benerated Program of the TA Recorder

REFRES= (ESSTAB-

2A TRANSA2TION tcode USING bdcdata (ODE ctumode U)DATE cudate (ESSAGES INTO metab-OO) AT metab- ENDOO)-IF lubrc 34 AND e8rou 34 S)A2E- IF e8rouoenend - 2A FUN2TION BD2O)ENGROU) E)ORTING ---------

--------- E8rouoened - ENDIF- 2A FUN2TION BD2INSERT E)ORTING T2ODE tcode TABES D0N)ROTAB bdcdata-ENDIF-REFRES= bdcdata-

Message table output

pen error session

Insert data record that

has errors into error

session

If you have seected ca transaction on the seection screen the generated program runs as foo$s

The onine transaction is caed $ith ca transaction and passed to tae 2ATA A the

messages arising during the ca transaction are put in the interna tae 7SSTA

7SSTA is output as a ist

If you have specified an error session ( 73ltamp54P L SPA27) on the seection screen and the

ca transaction comes across an error (+3S4amp2 L 0) the error session is opened The error

session is ho$ever ony opened once Then the data record is paced in the session

A the other data records that have errors $ith ca transaction are paced in the same session

copy SAP AG BC420 12-70

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 7188

036

983209 SAP AG 1999

The Transaction Recorder

PrinciplesPrinciples

Recording )ith the LSMWRecording )ith the LSMW

Principles of atch Input and all TransactionPrinciples of atch Input and all Transaction

Integrating the TA Program into the DWIntegrating the TA Program into the DW

Using the TA Recorder Using the TA Recorder

copy SAP AG BC420 12-71

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 7288

03amp

983209 SAP AG 1999

Integrating into the DW

Transfer program

AAP Dictionar(

Integrate

SDA0

SDA6

SDAamp

SDA

Cou can integrate the generated program into the G9- The structure of the fie must e created

in the AAP ictionary The taes SGA0 SGA8 SGA1 and SGA $i e fied

copy SAP AG BC420 12-72

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 7388

03

983209 SAP AG 1999

DW Release 42

Goo

-B eeae 45

aa ran=er ogtec

Int customer data transfer ob-ect

ecord =ed

Dece daa ran=er

d Goo

The ampunction ampor interatin TA recorder prora$s is

i$ple$ented in the

D+-B in Release

The recorder can e integrated as of ampeease and it is provided in the G9- ampeease

ltot to the G9- ampeease 5n the initia screen you can integrate programs y choosing ampoto

( +nt customer ata transfer o-ect

copy SAP AG BC420 12-73

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 7488

034

983209 SAP AG 1999

reating Program as D b-ect

Comer ran=er ogtec

ampgtec ype

Sor eD =or ogtec

aa ran=er proram

Srcre name

9900

(+A1

Cane comer

ZBCA+G

ZB

ustomer transfer ob-ect

umber bet)een 7000 and 7777

b-ect t(pe

Assignment to R ob-ect

Short tet for D ob-ectShort description

Data transfer program

ame of generated program

Structure name

A structure Cstructure la(out )ith this name is created in

the AAP Dictionar(

For ampeease transfer oects $ere not organiDed y 5amp oects ut y a G numer (00089

OOOO) The numer range O0009OOOO is reserved for customers

To create a connection to the ne$ G 9- you must assign the program to a 5amp oect

2reate a short tet for the G oect This tet $i appear in the method seection ist

Specify the program to e incuded

Specify a name for the structure to e created in the AAP ictionary

Note $he generated program appears under program type +N and not under program type

-

copy SAP AG BC420 12-74

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 7588

032

983209 SAP AG 1999

Adantages

Automatic program registration in the DW in

Release 48

ou can use all the functions defined for

standard ob-ects

1ception$ The (reate ampile ith data

function

If you incuded the oect in the ampeease $orench it is automaticay avaiae in the ampeease

B $orench

A the $orench functions are avaiae for your oect ecept for Create files ith transfer ata

copy SAP AG BC420 12-75

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 7688

038

983209 SAP AG 1999

ou are no) able to$

The Transaction Recorder$ Unit Summar(

Use the recording function in the LSMW to create

a batch input session )ith the data from the

eternal s(stem

Use the TA Recorder to create (our o)n data

transfer program

Anal(e programs that )or+ )ith batch input or

call transaction

Integrate the TA Recorder programs into the

DW

copy SAP AG BC420 12-76

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 7788

ercise 1

nit $ -ecorder

$opic 2reating etors

$ransaction -ecorder ercise 1

bull 2reating detors $ith eterna numer assignment

bull etor numers M9980008 to M9980080

Address data for detors $ith eterna numer assignment is to

e transferred using program ampFI700

ro4ect F5

Supro4ect +5

-un +575

$as)s 85 95 8S25

9oad program -F+00

8 In the foo$ing eercises eisting data is to e changed Therefore these detors $ith

eterna numer assignment have to first e created

898 4nder suproect 79 create run 797G9 $ith the name Detors ith

eternal numers

copy SAP AG BC420 12-77

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 7888

891 2reate the foo$ing three tass The tass map the foo$ing process steps

convert data create + session and process + session

89198 In run 797G9 create the foo$ing tas

9 Tas AP9

9 Name 2onvert data 9 Tas type AP

9 Program type +S-

Seect the foo$ing +S- oect

+S- proect 2109

+S- suproect 7I9

+S- oect I997GT

89191 In run 797G9 create the foo$ing tas 9 Tas +5A9

9 Name 2reate I session

Tas type +5A

9 Program type INP

Seect program ampFI700 $ith the variant

I97G9

8919 In run 797G9 create the foo$ing tas

9 Tas S29

9 Name Process I session Tas type S2

9 Program type amp7P5

Seect program ampS2S4 $ith the variant

S497G9

Note that you have to correct the seuence of the tass 2onvert data

create + session and process + session

4se the uttons

89 Start the run

The detors $i e created $ith eterna numer assignments

89 2hec in transaction F0 that the detors M9980008 to M9980080 have een

created

copy SAP AG BC420 12-78

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 7988

ercise

nit $ransaction -ecorder

$opic -ecording function in the 9S8(

bull 2reate a recording using the +S-

bull ltenerate a atch input session

2hange the detor address data in the amp System

Name of the recording +

Name of the file +2055+F9

8 2reate the recording 7I3 using the +S- ampecord the transaction F01 (2hange

detor)

898 efore you create the recording first test the transaction onineQ

For the recording use detor M9980008 5n the initia screen of the F01

maintain the foo$ing fieds ony

etor etor M9980008

2ompany code 0008

Address data seect

Note $he data record must e saved hile recording

891 aintain the names and the descriptions for the foo$ing fieds

Name city street posta code and teephone numereete a other fieds in screen 880 from the recording (eg S5ampT+ +AN8

SPampAS)

4se the same technica names as sho$n in the tae eo$ (automatic fied

mapping)

copy SAP AG BC420 12-79

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 8088

1 2reate the suproect 7I9 and the ne$ oect TA3 in your proect 2109

aintain the oect attriutes and seect the item atch input recording Seect your

recording 7I3

2reate the source structure address

2reate the source fieds according to the tae eo$ 5r copy them from proect 2109S37N suproect 7I900 oect TA900

198 Fie setup The data from the egacy system are dispayed in the foo$ing tae

Fied name Fied type Fied ength escription

N5 2 8B etor numer

NA7 2 Name

STamp77T 2 Street

2ITC 2 2ityPace of residence

MIP 2 80 Posta code

T7+ 2 8B Teephone numer

191 aintain the fied mapping 4se the automatic fied mapping (via menu item

7tras)

19 Specify the fies 5ny maintain the fie name of the source fie

Name of the fie 21099IFI+7

2odepage 8800

19 Import the data and convert them ispay the data in each caseQ

19 2reate a atch input session

19B ampun the atch input session

copy SAP AG BC420 12-80

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 8188

ercise 3

nit $ransaction -ecorder

$opic -ecording ith the $ -ecorder

bull ltenerate a recording using the TA recorder

bull Test the recording

2hange the address data of detors in the amp system

Name recording $+

Name of the file +2055+F9

8 2reate the recording TA37I3 using the transaction recorder ampecord the

transaction F01 (change detor)

898 4se detor M9980008 for the recording 5n the F01 initia screen ony

maintain the foo$ing fieds

etor etor M9980008

2ompany 2ode 0008

Address data seect

Note $he data record must e saved hen recording

eete a fieds that do not eist in the source fie 21099IFI+7 from screen

880 in the recording (eg 6NA89S5ampT+ 6NA89+AN8 6ANNQ9SPampAS) Note o not deete fieds ampF01946ampS and ampF0190880

Save the recording no$

1 S$itch to the recordings overvie$

198 Process the recording $ith the processing mode A (dispay a)

191 Process the recording $ith the processing mode RN (no dispay)

19 If the recording has een tested and no error has occurred generate a I session

and run it using the I monitor If an error shoud occur generate the recordingagainQ

copy SAP AG BC420 12-81

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 8288

From the recording generate the program M21037I3 in your deveopment cass

2109 Seect the foo$ing

bull ampead fied contents from fie

bull 2reate test data in the fie 2103dei3test3tt

98 Save this program and eecute it ltenerate one I session each and process it

2arry out the same steps again using the ca transaction

The generated program shoud no$ e changed so that fie 21099IFI+7 can e

read and processed

98 2hange the defaut vaue of the fie name (parameter dataset) in 21099

IFI+7

91 2hange the structure definition eete the company code fied and the address

data checo from the structure

9 2hange the su9routine ca perform dc3fied for the company code (KampF019

46ampSK) so that the vaue 0008 is transferred

9 2hange the su9routine ca perform dc3fied for the address data checo

(KampF0190880K) so that the vaue G is transferred

9 Start the program again and read the data from the fie 21099IFI+7 $ith

detor data ltenerate a I session $ith it and run it

copy SAP AG BC420 12-82

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 8388

033 Include DR16INCLUDE BDCRECX1

SELECTION-SCREEN BEGIN OF LINE

PARAMETERS SESSION RADIOBUTTON GROUP CTU create sessi SELECTION-SCREEN COMMENT $amp TEXT-S FOR FIELD SESSION

se(ecti-scree )siti +

PARAMETERS CTU RADIOBUTTON GROUP CTU ca(( trasacti

SELECTION-SCREEN COMMENT $amp TEXT-S FOR FIELD CTU

SELECTION-SCREEN END OF LINE

SELECTION-SCREEN BEGIN OF LINE

SELECTION-SCREEN COMMENT $amp TEXT-S1 FOR FIELD GROUP

se(ecti-scree )siti $+

PARAMETERS GROUP1$amp r) ae 0 sessi

SELECTION-SCREEN COMMENT $amp TEXT-S+ FOR FIELD CTUMODE

se(ecti-scree )siti

PARAMETERS CTUMODE LIE CTU2PARAMS-DISMODE DEFAULT 3N3

A4 s56 a(( 78)rs

E4 s56 78)r errr (8

N4 7 t 7is)(a8 78)r

SELECTION-SCREEN END OF LINE

SELECTION-SCREEN BEGIN OF LINE

SELECTION-SCREEN COMMENT $amp TEXT-S$ FOR FIELD USER

se(ecti-scree )siti $+

PARAMETERS4 USER1$amp DEFAULT S9-UNAME ser 0r sessi i atc5

SELECTION-SCREEN COMMENT $amp TEXT-S FOR FIELD CUPDATE

se(ecti-scree )siti

PARAMETERS CUPDATE LIE CTU2PARAMS-UPDMODE DEFAULT 3L3

S4 s8c5rs(8

A4 as8c5rs(8

L4 (ca(

SELECTION-SCREEN END OF LINE

SELECTION-SCREEN BEGIN OF LINE

SELECTION-SCREEN COMMENT $amp TEXT-S FOR FIELD EEP

se(ecti-scree )siti $+

PARAMETERS4 EEP AS CltECBOX 3 3 = 7e(ete sessi i0 0iis5e7

3X3 = gtee) sessi i0 0iis5e7

SELECTION-SCREEN COMMENT $amp TEXT-S FOR FIELD E2GROUP

copy SAP AG BC420 12-83

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 8488

se(ecti-scree )siti

)araeters E2GROUP1$amp r) ae 0 errr-sessi

SELECTION-SCREEN END OF LINE

SELECTION-SCREEN BEGIN OF LINE

SELECTION-SCREEN COMMENT $amp TEXT-S FOR FIELD ltOLDDATE

se(ecti-scree )siti $+

PARAMETERS4 ltOLDDATE LIE S9-DATUM

SELECTION-SCREEN COMMENT +11amp TEXT-S$ FOR FIELD E2USER

se(ecti-scree )siti

PARAMETERS4 E2USER1$amp DEFAULT S9-UNAME ser 0r errr-sessi

SELECTION-SCREEN END OF LINE

SELECTION-SCREEN BEGIN OF LINE

SELECTION-SCREEN COMMENT +11amp TEXT-S FOR FIELD E2EEP

se(ecti-scree )siti

PARAMETERS4 E2EEP AS CltECBOX 3 3 = 7e(ete sessi i0 0iis5e7

3X3 = gtee) sessi i0 0iis5e7

SELECTION-SCREEN END OF LINE

SELECTION-SCREEN BEGIN OF LINE

SELECTION-SCREEN COMMENT +11amp TEXT-S FOR FIELD E2ltDATE

se(ecti-scree )siti

PARAMETERS4 E2ltDATE LIE S9-DATUM

SELECTION-SCREEN END OF LINE

SELECTION-SCREEN SIP

SELECTION-SCREEN BEGIN OF LINE

SELECTION-SCREEN COMMENT 1amp TEXT-S1 FOR FIELD NODATA

PARAMETERS4 NODATA DEFAULT 33 LOER CASE 7ata

SELECTION-SCREEN END OF LINE

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

Batc5i)t7ata 0 si(e trasacti

DATA4 BDCDATA LIE BDCDATA OCCURS ITlt ltEADER LINE

essaes 0 ca(( trasacti

DATA4 MESSTAB LIE BDCMSGCOLL OCCURS ITlt ltEADER LINE

errr sessi )ee7 3 3 r 3X3amp

DATA4 E2GROUP2OPENED

essae tets

TABLES4 T1

copy SAP AG BC420 12-84

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 8588

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

at se(ecti scree

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

AT SELECTION-SCREEN

r) a7 ser st e 0i((e7 0r create sessi

IF SESSION = 3X3 AND

GROUP = SPACE OR USER = SPACE

MESSAGE E1MSamp

ENDIF

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

)e 7ataset

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

FORM OPEN2DATASET USING P2DATASET

OPEN DATASET P2DATASET IN TEXT MODE

IF S9-SUBRC

RITE4 TEXT-E S9-SUBRC

STOP

ENDIF

ENDFORM

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

c(se 7ataset

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

FORM CLOSE2DATASET USING P2DATASET

CLOSE DATASET P2DATASET

ENDFORM

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

create atc5i)t sessi

t 0r ca(( trasacti siamp

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

FORM OPEN2GROUP

IF SESSION = 3X3

SIP

RITE4 $amp 3Create r)3I1amp GROUP

SIP

)e atc5i)t r)

CALL FUNCTION 3BDC2OPEN2GROUP3

EXPORTING CLIENT = S9-MANDT

copy SAP AG BC420 12-85

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 8688

GROUP = GROUP

USER = USER

EEP = EEP

ltOLDDATE = ltOLDDATE

RITE4 amp 3BDC2OPEN2GROUP3I$amp

1$amp 3retrc7e43I+amp

S9-SUBRC

ENDIF

ENDFORM

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

e7 atc5i)t sessi

ca(( trasacti si4 errr sessiamp

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

FORM CLOSE2GROUP

IF SESSION = 3X3

c(se atc5i)t r)

CALL FUNCTION 3BDC2CLOSE2GROUP3

RITE4 amp 3BDC2CLOSE2GROUP3Iamp

1$amp 3retrc7e43I+amp

S9-SUBRC

ELSE

IF E2GROUP2OPENED = 3X3

CALL FUNCTION 3BDC2CLOSE2GROUP3

RITE4

RITE4 amp 3Fe5(era))e 6r7e eret3Iamp

ENDIF

ENDIF

ENDFORM

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

Start e6 trasacti accr7i t )araeters

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

FORM BDC2TRANSACTION USING TCODE

DATA4 L2MSTRINGamp

DATA4 L2SUBRC LIE S9-SUBRC

atc5 i)t sessi

IF SESSION = 3X3

CALL FUNCTION 3BDC2INSERT3

EXPORTING TCODE = TCODE

TABLES D9NPROTAB = BDCDATA

RITE4 3BDC2INSERT3Iamp

copy SAP AG BC420 12-86

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 8788

TCODE

3retrc7e43I+amp

S9-SUBRC

3RECORD43

S9-INDEX

ca(( trasacti si

ELSE

REFRESlt MESSTAB

CALL TRANSACTION TCODE USING BDCDATA

MODE CTUMODE

UPDATE CUPDATE

MESSAGES INTO MESSTAB

L2SUBRC = S9-SUBRC

RITE4 3CALL2TRANSACTION3

TCODE

3retrc7e43I+amp

L2SUBRC

3RECORD43

S9-INDEX

LOOP AT MESSTAB

SELECT SINGLE FROM T1 ltERE SPRSL = MESSTAB-MSGSPRA

AND ARBGB = MESSTAB-MSGID

AND MSGNR = MESSTAB-MSGNR

IF S9-SUBRC =

L2MSTRING = T1-TEXT

IF L2MSTRING CS 313

REPLACE 313 ITlt MESSTAB-MSGH1 INTO L2MSTRING

REPLACE 3$3 ITlt MESSTAB-MSGH$ INTO L2MSTRING

REPLACE 33 ITlt MESSTAB-MSGH INTO L2MSTRING

REPLACE 33 ITlt MESSTAB-MSGH INTO L2MSTRING

ELSE

REPLACE 33 ITlt MESSTAB-MSGH1 INTO L2MSTRING

REPLACE 33 ITlt MESSTAB-MSGH$ INTO L2MSTRING

REPLACE 33 ITlt MESSTAB-MSGH INTO L2MSTRING

REPLACE 33 ITlt MESSTAB-MSGH INTO L2MSTRING

ENDIF

CONDENSE L2MSTRING

RITE4 MESSTAB-MSGT9P L2MSTRING$+amp

ELSE

RITE4 MESSTAB

ENDIF

ENDLOOP

copy SAP AG BC420 12-87

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 8888

SIP

Eree 0e5(era))e

IF L2SUBRC AND E2GROUP SPACE

IF E2GROUP2OPENED = 3 3

CALL FUNCTION 3BDC2OPEN2GROUP3

EXPORTING CLIENT = S9-MANDT

GROUP = E2GROUP

USER = E2USER

EEP = E2EEP

ltOLDDATE = E2ltDATE

E2GROUP2OPENED = 3X3

ENDIF

CALL FUNCTION 3BDC2INSERT3

EXPORTING TCODE = TCODE

TABLES D9NPROTAB = BDCDATA

ENDIF

ENDIF

REFRESlt BDCDATA

ENDFORM

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

Start e6 scree

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

FORM BDC2D9NPRO USING PROGRAM D9NPRO

CLEAR BDCDATA

BDCDATA-PROGRAM = PROGRAM

BDCDATA-D9NPRO = D9NPRO

BDCDATA-D9NBEGIN = 3X3

APPEND BDCDATA

ENDFORM

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

Isert 0ie(7

Page 2: BC420_46C - 012The Transaction Recorder

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 288

0amp

983209 SAP AG 1999

Use the recording function in the LSMW to create

a batch input session from the data in the eternal

s(stem

Use the TA recorder to create (our o)n data

transfer programs

Anal(e programs that )or+ )ith the batch input

or call transaction

Integrate the TA recorder programs into the

DW

At the conclusion of this unit (ou )ill be able to$

The TA Recorder$ Unit b-ecties

copy SAP AG BC420 12-2

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 388

0

983209 SAP AG 1999

ourse erie) Diagram

Datenbernahme

D Wor+bench

LSM Wor+bench

Principles of Standard

Data Tansfer

D i r e c t I n p u t

API

T A R

e c o r d e r

ourse erie)

a t c h

I n p u t

a l l T r a n s a c t i o n

1DI

asics

2

3

4

5 606

60

7

66

64

66

66

6amp

6

amp

6amp6amp

6

copy SAP AG BC420 12-3

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 488

04

983209 SAP AG 1999

The TA Recorder

Principles of RecordingPrinciples of Recording

Recording )ith the LSMWRecording )ith the LSMW

Using the TA Recorder Using the TA Recorder

Principles of I and TPrinciples of I and T

Integrating the TA Recorder into the DWIntegrating the TA Recorder into the DW

copy SAP AG BC420 12-4

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 588

02

983209 SAP AG 1999

erie) of Transaction Recorder

Flat SAP

Structure

SAP Record

Layout

Structure

SAP IDoc

Structure

API

If the SAP standard program does not provide the functions you need for data transfer you can use

the transaction record

Note For data transfer the transaction (TA) recorder reuires a fat fie that is a fie $ithout any

hierarchy or sustructures

copy SAP AG BC420 12-5

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 688

08

983209 SAP AG 2001

Uses of the TA Recorder

Flat SAP

Structure

atch

Input

all

Transaction

The TA ampecorder enaes you to transfer data into amp using atch input or ca transaction

The TA ampecorder can ony $or $ith a fat structure Fies $ith different record structures (for

eampe header structure) cannot e used

The TA ampecorder is used in the +S- to create recordings of transactions atch input sessions can

e created from the recordings

The TA ampecorder can itsef eecute a data transfer from the recording using atch input or ca

transaction

copy SAP AG BC420 12-6

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 788

03

983209 SAP AG 1999

The Recording

Recording

Screen

9ield alue

9ield nameModule pool

Transaction

Screen

111

Screen

106

Screen

130

The TA ampecorder can record transactions The recorder must e activated efore the transaction is

processed Then you can run the transaction as though you $ere processing it onine

After the transaction has finished the recording $i contain a the screen numers fied names

fied vaues and the associated modue poo and transaction code

copy SAP AG BC420 12-7

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 888

05

983209 SAP AG 1999

hanging ustomer Data$ Initial Screen

Vendor

Company code

Z-88-10000

Screen

106

Genera daa9ield ontents

BCC$Samp $SZAVBCamp(Camp )00

02-($++ -88-10000

02-0110

02-0130

$SZAV

9ield ame

Transaction 9D0amp

Addre

In the aove eampe the transaction Change customer F01 is recorded

In addition to the screen fieds the fieds 2324ampS5amp and 2356257 are aso

automaticay recorded

Note

You must change the field values for all the fields required later for the transfer For the

recording a change can simply mean overriting one single character in a field ith the

same character

f fields are to e filled using S$amp$ parameters the value must also e changed

(ith online transactions screen sequences may appear that are different than in therecording

copy SAP AG BC420 12-8

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 988

07

983209 SAP AG 1999

hanging ustomer Data$ Address

ustomer 5560000

+ame

Searc erm

Addre

Screen

111

9ield ontents

BCamp(Camp $PABCS$BSC SAPSZA1 0300ASS

BCS$BSC SAPSZA1 0301Camp$

BCC$Samp A1AA-amp$S+$1

A1AA-S Garden Sree

A1AA-amp$S+$1 02105

9ield ame

If there is a suscreen on the screens this is automaticay recorded In the recording the fied

23S4S2amp77N containing the name of the suscreen appears

-ith customer master data the address is a suscreen area The centra address management is

integrated here A the address input fieds are dispayed on one suscreen

2entra address management is ony used if you specificay seect this option on the initia screen

copy SAP AG BC420 12-9

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 1088

060

983209 SAP AG 1999

Results of the Recording

Recording

SAPM90ampD 0608

DltURSR R90ampD=UR

Dlt=D1 gt00

R90ampD=UR 5560000

R90ampDD0660

US1ltA

SAPM90ampD 0666

Dlt=D1 UPDA

DltSUSR SAPLSA6 000ADDR1SS DltSUSR SAPLSA6 006UTRltSR11

DltURSR SA6ltD0600T1LltUM1R

ADDR6ltDATASTR11T 4 Barden Street

ADDR6ltDATAPSTltD1 0amp602

ADDR6ltDATAIT6 oston

SA6ltD0600T1LltUM1 8638257755

The resut of the recording is a ist of a the fieds and fied vaues that $ere changed in the

recording

copy SAP AG BC420 12-10

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 1188

066

983209 SAP AG 1999

Special Recording 9ields

9unction code triggered on

this screen

9ield name )here cursor

)as last positioned on the

screen

Comer

Company code

Z-88-10000

Genera daa

Dlt=D1

DltURSR

uring a recording the foo$ing additiona fieds are automaticay recorded

The BDC_OKCODE fied contains the function code triggered on the screen

The BDC_CURSOR fied contains the fied name of the ast fied the cursor $as positioned in

efore eiting the screen

copy SAP AG BC420 12-11

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 1288

06amp

983209 SAP AG 1999

Determining the 9ield ame

Technical info

Screen field

R90ampD =UR

Comer

Company code

Z-88-10000

Genera daa

96help

Sa

Program SAPM90ampDScreen number 608

The information recorded in the TA recorder can aso e dispayed onine for each transaction

To find out the current modue poo name and the screen numer choose Systemrarr Status from the

menu

To determine the fied name pace the cursor on a fied and seect F8 hep The name of the screen

fied can e found under technical information

copy SAP AG BC420 12-12

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 1388

06

983209 SAP AG 1999

Subscreens

Comer Z-88-10000

+ame

+ame

ADDR6ltDATAAM16

DltSUSR

Information$

ode poo name

Screen nmer

Screen name

Some screens contain suscreen areas

To determine the fied name pace the cursor on the fied and choose F1 The name of the screen

fied is specified under Technical info

copy SAP AG BC420 12-13

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 1488

064

983209 SAP AG 2001

Tabstrips

$er Roberts

1ample$ User Profile Defaults

Sar men +

oon anae

ampp dece Pr1

ParameerDefaults

DltSUSR

USD19AULTSSPLD

The tastrip eement sho$n is used on the aintain User rofile (5$n data) screen

4nder the tastrip tite Defaults the user can set various vaues such as the defaut printer

The user profie are user9dependent settings (as the name impies)

copy SAP AG BC420 12-14

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 1588

062

983209 SAP AG 1999

Step Loops and Table ontrols

1ample$ an+ Details

Comer

ntr( an+ +e( Account

08154711

123456789

Z-00-12345

an+ Details

00708155546344536

Banlt daa

==A=C06)

==A=C0amp)

Step oops and tae contros are treated identicay for the recording

The fied names of the fieds isted are the same for every ro$

7ach ro$ contains a customers an detais The fieds must e accessed using an inde (this is

specified as an addition to the fied name for eampe 6N69AN6N(1) The inde must match

the ro$ numer

5ny the visie fieds on a screen can e fied $ith data If some fieds are ony visie after paging

the paging must e recorded as $e This means that for the recording you must eecute a the steps

in the onine transaction

For eampe age on $oud e eecuted using the function code 1 (Paging icons)

Paging to the end of a ist 1Page up 11

lto to first page 18

copy SAP AG BC420 12-15

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 1688

068

983209 SAP AG 2001

Recording Buidelines

Test the transaction before recording

Start the recording

hange field alues onl( for fields

releant to the recording

As of 48 all filled fields are recorded

Transaction must be properl( eitedCSA1

Use of scroll bars cannot be recorded

Specia recording notes

F8 F and your o$n F8 and F hep (Pamp527SS 5N =7+P9amp7gt47ST Pamp527SS 5N A+479

amp7gt47ST) are not recorded This aso appies to a commands under the System and $el

menus aues for defaut variants ( transaction variants) are not incuded

7rror and $arning diaogs are not recorded 5ny the 56 code and the fied contents reuired for

further processing on the current screen are recorded

Note uring recording the data entered is $ritten to the dataase

copy SAP AG BC420 12-16

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 1788

063

983209 SAP AG 2001

1n-o( SAP ontrols and Data Transfer

bull SAP Picture ontrolbull SAP ETML ie)er ontrol

bull SAP Tet 1dit ontrol

bull AL Brid ontrol

bull SAP Tree ontrol

bull

ranch 6

ranch amp

Root

These and other controls do not support batch input$

Root

ranch amp

ranch amp6

The ne$ 7noy SAP contros deveoped for ampeease B do not support atch input or ca

transaction

=o$ever tae contros and tastrips do support atch input

copy SAP AG BC420 12-17

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 1888

065

983209 SAP AG 1999

The Transaction Recorder

PrinciplesPrinciples

Recording )ith the LSMWRecording )ith the LSMW

Principles of atch Input and all TransactionPrinciples of atch Input and all Transaction

Integrating the TA Program into the DWIntegrating the TA Program into the DW

Using the TA Recorder Using the TA Recorder

copy SAP AG BC420 12-18

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 1988

067

983209 SAP AG 1999

Session

generator

Recording Using the LSMW

-ith the +S- you can create your o$n recordings

The +S- uses the standard TA recorder here yet evauates the recording itsef The information

from the recording is used to create atch input sessions

The created atch input session can e processed as usua $ith the atch input monitor

Note As $ith the standard procedure it is euay important that the data is converted

copy SAP AG BC420 12-19

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 2088

0amp0

983209 SAP AG 1999

reating Recording

Admnraon

ecordn

Goo

ame of recording

Description

)ner

ame of transaction

Start recording

lto into the +S- and seect the menu path ampoto (Recorings An overvie$ of a previousy

created recordings for your proect are dispayed To start a ne$ recording seect Create

To create a recording you must define the name the description and the o$ner

7nter the name of the transaction you $ant to record

7ecute the transaction and compete it propery

Note ampecordings are assigned to ony one proect 9 so the name of the recording must e uniue

copy SAP AG BC420 12-20

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 2188

0amp6

983209 SAP AG 1999

hanging ustomer Data$ Initial Screen

9ield ontents

BCC$Samp $SZAV

BCamp(Camp )00

02-($++ -88-10000

02-0110

02-0130

$SZAV

9ield ame

Comer

Company code

Z-88-10000

Genera daa

Comer Z-88-10000

+ame

9ield ontents

BCamp(Camp $PA

BCS$BSC SAPSZA1 0300ASS

BCS$BSC SAPSZA1 0301Camp$

BCC$Samp SZA10100-+$B

A1AA-S Garden Sree

A1AA-amp$S+$1 34

A1AA-PampSCamp1 02105

9ield ame

Screen

111

Screen

106

In the aove eampe the transaction Change customer F01 is recorded

Note

You must ma)e some modification to the field values for all the fields you ant to capture

for the data transfer For the purposes of recording a change can simply mean overriting

one single character in a field ith the same character

ven if fields are to e filled using S$amp$ parameters the values must still e changed on

the screen in order to capture them

(ith online transactions screen sequences may appear that are different than in the

recording

copy SAP AG BC420 12-21

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 2288

0ampamp

983209 SAP AG 1999

Results

RecordingRecording R1lt6 Demolt6

9D0amp hange customer Caccounting

SAPM90ampD 0608

DltURSR R90ampD=UR

Dlt=D1 gt00

R90ampD=UR 5560000

R90ampDD0660

US1ltA

SAPM90ampD 0666

Dlt=D1 UPDA

DltSUSR SAPLSA6

DltSUSR SAPLSA6

DltURSR SA6ltD0600T1LltUM1

ADDR6ltDATASTR11T 4 Barden Street

ADDR6ltDATAPSTltD1 0amp602

ADDR6ltDATAIT6 oston

SA6ltD0600T1LltUM1 8638257755

The resuts of the recording using the +S- are dispayed in a tree structure

After the recording has finished you can edit it Cou can deete fieds or add ne$ ones

copy SAP AG BC420 12-22

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 2388

0amp

983209 SAP AG 1999

Assigning 9ield ames

Recording R16 Demolt6

Dlt=D1 UPDA

DltSUSR SAPLSA6

DltSUSR SAPLSA6

DltURSR SA6ltD0600T1L

ADDR6ltDATAAM16 Lisa Eofmeister

ADDR6ltDATAPSTltD1 0amp602

ADDR6ltDATAIT6 oston

ame

+ame

ecrpon

e=a ae

A1AA-+A1

A1AA-+A1

Comer name

a o=meer

Screen =ed

ustomer name

double clic+

Cou can assign names for each recorded fied The specia fieds (2356257 2324ampS5amp

and 23S4S2amp77N) are not incuded here Cou can choose the fied names -hen the atch

input session is created the contents of these fieds are assigned to the target fieds specified in the

eft coumn

Functions

efaut Assigns to the fied names of the underying target fied and its fied description

ampeset eetes fied name and fied description

oue cic 7dits fied name fied description and defaut vaue

Note Cou can use fied names more than once =o$ever the fied name is ony avaiae once in thefied mapping For this reason it is not practica to use fied names more than once

For a those fieds for $hich you do not assign a name the defaut vaue is used $hen the atch

input session is created These defaut vaues can e seen as constants This is especiay usefu for

chec oes (for eampe 08 vie$ seection)

The +S- supports automatic fied mapping Source fieds and target fieds can e assigned to each

other automaticay The fieds are assigned to the corresponding fieds of the same name Therefore

the fied names of the source structure shoud e given the same or simiar names as the fied names

in the target structure

copy SAP AG BC420 12-23

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 2488

0amp4

983209 SAP AG 2001

Addinggtremoing screen fields

Repeating recording

9or identical field names the name and description are

assigned automaticall(

1diting Recording

02-($++

(+A1-A+

(+A1-+A1

(+A1-Samp

(+A1-+A2

(+A1-SAS

Comer accon nmer

e

+ame 1

Sor =ed

+ame 2

Sree

Selection of all

aailable screen

fields

Cou can ater add ne$ screen fieds if you need to 6eep in mind that fieds shoud ony e added in

paces $here they are aso provided on the screen other$ise you $i get an error $hen the I

session is processed

After saving you $i get the message The data has een saved successfuy No$ the recordings

are avaiae for the oect attriutes

If you repeat the recording you can record a ne$ screen seuence $ith ne$ fieds Provided that the

fied names (eg 6NA89NA78) are identica the names and descriptions are automaticay

assigned

copy SAP AG BC420 12-24

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 2588

0amp2

983209 SAP AG 1999

b-ect T(pe and Import Method$ Recording

Standard atch Input gt Direct Input

atch Input Recording

API

IDoc

ampgtec ype ) mpor meod

Bac np recordn

ecordn ec1

The recording is no$ avaiae $ith the oect attriutes

Net you create a proect or su9proect in the +S- and specify process the data transfer

Cou eecute the data transfer as in the standard system

efine the source fieds and structures

efine the fied mapping

ampead and convert the data

2reate and import a atch input session

copy SAP AG BC420 12-25

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 2688

0amp8

983209 SAP AG 1999

The Transaction Recorder

PrinciplesPrinciples

Recording )ith the LSMWRecording )ith the LSMW

Principles of atch Input and all TransactionPrinciples of atch Input and all Transaction

Integrating the TA Program into the DWIntegrating the TA Program into the DW

Using the TA Recorder Using the TA Recorder

copy SAP AG BC420 12-26

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 2788

0amp3

983209 SAP AG 1999

Transaction Recorder

Online

Transaction

RecordingTransfer Program

T

Included in the Batch Input Monitor

Cou use the transaction recorder to record transactions and then use the transaction recording to

generate a transfer program The program ao$s you to transfer data using either atch input or ca

transaction

copy SAP AG BC420 12-27

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 2888

0amp5

983209 SAP AG 1999

hanging ustomer Data$ Initial Screen

9ield ontents

BCC$Samp $SZAV

BCamp(Camp )00

02-($++ Z-88-10000

02-0110

02-0130

$SZAV

9ield ame

Comer

Company code

Z-88-10000

Genera daa

Comer Z-88-10000

+ame

9ield ontents

BCamp(Camp $PA

BCS$BSC SAPSZA1 0300ASS

BCS$BSC SAPSZA1 0301Camp$

BCC$Samp SZA10100-+$B

A1AA-S Garden Sree

A1AA-amp$S+$1 34

A1AA-PampSCamp1 02105

9ield ame

Screen

111

Screen

106

In the aove eampe the transaction Change customer F01 is recorded

copy SAP AG BC420 12-28

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 2988

0amp7

983209 SAP AG 2001

hange Debitor$ Pa(ment Transactions C6

Banlt dea

Screen

10

9ield ontent

BCC$Samp (+B(-BA+(+01

BCamp(Camp BA+((+B(-BA+(S01

(+B(-BA+(01 12345679

(+B(-BA+(+01 22222222

Debitor 5560000

9ield ame

Inde

copy SAP AG BC420 12-29

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 3088

00

983209 SAP AG 1999

hanging ustomer Data$ Pa(ment Transactions Camp

Addre

an+ countr( US

an+ code 6amp42837

Banlt dea

ustomer 5560000

9ield ontents9ield ame

BCC$Samp (+A1-(+ZA

BCamp(Camp $PA

(+B(-Z01

Screen

10

Screen

100

SAPLBA

9ield ontents

BCC$Samp B+(A-BA+(A

BCamp(Camp +

B+(A-BA+(A +aona Banlt

9ield ame

In different transactions the modue poo may change This is the case $ith for eampe customer

master data The TA recorder records modue poo changes automaticay

copy SAP AG BC420 12-30

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 3188

06

983209 SAP AG 1999

Eierarch( Displa( of the Recording

02amp

02

SAP02 0106

BCC$Samp 02-0130

BCamp(Camp )00

02-($++ -88-10000

02-0110

02-0130

SAP02 0111

BCamp(Camp V

BCC$Samp A1AA-amp$S+$1

A1AA-S Garden Sree

Recording

-ith the TA recorder the resuts are aso a ist in a hierarchy dispay =o$ever you cannot assign

your o$n fied names as you can in the +S-

copy SAP AG BC420 12-31

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 3288

0amp

983209 SAP AG 1999

Recording erie)

Recording

Transfer program

9unction module

ontains onl( the data

from the recording

Test data

Test

reate

reate

reate

reate

1dit hange recording

Process recording

Cou can edit the recording as needed

The recording can e tested and eecuted again The screens are run through in the same $ay as in

the recording

The recording can then e used to create

atch input sessions

Test data

ata transfer programs $ith atch input or ca transaction

Function modues

copy SAP AG BC420 12-32

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 3388

0

983209 SAP AG 1999

1 02 BS

2 SAP02 106

3 BCC$Samp $SZAV

4 BCamp(Camp )00 5 02-($++ -88-10000

6 02-0110

7 02-0130

8 $SZAV

9 SAP02 111

10 BCamp(Camp V

11 BCC$Samp A1AA-amp$S+$1

12 A1AA-S Garden Sree

Program Screen St 9ield ame 9ield alue

Recording 1ditor

Recording

Add gt delete lines 9ormat chec+

Import gt eport of recording

In the editor you can add or deete ines Cou can aso change the contents of individua ines

-ith the function Chec) you can specify $hether the edited version of the recording sti has the

correct synta

Cou can aso eport import recordings to from a seuentia fie

After editing save the recording changes

copy SAP AG BC420 12-33

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 3488

04

983209 SAP AG 1999

Recording Seeral Transaction Runs

RecordingF

Directl( after the first recordingG or

In the displa( mode of the recording

In this step you can record additiona transactions and add additiona transaction runs to the

recording

Cou can record the additiona transactions directy after a recording or in the edit screen of a

recording

copy SAP AG BC420 12-34

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 3588

02

983209 SAP AG 1999

1ditor$ Importing and 1porting Recordings

6 T 9D0amp S

amp SAPM90ampD 608

DltURSR

4

2

8 SAPM90ampD 666

60

66

Program Screen St 9ield name 9ield alue

cempA

e name

aa =orma

cemp

A

e name

aa =orma

1port

Import

Presentation Serer

If the editor functions in the systems do not provide a the functions you need you can do$noad the

recording to your presentation server using the Eort function and then edit the recording using a

P2 editor

Cou use the Import function to import the data ac into the amp System ae sure the fie is sti in

the correct format

copy SAP AG BC420 12-35

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 3688

08

983209 SAP AG 1999

Processing the Recording

Recording

Process )ith ALL TRASATI

Parameer

Proce mode$pdae mode

CA mode

e=a e

Con a=er comm

+o a B eon

nd +o a B mode

A

A

T

The recording can e eecuted directy The data from the recording is used and the transaction is

processed $ith ca transaction

2a transaction provides a range of options for caing appication transactions $hich are discussed

on the foo$ing t$o pages

copy SAP AG BC420 12-36

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 3788

03

983209 SAP AG 1999

Process mode

Update mode

ATT mode

Processing Recording )ith T 6

A

1

Displa( all screens

Displa( errors onl(

o displa(

L

S

A

Local

S(nchronous

As(nchronous

A

o ATT

ATT )ithout indiidual screen control

ATT )ith indiidual screen control

Processing mode

=ere you can specify the processing mode 9 it is the same as the processing mode for atch input

4pdate mode

=ere you can specify the update mode For more information see the unit ca transaction

2ATT mode

=ere you can mae specia settings if you $ant to test the recording under 2ATT conditions (ony

necessary for 2ATT runs) Specia functions are caed in the 2ATT too for each screen at the end of

P5 and at the start of PAI

copy SAP AG BC420 12-37

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 3888

05

983209 SAP AG 1999

Default sie

ont after commit

ot a I session

1nd$ ot a I mode

Processing Recording )ith T amp

The screen standard sie is used for the

processing

ommit )or+ does not end the processing

o I mode is actie The transaction )ill run

through as in online

I mode is selected nce the data in the D

table is processedG the I mode is set to inactie

Standard siDe

If you seect this the screens are processed in the standard siDe in the foreground (in foreground or

dispay errors ony) Note the standard siDe is a$ays used for acground processing

Further after commit

The first commit $or in a transaction does not ead to the end of the recording

Note A atch input transaction is ended $ith the first commit $or

No I mode

The system fied SC9INPT is not set (SC9INPT E ) So transactions are run through as in onine

7nd No I mode

5ny use if you choose the processing mode 7 (dispay errors ony) Then the transaction is processed in the acground in atch input mode and if there is an error the screens run through in

the foreground

copy SAP AG BC420 12-38

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 3988

07

983209 SAP AG 1999

I Mode

atch input

mode

nline

Some transactions behae differentl( in batch input mode

than in online Cbatch input capabilit(

atch input mode sets the s(stem field SIPT H

Not every transaction can run the same onine and in atch input mode The transaction must decide

itsef $hether it is caed onine or in atch input mode

The system sets the system fied SC9INPT E G if the atch input mode is active (this aso appies

to ca transaction) From this system fied the transaction can identify $hether to run onine or in

atch input mode

copy SAP AG BC420 12-39

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 4088

040

983209 SAP AG 1999

reating a Session 9rom the Recording

Recordingnl( contains the data

from the recording

Seon name 02amp

Aoraon ampBS(eep eon

oclt dae 10102000

Cou can create a atch input session directy from the recording that you can then process using the

atch input monitor

copy SAP AG BC420 12-40

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 4188

046

983209 SAP AG 1999

reating Test Data

Test Data

Recording

ranranpBC420AAe name

The file onl( contains the data from the recording

Rgt

Application Serer

Structure

Cou can create a fie from the recordingH the fie $i contain a the fieds from the recording The

fieds are added to the fie $ith the ength you specified in the definition

The fied order corresponds to the order in the recording overvie$ Technica fieds

(2356257 2324ampS5amp and so on) are incuded

The data can ony e stored on the appication server If you do not specify a path the fie is stored in

the $or directory of the appication server

If the specified test fie aready eists the ne$ data record is added to this fie

copy SAP AG BC420 12-41

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 4288

04amp

983209 SAP AG 1999

ed conen

reating a Program

Recording

ZBC420ampProram name

Transfer Program

e daa

ead =rom =e

ran=er =rom recordn

reate

9ile nameTest data

ranranpBC420AA

Cou can generate a program from the recording

In the foo$ing diaog o enter a program name In addition you can choose the type and method

for fiing the maintained fied contents from the recorded screens

4se the vaues used for the recording If you reuire feie data transfer you $i have to modify

this program ater

ParameteriDe the input vaues and read these vaues from a fie A data structure is created for

parameteriDationH the data records are read from an eterna fie into this data structure The

program assumes the fie $as taiored to this data structure

If you have decided to parameteriDe the input vaues you shoud aso create a test fie during

generation To do this seect the checo and enter a name for the fie

The attriute maintenance screen of the AAP editor appears aintain the attriutes and save the

program

copy SAP AG BC420 12-42

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 4388

04

983209 SAP AG 1999

Program 9unctions

Online

transaction

Transfer program

To

error

1rror

ption 6ption ampFlat SAP

structure

Monitor

Cou have no$ generated a data transfer program for importing data into the amp System The

program can eecute the data transfer using atch input or ca transaction

If you choose option 1 and there is an error the data record is paced into a atch input session

copy SAP AG BC420 12-43

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 4488

044

983209 SAP AG 1999

Benerating 9unction Modules

Recording

Zcreaedeor ncon mode

ncon rop

Sor eD

ZBC420

Creae comer

9unction module

nl( one data record can be processed at a time

In the net diaog o you can generate a function modue a function group and short tet from the

recording The function modue is automaticay created in the function group

copy SAP AG BC420 12-44

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 4588

042

983209 SAP AG 1999

9unction of 9unction Modules

Online

transaction

To

error

1rror

ption 6 ption amp

9unction module

Import

Parameter 1port

parameter

Tables

M1SSTA

Monitor

S$BC

Import interface

The import interface consists of a technica part and the fieds from the recording (A parameter is

created for each input fied of the recorded transactions)

7port interface

Simpy consists of the parameter S4amp2 The function modue $i return a vaue in the system

fied SC9S4amp2 after caing ca transaction This return vaue is set to Dero if the data record has

een correcty processed (5ny appies to 2T)

If a session is created you $i e notified $hether the data record coud e paced into the session

Tae interfaceThis is used ony if the function modue $ors $ith ca transaction The tae contains a the

system messages

copy SAP AG BC420 12-45

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 4688

048

983209 SAP AG 1999

Import Interface of 9unction Module

$

Technical

fields

Data

fields

BI session or CALL TRANSACTION

Processin $ode

pdate $ode

a$e oamp BI session iamp (T initial)

Bacround user iamp (T initial)

Delete session aampter processin

Loc date oamp session

ODATA indicator

TU

MD1

UPDAT1

BRUP

US1R

=11P

ELDDAT1

DATA

Cou can use parameter 2T4 to specify $hether the function modue creates a atch input session

(2T4 E ) or updates the data record directy using ca transaction (2T4 E G)

The other parameters are fied as for a atch input session header

Note 7very time the function modue is caed a atch input session is created

If the session is to contain severa transactions proceed as foo$s

ltenerate the transaction severa times This can e achieved y recording the transaction again The

function modue interface $i then contain more than one transaction -hen the function modue is

caed severa transactions can e generated for each session

copy SAP AG BC420 12-46

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 4788

043

983209 SAP AG 1999

The Transaction Recorder

PrinciplesPrinciples

Recording )ith the LSMWRecording )ith the LSMW

Principles of atch Input and all TransactionPrinciples of atch Input and all Transaction

Integrating the TA Program into the DWIntegrating the TA Program into the DW

Using the TA Recorder Using the TA Recorder

copy SAP AG BC420 12-47

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 4888

045

983209 SAP AG 1999

Benerated Program

9unction modules DltP1ltBRUP

DltIS1RT

DltLS1ltBRUP

AAP Program

Define structure of

data in seJuential

fileDefine D

table

pen seJuential file

pen I session

Read data recordCseJuential file

9ill D table

9ill I session gtALL TRASATI

Last data record K

lose I session

lose seJuential file

The generated program has the structure dispayed aove It uses the standard function modues for

creating atch input sessions

copy SAP AG BC420 12-48

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 4988

047

983209 SAP AG 1999

Structure of the Benerated Program

Benerated part

Define D

table

pen seJuential file

pen I session

Read data record

9ill D table

9ill I session gtALL TRASATI

Last data recordK

lose I session

lose seJuential file

Include DR16

Define filestructure

P1ltDATAS1T

P1ltBRUP

DltDPR

Dlt9I1LD

DltTRASATI

LS1ltBRUP

LS1ltDATAS1T

The generated program consists of t$o parts 9 a generated part and the incude 2amp72G8 The

incude is provided in the standard system

The incude contains the definition of the reuired 2 tae and a further seven suroutines These

suroutines eecute the foo$ing functions

5pen and cose fie

5pen and cose session

Fi 2 tae

Fi session

The generated part is the main program and cas the reevant suroutines A structure is aso

generated in the generated part to read the eterna data into the fie

See the Appendi for more information on the 2amp72G8 program

copy SAP AG BC420 12-49

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 5088

020

983209 SAP AG 1999

Structure of D Table

PRBRAM DPR D1BI 9AM 9ALPRBRAMPRBRAM DPRDPR D1BID1BI 9AM9AM 9AL9AL

SAPM90ampD 0602

R90ampD=UR 600000

R90ampDU=RS 0006

R90ampD=T=D =UA

SAPM90ampD 0660

=A6AM16 Smith

=A6PSTL 87000

=A6LAD6 US

=A6SPRAS 1

SAPM90ampD 06amp0

=A6ST1B US6amp428357DDATA

PRBRAM

DPR

D1BI

9AM

9AL

EAR

UM

EAR

EAR

EAR

40

4

6

6amp

6amp

D Module pool

D Screen number

D Start of screen

D 9ield name

D 9ield contents

9ield ame T(pe Length Short Tet

AAP Dictionar(

The 2 tae has the same structure as in a standard transfer

copy SAP AG BC420 12-50

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 5188

026

983209 SAP AG 1999

Read Structure

Recording

DATA BEGIN OF record data element BUKRS bukr$amp data element KTOKD ktokd$amp data element NA(EG) name$+amp data element SORT ortl$ampEND OF record-

record

Automaticall( generated

from recording

The structure of the fie is automaticay generated and is a$ays defined $ith the name amp725amp

The generated structure a$ays has the same ayout 7ach fied is defined y t$o generated ro$s

The first ro$ is a$ays a comment ro$ containing the tet J data eement and the data eement of

the screen fied from the recording In the net ro$ the fied itsef is defined $ith the name of the

data eement foo$ed y a three9digit position numer $hich specifies the ocation in the structure

The ength of the fied is set y the ength of the data eement If a fied is not defined through a data

eement the system uses the ength of the screen fied

copy SAP AG BC420 12-51

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 5288

02amp

983209 SAP AG 1999

pening and losing the 9ile

P1ltDATAS1T

LS1ltDATAS1T

FOR( oendataet USING dataet-O)EN DATASET dataet IN TET (ODE-

IF S01SUBR2 34 - 5RITE 6 te7t1e S01SUBR2-STO)-

ENDIF-

ENDFOR(-

FOR( cloedataet USING dataet-2OSE DATASET dataet-

ENDFOR(-

Include

DR16

The suroutine 5P7N3ATAS7T opens the seuentia fie

The suroutine 2+5S73ATAS7T coses the seuentia fie

copy SAP AG BC420 12-52

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 5388

02

983209 SAP AG 1999

9unction Modules for I Program

lient

Session name

Eold date

=eep session

D user name

RecordK

LI1T

BRUP

ELDDAT1

=11P

US1R

R1RD

DltP1ltBRUPDltP1ltBRUP

Transaction code

D table

TD1

DPRTA

DltIS1RTDltIS1RT

DltLS1ltBRUPDltLS1ltBRUP

pen Isessionpen Isession

Insert data for

transactions

Insert data for

transactions

lose I

session

lose I

session

The foo$ing function modues are provided for creating atch input sessions (function group

S2)

235P7N3ltamp54P

2reates a ne$ session and contains genera data for the $hoe session

23INS7ampT

Inserts a the data for a transaction into the session The transferred interna tae $ith the

structure 2ATA must contain a the data reuired for fuy processing the transaction

232+5S73ltamp54P

2oses the session after a the data has een inserted As soon as the session has een cosed it

can e processed

The interna tae $ith the structure 2ATA can ony contain atch input data for one singe

transaction run So the individua transactions are inserted into the atch input session in a oop

using severa 23INS7ampT cas

copy SAP AG BC420 12-53

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 5488

024

983209 SAP AG 2001

9unction Module DltP1ltBRUP

ALL 9UTI DltP1ltBRUPALL 9UTI DltP1ltBRUP

1PRTIB

LI1T client

BRUP session name

ELDDAT1 loc+ date

=11P delete flag

US1R bdc user name

R1RD recording

IMPRTIB

NID internal session +e(

11PTIS

1PRTIB

LI1T client

BRUP session name

ELDDAT1 loc+ date

=11P delete flag

US1R bdc user name

R1RD recording

IMPRTIB NID internal session +e(

11PTIS

-ith the function modue 235P7N3ltamp54P you can open a atch input session

The foo$ing parameters are mandatory

2+I7NT (cient)

ltamp54P (session name)

4S7amp (user name)

Note The 4S7amp must a$ays e specified This user name is reuired for processing the session

in atch mode

The foo$ing parameters are optiona

=5+AT7 specifies the eariest date on $hich the session can e started677P fag specifies $hether session shoud e deeted after it has een successfuy processed The

677P fag is ignored if the session contains errors

677P E K K means deete the session after processing (defaut vaue) H

677P E KGK means do not deete session

amp725amp E KGK ao$s you to create a recording instead of a I session

If gtI is specified the function modue returns the interna session ey This is needed to e ae to

differentiate sessions that have the same name

-ith 7G27PTI5NS you get various return vaues that can e ueried $ith SC9S4amp2

Note In onine mode the onine user is used for the authoriDation checs regardess of the user

name specified

copy SAP AG BC420 12-54

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 5588

022

983209 SAP AG 1999

Subprogram P1ltBRUP

P1ltBRUP

FOR( oen8rou-IF e9on -

2A FUN2TION BD2O)ENGROU) E)ORTING 2IENT lt1mandt GROU) 8rou USER uer KEE) kee

=ODDATE gtolddate-

ENDIF-ENDFOR(-

Include

DR16

The suprogram 5P7N3ltamp54P opens the atch input session

copy SAP AG BC420 12-55

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 5688

028

983209 SAP AG 1999

9unction Module DltIS1RT

ALL 9UTI DltIS1RTALL 9UTI DltIS1RT

IMPRT

TD1 Transaction code

PSTltLAL Update locall(

PRITIB print list

TAL1S DPRTA bdclttable

11PTIS

IMPRT

TD1 Transaction code

PSTltLAL Update locall(

PRITIB print list

TAL1S DPRTA bdclttable

11PTIS

-ith the function modue 23INS7ampT you can add transaction data to the session

Cou need an interna 2 tae to transfer the data

The foo$ing parameters are mandatory

T257 Transaction code

CNPamp5TA 2 tae

The foo$ing parameters are optiona

P5ST3+52A+ E KGK activates oca updating This means that the data to e updated is ept in the

appication server and updated in the ast step of the transaction This does not invove the update

process (For more information see course 28 Programming ataase 4pdates)

PampINTINlt E KGK 9 ists processed in I $i e printed immediatey -ith 7G27PTI5NS you get various return vaues that can e ueried $ith SC9S4amp2

copy SAP AG BC420 12-56

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 5788

023

983209 SAP AG 1999

Subprogram DltTRASATI

DltTRASATI

FOR( BD2TRANSA2TION USING tcode-

IF e9on -2A FUN2TION BD2INSERT

E)ORTING T2ODE tcode TABES D0N)ROTAB bdcdata-

ESE-

ENDIF-ENDFOR(-

T

Include

DR16

The suprogram 23TampANSA2TI5N moves the fied 2 tae either to a atch input session

or uses ca transaction to import the data into the system 5n the seection screen you can specify

$hether you $ant to create a session or you $ant to use ca transaction to process the data directy

The S7SSI5N fied is then set according to your seection

copy SAP AG BC420 12-57

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 5888

025

983209 SAP AG 1999

9unction Module DltLS1ltBRUP

ALL 9UTI DltLS1ltBRUP

11PTIS

TltP1 6

NU1U1lt1RRR amp

-ith the function modue 232+5S73ltamp54P you can cose a atch input session

In 7G27PTI5NS you get various return vaues that can e ueried $ith SC9S4amp2

copy SAP AG BC420 12-58

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 5988

027

983209 SAP AG 1999

Subprogram LS1ltBRUP

FOR( cloe8rou-IF e9on -cloe batcgt 9nut 8rou

2A FUN2TION BD22OSEGROU)-

ESE-IF e8rouoened -

2A FUN2TION BD22OSEGROU)-

ENDIF-ENDIF-

ENDFOR(-

LS1ltBRUPlose session

lose error session

Include

DR16

The suprogram 2+5S73ltamp54P coses the atch input session The suprogram differentiates

et$een a norma I session (S7SSI5N E G) and a session opened $hen ca transaction

encountered an error (73ltamp54P35P7N7 E G)

copy SAP AG BC420 12-59

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 6088

080

983209 SAP AG 1999

Subprograms DltDPRG Dlt9I1LD

DltDPR

Dlt9I1LD

FOR( bdc9eld USING nam al-IF al 34 nodata-2EAR bdcdata- bdcdata1nam nam- bdcdata1al al- A))END bdcdata-ENDIF-

ENDFOR(-

FOR( bdcdltnro USING ro8ram dltnro- 2EAR bdcdata-Bdcdata1ro8ram ro8ram-Bdcdata1dltnro dltnro-Bdcdata1dltnbe89n - A))END bdcdata-ENDFOR(-

Include

DR16

The incude 2amp72GG contains t$o suprograms 23CNPamp5 and 23FI7+

Suprogram 23CNPamp5 fis the 2 tae $ith program names and screen numers

Suprogram 23FI7+ fis the 2 tae $ith fied names and vaues

7ach suprogram creates an entry in the 2 tae

copy SAP AG BC420 12-60

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 6188

086

983209 SAP AG 1999

9illing the D Table

erorm bdcdltnro u9n8 SA)(FD +- erorm bdc9eld u9n8 BD22URSOR RFD1BUKRS- erorm bdc9eld u9n8 BD2OK2ODE 6- erorm bdc9eld u9n8 RFD1BUKRS record1BUKRS- erorm bdc9eld u9n8 RFD1KTOKD record1KTOKD-

erorm bdcdltnro u9n8 SA)(FD -

erorm bdc9eld u9n8 BD22URSOR KNA1S)RAS- erorm bdc9eld u9n8 BD2OK2ODE 6- erorm bdc9eld u9n8 KNA1NA(E record1NA(E-

erorm bdc9eld u9n8 KNA1SORT record1SORT-

Recording Benerated automaticall(

from the recording

)ERFOR( bdcdltnro USING SA)(FD +- )ERFOR( bdc9eld USING BD22URSOR RFD1BUKRS-)ERFOR( bdc9eld USING BD2OK2ODE 6-)ERFOR( bdc9eld USING RFD1BUKRS record1BUKRS-)ERFOR( bdc9eld USING RFD1KTOKD record1KTOKD-

)ERFOR( bdcdltnro USING SA)(FD -

)ERFOR( bdc9eld USING BD22URSOR KNA1S)RAS-)ERFOR( bdc9eld USING BD2OK2ODE 6-)ERFOR( bdc9eld USING KNA1NA(E record1NA(E-

)ERFOR( bdc9eld USING KNA1SORT record1SORT- ---

The 2 tae is fied $ith data from the recording The suroutines 23CNPamp5 and

23FI7+ are used for this

The suroutines are caed in the reuired structure or seuence

copy SAP AG BC420 12-61

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 6288

08amp

983209 SAP AG 1999

erie)

SAPDatabase

SeJuential9ile

SAPDatabase

ALL TRASATIALL TRASATI

SeJuential9ile

ATE IPUTATE IPUT

D TableD TableD TableD Table

I Monitor

T

In contrast to atch input you can use ca transaction to directy pass data to the diaog interface

$ithout using a atch input session Cou use an interna tae (2 tae same structure and ayout

as atch input) to temporariy store your screen data Then you ca the desired transaction in your

program

Note 5n average the 2a Transaction method is 8 to times faster than using atch Input

copy SAP AG BC420 12-62

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 6388

08

983209 SAP AG 1999

all Transaction Program$ 1ample

RE)ORT abcbdcdcdeb9ct-

)ARA(ETERS d9mode DEFAUT A

udmode DEFAUT S-FOR( calltranact9on-2A TRANSA2TION FD

USING bdcdata (ODE d9mode

U)DATE udmode-

IF lt1ubrc NE - 5RITE 6 ---

ENDIF-ENDFOR(-

Screen

00

Screen

100

Screen

An additiona system ro area is added for the caed transaction The system uses this area for

processing the individua screens in the transactionH the data from the tae is added here After the

transaction is processed the second ro area is reeasedH the system continues processing in the first

ro area

Notes

In contrast to atch input there is no error ogging (error sessions) here For processing the caed

transaction the system uses the authoriDations of the user that caed the transaction The 2 tae

can ony hod data for one transaction run at a time efore another transaction is caed and its data

can e added you must eecute a amp7Famp7S= for the 2 tae

copy SAP AG BC420 12-63

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 6488

084

983209 SAP AG 1999

ALL TRASATI C6

RE)ORT 777-

2A TRANSA2TION FD USING bdcdata (ODE E-

Default for MD1 is A

2A TRANSA2TION 3tranact9oncode4 USING 3bdc1table4 C (ODE A E N C-

-ith the parameter 57 you can seect a specific dispay mode for processing the transaction The

foo$ing three modes are avaiae

A (ispay a)

If you eecute the program a the screens and a their data are dispayed This is the defaut vaue

for the 57 in 2A++ TampANSA2TI5N

N (ispay nothing)

The screens are not dispayed at a regardess of $hether any of them contained errors As soon as

the transaction has een fuy processed contro is returned to your program (The vaue of the

parameter 4PAT7 determines $hether dataase updates are eecuted or not)

7 (ispay errors ony)As soon as an error occurs in a screen the transaction is s$itched to dispay mode so that you can

correct the errors

These dispay modes are the same as those in the atch input session processing

copy SAP AG BC420 12-64

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 6588

082

983209 SAP AG 1999

RE)ORT 777-

2A TRANSA2TION FD USING BD2DATA U)DATE -

ALL TRASATI Camp

RE)ORT 777-

2A TRANSA2TION FD USING bdcdata U)DATE -

2A TRANSA2TION 3tranact9oncode4 USING 3bdc1table4 C (ODE A E N C U)DATE A S C -

Default for UPDAT1 is A

-ith the parameter 4PAT7 you can contro ho$ dataase updates arising from a transaction are

carried out There are three options

A (asynchronous updating) The caed transaction does not $ait unti the dataase has een

updated it simpy for$ard the updates to the SAP update service This usuay speeds up the 2T

program This processing mode is N5T recommended for arge data sets as the caed transaction

does not receive a competion message from the update modue

The caing 2T program therefore cannot te if the transaction has een successfuy competed Cou

shoud use the updating administration function (transaction S8) to determine $hether updating

$as terminated eary The error anaysis correction functions for are ess hepfu than $ith

synchronous updating

S (synchronous updating) -ith synchronous updating the caed transaction $aits unti a the

updates have een competed So processing is so$er than $ith synchronous updating The caed

transaction can ho$ever report any updating errors to the program $hich maes error

anaysiscorrection easier

+ (local updating) $ith oca updating the dataase is not updated in a separate process it is

updated in the caers process (see appication hep documentation for the AAP ey$ord S7T

4PAT7 TAS6 +52A+)

copy SAP AG BC420 12-65

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 6688

088

983209 SAP AG 1999

ALL TRASATI C

RE)ORT 777-DATA mtab T0)E TABE OF bdcm8coll-

2A TRANSA2TION FD USING bdcdata (ESSAGES INTO mtab-

2A TRANSA2TION 3tranact9oncode4 USING 3bdc1table4 C (ODE A E N C U)DATE A S C (ESSAGES INTO 3metab4 C -

7SSAlt7S specifies that a system messages that are output during the eecution of a 2A++

TampANSA2TI5N are $ritten to the interna tae L7SSTA The interna tae must have the

structure 2Slt25++

4nie the cassica atch input processing $ith sessions 2A++ TampANSA2TI5N does not offer any

specia processing procedures for transactions containing errors There are no restart functions for

transactions that contain errors or that cause updating terminations

copy SAP AG BC420 12-66

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 6788

083

983209 SAP AG 1999

ALL TRASATI C4

RE)ORT 777-DATA mltot T0)E ctuaram-

2A TRANSA2TION FD USING BD2DATA

O)TIONS FRO( mltot-

2A TRANSA2TION 3tranact9oncode4 USING 3bdc1table4 C (ODE A E N C U)DATE A S C (ESSAGES INTO 3metab4 C O)TIONS FRO( ot C -

RE)ORT 777-DATA mltot T0)E ctuaram-2A TRANSA2TION FD USING bdcdata

O)TIONS FRO( mltot-

The addition 5PTI5NS enaes the ca transaction statement to e controed through a structure

The structure must have the dictionary type 2T43PAampAS

The addition 5PTI5NS Famp5 must not e comined either $ith the addition 57 or $ith

4PAT7 ore information on the net side

copy SAP AG BC420 12-67

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 6888

085

983209 SAP AG 1999

Structure TUltPARAMS

DISMD1 Procen mode anaoo o addon amp

UPDMD1 $pdae mode anaoo o addon $PA

ATTMD1 CA mode CA conro

D19SI1 orce de=a EndoE e drn procen

RAMMIT +o eD a Camp amp(

IPT +o a ac np eonF a F S-B+P SPAC

I1D +o a ac np eon a=er end o= BC daa

The components are defined as foo$s

The components 7FSIM7 ampA25IT N5INPT and N5I7N can have the foo$ing

vaues KGK E Ces or K K E No

If the addition 5PTI5NS Famp5 is not specified the foo$ing settings appy to the contro

parameters

IS57 from addition 57

4P57 from addition 4PAT7

2ATT57 2ATT not active

7FSIM7 o not not use defaut $indo$s siDe

ampA25IT Successfu eit at 25IT -5amp6

N5INPT atch input session active (SC9INPT E G)

N5I7N atch input session sti active after end of 2 data

copy SAP AG BC420 12-68

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 6988

087

983209 SAP AG 1999

SMSBID Message ID

SMSBT Message T(pe C1GIGWGSGA

SMSB Message umber

SMSB6 Message ariable 6

SMSBamp Message ariable amp

SMSB Message ariable

SMSB4 Message ariable 4

SMSBID Message ID

SMSBT Message T(pe C1GIGWGSGA

SMSB Message umber

SMSB6 Message ariable 6

SMSBamp Message ariable amp

SMSB Message ariable

SMSB4 Message ariable 4

Return code$

S(stem fields$

alue Meaning

0 Successful

6000 1rror in transaction

6000 1rror in processing call transaction

see also the s(stem fields specified

alue Meaning

0 Successful

6000 1rror in transaction

6000 1rror in processing call transaction

see also the s(stem fields specified

9ield name Meaning9ield name9ield name MeaningMeaning

Return ode and S(stem 9ields

The return code is used to specify $hether the caed transaction $as processed successfuy In

addition severa system fieds are fied The numer I type and variaes of the diaog message

output y the caed transaction Cou need this information to output the message tet

copy SAP AG BC420 12-69

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 7088

030

983209 SAP AG 1999

Benerated Program of the TA Recorder

REFRES= (ESSTAB-

2A TRANSA2TION tcode USING bdcdata (ODE ctumode U)DATE cudate (ESSAGES INTO metab-OO) AT metab- ENDOO)-IF lubrc 34 AND e8rou 34 S)A2E- IF e8rouoenend - 2A FUN2TION BD2O)ENGROU) E)ORTING ---------

--------- E8rouoened - ENDIF- 2A FUN2TION BD2INSERT E)ORTING T2ODE tcode TABES D0N)ROTAB bdcdata-ENDIF-REFRES= bdcdata-

Message table output

pen error session

Insert data record that

has errors into error

session

If you have seected ca transaction on the seection screen the generated program runs as foo$s

The onine transaction is caed $ith ca transaction and passed to tae 2ATA A the

messages arising during the ca transaction are put in the interna tae 7SSTA

7SSTA is output as a ist

If you have specified an error session ( 73ltamp54P L SPA27) on the seection screen and the

ca transaction comes across an error (+3S4amp2 L 0) the error session is opened The error

session is ho$ever ony opened once Then the data record is paced in the session

A the other data records that have errors $ith ca transaction are paced in the same session

copy SAP AG BC420 12-70

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 7188

036

983209 SAP AG 1999

The Transaction Recorder

PrinciplesPrinciples

Recording )ith the LSMWRecording )ith the LSMW

Principles of atch Input and all TransactionPrinciples of atch Input and all Transaction

Integrating the TA Program into the DWIntegrating the TA Program into the DW

Using the TA Recorder Using the TA Recorder

copy SAP AG BC420 12-71

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 7288

03amp

983209 SAP AG 1999

Integrating into the DW

Transfer program

AAP Dictionar(

Integrate

SDA0

SDA6

SDAamp

SDA

Cou can integrate the generated program into the G9- The structure of the fie must e created

in the AAP ictionary The taes SGA0 SGA8 SGA1 and SGA $i e fied

copy SAP AG BC420 12-72

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 7388

03

983209 SAP AG 1999

DW Release 42

Goo

-B eeae 45

aa ran=er ogtec

Int customer data transfer ob-ect

ecord =ed

Dece daa ran=er

d Goo

The ampunction ampor interatin TA recorder prora$s is

i$ple$ented in the

D+-B in Release

The recorder can e integrated as of ampeease and it is provided in the G9- ampeease

ltot to the G9- ampeease 5n the initia screen you can integrate programs y choosing ampoto

( +nt customer ata transfer o-ect

copy SAP AG BC420 12-73

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 7488

034

983209 SAP AG 1999

reating Program as D b-ect

Comer ran=er ogtec

ampgtec ype

Sor eD =or ogtec

aa ran=er proram

Srcre name

9900

(+A1

Cane comer

ZBCA+G

ZB

ustomer transfer ob-ect

umber bet)een 7000 and 7777

b-ect t(pe

Assignment to R ob-ect

Short tet for D ob-ectShort description

Data transfer program

ame of generated program

Structure name

A structure Cstructure la(out )ith this name is created in

the AAP Dictionar(

For ampeease transfer oects $ere not organiDed y 5amp oects ut y a G numer (00089

OOOO) The numer range O0009OOOO is reserved for customers

To create a connection to the ne$ G 9- you must assign the program to a 5amp oect

2reate a short tet for the G oect This tet $i appear in the method seection ist

Specify the program to e incuded

Specify a name for the structure to e created in the AAP ictionary

Note $he generated program appears under program type +N and not under program type

-

copy SAP AG BC420 12-74

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 7588

032

983209 SAP AG 1999

Adantages

Automatic program registration in the DW in

Release 48

ou can use all the functions defined for

standard ob-ects

1ception$ The (reate ampile ith data

function

If you incuded the oect in the ampeease $orench it is automaticay avaiae in the ampeease

B $orench

A the $orench functions are avaiae for your oect ecept for Create files ith transfer ata

copy SAP AG BC420 12-75

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 7688

038

983209 SAP AG 1999

ou are no) able to$

The Transaction Recorder$ Unit Summar(

Use the recording function in the LSMW to create

a batch input session )ith the data from the

eternal s(stem

Use the TA Recorder to create (our o)n data

transfer program

Anal(e programs that )or+ )ith batch input or

call transaction

Integrate the TA Recorder programs into the

DW

copy SAP AG BC420 12-76

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 7788

ercise 1

nit $ -ecorder

$opic 2reating etors

$ransaction -ecorder ercise 1

bull 2reating detors $ith eterna numer assignment

bull etor numers M9980008 to M9980080

Address data for detors $ith eterna numer assignment is to

e transferred using program ampFI700

ro4ect F5

Supro4ect +5

-un +575

$as)s 85 95 8S25

9oad program -F+00

8 In the foo$ing eercises eisting data is to e changed Therefore these detors $ith

eterna numer assignment have to first e created

898 4nder suproect 79 create run 797G9 $ith the name Detors ith

eternal numers

copy SAP AG BC420 12-77

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 7888

891 2reate the foo$ing three tass The tass map the foo$ing process steps

convert data create + session and process + session

89198 In run 797G9 create the foo$ing tas

9 Tas AP9

9 Name 2onvert data 9 Tas type AP

9 Program type +S-

Seect the foo$ing +S- oect

+S- proect 2109

+S- suproect 7I9

+S- oect I997GT

89191 In run 797G9 create the foo$ing tas 9 Tas +5A9

9 Name 2reate I session

Tas type +5A

9 Program type INP

Seect program ampFI700 $ith the variant

I97G9

8919 In run 797G9 create the foo$ing tas

9 Tas S29

9 Name Process I session Tas type S2

9 Program type amp7P5

Seect program ampS2S4 $ith the variant

S497G9

Note that you have to correct the seuence of the tass 2onvert data

create + session and process + session

4se the uttons

89 Start the run

The detors $i e created $ith eterna numer assignments

89 2hec in transaction F0 that the detors M9980008 to M9980080 have een

created

copy SAP AG BC420 12-78

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 7988

ercise

nit $ransaction -ecorder

$opic -ecording function in the 9S8(

bull 2reate a recording using the +S-

bull ltenerate a atch input session

2hange the detor address data in the amp System

Name of the recording +

Name of the file +2055+F9

8 2reate the recording 7I3 using the +S- ampecord the transaction F01 (2hange

detor)

898 efore you create the recording first test the transaction onineQ

For the recording use detor M9980008 5n the initia screen of the F01

maintain the foo$ing fieds ony

etor etor M9980008

2ompany code 0008

Address data seect

Note $he data record must e saved hile recording

891 aintain the names and the descriptions for the foo$ing fieds

Name city street posta code and teephone numereete a other fieds in screen 880 from the recording (eg S5ampT+ +AN8

SPampAS)

4se the same technica names as sho$n in the tae eo$ (automatic fied

mapping)

copy SAP AG BC420 12-79

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 8088

1 2reate the suproect 7I9 and the ne$ oect TA3 in your proect 2109

aintain the oect attriutes and seect the item atch input recording Seect your

recording 7I3

2reate the source structure address

2reate the source fieds according to the tae eo$ 5r copy them from proect 2109S37N suproect 7I900 oect TA900

198 Fie setup The data from the egacy system are dispayed in the foo$ing tae

Fied name Fied type Fied ength escription

N5 2 8B etor numer

NA7 2 Name

STamp77T 2 Street

2ITC 2 2ityPace of residence

MIP 2 80 Posta code

T7+ 2 8B Teephone numer

191 aintain the fied mapping 4se the automatic fied mapping (via menu item

7tras)

19 Specify the fies 5ny maintain the fie name of the source fie

Name of the fie 21099IFI+7

2odepage 8800

19 Import the data and convert them ispay the data in each caseQ

19 2reate a atch input session

19B ampun the atch input session

copy SAP AG BC420 12-80

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 8188

ercise 3

nit $ransaction -ecorder

$opic -ecording ith the $ -ecorder

bull ltenerate a recording using the TA recorder

bull Test the recording

2hange the address data of detors in the amp system

Name recording $+

Name of the file +2055+F9

8 2reate the recording TA37I3 using the transaction recorder ampecord the

transaction F01 (change detor)

898 4se detor M9980008 for the recording 5n the F01 initia screen ony

maintain the foo$ing fieds

etor etor M9980008

2ompany 2ode 0008

Address data seect

Note $he data record must e saved hen recording

eete a fieds that do not eist in the source fie 21099IFI+7 from screen

880 in the recording (eg 6NA89S5ampT+ 6NA89+AN8 6ANNQ9SPampAS) Note o not deete fieds ampF01946ampS and ampF0190880

Save the recording no$

1 S$itch to the recordings overvie$

198 Process the recording $ith the processing mode A (dispay a)

191 Process the recording $ith the processing mode RN (no dispay)

19 If the recording has een tested and no error has occurred generate a I session

and run it using the I monitor If an error shoud occur generate the recordingagainQ

copy SAP AG BC420 12-81

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 8288

From the recording generate the program M21037I3 in your deveopment cass

2109 Seect the foo$ing

bull ampead fied contents from fie

bull 2reate test data in the fie 2103dei3test3tt

98 Save this program and eecute it ltenerate one I session each and process it

2arry out the same steps again using the ca transaction

The generated program shoud no$ e changed so that fie 21099IFI+7 can e

read and processed

98 2hange the defaut vaue of the fie name (parameter dataset) in 21099

IFI+7

91 2hange the structure definition eete the company code fied and the address

data checo from the structure

9 2hange the su9routine ca perform dc3fied for the company code (KampF019

46ampSK) so that the vaue 0008 is transferred

9 2hange the su9routine ca perform dc3fied for the address data checo

(KampF0190880K) so that the vaue G is transferred

9 Start the program again and read the data from the fie 21099IFI+7 $ith

detor data ltenerate a I session $ith it and run it

copy SAP AG BC420 12-82

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 8388

033 Include DR16INCLUDE BDCRECX1

SELECTION-SCREEN BEGIN OF LINE

PARAMETERS SESSION RADIOBUTTON GROUP CTU create sessi SELECTION-SCREEN COMMENT $amp TEXT-S FOR FIELD SESSION

se(ecti-scree )siti +

PARAMETERS CTU RADIOBUTTON GROUP CTU ca(( trasacti

SELECTION-SCREEN COMMENT $amp TEXT-S FOR FIELD CTU

SELECTION-SCREEN END OF LINE

SELECTION-SCREEN BEGIN OF LINE

SELECTION-SCREEN COMMENT $amp TEXT-S1 FOR FIELD GROUP

se(ecti-scree )siti $+

PARAMETERS GROUP1$amp r) ae 0 sessi

SELECTION-SCREEN COMMENT $amp TEXT-S+ FOR FIELD CTUMODE

se(ecti-scree )siti

PARAMETERS CTUMODE LIE CTU2PARAMS-DISMODE DEFAULT 3N3

A4 s56 a(( 78)rs

E4 s56 78)r errr (8

N4 7 t 7is)(a8 78)r

SELECTION-SCREEN END OF LINE

SELECTION-SCREEN BEGIN OF LINE

SELECTION-SCREEN COMMENT $amp TEXT-S$ FOR FIELD USER

se(ecti-scree )siti $+

PARAMETERS4 USER1$amp DEFAULT S9-UNAME ser 0r sessi i atc5

SELECTION-SCREEN COMMENT $amp TEXT-S FOR FIELD CUPDATE

se(ecti-scree )siti

PARAMETERS CUPDATE LIE CTU2PARAMS-UPDMODE DEFAULT 3L3

S4 s8c5rs(8

A4 as8c5rs(8

L4 (ca(

SELECTION-SCREEN END OF LINE

SELECTION-SCREEN BEGIN OF LINE

SELECTION-SCREEN COMMENT $amp TEXT-S FOR FIELD EEP

se(ecti-scree )siti $+

PARAMETERS4 EEP AS CltECBOX 3 3 = 7e(ete sessi i0 0iis5e7

3X3 = gtee) sessi i0 0iis5e7

SELECTION-SCREEN COMMENT $amp TEXT-S FOR FIELD E2GROUP

copy SAP AG BC420 12-83

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 8488

se(ecti-scree )siti

)araeters E2GROUP1$amp r) ae 0 errr-sessi

SELECTION-SCREEN END OF LINE

SELECTION-SCREEN BEGIN OF LINE

SELECTION-SCREEN COMMENT $amp TEXT-S FOR FIELD ltOLDDATE

se(ecti-scree )siti $+

PARAMETERS4 ltOLDDATE LIE S9-DATUM

SELECTION-SCREEN COMMENT +11amp TEXT-S$ FOR FIELD E2USER

se(ecti-scree )siti

PARAMETERS4 E2USER1$amp DEFAULT S9-UNAME ser 0r errr-sessi

SELECTION-SCREEN END OF LINE

SELECTION-SCREEN BEGIN OF LINE

SELECTION-SCREEN COMMENT +11amp TEXT-S FOR FIELD E2EEP

se(ecti-scree )siti

PARAMETERS4 E2EEP AS CltECBOX 3 3 = 7e(ete sessi i0 0iis5e7

3X3 = gtee) sessi i0 0iis5e7

SELECTION-SCREEN END OF LINE

SELECTION-SCREEN BEGIN OF LINE

SELECTION-SCREEN COMMENT +11amp TEXT-S FOR FIELD E2ltDATE

se(ecti-scree )siti

PARAMETERS4 E2ltDATE LIE S9-DATUM

SELECTION-SCREEN END OF LINE

SELECTION-SCREEN SIP

SELECTION-SCREEN BEGIN OF LINE

SELECTION-SCREEN COMMENT 1amp TEXT-S1 FOR FIELD NODATA

PARAMETERS4 NODATA DEFAULT 33 LOER CASE 7ata

SELECTION-SCREEN END OF LINE

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

Batc5i)t7ata 0 si(e trasacti

DATA4 BDCDATA LIE BDCDATA OCCURS ITlt ltEADER LINE

essaes 0 ca(( trasacti

DATA4 MESSTAB LIE BDCMSGCOLL OCCURS ITlt ltEADER LINE

errr sessi )ee7 3 3 r 3X3amp

DATA4 E2GROUP2OPENED

essae tets

TABLES4 T1

copy SAP AG BC420 12-84

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 8588

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

at se(ecti scree

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

AT SELECTION-SCREEN

r) a7 ser st e 0i((e7 0r create sessi

IF SESSION = 3X3 AND

GROUP = SPACE OR USER = SPACE

MESSAGE E1MSamp

ENDIF

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

)e 7ataset

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

FORM OPEN2DATASET USING P2DATASET

OPEN DATASET P2DATASET IN TEXT MODE

IF S9-SUBRC

RITE4 TEXT-E S9-SUBRC

STOP

ENDIF

ENDFORM

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

c(se 7ataset

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

FORM CLOSE2DATASET USING P2DATASET

CLOSE DATASET P2DATASET

ENDFORM

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

create atc5i)t sessi

t 0r ca(( trasacti siamp

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

FORM OPEN2GROUP

IF SESSION = 3X3

SIP

RITE4 $amp 3Create r)3I1amp GROUP

SIP

)e atc5i)t r)

CALL FUNCTION 3BDC2OPEN2GROUP3

EXPORTING CLIENT = S9-MANDT

copy SAP AG BC420 12-85

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 8688

GROUP = GROUP

USER = USER

EEP = EEP

ltOLDDATE = ltOLDDATE

RITE4 amp 3BDC2OPEN2GROUP3I$amp

1$amp 3retrc7e43I+amp

S9-SUBRC

ENDIF

ENDFORM

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

e7 atc5i)t sessi

ca(( trasacti si4 errr sessiamp

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

FORM CLOSE2GROUP

IF SESSION = 3X3

c(se atc5i)t r)

CALL FUNCTION 3BDC2CLOSE2GROUP3

RITE4 amp 3BDC2CLOSE2GROUP3Iamp

1$amp 3retrc7e43I+amp

S9-SUBRC

ELSE

IF E2GROUP2OPENED = 3X3

CALL FUNCTION 3BDC2CLOSE2GROUP3

RITE4

RITE4 amp 3Fe5(era))e 6r7e eret3Iamp

ENDIF

ENDIF

ENDFORM

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

Start e6 trasacti accr7i t )araeters

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

FORM BDC2TRANSACTION USING TCODE

DATA4 L2MSTRINGamp

DATA4 L2SUBRC LIE S9-SUBRC

atc5 i)t sessi

IF SESSION = 3X3

CALL FUNCTION 3BDC2INSERT3

EXPORTING TCODE = TCODE

TABLES D9NPROTAB = BDCDATA

RITE4 3BDC2INSERT3Iamp

copy SAP AG BC420 12-86

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 8788

TCODE

3retrc7e43I+amp

S9-SUBRC

3RECORD43

S9-INDEX

ca(( trasacti si

ELSE

REFRESlt MESSTAB

CALL TRANSACTION TCODE USING BDCDATA

MODE CTUMODE

UPDATE CUPDATE

MESSAGES INTO MESSTAB

L2SUBRC = S9-SUBRC

RITE4 3CALL2TRANSACTION3

TCODE

3retrc7e43I+amp

L2SUBRC

3RECORD43

S9-INDEX

LOOP AT MESSTAB

SELECT SINGLE FROM T1 ltERE SPRSL = MESSTAB-MSGSPRA

AND ARBGB = MESSTAB-MSGID

AND MSGNR = MESSTAB-MSGNR

IF S9-SUBRC =

L2MSTRING = T1-TEXT

IF L2MSTRING CS 313

REPLACE 313 ITlt MESSTAB-MSGH1 INTO L2MSTRING

REPLACE 3$3 ITlt MESSTAB-MSGH$ INTO L2MSTRING

REPLACE 33 ITlt MESSTAB-MSGH INTO L2MSTRING

REPLACE 33 ITlt MESSTAB-MSGH INTO L2MSTRING

ELSE

REPLACE 33 ITlt MESSTAB-MSGH1 INTO L2MSTRING

REPLACE 33 ITlt MESSTAB-MSGH$ INTO L2MSTRING

REPLACE 33 ITlt MESSTAB-MSGH INTO L2MSTRING

REPLACE 33 ITlt MESSTAB-MSGH INTO L2MSTRING

ENDIF

CONDENSE L2MSTRING

RITE4 MESSTAB-MSGT9P L2MSTRING$+amp

ELSE

RITE4 MESSTAB

ENDIF

ENDLOOP

copy SAP AG BC420 12-87

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 8888

SIP

Eree 0e5(era))e

IF L2SUBRC AND E2GROUP SPACE

IF E2GROUP2OPENED = 3 3

CALL FUNCTION 3BDC2OPEN2GROUP3

EXPORTING CLIENT = S9-MANDT

GROUP = E2GROUP

USER = E2USER

EEP = E2EEP

ltOLDDATE = E2ltDATE

E2GROUP2OPENED = 3X3

ENDIF

CALL FUNCTION 3BDC2INSERT3

EXPORTING TCODE = TCODE

TABLES D9NPROTAB = BDCDATA

ENDIF

ENDIF

REFRESlt BDCDATA

ENDFORM

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

Start e6 scree

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

FORM BDC2D9NPRO USING PROGRAM D9NPRO

CLEAR BDCDATA

BDCDATA-PROGRAM = PROGRAM

BDCDATA-D9NPRO = D9NPRO

BDCDATA-D9NBEGIN = 3X3

APPEND BDCDATA

ENDFORM

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

Isert 0ie(7

Page 3: BC420_46C - 012The Transaction Recorder

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 388

0

983209 SAP AG 1999

ourse erie) Diagram

Datenbernahme

D Wor+bench

LSM Wor+bench

Principles of Standard

Data Tansfer

D i r e c t I n p u t

API

T A R

e c o r d e r

ourse erie)

a t c h

I n p u t

a l l T r a n s a c t i o n

1DI

asics

2

3

4

5 606

60

7

66

64

66

66

6amp

6

amp

6amp6amp

6

copy SAP AG BC420 12-3

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 488

04

983209 SAP AG 1999

The TA Recorder

Principles of RecordingPrinciples of Recording

Recording )ith the LSMWRecording )ith the LSMW

Using the TA Recorder Using the TA Recorder

Principles of I and TPrinciples of I and T

Integrating the TA Recorder into the DWIntegrating the TA Recorder into the DW

copy SAP AG BC420 12-4

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 588

02

983209 SAP AG 1999

erie) of Transaction Recorder

Flat SAP

Structure

SAP Record

Layout

Structure

SAP IDoc

Structure

API

If the SAP standard program does not provide the functions you need for data transfer you can use

the transaction record

Note For data transfer the transaction (TA) recorder reuires a fat fie that is a fie $ithout any

hierarchy or sustructures

copy SAP AG BC420 12-5

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 688

08

983209 SAP AG 2001

Uses of the TA Recorder

Flat SAP

Structure

atch

Input

all

Transaction

The TA ampecorder enaes you to transfer data into amp using atch input or ca transaction

The TA ampecorder can ony $or $ith a fat structure Fies $ith different record structures (for

eampe header structure) cannot e used

The TA ampecorder is used in the +S- to create recordings of transactions atch input sessions can

e created from the recordings

The TA ampecorder can itsef eecute a data transfer from the recording using atch input or ca

transaction

copy SAP AG BC420 12-6

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 788

03

983209 SAP AG 1999

The Recording

Recording

Screen

9ield alue

9ield nameModule pool

Transaction

Screen

111

Screen

106

Screen

130

The TA ampecorder can record transactions The recorder must e activated efore the transaction is

processed Then you can run the transaction as though you $ere processing it onine

After the transaction has finished the recording $i contain a the screen numers fied names

fied vaues and the associated modue poo and transaction code

copy SAP AG BC420 12-7

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 888

05

983209 SAP AG 1999

hanging ustomer Data$ Initial Screen

Vendor

Company code

Z-88-10000

Screen

106

Genera daa9ield ontents

BCC$Samp $SZAVBCamp(Camp )00

02-($++ -88-10000

02-0110

02-0130

$SZAV

9ield ame

Transaction 9D0amp

Addre

In the aove eampe the transaction Change customer F01 is recorded

In addition to the screen fieds the fieds 2324ampS5amp and 2356257 are aso

automaticay recorded

Note

You must change the field values for all the fields required later for the transfer For the

recording a change can simply mean overriting one single character in a field ith the

same character

f fields are to e filled using S$amp$ parameters the value must also e changed

(ith online transactions screen sequences may appear that are different than in therecording

copy SAP AG BC420 12-8

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 988

07

983209 SAP AG 1999

hanging ustomer Data$ Address

ustomer 5560000

+ame

Searc erm

Addre

Screen

111

9ield ontents

BCamp(Camp $PABCS$BSC SAPSZA1 0300ASS

BCS$BSC SAPSZA1 0301Camp$

BCC$Samp A1AA-amp$S+$1

A1AA-S Garden Sree

A1AA-amp$S+$1 02105

9ield ame

If there is a suscreen on the screens this is automaticay recorded In the recording the fied

23S4S2amp77N containing the name of the suscreen appears

-ith customer master data the address is a suscreen area The centra address management is

integrated here A the address input fieds are dispayed on one suscreen

2entra address management is ony used if you specificay seect this option on the initia screen

copy SAP AG BC420 12-9

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 1088

060

983209 SAP AG 1999

Results of the Recording

Recording

SAPM90ampD 0608

DltURSR R90ampD=UR

Dlt=D1 gt00

R90ampD=UR 5560000

R90ampDD0660

US1ltA

SAPM90ampD 0666

Dlt=D1 UPDA

DltSUSR SAPLSA6 000ADDR1SS DltSUSR SAPLSA6 006UTRltSR11

DltURSR SA6ltD0600T1LltUM1R

ADDR6ltDATASTR11T 4 Barden Street

ADDR6ltDATAPSTltD1 0amp602

ADDR6ltDATAIT6 oston

SA6ltD0600T1LltUM1 8638257755

The resut of the recording is a ist of a the fieds and fied vaues that $ere changed in the

recording

copy SAP AG BC420 12-10

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 1188

066

983209 SAP AG 1999

Special Recording 9ields

9unction code triggered on

this screen

9ield name )here cursor

)as last positioned on the

screen

Comer

Company code

Z-88-10000

Genera daa

Dlt=D1

DltURSR

uring a recording the foo$ing additiona fieds are automaticay recorded

The BDC_OKCODE fied contains the function code triggered on the screen

The BDC_CURSOR fied contains the fied name of the ast fied the cursor $as positioned in

efore eiting the screen

copy SAP AG BC420 12-11

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 1288

06amp

983209 SAP AG 1999

Determining the 9ield ame

Technical info

Screen field

R90ampD =UR

Comer

Company code

Z-88-10000

Genera daa

96help

Sa

Program SAPM90ampDScreen number 608

The information recorded in the TA recorder can aso e dispayed onine for each transaction

To find out the current modue poo name and the screen numer choose Systemrarr Status from the

menu

To determine the fied name pace the cursor on a fied and seect F8 hep The name of the screen

fied can e found under technical information

copy SAP AG BC420 12-12

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 1388

06

983209 SAP AG 1999

Subscreens

Comer Z-88-10000

+ame

+ame

ADDR6ltDATAAM16

DltSUSR

Information$

ode poo name

Screen nmer

Screen name

Some screens contain suscreen areas

To determine the fied name pace the cursor on the fied and choose F1 The name of the screen

fied is specified under Technical info

copy SAP AG BC420 12-13

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 1488

064

983209 SAP AG 2001

Tabstrips

$er Roberts

1ample$ User Profile Defaults

Sar men +

oon anae

ampp dece Pr1

ParameerDefaults

DltSUSR

USD19AULTSSPLD

The tastrip eement sho$n is used on the aintain User rofile (5$n data) screen

4nder the tastrip tite Defaults the user can set various vaues such as the defaut printer

The user profie are user9dependent settings (as the name impies)

copy SAP AG BC420 12-14

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 1588

062

983209 SAP AG 1999

Step Loops and Table ontrols

1ample$ an+ Details

Comer

ntr( an+ +e( Account

08154711

123456789

Z-00-12345

an+ Details

00708155546344536

Banlt daa

==A=C06)

==A=C0amp)

Step oops and tae contros are treated identicay for the recording

The fied names of the fieds isted are the same for every ro$

7ach ro$ contains a customers an detais The fieds must e accessed using an inde (this is

specified as an addition to the fied name for eampe 6N69AN6N(1) The inde must match

the ro$ numer

5ny the visie fieds on a screen can e fied $ith data If some fieds are ony visie after paging

the paging must e recorded as $e This means that for the recording you must eecute a the steps

in the onine transaction

For eampe age on $oud e eecuted using the function code 1 (Paging icons)

Paging to the end of a ist 1Page up 11

lto to first page 18

copy SAP AG BC420 12-15

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 1688

068

983209 SAP AG 2001

Recording Buidelines

Test the transaction before recording

Start the recording

hange field alues onl( for fields

releant to the recording

As of 48 all filled fields are recorded

Transaction must be properl( eitedCSA1

Use of scroll bars cannot be recorded

Specia recording notes

F8 F and your o$n F8 and F hep (Pamp527SS 5N =7+P9amp7gt47ST Pamp527SS 5N A+479

amp7gt47ST) are not recorded This aso appies to a commands under the System and $el

menus aues for defaut variants ( transaction variants) are not incuded

7rror and $arning diaogs are not recorded 5ny the 56 code and the fied contents reuired for

further processing on the current screen are recorded

Note uring recording the data entered is $ritten to the dataase

copy SAP AG BC420 12-16

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 1788

063

983209 SAP AG 2001

1n-o( SAP ontrols and Data Transfer

bull SAP Picture ontrolbull SAP ETML ie)er ontrol

bull SAP Tet 1dit ontrol

bull AL Brid ontrol

bull SAP Tree ontrol

bull

ranch 6

ranch amp

Root

These and other controls do not support batch input$

Root

ranch amp

ranch amp6

The ne$ 7noy SAP contros deveoped for ampeease B do not support atch input or ca

transaction

=o$ever tae contros and tastrips do support atch input

copy SAP AG BC420 12-17

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 1888

065

983209 SAP AG 1999

The Transaction Recorder

PrinciplesPrinciples

Recording )ith the LSMWRecording )ith the LSMW

Principles of atch Input and all TransactionPrinciples of atch Input and all Transaction

Integrating the TA Program into the DWIntegrating the TA Program into the DW

Using the TA Recorder Using the TA Recorder

copy SAP AG BC420 12-18

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 1988

067

983209 SAP AG 1999

Session

generator

Recording Using the LSMW

-ith the +S- you can create your o$n recordings

The +S- uses the standard TA recorder here yet evauates the recording itsef The information

from the recording is used to create atch input sessions

The created atch input session can e processed as usua $ith the atch input monitor

Note As $ith the standard procedure it is euay important that the data is converted

copy SAP AG BC420 12-19

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 2088

0amp0

983209 SAP AG 1999

reating Recording

Admnraon

ecordn

Goo

ame of recording

Description

)ner

ame of transaction

Start recording

lto into the +S- and seect the menu path ampoto (Recorings An overvie$ of a previousy

created recordings for your proect are dispayed To start a ne$ recording seect Create

To create a recording you must define the name the description and the o$ner

7nter the name of the transaction you $ant to record

7ecute the transaction and compete it propery

Note ampecordings are assigned to ony one proect 9 so the name of the recording must e uniue

copy SAP AG BC420 12-20

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 2188

0amp6

983209 SAP AG 1999

hanging ustomer Data$ Initial Screen

9ield ontents

BCC$Samp $SZAV

BCamp(Camp )00

02-($++ -88-10000

02-0110

02-0130

$SZAV

9ield ame

Comer

Company code

Z-88-10000

Genera daa

Comer Z-88-10000

+ame

9ield ontents

BCamp(Camp $PA

BCS$BSC SAPSZA1 0300ASS

BCS$BSC SAPSZA1 0301Camp$

BCC$Samp SZA10100-+$B

A1AA-S Garden Sree

A1AA-amp$S+$1 34

A1AA-PampSCamp1 02105

9ield ame

Screen

111

Screen

106

In the aove eampe the transaction Change customer F01 is recorded

Note

You must ma)e some modification to the field values for all the fields you ant to capture

for the data transfer For the purposes of recording a change can simply mean overriting

one single character in a field ith the same character

ven if fields are to e filled using S$amp$ parameters the values must still e changed on

the screen in order to capture them

(ith online transactions screen sequences may appear that are different than in the

recording

copy SAP AG BC420 12-21

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 2288

0ampamp

983209 SAP AG 1999

Results

RecordingRecording R1lt6 Demolt6

9D0amp hange customer Caccounting

SAPM90ampD 0608

DltURSR R90ampD=UR

Dlt=D1 gt00

R90ampD=UR 5560000

R90ampDD0660

US1ltA

SAPM90ampD 0666

Dlt=D1 UPDA

DltSUSR SAPLSA6

DltSUSR SAPLSA6

DltURSR SA6ltD0600T1LltUM1

ADDR6ltDATASTR11T 4 Barden Street

ADDR6ltDATAPSTltD1 0amp602

ADDR6ltDATAIT6 oston

SA6ltD0600T1LltUM1 8638257755

The resuts of the recording using the +S- are dispayed in a tree structure

After the recording has finished you can edit it Cou can deete fieds or add ne$ ones

copy SAP AG BC420 12-22

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 2388

0amp

983209 SAP AG 1999

Assigning 9ield ames

Recording R16 Demolt6

Dlt=D1 UPDA

DltSUSR SAPLSA6

DltSUSR SAPLSA6

DltURSR SA6ltD0600T1L

ADDR6ltDATAAM16 Lisa Eofmeister

ADDR6ltDATAPSTltD1 0amp602

ADDR6ltDATAIT6 oston

ame

+ame

ecrpon

e=a ae

A1AA-+A1

A1AA-+A1

Comer name

a o=meer

Screen =ed

ustomer name

double clic+

Cou can assign names for each recorded fied The specia fieds (2356257 2324ampS5amp

and 23S4S2amp77N) are not incuded here Cou can choose the fied names -hen the atch

input session is created the contents of these fieds are assigned to the target fieds specified in the

eft coumn

Functions

efaut Assigns to the fied names of the underying target fied and its fied description

ampeset eetes fied name and fied description

oue cic 7dits fied name fied description and defaut vaue

Note Cou can use fied names more than once =o$ever the fied name is ony avaiae once in thefied mapping For this reason it is not practica to use fied names more than once

For a those fieds for $hich you do not assign a name the defaut vaue is used $hen the atch

input session is created These defaut vaues can e seen as constants This is especiay usefu for

chec oes (for eampe 08 vie$ seection)

The +S- supports automatic fied mapping Source fieds and target fieds can e assigned to each

other automaticay The fieds are assigned to the corresponding fieds of the same name Therefore

the fied names of the source structure shoud e given the same or simiar names as the fied names

in the target structure

copy SAP AG BC420 12-23

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 2488

0amp4

983209 SAP AG 2001

Addinggtremoing screen fields

Repeating recording

9or identical field names the name and description are

assigned automaticall(

1diting Recording

02-($++

(+A1-A+

(+A1-+A1

(+A1-Samp

(+A1-+A2

(+A1-SAS

Comer accon nmer

e

+ame 1

Sor =ed

+ame 2

Sree

Selection of all

aailable screen

fields

Cou can ater add ne$ screen fieds if you need to 6eep in mind that fieds shoud ony e added in

paces $here they are aso provided on the screen other$ise you $i get an error $hen the I

session is processed

After saving you $i get the message The data has een saved successfuy No$ the recordings

are avaiae for the oect attriutes

If you repeat the recording you can record a ne$ screen seuence $ith ne$ fieds Provided that the

fied names (eg 6NA89NA78) are identica the names and descriptions are automaticay

assigned

copy SAP AG BC420 12-24

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 2588

0amp2

983209 SAP AG 1999

b-ect T(pe and Import Method$ Recording

Standard atch Input gt Direct Input

atch Input Recording

API

IDoc

ampgtec ype ) mpor meod

Bac np recordn

ecordn ec1

The recording is no$ avaiae $ith the oect attriutes

Net you create a proect or su9proect in the +S- and specify process the data transfer

Cou eecute the data transfer as in the standard system

efine the source fieds and structures

efine the fied mapping

ampead and convert the data

2reate and import a atch input session

copy SAP AG BC420 12-25

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 2688

0amp8

983209 SAP AG 1999

The Transaction Recorder

PrinciplesPrinciples

Recording )ith the LSMWRecording )ith the LSMW

Principles of atch Input and all TransactionPrinciples of atch Input and all Transaction

Integrating the TA Program into the DWIntegrating the TA Program into the DW

Using the TA Recorder Using the TA Recorder

copy SAP AG BC420 12-26

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 2788

0amp3

983209 SAP AG 1999

Transaction Recorder

Online

Transaction

RecordingTransfer Program

T

Included in the Batch Input Monitor

Cou use the transaction recorder to record transactions and then use the transaction recording to

generate a transfer program The program ao$s you to transfer data using either atch input or ca

transaction

copy SAP AG BC420 12-27

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 2888

0amp5

983209 SAP AG 1999

hanging ustomer Data$ Initial Screen

9ield ontents

BCC$Samp $SZAV

BCamp(Camp )00

02-($++ Z-88-10000

02-0110

02-0130

$SZAV

9ield ame

Comer

Company code

Z-88-10000

Genera daa

Comer Z-88-10000

+ame

9ield ontents

BCamp(Camp $PA

BCS$BSC SAPSZA1 0300ASS

BCS$BSC SAPSZA1 0301Camp$

BCC$Samp SZA10100-+$B

A1AA-S Garden Sree

A1AA-amp$S+$1 34

A1AA-PampSCamp1 02105

9ield ame

Screen

111

Screen

106

In the aove eampe the transaction Change customer F01 is recorded

copy SAP AG BC420 12-28

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 2988

0amp7

983209 SAP AG 2001

hange Debitor$ Pa(ment Transactions C6

Banlt dea

Screen

10

9ield ontent

BCC$Samp (+B(-BA+(+01

BCamp(Camp BA+((+B(-BA+(S01

(+B(-BA+(01 12345679

(+B(-BA+(+01 22222222

Debitor 5560000

9ield ame

Inde

copy SAP AG BC420 12-29

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 3088

00

983209 SAP AG 1999

hanging ustomer Data$ Pa(ment Transactions Camp

Addre

an+ countr( US

an+ code 6amp42837

Banlt dea

ustomer 5560000

9ield ontents9ield ame

BCC$Samp (+A1-(+ZA

BCamp(Camp $PA

(+B(-Z01

Screen

10

Screen

100

SAPLBA

9ield ontents

BCC$Samp B+(A-BA+(A

BCamp(Camp +

B+(A-BA+(A +aona Banlt

9ield ame

In different transactions the modue poo may change This is the case $ith for eampe customer

master data The TA recorder records modue poo changes automaticay

copy SAP AG BC420 12-30

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 3188

06

983209 SAP AG 1999

Eierarch( Displa( of the Recording

02amp

02

SAP02 0106

BCC$Samp 02-0130

BCamp(Camp )00

02-($++ -88-10000

02-0110

02-0130

SAP02 0111

BCamp(Camp V

BCC$Samp A1AA-amp$S+$1

A1AA-S Garden Sree

Recording

-ith the TA recorder the resuts are aso a ist in a hierarchy dispay =o$ever you cannot assign

your o$n fied names as you can in the +S-

copy SAP AG BC420 12-31

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 3288

0amp

983209 SAP AG 1999

Recording erie)

Recording

Transfer program

9unction module

ontains onl( the data

from the recording

Test data

Test

reate

reate

reate

reate

1dit hange recording

Process recording

Cou can edit the recording as needed

The recording can e tested and eecuted again The screens are run through in the same $ay as in

the recording

The recording can then e used to create

atch input sessions

Test data

ata transfer programs $ith atch input or ca transaction

Function modues

copy SAP AG BC420 12-32

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 3388

0

983209 SAP AG 1999

1 02 BS

2 SAP02 106

3 BCC$Samp $SZAV

4 BCamp(Camp )00 5 02-($++ -88-10000

6 02-0110

7 02-0130

8 $SZAV

9 SAP02 111

10 BCamp(Camp V

11 BCC$Samp A1AA-amp$S+$1

12 A1AA-S Garden Sree

Program Screen St 9ield ame 9ield alue

Recording 1ditor

Recording

Add gt delete lines 9ormat chec+

Import gt eport of recording

In the editor you can add or deete ines Cou can aso change the contents of individua ines

-ith the function Chec) you can specify $hether the edited version of the recording sti has the

correct synta

Cou can aso eport import recordings to from a seuentia fie

After editing save the recording changes

copy SAP AG BC420 12-33

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 3488

04

983209 SAP AG 1999

Recording Seeral Transaction Runs

RecordingF

Directl( after the first recordingG or

In the displa( mode of the recording

In this step you can record additiona transactions and add additiona transaction runs to the

recording

Cou can record the additiona transactions directy after a recording or in the edit screen of a

recording

copy SAP AG BC420 12-34

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 3588

02

983209 SAP AG 1999

1ditor$ Importing and 1porting Recordings

6 T 9D0amp S

amp SAPM90ampD 608

DltURSR

4

2

8 SAPM90ampD 666

60

66

Program Screen St 9ield name 9ield alue

cempA

e name

aa =orma

cemp

A

e name

aa =orma

1port

Import

Presentation Serer

If the editor functions in the systems do not provide a the functions you need you can do$noad the

recording to your presentation server using the Eort function and then edit the recording using a

P2 editor

Cou use the Import function to import the data ac into the amp System ae sure the fie is sti in

the correct format

copy SAP AG BC420 12-35

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 3688

08

983209 SAP AG 1999

Processing the Recording

Recording

Process )ith ALL TRASATI

Parameer

Proce mode$pdae mode

CA mode

e=a e

Con a=er comm

+o a B eon

nd +o a B mode

A

A

T

The recording can e eecuted directy The data from the recording is used and the transaction is

processed $ith ca transaction

2a transaction provides a range of options for caing appication transactions $hich are discussed

on the foo$ing t$o pages

copy SAP AG BC420 12-36

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 3788

03

983209 SAP AG 1999

Process mode

Update mode

ATT mode

Processing Recording )ith T 6

A

1

Displa( all screens

Displa( errors onl(

o displa(

L

S

A

Local

S(nchronous

As(nchronous

A

o ATT

ATT )ithout indiidual screen control

ATT )ith indiidual screen control

Processing mode

=ere you can specify the processing mode 9 it is the same as the processing mode for atch input

4pdate mode

=ere you can specify the update mode For more information see the unit ca transaction

2ATT mode

=ere you can mae specia settings if you $ant to test the recording under 2ATT conditions (ony

necessary for 2ATT runs) Specia functions are caed in the 2ATT too for each screen at the end of

P5 and at the start of PAI

copy SAP AG BC420 12-37

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 3888

05

983209 SAP AG 1999

Default sie

ont after commit

ot a I session

1nd$ ot a I mode

Processing Recording )ith T amp

The screen standard sie is used for the

processing

ommit )or+ does not end the processing

o I mode is actie The transaction )ill run

through as in online

I mode is selected nce the data in the D

table is processedG the I mode is set to inactie

Standard siDe

If you seect this the screens are processed in the standard siDe in the foreground (in foreground or

dispay errors ony) Note the standard siDe is a$ays used for acground processing

Further after commit

The first commit $or in a transaction does not ead to the end of the recording

Note A atch input transaction is ended $ith the first commit $or

No I mode

The system fied SC9INPT is not set (SC9INPT E ) So transactions are run through as in onine

7nd No I mode

5ny use if you choose the processing mode 7 (dispay errors ony) Then the transaction is processed in the acground in atch input mode and if there is an error the screens run through in

the foreground

copy SAP AG BC420 12-38

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 3988

07

983209 SAP AG 1999

I Mode

atch input

mode

nline

Some transactions behae differentl( in batch input mode

than in online Cbatch input capabilit(

atch input mode sets the s(stem field SIPT H

Not every transaction can run the same onine and in atch input mode The transaction must decide

itsef $hether it is caed onine or in atch input mode

The system sets the system fied SC9INPT E G if the atch input mode is active (this aso appies

to ca transaction) From this system fied the transaction can identify $hether to run onine or in

atch input mode

copy SAP AG BC420 12-39

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 4088

040

983209 SAP AG 1999

reating a Session 9rom the Recording

Recordingnl( contains the data

from the recording

Seon name 02amp

Aoraon ampBS(eep eon

oclt dae 10102000

Cou can create a atch input session directy from the recording that you can then process using the

atch input monitor

copy SAP AG BC420 12-40

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 4188

046

983209 SAP AG 1999

reating Test Data

Test Data

Recording

ranranpBC420AAe name

The file onl( contains the data from the recording

Rgt

Application Serer

Structure

Cou can create a fie from the recordingH the fie $i contain a the fieds from the recording The

fieds are added to the fie $ith the ength you specified in the definition

The fied order corresponds to the order in the recording overvie$ Technica fieds

(2356257 2324ampS5amp and so on) are incuded

The data can ony e stored on the appication server If you do not specify a path the fie is stored in

the $or directory of the appication server

If the specified test fie aready eists the ne$ data record is added to this fie

copy SAP AG BC420 12-41

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 4288

04amp

983209 SAP AG 1999

ed conen

reating a Program

Recording

ZBC420ampProram name

Transfer Program

e daa

ead =rom =e

ran=er =rom recordn

reate

9ile nameTest data

ranranpBC420AA

Cou can generate a program from the recording

In the foo$ing diaog o enter a program name In addition you can choose the type and method

for fiing the maintained fied contents from the recorded screens

4se the vaues used for the recording If you reuire feie data transfer you $i have to modify

this program ater

ParameteriDe the input vaues and read these vaues from a fie A data structure is created for

parameteriDationH the data records are read from an eterna fie into this data structure The

program assumes the fie $as taiored to this data structure

If you have decided to parameteriDe the input vaues you shoud aso create a test fie during

generation To do this seect the checo and enter a name for the fie

The attriute maintenance screen of the AAP editor appears aintain the attriutes and save the

program

copy SAP AG BC420 12-42

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 4388

04

983209 SAP AG 1999

Program 9unctions

Online

transaction

Transfer program

To

error

1rror

ption 6ption ampFlat SAP

structure

Monitor

Cou have no$ generated a data transfer program for importing data into the amp System The

program can eecute the data transfer using atch input or ca transaction

If you choose option 1 and there is an error the data record is paced into a atch input session

copy SAP AG BC420 12-43

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 4488

044

983209 SAP AG 1999

Benerating 9unction Modules

Recording

Zcreaedeor ncon mode

ncon rop

Sor eD

ZBC420

Creae comer

9unction module

nl( one data record can be processed at a time

In the net diaog o you can generate a function modue a function group and short tet from the

recording The function modue is automaticay created in the function group

copy SAP AG BC420 12-44

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 4588

042

983209 SAP AG 1999

9unction of 9unction Modules

Online

transaction

To

error

1rror

ption 6 ption amp

9unction module

Import

Parameter 1port

parameter

Tables

M1SSTA

Monitor

S$BC

Import interface

The import interface consists of a technica part and the fieds from the recording (A parameter is

created for each input fied of the recorded transactions)

7port interface

Simpy consists of the parameter S4amp2 The function modue $i return a vaue in the system

fied SC9S4amp2 after caing ca transaction This return vaue is set to Dero if the data record has

een correcty processed (5ny appies to 2T)

If a session is created you $i e notified $hether the data record coud e paced into the session

Tae interfaceThis is used ony if the function modue $ors $ith ca transaction The tae contains a the

system messages

copy SAP AG BC420 12-45

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 4688

048

983209 SAP AG 1999

Import Interface of 9unction Module

$

Technical

fields

Data

fields

BI session or CALL TRANSACTION

Processin $ode

pdate $ode

a$e oamp BI session iamp (T initial)

Bacround user iamp (T initial)

Delete session aampter processin

Loc date oamp session

ODATA indicator

TU

MD1

UPDAT1

BRUP

US1R

=11P

ELDDAT1

DATA

Cou can use parameter 2T4 to specify $hether the function modue creates a atch input session

(2T4 E ) or updates the data record directy using ca transaction (2T4 E G)

The other parameters are fied as for a atch input session header

Note 7very time the function modue is caed a atch input session is created

If the session is to contain severa transactions proceed as foo$s

ltenerate the transaction severa times This can e achieved y recording the transaction again The

function modue interface $i then contain more than one transaction -hen the function modue is

caed severa transactions can e generated for each session

copy SAP AG BC420 12-46

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 4788

043

983209 SAP AG 1999

The Transaction Recorder

PrinciplesPrinciples

Recording )ith the LSMWRecording )ith the LSMW

Principles of atch Input and all TransactionPrinciples of atch Input and all Transaction

Integrating the TA Program into the DWIntegrating the TA Program into the DW

Using the TA Recorder Using the TA Recorder

copy SAP AG BC420 12-47

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 4888

045

983209 SAP AG 1999

Benerated Program

9unction modules DltP1ltBRUP

DltIS1RT

DltLS1ltBRUP

AAP Program

Define structure of

data in seJuential

fileDefine D

table

pen seJuential file

pen I session

Read data recordCseJuential file

9ill D table

9ill I session gtALL TRASATI

Last data record K

lose I session

lose seJuential file

The generated program has the structure dispayed aove It uses the standard function modues for

creating atch input sessions

copy SAP AG BC420 12-48

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 4988

047

983209 SAP AG 1999

Structure of the Benerated Program

Benerated part

Define D

table

pen seJuential file

pen I session

Read data record

9ill D table

9ill I session gtALL TRASATI

Last data recordK

lose I session

lose seJuential file

Include DR16

Define filestructure

P1ltDATAS1T

P1ltBRUP

DltDPR

Dlt9I1LD

DltTRASATI

LS1ltBRUP

LS1ltDATAS1T

The generated program consists of t$o parts 9 a generated part and the incude 2amp72G8 The

incude is provided in the standard system

The incude contains the definition of the reuired 2 tae and a further seven suroutines These

suroutines eecute the foo$ing functions

5pen and cose fie

5pen and cose session

Fi 2 tae

Fi session

The generated part is the main program and cas the reevant suroutines A structure is aso

generated in the generated part to read the eterna data into the fie

See the Appendi for more information on the 2amp72G8 program

copy SAP AG BC420 12-49

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 5088

020

983209 SAP AG 1999

Structure of D Table

PRBRAM DPR D1BI 9AM 9ALPRBRAMPRBRAM DPRDPR D1BID1BI 9AM9AM 9AL9AL

SAPM90ampD 0602

R90ampD=UR 600000

R90ampDU=RS 0006

R90ampD=T=D =UA

SAPM90ampD 0660

=A6AM16 Smith

=A6PSTL 87000

=A6LAD6 US

=A6SPRAS 1

SAPM90ampD 06amp0

=A6ST1B US6amp428357DDATA

PRBRAM

DPR

D1BI

9AM

9AL

EAR

UM

EAR

EAR

EAR

40

4

6

6amp

6amp

D Module pool

D Screen number

D Start of screen

D 9ield name

D 9ield contents

9ield ame T(pe Length Short Tet

AAP Dictionar(

The 2 tae has the same structure as in a standard transfer

copy SAP AG BC420 12-50

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 5188

026

983209 SAP AG 1999

Read Structure

Recording

DATA BEGIN OF record data element BUKRS bukr$amp data element KTOKD ktokd$amp data element NA(EG) name$+amp data element SORT ortl$ampEND OF record-

record

Automaticall( generated

from recording

The structure of the fie is automaticay generated and is a$ays defined $ith the name amp725amp

The generated structure a$ays has the same ayout 7ach fied is defined y t$o generated ro$s

The first ro$ is a$ays a comment ro$ containing the tet J data eement and the data eement of

the screen fied from the recording In the net ro$ the fied itsef is defined $ith the name of the

data eement foo$ed y a three9digit position numer $hich specifies the ocation in the structure

The ength of the fied is set y the ength of the data eement If a fied is not defined through a data

eement the system uses the ength of the screen fied

copy SAP AG BC420 12-51

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 5288

02amp

983209 SAP AG 1999

pening and losing the 9ile

P1ltDATAS1T

LS1ltDATAS1T

FOR( oendataet USING dataet-O)EN DATASET dataet IN TET (ODE-

IF S01SUBR2 34 - 5RITE 6 te7t1e S01SUBR2-STO)-

ENDIF-

ENDFOR(-

FOR( cloedataet USING dataet-2OSE DATASET dataet-

ENDFOR(-

Include

DR16

The suroutine 5P7N3ATAS7T opens the seuentia fie

The suroutine 2+5S73ATAS7T coses the seuentia fie

copy SAP AG BC420 12-52

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 5388

02

983209 SAP AG 1999

9unction Modules for I Program

lient

Session name

Eold date

=eep session

D user name

RecordK

LI1T

BRUP

ELDDAT1

=11P

US1R

R1RD

DltP1ltBRUPDltP1ltBRUP

Transaction code

D table

TD1

DPRTA

DltIS1RTDltIS1RT

DltLS1ltBRUPDltLS1ltBRUP

pen Isessionpen Isession

Insert data for

transactions

Insert data for

transactions

lose I

session

lose I

session

The foo$ing function modues are provided for creating atch input sessions (function group

S2)

235P7N3ltamp54P

2reates a ne$ session and contains genera data for the $hoe session

23INS7ampT

Inserts a the data for a transaction into the session The transferred interna tae $ith the

structure 2ATA must contain a the data reuired for fuy processing the transaction

232+5S73ltamp54P

2oses the session after a the data has een inserted As soon as the session has een cosed it

can e processed

The interna tae $ith the structure 2ATA can ony contain atch input data for one singe

transaction run So the individua transactions are inserted into the atch input session in a oop

using severa 23INS7ampT cas

copy SAP AG BC420 12-53

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 5488

024

983209 SAP AG 2001

9unction Module DltP1ltBRUP

ALL 9UTI DltP1ltBRUPALL 9UTI DltP1ltBRUP

1PRTIB

LI1T client

BRUP session name

ELDDAT1 loc+ date

=11P delete flag

US1R bdc user name

R1RD recording

IMPRTIB

NID internal session +e(

11PTIS

1PRTIB

LI1T client

BRUP session name

ELDDAT1 loc+ date

=11P delete flag

US1R bdc user name

R1RD recording

IMPRTIB NID internal session +e(

11PTIS

-ith the function modue 235P7N3ltamp54P you can open a atch input session

The foo$ing parameters are mandatory

2+I7NT (cient)

ltamp54P (session name)

4S7amp (user name)

Note The 4S7amp must a$ays e specified This user name is reuired for processing the session

in atch mode

The foo$ing parameters are optiona

=5+AT7 specifies the eariest date on $hich the session can e started677P fag specifies $hether session shoud e deeted after it has een successfuy processed The

677P fag is ignored if the session contains errors

677P E K K means deete the session after processing (defaut vaue) H

677P E KGK means do not deete session

amp725amp E KGK ao$s you to create a recording instead of a I session

If gtI is specified the function modue returns the interna session ey This is needed to e ae to

differentiate sessions that have the same name

-ith 7G27PTI5NS you get various return vaues that can e ueried $ith SC9S4amp2

Note In onine mode the onine user is used for the authoriDation checs regardess of the user

name specified

copy SAP AG BC420 12-54

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 5588

022

983209 SAP AG 1999

Subprogram P1ltBRUP

P1ltBRUP

FOR( oen8rou-IF e9on -

2A FUN2TION BD2O)ENGROU) E)ORTING 2IENT lt1mandt GROU) 8rou USER uer KEE) kee

=ODDATE gtolddate-

ENDIF-ENDFOR(-

Include

DR16

The suprogram 5P7N3ltamp54P opens the atch input session

copy SAP AG BC420 12-55

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 5688

028

983209 SAP AG 1999

9unction Module DltIS1RT

ALL 9UTI DltIS1RTALL 9UTI DltIS1RT

IMPRT

TD1 Transaction code

PSTltLAL Update locall(

PRITIB print list

TAL1S DPRTA bdclttable

11PTIS

IMPRT

TD1 Transaction code

PSTltLAL Update locall(

PRITIB print list

TAL1S DPRTA bdclttable

11PTIS

-ith the function modue 23INS7ampT you can add transaction data to the session

Cou need an interna 2 tae to transfer the data

The foo$ing parameters are mandatory

T257 Transaction code

CNPamp5TA 2 tae

The foo$ing parameters are optiona

P5ST3+52A+ E KGK activates oca updating This means that the data to e updated is ept in the

appication server and updated in the ast step of the transaction This does not invove the update

process (For more information see course 28 Programming ataase 4pdates)

PampINTINlt E KGK 9 ists processed in I $i e printed immediatey -ith 7G27PTI5NS you get various return vaues that can e ueried $ith SC9S4amp2

copy SAP AG BC420 12-56

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 5788

023

983209 SAP AG 1999

Subprogram DltTRASATI

DltTRASATI

FOR( BD2TRANSA2TION USING tcode-

IF e9on -2A FUN2TION BD2INSERT

E)ORTING T2ODE tcode TABES D0N)ROTAB bdcdata-

ESE-

ENDIF-ENDFOR(-

T

Include

DR16

The suprogram 23TampANSA2TI5N moves the fied 2 tae either to a atch input session

or uses ca transaction to import the data into the system 5n the seection screen you can specify

$hether you $ant to create a session or you $ant to use ca transaction to process the data directy

The S7SSI5N fied is then set according to your seection

copy SAP AG BC420 12-57

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 5888

025

983209 SAP AG 1999

9unction Module DltLS1ltBRUP

ALL 9UTI DltLS1ltBRUP

11PTIS

TltP1 6

NU1U1lt1RRR amp

-ith the function modue 232+5S73ltamp54P you can cose a atch input session

In 7G27PTI5NS you get various return vaues that can e ueried $ith SC9S4amp2

copy SAP AG BC420 12-58

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 5988

027

983209 SAP AG 1999

Subprogram LS1ltBRUP

FOR( cloe8rou-IF e9on -cloe batcgt 9nut 8rou

2A FUN2TION BD22OSEGROU)-

ESE-IF e8rouoened -

2A FUN2TION BD22OSEGROU)-

ENDIF-ENDIF-

ENDFOR(-

LS1ltBRUPlose session

lose error session

Include

DR16

The suprogram 2+5S73ltamp54P coses the atch input session The suprogram differentiates

et$een a norma I session (S7SSI5N E G) and a session opened $hen ca transaction

encountered an error (73ltamp54P35P7N7 E G)

copy SAP AG BC420 12-59

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 6088

080

983209 SAP AG 1999

Subprograms DltDPRG Dlt9I1LD

DltDPR

Dlt9I1LD

FOR( bdc9eld USING nam al-IF al 34 nodata-2EAR bdcdata- bdcdata1nam nam- bdcdata1al al- A))END bdcdata-ENDIF-

ENDFOR(-

FOR( bdcdltnro USING ro8ram dltnro- 2EAR bdcdata-Bdcdata1ro8ram ro8ram-Bdcdata1dltnro dltnro-Bdcdata1dltnbe89n - A))END bdcdata-ENDFOR(-

Include

DR16

The incude 2amp72GG contains t$o suprograms 23CNPamp5 and 23FI7+

Suprogram 23CNPamp5 fis the 2 tae $ith program names and screen numers

Suprogram 23FI7+ fis the 2 tae $ith fied names and vaues

7ach suprogram creates an entry in the 2 tae

copy SAP AG BC420 12-60

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 6188

086

983209 SAP AG 1999

9illing the D Table

erorm bdcdltnro u9n8 SA)(FD +- erorm bdc9eld u9n8 BD22URSOR RFD1BUKRS- erorm bdc9eld u9n8 BD2OK2ODE 6- erorm bdc9eld u9n8 RFD1BUKRS record1BUKRS- erorm bdc9eld u9n8 RFD1KTOKD record1KTOKD-

erorm bdcdltnro u9n8 SA)(FD -

erorm bdc9eld u9n8 BD22URSOR KNA1S)RAS- erorm bdc9eld u9n8 BD2OK2ODE 6- erorm bdc9eld u9n8 KNA1NA(E record1NA(E-

erorm bdc9eld u9n8 KNA1SORT record1SORT-

Recording Benerated automaticall(

from the recording

)ERFOR( bdcdltnro USING SA)(FD +- )ERFOR( bdc9eld USING BD22URSOR RFD1BUKRS-)ERFOR( bdc9eld USING BD2OK2ODE 6-)ERFOR( bdc9eld USING RFD1BUKRS record1BUKRS-)ERFOR( bdc9eld USING RFD1KTOKD record1KTOKD-

)ERFOR( bdcdltnro USING SA)(FD -

)ERFOR( bdc9eld USING BD22URSOR KNA1S)RAS-)ERFOR( bdc9eld USING BD2OK2ODE 6-)ERFOR( bdc9eld USING KNA1NA(E record1NA(E-

)ERFOR( bdc9eld USING KNA1SORT record1SORT- ---

The 2 tae is fied $ith data from the recording The suroutines 23CNPamp5 and

23FI7+ are used for this

The suroutines are caed in the reuired structure or seuence

copy SAP AG BC420 12-61

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 6288

08amp

983209 SAP AG 1999

erie)

SAPDatabase

SeJuential9ile

SAPDatabase

ALL TRASATIALL TRASATI

SeJuential9ile

ATE IPUTATE IPUT

D TableD TableD TableD Table

I Monitor

T

In contrast to atch input you can use ca transaction to directy pass data to the diaog interface

$ithout using a atch input session Cou use an interna tae (2 tae same structure and ayout

as atch input) to temporariy store your screen data Then you ca the desired transaction in your

program

Note 5n average the 2a Transaction method is 8 to times faster than using atch Input

copy SAP AG BC420 12-62

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 6388

08

983209 SAP AG 1999

all Transaction Program$ 1ample

RE)ORT abcbdcdcdeb9ct-

)ARA(ETERS d9mode DEFAUT A

udmode DEFAUT S-FOR( calltranact9on-2A TRANSA2TION FD

USING bdcdata (ODE d9mode

U)DATE udmode-

IF lt1ubrc NE - 5RITE 6 ---

ENDIF-ENDFOR(-

Screen

00

Screen

100

Screen

An additiona system ro area is added for the caed transaction The system uses this area for

processing the individua screens in the transactionH the data from the tae is added here After the

transaction is processed the second ro area is reeasedH the system continues processing in the first

ro area

Notes

In contrast to atch input there is no error ogging (error sessions) here For processing the caed

transaction the system uses the authoriDations of the user that caed the transaction The 2 tae

can ony hod data for one transaction run at a time efore another transaction is caed and its data

can e added you must eecute a amp7Famp7S= for the 2 tae

copy SAP AG BC420 12-63

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 6488

084

983209 SAP AG 1999

ALL TRASATI C6

RE)ORT 777-

2A TRANSA2TION FD USING bdcdata (ODE E-

Default for MD1 is A

2A TRANSA2TION 3tranact9oncode4 USING 3bdc1table4 C (ODE A E N C-

-ith the parameter 57 you can seect a specific dispay mode for processing the transaction The

foo$ing three modes are avaiae

A (ispay a)

If you eecute the program a the screens and a their data are dispayed This is the defaut vaue

for the 57 in 2A++ TampANSA2TI5N

N (ispay nothing)

The screens are not dispayed at a regardess of $hether any of them contained errors As soon as

the transaction has een fuy processed contro is returned to your program (The vaue of the

parameter 4PAT7 determines $hether dataase updates are eecuted or not)

7 (ispay errors ony)As soon as an error occurs in a screen the transaction is s$itched to dispay mode so that you can

correct the errors

These dispay modes are the same as those in the atch input session processing

copy SAP AG BC420 12-64

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 6588

082

983209 SAP AG 1999

RE)ORT 777-

2A TRANSA2TION FD USING BD2DATA U)DATE -

ALL TRASATI Camp

RE)ORT 777-

2A TRANSA2TION FD USING bdcdata U)DATE -

2A TRANSA2TION 3tranact9oncode4 USING 3bdc1table4 C (ODE A E N C U)DATE A S C -

Default for UPDAT1 is A

-ith the parameter 4PAT7 you can contro ho$ dataase updates arising from a transaction are

carried out There are three options

A (asynchronous updating) The caed transaction does not $ait unti the dataase has een

updated it simpy for$ard the updates to the SAP update service This usuay speeds up the 2T

program This processing mode is N5T recommended for arge data sets as the caed transaction

does not receive a competion message from the update modue

The caing 2T program therefore cannot te if the transaction has een successfuy competed Cou

shoud use the updating administration function (transaction S8) to determine $hether updating

$as terminated eary The error anaysis correction functions for are ess hepfu than $ith

synchronous updating

S (synchronous updating) -ith synchronous updating the caed transaction $aits unti a the

updates have een competed So processing is so$er than $ith synchronous updating The caed

transaction can ho$ever report any updating errors to the program $hich maes error

anaysiscorrection easier

+ (local updating) $ith oca updating the dataase is not updated in a separate process it is

updated in the caers process (see appication hep documentation for the AAP ey$ord S7T

4PAT7 TAS6 +52A+)

copy SAP AG BC420 12-65

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 6688

088

983209 SAP AG 1999

ALL TRASATI C

RE)ORT 777-DATA mtab T0)E TABE OF bdcm8coll-

2A TRANSA2TION FD USING bdcdata (ESSAGES INTO mtab-

2A TRANSA2TION 3tranact9oncode4 USING 3bdc1table4 C (ODE A E N C U)DATE A S C (ESSAGES INTO 3metab4 C -

7SSAlt7S specifies that a system messages that are output during the eecution of a 2A++

TampANSA2TI5N are $ritten to the interna tae L7SSTA The interna tae must have the

structure 2Slt25++

4nie the cassica atch input processing $ith sessions 2A++ TampANSA2TI5N does not offer any

specia processing procedures for transactions containing errors There are no restart functions for

transactions that contain errors or that cause updating terminations

copy SAP AG BC420 12-66

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 6788

083

983209 SAP AG 1999

ALL TRASATI C4

RE)ORT 777-DATA mltot T0)E ctuaram-

2A TRANSA2TION FD USING BD2DATA

O)TIONS FRO( mltot-

2A TRANSA2TION 3tranact9oncode4 USING 3bdc1table4 C (ODE A E N C U)DATE A S C (ESSAGES INTO 3metab4 C O)TIONS FRO( ot C -

RE)ORT 777-DATA mltot T0)E ctuaram-2A TRANSA2TION FD USING bdcdata

O)TIONS FRO( mltot-

The addition 5PTI5NS enaes the ca transaction statement to e controed through a structure

The structure must have the dictionary type 2T43PAampAS

The addition 5PTI5NS Famp5 must not e comined either $ith the addition 57 or $ith

4PAT7 ore information on the net side

copy SAP AG BC420 12-67

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 6888

085

983209 SAP AG 1999

Structure TUltPARAMS

DISMD1 Procen mode anaoo o addon amp

UPDMD1 $pdae mode anaoo o addon $PA

ATTMD1 CA mode CA conro

D19SI1 orce de=a EndoE e drn procen

RAMMIT +o eD a Camp amp(

IPT +o a ac np eonF a F S-B+P SPAC

I1D +o a ac np eon a=er end o= BC daa

The components are defined as foo$s

The components 7FSIM7 ampA25IT N5INPT and N5I7N can have the foo$ing

vaues KGK E Ces or K K E No

If the addition 5PTI5NS Famp5 is not specified the foo$ing settings appy to the contro

parameters

IS57 from addition 57

4P57 from addition 4PAT7

2ATT57 2ATT not active

7FSIM7 o not not use defaut $indo$s siDe

ampA25IT Successfu eit at 25IT -5amp6

N5INPT atch input session active (SC9INPT E G)

N5I7N atch input session sti active after end of 2 data

copy SAP AG BC420 12-68

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 6988

087

983209 SAP AG 1999

SMSBID Message ID

SMSBT Message T(pe C1GIGWGSGA

SMSB Message umber

SMSB6 Message ariable 6

SMSBamp Message ariable amp

SMSB Message ariable

SMSB4 Message ariable 4

SMSBID Message ID

SMSBT Message T(pe C1GIGWGSGA

SMSB Message umber

SMSB6 Message ariable 6

SMSBamp Message ariable amp

SMSB Message ariable

SMSB4 Message ariable 4

Return code$

S(stem fields$

alue Meaning

0 Successful

6000 1rror in transaction

6000 1rror in processing call transaction

see also the s(stem fields specified

alue Meaning

0 Successful

6000 1rror in transaction

6000 1rror in processing call transaction

see also the s(stem fields specified

9ield name Meaning9ield name9ield name MeaningMeaning

Return ode and S(stem 9ields

The return code is used to specify $hether the caed transaction $as processed successfuy In

addition severa system fieds are fied The numer I type and variaes of the diaog message

output y the caed transaction Cou need this information to output the message tet

copy SAP AG BC420 12-69

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 7088

030

983209 SAP AG 1999

Benerated Program of the TA Recorder

REFRES= (ESSTAB-

2A TRANSA2TION tcode USING bdcdata (ODE ctumode U)DATE cudate (ESSAGES INTO metab-OO) AT metab- ENDOO)-IF lubrc 34 AND e8rou 34 S)A2E- IF e8rouoenend - 2A FUN2TION BD2O)ENGROU) E)ORTING ---------

--------- E8rouoened - ENDIF- 2A FUN2TION BD2INSERT E)ORTING T2ODE tcode TABES D0N)ROTAB bdcdata-ENDIF-REFRES= bdcdata-

Message table output

pen error session

Insert data record that

has errors into error

session

If you have seected ca transaction on the seection screen the generated program runs as foo$s

The onine transaction is caed $ith ca transaction and passed to tae 2ATA A the

messages arising during the ca transaction are put in the interna tae 7SSTA

7SSTA is output as a ist

If you have specified an error session ( 73ltamp54P L SPA27) on the seection screen and the

ca transaction comes across an error (+3S4amp2 L 0) the error session is opened The error

session is ho$ever ony opened once Then the data record is paced in the session

A the other data records that have errors $ith ca transaction are paced in the same session

copy SAP AG BC420 12-70

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 7188

036

983209 SAP AG 1999

The Transaction Recorder

PrinciplesPrinciples

Recording )ith the LSMWRecording )ith the LSMW

Principles of atch Input and all TransactionPrinciples of atch Input and all Transaction

Integrating the TA Program into the DWIntegrating the TA Program into the DW

Using the TA Recorder Using the TA Recorder

copy SAP AG BC420 12-71

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 7288

03amp

983209 SAP AG 1999

Integrating into the DW

Transfer program

AAP Dictionar(

Integrate

SDA0

SDA6

SDAamp

SDA

Cou can integrate the generated program into the G9- The structure of the fie must e created

in the AAP ictionary The taes SGA0 SGA8 SGA1 and SGA $i e fied

copy SAP AG BC420 12-72

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 7388

03

983209 SAP AG 1999

DW Release 42

Goo

-B eeae 45

aa ran=er ogtec

Int customer data transfer ob-ect

ecord =ed

Dece daa ran=er

d Goo

The ampunction ampor interatin TA recorder prora$s is

i$ple$ented in the

D+-B in Release

The recorder can e integrated as of ampeease and it is provided in the G9- ampeease

ltot to the G9- ampeease 5n the initia screen you can integrate programs y choosing ampoto

( +nt customer ata transfer o-ect

copy SAP AG BC420 12-73

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 7488

034

983209 SAP AG 1999

reating Program as D b-ect

Comer ran=er ogtec

ampgtec ype

Sor eD =or ogtec

aa ran=er proram

Srcre name

9900

(+A1

Cane comer

ZBCA+G

ZB

ustomer transfer ob-ect

umber bet)een 7000 and 7777

b-ect t(pe

Assignment to R ob-ect

Short tet for D ob-ectShort description

Data transfer program

ame of generated program

Structure name

A structure Cstructure la(out )ith this name is created in

the AAP Dictionar(

For ampeease transfer oects $ere not organiDed y 5amp oects ut y a G numer (00089

OOOO) The numer range O0009OOOO is reserved for customers

To create a connection to the ne$ G 9- you must assign the program to a 5amp oect

2reate a short tet for the G oect This tet $i appear in the method seection ist

Specify the program to e incuded

Specify a name for the structure to e created in the AAP ictionary

Note $he generated program appears under program type +N and not under program type

-

copy SAP AG BC420 12-74

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 7588

032

983209 SAP AG 1999

Adantages

Automatic program registration in the DW in

Release 48

ou can use all the functions defined for

standard ob-ects

1ception$ The (reate ampile ith data

function

If you incuded the oect in the ampeease $orench it is automaticay avaiae in the ampeease

B $orench

A the $orench functions are avaiae for your oect ecept for Create files ith transfer ata

copy SAP AG BC420 12-75

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 7688

038

983209 SAP AG 1999

ou are no) able to$

The Transaction Recorder$ Unit Summar(

Use the recording function in the LSMW to create

a batch input session )ith the data from the

eternal s(stem

Use the TA Recorder to create (our o)n data

transfer program

Anal(e programs that )or+ )ith batch input or

call transaction

Integrate the TA Recorder programs into the

DW

copy SAP AG BC420 12-76

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 7788

ercise 1

nit $ -ecorder

$opic 2reating etors

$ransaction -ecorder ercise 1

bull 2reating detors $ith eterna numer assignment

bull etor numers M9980008 to M9980080

Address data for detors $ith eterna numer assignment is to

e transferred using program ampFI700

ro4ect F5

Supro4ect +5

-un +575

$as)s 85 95 8S25

9oad program -F+00

8 In the foo$ing eercises eisting data is to e changed Therefore these detors $ith

eterna numer assignment have to first e created

898 4nder suproect 79 create run 797G9 $ith the name Detors ith

eternal numers

copy SAP AG BC420 12-77

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 7888

891 2reate the foo$ing three tass The tass map the foo$ing process steps

convert data create + session and process + session

89198 In run 797G9 create the foo$ing tas

9 Tas AP9

9 Name 2onvert data 9 Tas type AP

9 Program type +S-

Seect the foo$ing +S- oect

+S- proect 2109

+S- suproect 7I9

+S- oect I997GT

89191 In run 797G9 create the foo$ing tas 9 Tas +5A9

9 Name 2reate I session

Tas type +5A

9 Program type INP

Seect program ampFI700 $ith the variant

I97G9

8919 In run 797G9 create the foo$ing tas

9 Tas S29

9 Name Process I session Tas type S2

9 Program type amp7P5

Seect program ampS2S4 $ith the variant

S497G9

Note that you have to correct the seuence of the tass 2onvert data

create + session and process + session

4se the uttons

89 Start the run

The detors $i e created $ith eterna numer assignments

89 2hec in transaction F0 that the detors M9980008 to M9980080 have een

created

copy SAP AG BC420 12-78

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 7988

ercise

nit $ransaction -ecorder

$opic -ecording function in the 9S8(

bull 2reate a recording using the +S-

bull ltenerate a atch input session

2hange the detor address data in the amp System

Name of the recording +

Name of the file +2055+F9

8 2reate the recording 7I3 using the +S- ampecord the transaction F01 (2hange

detor)

898 efore you create the recording first test the transaction onineQ

For the recording use detor M9980008 5n the initia screen of the F01

maintain the foo$ing fieds ony

etor etor M9980008

2ompany code 0008

Address data seect

Note $he data record must e saved hile recording

891 aintain the names and the descriptions for the foo$ing fieds

Name city street posta code and teephone numereete a other fieds in screen 880 from the recording (eg S5ampT+ +AN8

SPampAS)

4se the same technica names as sho$n in the tae eo$ (automatic fied

mapping)

copy SAP AG BC420 12-79

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 8088

1 2reate the suproect 7I9 and the ne$ oect TA3 in your proect 2109

aintain the oect attriutes and seect the item atch input recording Seect your

recording 7I3

2reate the source structure address

2reate the source fieds according to the tae eo$ 5r copy them from proect 2109S37N suproect 7I900 oect TA900

198 Fie setup The data from the egacy system are dispayed in the foo$ing tae

Fied name Fied type Fied ength escription

N5 2 8B etor numer

NA7 2 Name

STamp77T 2 Street

2ITC 2 2ityPace of residence

MIP 2 80 Posta code

T7+ 2 8B Teephone numer

191 aintain the fied mapping 4se the automatic fied mapping (via menu item

7tras)

19 Specify the fies 5ny maintain the fie name of the source fie

Name of the fie 21099IFI+7

2odepage 8800

19 Import the data and convert them ispay the data in each caseQ

19 2reate a atch input session

19B ampun the atch input session

copy SAP AG BC420 12-80

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 8188

ercise 3

nit $ransaction -ecorder

$opic -ecording ith the $ -ecorder

bull ltenerate a recording using the TA recorder

bull Test the recording

2hange the address data of detors in the amp system

Name recording $+

Name of the file +2055+F9

8 2reate the recording TA37I3 using the transaction recorder ampecord the

transaction F01 (change detor)

898 4se detor M9980008 for the recording 5n the F01 initia screen ony

maintain the foo$ing fieds

etor etor M9980008

2ompany 2ode 0008

Address data seect

Note $he data record must e saved hen recording

eete a fieds that do not eist in the source fie 21099IFI+7 from screen

880 in the recording (eg 6NA89S5ampT+ 6NA89+AN8 6ANNQ9SPampAS) Note o not deete fieds ampF01946ampS and ampF0190880

Save the recording no$

1 S$itch to the recordings overvie$

198 Process the recording $ith the processing mode A (dispay a)

191 Process the recording $ith the processing mode RN (no dispay)

19 If the recording has een tested and no error has occurred generate a I session

and run it using the I monitor If an error shoud occur generate the recordingagainQ

copy SAP AG BC420 12-81

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 8288

From the recording generate the program M21037I3 in your deveopment cass

2109 Seect the foo$ing

bull ampead fied contents from fie

bull 2reate test data in the fie 2103dei3test3tt

98 Save this program and eecute it ltenerate one I session each and process it

2arry out the same steps again using the ca transaction

The generated program shoud no$ e changed so that fie 21099IFI+7 can e

read and processed

98 2hange the defaut vaue of the fie name (parameter dataset) in 21099

IFI+7

91 2hange the structure definition eete the company code fied and the address

data checo from the structure

9 2hange the su9routine ca perform dc3fied for the company code (KampF019

46ampSK) so that the vaue 0008 is transferred

9 2hange the su9routine ca perform dc3fied for the address data checo

(KampF0190880K) so that the vaue G is transferred

9 Start the program again and read the data from the fie 21099IFI+7 $ith

detor data ltenerate a I session $ith it and run it

copy SAP AG BC420 12-82

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 8388

033 Include DR16INCLUDE BDCRECX1

SELECTION-SCREEN BEGIN OF LINE

PARAMETERS SESSION RADIOBUTTON GROUP CTU create sessi SELECTION-SCREEN COMMENT $amp TEXT-S FOR FIELD SESSION

se(ecti-scree )siti +

PARAMETERS CTU RADIOBUTTON GROUP CTU ca(( trasacti

SELECTION-SCREEN COMMENT $amp TEXT-S FOR FIELD CTU

SELECTION-SCREEN END OF LINE

SELECTION-SCREEN BEGIN OF LINE

SELECTION-SCREEN COMMENT $amp TEXT-S1 FOR FIELD GROUP

se(ecti-scree )siti $+

PARAMETERS GROUP1$amp r) ae 0 sessi

SELECTION-SCREEN COMMENT $amp TEXT-S+ FOR FIELD CTUMODE

se(ecti-scree )siti

PARAMETERS CTUMODE LIE CTU2PARAMS-DISMODE DEFAULT 3N3

A4 s56 a(( 78)rs

E4 s56 78)r errr (8

N4 7 t 7is)(a8 78)r

SELECTION-SCREEN END OF LINE

SELECTION-SCREEN BEGIN OF LINE

SELECTION-SCREEN COMMENT $amp TEXT-S$ FOR FIELD USER

se(ecti-scree )siti $+

PARAMETERS4 USER1$amp DEFAULT S9-UNAME ser 0r sessi i atc5

SELECTION-SCREEN COMMENT $amp TEXT-S FOR FIELD CUPDATE

se(ecti-scree )siti

PARAMETERS CUPDATE LIE CTU2PARAMS-UPDMODE DEFAULT 3L3

S4 s8c5rs(8

A4 as8c5rs(8

L4 (ca(

SELECTION-SCREEN END OF LINE

SELECTION-SCREEN BEGIN OF LINE

SELECTION-SCREEN COMMENT $amp TEXT-S FOR FIELD EEP

se(ecti-scree )siti $+

PARAMETERS4 EEP AS CltECBOX 3 3 = 7e(ete sessi i0 0iis5e7

3X3 = gtee) sessi i0 0iis5e7

SELECTION-SCREEN COMMENT $amp TEXT-S FOR FIELD E2GROUP

copy SAP AG BC420 12-83

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 8488

se(ecti-scree )siti

)araeters E2GROUP1$amp r) ae 0 errr-sessi

SELECTION-SCREEN END OF LINE

SELECTION-SCREEN BEGIN OF LINE

SELECTION-SCREEN COMMENT $amp TEXT-S FOR FIELD ltOLDDATE

se(ecti-scree )siti $+

PARAMETERS4 ltOLDDATE LIE S9-DATUM

SELECTION-SCREEN COMMENT +11amp TEXT-S$ FOR FIELD E2USER

se(ecti-scree )siti

PARAMETERS4 E2USER1$amp DEFAULT S9-UNAME ser 0r errr-sessi

SELECTION-SCREEN END OF LINE

SELECTION-SCREEN BEGIN OF LINE

SELECTION-SCREEN COMMENT +11amp TEXT-S FOR FIELD E2EEP

se(ecti-scree )siti

PARAMETERS4 E2EEP AS CltECBOX 3 3 = 7e(ete sessi i0 0iis5e7

3X3 = gtee) sessi i0 0iis5e7

SELECTION-SCREEN END OF LINE

SELECTION-SCREEN BEGIN OF LINE

SELECTION-SCREEN COMMENT +11amp TEXT-S FOR FIELD E2ltDATE

se(ecti-scree )siti

PARAMETERS4 E2ltDATE LIE S9-DATUM

SELECTION-SCREEN END OF LINE

SELECTION-SCREEN SIP

SELECTION-SCREEN BEGIN OF LINE

SELECTION-SCREEN COMMENT 1amp TEXT-S1 FOR FIELD NODATA

PARAMETERS4 NODATA DEFAULT 33 LOER CASE 7ata

SELECTION-SCREEN END OF LINE

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

Batc5i)t7ata 0 si(e trasacti

DATA4 BDCDATA LIE BDCDATA OCCURS ITlt ltEADER LINE

essaes 0 ca(( trasacti

DATA4 MESSTAB LIE BDCMSGCOLL OCCURS ITlt ltEADER LINE

errr sessi )ee7 3 3 r 3X3amp

DATA4 E2GROUP2OPENED

essae tets

TABLES4 T1

copy SAP AG BC420 12-84

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 8588

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

at se(ecti scree

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

AT SELECTION-SCREEN

r) a7 ser st e 0i((e7 0r create sessi

IF SESSION = 3X3 AND

GROUP = SPACE OR USER = SPACE

MESSAGE E1MSamp

ENDIF

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

)e 7ataset

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

FORM OPEN2DATASET USING P2DATASET

OPEN DATASET P2DATASET IN TEXT MODE

IF S9-SUBRC

RITE4 TEXT-E S9-SUBRC

STOP

ENDIF

ENDFORM

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

c(se 7ataset

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

FORM CLOSE2DATASET USING P2DATASET

CLOSE DATASET P2DATASET

ENDFORM

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

create atc5i)t sessi

t 0r ca(( trasacti siamp

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

FORM OPEN2GROUP

IF SESSION = 3X3

SIP

RITE4 $amp 3Create r)3I1amp GROUP

SIP

)e atc5i)t r)

CALL FUNCTION 3BDC2OPEN2GROUP3

EXPORTING CLIENT = S9-MANDT

copy SAP AG BC420 12-85

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 8688

GROUP = GROUP

USER = USER

EEP = EEP

ltOLDDATE = ltOLDDATE

RITE4 amp 3BDC2OPEN2GROUP3I$amp

1$amp 3retrc7e43I+amp

S9-SUBRC

ENDIF

ENDFORM

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

e7 atc5i)t sessi

ca(( trasacti si4 errr sessiamp

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

FORM CLOSE2GROUP

IF SESSION = 3X3

c(se atc5i)t r)

CALL FUNCTION 3BDC2CLOSE2GROUP3

RITE4 amp 3BDC2CLOSE2GROUP3Iamp

1$amp 3retrc7e43I+amp

S9-SUBRC

ELSE

IF E2GROUP2OPENED = 3X3

CALL FUNCTION 3BDC2CLOSE2GROUP3

RITE4

RITE4 amp 3Fe5(era))e 6r7e eret3Iamp

ENDIF

ENDIF

ENDFORM

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

Start e6 trasacti accr7i t )araeters

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

FORM BDC2TRANSACTION USING TCODE

DATA4 L2MSTRINGamp

DATA4 L2SUBRC LIE S9-SUBRC

atc5 i)t sessi

IF SESSION = 3X3

CALL FUNCTION 3BDC2INSERT3

EXPORTING TCODE = TCODE

TABLES D9NPROTAB = BDCDATA

RITE4 3BDC2INSERT3Iamp

copy SAP AG BC420 12-86

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 8788

TCODE

3retrc7e43I+amp

S9-SUBRC

3RECORD43

S9-INDEX

ca(( trasacti si

ELSE

REFRESlt MESSTAB

CALL TRANSACTION TCODE USING BDCDATA

MODE CTUMODE

UPDATE CUPDATE

MESSAGES INTO MESSTAB

L2SUBRC = S9-SUBRC

RITE4 3CALL2TRANSACTION3

TCODE

3retrc7e43I+amp

L2SUBRC

3RECORD43

S9-INDEX

LOOP AT MESSTAB

SELECT SINGLE FROM T1 ltERE SPRSL = MESSTAB-MSGSPRA

AND ARBGB = MESSTAB-MSGID

AND MSGNR = MESSTAB-MSGNR

IF S9-SUBRC =

L2MSTRING = T1-TEXT

IF L2MSTRING CS 313

REPLACE 313 ITlt MESSTAB-MSGH1 INTO L2MSTRING

REPLACE 3$3 ITlt MESSTAB-MSGH$ INTO L2MSTRING

REPLACE 33 ITlt MESSTAB-MSGH INTO L2MSTRING

REPLACE 33 ITlt MESSTAB-MSGH INTO L2MSTRING

ELSE

REPLACE 33 ITlt MESSTAB-MSGH1 INTO L2MSTRING

REPLACE 33 ITlt MESSTAB-MSGH$ INTO L2MSTRING

REPLACE 33 ITlt MESSTAB-MSGH INTO L2MSTRING

REPLACE 33 ITlt MESSTAB-MSGH INTO L2MSTRING

ENDIF

CONDENSE L2MSTRING

RITE4 MESSTAB-MSGT9P L2MSTRING$+amp

ELSE

RITE4 MESSTAB

ENDIF

ENDLOOP

copy SAP AG BC420 12-87

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 8888

SIP

Eree 0e5(era))e

IF L2SUBRC AND E2GROUP SPACE

IF E2GROUP2OPENED = 3 3

CALL FUNCTION 3BDC2OPEN2GROUP3

EXPORTING CLIENT = S9-MANDT

GROUP = E2GROUP

USER = E2USER

EEP = E2EEP

ltOLDDATE = E2ltDATE

E2GROUP2OPENED = 3X3

ENDIF

CALL FUNCTION 3BDC2INSERT3

EXPORTING TCODE = TCODE

TABLES D9NPROTAB = BDCDATA

ENDIF

ENDIF

REFRESlt BDCDATA

ENDFORM

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

Start e6 scree

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

FORM BDC2D9NPRO USING PROGRAM D9NPRO

CLEAR BDCDATA

BDCDATA-PROGRAM = PROGRAM

BDCDATA-D9NPRO = D9NPRO

BDCDATA-D9NBEGIN = 3X3

APPEND BDCDATA

ENDFORM

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

Isert 0ie(7

Page 4: BC420_46C - 012The Transaction Recorder

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 488

04

983209 SAP AG 1999

The TA Recorder

Principles of RecordingPrinciples of Recording

Recording )ith the LSMWRecording )ith the LSMW

Using the TA Recorder Using the TA Recorder

Principles of I and TPrinciples of I and T

Integrating the TA Recorder into the DWIntegrating the TA Recorder into the DW

copy SAP AG BC420 12-4

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 588

02

983209 SAP AG 1999

erie) of Transaction Recorder

Flat SAP

Structure

SAP Record

Layout

Structure

SAP IDoc

Structure

API

If the SAP standard program does not provide the functions you need for data transfer you can use

the transaction record

Note For data transfer the transaction (TA) recorder reuires a fat fie that is a fie $ithout any

hierarchy or sustructures

copy SAP AG BC420 12-5

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 688

08

983209 SAP AG 2001

Uses of the TA Recorder

Flat SAP

Structure

atch

Input

all

Transaction

The TA ampecorder enaes you to transfer data into amp using atch input or ca transaction

The TA ampecorder can ony $or $ith a fat structure Fies $ith different record structures (for

eampe header structure) cannot e used

The TA ampecorder is used in the +S- to create recordings of transactions atch input sessions can

e created from the recordings

The TA ampecorder can itsef eecute a data transfer from the recording using atch input or ca

transaction

copy SAP AG BC420 12-6

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 788

03

983209 SAP AG 1999

The Recording

Recording

Screen

9ield alue

9ield nameModule pool

Transaction

Screen

111

Screen

106

Screen

130

The TA ampecorder can record transactions The recorder must e activated efore the transaction is

processed Then you can run the transaction as though you $ere processing it onine

After the transaction has finished the recording $i contain a the screen numers fied names

fied vaues and the associated modue poo and transaction code

copy SAP AG BC420 12-7

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 888

05

983209 SAP AG 1999

hanging ustomer Data$ Initial Screen

Vendor

Company code

Z-88-10000

Screen

106

Genera daa9ield ontents

BCC$Samp $SZAVBCamp(Camp )00

02-($++ -88-10000

02-0110

02-0130

$SZAV

9ield ame

Transaction 9D0amp

Addre

In the aove eampe the transaction Change customer F01 is recorded

In addition to the screen fieds the fieds 2324ampS5amp and 2356257 are aso

automaticay recorded

Note

You must change the field values for all the fields required later for the transfer For the

recording a change can simply mean overriting one single character in a field ith the

same character

f fields are to e filled using S$amp$ parameters the value must also e changed

(ith online transactions screen sequences may appear that are different than in therecording

copy SAP AG BC420 12-8

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 988

07

983209 SAP AG 1999

hanging ustomer Data$ Address

ustomer 5560000

+ame

Searc erm

Addre

Screen

111

9ield ontents

BCamp(Camp $PABCS$BSC SAPSZA1 0300ASS

BCS$BSC SAPSZA1 0301Camp$

BCC$Samp A1AA-amp$S+$1

A1AA-S Garden Sree

A1AA-amp$S+$1 02105

9ield ame

If there is a suscreen on the screens this is automaticay recorded In the recording the fied

23S4S2amp77N containing the name of the suscreen appears

-ith customer master data the address is a suscreen area The centra address management is

integrated here A the address input fieds are dispayed on one suscreen

2entra address management is ony used if you specificay seect this option on the initia screen

copy SAP AG BC420 12-9

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 1088

060

983209 SAP AG 1999

Results of the Recording

Recording

SAPM90ampD 0608

DltURSR R90ampD=UR

Dlt=D1 gt00

R90ampD=UR 5560000

R90ampDD0660

US1ltA

SAPM90ampD 0666

Dlt=D1 UPDA

DltSUSR SAPLSA6 000ADDR1SS DltSUSR SAPLSA6 006UTRltSR11

DltURSR SA6ltD0600T1LltUM1R

ADDR6ltDATASTR11T 4 Barden Street

ADDR6ltDATAPSTltD1 0amp602

ADDR6ltDATAIT6 oston

SA6ltD0600T1LltUM1 8638257755

The resut of the recording is a ist of a the fieds and fied vaues that $ere changed in the

recording

copy SAP AG BC420 12-10

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 1188

066

983209 SAP AG 1999

Special Recording 9ields

9unction code triggered on

this screen

9ield name )here cursor

)as last positioned on the

screen

Comer

Company code

Z-88-10000

Genera daa

Dlt=D1

DltURSR

uring a recording the foo$ing additiona fieds are automaticay recorded

The BDC_OKCODE fied contains the function code triggered on the screen

The BDC_CURSOR fied contains the fied name of the ast fied the cursor $as positioned in

efore eiting the screen

copy SAP AG BC420 12-11

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 1288

06amp

983209 SAP AG 1999

Determining the 9ield ame

Technical info

Screen field

R90ampD =UR

Comer

Company code

Z-88-10000

Genera daa

96help

Sa

Program SAPM90ampDScreen number 608

The information recorded in the TA recorder can aso e dispayed onine for each transaction

To find out the current modue poo name and the screen numer choose Systemrarr Status from the

menu

To determine the fied name pace the cursor on a fied and seect F8 hep The name of the screen

fied can e found under technical information

copy SAP AG BC420 12-12

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 1388

06

983209 SAP AG 1999

Subscreens

Comer Z-88-10000

+ame

+ame

ADDR6ltDATAAM16

DltSUSR

Information$

ode poo name

Screen nmer

Screen name

Some screens contain suscreen areas

To determine the fied name pace the cursor on the fied and choose F1 The name of the screen

fied is specified under Technical info

copy SAP AG BC420 12-13

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 1488

064

983209 SAP AG 2001

Tabstrips

$er Roberts

1ample$ User Profile Defaults

Sar men +

oon anae

ampp dece Pr1

ParameerDefaults

DltSUSR

USD19AULTSSPLD

The tastrip eement sho$n is used on the aintain User rofile (5$n data) screen

4nder the tastrip tite Defaults the user can set various vaues such as the defaut printer

The user profie are user9dependent settings (as the name impies)

copy SAP AG BC420 12-14

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 1588

062

983209 SAP AG 1999

Step Loops and Table ontrols

1ample$ an+ Details

Comer

ntr( an+ +e( Account

08154711

123456789

Z-00-12345

an+ Details

00708155546344536

Banlt daa

==A=C06)

==A=C0amp)

Step oops and tae contros are treated identicay for the recording

The fied names of the fieds isted are the same for every ro$

7ach ro$ contains a customers an detais The fieds must e accessed using an inde (this is

specified as an addition to the fied name for eampe 6N69AN6N(1) The inde must match

the ro$ numer

5ny the visie fieds on a screen can e fied $ith data If some fieds are ony visie after paging

the paging must e recorded as $e This means that for the recording you must eecute a the steps

in the onine transaction

For eampe age on $oud e eecuted using the function code 1 (Paging icons)

Paging to the end of a ist 1Page up 11

lto to first page 18

copy SAP AG BC420 12-15

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 1688

068

983209 SAP AG 2001

Recording Buidelines

Test the transaction before recording

Start the recording

hange field alues onl( for fields

releant to the recording

As of 48 all filled fields are recorded

Transaction must be properl( eitedCSA1

Use of scroll bars cannot be recorded

Specia recording notes

F8 F and your o$n F8 and F hep (Pamp527SS 5N =7+P9amp7gt47ST Pamp527SS 5N A+479

amp7gt47ST) are not recorded This aso appies to a commands under the System and $el

menus aues for defaut variants ( transaction variants) are not incuded

7rror and $arning diaogs are not recorded 5ny the 56 code and the fied contents reuired for

further processing on the current screen are recorded

Note uring recording the data entered is $ritten to the dataase

copy SAP AG BC420 12-16

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 1788

063

983209 SAP AG 2001

1n-o( SAP ontrols and Data Transfer

bull SAP Picture ontrolbull SAP ETML ie)er ontrol

bull SAP Tet 1dit ontrol

bull AL Brid ontrol

bull SAP Tree ontrol

bull

ranch 6

ranch amp

Root

These and other controls do not support batch input$

Root

ranch amp

ranch amp6

The ne$ 7noy SAP contros deveoped for ampeease B do not support atch input or ca

transaction

=o$ever tae contros and tastrips do support atch input

copy SAP AG BC420 12-17

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 1888

065

983209 SAP AG 1999

The Transaction Recorder

PrinciplesPrinciples

Recording )ith the LSMWRecording )ith the LSMW

Principles of atch Input and all TransactionPrinciples of atch Input and all Transaction

Integrating the TA Program into the DWIntegrating the TA Program into the DW

Using the TA Recorder Using the TA Recorder

copy SAP AG BC420 12-18

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 1988

067

983209 SAP AG 1999

Session

generator

Recording Using the LSMW

-ith the +S- you can create your o$n recordings

The +S- uses the standard TA recorder here yet evauates the recording itsef The information

from the recording is used to create atch input sessions

The created atch input session can e processed as usua $ith the atch input monitor

Note As $ith the standard procedure it is euay important that the data is converted

copy SAP AG BC420 12-19

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 2088

0amp0

983209 SAP AG 1999

reating Recording

Admnraon

ecordn

Goo

ame of recording

Description

)ner

ame of transaction

Start recording

lto into the +S- and seect the menu path ampoto (Recorings An overvie$ of a previousy

created recordings for your proect are dispayed To start a ne$ recording seect Create

To create a recording you must define the name the description and the o$ner

7nter the name of the transaction you $ant to record

7ecute the transaction and compete it propery

Note ampecordings are assigned to ony one proect 9 so the name of the recording must e uniue

copy SAP AG BC420 12-20

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 2188

0amp6

983209 SAP AG 1999

hanging ustomer Data$ Initial Screen

9ield ontents

BCC$Samp $SZAV

BCamp(Camp )00

02-($++ -88-10000

02-0110

02-0130

$SZAV

9ield ame

Comer

Company code

Z-88-10000

Genera daa

Comer Z-88-10000

+ame

9ield ontents

BCamp(Camp $PA

BCS$BSC SAPSZA1 0300ASS

BCS$BSC SAPSZA1 0301Camp$

BCC$Samp SZA10100-+$B

A1AA-S Garden Sree

A1AA-amp$S+$1 34

A1AA-PampSCamp1 02105

9ield ame

Screen

111

Screen

106

In the aove eampe the transaction Change customer F01 is recorded

Note

You must ma)e some modification to the field values for all the fields you ant to capture

for the data transfer For the purposes of recording a change can simply mean overriting

one single character in a field ith the same character

ven if fields are to e filled using S$amp$ parameters the values must still e changed on

the screen in order to capture them

(ith online transactions screen sequences may appear that are different than in the

recording

copy SAP AG BC420 12-21

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 2288

0ampamp

983209 SAP AG 1999

Results

RecordingRecording R1lt6 Demolt6

9D0amp hange customer Caccounting

SAPM90ampD 0608

DltURSR R90ampD=UR

Dlt=D1 gt00

R90ampD=UR 5560000

R90ampDD0660

US1ltA

SAPM90ampD 0666

Dlt=D1 UPDA

DltSUSR SAPLSA6

DltSUSR SAPLSA6

DltURSR SA6ltD0600T1LltUM1

ADDR6ltDATASTR11T 4 Barden Street

ADDR6ltDATAPSTltD1 0amp602

ADDR6ltDATAIT6 oston

SA6ltD0600T1LltUM1 8638257755

The resuts of the recording using the +S- are dispayed in a tree structure

After the recording has finished you can edit it Cou can deete fieds or add ne$ ones

copy SAP AG BC420 12-22

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 2388

0amp

983209 SAP AG 1999

Assigning 9ield ames

Recording R16 Demolt6

Dlt=D1 UPDA

DltSUSR SAPLSA6

DltSUSR SAPLSA6

DltURSR SA6ltD0600T1L

ADDR6ltDATAAM16 Lisa Eofmeister

ADDR6ltDATAPSTltD1 0amp602

ADDR6ltDATAIT6 oston

ame

+ame

ecrpon

e=a ae

A1AA-+A1

A1AA-+A1

Comer name

a o=meer

Screen =ed

ustomer name

double clic+

Cou can assign names for each recorded fied The specia fieds (2356257 2324ampS5amp

and 23S4S2amp77N) are not incuded here Cou can choose the fied names -hen the atch

input session is created the contents of these fieds are assigned to the target fieds specified in the

eft coumn

Functions

efaut Assigns to the fied names of the underying target fied and its fied description

ampeset eetes fied name and fied description

oue cic 7dits fied name fied description and defaut vaue

Note Cou can use fied names more than once =o$ever the fied name is ony avaiae once in thefied mapping For this reason it is not practica to use fied names more than once

For a those fieds for $hich you do not assign a name the defaut vaue is used $hen the atch

input session is created These defaut vaues can e seen as constants This is especiay usefu for

chec oes (for eampe 08 vie$ seection)

The +S- supports automatic fied mapping Source fieds and target fieds can e assigned to each

other automaticay The fieds are assigned to the corresponding fieds of the same name Therefore

the fied names of the source structure shoud e given the same or simiar names as the fied names

in the target structure

copy SAP AG BC420 12-23

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 2488

0amp4

983209 SAP AG 2001

Addinggtremoing screen fields

Repeating recording

9or identical field names the name and description are

assigned automaticall(

1diting Recording

02-($++

(+A1-A+

(+A1-+A1

(+A1-Samp

(+A1-+A2

(+A1-SAS

Comer accon nmer

e

+ame 1

Sor =ed

+ame 2

Sree

Selection of all

aailable screen

fields

Cou can ater add ne$ screen fieds if you need to 6eep in mind that fieds shoud ony e added in

paces $here they are aso provided on the screen other$ise you $i get an error $hen the I

session is processed

After saving you $i get the message The data has een saved successfuy No$ the recordings

are avaiae for the oect attriutes

If you repeat the recording you can record a ne$ screen seuence $ith ne$ fieds Provided that the

fied names (eg 6NA89NA78) are identica the names and descriptions are automaticay

assigned

copy SAP AG BC420 12-24

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 2588

0amp2

983209 SAP AG 1999

b-ect T(pe and Import Method$ Recording

Standard atch Input gt Direct Input

atch Input Recording

API

IDoc

ampgtec ype ) mpor meod

Bac np recordn

ecordn ec1

The recording is no$ avaiae $ith the oect attriutes

Net you create a proect or su9proect in the +S- and specify process the data transfer

Cou eecute the data transfer as in the standard system

efine the source fieds and structures

efine the fied mapping

ampead and convert the data

2reate and import a atch input session

copy SAP AG BC420 12-25

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 2688

0amp8

983209 SAP AG 1999

The Transaction Recorder

PrinciplesPrinciples

Recording )ith the LSMWRecording )ith the LSMW

Principles of atch Input and all TransactionPrinciples of atch Input and all Transaction

Integrating the TA Program into the DWIntegrating the TA Program into the DW

Using the TA Recorder Using the TA Recorder

copy SAP AG BC420 12-26

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 2788

0amp3

983209 SAP AG 1999

Transaction Recorder

Online

Transaction

RecordingTransfer Program

T

Included in the Batch Input Monitor

Cou use the transaction recorder to record transactions and then use the transaction recording to

generate a transfer program The program ao$s you to transfer data using either atch input or ca

transaction

copy SAP AG BC420 12-27

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 2888

0amp5

983209 SAP AG 1999

hanging ustomer Data$ Initial Screen

9ield ontents

BCC$Samp $SZAV

BCamp(Camp )00

02-($++ Z-88-10000

02-0110

02-0130

$SZAV

9ield ame

Comer

Company code

Z-88-10000

Genera daa

Comer Z-88-10000

+ame

9ield ontents

BCamp(Camp $PA

BCS$BSC SAPSZA1 0300ASS

BCS$BSC SAPSZA1 0301Camp$

BCC$Samp SZA10100-+$B

A1AA-S Garden Sree

A1AA-amp$S+$1 34

A1AA-PampSCamp1 02105

9ield ame

Screen

111

Screen

106

In the aove eampe the transaction Change customer F01 is recorded

copy SAP AG BC420 12-28

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 2988

0amp7

983209 SAP AG 2001

hange Debitor$ Pa(ment Transactions C6

Banlt dea

Screen

10

9ield ontent

BCC$Samp (+B(-BA+(+01

BCamp(Camp BA+((+B(-BA+(S01

(+B(-BA+(01 12345679

(+B(-BA+(+01 22222222

Debitor 5560000

9ield ame

Inde

copy SAP AG BC420 12-29

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 3088

00

983209 SAP AG 1999

hanging ustomer Data$ Pa(ment Transactions Camp

Addre

an+ countr( US

an+ code 6amp42837

Banlt dea

ustomer 5560000

9ield ontents9ield ame

BCC$Samp (+A1-(+ZA

BCamp(Camp $PA

(+B(-Z01

Screen

10

Screen

100

SAPLBA

9ield ontents

BCC$Samp B+(A-BA+(A

BCamp(Camp +

B+(A-BA+(A +aona Banlt

9ield ame

In different transactions the modue poo may change This is the case $ith for eampe customer

master data The TA recorder records modue poo changes automaticay

copy SAP AG BC420 12-30

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 3188

06

983209 SAP AG 1999

Eierarch( Displa( of the Recording

02amp

02

SAP02 0106

BCC$Samp 02-0130

BCamp(Camp )00

02-($++ -88-10000

02-0110

02-0130

SAP02 0111

BCamp(Camp V

BCC$Samp A1AA-amp$S+$1

A1AA-S Garden Sree

Recording

-ith the TA recorder the resuts are aso a ist in a hierarchy dispay =o$ever you cannot assign

your o$n fied names as you can in the +S-

copy SAP AG BC420 12-31

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 3288

0amp

983209 SAP AG 1999

Recording erie)

Recording

Transfer program

9unction module

ontains onl( the data

from the recording

Test data

Test

reate

reate

reate

reate

1dit hange recording

Process recording

Cou can edit the recording as needed

The recording can e tested and eecuted again The screens are run through in the same $ay as in

the recording

The recording can then e used to create

atch input sessions

Test data

ata transfer programs $ith atch input or ca transaction

Function modues

copy SAP AG BC420 12-32

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 3388

0

983209 SAP AG 1999

1 02 BS

2 SAP02 106

3 BCC$Samp $SZAV

4 BCamp(Camp )00 5 02-($++ -88-10000

6 02-0110

7 02-0130

8 $SZAV

9 SAP02 111

10 BCamp(Camp V

11 BCC$Samp A1AA-amp$S+$1

12 A1AA-S Garden Sree

Program Screen St 9ield ame 9ield alue

Recording 1ditor

Recording

Add gt delete lines 9ormat chec+

Import gt eport of recording

In the editor you can add or deete ines Cou can aso change the contents of individua ines

-ith the function Chec) you can specify $hether the edited version of the recording sti has the

correct synta

Cou can aso eport import recordings to from a seuentia fie

After editing save the recording changes

copy SAP AG BC420 12-33

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 3488

04

983209 SAP AG 1999

Recording Seeral Transaction Runs

RecordingF

Directl( after the first recordingG or

In the displa( mode of the recording

In this step you can record additiona transactions and add additiona transaction runs to the

recording

Cou can record the additiona transactions directy after a recording or in the edit screen of a

recording

copy SAP AG BC420 12-34

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 3588

02

983209 SAP AG 1999

1ditor$ Importing and 1porting Recordings

6 T 9D0amp S

amp SAPM90ampD 608

DltURSR

4

2

8 SAPM90ampD 666

60

66

Program Screen St 9ield name 9ield alue

cempA

e name

aa =orma

cemp

A

e name

aa =orma

1port

Import

Presentation Serer

If the editor functions in the systems do not provide a the functions you need you can do$noad the

recording to your presentation server using the Eort function and then edit the recording using a

P2 editor

Cou use the Import function to import the data ac into the amp System ae sure the fie is sti in

the correct format

copy SAP AG BC420 12-35

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 3688

08

983209 SAP AG 1999

Processing the Recording

Recording

Process )ith ALL TRASATI

Parameer

Proce mode$pdae mode

CA mode

e=a e

Con a=er comm

+o a B eon

nd +o a B mode

A

A

T

The recording can e eecuted directy The data from the recording is used and the transaction is

processed $ith ca transaction

2a transaction provides a range of options for caing appication transactions $hich are discussed

on the foo$ing t$o pages

copy SAP AG BC420 12-36

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 3788

03

983209 SAP AG 1999

Process mode

Update mode

ATT mode

Processing Recording )ith T 6

A

1

Displa( all screens

Displa( errors onl(

o displa(

L

S

A

Local

S(nchronous

As(nchronous

A

o ATT

ATT )ithout indiidual screen control

ATT )ith indiidual screen control

Processing mode

=ere you can specify the processing mode 9 it is the same as the processing mode for atch input

4pdate mode

=ere you can specify the update mode For more information see the unit ca transaction

2ATT mode

=ere you can mae specia settings if you $ant to test the recording under 2ATT conditions (ony

necessary for 2ATT runs) Specia functions are caed in the 2ATT too for each screen at the end of

P5 and at the start of PAI

copy SAP AG BC420 12-37

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 3888

05

983209 SAP AG 1999

Default sie

ont after commit

ot a I session

1nd$ ot a I mode

Processing Recording )ith T amp

The screen standard sie is used for the

processing

ommit )or+ does not end the processing

o I mode is actie The transaction )ill run

through as in online

I mode is selected nce the data in the D

table is processedG the I mode is set to inactie

Standard siDe

If you seect this the screens are processed in the standard siDe in the foreground (in foreground or

dispay errors ony) Note the standard siDe is a$ays used for acground processing

Further after commit

The first commit $or in a transaction does not ead to the end of the recording

Note A atch input transaction is ended $ith the first commit $or

No I mode

The system fied SC9INPT is not set (SC9INPT E ) So transactions are run through as in onine

7nd No I mode

5ny use if you choose the processing mode 7 (dispay errors ony) Then the transaction is processed in the acground in atch input mode and if there is an error the screens run through in

the foreground

copy SAP AG BC420 12-38

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 3988

07

983209 SAP AG 1999

I Mode

atch input

mode

nline

Some transactions behae differentl( in batch input mode

than in online Cbatch input capabilit(

atch input mode sets the s(stem field SIPT H

Not every transaction can run the same onine and in atch input mode The transaction must decide

itsef $hether it is caed onine or in atch input mode

The system sets the system fied SC9INPT E G if the atch input mode is active (this aso appies

to ca transaction) From this system fied the transaction can identify $hether to run onine or in

atch input mode

copy SAP AG BC420 12-39

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 4088

040

983209 SAP AG 1999

reating a Session 9rom the Recording

Recordingnl( contains the data

from the recording

Seon name 02amp

Aoraon ampBS(eep eon

oclt dae 10102000

Cou can create a atch input session directy from the recording that you can then process using the

atch input monitor

copy SAP AG BC420 12-40

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 4188

046

983209 SAP AG 1999

reating Test Data

Test Data

Recording

ranranpBC420AAe name

The file onl( contains the data from the recording

Rgt

Application Serer

Structure

Cou can create a fie from the recordingH the fie $i contain a the fieds from the recording The

fieds are added to the fie $ith the ength you specified in the definition

The fied order corresponds to the order in the recording overvie$ Technica fieds

(2356257 2324ampS5amp and so on) are incuded

The data can ony e stored on the appication server If you do not specify a path the fie is stored in

the $or directory of the appication server

If the specified test fie aready eists the ne$ data record is added to this fie

copy SAP AG BC420 12-41

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 4288

04amp

983209 SAP AG 1999

ed conen

reating a Program

Recording

ZBC420ampProram name

Transfer Program

e daa

ead =rom =e

ran=er =rom recordn

reate

9ile nameTest data

ranranpBC420AA

Cou can generate a program from the recording

In the foo$ing diaog o enter a program name In addition you can choose the type and method

for fiing the maintained fied contents from the recorded screens

4se the vaues used for the recording If you reuire feie data transfer you $i have to modify

this program ater

ParameteriDe the input vaues and read these vaues from a fie A data structure is created for

parameteriDationH the data records are read from an eterna fie into this data structure The

program assumes the fie $as taiored to this data structure

If you have decided to parameteriDe the input vaues you shoud aso create a test fie during

generation To do this seect the checo and enter a name for the fie

The attriute maintenance screen of the AAP editor appears aintain the attriutes and save the

program

copy SAP AG BC420 12-42

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 4388

04

983209 SAP AG 1999

Program 9unctions

Online

transaction

Transfer program

To

error

1rror

ption 6ption ampFlat SAP

structure

Monitor

Cou have no$ generated a data transfer program for importing data into the amp System The

program can eecute the data transfer using atch input or ca transaction

If you choose option 1 and there is an error the data record is paced into a atch input session

copy SAP AG BC420 12-43

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 4488

044

983209 SAP AG 1999

Benerating 9unction Modules

Recording

Zcreaedeor ncon mode

ncon rop

Sor eD

ZBC420

Creae comer

9unction module

nl( one data record can be processed at a time

In the net diaog o you can generate a function modue a function group and short tet from the

recording The function modue is automaticay created in the function group

copy SAP AG BC420 12-44

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 4588

042

983209 SAP AG 1999

9unction of 9unction Modules

Online

transaction

To

error

1rror

ption 6 ption amp

9unction module

Import

Parameter 1port

parameter

Tables

M1SSTA

Monitor

S$BC

Import interface

The import interface consists of a technica part and the fieds from the recording (A parameter is

created for each input fied of the recorded transactions)

7port interface

Simpy consists of the parameter S4amp2 The function modue $i return a vaue in the system

fied SC9S4amp2 after caing ca transaction This return vaue is set to Dero if the data record has

een correcty processed (5ny appies to 2T)

If a session is created you $i e notified $hether the data record coud e paced into the session

Tae interfaceThis is used ony if the function modue $ors $ith ca transaction The tae contains a the

system messages

copy SAP AG BC420 12-45

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 4688

048

983209 SAP AG 1999

Import Interface of 9unction Module

$

Technical

fields

Data

fields

BI session or CALL TRANSACTION

Processin $ode

pdate $ode

a$e oamp BI session iamp (T initial)

Bacround user iamp (T initial)

Delete session aampter processin

Loc date oamp session

ODATA indicator

TU

MD1

UPDAT1

BRUP

US1R

=11P

ELDDAT1

DATA

Cou can use parameter 2T4 to specify $hether the function modue creates a atch input session

(2T4 E ) or updates the data record directy using ca transaction (2T4 E G)

The other parameters are fied as for a atch input session header

Note 7very time the function modue is caed a atch input session is created

If the session is to contain severa transactions proceed as foo$s

ltenerate the transaction severa times This can e achieved y recording the transaction again The

function modue interface $i then contain more than one transaction -hen the function modue is

caed severa transactions can e generated for each session

copy SAP AG BC420 12-46

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 4788

043

983209 SAP AG 1999

The Transaction Recorder

PrinciplesPrinciples

Recording )ith the LSMWRecording )ith the LSMW

Principles of atch Input and all TransactionPrinciples of atch Input and all Transaction

Integrating the TA Program into the DWIntegrating the TA Program into the DW

Using the TA Recorder Using the TA Recorder

copy SAP AG BC420 12-47

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 4888

045

983209 SAP AG 1999

Benerated Program

9unction modules DltP1ltBRUP

DltIS1RT

DltLS1ltBRUP

AAP Program

Define structure of

data in seJuential

fileDefine D

table

pen seJuential file

pen I session

Read data recordCseJuential file

9ill D table

9ill I session gtALL TRASATI

Last data record K

lose I session

lose seJuential file

The generated program has the structure dispayed aove It uses the standard function modues for

creating atch input sessions

copy SAP AG BC420 12-48

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 4988

047

983209 SAP AG 1999

Structure of the Benerated Program

Benerated part

Define D

table

pen seJuential file

pen I session

Read data record

9ill D table

9ill I session gtALL TRASATI

Last data recordK

lose I session

lose seJuential file

Include DR16

Define filestructure

P1ltDATAS1T

P1ltBRUP

DltDPR

Dlt9I1LD

DltTRASATI

LS1ltBRUP

LS1ltDATAS1T

The generated program consists of t$o parts 9 a generated part and the incude 2amp72G8 The

incude is provided in the standard system

The incude contains the definition of the reuired 2 tae and a further seven suroutines These

suroutines eecute the foo$ing functions

5pen and cose fie

5pen and cose session

Fi 2 tae

Fi session

The generated part is the main program and cas the reevant suroutines A structure is aso

generated in the generated part to read the eterna data into the fie

See the Appendi for more information on the 2amp72G8 program

copy SAP AG BC420 12-49

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 5088

020

983209 SAP AG 1999

Structure of D Table

PRBRAM DPR D1BI 9AM 9ALPRBRAMPRBRAM DPRDPR D1BID1BI 9AM9AM 9AL9AL

SAPM90ampD 0602

R90ampD=UR 600000

R90ampDU=RS 0006

R90ampD=T=D =UA

SAPM90ampD 0660

=A6AM16 Smith

=A6PSTL 87000

=A6LAD6 US

=A6SPRAS 1

SAPM90ampD 06amp0

=A6ST1B US6amp428357DDATA

PRBRAM

DPR

D1BI

9AM

9AL

EAR

UM

EAR

EAR

EAR

40

4

6

6amp

6amp

D Module pool

D Screen number

D Start of screen

D 9ield name

D 9ield contents

9ield ame T(pe Length Short Tet

AAP Dictionar(

The 2 tae has the same structure as in a standard transfer

copy SAP AG BC420 12-50

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 5188

026

983209 SAP AG 1999

Read Structure

Recording

DATA BEGIN OF record data element BUKRS bukr$amp data element KTOKD ktokd$amp data element NA(EG) name$+amp data element SORT ortl$ampEND OF record-

record

Automaticall( generated

from recording

The structure of the fie is automaticay generated and is a$ays defined $ith the name amp725amp

The generated structure a$ays has the same ayout 7ach fied is defined y t$o generated ro$s

The first ro$ is a$ays a comment ro$ containing the tet J data eement and the data eement of

the screen fied from the recording In the net ro$ the fied itsef is defined $ith the name of the

data eement foo$ed y a three9digit position numer $hich specifies the ocation in the structure

The ength of the fied is set y the ength of the data eement If a fied is not defined through a data

eement the system uses the ength of the screen fied

copy SAP AG BC420 12-51

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 5288

02amp

983209 SAP AG 1999

pening and losing the 9ile

P1ltDATAS1T

LS1ltDATAS1T

FOR( oendataet USING dataet-O)EN DATASET dataet IN TET (ODE-

IF S01SUBR2 34 - 5RITE 6 te7t1e S01SUBR2-STO)-

ENDIF-

ENDFOR(-

FOR( cloedataet USING dataet-2OSE DATASET dataet-

ENDFOR(-

Include

DR16

The suroutine 5P7N3ATAS7T opens the seuentia fie

The suroutine 2+5S73ATAS7T coses the seuentia fie

copy SAP AG BC420 12-52

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 5388

02

983209 SAP AG 1999

9unction Modules for I Program

lient

Session name

Eold date

=eep session

D user name

RecordK

LI1T

BRUP

ELDDAT1

=11P

US1R

R1RD

DltP1ltBRUPDltP1ltBRUP

Transaction code

D table

TD1

DPRTA

DltIS1RTDltIS1RT

DltLS1ltBRUPDltLS1ltBRUP

pen Isessionpen Isession

Insert data for

transactions

Insert data for

transactions

lose I

session

lose I

session

The foo$ing function modues are provided for creating atch input sessions (function group

S2)

235P7N3ltamp54P

2reates a ne$ session and contains genera data for the $hoe session

23INS7ampT

Inserts a the data for a transaction into the session The transferred interna tae $ith the

structure 2ATA must contain a the data reuired for fuy processing the transaction

232+5S73ltamp54P

2oses the session after a the data has een inserted As soon as the session has een cosed it

can e processed

The interna tae $ith the structure 2ATA can ony contain atch input data for one singe

transaction run So the individua transactions are inserted into the atch input session in a oop

using severa 23INS7ampT cas

copy SAP AG BC420 12-53

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 5488

024

983209 SAP AG 2001

9unction Module DltP1ltBRUP

ALL 9UTI DltP1ltBRUPALL 9UTI DltP1ltBRUP

1PRTIB

LI1T client

BRUP session name

ELDDAT1 loc+ date

=11P delete flag

US1R bdc user name

R1RD recording

IMPRTIB

NID internal session +e(

11PTIS

1PRTIB

LI1T client

BRUP session name

ELDDAT1 loc+ date

=11P delete flag

US1R bdc user name

R1RD recording

IMPRTIB NID internal session +e(

11PTIS

-ith the function modue 235P7N3ltamp54P you can open a atch input session

The foo$ing parameters are mandatory

2+I7NT (cient)

ltamp54P (session name)

4S7amp (user name)

Note The 4S7amp must a$ays e specified This user name is reuired for processing the session

in atch mode

The foo$ing parameters are optiona

=5+AT7 specifies the eariest date on $hich the session can e started677P fag specifies $hether session shoud e deeted after it has een successfuy processed The

677P fag is ignored if the session contains errors

677P E K K means deete the session after processing (defaut vaue) H

677P E KGK means do not deete session

amp725amp E KGK ao$s you to create a recording instead of a I session

If gtI is specified the function modue returns the interna session ey This is needed to e ae to

differentiate sessions that have the same name

-ith 7G27PTI5NS you get various return vaues that can e ueried $ith SC9S4amp2

Note In onine mode the onine user is used for the authoriDation checs regardess of the user

name specified

copy SAP AG BC420 12-54

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 5588

022

983209 SAP AG 1999

Subprogram P1ltBRUP

P1ltBRUP

FOR( oen8rou-IF e9on -

2A FUN2TION BD2O)ENGROU) E)ORTING 2IENT lt1mandt GROU) 8rou USER uer KEE) kee

=ODDATE gtolddate-

ENDIF-ENDFOR(-

Include

DR16

The suprogram 5P7N3ltamp54P opens the atch input session

copy SAP AG BC420 12-55

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 5688

028

983209 SAP AG 1999

9unction Module DltIS1RT

ALL 9UTI DltIS1RTALL 9UTI DltIS1RT

IMPRT

TD1 Transaction code

PSTltLAL Update locall(

PRITIB print list

TAL1S DPRTA bdclttable

11PTIS

IMPRT

TD1 Transaction code

PSTltLAL Update locall(

PRITIB print list

TAL1S DPRTA bdclttable

11PTIS

-ith the function modue 23INS7ampT you can add transaction data to the session

Cou need an interna 2 tae to transfer the data

The foo$ing parameters are mandatory

T257 Transaction code

CNPamp5TA 2 tae

The foo$ing parameters are optiona

P5ST3+52A+ E KGK activates oca updating This means that the data to e updated is ept in the

appication server and updated in the ast step of the transaction This does not invove the update

process (For more information see course 28 Programming ataase 4pdates)

PampINTINlt E KGK 9 ists processed in I $i e printed immediatey -ith 7G27PTI5NS you get various return vaues that can e ueried $ith SC9S4amp2

copy SAP AG BC420 12-56

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 5788

023

983209 SAP AG 1999

Subprogram DltTRASATI

DltTRASATI

FOR( BD2TRANSA2TION USING tcode-

IF e9on -2A FUN2TION BD2INSERT

E)ORTING T2ODE tcode TABES D0N)ROTAB bdcdata-

ESE-

ENDIF-ENDFOR(-

T

Include

DR16

The suprogram 23TampANSA2TI5N moves the fied 2 tae either to a atch input session

or uses ca transaction to import the data into the system 5n the seection screen you can specify

$hether you $ant to create a session or you $ant to use ca transaction to process the data directy

The S7SSI5N fied is then set according to your seection

copy SAP AG BC420 12-57

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 5888

025

983209 SAP AG 1999

9unction Module DltLS1ltBRUP

ALL 9UTI DltLS1ltBRUP

11PTIS

TltP1 6

NU1U1lt1RRR amp

-ith the function modue 232+5S73ltamp54P you can cose a atch input session

In 7G27PTI5NS you get various return vaues that can e ueried $ith SC9S4amp2

copy SAP AG BC420 12-58

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 5988

027

983209 SAP AG 1999

Subprogram LS1ltBRUP

FOR( cloe8rou-IF e9on -cloe batcgt 9nut 8rou

2A FUN2TION BD22OSEGROU)-

ESE-IF e8rouoened -

2A FUN2TION BD22OSEGROU)-

ENDIF-ENDIF-

ENDFOR(-

LS1ltBRUPlose session

lose error session

Include

DR16

The suprogram 2+5S73ltamp54P coses the atch input session The suprogram differentiates

et$een a norma I session (S7SSI5N E G) and a session opened $hen ca transaction

encountered an error (73ltamp54P35P7N7 E G)

copy SAP AG BC420 12-59

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 6088

080

983209 SAP AG 1999

Subprograms DltDPRG Dlt9I1LD

DltDPR

Dlt9I1LD

FOR( bdc9eld USING nam al-IF al 34 nodata-2EAR bdcdata- bdcdata1nam nam- bdcdata1al al- A))END bdcdata-ENDIF-

ENDFOR(-

FOR( bdcdltnro USING ro8ram dltnro- 2EAR bdcdata-Bdcdata1ro8ram ro8ram-Bdcdata1dltnro dltnro-Bdcdata1dltnbe89n - A))END bdcdata-ENDFOR(-

Include

DR16

The incude 2amp72GG contains t$o suprograms 23CNPamp5 and 23FI7+

Suprogram 23CNPamp5 fis the 2 tae $ith program names and screen numers

Suprogram 23FI7+ fis the 2 tae $ith fied names and vaues

7ach suprogram creates an entry in the 2 tae

copy SAP AG BC420 12-60

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 6188

086

983209 SAP AG 1999

9illing the D Table

erorm bdcdltnro u9n8 SA)(FD +- erorm bdc9eld u9n8 BD22URSOR RFD1BUKRS- erorm bdc9eld u9n8 BD2OK2ODE 6- erorm bdc9eld u9n8 RFD1BUKRS record1BUKRS- erorm bdc9eld u9n8 RFD1KTOKD record1KTOKD-

erorm bdcdltnro u9n8 SA)(FD -

erorm bdc9eld u9n8 BD22URSOR KNA1S)RAS- erorm bdc9eld u9n8 BD2OK2ODE 6- erorm bdc9eld u9n8 KNA1NA(E record1NA(E-

erorm bdc9eld u9n8 KNA1SORT record1SORT-

Recording Benerated automaticall(

from the recording

)ERFOR( bdcdltnro USING SA)(FD +- )ERFOR( bdc9eld USING BD22URSOR RFD1BUKRS-)ERFOR( bdc9eld USING BD2OK2ODE 6-)ERFOR( bdc9eld USING RFD1BUKRS record1BUKRS-)ERFOR( bdc9eld USING RFD1KTOKD record1KTOKD-

)ERFOR( bdcdltnro USING SA)(FD -

)ERFOR( bdc9eld USING BD22URSOR KNA1S)RAS-)ERFOR( bdc9eld USING BD2OK2ODE 6-)ERFOR( bdc9eld USING KNA1NA(E record1NA(E-

)ERFOR( bdc9eld USING KNA1SORT record1SORT- ---

The 2 tae is fied $ith data from the recording The suroutines 23CNPamp5 and

23FI7+ are used for this

The suroutines are caed in the reuired structure or seuence

copy SAP AG BC420 12-61

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 6288

08amp

983209 SAP AG 1999

erie)

SAPDatabase

SeJuential9ile

SAPDatabase

ALL TRASATIALL TRASATI

SeJuential9ile

ATE IPUTATE IPUT

D TableD TableD TableD Table

I Monitor

T

In contrast to atch input you can use ca transaction to directy pass data to the diaog interface

$ithout using a atch input session Cou use an interna tae (2 tae same structure and ayout

as atch input) to temporariy store your screen data Then you ca the desired transaction in your

program

Note 5n average the 2a Transaction method is 8 to times faster than using atch Input

copy SAP AG BC420 12-62

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 6388

08

983209 SAP AG 1999

all Transaction Program$ 1ample

RE)ORT abcbdcdcdeb9ct-

)ARA(ETERS d9mode DEFAUT A

udmode DEFAUT S-FOR( calltranact9on-2A TRANSA2TION FD

USING bdcdata (ODE d9mode

U)DATE udmode-

IF lt1ubrc NE - 5RITE 6 ---

ENDIF-ENDFOR(-

Screen

00

Screen

100

Screen

An additiona system ro area is added for the caed transaction The system uses this area for

processing the individua screens in the transactionH the data from the tae is added here After the

transaction is processed the second ro area is reeasedH the system continues processing in the first

ro area

Notes

In contrast to atch input there is no error ogging (error sessions) here For processing the caed

transaction the system uses the authoriDations of the user that caed the transaction The 2 tae

can ony hod data for one transaction run at a time efore another transaction is caed and its data

can e added you must eecute a amp7Famp7S= for the 2 tae

copy SAP AG BC420 12-63

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 6488

084

983209 SAP AG 1999

ALL TRASATI C6

RE)ORT 777-

2A TRANSA2TION FD USING bdcdata (ODE E-

Default for MD1 is A

2A TRANSA2TION 3tranact9oncode4 USING 3bdc1table4 C (ODE A E N C-

-ith the parameter 57 you can seect a specific dispay mode for processing the transaction The

foo$ing three modes are avaiae

A (ispay a)

If you eecute the program a the screens and a their data are dispayed This is the defaut vaue

for the 57 in 2A++ TampANSA2TI5N

N (ispay nothing)

The screens are not dispayed at a regardess of $hether any of them contained errors As soon as

the transaction has een fuy processed contro is returned to your program (The vaue of the

parameter 4PAT7 determines $hether dataase updates are eecuted or not)

7 (ispay errors ony)As soon as an error occurs in a screen the transaction is s$itched to dispay mode so that you can

correct the errors

These dispay modes are the same as those in the atch input session processing

copy SAP AG BC420 12-64

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 6588

082

983209 SAP AG 1999

RE)ORT 777-

2A TRANSA2TION FD USING BD2DATA U)DATE -

ALL TRASATI Camp

RE)ORT 777-

2A TRANSA2TION FD USING bdcdata U)DATE -

2A TRANSA2TION 3tranact9oncode4 USING 3bdc1table4 C (ODE A E N C U)DATE A S C -

Default for UPDAT1 is A

-ith the parameter 4PAT7 you can contro ho$ dataase updates arising from a transaction are

carried out There are three options

A (asynchronous updating) The caed transaction does not $ait unti the dataase has een

updated it simpy for$ard the updates to the SAP update service This usuay speeds up the 2T

program This processing mode is N5T recommended for arge data sets as the caed transaction

does not receive a competion message from the update modue

The caing 2T program therefore cannot te if the transaction has een successfuy competed Cou

shoud use the updating administration function (transaction S8) to determine $hether updating

$as terminated eary The error anaysis correction functions for are ess hepfu than $ith

synchronous updating

S (synchronous updating) -ith synchronous updating the caed transaction $aits unti a the

updates have een competed So processing is so$er than $ith synchronous updating The caed

transaction can ho$ever report any updating errors to the program $hich maes error

anaysiscorrection easier

+ (local updating) $ith oca updating the dataase is not updated in a separate process it is

updated in the caers process (see appication hep documentation for the AAP ey$ord S7T

4PAT7 TAS6 +52A+)

copy SAP AG BC420 12-65

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 6688

088

983209 SAP AG 1999

ALL TRASATI C

RE)ORT 777-DATA mtab T0)E TABE OF bdcm8coll-

2A TRANSA2TION FD USING bdcdata (ESSAGES INTO mtab-

2A TRANSA2TION 3tranact9oncode4 USING 3bdc1table4 C (ODE A E N C U)DATE A S C (ESSAGES INTO 3metab4 C -

7SSAlt7S specifies that a system messages that are output during the eecution of a 2A++

TampANSA2TI5N are $ritten to the interna tae L7SSTA The interna tae must have the

structure 2Slt25++

4nie the cassica atch input processing $ith sessions 2A++ TampANSA2TI5N does not offer any

specia processing procedures for transactions containing errors There are no restart functions for

transactions that contain errors or that cause updating terminations

copy SAP AG BC420 12-66

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 6788

083

983209 SAP AG 1999

ALL TRASATI C4

RE)ORT 777-DATA mltot T0)E ctuaram-

2A TRANSA2TION FD USING BD2DATA

O)TIONS FRO( mltot-

2A TRANSA2TION 3tranact9oncode4 USING 3bdc1table4 C (ODE A E N C U)DATE A S C (ESSAGES INTO 3metab4 C O)TIONS FRO( ot C -

RE)ORT 777-DATA mltot T0)E ctuaram-2A TRANSA2TION FD USING bdcdata

O)TIONS FRO( mltot-

The addition 5PTI5NS enaes the ca transaction statement to e controed through a structure

The structure must have the dictionary type 2T43PAampAS

The addition 5PTI5NS Famp5 must not e comined either $ith the addition 57 or $ith

4PAT7 ore information on the net side

copy SAP AG BC420 12-67

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 6888

085

983209 SAP AG 1999

Structure TUltPARAMS

DISMD1 Procen mode anaoo o addon amp

UPDMD1 $pdae mode anaoo o addon $PA

ATTMD1 CA mode CA conro

D19SI1 orce de=a EndoE e drn procen

RAMMIT +o eD a Camp amp(

IPT +o a ac np eonF a F S-B+P SPAC

I1D +o a ac np eon a=er end o= BC daa

The components are defined as foo$s

The components 7FSIM7 ampA25IT N5INPT and N5I7N can have the foo$ing

vaues KGK E Ces or K K E No

If the addition 5PTI5NS Famp5 is not specified the foo$ing settings appy to the contro

parameters

IS57 from addition 57

4P57 from addition 4PAT7

2ATT57 2ATT not active

7FSIM7 o not not use defaut $indo$s siDe

ampA25IT Successfu eit at 25IT -5amp6

N5INPT atch input session active (SC9INPT E G)

N5I7N atch input session sti active after end of 2 data

copy SAP AG BC420 12-68

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 6988

087

983209 SAP AG 1999

SMSBID Message ID

SMSBT Message T(pe C1GIGWGSGA

SMSB Message umber

SMSB6 Message ariable 6

SMSBamp Message ariable amp

SMSB Message ariable

SMSB4 Message ariable 4

SMSBID Message ID

SMSBT Message T(pe C1GIGWGSGA

SMSB Message umber

SMSB6 Message ariable 6

SMSBamp Message ariable amp

SMSB Message ariable

SMSB4 Message ariable 4

Return code$

S(stem fields$

alue Meaning

0 Successful

6000 1rror in transaction

6000 1rror in processing call transaction

see also the s(stem fields specified

alue Meaning

0 Successful

6000 1rror in transaction

6000 1rror in processing call transaction

see also the s(stem fields specified

9ield name Meaning9ield name9ield name MeaningMeaning

Return ode and S(stem 9ields

The return code is used to specify $hether the caed transaction $as processed successfuy In

addition severa system fieds are fied The numer I type and variaes of the diaog message

output y the caed transaction Cou need this information to output the message tet

copy SAP AG BC420 12-69

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 7088

030

983209 SAP AG 1999

Benerated Program of the TA Recorder

REFRES= (ESSTAB-

2A TRANSA2TION tcode USING bdcdata (ODE ctumode U)DATE cudate (ESSAGES INTO metab-OO) AT metab- ENDOO)-IF lubrc 34 AND e8rou 34 S)A2E- IF e8rouoenend - 2A FUN2TION BD2O)ENGROU) E)ORTING ---------

--------- E8rouoened - ENDIF- 2A FUN2TION BD2INSERT E)ORTING T2ODE tcode TABES D0N)ROTAB bdcdata-ENDIF-REFRES= bdcdata-

Message table output

pen error session

Insert data record that

has errors into error

session

If you have seected ca transaction on the seection screen the generated program runs as foo$s

The onine transaction is caed $ith ca transaction and passed to tae 2ATA A the

messages arising during the ca transaction are put in the interna tae 7SSTA

7SSTA is output as a ist

If you have specified an error session ( 73ltamp54P L SPA27) on the seection screen and the

ca transaction comes across an error (+3S4amp2 L 0) the error session is opened The error

session is ho$ever ony opened once Then the data record is paced in the session

A the other data records that have errors $ith ca transaction are paced in the same session

copy SAP AG BC420 12-70

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 7188

036

983209 SAP AG 1999

The Transaction Recorder

PrinciplesPrinciples

Recording )ith the LSMWRecording )ith the LSMW

Principles of atch Input and all TransactionPrinciples of atch Input and all Transaction

Integrating the TA Program into the DWIntegrating the TA Program into the DW

Using the TA Recorder Using the TA Recorder

copy SAP AG BC420 12-71

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 7288

03amp

983209 SAP AG 1999

Integrating into the DW

Transfer program

AAP Dictionar(

Integrate

SDA0

SDA6

SDAamp

SDA

Cou can integrate the generated program into the G9- The structure of the fie must e created

in the AAP ictionary The taes SGA0 SGA8 SGA1 and SGA $i e fied

copy SAP AG BC420 12-72

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 7388

03

983209 SAP AG 1999

DW Release 42

Goo

-B eeae 45

aa ran=er ogtec

Int customer data transfer ob-ect

ecord =ed

Dece daa ran=er

d Goo

The ampunction ampor interatin TA recorder prora$s is

i$ple$ented in the

D+-B in Release

The recorder can e integrated as of ampeease and it is provided in the G9- ampeease

ltot to the G9- ampeease 5n the initia screen you can integrate programs y choosing ampoto

( +nt customer ata transfer o-ect

copy SAP AG BC420 12-73

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 7488

034

983209 SAP AG 1999

reating Program as D b-ect

Comer ran=er ogtec

ampgtec ype

Sor eD =or ogtec

aa ran=er proram

Srcre name

9900

(+A1

Cane comer

ZBCA+G

ZB

ustomer transfer ob-ect

umber bet)een 7000 and 7777

b-ect t(pe

Assignment to R ob-ect

Short tet for D ob-ectShort description

Data transfer program

ame of generated program

Structure name

A structure Cstructure la(out )ith this name is created in

the AAP Dictionar(

For ampeease transfer oects $ere not organiDed y 5amp oects ut y a G numer (00089

OOOO) The numer range O0009OOOO is reserved for customers

To create a connection to the ne$ G 9- you must assign the program to a 5amp oect

2reate a short tet for the G oect This tet $i appear in the method seection ist

Specify the program to e incuded

Specify a name for the structure to e created in the AAP ictionary

Note $he generated program appears under program type +N and not under program type

-

copy SAP AG BC420 12-74

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 7588

032

983209 SAP AG 1999

Adantages

Automatic program registration in the DW in

Release 48

ou can use all the functions defined for

standard ob-ects

1ception$ The (reate ampile ith data

function

If you incuded the oect in the ampeease $orench it is automaticay avaiae in the ampeease

B $orench

A the $orench functions are avaiae for your oect ecept for Create files ith transfer ata

copy SAP AG BC420 12-75

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 7688

038

983209 SAP AG 1999

ou are no) able to$

The Transaction Recorder$ Unit Summar(

Use the recording function in the LSMW to create

a batch input session )ith the data from the

eternal s(stem

Use the TA Recorder to create (our o)n data

transfer program

Anal(e programs that )or+ )ith batch input or

call transaction

Integrate the TA Recorder programs into the

DW

copy SAP AG BC420 12-76

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 7788

ercise 1

nit $ -ecorder

$opic 2reating etors

$ransaction -ecorder ercise 1

bull 2reating detors $ith eterna numer assignment

bull etor numers M9980008 to M9980080

Address data for detors $ith eterna numer assignment is to

e transferred using program ampFI700

ro4ect F5

Supro4ect +5

-un +575

$as)s 85 95 8S25

9oad program -F+00

8 In the foo$ing eercises eisting data is to e changed Therefore these detors $ith

eterna numer assignment have to first e created

898 4nder suproect 79 create run 797G9 $ith the name Detors ith

eternal numers

copy SAP AG BC420 12-77

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 7888

891 2reate the foo$ing three tass The tass map the foo$ing process steps

convert data create + session and process + session

89198 In run 797G9 create the foo$ing tas

9 Tas AP9

9 Name 2onvert data 9 Tas type AP

9 Program type +S-

Seect the foo$ing +S- oect

+S- proect 2109

+S- suproect 7I9

+S- oect I997GT

89191 In run 797G9 create the foo$ing tas 9 Tas +5A9

9 Name 2reate I session

Tas type +5A

9 Program type INP

Seect program ampFI700 $ith the variant

I97G9

8919 In run 797G9 create the foo$ing tas

9 Tas S29

9 Name Process I session Tas type S2

9 Program type amp7P5

Seect program ampS2S4 $ith the variant

S497G9

Note that you have to correct the seuence of the tass 2onvert data

create + session and process + session

4se the uttons

89 Start the run

The detors $i e created $ith eterna numer assignments

89 2hec in transaction F0 that the detors M9980008 to M9980080 have een

created

copy SAP AG BC420 12-78

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 7988

ercise

nit $ransaction -ecorder

$opic -ecording function in the 9S8(

bull 2reate a recording using the +S-

bull ltenerate a atch input session

2hange the detor address data in the amp System

Name of the recording +

Name of the file +2055+F9

8 2reate the recording 7I3 using the +S- ampecord the transaction F01 (2hange

detor)

898 efore you create the recording first test the transaction onineQ

For the recording use detor M9980008 5n the initia screen of the F01

maintain the foo$ing fieds ony

etor etor M9980008

2ompany code 0008

Address data seect

Note $he data record must e saved hile recording

891 aintain the names and the descriptions for the foo$ing fieds

Name city street posta code and teephone numereete a other fieds in screen 880 from the recording (eg S5ampT+ +AN8

SPampAS)

4se the same technica names as sho$n in the tae eo$ (automatic fied

mapping)

copy SAP AG BC420 12-79

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 8088

1 2reate the suproect 7I9 and the ne$ oect TA3 in your proect 2109

aintain the oect attriutes and seect the item atch input recording Seect your

recording 7I3

2reate the source structure address

2reate the source fieds according to the tae eo$ 5r copy them from proect 2109S37N suproect 7I900 oect TA900

198 Fie setup The data from the egacy system are dispayed in the foo$ing tae

Fied name Fied type Fied ength escription

N5 2 8B etor numer

NA7 2 Name

STamp77T 2 Street

2ITC 2 2ityPace of residence

MIP 2 80 Posta code

T7+ 2 8B Teephone numer

191 aintain the fied mapping 4se the automatic fied mapping (via menu item

7tras)

19 Specify the fies 5ny maintain the fie name of the source fie

Name of the fie 21099IFI+7

2odepage 8800

19 Import the data and convert them ispay the data in each caseQ

19 2reate a atch input session

19B ampun the atch input session

copy SAP AG BC420 12-80

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 8188

ercise 3

nit $ransaction -ecorder

$opic -ecording ith the $ -ecorder

bull ltenerate a recording using the TA recorder

bull Test the recording

2hange the address data of detors in the amp system

Name recording $+

Name of the file +2055+F9

8 2reate the recording TA37I3 using the transaction recorder ampecord the

transaction F01 (change detor)

898 4se detor M9980008 for the recording 5n the F01 initia screen ony

maintain the foo$ing fieds

etor etor M9980008

2ompany 2ode 0008

Address data seect

Note $he data record must e saved hen recording

eete a fieds that do not eist in the source fie 21099IFI+7 from screen

880 in the recording (eg 6NA89S5ampT+ 6NA89+AN8 6ANNQ9SPampAS) Note o not deete fieds ampF01946ampS and ampF0190880

Save the recording no$

1 S$itch to the recordings overvie$

198 Process the recording $ith the processing mode A (dispay a)

191 Process the recording $ith the processing mode RN (no dispay)

19 If the recording has een tested and no error has occurred generate a I session

and run it using the I monitor If an error shoud occur generate the recordingagainQ

copy SAP AG BC420 12-81

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 8288

From the recording generate the program M21037I3 in your deveopment cass

2109 Seect the foo$ing

bull ampead fied contents from fie

bull 2reate test data in the fie 2103dei3test3tt

98 Save this program and eecute it ltenerate one I session each and process it

2arry out the same steps again using the ca transaction

The generated program shoud no$ e changed so that fie 21099IFI+7 can e

read and processed

98 2hange the defaut vaue of the fie name (parameter dataset) in 21099

IFI+7

91 2hange the structure definition eete the company code fied and the address

data checo from the structure

9 2hange the su9routine ca perform dc3fied for the company code (KampF019

46ampSK) so that the vaue 0008 is transferred

9 2hange the su9routine ca perform dc3fied for the address data checo

(KampF0190880K) so that the vaue G is transferred

9 Start the program again and read the data from the fie 21099IFI+7 $ith

detor data ltenerate a I session $ith it and run it

copy SAP AG BC420 12-82

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 8388

033 Include DR16INCLUDE BDCRECX1

SELECTION-SCREEN BEGIN OF LINE

PARAMETERS SESSION RADIOBUTTON GROUP CTU create sessi SELECTION-SCREEN COMMENT $amp TEXT-S FOR FIELD SESSION

se(ecti-scree )siti +

PARAMETERS CTU RADIOBUTTON GROUP CTU ca(( trasacti

SELECTION-SCREEN COMMENT $amp TEXT-S FOR FIELD CTU

SELECTION-SCREEN END OF LINE

SELECTION-SCREEN BEGIN OF LINE

SELECTION-SCREEN COMMENT $amp TEXT-S1 FOR FIELD GROUP

se(ecti-scree )siti $+

PARAMETERS GROUP1$amp r) ae 0 sessi

SELECTION-SCREEN COMMENT $amp TEXT-S+ FOR FIELD CTUMODE

se(ecti-scree )siti

PARAMETERS CTUMODE LIE CTU2PARAMS-DISMODE DEFAULT 3N3

A4 s56 a(( 78)rs

E4 s56 78)r errr (8

N4 7 t 7is)(a8 78)r

SELECTION-SCREEN END OF LINE

SELECTION-SCREEN BEGIN OF LINE

SELECTION-SCREEN COMMENT $amp TEXT-S$ FOR FIELD USER

se(ecti-scree )siti $+

PARAMETERS4 USER1$amp DEFAULT S9-UNAME ser 0r sessi i atc5

SELECTION-SCREEN COMMENT $amp TEXT-S FOR FIELD CUPDATE

se(ecti-scree )siti

PARAMETERS CUPDATE LIE CTU2PARAMS-UPDMODE DEFAULT 3L3

S4 s8c5rs(8

A4 as8c5rs(8

L4 (ca(

SELECTION-SCREEN END OF LINE

SELECTION-SCREEN BEGIN OF LINE

SELECTION-SCREEN COMMENT $amp TEXT-S FOR FIELD EEP

se(ecti-scree )siti $+

PARAMETERS4 EEP AS CltECBOX 3 3 = 7e(ete sessi i0 0iis5e7

3X3 = gtee) sessi i0 0iis5e7

SELECTION-SCREEN COMMENT $amp TEXT-S FOR FIELD E2GROUP

copy SAP AG BC420 12-83

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 8488

se(ecti-scree )siti

)araeters E2GROUP1$amp r) ae 0 errr-sessi

SELECTION-SCREEN END OF LINE

SELECTION-SCREEN BEGIN OF LINE

SELECTION-SCREEN COMMENT $amp TEXT-S FOR FIELD ltOLDDATE

se(ecti-scree )siti $+

PARAMETERS4 ltOLDDATE LIE S9-DATUM

SELECTION-SCREEN COMMENT +11amp TEXT-S$ FOR FIELD E2USER

se(ecti-scree )siti

PARAMETERS4 E2USER1$amp DEFAULT S9-UNAME ser 0r errr-sessi

SELECTION-SCREEN END OF LINE

SELECTION-SCREEN BEGIN OF LINE

SELECTION-SCREEN COMMENT +11amp TEXT-S FOR FIELD E2EEP

se(ecti-scree )siti

PARAMETERS4 E2EEP AS CltECBOX 3 3 = 7e(ete sessi i0 0iis5e7

3X3 = gtee) sessi i0 0iis5e7

SELECTION-SCREEN END OF LINE

SELECTION-SCREEN BEGIN OF LINE

SELECTION-SCREEN COMMENT +11amp TEXT-S FOR FIELD E2ltDATE

se(ecti-scree )siti

PARAMETERS4 E2ltDATE LIE S9-DATUM

SELECTION-SCREEN END OF LINE

SELECTION-SCREEN SIP

SELECTION-SCREEN BEGIN OF LINE

SELECTION-SCREEN COMMENT 1amp TEXT-S1 FOR FIELD NODATA

PARAMETERS4 NODATA DEFAULT 33 LOER CASE 7ata

SELECTION-SCREEN END OF LINE

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

Batc5i)t7ata 0 si(e trasacti

DATA4 BDCDATA LIE BDCDATA OCCURS ITlt ltEADER LINE

essaes 0 ca(( trasacti

DATA4 MESSTAB LIE BDCMSGCOLL OCCURS ITlt ltEADER LINE

errr sessi )ee7 3 3 r 3X3amp

DATA4 E2GROUP2OPENED

essae tets

TABLES4 T1

copy SAP AG BC420 12-84

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 8588

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

at se(ecti scree

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

AT SELECTION-SCREEN

r) a7 ser st e 0i((e7 0r create sessi

IF SESSION = 3X3 AND

GROUP = SPACE OR USER = SPACE

MESSAGE E1MSamp

ENDIF

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

)e 7ataset

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

FORM OPEN2DATASET USING P2DATASET

OPEN DATASET P2DATASET IN TEXT MODE

IF S9-SUBRC

RITE4 TEXT-E S9-SUBRC

STOP

ENDIF

ENDFORM

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

c(se 7ataset

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

FORM CLOSE2DATASET USING P2DATASET

CLOSE DATASET P2DATASET

ENDFORM

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

create atc5i)t sessi

t 0r ca(( trasacti siamp

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

FORM OPEN2GROUP

IF SESSION = 3X3

SIP

RITE4 $amp 3Create r)3I1amp GROUP

SIP

)e atc5i)t r)

CALL FUNCTION 3BDC2OPEN2GROUP3

EXPORTING CLIENT = S9-MANDT

copy SAP AG BC420 12-85

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 8688

GROUP = GROUP

USER = USER

EEP = EEP

ltOLDDATE = ltOLDDATE

RITE4 amp 3BDC2OPEN2GROUP3I$amp

1$amp 3retrc7e43I+amp

S9-SUBRC

ENDIF

ENDFORM

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

e7 atc5i)t sessi

ca(( trasacti si4 errr sessiamp

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

FORM CLOSE2GROUP

IF SESSION = 3X3

c(se atc5i)t r)

CALL FUNCTION 3BDC2CLOSE2GROUP3

RITE4 amp 3BDC2CLOSE2GROUP3Iamp

1$amp 3retrc7e43I+amp

S9-SUBRC

ELSE

IF E2GROUP2OPENED = 3X3

CALL FUNCTION 3BDC2CLOSE2GROUP3

RITE4

RITE4 amp 3Fe5(era))e 6r7e eret3Iamp

ENDIF

ENDIF

ENDFORM

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

Start e6 trasacti accr7i t )araeters

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

FORM BDC2TRANSACTION USING TCODE

DATA4 L2MSTRINGamp

DATA4 L2SUBRC LIE S9-SUBRC

atc5 i)t sessi

IF SESSION = 3X3

CALL FUNCTION 3BDC2INSERT3

EXPORTING TCODE = TCODE

TABLES D9NPROTAB = BDCDATA

RITE4 3BDC2INSERT3Iamp

copy SAP AG BC420 12-86

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 8788

TCODE

3retrc7e43I+amp

S9-SUBRC

3RECORD43

S9-INDEX

ca(( trasacti si

ELSE

REFRESlt MESSTAB

CALL TRANSACTION TCODE USING BDCDATA

MODE CTUMODE

UPDATE CUPDATE

MESSAGES INTO MESSTAB

L2SUBRC = S9-SUBRC

RITE4 3CALL2TRANSACTION3

TCODE

3retrc7e43I+amp

L2SUBRC

3RECORD43

S9-INDEX

LOOP AT MESSTAB

SELECT SINGLE FROM T1 ltERE SPRSL = MESSTAB-MSGSPRA

AND ARBGB = MESSTAB-MSGID

AND MSGNR = MESSTAB-MSGNR

IF S9-SUBRC =

L2MSTRING = T1-TEXT

IF L2MSTRING CS 313

REPLACE 313 ITlt MESSTAB-MSGH1 INTO L2MSTRING

REPLACE 3$3 ITlt MESSTAB-MSGH$ INTO L2MSTRING

REPLACE 33 ITlt MESSTAB-MSGH INTO L2MSTRING

REPLACE 33 ITlt MESSTAB-MSGH INTO L2MSTRING

ELSE

REPLACE 33 ITlt MESSTAB-MSGH1 INTO L2MSTRING

REPLACE 33 ITlt MESSTAB-MSGH$ INTO L2MSTRING

REPLACE 33 ITlt MESSTAB-MSGH INTO L2MSTRING

REPLACE 33 ITlt MESSTAB-MSGH INTO L2MSTRING

ENDIF

CONDENSE L2MSTRING

RITE4 MESSTAB-MSGT9P L2MSTRING$+amp

ELSE

RITE4 MESSTAB

ENDIF

ENDLOOP

copy SAP AG BC420 12-87

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 8888

SIP

Eree 0e5(era))e

IF L2SUBRC AND E2GROUP SPACE

IF E2GROUP2OPENED = 3 3

CALL FUNCTION 3BDC2OPEN2GROUP3

EXPORTING CLIENT = S9-MANDT

GROUP = E2GROUP

USER = E2USER

EEP = E2EEP

ltOLDDATE = E2ltDATE

E2GROUP2OPENED = 3X3

ENDIF

CALL FUNCTION 3BDC2INSERT3

EXPORTING TCODE = TCODE

TABLES D9NPROTAB = BDCDATA

ENDIF

ENDIF

REFRESlt BDCDATA

ENDFORM

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

Start e6 scree

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

FORM BDC2D9NPRO USING PROGRAM D9NPRO

CLEAR BDCDATA

BDCDATA-PROGRAM = PROGRAM

BDCDATA-D9NPRO = D9NPRO

BDCDATA-D9NBEGIN = 3X3

APPEND BDCDATA

ENDFORM

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

Isert 0ie(7

Page 5: BC420_46C - 012The Transaction Recorder

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 588

02

983209 SAP AG 1999

erie) of Transaction Recorder

Flat SAP

Structure

SAP Record

Layout

Structure

SAP IDoc

Structure

API

If the SAP standard program does not provide the functions you need for data transfer you can use

the transaction record

Note For data transfer the transaction (TA) recorder reuires a fat fie that is a fie $ithout any

hierarchy or sustructures

copy SAP AG BC420 12-5

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 688

08

983209 SAP AG 2001

Uses of the TA Recorder

Flat SAP

Structure

atch

Input

all

Transaction

The TA ampecorder enaes you to transfer data into amp using atch input or ca transaction

The TA ampecorder can ony $or $ith a fat structure Fies $ith different record structures (for

eampe header structure) cannot e used

The TA ampecorder is used in the +S- to create recordings of transactions atch input sessions can

e created from the recordings

The TA ampecorder can itsef eecute a data transfer from the recording using atch input or ca

transaction

copy SAP AG BC420 12-6

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 788

03

983209 SAP AG 1999

The Recording

Recording

Screen

9ield alue

9ield nameModule pool

Transaction

Screen

111

Screen

106

Screen

130

The TA ampecorder can record transactions The recorder must e activated efore the transaction is

processed Then you can run the transaction as though you $ere processing it onine

After the transaction has finished the recording $i contain a the screen numers fied names

fied vaues and the associated modue poo and transaction code

copy SAP AG BC420 12-7

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 888

05

983209 SAP AG 1999

hanging ustomer Data$ Initial Screen

Vendor

Company code

Z-88-10000

Screen

106

Genera daa9ield ontents

BCC$Samp $SZAVBCamp(Camp )00

02-($++ -88-10000

02-0110

02-0130

$SZAV

9ield ame

Transaction 9D0amp

Addre

In the aove eampe the transaction Change customer F01 is recorded

In addition to the screen fieds the fieds 2324ampS5amp and 2356257 are aso

automaticay recorded

Note

You must change the field values for all the fields required later for the transfer For the

recording a change can simply mean overriting one single character in a field ith the

same character

f fields are to e filled using S$amp$ parameters the value must also e changed

(ith online transactions screen sequences may appear that are different than in therecording

copy SAP AG BC420 12-8

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 988

07

983209 SAP AG 1999

hanging ustomer Data$ Address

ustomer 5560000

+ame

Searc erm

Addre

Screen

111

9ield ontents

BCamp(Camp $PABCS$BSC SAPSZA1 0300ASS

BCS$BSC SAPSZA1 0301Camp$

BCC$Samp A1AA-amp$S+$1

A1AA-S Garden Sree

A1AA-amp$S+$1 02105

9ield ame

If there is a suscreen on the screens this is automaticay recorded In the recording the fied

23S4S2amp77N containing the name of the suscreen appears

-ith customer master data the address is a suscreen area The centra address management is

integrated here A the address input fieds are dispayed on one suscreen

2entra address management is ony used if you specificay seect this option on the initia screen

copy SAP AG BC420 12-9

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 1088

060

983209 SAP AG 1999

Results of the Recording

Recording

SAPM90ampD 0608

DltURSR R90ampD=UR

Dlt=D1 gt00

R90ampD=UR 5560000

R90ampDD0660

US1ltA

SAPM90ampD 0666

Dlt=D1 UPDA

DltSUSR SAPLSA6 000ADDR1SS DltSUSR SAPLSA6 006UTRltSR11

DltURSR SA6ltD0600T1LltUM1R

ADDR6ltDATASTR11T 4 Barden Street

ADDR6ltDATAPSTltD1 0amp602

ADDR6ltDATAIT6 oston

SA6ltD0600T1LltUM1 8638257755

The resut of the recording is a ist of a the fieds and fied vaues that $ere changed in the

recording

copy SAP AG BC420 12-10

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 1188

066

983209 SAP AG 1999

Special Recording 9ields

9unction code triggered on

this screen

9ield name )here cursor

)as last positioned on the

screen

Comer

Company code

Z-88-10000

Genera daa

Dlt=D1

DltURSR

uring a recording the foo$ing additiona fieds are automaticay recorded

The BDC_OKCODE fied contains the function code triggered on the screen

The BDC_CURSOR fied contains the fied name of the ast fied the cursor $as positioned in

efore eiting the screen

copy SAP AG BC420 12-11

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 1288

06amp

983209 SAP AG 1999

Determining the 9ield ame

Technical info

Screen field

R90ampD =UR

Comer

Company code

Z-88-10000

Genera daa

96help

Sa

Program SAPM90ampDScreen number 608

The information recorded in the TA recorder can aso e dispayed onine for each transaction

To find out the current modue poo name and the screen numer choose Systemrarr Status from the

menu

To determine the fied name pace the cursor on a fied and seect F8 hep The name of the screen

fied can e found under technical information

copy SAP AG BC420 12-12

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 1388

06

983209 SAP AG 1999

Subscreens

Comer Z-88-10000

+ame

+ame

ADDR6ltDATAAM16

DltSUSR

Information$

ode poo name

Screen nmer

Screen name

Some screens contain suscreen areas

To determine the fied name pace the cursor on the fied and choose F1 The name of the screen

fied is specified under Technical info

copy SAP AG BC420 12-13

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 1488

064

983209 SAP AG 2001

Tabstrips

$er Roberts

1ample$ User Profile Defaults

Sar men +

oon anae

ampp dece Pr1

ParameerDefaults

DltSUSR

USD19AULTSSPLD

The tastrip eement sho$n is used on the aintain User rofile (5$n data) screen

4nder the tastrip tite Defaults the user can set various vaues such as the defaut printer

The user profie are user9dependent settings (as the name impies)

copy SAP AG BC420 12-14

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 1588

062

983209 SAP AG 1999

Step Loops and Table ontrols

1ample$ an+ Details

Comer

ntr( an+ +e( Account

08154711

123456789

Z-00-12345

an+ Details

00708155546344536

Banlt daa

==A=C06)

==A=C0amp)

Step oops and tae contros are treated identicay for the recording

The fied names of the fieds isted are the same for every ro$

7ach ro$ contains a customers an detais The fieds must e accessed using an inde (this is

specified as an addition to the fied name for eampe 6N69AN6N(1) The inde must match

the ro$ numer

5ny the visie fieds on a screen can e fied $ith data If some fieds are ony visie after paging

the paging must e recorded as $e This means that for the recording you must eecute a the steps

in the onine transaction

For eampe age on $oud e eecuted using the function code 1 (Paging icons)

Paging to the end of a ist 1Page up 11

lto to first page 18

copy SAP AG BC420 12-15

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 1688

068

983209 SAP AG 2001

Recording Buidelines

Test the transaction before recording

Start the recording

hange field alues onl( for fields

releant to the recording

As of 48 all filled fields are recorded

Transaction must be properl( eitedCSA1

Use of scroll bars cannot be recorded

Specia recording notes

F8 F and your o$n F8 and F hep (Pamp527SS 5N =7+P9amp7gt47ST Pamp527SS 5N A+479

amp7gt47ST) are not recorded This aso appies to a commands under the System and $el

menus aues for defaut variants ( transaction variants) are not incuded

7rror and $arning diaogs are not recorded 5ny the 56 code and the fied contents reuired for

further processing on the current screen are recorded

Note uring recording the data entered is $ritten to the dataase

copy SAP AG BC420 12-16

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 1788

063

983209 SAP AG 2001

1n-o( SAP ontrols and Data Transfer

bull SAP Picture ontrolbull SAP ETML ie)er ontrol

bull SAP Tet 1dit ontrol

bull AL Brid ontrol

bull SAP Tree ontrol

bull

ranch 6

ranch amp

Root

These and other controls do not support batch input$

Root

ranch amp

ranch amp6

The ne$ 7noy SAP contros deveoped for ampeease B do not support atch input or ca

transaction

=o$ever tae contros and tastrips do support atch input

copy SAP AG BC420 12-17

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 1888

065

983209 SAP AG 1999

The Transaction Recorder

PrinciplesPrinciples

Recording )ith the LSMWRecording )ith the LSMW

Principles of atch Input and all TransactionPrinciples of atch Input and all Transaction

Integrating the TA Program into the DWIntegrating the TA Program into the DW

Using the TA Recorder Using the TA Recorder

copy SAP AG BC420 12-18

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 1988

067

983209 SAP AG 1999

Session

generator

Recording Using the LSMW

-ith the +S- you can create your o$n recordings

The +S- uses the standard TA recorder here yet evauates the recording itsef The information

from the recording is used to create atch input sessions

The created atch input session can e processed as usua $ith the atch input monitor

Note As $ith the standard procedure it is euay important that the data is converted

copy SAP AG BC420 12-19

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 2088

0amp0

983209 SAP AG 1999

reating Recording

Admnraon

ecordn

Goo

ame of recording

Description

)ner

ame of transaction

Start recording

lto into the +S- and seect the menu path ampoto (Recorings An overvie$ of a previousy

created recordings for your proect are dispayed To start a ne$ recording seect Create

To create a recording you must define the name the description and the o$ner

7nter the name of the transaction you $ant to record

7ecute the transaction and compete it propery

Note ampecordings are assigned to ony one proect 9 so the name of the recording must e uniue

copy SAP AG BC420 12-20

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 2188

0amp6

983209 SAP AG 1999

hanging ustomer Data$ Initial Screen

9ield ontents

BCC$Samp $SZAV

BCamp(Camp )00

02-($++ -88-10000

02-0110

02-0130

$SZAV

9ield ame

Comer

Company code

Z-88-10000

Genera daa

Comer Z-88-10000

+ame

9ield ontents

BCamp(Camp $PA

BCS$BSC SAPSZA1 0300ASS

BCS$BSC SAPSZA1 0301Camp$

BCC$Samp SZA10100-+$B

A1AA-S Garden Sree

A1AA-amp$S+$1 34

A1AA-PampSCamp1 02105

9ield ame

Screen

111

Screen

106

In the aove eampe the transaction Change customer F01 is recorded

Note

You must ma)e some modification to the field values for all the fields you ant to capture

for the data transfer For the purposes of recording a change can simply mean overriting

one single character in a field ith the same character

ven if fields are to e filled using S$amp$ parameters the values must still e changed on

the screen in order to capture them

(ith online transactions screen sequences may appear that are different than in the

recording

copy SAP AG BC420 12-21

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 2288

0ampamp

983209 SAP AG 1999

Results

RecordingRecording R1lt6 Demolt6

9D0amp hange customer Caccounting

SAPM90ampD 0608

DltURSR R90ampD=UR

Dlt=D1 gt00

R90ampD=UR 5560000

R90ampDD0660

US1ltA

SAPM90ampD 0666

Dlt=D1 UPDA

DltSUSR SAPLSA6

DltSUSR SAPLSA6

DltURSR SA6ltD0600T1LltUM1

ADDR6ltDATASTR11T 4 Barden Street

ADDR6ltDATAPSTltD1 0amp602

ADDR6ltDATAIT6 oston

SA6ltD0600T1LltUM1 8638257755

The resuts of the recording using the +S- are dispayed in a tree structure

After the recording has finished you can edit it Cou can deete fieds or add ne$ ones

copy SAP AG BC420 12-22

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 2388

0amp

983209 SAP AG 1999

Assigning 9ield ames

Recording R16 Demolt6

Dlt=D1 UPDA

DltSUSR SAPLSA6

DltSUSR SAPLSA6

DltURSR SA6ltD0600T1L

ADDR6ltDATAAM16 Lisa Eofmeister

ADDR6ltDATAPSTltD1 0amp602

ADDR6ltDATAIT6 oston

ame

+ame

ecrpon

e=a ae

A1AA-+A1

A1AA-+A1

Comer name

a o=meer

Screen =ed

ustomer name

double clic+

Cou can assign names for each recorded fied The specia fieds (2356257 2324ampS5amp

and 23S4S2amp77N) are not incuded here Cou can choose the fied names -hen the atch

input session is created the contents of these fieds are assigned to the target fieds specified in the

eft coumn

Functions

efaut Assigns to the fied names of the underying target fied and its fied description

ampeset eetes fied name and fied description

oue cic 7dits fied name fied description and defaut vaue

Note Cou can use fied names more than once =o$ever the fied name is ony avaiae once in thefied mapping For this reason it is not practica to use fied names more than once

For a those fieds for $hich you do not assign a name the defaut vaue is used $hen the atch

input session is created These defaut vaues can e seen as constants This is especiay usefu for

chec oes (for eampe 08 vie$ seection)

The +S- supports automatic fied mapping Source fieds and target fieds can e assigned to each

other automaticay The fieds are assigned to the corresponding fieds of the same name Therefore

the fied names of the source structure shoud e given the same or simiar names as the fied names

in the target structure

copy SAP AG BC420 12-23

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 2488

0amp4

983209 SAP AG 2001

Addinggtremoing screen fields

Repeating recording

9or identical field names the name and description are

assigned automaticall(

1diting Recording

02-($++

(+A1-A+

(+A1-+A1

(+A1-Samp

(+A1-+A2

(+A1-SAS

Comer accon nmer

e

+ame 1

Sor =ed

+ame 2

Sree

Selection of all

aailable screen

fields

Cou can ater add ne$ screen fieds if you need to 6eep in mind that fieds shoud ony e added in

paces $here they are aso provided on the screen other$ise you $i get an error $hen the I

session is processed

After saving you $i get the message The data has een saved successfuy No$ the recordings

are avaiae for the oect attriutes

If you repeat the recording you can record a ne$ screen seuence $ith ne$ fieds Provided that the

fied names (eg 6NA89NA78) are identica the names and descriptions are automaticay

assigned

copy SAP AG BC420 12-24

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 2588

0amp2

983209 SAP AG 1999

b-ect T(pe and Import Method$ Recording

Standard atch Input gt Direct Input

atch Input Recording

API

IDoc

ampgtec ype ) mpor meod

Bac np recordn

ecordn ec1

The recording is no$ avaiae $ith the oect attriutes

Net you create a proect or su9proect in the +S- and specify process the data transfer

Cou eecute the data transfer as in the standard system

efine the source fieds and structures

efine the fied mapping

ampead and convert the data

2reate and import a atch input session

copy SAP AG BC420 12-25

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 2688

0amp8

983209 SAP AG 1999

The Transaction Recorder

PrinciplesPrinciples

Recording )ith the LSMWRecording )ith the LSMW

Principles of atch Input and all TransactionPrinciples of atch Input and all Transaction

Integrating the TA Program into the DWIntegrating the TA Program into the DW

Using the TA Recorder Using the TA Recorder

copy SAP AG BC420 12-26

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 2788

0amp3

983209 SAP AG 1999

Transaction Recorder

Online

Transaction

RecordingTransfer Program

T

Included in the Batch Input Monitor

Cou use the transaction recorder to record transactions and then use the transaction recording to

generate a transfer program The program ao$s you to transfer data using either atch input or ca

transaction

copy SAP AG BC420 12-27

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 2888

0amp5

983209 SAP AG 1999

hanging ustomer Data$ Initial Screen

9ield ontents

BCC$Samp $SZAV

BCamp(Camp )00

02-($++ Z-88-10000

02-0110

02-0130

$SZAV

9ield ame

Comer

Company code

Z-88-10000

Genera daa

Comer Z-88-10000

+ame

9ield ontents

BCamp(Camp $PA

BCS$BSC SAPSZA1 0300ASS

BCS$BSC SAPSZA1 0301Camp$

BCC$Samp SZA10100-+$B

A1AA-S Garden Sree

A1AA-amp$S+$1 34

A1AA-PampSCamp1 02105

9ield ame

Screen

111

Screen

106

In the aove eampe the transaction Change customer F01 is recorded

copy SAP AG BC420 12-28

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 2988

0amp7

983209 SAP AG 2001

hange Debitor$ Pa(ment Transactions C6

Banlt dea

Screen

10

9ield ontent

BCC$Samp (+B(-BA+(+01

BCamp(Camp BA+((+B(-BA+(S01

(+B(-BA+(01 12345679

(+B(-BA+(+01 22222222

Debitor 5560000

9ield ame

Inde

copy SAP AG BC420 12-29

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 3088

00

983209 SAP AG 1999

hanging ustomer Data$ Pa(ment Transactions Camp

Addre

an+ countr( US

an+ code 6amp42837

Banlt dea

ustomer 5560000

9ield ontents9ield ame

BCC$Samp (+A1-(+ZA

BCamp(Camp $PA

(+B(-Z01

Screen

10

Screen

100

SAPLBA

9ield ontents

BCC$Samp B+(A-BA+(A

BCamp(Camp +

B+(A-BA+(A +aona Banlt

9ield ame

In different transactions the modue poo may change This is the case $ith for eampe customer

master data The TA recorder records modue poo changes automaticay

copy SAP AG BC420 12-30

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 3188

06

983209 SAP AG 1999

Eierarch( Displa( of the Recording

02amp

02

SAP02 0106

BCC$Samp 02-0130

BCamp(Camp )00

02-($++ -88-10000

02-0110

02-0130

SAP02 0111

BCamp(Camp V

BCC$Samp A1AA-amp$S+$1

A1AA-S Garden Sree

Recording

-ith the TA recorder the resuts are aso a ist in a hierarchy dispay =o$ever you cannot assign

your o$n fied names as you can in the +S-

copy SAP AG BC420 12-31

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 3288

0amp

983209 SAP AG 1999

Recording erie)

Recording

Transfer program

9unction module

ontains onl( the data

from the recording

Test data

Test

reate

reate

reate

reate

1dit hange recording

Process recording

Cou can edit the recording as needed

The recording can e tested and eecuted again The screens are run through in the same $ay as in

the recording

The recording can then e used to create

atch input sessions

Test data

ata transfer programs $ith atch input or ca transaction

Function modues

copy SAP AG BC420 12-32

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 3388

0

983209 SAP AG 1999

1 02 BS

2 SAP02 106

3 BCC$Samp $SZAV

4 BCamp(Camp )00 5 02-($++ -88-10000

6 02-0110

7 02-0130

8 $SZAV

9 SAP02 111

10 BCamp(Camp V

11 BCC$Samp A1AA-amp$S+$1

12 A1AA-S Garden Sree

Program Screen St 9ield ame 9ield alue

Recording 1ditor

Recording

Add gt delete lines 9ormat chec+

Import gt eport of recording

In the editor you can add or deete ines Cou can aso change the contents of individua ines

-ith the function Chec) you can specify $hether the edited version of the recording sti has the

correct synta

Cou can aso eport import recordings to from a seuentia fie

After editing save the recording changes

copy SAP AG BC420 12-33

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 3488

04

983209 SAP AG 1999

Recording Seeral Transaction Runs

RecordingF

Directl( after the first recordingG or

In the displa( mode of the recording

In this step you can record additiona transactions and add additiona transaction runs to the

recording

Cou can record the additiona transactions directy after a recording or in the edit screen of a

recording

copy SAP AG BC420 12-34

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 3588

02

983209 SAP AG 1999

1ditor$ Importing and 1porting Recordings

6 T 9D0amp S

amp SAPM90ampD 608

DltURSR

4

2

8 SAPM90ampD 666

60

66

Program Screen St 9ield name 9ield alue

cempA

e name

aa =orma

cemp

A

e name

aa =orma

1port

Import

Presentation Serer

If the editor functions in the systems do not provide a the functions you need you can do$noad the

recording to your presentation server using the Eort function and then edit the recording using a

P2 editor

Cou use the Import function to import the data ac into the amp System ae sure the fie is sti in

the correct format

copy SAP AG BC420 12-35

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 3688

08

983209 SAP AG 1999

Processing the Recording

Recording

Process )ith ALL TRASATI

Parameer

Proce mode$pdae mode

CA mode

e=a e

Con a=er comm

+o a B eon

nd +o a B mode

A

A

T

The recording can e eecuted directy The data from the recording is used and the transaction is

processed $ith ca transaction

2a transaction provides a range of options for caing appication transactions $hich are discussed

on the foo$ing t$o pages

copy SAP AG BC420 12-36

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 3788

03

983209 SAP AG 1999

Process mode

Update mode

ATT mode

Processing Recording )ith T 6

A

1

Displa( all screens

Displa( errors onl(

o displa(

L

S

A

Local

S(nchronous

As(nchronous

A

o ATT

ATT )ithout indiidual screen control

ATT )ith indiidual screen control

Processing mode

=ere you can specify the processing mode 9 it is the same as the processing mode for atch input

4pdate mode

=ere you can specify the update mode For more information see the unit ca transaction

2ATT mode

=ere you can mae specia settings if you $ant to test the recording under 2ATT conditions (ony

necessary for 2ATT runs) Specia functions are caed in the 2ATT too for each screen at the end of

P5 and at the start of PAI

copy SAP AG BC420 12-37

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 3888

05

983209 SAP AG 1999

Default sie

ont after commit

ot a I session

1nd$ ot a I mode

Processing Recording )ith T amp

The screen standard sie is used for the

processing

ommit )or+ does not end the processing

o I mode is actie The transaction )ill run

through as in online

I mode is selected nce the data in the D

table is processedG the I mode is set to inactie

Standard siDe

If you seect this the screens are processed in the standard siDe in the foreground (in foreground or

dispay errors ony) Note the standard siDe is a$ays used for acground processing

Further after commit

The first commit $or in a transaction does not ead to the end of the recording

Note A atch input transaction is ended $ith the first commit $or

No I mode

The system fied SC9INPT is not set (SC9INPT E ) So transactions are run through as in onine

7nd No I mode

5ny use if you choose the processing mode 7 (dispay errors ony) Then the transaction is processed in the acground in atch input mode and if there is an error the screens run through in

the foreground

copy SAP AG BC420 12-38

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 3988

07

983209 SAP AG 1999

I Mode

atch input

mode

nline

Some transactions behae differentl( in batch input mode

than in online Cbatch input capabilit(

atch input mode sets the s(stem field SIPT H

Not every transaction can run the same onine and in atch input mode The transaction must decide

itsef $hether it is caed onine or in atch input mode

The system sets the system fied SC9INPT E G if the atch input mode is active (this aso appies

to ca transaction) From this system fied the transaction can identify $hether to run onine or in

atch input mode

copy SAP AG BC420 12-39

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 4088

040

983209 SAP AG 1999

reating a Session 9rom the Recording

Recordingnl( contains the data

from the recording

Seon name 02amp

Aoraon ampBS(eep eon

oclt dae 10102000

Cou can create a atch input session directy from the recording that you can then process using the

atch input monitor

copy SAP AG BC420 12-40

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 4188

046

983209 SAP AG 1999

reating Test Data

Test Data

Recording

ranranpBC420AAe name

The file onl( contains the data from the recording

Rgt

Application Serer

Structure

Cou can create a fie from the recordingH the fie $i contain a the fieds from the recording The

fieds are added to the fie $ith the ength you specified in the definition

The fied order corresponds to the order in the recording overvie$ Technica fieds

(2356257 2324ampS5amp and so on) are incuded

The data can ony e stored on the appication server If you do not specify a path the fie is stored in

the $or directory of the appication server

If the specified test fie aready eists the ne$ data record is added to this fie

copy SAP AG BC420 12-41

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 4288

04amp

983209 SAP AG 1999

ed conen

reating a Program

Recording

ZBC420ampProram name

Transfer Program

e daa

ead =rom =e

ran=er =rom recordn

reate

9ile nameTest data

ranranpBC420AA

Cou can generate a program from the recording

In the foo$ing diaog o enter a program name In addition you can choose the type and method

for fiing the maintained fied contents from the recorded screens

4se the vaues used for the recording If you reuire feie data transfer you $i have to modify

this program ater

ParameteriDe the input vaues and read these vaues from a fie A data structure is created for

parameteriDationH the data records are read from an eterna fie into this data structure The

program assumes the fie $as taiored to this data structure

If you have decided to parameteriDe the input vaues you shoud aso create a test fie during

generation To do this seect the checo and enter a name for the fie

The attriute maintenance screen of the AAP editor appears aintain the attriutes and save the

program

copy SAP AG BC420 12-42

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 4388

04

983209 SAP AG 1999

Program 9unctions

Online

transaction

Transfer program

To

error

1rror

ption 6ption ampFlat SAP

structure

Monitor

Cou have no$ generated a data transfer program for importing data into the amp System The

program can eecute the data transfer using atch input or ca transaction

If you choose option 1 and there is an error the data record is paced into a atch input session

copy SAP AG BC420 12-43

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 4488

044

983209 SAP AG 1999

Benerating 9unction Modules

Recording

Zcreaedeor ncon mode

ncon rop

Sor eD

ZBC420

Creae comer

9unction module

nl( one data record can be processed at a time

In the net diaog o you can generate a function modue a function group and short tet from the

recording The function modue is automaticay created in the function group

copy SAP AG BC420 12-44

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 4588

042

983209 SAP AG 1999

9unction of 9unction Modules

Online

transaction

To

error

1rror

ption 6 ption amp

9unction module

Import

Parameter 1port

parameter

Tables

M1SSTA

Monitor

S$BC

Import interface

The import interface consists of a technica part and the fieds from the recording (A parameter is

created for each input fied of the recorded transactions)

7port interface

Simpy consists of the parameter S4amp2 The function modue $i return a vaue in the system

fied SC9S4amp2 after caing ca transaction This return vaue is set to Dero if the data record has

een correcty processed (5ny appies to 2T)

If a session is created you $i e notified $hether the data record coud e paced into the session

Tae interfaceThis is used ony if the function modue $ors $ith ca transaction The tae contains a the

system messages

copy SAP AG BC420 12-45

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 4688

048

983209 SAP AG 1999

Import Interface of 9unction Module

$

Technical

fields

Data

fields

BI session or CALL TRANSACTION

Processin $ode

pdate $ode

a$e oamp BI session iamp (T initial)

Bacround user iamp (T initial)

Delete session aampter processin

Loc date oamp session

ODATA indicator

TU

MD1

UPDAT1

BRUP

US1R

=11P

ELDDAT1

DATA

Cou can use parameter 2T4 to specify $hether the function modue creates a atch input session

(2T4 E ) or updates the data record directy using ca transaction (2T4 E G)

The other parameters are fied as for a atch input session header

Note 7very time the function modue is caed a atch input session is created

If the session is to contain severa transactions proceed as foo$s

ltenerate the transaction severa times This can e achieved y recording the transaction again The

function modue interface $i then contain more than one transaction -hen the function modue is

caed severa transactions can e generated for each session

copy SAP AG BC420 12-46

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 4788

043

983209 SAP AG 1999

The Transaction Recorder

PrinciplesPrinciples

Recording )ith the LSMWRecording )ith the LSMW

Principles of atch Input and all TransactionPrinciples of atch Input and all Transaction

Integrating the TA Program into the DWIntegrating the TA Program into the DW

Using the TA Recorder Using the TA Recorder

copy SAP AG BC420 12-47

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 4888

045

983209 SAP AG 1999

Benerated Program

9unction modules DltP1ltBRUP

DltIS1RT

DltLS1ltBRUP

AAP Program

Define structure of

data in seJuential

fileDefine D

table

pen seJuential file

pen I session

Read data recordCseJuential file

9ill D table

9ill I session gtALL TRASATI

Last data record K

lose I session

lose seJuential file

The generated program has the structure dispayed aove It uses the standard function modues for

creating atch input sessions

copy SAP AG BC420 12-48

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 4988

047

983209 SAP AG 1999

Structure of the Benerated Program

Benerated part

Define D

table

pen seJuential file

pen I session

Read data record

9ill D table

9ill I session gtALL TRASATI

Last data recordK

lose I session

lose seJuential file

Include DR16

Define filestructure

P1ltDATAS1T

P1ltBRUP

DltDPR

Dlt9I1LD

DltTRASATI

LS1ltBRUP

LS1ltDATAS1T

The generated program consists of t$o parts 9 a generated part and the incude 2amp72G8 The

incude is provided in the standard system

The incude contains the definition of the reuired 2 tae and a further seven suroutines These

suroutines eecute the foo$ing functions

5pen and cose fie

5pen and cose session

Fi 2 tae

Fi session

The generated part is the main program and cas the reevant suroutines A structure is aso

generated in the generated part to read the eterna data into the fie

See the Appendi for more information on the 2amp72G8 program

copy SAP AG BC420 12-49

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 5088

020

983209 SAP AG 1999

Structure of D Table

PRBRAM DPR D1BI 9AM 9ALPRBRAMPRBRAM DPRDPR D1BID1BI 9AM9AM 9AL9AL

SAPM90ampD 0602

R90ampD=UR 600000

R90ampDU=RS 0006

R90ampD=T=D =UA

SAPM90ampD 0660

=A6AM16 Smith

=A6PSTL 87000

=A6LAD6 US

=A6SPRAS 1

SAPM90ampD 06amp0

=A6ST1B US6amp428357DDATA

PRBRAM

DPR

D1BI

9AM

9AL

EAR

UM

EAR

EAR

EAR

40

4

6

6amp

6amp

D Module pool

D Screen number

D Start of screen

D 9ield name

D 9ield contents

9ield ame T(pe Length Short Tet

AAP Dictionar(

The 2 tae has the same structure as in a standard transfer

copy SAP AG BC420 12-50

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 5188

026

983209 SAP AG 1999

Read Structure

Recording

DATA BEGIN OF record data element BUKRS bukr$amp data element KTOKD ktokd$amp data element NA(EG) name$+amp data element SORT ortl$ampEND OF record-

record

Automaticall( generated

from recording

The structure of the fie is automaticay generated and is a$ays defined $ith the name amp725amp

The generated structure a$ays has the same ayout 7ach fied is defined y t$o generated ro$s

The first ro$ is a$ays a comment ro$ containing the tet J data eement and the data eement of

the screen fied from the recording In the net ro$ the fied itsef is defined $ith the name of the

data eement foo$ed y a three9digit position numer $hich specifies the ocation in the structure

The ength of the fied is set y the ength of the data eement If a fied is not defined through a data

eement the system uses the ength of the screen fied

copy SAP AG BC420 12-51

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 5288

02amp

983209 SAP AG 1999

pening and losing the 9ile

P1ltDATAS1T

LS1ltDATAS1T

FOR( oendataet USING dataet-O)EN DATASET dataet IN TET (ODE-

IF S01SUBR2 34 - 5RITE 6 te7t1e S01SUBR2-STO)-

ENDIF-

ENDFOR(-

FOR( cloedataet USING dataet-2OSE DATASET dataet-

ENDFOR(-

Include

DR16

The suroutine 5P7N3ATAS7T opens the seuentia fie

The suroutine 2+5S73ATAS7T coses the seuentia fie

copy SAP AG BC420 12-52

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 5388

02

983209 SAP AG 1999

9unction Modules for I Program

lient

Session name

Eold date

=eep session

D user name

RecordK

LI1T

BRUP

ELDDAT1

=11P

US1R

R1RD

DltP1ltBRUPDltP1ltBRUP

Transaction code

D table

TD1

DPRTA

DltIS1RTDltIS1RT

DltLS1ltBRUPDltLS1ltBRUP

pen Isessionpen Isession

Insert data for

transactions

Insert data for

transactions

lose I

session

lose I

session

The foo$ing function modues are provided for creating atch input sessions (function group

S2)

235P7N3ltamp54P

2reates a ne$ session and contains genera data for the $hoe session

23INS7ampT

Inserts a the data for a transaction into the session The transferred interna tae $ith the

structure 2ATA must contain a the data reuired for fuy processing the transaction

232+5S73ltamp54P

2oses the session after a the data has een inserted As soon as the session has een cosed it

can e processed

The interna tae $ith the structure 2ATA can ony contain atch input data for one singe

transaction run So the individua transactions are inserted into the atch input session in a oop

using severa 23INS7ampT cas

copy SAP AG BC420 12-53

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 5488

024

983209 SAP AG 2001

9unction Module DltP1ltBRUP

ALL 9UTI DltP1ltBRUPALL 9UTI DltP1ltBRUP

1PRTIB

LI1T client

BRUP session name

ELDDAT1 loc+ date

=11P delete flag

US1R bdc user name

R1RD recording

IMPRTIB

NID internal session +e(

11PTIS

1PRTIB

LI1T client

BRUP session name

ELDDAT1 loc+ date

=11P delete flag

US1R bdc user name

R1RD recording

IMPRTIB NID internal session +e(

11PTIS

-ith the function modue 235P7N3ltamp54P you can open a atch input session

The foo$ing parameters are mandatory

2+I7NT (cient)

ltamp54P (session name)

4S7amp (user name)

Note The 4S7amp must a$ays e specified This user name is reuired for processing the session

in atch mode

The foo$ing parameters are optiona

=5+AT7 specifies the eariest date on $hich the session can e started677P fag specifies $hether session shoud e deeted after it has een successfuy processed The

677P fag is ignored if the session contains errors

677P E K K means deete the session after processing (defaut vaue) H

677P E KGK means do not deete session

amp725amp E KGK ao$s you to create a recording instead of a I session

If gtI is specified the function modue returns the interna session ey This is needed to e ae to

differentiate sessions that have the same name

-ith 7G27PTI5NS you get various return vaues that can e ueried $ith SC9S4amp2

Note In onine mode the onine user is used for the authoriDation checs regardess of the user

name specified

copy SAP AG BC420 12-54

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 5588

022

983209 SAP AG 1999

Subprogram P1ltBRUP

P1ltBRUP

FOR( oen8rou-IF e9on -

2A FUN2TION BD2O)ENGROU) E)ORTING 2IENT lt1mandt GROU) 8rou USER uer KEE) kee

=ODDATE gtolddate-

ENDIF-ENDFOR(-

Include

DR16

The suprogram 5P7N3ltamp54P opens the atch input session

copy SAP AG BC420 12-55

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 5688

028

983209 SAP AG 1999

9unction Module DltIS1RT

ALL 9UTI DltIS1RTALL 9UTI DltIS1RT

IMPRT

TD1 Transaction code

PSTltLAL Update locall(

PRITIB print list

TAL1S DPRTA bdclttable

11PTIS

IMPRT

TD1 Transaction code

PSTltLAL Update locall(

PRITIB print list

TAL1S DPRTA bdclttable

11PTIS

-ith the function modue 23INS7ampT you can add transaction data to the session

Cou need an interna 2 tae to transfer the data

The foo$ing parameters are mandatory

T257 Transaction code

CNPamp5TA 2 tae

The foo$ing parameters are optiona

P5ST3+52A+ E KGK activates oca updating This means that the data to e updated is ept in the

appication server and updated in the ast step of the transaction This does not invove the update

process (For more information see course 28 Programming ataase 4pdates)

PampINTINlt E KGK 9 ists processed in I $i e printed immediatey -ith 7G27PTI5NS you get various return vaues that can e ueried $ith SC9S4amp2

copy SAP AG BC420 12-56

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 5788

023

983209 SAP AG 1999

Subprogram DltTRASATI

DltTRASATI

FOR( BD2TRANSA2TION USING tcode-

IF e9on -2A FUN2TION BD2INSERT

E)ORTING T2ODE tcode TABES D0N)ROTAB bdcdata-

ESE-

ENDIF-ENDFOR(-

T

Include

DR16

The suprogram 23TampANSA2TI5N moves the fied 2 tae either to a atch input session

or uses ca transaction to import the data into the system 5n the seection screen you can specify

$hether you $ant to create a session or you $ant to use ca transaction to process the data directy

The S7SSI5N fied is then set according to your seection

copy SAP AG BC420 12-57

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 5888

025

983209 SAP AG 1999

9unction Module DltLS1ltBRUP

ALL 9UTI DltLS1ltBRUP

11PTIS

TltP1 6

NU1U1lt1RRR amp

-ith the function modue 232+5S73ltamp54P you can cose a atch input session

In 7G27PTI5NS you get various return vaues that can e ueried $ith SC9S4amp2

copy SAP AG BC420 12-58

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 5988

027

983209 SAP AG 1999

Subprogram LS1ltBRUP

FOR( cloe8rou-IF e9on -cloe batcgt 9nut 8rou

2A FUN2TION BD22OSEGROU)-

ESE-IF e8rouoened -

2A FUN2TION BD22OSEGROU)-

ENDIF-ENDIF-

ENDFOR(-

LS1ltBRUPlose session

lose error session

Include

DR16

The suprogram 2+5S73ltamp54P coses the atch input session The suprogram differentiates

et$een a norma I session (S7SSI5N E G) and a session opened $hen ca transaction

encountered an error (73ltamp54P35P7N7 E G)

copy SAP AG BC420 12-59

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 6088

080

983209 SAP AG 1999

Subprograms DltDPRG Dlt9I1LD

DltDPR

Dlt9I1LD

FOR( bdc9eld USING nam al-IF al 34 nodata-2EAR bdcdata- bdcdata1nam nam- bdcdata1al al- A))END bdcdata-ENDIF-

ENDFOR(-

FOR( bdcdltnro USING ro8ram dltnro- 2EAR bdcdata-Bdcdata1ro8ram ro8ram-Bdcdata1dltnro dltnro-Bdcdata1dltnbe89n - A))END bdcdata-ENDFOR(-

Include

DR16

The incude 2amp72GG contains t$o suprograms 23CNPamp5 and 23FI7+

Suprogram 23CNPamp5 fis the 2 tae $ith program names and screen numers

Suprogram 23FI7+ fis the 2 tae $ith fied names and vaues

7ach suprogram creates an entry in the 2 tae

copy SAP AG BC420 12-60

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 6188

086

983209 SAP AG 1999

9illing the D Table

erorm bdcdltnro u9n8 SA)(FD +- erorm bdc9eld u9n8 BD22URSOR RFD1BUKRS- erorm bdc9eld u9n8 BD2OK2ODE 6- erorm bdc9eld u9n8 RFD1BUKRS record1BUKRS- erorm bdc9eld u9n8 RFD1KTOKD record1KTOKD-

erorm bdcdltnro u9n8 SA)(FD -

erorm bdc9eld u9n8 BD22URSOR KNA1S)RAS- erorm bdc9eld u9n8 BD2OK2ODE 6- erorm bdc9eld u9n8 KNA1NA(E record1NA(E-

erorm bdc9eld u9n8 KNA1SORT record1SORT-

Recording Benerated automaticall(

from the recording

)ERFOR( bdcdltnro USING SA)(FD +- )ERFOR( bdc9eld USING BD22URSOR RFD1BUKRS-)ERFOR( bdc9eld USING BD2OK2ODE 6-)ERFOR( bdc9eld USING RFD1BUKRS record1BUKRS-)ERFOR( bdc9eld USING RFD1KTOKD record1KTOKD-

)ERFOR( bdcdltnro USING SA)(FD -

)ERFOR( bdc9eld USING BD22URSOR KNA1S)RAS-)ERFOR( bdc9eld USING BD2OK2ODE 6-)ERFOR( bdc9eld USING KNA1NA(E record1NA(E-

)ERFOR( bdc9eld USING KNA1SORT record1SORT- ---

The 2 tae is fied $ith data from the recording The suroutines 23CNPamp5 and

23FI7+ are used for this

The suroutines are caed in the reuired structure or seuence

copy SAP AG BC420 12-61

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 6288

08amp

983209 SAP AG 1999

erie)

SAPDatabase

SeJuential9ile

SAPDatabase

ALL TRASATIALL TRASATI

SeJuential9ile

ATE IPUTATE IPUT

D TableD TableD TableD Table

I Monitor

T

In contrast to atch input you can use ca transaction to directy pass data to the diaog interface

$ithout using a atch input session Cou use an interna tae (2 tae same structure and ayout

as atch input) to temporariy store your screen data Then you ca the desired transaction in your

program

Note 5n average the 2a Transaction method is 8 to times faster than using atch Input

copy SAP AG BC420 12-62

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 6388

08

983209 SAP AG 1999

all Transaction Program$ 1ample

RE)ORT abcbdcdcdeb9ct-

)ARA(ETERS d9mode DEFAUT A

udmode DEFAUT S-FOR( calltranact9on-2A TRANSA2TION FD

USING bdcdata (ODE d9mode

U)DATE udmode-

IF lt1ubrc NE - 5RITE 6 ---

ENDIF-ENDFOR(-

Screen

00

Screen

100

Screen

An additiona system ro area is added for the caed transaction The system uses this area for

processing the individua screens in the transactionH the data from the tae is added here After the

transaction is processed the second ro area is reeasedH the system continues processing in the first

ro area

Notes

In contrast to atch input there is no error ogging (error sessions) here For processing the caed

transaction the system uses the authoriDations of the user that caed the transaction The 2 tae

can ony hod data for one transaction run at a time efore another transaction is caed and its data

can e added you must eecute a amp7Famp7S= for the 2 tae

copy SAP AG BC420 12-63

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 6488

084

983209 SAP AG 1999

ALL TRASATI C6

RE)ORT 777-

2A TRANSA2TION FD USING bdcdata (ODE E-

Default for MD1 is A

2A TRANSA2TION 3tranact9oncode4 USING 3bdc1table4 C (ODE A E N C-

-ith the parameter 57 you can seect a specific dispay mode for processing the transaction The

foo$ing three modes are avaiae

A (ispay a)

If you eecute the program a the screens and a their data are dispayed This is the defaut vaue

for the 57 in 2A++ TampANSA2TI5N

N (ispay nothing)

The screens are not dispayed at a regardess of $hether any of them contained errors As soon as

the transaction has een fuy processed contro is returned to your program (The vaue of the

parameter 4PAT7 determines $hether dataase updates are eecuted or not)

7 (ispay errors ony)As soon as an error occurs in a screen the transaction is s$itched to dispay mode so that you can

correct the errors

These dispay modes are the same as those in the atch input session processing

copy SAP AG BC420 12-64

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 6588

082

983209 SAP AG 1999

RE)ORT 777-

2A TRANSA2TION FD USING BD2DATA U)DATE -

ALL TRASATI Camp

RE)ORT 777-

2A TRANSA2TION FD USING bdcdata U)DATE -

2A TRANSA2TION 3tranact9oncode4 USING 3bdc1table4 C (ODE A E N C U)DATE A S C -

Default for UPDAT1 is A

-ith the parameter 4PAT7 you can contro ho$ dataase updates arising from a transaction are

carried out There are three options

A (asynchronous updating) The caed transaction does not $ait unti the dataase has een

updated it simpy for$ard the updates to the SAP update service This usuay speeds up the 2T

program This processing mode is N5T recommended for arge data sets as the caed transaction

does not receive a competion message from the update modue

The caing 2T program therefore cannot te if the transaction has een successfuy competed Cou

shoud use the updating administration function (transaction S8) to determine $hether updating

$as terminated eary The error anaysis correction functions for are ess hepfu than $ith

synchronous updating

S (synchronous updating) -ith synchronous updating the caed transaction $aits unti a the

updates have een competed So processing is so$er than $ith synchronous updating The caed

transaction can ho$ever report any updating errors to the program $hich maes error

anaysiscorrection easier

+ (local updating) $ith oca updating the dataase is not updated in a separate process it is

updated in the caers process (see appication hep documentation for the AAP ey$ord S7T

4PAT7 TAS6 +52A+)

copy SAP AG BC420 12-65

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 6688

088

983209 SAP AG 1999

ALL TRASATI C

RE)ORT 777-DATA mtab T0)E TABE OF bdcm8coll-

2A TRANSA2TION FD USING bdcdata (ESSAGES INTO mtab-

2A TRANSA2TION 3tranact9oncode4 USING 3bdc1table4 C (ODE A E N C U)DATE A S C (ESSAGES INTO 3metab4 C -

7SSAlt7S specifies that a system messages that are output during the eecution of a 2A++

TampANSA2TI5N are $ritten to the interna tae L7SSTA The interna tae must have the

structure 2Slt25++

4nie the cassica atch input processing $ith sessions 2A++ TampANSA2TI5N does not offer any

specia processing procedures for transactions containing errors There are no restart functions for

transactions that contain errors or that cause updating terminations

copy SAP AG BC420 12-66

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 6788

083

983209 SAP AG 1999

ALL TRASATI C4

RE)ORT 777-DATA mltot T0)E ctuaram-

2A TRANSA2TION FD USING BD2DATA

O)TIONS FRO( mltot-

2A TRANSA2TION 3tranact9oncode4 USING 3bdc1table4 C (ODE A E N C U)DATE A S C (ESSAGES INTO 3metab4 C O)TIONS FRO( ot C -

RE)ORT 777-DATA mltot T0)E ctuaram-2A TRANSA2TION FD USING bdcdata

O)TIONS FRO( mltot-

The addition 5PTI5NS enaes the ca transaction statement to e controed through a structure

The structure must have the dictionary type 2T43PAampAS

The addition 5PTI5NS Famp5 must not e comined either $ith the addition 57 or $ith

4PAT7 ore information on the net side

copy SAP AG BC420 12-67

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 6888

085

983209 SAP AG 1999

Structure TUltPARAMS

DISMD1 Procen mode anaoo o addon amp

UPDMD1 $pdae mode anaoo o addon $PA

ATTMD1 CA mode CA conro

D19SI1 orce de=a EndoE e drn procen

RAMMIT +o eD a Camp amp(

IPT +o a ac np eonF a F S-B+P SPAC

I1D +o a ac np eon a=er end o= BC daa

The components are defined as foo$s

The components 7FSIM7 ampA25IT N5INPT and N5I7N can have the foo$ing

vaues KGK E Ces or K K E No

If the addition 5PTI5NS Famp5 is not specified the foo$ing settings appy to the contro

parameters

IS57 from addition 57

4P57 from addition 4PAT7

2ATT57 2ATT not active

7FSIM7 o not not use defaut $indo$s siDe

ampA25IT Successfu eit at 25IT -5amp6

N5INPT atch input session active (SC9INPT E G)

N5I7N atch input session sti active after end of 2 data

copy SAP AG BC420 12-68

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 6988

087

983209 SAP AG 1999

SMSBID Message ID

SMSBT Message T(pe C1GIGWGSGA

SMSB Message umber

SMSB6 Message ariable 6

SMSBamp Message ariable amp

SMSB Message ariable

SMSB4 Message ariable 4

SMSBID Message ID

SMSBT Message T(pe C1GIGWGSGA

SMSB Message umber

SMSB6 Message ariable 6

SMSBamp Message ariable amp

SMSB Message ariable

SMSB4 Message ariable 4

Return code$

S(stem fields$

alue Meaning

0 Successful

6000 1rror in transaction

6000 1rror in processing call transaction

see also the s(stem fields specified

alue Meaning

0 Successful

6000 1rror in transaction

6000 1rror in processing call transaction

see also the s(stem fields specified

9ield name Meaning9ield name9ield name MeaningMeaning

Return ode and S(stem 9ields

The return code is used to specify $hether the caed transaction $as processed successfuy In

addition severa system fieds are fied The numer I type and variaes of the diaog message

output y the caed transaction Cou need this information to output the message tet

copy SAP AG BC420 12-69

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 7088

030

983209 SAP AG 1999

Benerated Program of the TA Recorder

REFRES= (ESSTAB-

2A TRANSA2TION tcode USING bdcdata (ODE ctumode U)DATE cudate (ESSAGES INTO metab-OO) AT metab- ENDOO)-IF lubrc 34 AND e8rou 34 S)A2E- IF e8rouoenend - 2A FUN2TION BD2O)ENGROU) E)ORTING ---------

--------- E8rouoened - ENDIF- 2A FUN2TION BD2INSERT E)ORTING T2ODE tcode TABES D0N)ROTAB bdcdata-ENDIF-REFRES= bdcdata-

Message table output

pen error session

Insert data record that

has errors into error

session

If you have seected ca transaction on the seection screen the generated program runs as foo$s

The onine transaction is caed $ith ca transaction and passed to tae 2ATA A the

messages arising during the ca transaction are put in the interna tae 7SSTA

7SSTA is output as a ist

If you have specified an error session ( 73ltamp54P L SPA27) on the seection screen and the

ca transaction comes across an error (+3S4amp2 L 0) the error session is opened The error

session is ho$ever ony opened once Then the data record is paced in the session

A the other data records that have errors $ith ca transaction are paced in the same session

copy SAP AG BC420 12-70

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 7188

036

983209 SAP AG 1999

The Transaction Recorder

PrinciplesPrinciples

Recording )ith the LSMWRecording )ith the LSMW

Principles of atch Input and all TransactionPrinciples of atch Input and all Transaction

Integrating the TA Program into the DWIntegrating the TA Program into the DW

Using the TA Recorder Using the TA Recorder

copy SAP AG BC420 12-71

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 7288

03amp

983209 SAP AG 1999

Integrating into the DW

Transfer program

AAP Dictionar(

Integrate

SDA0

SDA6

SDAamp

SDA

Cou can integrate the generated program into the G9- The structure of the fie must e created

in the AAP ictionary The taes SGA0 SGA8 SGA1 and SGA $i e fied

copy SAP AG BC420 12-72

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 7388

03

983209 SAP AG 1999

DW Release 42

Goo

-B eeae 45

aa ran=er ogtec

Int customer data transfer ob-ect

ecord =ed

Dece daa ran=er

d Goo

The ampunction ampor interatin TA recorder prora$s is

i$ple$ented in the

D+-B in Release

The recorder can e integrated as of ampeease and it is provided in the G9- ampeease

ltot to the G9- ampeease 5n the initia screen you can integrate programs y choosing ampoto

( +nt customer ata transfer o-ect

copy SAP AG BC420 12-73

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 7488

034

983209 SAP AG 1999

reating Program as D b-ect

Comer ran=er ogtec

ampgtec ype

Sor eD =or ogtec

aa ran=er proram

Srcre name

9900

(+A1

Cane comer

ZBCA+G

ZB

ustomer transfer ob-ect

umber bet)een 7000 and 7777

b-ect t(pe

Assignment to R ob-ect

Short tet for D ob-ectShort description

Data transfer program

ame of generated program

Structure name

A structure Cstructure la(out )ith this name is created in

the AAP Dictionar(

For ampeease transfer oects $ere not organiDed y 5amp oects ut y a G numer (00089

OOOO) The numer range O0009OOOO is reserved for customers

To create a connection to the ne$ G 9- you must assign the program to a 5amp oect

2reate a short tet for the G oect This tet $i appear in the method seection ist

Specify the program to e incuded

Specify a name for the structure to e created in the AAP ictionary

Note $he generated program appears under program type +N and not under program type

-

copy SAP AG BC420 12-74

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 7588

032

983209 SAP AG 1999

Adantages

Automatic program registration in the DW in

Release 48

ou can use all the functions defined for

standard ob-ects

1ception$ The (reate ampile ith data

function

If you incuded the oect in the ampeease $orench it is automaticay avaiae in the ampeease

B $orench

A the $orench functions are avaiae for your oect ecept for Create files ith transfer ata

copy SAP AG BC420 12-75

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 7688

038

983209 SAP AG 1999

ou are no) able to$

The Transaction Recorder$ Unit Summar(

Use the recording function in the LSMW to create

a batch input session )ith the data from the

eternal s(stem

Use the TA Recorder to create (our o)n data

transfer program

Anal(e programs that )or+ )ith batch input or

call transaction

Integrate the TA Recorder programs into the

DW

copy SAP AG BC420 12-76

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 7788

ercise 1

nit $ -ecorder

$opic 2reating etors

$ransaction -ecorder ercise 1

bull 2reating detors $ith eterna numer assignment

bull etor numers M9980008 to M9980080

Address data for detors $ith eterna numer assignment is to

e transferred using program ampFI700

ro4ect F5

Supro4ect +5

-un +575

$as)s 85 95 8S25

9oad program -F+00

8 In the foo$ing eercises eisting data is to e changed Therefore these detors $ith

eterna numer assignment have to first e created

898 4nder suproect 79 create run 797G9 $ith the name Detors ith

eternal numers

copy SAP AG BC420 12-77

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 7888

891 2reate the foo$ing three tass The tass map the foo$ing process steps

convert data create + session and process + session

89198 In run 797G9 create the foo$ing tas

9 Tas AP9

9 Name 2onvert data 9 Tas type AP

9 Program type +S-

Seect the foo$ing +S- oect

+S- proect 2109

+S- suproect 7I9

+S- oect I997GT

89191 In run 797G9 create the foo$ing tas 9 Tas +5A9

9 Name 2reate I session

Tas type +5A

9 Program type INP

Seect program ampFI700 $ith the variant

I97G9

8919 In run 797G9 create the foo$ing tas

9 Tas S29

9 Name Process I session Tas type S2

9 Program type amp7P5

Seect program ampS2S4 $ith the variant

S497G9

Note that you have to correct the seuence of the tass 2onvert data

create + session and process + session

4se the uttons

89 Start the run

The detors $i e created $ith eterna numer assignments

89 2hec in transaction F0 that the detors M9980008 to M9980080 have een

created

copy SAP AG BC420 12-78

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 7988

ercise

nit $ransaction -ecorder

$opic -ecording function in the 9S8(

bull 2reate a recording using the +S-

bull ltenerate a atch input session

2hange the detor address data in the amp System

Name of the recording +

Name of the file +2055+F9

8 2reate the recording 7I3 using the +S- ampecord the transaction F01 (2hange

detor)

898 efore you create the recording first test the transaction onineQ

For the recording use detor M9980008 5n the initia screen of the F01

maintain the foo$ing fieds ony

etor etor M9980008

2ompany code 0008

Address data seect

Note $he data record must e saved hile recording

891 aintain the names and the descriptions for the foo$ing fieds

Name city street posta code and teephone numereete a other fieds in screen 880 from the recording (eg S5ampT+ +AN8

SPampAS)

4se the same technica names as sho$n in the tae eo$ (automatic fied

mapping)

copy SAP AG BC420 12-79

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 8088

1 2reate the suproect 7I9 and the ne$ oect TA3 in your proect 2109

aintain the oect attriutes and seect the item atch input recording Seect your

recording 7I3

2reate the source structure address

2reate the source fieds according to the tae eo$ 5r copy them from proect 2109S37N suproect 7I900 oect TA900

198 Fie setup The data from the egacy system are dispayed in the foo$ing tae

Fied name Fied type Fied ength escription

N5 2 8B etor numer

NA7 2 Name

STamp77T 2 Street

2ITC 2 2ityPace of residence

MIP 2 80 Posta code

T7+ 2 8B Teephone numer

191 aintain the fied mapping 4se the automatic fied mapping (via menu item

7tras)

19 Specify the fies 5ny maintain the fie name of the source fie

Name of the fie 21099IFI+7

2odepage 8800

19 Import the data and convert them ispay the data in each caseQ

19 2reate a atch input session

19B ampun the atch input session

copy SAP AG BC420 12-80

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 8188

ercise 3

nit $ransaction -ecorder

$opic -ecording ith the $ -ecorder

bull ltenerate a recording using the TA recorder

bull Test the recording

2hange the address data of detors in the amp system

Name recording $+

Name of the file +2055+F9

8 2reate the recording TA37I3 using the transaction recorder ampecord the

transaction F01 (change detor)

898 4se detor M9980008 for the recording 5n the F01 initia screen ony

maintain the foo$ing fieds

etor etor M9980008

2ompany 2ode 0008

Address data seect

Note $he data record must e saved hen recording

eete a fieds that do not eist in the source fie 21099IFI+7 from screen

880 in the recording (eg 6NA89S5ampT+ 6NA89+AN8 6ANNQ9SPampAS) Note o not deete fieds ampF01946ampS and ampF0190880

Save the recording no$

1 S$itch to the recordings overvie$

198 Process the recording $ith the processing mode A (dispay a)

191 Process the recording $ith the processing mode RN (no dispay)

19 If the recording has een tested and no error has occurred generate a I session

and run it using the I monitor If an error shoud occur generate the recordingagainQ

copy SAP AG BC420 12-81

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 8288

From the recording generate the program M21037I3 in your deveopment cass

2109 Seect the foo$ing

bull ampead fied contents from fie

bull 2reate test data in the fie 2103dei3test3tt

98 Save this program and eecute it ltenerate one I session each and process it

2arry out the same steps again using the ca transaction

The generated program shoud no$ e changed so that fie 21099IFI+7 can e

read and processed

98 2hange the defaut vaue of the fie name (parameter dataset) in 21099

IFI+7

91 2hange the structure definition eete the company code fied and the address

data checo from the structure

9 2hange the su9routine ca perform dc3fied for the company code (KampF019

46ampSK) so that the vaue 0008 is transferred

9 2hange the su9routine ca perform dc3fied for the address data checo

(KampF0190880K) so that the vaue G is transferred

9 Start the program again and read the data from the fie 21099IFI+7 $ith

detor data ltenerate a I session $ith it and run it

copy SAP AG BC420 12-82

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 8388

033 Include DR16INCLUDE BDCRECX1

SELECTION-SCREEN BEGIN OF LINE

PARAMETERS SESSION RADIOBUTTON GROUP CTU create sessi SELECTION-SCREEN COMMENT $amp TEXT-S FOR FIELD SESSION

se(ecti-scree )siti +

PARAMETERS CTU RADIOBUTTON GROUP CTU ca(( trasacti

SELECTION-SCREEN COMMENT $amp TEXT-S FOR FIELD CTU

SELECTION-SCREEN END OF LINE

SELECTION-SCREEN BEGIN OF LINE

SELECTION-SCREEN COMMENT $amp TEXT-S1 FOR FIELD GROUP

se(ecti-scree )siti $+

PARAMETERS GROUP1$amp r) ae 0 sessi

SELECTION-SCREEN COMMENT $amp TEXT-S+ FOR FIELD CTUMODE

se(ecti-scree )siti

PARAMETERS CTUMODE LIE CTU2PARAMS-DISMODE DEFAULT 3N3

A4 s56 a(( 78)rs

E4 s56 78)r errr (8

N4 7 t 7is)(a8 78)r

SELECTION-SCREEN END OF LINE

SELECTION-SCREEN BEGIN OF LINE

SELECTION-SCREEN COMMENT $amp TEXT-S$ FOR FIELD USER

se(ecti-scree )siti $+

PARAMETERS4 USER1$amp DEFAULT S9-UNAME ser 0r sessi i atc5

SELECTION-SCREEN COMMENT $amp TEXT-S FOR FIELD CUPDATE

se(ecti-scree )siti

PARAMETERS CUPDATE LIE CTU2PARAMS-UPDMODE DEFAULT 3L3

S4 s8c5rs(8

A4 as8c5rs(8

L4 (ca(

SELECTION-SCREEN END OF LINE

SELECTION-SCREEN BEGIN OF LINE

SELECTION-SCREEN COMMENT $amp TEXT-S FOR FIELD EEP

se(ecti-scree )siti $+

PARAMETERS4 EEP AS CltECBOX 3 3 = 7e(ete sessi i0 0iis5e7

3X3 = gtee) sessi i0 0iis5e7

SELECTION-SCREEN COMMENT $amp TEXT-S FOR FIELD E2GROUP

copy SAP AG BC420 12-83

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 8488

se(ecti-scree )siti

)araeters E2GROUP1$amp r) ae 0 errr-sessi

SELECTION-SCREEN END OF LINE

SELECTION-SCREEN BEGIN OF LINE

SELECTION-SCREEN COMMENT $amp TEXT-S FOR FIELD ltOLDDATE

se(ecti-scree )siti $+

PARAMETERS4 ltOLDDATE LIE S9-DATUM

SELECTION-SCREEN COMMENT +11amp TEXT-S$ FOR FIELD E2USER

se(ecti-scree )siti

PARAMETERS4 E2USER1$amp DEFAULT S9-UNAME ser 0r errr-sessi

SELECTION-SCREEN END OF LINE

SELECTION-SCREEN BEGIN OF LINE

SELECTION-SCREEN COMMENT +11amp TEXT-S FOR FIELD E2EEP

se(ecti-scree )siti

PARAMETERS4 E2EEP AS CltECBOX 3 3 = 7e(ete sessi i0 0iis5e7

3X3 = gtee) sessi i0 0iis5e7

SELECTION-SCREEN END OF LINE

SELECTION-SCREEN BEGIN OF LINE

SELECTION-SCREEN COMMENT +11amp TEXT-S FOR FIELD E2ltDATE

se(ecti-scree )siti

PARAMETERS4 E2ltDATE LIE S9-DATUM

SELECTION-SCREEN END OF LINE

SELECTION-SCREEN SIP

SELECTION-SCREEN BEGIN OF LINE

SELECTION-SCREEN COMMENT 1amp TEXT-S1 FOR FIELD NODATA

PARAMETERS4 NODATA DEFAULT 33 LOER CASE 7ata

SELECTION-SCREEN END OF LINE

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

Batc5i)t7ata 0 si(e trasacti

DATA4 BDCDATA LIE BDCDATA OCCURS ITlt ltEADER LINE

essaes 0 ca(( trasacti

DATA4 MESSTAB LIE BDCMSGCOLL OCCURS ITlt ltEADER LINE

errr sessi )ee7 3 3 r 3X3amp

DATA4 E2GROUP2OPENED

essae tets

TABLES4 T1

copy SAP AG BC420 12-84

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 8588

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

at se(ecti scree

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

AT SELECTION-SCREEN

r) a7 ser st e 0i((e7 0r create sessi

IF SESSION = 3X3 AND

GROUP = SPACE OR USER = SPACE

MESSAGE E1MSamp

ENDIF

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

)e 7ataset

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

FORM OPEN2DATASET USING P2DATASET

OPEN DATASET P2DATASET IN TEXT MODE

IF S9-SUBRC

RITE4 TEXT-E S9-SUBRC

STOP

ENDIF

ENDFORM

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

c(se 7ataset

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

FORM CLOSE2DATASET USING P2DATASET

CLOSE DATASET P2DATASET

ENDFORM

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

create atc5i)t sessi

t 0r ca(( trasacti siamp

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

FORM OPEN2GROUP

IF SESSION = 3X3

SIP

RITE4 $amp 3Create r)3I1amp GROUP

SIP

)e atc5i)t r)

CALL FUNCTION 3BDC2OPEN2GROUP3

EXPORTING CLIENT = S9-MANDT

copy SAP AG BC420 12-85

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 8688

GROUP = GROUP

USER = USER

EEP = EEP

ltOLDDATE = ltOLDDATE

RITE4 amp 3BDC2OPEN2GROUP3I$amp

1$amp 3retrc7e43I+amp

S9-SUBRC

ENDIF

ENDFORM

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

e7 atc5i)t sessi

ca(( trasacti si4 errr sessiamp

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

FORM CLOSE2GROUP

IF SESSION = 3X3

c(se atc5i)t r)

CALL FUNCTION 3BDC2CLOSE2GROUP3

RITE4 amp 3BDC2CLOSE2GROUP3Iamp

1$amp 3retrc7e43I+amp

S9-SUBRC

ELSE

IF E2GROUP2OPENED = 3X3

CALL FUNCTION 3BDC2CLOSE2GROUP3

RITE4

RITE4 amp 3Fe5(era))e 6r7e eret3Iamp

ENDIF

ENDIF

ENDFORM

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

Start e6 trasacti accr7i t )araeters

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

FORM BDC2TRANSACTION USING TCODE

DATA4 L2MSTRINGamp

DATA4 L2SUBRC LIE S9-SUBRC

atc5 i)t sessi

IF SESSION = 3X3

CALL FUNCTION 3BDC2INSERT3

EXPORTING TCODE = TCODE

TABLES D9NPROTAB = BDCDATA

RITE4 3BDC2INSERT3Iamp

copy SAP AG BC420 12-86

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 8788

TCODE

3retrc7e43I+amp

S9-SUBRC

3RECORD43

S9-INDEX

ca(( trasacti si

ELSE

REFRESlt MESSTAB

CALL TRANSACTION TCODE USING BDCDATA

MODE CTUMODE

UPDATE CUPDATE

MESSAGES INTO MESSTAB

L2SUBRC = S9-SUBRC

RITE4 3CALL2TRANSACTION3

TCODE

3retrc7e43I+amp

L2SUBRC

3RECORD43

S9-INDEX

LOOP AT MESSTAB

SELECT SINGLE FROM T1 ltERE SPRSL = MESSTAB-MSGSPRA

AND ARBGB = MESSTAB-MSGID

AND MSGNR = MESSTAB-MSGNR

IF S9-SUBRC =

L2MSTRING = T1-TEXT

IF L2MSTRING CS 313

REPLACE 313 ITlt MESSTAB-MSGH1 INTO L2MSTRING

REPLACE 3$3 ITlt MESSTAB-MSGH$ INTO L2MSTRING

REPLACE 33 ITlt MESSTAB-MSGH INTO L2MSTRING

REPLACE 33 ITlt MESSTAB-MSGH INTO L2MSTRING

ELSE

REPLACE 33 ITlt MESSTAB-MSGH1 INTO L2MSTRING

REPLACE 33 ITlt MESSTAB-MSGH$ INTO L2MSTRING

REPLACE 33 ITlt MESSTAB-MSGH INTO L2MSTRING

REPLACE 33 ITlt MESSTAB-MSGH INTO L2MSTRING

ENDIF

CONDENSE L2MSTRING

RITE4 MESSTAB-MSGT9P L2MSTRING$+amp

ELSE

RITE4 MESSTAB

ENDIF

ENDLOOP

copy SAP AG BC420 12-87

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 8888

SIP

Eree 0e5(era))e

IF L2SUBRC AND E2GROUP SPACE

IF E2GROUP2OPENED = 3 3

CALL FUNCTION 3BDC2OPEN2GROUP3

EXPORTING CLIENT = S9-MANDT

GROUP = E2GROUP

USER = E2USER

EEP = E2EEP

ltOLDDATE = E2ltDATE

E2GROUP2OPENED = 3X3

ENDIF

CALL FUNCTION 3BDC2INSERT3

EXPORTING TCODE = TCODE

TABLES D9NPROTAB = BDCDATA

ENDIF

ENDIF

REFRESlt BDCDATA

ENDFORM

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

Start e6 scree

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

FORM BDC2D9NPRO USING PROGRAM D9NPRO

CLEAR BDCDATA

BDCDATA-PROGRAM = PROGRAM

BDCDATA-D9NPRO = D9NPRO

BDCDATA-D9NBEGIN = 3X3

APPEND BDCDATA

ENDFORM

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

Isert 0ie(7

Page 6: BC420_46C - 012The Transaction Recorder

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 688

08

983209 SAP AG 2001

Uses of the TA Recorder

Flat SAP

Structure

atch

Input

all

Transaction

The TA ampecorder enaes you to transfer data into amp using atch input or ca transaction

The TA ampecorder can ony $or $ith a fat structure Fies $ith different record structures (for

eampe header structure) cannot e used

The TA ampecorder is used in the +S- to create recordings of transactions atch input sessions can

e created from the recordings

The TA ampecorder can itsef eecute a data transfer from the recording using atch input or ca

transaction

copy SAP AG BC420 12-6

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 788

03

983209 SAP AG 1999

The Recording

Recording

Screen

9ield alue

9ield nameModule pool

Transaction

Screen

111

Screen

106

Screen

130

The TA ampecorder can record transactions The recorder must e activated efore the transaction is

processed Then you can run the transaction as though you $ere processing it onine

After the transaction has finished the recording $i contain a the screen numers fied names

fied vaues and the associated modue poo and transaction code

copy SAP AG BC420 12-7

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 888

05

983209 SAP AG 1999

hanging ustomer Data$ Initial Screen

Vendor

Company code

Z-88-10000

Screen

106

Genera daa9ield ontents

BCC$Samp $SZAVBCamp(Camp )00

02-($++ -88-10000

02-0110

02-0130

$SZAV

9ield ame

Transaction 9D0amp

Addre

In the aove eampe the transaction Change customer F01 is recorded

In addition to the screen fieds the fieds 2324ampS5amp and 2356257 are aso

automaticay recorded

Note

You must change the field values for all the fields required later for the transfer For the

recording a change can simply mean overriting one single character in a field ith the

same character

f fields are to e filled using S$amp$ parameters the value must also e changed

(ith online transactions screen sequences may appear that are different than in therecording

copy SAP AG BC420 12-8

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 988

07

983209 SAP AG 1999

hanging ustomer Data$ Address

ustomer 5560000

+ame

Searc erm

Addre

Screen

111

9ield ontents

BCamp(Camp $PABCS$BSC SAPSZA1 0300ASS

BCS$BSC SAPSZA1 0301Camp$

BCC$Samp A1AA-amp$S+$1

A1AA-S Garden Sree

A1AA-amp$S+$1 02105

9ield ame

If there is a suscreen on the screens this is automaticay recorded In the recording the fied

23S4S2amp77N containing the name of the suscreen appears

-ith customer master data the address is a suscreen area The centra address management is

integrated here A the address input fieds are dispayed on one suscreen

2entra address management is ony used if you specificay seect this option on the initia screen

copy SAP AG BC420 12-9

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 1088

060

983209 SAP AG 1999

Results of the Recording

Recording

SAPM90ampD 0608

DltURSR R90ampD=UR

Dlt=D1 gt00

R90ampD=UR 5560000

R90ampDD0660

US1ltA

SAPM90ampD 0666

Dlt=D1 UPDA

DltSUSR SAPLSA6 000ADDR1SS DltSUSR SAPLSA6 006UTRltSR11

DltURSR SA6ltD0600T1LltUM1R

ADDR6ltDATASTR11T 4 Barden Street

ADDR6ltDATAPSTltD1 0amp602

ADDR6ltDATAIT6 oston

SA6ltD0600T1LltUM1 8638257755

The resut of the recording is a ist of a the fieds and fied vaues that $ere changed in the

recording

copy SAP AG BC420 12-10

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 1188

066

983209 SAP AG 1999

Special Recording 9ields

9unction code triggered on

this screen

9ield name )here cursor

)as last positioned on the

screen

Comer

Company code

Z-88-10000

Genera daa

Dlt=D1

DltURSR

uring a recording the foo$ing additiona fieds are automaticay recorded

The BDC_OKCODE fied contains the function code triggered on the screen

The BDC_CURSOR fied contains the fied name of the ast fied the cursor $as positioned in

efore eiting the screen

copy SAP AG BC420 12-11

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 1288

06amp

983209 SAP AG 1999

Determining the 9ield ame

Technical info

Screen field

R90ampD =UR

Comer

Company code

Z-88-10000

Genera daa

96help

Sa

Program SAPM90ampDScreen number 608

The information recorded in the TA recorder can aso e dispayed onine for each transaction

To find out the current modue poo name and the screen numer choose Systemrarr Status from the

menu

To determine the fied name pace the cursor on a fied and seect F8 hep The name of the screen

fied can e found under technical information

copy SAP AG BC420 12-12

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 1388

06

983209 SAP AG 1999

Subscreens

Comer Z-88-10000

+ame

+ame

ADDR6ltDATAAM16

DltSUSR

Information$

ode poo name

Screen nmer

Screen name

Some screens contain suscreen areas

To determine the fied name pace the cursor on the fied and choose F1 The name of the screen

fied is specified under Technical info

copy SAP AG BC420 12-13

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 1488

064

983209 SAP AG 2001

Tabstrips

$er Roberts

1ample$ User Profile Defaults

Sar men +

oon anae

ampp dece Pr1

ParameerDefaults

DltSUSR

USD19AULTSSPLD

The tastrip eement sho$n is used on the aintain User rofile (5$n data) screen

4nder the tastrip tite Defaults the user can set various vaues such as the defaut printer

The user profie are user9dependent settings (as the name impies)

copy SAP AG BC420 12-14

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 1588

062

983209 SAP AG 1999

Step Loops and Table ontrols

1ample$ an+ Details

Comer

ntr( an+ +e( Account

08154711

123456789

Z-00-12345

an+ Details

00708155546344536

Banlt daa

==A=C06)

==A=C0amp)

Step oops and tae contros are treated identicay for the recording

The fied names of the fieds isted are the same for every ro$

7ach ro$ contains a customers an detais The fieds must e accessed using an inde (this is

specified as an addition to the fied name for eampe 6N69AN6N(1) The inde must match

the ro$ numer

5ny the visie fieds on a screen can e fied $ith data If some fieds are ony visie after paging

the paging must e recorded as $e This means that for the recording you must eecute a the steps

in the onine transaction

For eampe age on $oud e eecuted using the function code 1 (Paging icons)

Paging to the end of a ist 1Page up 11

lto to first page 18

copy SAP AG BC420 12-15

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 1688

068

983209 SAP AG 2001

Recording Buidelines

Test the transaction before recording

Start the recording

hange field alues onl( for fields

releant to the recording

As of 48 all filled fields are recorded

Transaction must be properl( eitedCSA1

Use of scroll bars cannot be recorded

Specia recording notes

F8 F and your o$n F8 and F hep (Pamp527SS 5N =7+P9amp7gt47ST Pamp527SS 5N A+479

amp7gt47ST) are not recorded This aso appies to a commands under the System and $el

menus aues for defaut variants ( transaction variants) are not incuded

7rror and $arning diaogs are not recorded 5ny the 56 code and the fied contents reuired for

further processing on the current screen are recorded

Note uring recording the data entered is $ritten to the dataase

copy SAP AG BC420 12-16

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 1788

063

983209 SAP AG 2001

1n-o( SAP ontrols and Data Transfer

bull SAP Picture ontrolbull SAP ETML ie)er ontrol

bull SAP Tet 1dit ontrol

bull AL Brid ontrol

bull SAP Tree ontrol

bull

ranch 6

ranch amp

Root

These and other controls do not support batch input$

Root

ranch amp

ranch amp6

The ne$ 7noy SAP contros deveoped for ampeease B do not support atch input or ca

transaction

=o$ever tae contros and tastrips do support atch input

copy SAP AG BC420 12-17

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 1888

065

983209 SAP AG 1999

The Transaction Recorder

PrinciplesPrinciples

Recording )ith the LSMWRecording )ith the LSMW

Principles of atch Input and all TransactionPrinciples of atch Input and all Transaction

Integrating the TA Program into the DWIntegrating the TA Program into the DW

Using the TA Recorder Using the TA Recorder

copy SAP AG BC420 12-18

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 1988

067

983209 SAP AG 1999

Session

generator

Recording Using the LSMW

-ith the +S- you can create your o$n recordings

The +S- uses the standard TA recorder here yet evauates the recording itsef The information

from the recording is used to create atch input sessions

The created atch input session can e processed as usua $ith the atch input monitor

Note As $ith the standard procedure it is euay important that the data is converted

copy SAP AG BC420 12-19

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 2088

0amp0

983209 SAP AG 1999

reating Recording

Admnraon

ecordn

Goo

ame of recording

Description

)ner

ame of transaction

Start recording

lto into the +S- and seect the menu path ampoto (Recorings An overvie$ of a previousy

created recordings for your proect are dispayed To start a ne$ recording seect Create

To create a recording you must define the name the description and the o$ner

7nter the name of the transaction you $ant to record

7ecute the transaction and compete it propery

Note ampecordings are assigned to ony one proect 9 so the name of the recording must e uniue

copy SAP AG BC420 12-20

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 2188

0amp6

983209 SAP AG 1999

hanging ustomer Data$ Initial Screen

9ield ontents

BCC$Samp $SZAV

BCamp(Camp )00

02-($++ -88-10000

02-0110

02-0130

$SZAV

9ield ame

Comer

Company code

Z-88-10000

Genera daa

Comer Z-88-10000

+ame

9ield ontents

BCamp(Camp $PA

BCS$BSC SAPSZA1 0300ASS

BCS$BSC SAPSZA1 0301Camp$

BCC$Samp SZA10100-+$B

A1AA-S Garden Sree

A1AA-amp$S+$1 34

A1AA-PampSCamp1 02105

9ield ame

Screen

111

Screen

106

In the aove eampe the transaction Change customer F01 is recorded

Note

You must ma)e some modification to the field values for all the fields you ant to capture

for the data transfer For the purposes of recording a change can simply mean overriting

one single character in a field ith the same character

ven if fields are to e filled using S$amp$ parameters the values must still e changed on

the screen in order to capture them

(ith online transactions screen sequences may appear that are different than in the

recording

copy SAP AG BC420 12-21

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 2288

0ampamp

983209 SAP AG 1999

Results

RecordingRecording R1lt6 Demolt6

9D0amp hange customer Caccounting

SAPM90ampD 0608

DltURSR R90ampD=UR

Dlt=D1 gt00

R90ampD=UR 5560000

R90ampDD0660

US1ltA

SAPM90ampD 0666

Dlt=D1 UPDA

DltSUSR SAPLSA6

DltSUSR SAPLSA6

DltURSR SA6ltD0600T1LltUM1

ADDR6ltDATASTR11T 4 Barden Street

ADDR6ltDATAPSTltD1 0amp602

ADDR6ltDATAIT6 oston

SA6ltD0600T1LltUM1 8638257755

The resuts of the recording using the +S- are dispayed in a tree structure

After the recording has finished you can edit it Cou can deete fieds or add ne$ ones

copy SAP AG BC420 12-22

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 2388

0amp

983209 SAP AG 1999

Assigning 9ield ames

Recording R16 Demolt6

Dlt=D1 UPDA

DltSUSR SAPLSA6

DltSUSR SAPLSA6

DltURSR SA6ltD0600T1L

ADDR6ltDATAAM16 Lisa Eofmeister

ADDR6ltDATAPSTltD1 0amp602

ADDR6ltDATAIT6 oston

ame

+ame

ecrpon

e=a ae

A1AA-+A1

A1AA-+A1

Comer name

a o=meer

Screen =ed

ustomer name

double clic+

Cou can assign names for each recorded fied The specia fieds (2356257 2324ampS5amp

and 23S4S2amp77N) are not incuded here Cou can choose the fied names -hen the atch

input session is created the contents of these fieds are assigned to the target fieds specified in the

eft coumn

Functions

efaut Assigns to the fied names of the underying target fied and its fied description

ampeset eetes fied name and fied description

oue cic 7dits fied name fied description and defaut vaue

Note Cou can use fied names more than once =o$ever the fied name is ony avaiae once in thefied mapping For this reason it is not practica to use fied names more than once

For a those fieds for $hich you do not assign a name the defaut vaue is used $hen the atch

input session is created These defaut vaues can e seen as constants This is especiay usefu for

chec oes (for eampe 08 vie$ seection)

The +S- supports automatic fied mapping Source fieds and target fieds can e assigned to each

other automaticay The fieds are assigned to the corresponding fieds of the same name Therefore

the fied names of the source structure shoud e given the same or simiar names as the fied names

in the target structure

copy SAP AG BC420 12-23

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 2488

0amp4

983209 SAP AG 2001

Addinggtremoing screen fields

Repeating recording

9or identical field names the name and description are

assigned automaticall(

1diting Recording

02-($++

(+A1-A+

(+A1-+A1

(+A1-Samp

(+A1-+A2

(+A1-SAS

Comer accon nmer

e

+ame 1

Sor =ed

+ame 2

Sree

Selection of all

aailable screen

fields

Cou can ater add ne$ screen fieds if you need to 6eep in mind that fieds shoud ony e added in

paces $here they are aso provided on the screen other$ise you $i get an error $hen the I

session is processed

After saving you $i get the message The data has een saved successfuy No$ the recordings

are avaiae for the oect attriutes

If you repeat the recording you can record a ne$ screen seuence $ith ne$ fieds Provided that the

fied names (eg 6NA89NA78) are identica the names and descriptions are automaticay

assigned

copy SAP AG BC420 12-24

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 2588

0amp2

983209 SAP AG 1999

b-ect T(pe and Import Method$ Recording

Standard atch Input gt Direct Input

atch Input Recording

API

IDoc

ampgtec ype ) mpor meod

Bac np recordn

ecordn ec1

The recording is no$ avaiae $ith the oect attriutes

Net you create a proect or su9proect in the +S- and specify process the data transfer

Cou eecute the data transfer as in the standard system

efine the source fieds and structures

efine the fied mapping

ampead and convert the data

2reate and import a atch input session

copy SAP AG BC420 12-25

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 2688

0amp8

983209 SAP AG 1999

The Transaction Recorder

PrinciplesPrinciples

Recording )ith the LSMWRecording )ith the LSMW

Principles of atch Input and all TransactionPrinciples of atch Input and all Transaction

Integrating the TA Program into the DWIntegrating the TA Program into the DW

Using the TA Recorder Using the TA Recorder

copy SAP AG BC420 12-26

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 2788

0amp3

983209 SAP AG 1999

Transaction Recorder

Online

Transaction

RecordingTransfer Program

T

Included in the Batch Input Monitor

Cou use the transaction recorder to record transactions and then use the transaction recording to

generate a transfer program The program ao$s you to transfer data using either atch input or ca

transaction

copy SAP AG BC420 12-27

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 2888

0amp5

983209 SAP AG 1999

hanging ustomer Data$ Initial Screen

9ield ontents

BCC$Samp $SZAV

BCamp(Camp )00

02-($++ Z-88-10000

02-0110

02-0130

$SZAV

9ield ame

Comer

Company code

Z-88-10000

Genera daa

Comer Z-88-10000

+ame

9ield ontents

BCamp(Camp $PA

BCS$BSC SAPSZA1 0300ASS

BCS$BSC SAPSZA1 0301Camp$

BCC$Samp SZA10100-+$B

A1AA-S Garden Sree

A1AA-amp$S+$1 34

A1AA-PampSCamp1 02105

9ield ame

Screen

111

Screen

106

In the aove eampe the transaction Change customer F01 is recorded

copy SAP AG BC420 12-28

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 2988

0amp7

983209 SAP AG 2001

hange Debitor$ Pa(ment Transactions C6

Banlt dea

Screen

10

9ield ontent

BCC$Samp (+B(-BA+(+01

BCamp(Camp BA+((+B(-BA+(S01

(+B(-BA+(01 12345679

(+B(-BA+(+01 22222222

Debitor 5560000

9ield ame

Inde

copy SAP AG BC420 12-29

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 3088

00

983209 SAP AG 1999

hanging ustomer Data$ Pa(ment Transactions Camp

Addre

an+ countr( US

an+ code 6amp42837

Banlt dea

ustomer 5560000

9ield ontents9ield ame

BCC$Samp (+A1-(+ZA

BCamp(Camp $PA

(+B(-Z01

Screen

10

Screen

100

SAPLBA

9ield ontents

BCC$Samp B+(A-BA+(A

BCamp(Camp +

B+(A-BA+(A +aona Banlt

9ield ame

In different transactions the modue poo may change This is the case $ith for eampe customer

master data The TA recorder records modue poo changes automaticay

copy SAP AG BC420 12-30

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 3188

06

983209 SAP AG 1999

Eierarch( Displa( of the Recording

02amp

02

SAP02 0106

BCC$Samp 02-0130

BCamp(Camp )00

02-($++ -88-10000

02-0110

02-0130

SAP02 0111

BCamp(Camp V

BCC$Samp A1AA-amp$S+$1

A1AA-S Garden Sree

Recording

-ith the TA recorder the resuts are aso a ist in a hierarchy dispay =o$ever you cannot assign

your o$n fied names as you can in the +S-

copy SAP AG BC420 12-31

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 3288

0amp

983209 SAP AG 1999

Recording erie)

Recording

Transfer program

9unction module

ontains onl( the data

from the recording

Test data

Test

reate

reate

reate

reate

1dit hange recording

Process recording

Cou can edit the recording as needed

The recording can e tested and eecuted again The screens are run through in the same $ay as in

the recording

The recording can then e used to create

atch input sessions

Test data

ata transfer programs $ith atch input or ca transaction

Function modues

copy SAP AG BC420 12-32

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 3388

0

983209 SAP AG 1999

1 02 BS

2 SAP02 106

3 BCC$Samp $SZAV

4 BCamp(Camp )00 5 02-($++ -88-10000

6 02-0110

7 02-0130

8 $SZAV

9 SAP02 111

10 BCamp(Camp V

11 BCC$Samp A1AA-amp$S+$1

12 A1AA-S Garden Sree

Program Screen St 9ield ame 9ield alue

Recording 1ditor

Recording

Add gt delete lines 9ormat chec+

Import gt eport of recording

In the editor you can add or deete ines Cou can aso change the contents of individua ines

-ith the function Chec) you can specify $hether the edited version of the recording sti has the

correct synta

Cou can aso eport import recordings to from a seuentia fie

After editing save the recording changes

copy SAP AG BC420 12-33

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 3488

04

983209 SAP AG 1999

Recording Seeral Transaction Runs

RecordingF

Directl( after the first recordingG or

In the displa( mode of the recording

In this step you can record additiona transactions and add additiona transaction runs to the

recording

Cou can record the additiona transactions directy after a recording or in the edit screen of a

recording

copy SAP AG BC420 12-34

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 3588

02

983209 SAP AG 1999

1ditor$ Importing and 1porting Recordings

6 T 9D0amp S

amp SAPM90ampD 608

DltURSR

4

2

8 SAPM90ampD 666

60

66

Program Screen St 9ield name 9ield alue

cempA

e name

aa =orma

cemp

A

e name

aa =orma

1port

Import

Presentation Serer

If the editor functions in the systems do not provide a the functions you need you can do$noad the

recording to your presentation server using the Eort function and then edit the recording using a

P2 editor

Cou use the Import function to import the data ac into the amp System ae sure the fie is sti in

the correct format

copy SAP AG BC420 12-35

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 3688

08

983209 SAP AG 1999

Processing the Recording

Recording

Process )ith ALL TRASATI

Parameer

Proce mode$pdae mode

CA mode

e=a e

Con a=er comm

+o a B eon

nd +o a B mode

A

A

T

The recording can e eecuted directy The data from the recording is used and the transaction is

processed $ith ca transaction

2a transaction provides a range of options for caing appication transactions $hich are discussed

on the foo$ing t$o pages

copy SAP AG BC420 12-36

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 3788

03

983209 SAP AG 1999

Process mode

Update mode

ATT mode

Processing Recording )ith T 6

A

1

Displa( all screens

Displa( errors onl(

o displa(

L

S

A

Local

S(nchronous

As(nchronous

A

o ATT

ATT )ithout indiidual screen control

ATT )ith indiidual screen control

Processing mode

=ere you can specify the processing mode 9 it is the same as the processing mode for atch input

4pdate mode

=ere you can specify the update mode For more information see the unit ca transaction

2ATT mode

=ere you can mae specia settings if you $ant to test the recording under 2ATT conditions (ony

necessary for 2ATT runs) Specia functions are caed in the 2ATT too for each screen at the end of

P5 and at the start of PAI

copy SAP AG BC420 12-37

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 3888

05

983209 SAP AG 1999

Default sie

ont after commit

ot a I session

1nd$ ot a I mode

Processing Recording )ith T amp

The screen standard sie is used for the

processing

ommit )or+ does not end the processing

o I mode is actie The transaction )ill run

through as in online

I mode is selected nce the data in the D

table is processedG the I mode is set to inactie

Standard siDe

If you seect this the screens are processed in the standard siDe in the foreground (in foreground or

dispay errors ony) Note the standard siDe is a$ays used for acground processing

Further after commit

The first commit $or in a transaction does not ead to the end of the recording

Note A atch input transaction is ended $ith the first commit $or

No I mode

The system fied SC9INPT is not set (SC9INPT E ) So transactions are run through as in onine

7nd No I mode

5ny use if you choose the processing mode 7 (dispay errors ony) Then the transaction is processed in the acground in atch input mode and if there is an error the screens run through in

the foreground

copy SAP AG BC420 12-38

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 3988

07

983209 SAP AG 1999

I Mode

atch input

mode

nline

Some transactions behae differentl( in batch input mode

than in online Cbatch input capabilit(

atch input mode sets the s(stem field SIPT H

Not every transaction can run the same onine and in atch input mode The transaction must decide

itsef $hether it is caed onine or in atch input mode

The system sets the system fied SC9INPT E G if the atch input mode is active (this aso appies

to ca transaction) From this system fied the transaction can identify $hether to run onine or in

atch input mode

copy SAP AG BC420 12-39

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 4088

040

983209 SAP AG 1999

reating a Session 9rom the Recording

Recordingnl( contains the data

from the recording

Seon name 02amp

Aoraon ampBS(eep eon

oclt dae 10102000

Cou can create a atch input session directy from the recording that you can then process using the

atch input monitor

copy SAP AG BC420 12-40

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 4188

046

983209 SAP AG 1999

reating Test Data

Test Data

Recording

ranranpBC420AAe name

The file onl( contains the data from the recording

Rgt

Application Serer

Structure

Cou can create a fie from the recordingH the fie $i contain a the fieds from the recording The

fieds are added to the fie $ith the ength you specified in the definition

The fied order corresponds to the order in the recording overvie$ Technica fieds

(2356257 2324ampS5amp and so on) are incuded

The data can ony e stored on the appication server If you do not specify a path the fie is stored in

the $or directory of the appication server

If the specified test fie aready eists the ne$ data record is added to this fie

copy SAP AG BC420 12-41

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 4288

04amp

983209 SAP AG 1999

ed conen

reating a Program

Recording

ZBC420ampProram name

Transfer Program

e daa

ead =rom =e

ran=er =rom recordn

reate

9ile nameTest data

ranranpBC420AA

Cou can generate a program from the recording

In the foo$ing diaog o enter a program name In addition you can choose the type and method

for fiing the maintained fied contents from the recorded screens

4se the vaues used for the recording If you reuire feie data transfer you $i have to modify

this program ater

ParameteriDe the input vaues and read these vaues from a fie A data structure is created for

parameteriDationH the data records are read from an eterna fie into this data structure The

program assumes the fie $as taiored to this data structure

If you have decided to parameteriDe the input vaues you shoud aso create a test fie during

generation To do this seect the checo and enter a name for the fie

The attriute maintenance screen of the AAP editor appears aintain the attriutes and save the

program

copy SAP AG BC420 12-42

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 4388

04

983209 SAP AG 1999

Program 9unctions

Online

transaction

Transfer program

To

error

1rror

ption 6ption ampFlat SAP

structure

Monitor

Cou have no$ generated a data transfer program for importing data into the amp System The

program can eecute the data transfer using atch input or ca transaction

If you choose option 1 and there is an error the data record is paced into a atch input session

copy SAP AG BC420 12-43

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 4488

044

983209 SAP AG 1999

Benerating 9unction Modules

Recording

Zcreaedeor ncon mode

ncon rop

Sor eD

ZBC420

Creae comer

9unction module

nl( one data record can be processed at a time

In the net diaog o you can generate a function modue a function group and short tet from the

recording The function modue is automaticay created in the function group

copy SAP AG BC420 12-44

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 4588

042

983209 SAP AG 1999

9unction of 9unction Modules

Online

transaction

To

error

1rror

ption 6 ption amp

9unction module

Import

Parameter 1port

parameter

Tables

M1SSTA

Monitor

S$BC

Import interface

The import interface consists of a technica part and the fieds from the recording (A parameter is

created for each input fied of the recorded transactions)

7port interface

Simpy consists of the parameter S4amp2 The function modue $i return a vaue in the system

fied SC9S4amp2 after caing ca transaction This return vaue is set to Dero if the data record has

een correcty processed (5ny appies to 2T)

If a session is created you $i e notified $hether the data record coud e paced into the session

Tae interfaceThis is used ony if the function modue $ors $ith ca transaction The tae contains a the

system messages

copy SAP AG BC420 12-45

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 4688

048

983209 SAP AG 1999

Import Interface of 9unction Module

$

Technical

fields

Data

fields

BI session or CALL TRANSACTION

Processin $ode

pdate $ode

a$e oamp BI session iamp (T initial)

Bacround user iamp (T initial)

Delete session aampter processin

Loc date oamp session

ODATA indicator

TU

MD1

UPDAT1

BRUP

US1R

=11P

ELDDAT1

DATA

Cou can use parameter 2T4 to specify $hether the function modue creates a atch input session

(2T4 E ) or updates the data record directy using ca transaction (2T4 E G)

The other parameters are fied as for a atch input session header

Note 7very time the function modue is caed a atch input session is created

If the session is to contain severa transactions proceed as foo$s

ltenerate the transaction severa times This can e achieved y recording the transaction again The

function modue interface $i then contain more than one transaction -hen the function modue is

caed severa transactions can e generated for each session

copy SAP AG BC420 12-46

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 4788

043

983209 SAP AG 1999

The Transaction Recorder

PrinciplesPrinciples

Recording )ith the LSMWRecording )ith the LSMW

Principles of atch Input and all TransactionPrinciples of atch Input and all Transaction

Integrating the TA Program into the DWIntegrating the TA Program into the DW

Using the TA Recorder Using the TA Recorder

copy SAP AG BC420 12-47

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 4888

045

983209 SAP AG 1999

Benerated Program

9unction modules DltP1ltBRUP

DltIS1RT

DltLS1ltBRUP

AAP Program

Define structure of

data in seJuential

fileDefine D

table

pen seJuential file

pen I session

Read data recordCseJuential file

9ill D table

9ill I session gtALL TRASATI

Last data record K

lose I session

lose seJuential file

The generated program has the structure dispayed aove It uses the standard function modues for

creating atch input sessions

copy SAP AG BC420 12-48

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 4988

047

983209 SAP AG 1999

Structure of the Benerated Program

Benerated part

Define D

table

pen seJuential file

pen I session

Read data record

9ill D table

9ill I session gtALL TRASATI

Last data recordK

lose I session

lose seJuential file

Include DR16

Define filestructure

P1ltDATAS1T

P1ltBRUP

DltDPR

Dlt9I1LD

DltTRASATI

LS1ltBRUP

LS1ltDATAS1T

The generated program consists of t$o parts 9 a generated part and the incude 2amp72G8 The

incude is provided in the standard system

The incude contains the definition of the reuired 2 tae and a further seven suroutines These

suroutines eecute the foo$ing functions

5pen and cose fie

5pen and cose session

Fi 2 tae

Fi session

The generated part is the main program and cas the reevant suroutines A structure is aso

generated in the generated part to read the eterna data into the fie

See the Appendi for more information on the 2amp72G8 program

copy SAP AG BC420 12-49

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 5088

020

983209 SAP AG 1999

Structure of D Table

PRBRAM DPR D1BI 9AM 9ALPRBRAMPRBRAM DPRDPR D1BID1BI 9AM9AM 9AL9AL

SAPM90ampD 0602

R90ampD=UR 600000

R90ampDU=RS 0006

R90ampD=T=D =UA

SAPM90ampD 0660

=A6AM16 Smith

=A6PSTL 87000

=A6LAD6 US

=A6SPRAS 1

SAPM90ampD 06amp0

=A6ST1B US6amp428357DDATA

PRBRAM

DPR

D1BI

9AM

9AL

EAR

UM

EAR

EAR

EAR

40

4

6

6amp

6amp

D Module pool

D Screen number

D Start of screen

D 9ield name

D 9ield contents

9ield ame T(pe Length Short Tet

AAP Dictionar(

The 2 tae has the same structure as in a standard transfer

copy SAP AG BC420 12-50

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 5188

026

983209 SAP AG 1999

Read Structure

Recording

DATA BEGIN OF record data element BUKRS bukr$amp data element KTOKD ktokd$amp data element NA(EG) name$+amp data element SORT ortl$ampEND OF record-

record

Automaticall( generated

from recording

The structure of the fie is automaticay generated and is a$ays defined $ith the name amp725amp

The generated structure a$ays has the same ayout 7ach fied is defined y t$o generated ro$s

The first ro$ is a$ays a comment ro$ containing the tet J data eement and the data eement of

the screen fied from the recording In the net ro$ the fied itsef is defined $ith the name of the

data eement foo$ed y a three9digit position numer $hich specifies the ocation in the structure

The ength of the fied is set y the ength of the data eement If a fied is not defined through a data

eement the system uses the ength of the screen fied

copy SAP AG BC420 12-51

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 5288

02amp

983209 SAP AG 1999

pening and losing the 9ile

P1ltDATAS1T

LS1ltDATAS1T

FOR( oendataet USING dataet-O)EN DATASET dataet IN TET (ODE-

IF S01SUBR2 34 - 5RITE 6 te7t1e S01SUBR2-STO)-

ENDIF-

ENDFOR(-

FOR( cloedataet USING dataet-2OSE DATASET dataet-

ENDFOR(-

Include

DR16

The suroutine 5P7N3ATAS7T opens the seuentia fie

The suroutine 2+5S73ATAS7T coses the seuentia fie

copy SAP AG BC420 12-52

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 5388

02

983209 SAP AG 1999

9unction Modules for I Program

lient

Session name

Eold date

=eep session

D user name

RecordK

LI1T

BRUP

ELDDAT1

=11P

US1R

R1RD

DltP1ltBRUPDltP1ltBRUP

Transaction code

D table

TD1

DPRTA

DltIS1RTDltIS1RT

DltLS1ltBRUPDltLS1ltBRUP

pen Isessionpen Isession

Insert data for

transactions

Insert data for

transactions

lose I

session

lose I

session

The foo$ing function modues are provided for creating atch input sessions (function group

S2)

235P7N3ltamp54P

2reates a ne$ session and contains genera data for the $hoe session

23INS7ampT

Inserts a the data for a transaction into the session The transferred interna tae $ith the

structure 2ATA must contain a the data reuired for fuy processing the transaction

232+5S73ltamp54P

2oses the session after a the data has een inserted As soon as the session has een cosed it

can e processed

The interna tae $ith the structure 2ATA can ony contain atch input data for one singe

transaction run So the individua transactions are inserted into the atch input session in a oop

using severa 23INS7ampT cas

copy SAP AG BC420 12-53

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 5488

024

983209 SAP AG 2001

9unction Module DltP1ltBRUP

ALL 9UTI DltP1ltBRUPALL 9UTI DltP1ltBRUP

1PRTIB

LI1T client

BRUP session name

ELDDAT1 loc+ date

=11P delete flag

US1R bdc user name

R1RD recording

IMPRTIB

NID internal session +e(

11PTIS

1PRTIB

LI1T client

BRUP session name

ELDDAT1 loc+ date

=11P delete flag

US1R bdc user name

R1RD recording

IMPRTIB NID internal session +e(

11PTIS

-ith the function modue 235P7N3ltamp54P you can open a atch input session

The foo$ing parameters are mandatory

2+I7NT (cient)

ltamp54P (session name)

4S7amp (user name)

Note The 4S7amp must a$ays e specified This user name is reuired for processing the session

in atch mode

The foo$ing parameters are optiona

=5+AT7 specifies the eariest date on $hich the session can e started677P fag specifies $hether session shoud e deeted after it has een successfuy processed The

677P fag is ignored if the session contains errors

677P E K K means deete the session after processing (defaut vaue) H

677P E KGK means do not deete session

amp725amp E KGK ao$s you to create a recording instead of a I session

If gtI is specified the function modue returns the interna session ey This is needed to e ae to

differentiate sessions that have the same name

-ith 7G27PTI5NS you get various return vaues that can e ueried $ith SC9S4amp2

Note In onine mode the onine user is used for the authoriDation checs regardess of the user

name specified

copy SAP AG BC420 12-54

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 5588

022

983209 SAP AG 1999

Subprogram P1ltBRUP

P1ltBRUP

FOR( oen8rou-IF e9on -

2A FUN2TION BD2O)ENGROU) E)ORTING 2IENT lt1mandt GROU) 8rou USER uer KEE) kee

=ODDATE gtolddate-

ENDIF-ENDFOR(-

Include

DR16

The suprogram 5P7N3ltamp54P opens the atch input session

copy SAP AG BC420 12-55

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 5688

028

983209 SAP AG 1999

9unction Module DltIS1RT

ALL 9UTI DltIS1RTALL 9UTI DltIS1RT

IMPRT

TD1 Transaction code

PSTltLAL Update locall(

PRITIB print list

TAL1S DPRTA bdclttable

11PTIS

IMPRT

TD1 Transaction code

PSTltLAL Update locall(

PRITIB print list

TAL1S DPRTA bdclttable

11PTIS

-ith the function modue 23INS7ampT you can add transaction data to the session

Cou need an interna 2 tae to transfer the data

The foo$ing parameters are mandatory

T257 Transaction code

CNPamp5TA 2 tae

The foo$ing parameters are optiona

P5ST3+52A+ E KGK activates oca updating This means that the data to e updated is ept in the

appication server and updated in the ast step of the transaction This does not invove the update

process (For more information see course 28 Programming ataase 4pdates)

PampINTINlt E KGK 9 ists processed in I $i e printed immediatey -ith 7G27PTI5NS you get various return vaues that can e ueried $ith SC9S4amp2

copy SAP AG BC420 12-56

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 5788

023

983209 SAP AG 1999

Subprogram DltTRASATI

DltTRASATI

FOR( BD2TRANSA2TION USING tcode-

IF e9on -2A FUN2TION BD2INSERT

E)ORTING T2ODE tcode TABES D0N)ROTAB bdcdata-

ESE-

ENDIF-ENDFOR(-

T

Include

DR16

The suprogram 23TampANSA2TI5N moves the fied 2 tae either to a atch input session

or uses ca transaction to import the data into the system 5n the seection screen you can specify

$hether you $ant to create a session or you $ant to use ca transaction to process the data directy

The S7SSI5N fied is then set according to your seection

copy SAP AG BC420 12-57

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 5888

025

983209 SAP AG 1999

9unction Module DltLS1ltBRUP

ALL 9UTI DltLS1ltBRUP

11PTIS

TltP1 6

NU1U1lt1RRR amp

-ith the function modue 232+5S73ltamp54P you can cose a atch input session

In 7G27PTI5NS you get various return vaues that can e ueried $ith SC9S4amp2

copy SAP AG BC420 12-58

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 5988

027

983209 SAP AG 1999

Subprogram LS1ltBRUP

FOR( cloe8rou-IF e9on -cloe batcgt 9nut 8rou

2A FUN2TION BD22OSEGROU)-

ESE-IF e8rouoened -

2A FUN2TION BD22OSEGROU)-

ENDIF-ENDIF-

ENDFOR(-

LS1ltBRUPlose session

lose error session

Include

DR16

The suprogram 2+5S73ltamp54P coses the atch input session The suprogram differentiates

et$een a norma I session (S7SSI5N E G) and a session opened $hen ca transaction

encountered an error (73ltamp54P35P7N7 E G)

copy SAP AG BC420 12-59

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 6088

080

983209 SAP AG 1999

Subprograms DltDPRG Dlt9I1LD

DltDPR

Dlt9I1LD

FOR( bdc9eld USING nam al-IF al 34 nodata-2EAR bdcdata- bdcdata1nam nam- bdcdata1al al- A))END bdcdata-ENDIF-

ENDFOR(-

FOR( bdcdltnro USING ro8ram dltnro- 2EAR bdcdata-Bdcdata1ro8ram ro8ram-Bdcdata1dltnro dltnro-Bdcdata1dltnbe89n - A))END bdcdata-ENDFOR(-

Include

DR16

The incude 2amp72GG contains t$o suprograms 23CNPamp5 and 23FI7+

Suprogram 23CNPamp5 fis the 2 tae $ith program names and screen numers

Suprogram 23FI7+ fis the 2 tae $ith fied names and vaues

7ach suprogram creates an entry in the 2 tae

copy SAP AG BC420 12-60

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 6188

086

983209 SAP AG 1999

9illing the D Table

erorm bdcdltnro u9n8 SA)(FD +- erorm bdc9eld u9n8 BD22URSOR RFD1BUKRS- erorm bdc9eld u9n8 BD2OK2ODE 6- erorm bdc9eld u9n8 RFD1BUKRS record1BUKRS- erorm bdc9eld u9n8 RFD1KTOKD record1KTOKD-

erorm bdcdltnro u9n8 SA)(FD -

erorm bdc9eld u9n8 BD22URSOR KNA1S)RAS- erorm bdc9eld u9n8 BD2OK2ODE 6- erorm bdc9eld u9n8 KNA1NA(E record1NA(E-

erorm bdc9eld u9n8 KNA1SORT record1SORT-

Recording Benerated automaticall(

from the recording

)ERFOR( bdcdltnro USING SA)(FD +- )ERFOR( bdc9eld USING BD22URSOR RFD1BUKRS-)ERFOR( bdc9eld USING BD2OK2ODE 6-)ERFOR( bdc9eld USING RFD1BUKRS record1BUKRS-)ERFOR( bdc9eld USING RFD1KTOKD record1KTOKD-

)ERFOR( bdcdltnro USING SA)(FD -

)ERFOR( bdc9eld USING BD22URSOR KNA1S)RAS-)ERFOR( bdc9eld USING BD2OK2ODE 6-)ERFOR( bdc9eld USING KNA1NA(E record1NA(E-

)ERFOR( bdc9eld USING KNA1SORT record1SORT- ---

The 2 tae is fied $ith data from the recording The suroutines 23CNPamp5 and

23FI7+ are used for this

The suroutines are caed in the reuired structure or seuence

copy SAP AG BC420 12-61

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 6288

08amp

983209 SAP AG 1999

erie)

SAPDatabase

SeJuential9ile

SAPDatabase

ALL TRASATIALL TRASATI

SeJuential9ile

ATE IPUTATE IPUT

D TableD TableD TableD Table

I Monitor

T

In contrast to atch input you can use ca transaction to directy pass data to the diaog interface

$ithout using a atch input session Cou use an interna tae (2 tae same structure and ayout

as atch input) to temporariy store your screen data Then you ca the desired transaction in your

program

Note 5n average the 2a Transaction method is 8 to times faster than using atch Input

copy SAP AG BC420 12-62

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 6388

08

983209 SAP AG 1999

all Transaction Program$ 1ample

RE)ORT abcbdcdcdeb9ct-

)ARA(ETERS d9mode DEFAUT A

udmode DEFAUT S-FOR( calltranact9on-2A TRANSA2TION FD

USING bdcdata (ODE d9mode

U)DATE udmode-

IF lt1ubrc NE - 5RITE 6 ---

ENDIF-ENDFOR(-

Screen

00

Screen

100

Screen

An additiona system ro area is added for the caed transaction The system uses this area for

processing the individua screens in the transactionH the data from the tae is added here After the

transaction is processed the second ro area is reeasedH the system continues processing in the first

ro area

Notes

In contrast to atch input there is no error ogging (error sessions) here For processing the caed

transaction the system uses the authoriDations of the user that caed the transaction The 2 tae

can ony hod data for one transaction run at a time efore another transaction is caed and its data

can e added you must eecute a amp7Famp7S= for the 2 tae

copy SAP AG BC420 12-63

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 6488

084

983209 SAP AG 1999

ALL TRASATI C6

RE)ORT 777-

2A TRANSA2TION FD USING bdcdata (ODE E-

Default for MD1 is A

2A TRANSA2TION 3tranact9oncode4 USING 3bdc1table4 C (ODE A E N C-

-ith the parameter 57 you can seect a specific dispay mode for processing the transaction The

foo$ing three modes are avaiae

A (ispay a)

If you eecute the program a the screens and a their data are dispayed This is the defaut vaue

for the 57 in 2A++ TampANSA2TI5N

N (ispay nothing)

The screens are not dispayed at a regardess of $hether any of them contained errors As soon as

the transaction has een fuy processed contro is returned to your program (The vaue of the

parameter 4PAT7 determines $hether dataase updates are eecuted or not)

7 (ispay errors ony)As soon as an error occurs in a screen the transaction is s$itched to dispay mode so that you can

correct the errors

These dispay modes are the same as those in the atch input session processing

copy SAP AG BC420 12-64

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 6588

082

983209 SAP AG 1999

RE)ORT 777-

2A TRANSA2TION FD USING BD2DATA U)DATE -

ALL TRASATI Camp

RE)ORT 777-

2A TRANSA2TION FD USING bdcdata U)DATE -

2A TRANSA2TION 3tranact9oncode4 USING 3bdc1table4 C (ODE A E N C U)DATE A S C -

Default for UPDAT1 is A

-ith the parameter 4PAT7 you can contro ho$ dataase updates arising from a transaction are

carried out There are three options

A (asynchronous updating) The caed transaction does not $ait unti the dataase has een

updated it simpy for$ard the updates to the SAP update service This usuay speeds up the 2T

program This processing mode is N5T recommended for arge data sets as the caed transaction

does not receive a competion message from the update modue

The caing 2T program therefore cannot te if the transaction has een successfuy competed Cou

shoud use the updating administration function (transaction S8) to determine $hether updating

$as terminated eary The error anaysis correction functions for are ess hepfu than $ith

synchronous updating

S (synchronous updating) -ith synchronous updating the caed transaction $aits unti a the

updates have een competed So processing is so$er than $ith synchronous updating The caed

transaction can ho$ever report any updating errors to the program $hich maes error

anaysiscorrection easier

+ (local updating) $ith oca updating the dataase is not updated in a separate process it is

updated in the caers process (see appication hep documentation for the AAP ey$ord S7T

4PAT7 TAS6 +52A+)

copy SAP AG BC420 12-65

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 6688

088

983209 SAP AG 1999

ALL TRASATI C

RE)ORT 777-DATA mtab T0)E TABE OF bdcm8coll-

2A TRANSA2TION FD USING bdcdata (ESSAGES INTO mtab-

2A TRANSA2TION 3tranact9oncode4 USING 3bdc1table4 C (ODE A E N C U)DATE A S C (ESSAGES INTO 3metab4 C -

7SSAlt7S specifies that a system messages that are output during the eecution of a 2A++

TampANSA2TI5N are $ritten to the interna tae L7SSTA The interna tae must have the

structure 2Slt25++

4nie the cassica atch input processing $ith sessions 2A++ TampANSA2TI5N does not offer any

specia processing procedures for transactions containing errors There are no restart functions for

transactions that contain errors or that cause updating terminations

copy SAP AG BC420 12-66

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 6788

083

983209 SAP AG 1999

ALL TRASATI C4

RE)ORT 777-DATA mltot T0)E ctuaram-

2A TRANSA2TION FD USING BD2DATA

O)TIONS FRO( mltot-

2A TRANSA2TION 3tranact9oncode4 USING 3bdc1table4 C (ODE A E N C U)DATE A S C (ESSAGES INTO 3metab4 C O)TIONS FRO( ot C -

RE)ORT 777-DATA mltot T0)E ctuaram-2A TRANSA2TION FD USING bdcdata

O)TIONS FRO( mltot-

The addition 5PTI5NS enaes the ca transaction statement to e controed through a structure

The structure must have the dictionary type 2T43PAampAS

The addition 5PTI5NS Famp5 must not e comined either $ith the addition 57 or $ith

4PAT7 ore information on the net side

copy SAP AG BC420 12-67

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 6888

085

983209 SAP AG 1999

Structure TUltPARAMS

DISMD1 Procen mode anaoo o addon amp

UPDMD1 $pdae mode anaoo o addon $PA

ATTMD1 CA mode CA conro

D19SI1 orce de=a EndoE e drn procen

RAMMIT +o eD a Camp amp(

IPT +o a ac np eonF a F S-B+P SPAC

I1D +o a ac np eon a=er end o= BC daa

The components are defined as foo$s

The components 7FSIM7 ampA25IT N5INPT and N5I7N can have the foo$ing

vaues KGK E Ces or K K E No

If the addition 5PTI5NS Famp5 is not specified the foo$ing settings appy to the contro

parameters

IS57 from addition 57

4P57 from addition 4PAT7

2ATT57 2ATT not active

7FSIM7 o not not use defaut $indo$s siDe

ampA25IT Successfu eit at 25IT -5amp6

N5INPT atch input session active (SC9INPT E G)

N5I7N atch input session sti active after end of 2 data

copy SAP AG BC420 12-68

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 6988

087

983209 SAP AG 1999

SMSBID Message ID

SMSBT Message T(pe C1GIGWGSGA

SMSB Message umber

SMSB6 Message ariable 6

SMSBamp Message ariable amp

SMSB Message ariable

SMSB4 Message ariable 4

SMSBID Message ID

SMSBT Message T(pe C1GIGWGSGA

SMSB Message umber

SMSB6 Message ariable 6

SMSBamp Message ariable amp

SMSB Message ariable

SMSB4 Message ariable 4

Return code$

S(stem fields$

alue Meaning

0 Successful

6000 1rror in transaction

6000 1rror in processing call transaction

see also the s(stem fields specified

alue Meaning

0 Successful

6000 1rror in transaction

6000 1rror in processing call transaction

see also the s(stem fields specified

9ield name Meaning9ield name9ield name MeaningMeaning

Return ode and S(stem 9ields

The return code is used to specify $hether the caed transaction $as processed successfuy In

addition severa system fieds are fied The numer I type and variaes of the diaog message

output y the caed transaction Cou need this information to output the message tet

copy SAP AG BC420 12-69

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 7088

030

983209 SAP AG 1999

Benerated Program of the TA Recorder

REFRES= (ESSTAB-

2A TRANSA2TION tcode USING bdcdata (ODE ctumode U)DATE cudate (ESSAGES INTO metab-OO) AT metab- ENDOO)-IF lubrc 34 AND e8rou 34 S)A2E- IF e8rouoenend - 2A FUN2TION BD2O)ENGROU) E)ORTING ---------

--------- E8rouoened - ENDIF- 2A FUN2TION BD2INSERT E)ORTING T2ODE tcode TABES D0N)ROTAB bdcdata-ENDIF-REFRES= bdcdata-

Message table output

pen error session

Insert data record that

has errors into error

session

If you have seected ca transaction on the seection screen the generated program runs as foo$s

The onine transaction is caed $ith ca transaction and passed to tae 2ATA A the

messages arising during the ca transaction are put in the interna tae 7SSTA

7SSTA is output as a ist

If you have specified an error session ( 73ltamp54P L SPA27) on the seection screen and the

ca transaction comes across an error (+3S4amp2 L 0) the error session is opened The error

session is ho$ever ony opened once Then the data record is paced in the session

A the other data records that have errors $ith ca transaction are paced in the same session

copy SAP AG BC420 12-70

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 7188

036

983209 SAP AG 1999

The Transaction Recorder

PrinciplesPrinciples

Recording )ith the LSMWRecording )ith the LSMW

Principles of atch Input and all TransactionPrinciples of atch Input and all Transaction

Integrating the TA Program into the DWIntegrating the TA Program into the DW

Using the TA Recorder Using the TA Recorder

copy SAP AG BC420 12-71

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 7288

03amp

983209 SAP AG 1999

Integrating into the DW

Transfer program

AAP Dictionar(

Integrate

SDA0

SDA6

SDAamp

SDA

Cou can integrate the generated program into the G9- The structure of the fie must e created

in the AAP ictionary The taes SGA0 SGA8 SGA1 and SGA $i e fied

copy SAP AG BC420 12-72

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 7388

03

983209 SAP AG 1999

DW Release 42

Goo

-B eeae 45

aa ran=er ogtec

Int customer data transfer ob-ect

ecord =ed

Dece daa ran=er

d Goo

The ampunction ampor interatin TA recorder prora$s is

i$ple$ented in the

D+-B in Release

The recorder can e integrated as of ampeease and it is provided in the G9- ampeease

ltot to the G9- ampeease 5n the initia screen you can integrate programs y choosing ampoto

( +nt customer ata transfer o-ect

copy SAP AG BC420 12-73

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 7488

034

983209 SAP AG 1999

reating Program as D b-ect

Comer ran=er ogtec

ampgtec ype

Sor eD =or ogtec

aa ran=er proram

Srcre name

9900

(+A1

Cane comer

ZBCA+G

ZB

ustomer transfer ob-ect

umber bet)een 7000 and 7777

b-ect t(pe

Assignment to R ob-ect

Short tet for D ob-ectShort description

Data transfer program

ame of generated program

Structure name

A structure Cstructure la(out )ith this name is created in

the AAP Dictionar(

For ampeease transfer oects $ere not organiDed y 5amp oects ut y a G numer (00089

OOOO) The numer range O0009OOOO is reserved for customers

To create a connection to the ne$ G 9- you must assign the program to a 5amp oect

2reate a short tet for the G oect This tet $i appear in the method seection ist

Specify the program to e incuded

Specify a name for the structure to e created in the AAP ictionary

Note $he generated program appears under program type +N and not under program type

-

copy SAP AG BC420 12-74

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 7588

032

983209 SAP AG 1999

Adantages

Automatic program registration in the DW in

Release 48

ou can use all the functions defined for

standard ob-ects

1ception$ The (reate ampile ith data

function

If you incuded the oect in the ampeease $orench it is automaticay avaiae in the ampeease

B $orench

A the $orench functions are avaiae for your oect ecept for Create files ith transfer ata

copy SAP AG BC420 12-75

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 7688

038

983209 SAP AG 1999

ou are no) able to$

The Transaction Recorder$ Unit Summar(

Use the recording function in the LSMW to create

a batch input session )ith the data from the

eternal s(stem

Use the TA Recorder to create (our o)n data

transfer program

Anal(e programs that )or+ )ith batch input or

call transaction

Integrate the TA Recorder programs into the

DW

copy SAP AG BC420 12-76

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 7788

ercise 1

nit $ -ecorder

$opic 2reating etors

$ransaction -ecorder ercise 1

bull 2reating detors $ith eterna numer assignment

bull etor numers M9980008 to M9980080

Address data for detors $ith eterna numer assignment is to

e transferred using program ampFI700

ro4ect F5

Supro4ect +5

-un +575

$as)s 85 95 8S25

9oad program -F+00

8 In the foo$ing eercises eisting data is to e changed Therefore these detors $ith

eterna numer assignment have to first e created

898 4nder suproect 79 create run 797G9 $ith the name Detors ith

eternal numers

copy SAP AG BC420 12-77

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 7888

891 2reate the foo$ing three tass The tass map the foo$ing process steps

convert data create + session and process + session

89198 In run 797G9 create the foo$ing tas

9 Tas AP9

9 Name 2onvert data 9 Tas type AP

9 Program type +S-

Seect the foo$ing +S- oect

+S- proect 2109

+S- suproect 7I9

+S- oect I997GT

89191 In run 797G9 create the foo$ing tas 9 Tas +5A9

9 Name 2reate I session

Tas type +5A

9 Program type INP

Seect program ampFI700 $ith the variant

I97G9

8919 In run 797G9 create the foo$ing tas

9 Tas S29

9 Name Process I session Tas type S2

9 Program type amp7P5

Seect program ampS2S4 $ith the variant

S497G9

Note that you have to correct the seuence of the tass 2onvert data

create + session and process + session

4se the uttons

89 Start the run

The detors $i e created $ith eterna numer assignments

89 2hec in transaction F0 that the detors M9980008 to M9980080 have een

created

copy SAP AG BC420 12-78

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 7988

ercise

nit $ransaction -ecorder

$opic -ecording function in the 9S8(

bull 2reate a recording using the +S-

bull ltenerate a atch input session

2hange the detor address data in the amp System

Name of the recording +

Name of the file +2055+F9

8 2reate the recording 7I3 using the +S- ampecord the transaction F01 (2hange

detor)

898 efore you create the recording first test the transaction onineQ

For the recording use detor M9980008 5n the initia screen of the F01

maintain the foo$ing fieds ony

etor etor M9980008

2ompany code 0008

Address data seect

Note $he data record must e saved hile recording

891 aintain the names and the descriptions for the foo$ing fieds

Name city street posta code and teephone numereete a other fieds in screen 880 from the recording (eg S5ampT+ +AN8

SPampAS)

4se the same technica names as sho$n in the tae eo$ (automatic fied

mapping)

copy SAP AG BC420 12-79

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 8088

1 2reate the suproect 7I9 and the ne$ oect TA3 in your proect 2109

aintain the oect attriutes and seect the item atch input recording Seect your

recording 7I3

2reate the source structure address

2reate the source fieds according to the tae eo$ 5r copy them from proect 2109S37N suproect 7I900 oect TA900

198 Fie setup The data from the egacy system are dispayed in the foo$ing tae

Fied name Fied type Fied ength escription

N5 2 8B etor numer

NA7 2 Name

STamp77T 2 Street

2ITC 2 2ityPace of residence

MIP 2 80 Posta code

T7+ 2 8B Teephone numer

191 aintain the fied mapping 4se the automatic fied mapping (via menu item

7tras)

19 Specify the fies 5ny maintain the fie name of the source fie

Name of the fie 21099IFI+7

2odepage 8800

19 Import the data and convert them ispay the data in each caseQ

19 2reate a atch input session

19B ampun the atch input session

copy SAP AG BC420 12-80

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 8188

ercise 3

nit $ransaction -ecorder

$opic -ecording ith the $ -ecorder

bull ltenerate a recording using the TA recorder

bull Test the recording

2hange the address data of detors in the amp system

Name recording $+

Name of the file +2055+F9

8 2reate the recording TA37I3 using the transaction recorder ampecord the

transaction F01 (change detor)

898 4se detor M9980008 for the recording 5n the F01 initia screen ony

maintain the foo$ing fieds

etor etor M9980008

2ompany 2ode 0008

Address data seect

Note $he data record must e saved hen recording

eete a fieds that do not eist in the source fie 21099IFI+7 from screen

880 in the recording (eg 6NA89S5ampT+ 6NA89+AN8 6ANNQ9SPampAS) Note o not deete fieds ampF01946ampS and ampF0190880

Save the recording no$

1 S$itch to the recordings overvie$

198 Process the recording $ith the processing mode A (dispay a)

191 Process the recording $ith the processing mode RN (no dispay)

19 If the recording has een tested and no error has occurred generate a I session

and run it using the I monitor If an error shoud occur generate the recordingagainQ

copy SAP AG BC420 12-81

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 8288

From the recording generate the program M21037I3 in your deveopment cass

2109 Seect the foo$ing

bull ampead fied contents from fie

bull 2reate test data in the fie 2103dei3test3tt

98 Save this program and eecute it ltenerate one I session each and process it

2arry out the same steps again using the ca transaction

The generated program shoud no$ e changed so that fie 21099IFI+7 can e

read and processed

98 2hange the defaut vaue of the fie name (parameter dataset) in 21099

IFI+7

91 2hange the structure definition eete the company code fied and the address

data checo from the structure

9 2hange the su9routine ca perform dc3fied for the company code (KampF019

46ampSK) so that the vaue 0008 is transferred

9 2hange the su9routine ca perform dc3fied for the address data checo

(KampF0190880K) so that the vaue G is transferred

9 Start the program again and read the data from the fie 21099IFI+7 $ith

detor data ltenerate a I session $ith it and run it

copy SAP AG BC420 12-82

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 8388

033 Include DR16INCLUDE BDCRECX1

SELECTION-SCREEN BEGIN OF LINE

PARAMETERS SESSION RADIOBUTTON GROUP CTU create sessi SELECTION-SCREEN COMMENT $amp TEXT-S FOR FIELD SESSION

se(ecti-scree )siti +

PARAMETERS CTU RADIOBUTTON GROUP CTU ca(( trasacti

SELECTION-SCREEN COMMENT $amp TEXT-S FOR FIELD CTU

SELECTION-SCREEN END OF LINE

SELECTION-SCREEN BEGIN OF LINE

SELECTION-SCREEN COMMENT $amp TEXT-S1 FOR FIELD GROUP

se(ecti-scree )siti $+

PARAMETERS GROUP1$amp r) ae 0 sessi

SELECTION-SCREEN COMMENT $amp TEXT-S+ FOR FIELD CTUMODE

se(ecti-scree )siti

PARAMETERS CTUMODE LIE CTU2PARAMS-DISMODE DEFAULT 3N3

A4 s56 a(( 78)rs

E4 s56 78)r errr (8

N4 7 t 7is)(a8 78)r

SELECTION-SCREEN END OF LINE

SELECTION-SCREEN BEGIN OF LINE

SELECTION-SCREEN COMMENT $amp TEXT-S$ FOR FIELD USER

se(ecti-scree )siti $+

PARAMETERS4 USER1$amp DEFAULT S9-UNAME ser 0r sessi i atc5

SELECTION-SCREEN COMMENT $amp TEXT-S FOR FIELD CUPDATE

se(ecti-scree )siti

PARAMETERS CUPDATE LIE CTU2PARAMS-UPDMODE DEFAULT 3L3

S4 s8c5rs(8

A4 as8c5rs(8

L4 (ca(

SELECTION-SCREEN END OF LINE

SELECTION-SCREEN BEGIN OF LINE

SELECTION-SCREEN COMMENT $amp TEXT-S FOR FIELD EEP

se(ecti-scree )siti $+

PARAMETERS4 EEP AS CltECBOX 3 3 = 7e(ete sessi i0 0iis5e7

3X3 = gtee) sessi i0 0iis5e7

SELECTION-SCREEN COMMENT $amp TEXT-S FOR FIELD E2GROUP

copy SAP AG BC420 12-83

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 8488

se(ecti-scree )siti

)araeters E2GROUP1$amp r) ae 0 errr-sessi

SELECTION-SCREEN END OF LINE

SELECTION-SCREEN BEGIN OF LINE

SELECTION-SCREEN COMMENT $amp TEXT-S FOR FIELD ltOLDDATE

se(ecti-scree )siti $+

PARAMETERS4 ltOLDDATE LIE S9-DATUM

SELECTION-SCREEN COMMENT +11amp TEXT-S$ FOR FIELD E2USER

se(ecti-scree )siti

PARAMETERS4 E2USER1$amp DEFAULT S9-UNAME ser 0r errr-sessi

SELECTION-SCREEN END OF LINE

SELECTION-SCREEN BEGIN OF LINE

SELECTION-SCREEN COMMENT +11amp TEXT-S FOR FIELD E2EEP

se(ecti-scree )siti

PARAMETERS4 E2EEP AS CltECBOX 3 3 = 7e(ete sessi i0 0iis5e7

3X3 = gtee) sessi i0 0iis5e7

SELECTION-SCREEN END OF LINE

SELECTION-SCREEN BEGIN OF LINE

SELECTION-SCREEN COMMENT +11amp TEXT-S FOR FIELD E2ltDATE

se(ecti-scree )siti

PARAMETERS4 E2ltDATE LIE S9-DATUM

SELECTION-SCREEN END OF LINE

SELECTION-SCREEN SIP

SELECTION-SCREEN BEGIN OF LINE

SELECTION-SCREEN COMMENT 1amp TEXT-S1 FOR FIELD NODATA

PARAMETERS4 NODATA DEFAULT 33 LOER CASE 7ata

SELECTION-SCREEN END OF LINE

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

Batc5i)t7ata 0 si(e trasacti

DATA4 BDCDATA LIE BDCDATA OCCURS ITlt ltEADER LINE

essaes 0 ca(( trasacti

DATA4 MESSTAB LIE BDCMSGCOLL OCCURS ITlt ltEADER LINE

errr sessi )ee7 3 3 r 3X3amp

DATA4 E2GROUP2OPENED

essae tets

TABLES4 T1

copy SAP AG BC420 12-84

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 8588

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

at se(ecti scree

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

AT SELECTION-SCREEN

r) a7 ser st e 0i((e7 0r create sessi

IF SESSION = 3X3 AND

GROUP = SPACE OR USER = SPACE

MESSAGE E1MSamp

ENDIF

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

)e 7ataset

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

FORM OPEN2DATASET USING P2DATASET

OPEN DATASET P2DATASET IN TEXT MODE

IF S9-SUBRC

RITE4 TEXT-E S9-SUBRC

STOP

ENDIF

ENDFORM

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

c(se 7ataset

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

FORM CLOSE2DATASET USING P2DATASET

CLOSE DATASET P2DATASET

ENDFORM

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

create atc5i)t sessi

t 0r ca(( trasacti siamp

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

FORM OPEN2GROUP

IF SESSION = 3X3

SIP

RITE4 $amp 3Create r)3I1amp GROUP

SIP

)e atc5i)t r)

CALL FUNCTION 3BDC2OPEN2GROUP3

EXPORTING CLIENT = S9-MANDT

copy SAP AG BC420 12-85

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 8688

GROUP = GROUP

USER = USER

EEP = EEP

ltOLDDATE = ltOLDDATE

RITE4 amp 3BDC2OPEN2GROUP3I$amp

1$amp 3retrc7e43I+amp

S9-SUBRC

ENDIF

ENDFORM

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

e7 atc5i)t sessi

ca(( trasacti si4 errr sessiamp

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

FORM CLOSE2GROUP

IF SESSION = 3X3

c(se atc5i)t r)

CALL FUNCTION 3BDC2CLOSE2GROUP3

RITE4 amp 3BDC2CLOSE2GROUP3Iamp

1$amp 3retrc7e43I+amp

S9-SUBRC

ELSE

IF E2GROUP2OPENED = 3X3

CALL FUNCTION 3BDC2CLOSE2GROUP3

RITE4

RITE4 amp 3Fe5(era))e 6r7e eret3Iamp

ENDIF

ENDIF

ENDFORM

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

Start e6 trasacti accr7i t )araeters

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

FORM BDC2TRANSACTION USING TCODE

DATA4 L2MSTRINGamp

DATA4 L2SUBRC LIE S9-SUBRC

atc5 i)t sessi

IF SESSION = 3X3

CALL FUNCTION 3BDC2INSERT3

EXPORTING TCODE = TCODE

TABLES D9NPROTAB = BDCDATA

RITE4 3BDC2INSERT3Iamp

copy SAP AG BC420 12-86

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 8788

TCODE

3retrc7e43I+amp

S9-SUBRC

3RECORD43

S9-INDEX

ca(( trasacti si

ELSE

REFRESlt MESSTAB

CALL TRANSACTION TCODE USING BDCDATA

MODE CTUMODE

UPDATE CUPDATE

MESSAGES INTO MESSTAB

L2SUBRC = S9-SUBRC

RITE4 3CALL2TRANSACTION3

TCODE

3retrc7e43I+amp

L2SUBRC

3RECORD43

S9-INDEX

LOOP AT MESSTAB

SELECT SINGLE FROM T1 ltERE SPRSL = MESSTAB-MSGSPRA

AND ARBGB = MESSTAB-MSGID

AND MSGNR = MESSTAB-MSGNR

IF S9-SUBRC =

L2MSTRING = T1-TEXT

IF L2MSTRING CS 313

REPLACE 313 ITlt MESSTAB-MSGH1 INTO L2MSTRING

REPLACE 3$3 ITlt MESSTAB-MSGH$ INTO L2MSTRING

REPLACE 33 ITlt MESSTAB-MSGH INTO L2MSTRING

REPLACE 33 ITlt MESSTAB-MSGH INTO L2MSTRING

ELSE

REPLACE 33 ITlt MESSTAB-MSGH1 INTO L2MSTRING

REPLACE 33 ITlt MESSTAB-MSGH$ INTO L2MSTRING

REPLACE 33 ITlt MESSTAB-MSGH INTO L2MSTRING

REPLACE 33 ITlt MESSTAB-MSGH INTO L2MSTRING

ENDIF

CONDENSE L2MSTRING

RITE4 MESSTAB-MSGT9P L2MSTRING$+amp

ELSE

RITE4 MESSTAB

ENDIF

ENDLOOP

copy SAP AG BC420 12-87

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 8888

SIP

Eree 0e5(era))e

IF L2SUBRC AND E2GROUP SPACE

IF E2GROUP2OPENED = 3 3

CALL FUNCTION 3BDC2OPEN2GROUP3

EXPORTING CLIENT = S9-MANDT

GROUP = E2GROUP

USER = E2USER

EEP = E2EEP

ltOLDDATE = E2ltDATE

E2GROUP2OPENED = 3X3

ENDIF

CALL FUNCTION 3BDC2INSERT3

EXPORTING TCODE = TCODE

TABLES D9NPROTAB = BDCDATA

ENDIF

ENDIF

REFRESlt BDCDATA

ENDFORM

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

Start e6 scree

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

FORM BDC2D9NPRO USING PROGRAM D9NPRO

CLEAR BDCDATA

BDCDATA-PROGRAM = PROGRAM

BDCDATA-D9NPRO = D9NPRO

BDCDATA-D9NBEGIN = 3X3

APPEND BDCDATA

ENDFORM

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

Isert 0ie(7

Page 7: BC420_46C - 012The Transaction Recorder

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 788

03

983209 SAP AG 1999

The Recording

Recording

Screen

9ield alue

9ield nameModule pool

Transaction

Screen

111

Screen

106

Screen

130

The TA ampecorder can record transactions The recorder must e activated efore the transaction is

processed Then you can run the transaction as though you $ere processing it onine

After the transaction has finished the recording $i contain a the screen numers fied names

fied vaues and the associated modue poo and transaction code

copy SAP AG BC420 12-7

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 888

05

983209 SAP AG 1999

hanging ustomer Data$ Initial Screen

Vendor

Company code

Z-88-10000

Screen

106

Genera daa9ield ontents

BCC$Samp $SZAVBCamp(Camp )00

02-($++ -88-10000

02-0110

02-0130

$SZAV

9ield ame

Transaction 9D0amp

Addre

In the aove eampe the transaction Change customer F01 is recorded

In addition to the screen fieds the fieds 2324ampS5amp and 2356257 are aso

automaticay recorded

Note

You must change the field values for all the fields required later for the transfer For the

recording a change can simply mean overriting one single character in a field ith the

same character

f fields are to e filled using S$amp$ parameters the value must also e changed

(ith online transactions screen sequences may appear that are different than in therecording

copy SAP AG BC420 12-8

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 988

07

983209 SAP AG 1999

hanging ustomer Data$ Address

ustomer 5560000

+ame

Searc erm

Addre

Screen

111

9ield ontents

BCamp(Camp $PABCS$BSC SAPSZA1 0300ASS

BCS$BSC SAPSZA1 0301Camp$

BCC$Samp A1AA-amp$S+$1

A1AA-S Garden Sree

A1AA-amp$S+$1 02105

9ield ame

If there is a suscreen on the screens this is automaticay recorded In the recording the fied

23S4S2amp77N containing the name of the suscreen appears

-ith customer master data the address is a suscreen area The centra address management is

integrated here A the address input fieds are dispayed on one suscreen

2entra address management is ony used if you specificay seect this option on the initia screen

copy SAP AG BC420 12-9

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 1088

060

983209 SAP AG 1999

Results of the Recording

Recording

SAPM90ampD 0608

DltURSR R90ampD=UR

Dlt=D1 gt00

R90ampD=UR 5560000

R90ampDD0660

US1ltA

SAPM90ampD 0666

Dlt=D1 UPDA

DltSUSR SAPLSA6 000ADDR1SS DltSUSR SAPLSA6 006UTRltSR11

DltURSR SA6ltD0600T1LltUM1R

ADDR6ltDATASTR11T 4 Barden Street

ADDR6ltDATAPSTltD1 0amp602

ADDR6ltDATAIT6 oston

SA6ltD0600T1LltUM1 8638257755

The resut of the recording is a ist of a the fieds and fied vaues that $ere changed in the

recording

copy SAP AG BC420 12-10

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 1188

066

983209 SAP AG 1999

Special Recording 9ields

9unction code triggered on

this screen

9ield name )here cursor

)as last positioned on the

screen

Comer

Company code

Z-88-10000

Genera daa

Dlt=D1

DltURSR

uring a recording the foo$ing additiona fieds are automaticay recorded

The BDC_OKCODE fied contains the function code triggered on the screen

The BDC_CURSOR fied contains the fied name of the ast fied the cursor $as positioned in

efore eiting the screen

copy SAP AG BC420 12-11

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 1288

06amp

983209 SAP AG 1999

Determining the 9ield ame

Technical info

Screen field

R90ampD =UR

Comer

Company code

Z-88-10000

Genera daa

96help

Sa

Program SAPM90ampDScreen number 608

The information recorded in the TA recorder can aso e dispayed onine for each transaction

To find out the current modue poo name and the screen numer choose Systemrarr Status from the

menu

To determine the fied name pace the cursor on a fied and seect F8 hep The name of the screen

fied can e found under technical information

copy SAP AG BC420 12-12

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 1388

06

983209 SAP AG 1999

Subscreens

Comer Z-88-10000

+ame

+ame

ADDR6ltDATAAM16

DltSUSR

Information$

ode poo name

Screen nmer

Screen name

Some screens contain suscreen areas

To determine the fied name pace the cursor on the fied and choose F1 The name of the screen

fied is specified under Technical info

copy SAP AG BC420 12-13

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 1488

064

983209 SAP AG 2001

Tabstrips

$er Roberts

1ample$ User Profile Defaults

Sar men +

oon anae

ampp dece Pr1

ParameerDefaults

DltSUSR

USD19AULTSSPLD

The tastrip eement sho$n is used on the aintain User rofile (5$n data) screen

4nder the tastrip tite Defaults the user can set various vaues such as the defaut printer

The user profie are user9dependent settings (as the name impies)

copy SAP AG BC420 12-14

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 1588

062

983209 SAP AG 1999

Step Loops and Table ontrols

1ample$ an+ Details

Comer

ntr( an+ +e( Account

08154711

123456789

Z-00-12345

an+ Details

00708155546344536

Banlt daa

==A=C06)

==A=C0amp)

Step oops and tae contros are treated identicay for the recording

The fied names of the fieds isted are the same for every ro$

7ach ro$ contains a customers an detais The fieds must e accessed using an inde (this is

specified as an addition to the fied name for eampe 6N69AN6N(1) The inde must match

the ro$ numer

5ny the visie fieds on a screen can e fied $ith data If some fieds are ony visie after paging

the paging must e recorded as $e This means that for the recording you must eecute a the steps

in the onine transaction

For eampe age on $oud e eecuted using the function code 1 (Paging icons)

Paging to the end of a ist 1Page up 11

lto to first page 18

copy SAP AG BC420 12-15

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 1688

068

983209 SAP AG 2001

Recording Buidelines

Test the transaction before recording

Start the recording

hange field alues onl( for fields

releant to the recording

As of 48 all filled fields are recorded

Transaction must be properl( eitedCSA1

Use of scroll bars cannot be recorded

Specia recording notes

F8 F and your o$n F8 and F hep (Pamp527SS 5N =7+P9amp7gt47ST Pamp527SS 5N A+479

amp7gt47ST) are not recorded This aso appies to a commands under the System and $el

menus aues for defaut variants ( transaction variants) are not incuded

7rror and $arning diaogs are not recorded 5ny the 56 code and the fied contents reuired for

further processing on the current screen are recorded

Note uring recording the data entered is $ritten to the dataase

copy SAP AG BC420 12-16

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 1788

063

983209 SAP AG 2001

1n-o( SAP ontrols and Data Transfer

bull SAP Picture ontrolbull SAP ETML ie)er ontrol

bull SAP Tet 1dit ontrol

bull AL Brid ontrol

bull SAP Tree ontrol

bull

ranch 6

ranch amp

Root

These and other controls do not support batch input$

Root

ranch amp

ranch amp6

The ne$ 7noy SAP contros deveoped for ampeease B do not support atch input or ca

transaction

=o$ever tae contros and tastrips do support atch input

copy SAP AG BC420 12-17

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 1888

065

983209 SAP AG 1999

The Transaction Recorder

PrinciplesPrinciples

Recording )ith the LSMWRecording )ith the LSMW

Principles of atch Input and all TransactionPrinciples of atch Input and all Transaction

Integrating the TA Program into the DWIntegrating the TA Program into the DW

Using the TA Recorder Using the TA Recorder

copy SAP AG BC420 12-18

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 1988

067

983209 SAP AG 1999

Session

generator

Recording Using the LSMW

-ith the +S- you can create your o$n recordings

The +S- uses the standard TA recorder here yet evauates the recording itsef The information

from the recording is used to create atch input sessions

The created atch input session can e processed as usua $ith the atch input monitor

Note As $ith the standard procedure it is euay important that the data is converted

copy SAP AG BC420 12-19

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 2088

0amp0

983209 SAP AG 1999

reating Recording

Admnraon

ecordn

Goo

ame of recording

Description

)ner

ame of transaction

Start recording

lto into the +S- and seect the menu path ampoto (Recorings An overvie$ of a previousy

created recordings for your proect are dispayed To start a ne$ recording seect Create

To create a recording you must define the name the description and the o$ner

7nter the name of the transaction you $ant to record

7ecute the transaction and compete it propery

Note ampecordings are assigned to ony one proect 9 so the name of the recording must e uniue

copy SAP AG BC420 12-20

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 2188

0amp6

983209 SAP AG 1999

hanging ustomer Data$ Initial Screen

9ield ontents

BCC$Samp $SZAV

BCamp(Camp )00

02-($++ -88-10000

02-0110

02-0130

$SZAV

9ield ame

Comer

Company code

Z-88-10000

Genera daa

Comer Z-88-10000

+ame

9ield ontents

BCamp(Camp $PA

BCS$BSC SAPSZA1 0300ASS

BCS$BSC SAPSZA1 0301Camp$

BCC$Samp SZA10100-+$B

A1AA-S Garden Sree

A1AA-amp$S+$1 34

A1AA-PampSCamp1 02105

9ield ame

Screen

111

Screen

106

In the aove eampe the transaction Change customer F01 is recorded

Note

You must ma)e some modification to the field values for all the fields you ant to capture

for the data transfer For the purposes of recording a change can simply mean overriting

one single character in a field ith the same character

ven if fields are to e filled using S$amp$ parameters the values must still e changed on

the screen in order to capture them

(ith online transactions screen sequences may appear that are different than in the

recording

copy SAP AG BC420 12-21

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 2288

0ampamp

983209 SAP AG 1999

Results

RecordingRecording R1lt6 Demolt6

9D0amp hange customer Caccounting

SAPM90ampD 0608

DltURSR R90ampD=UR

Dlt=D1 gt00

R90ampD=UR 5560000

R90ampDD0660

US1ltA

SAPM90ampD 0666

Dlt=D1 UPDA

DltSUSR SAPLSA6

DltSUSR SAPLSA6

DltURSR SA6ltD0600T1LltUM1

ADDR6ltDATASTR11T 4 Barden Street

ADDR6ltDATAPSTltD1 0amp602

ADDR6ltDATAIT6 oston

SA6ltD0600T1LltUM1 8638257755

The resuts of the recording using the +S- are dispayed in a tree structure

After the recording has finished you can edit it Cou can deete fieds or add ne$ ones

copy SAP AG BC420 12-22

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 2388

0amp

983209 SAP AG 1999

Assigning 9ield ames

Recording R16 Demolt6

Dlt=D1 UPDA

DltSUSR SAPLSA6

DltSUSR SAPLSA6

DltURSR SA6ltD0600T1L

ADDR6ltDATAAM16 Lisa Eofmeister

ADDR6ltDATAPSTltD1 0amp602

ADDR6ltDATAIT6 oston

ame

+ame

ecrpon

e=a ae

A1AA-+A1

A1AA-+A1

Comer name

a o=meer

Screen =ed

ustomer name

double clic+

Cou can assign names for each recorded fied The specia fieds (2356257 2324ampS5amp

and 23S4S2amp77N) are not incuded here Cou can choose the fied names -hen the atch

input session is created the contents of these fieds are assigned to the target fieds specified in the

eft coumn

Functions

efaut Assigns to the fied names of the underying target fied and its fied description

ampeset eetes fied name and fied description

oue cic 7dits fied name fied description and defaut vaue

Note Cou can use fied names more than once =o$ever the fied name is ony avaiae once in thefied mapping For this reason it is not practica to use fied names more than once

For a those fieds for $hich you do not assign a name the defaut vaue is used $hen the atch

input session is created These defaut vaues can e seen as constants This is especiay usefu for

chec oes (for eampe 08 vie$ seection)

The +S- supports automatic fied mapping Source fieds and target fieds can e assigned to each

other automaticay The fieds are assigned to the corresponding fieds of the same name Therefore

the fied names of the source structure shoud e given the same or simiar names as the fied names

in the target structure

copy SAP AG BC420 12-23

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 2488

0amp4

983209 SAP AG 2001

Addinggtremoing screen fields

Repeating recording

9or identical field names the name and description are

assigned automaticall(

1diting Recording

02-($++

(+A1-A+

(+A1-+A1

(+A1-Samp

(+A1-+A2

(+A1-SAS

Comer accon nmer

e

+ame 1

Sor =ed

+ame 2

Sree

Selection of all

aailable screen

fields

Cou can ater add ne$ screen fieds if you need to 6eep in mind that fieds shoud ony e added in

paces $here they are aso provided on the screen other$ise you $i get an error $hen the I

session is processed

After saving you $i get the message The data has een saved successfuy No$ the recordings

are avaiae for the oect attriutes

If you repeat the recording you can record a ne$ screen seuence $ith ne$ fieds Provided that the

fied names (eg 6NA89NA78) are identica the names and descriptions are automaticay

assigned

copy SAP AG BC420 12-24

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 2588

0amp2

983209 SAP AG 1999

b-ect T(pe and Import Method$ Recording

Standard atch Input gt Direct Input

atch Input Recording

API

IDoc

ampgtec ype ) mpor meod

Bac np recordn

ecordn ec1

The recording is no$ avaiae $ith the oect attriutes

Net you create a proect or su9proect in the +S- and specify process the data transfer

Cou eecute the data transfer as in the standard system

efine the source fieds and structures

efine the fied mapping

ampead and convert the data

2reate and import a atch input session

copy SAP AG BC420 12-25

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 2688

0amp8

983209 SAP AG 1999

The Transaction Recorder

PrinciplesPrinciples

Recording )ith the LSMWRecording )ith the LSMW

Principles of atch Input and all TransactionPrinciples of atch Input and all Transaction

Integrating the TA Program into the DWIntegrating the TA Program into the DW

Using the TA Recorder Using the TA Recorder

copy SAP AG BC420 12-26

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 2788

0amp3

983209 SAP AG 1999

Transaction Recorder

Online

Transaction

RecordingTransfer Program

T

Included in the Batch Input Monitor

Cou use the transaction recorder to record transactions and then use the transaction recording to

generate a transfer program The program ao$s you to transfer data using either atch input or ca

transaction

copy SAP AG BC420 12-27

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 2888

0amp5

983209 SAP AG 1999

hanging ustomer Data$ Initial Screen

9ield ontents

BCC$Samp $SZAV

BCamp(Camp )00

02-($++ Z-88-10000

02-0110

02-0130

$SZAV

9ield ame

Comer

Company code

Z-88-10000

Genera daa

Comer Z-88-10000

+ame

9ield ontents

BCamp(Camp $PA

BCS$BSC SAPSZA1 0300ASS

BCS$BSC SAPSZA1 0301Camp$

BCC$Samp SZA10100-+$B

A1AA-S Garden Sree

A1AA-amp$S+$1 34

A1AA-PampSCamp1 02105

9ield ame

Screen

111

Screen

106

In the aove eampe the transaction Change customer F01 is recorded

copy SAP AG BC420 12-28

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 2988

0amp7

983209 SAP AG 2001

hange Debitor$ Pa(ment Transactions C6

Banlt dea

Screen

10

9ield ontent

BCC$Samp (+B(-BA+(+01

BCamp(Camp BA+((+B(-BA+(S01

(+B(-BA+(01 12345679

(+B(-BA+(+01 22222222

Debitor 5560000

9ield ame

Inde

copy SAP AG BC420 12-29

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 3088

00

983209 SAP AG 1999

hanging ustomer Data$ Pa(ment Transactions Camp

Addre

an+ countr( US

an+ code 6amp42837

Banlt dea

ustomer 5560000

9ield ontents9ield ame

BCC$Samp (+A1-(+ZA

BCamp(Camp $PA

(+B(-Z01

Screen

10

Screen

100

SAPLBA

9ield ontents

BCC$Samp B+(A-BA+(A

BCamp(Camp +

B+(A-BA+(A +aona Banlt

9ield ame

In different transactions the modue poo may change This is the case $ith for eampe customer

master data The TA recorder records modue poo changes automaticay

copy SAP AG BC420 12-30

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 3188

06

983209 SAP AG 1999

Eierarch( Displa( of the Recording

02amp

02

SAP02 0106

BCC$Samp 02-0130

BCamp(Camp )00

02-($++ -88-10000

02-0110

02-0130

SAP02 0111

BCamp(Camp V

BCC$Samp A1AA-amp$S+$1

A1AA-S Garden Sree

Recording

-ith the TA recorder the resuts are aso a ist in a hierarchy dispay =o$ever you cannot assign

your o$n fied names as you can in the +S-

copy SAP AG BC420 12-31

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 3288

0amp

983209 SAP AG 1999

Recording erie)

Recording

Transfer program

9unction module

ontains onl( the data

from the recording

Test data

Test

reate

reate

reate

reate

1dit hange recording

Process recording

Cou can edit the recording as needed

The recording can e tested and eecuted again The screens are run through in the same $ay as in

the recording

The recording can then e used to create

atch input sessions

Test data

ata transfer programs $ith atch input or ca transaction

Function modues

copy SAP AG BC420 12-32

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 3388

0

983209 SAP AG 1999

1 02 BS

2 SAP02 106

3 BCC$Samp $SZAV

4 BCamp(Camp )00 5 02-($++ -88-10000

6 02-0110

7 02-0130

8 $SZAV

9 SAP02 111

10 BCamp(Camp V

11 BCC$Samp A1AA-amp$S+$1

12 A1AA-S Garden Sree

Program Screen St 9ield ame 9ield alue

Recording 1ditor

Recording

Add gt delete lines 9ormat chec+

Import gt eport of recording

In the editor you can add or deete ines Cou can aso change the contents of individua ines

-ith the function Chec) you can specify $hether the edited version of the recording sti has the

correct synta

Cou can aso eport import recordings to from a seuentia fie

After editing save the recording changes

copy SAP AG BC420 12-33

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 3488

04

983209 SAP AG 1999

Recording Seeral Transaction Runs

RecordingF

Directl( after the first recordingG or

In the displa( mode of the recording

In this step you can record additiona transactions and add additiona transaction runs to the

recording

Cou can record the additiona transactions directy after a recording or in the edit screen of a

recording

copy SAP AG BC420 12-34

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 3588

02

983209 SAP AG 1999

1ditor$ Importing and 1porting Recordings

6 T 9D0amp S

amp SAPM90ampD 608

DltURSR

4

2

8 SAPM90ampD 666

60

66

Program Screen St 9ield name 9ield alue

cempA

e name

aa =orma

cemp

A

e name

aa =orma

1port

Import

Presentation Serer

If the editor functions in the systems do not provide a the functions you need you can do$noad the

recording to your presentation server using the Eort function and then edit the recording using a

P2 editor

Cou use the Import function to import the data ac into the amp System ae sure the fie is sti in

the correct format

copy SAP AG BC420 12-35

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 3688

08

983209 SAP AG 1999

Processing the Recording

Recording

Process )ith ALL TRASATI

Parameer

Proce mode$pdae mode

CA mode

e=a e

Con a=er comm

+o a B eon

nd +o a B mode

A

A

T

The recording can e eecuted directy The data from the recording is used and the transaction is

processed $ith ca transaction

2a transaction provides a range of options for caing appication transactions $hich are discussed

on the foo$ing t$o pages

copy SAP AG BC420 12-36

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 3788

03

983209 SAP AG 1999

Process mode

Update mode

ATT mode

Processing Recording )ith T 6

A

1

Displa( all screens

Displa( errors onl(

o displa(

L

S

A

Local

S(nchronous

As(nchronous

A

o ATT

ATT )ithout indiidual screen control

ATT )ith indiidual screen control

Processing mode

=ere you can specify the processing mode 9 it is the same as the processing mode for atch input

4pdate mode

=ere you can specify the update mode For more information see the unit ca transaction

2ATT mode

=ere you can mae specia settings if you $ant to test the recording under 2ATT conditions (ony

necessary for 2ATT runs) Specia functions are caed in the 2ATT too for each screen at the end of

P5 and at the start of PAI

copy SAP AG BC420 12-37

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 3888

05

983209 SAP AG 1999

Default sie

ont after commit

ot a I session

1nd$ ot a I mode

Processing Recording )ith T amp

The screen standard sie is used for the

processing

ommit )or+ does not end the processing

o I mode is actie The transaction )ill run

through as in online

I mode is selected nce the data in the D

table is processedG the I mode is set to inactie

Standard siDe

If you seect this the screens are processed in the standard siDe in the foreground (in foreground or

dispay errors ony) Note the standard siDe is a$ays used for acground processing

Further after commit

The first commit $or in a transaction does not ead to the end of the recording

Note A atch input transaction is ended $ith the first commit $or

No I mode

The system fied SC9INPT is not set (SC9INPT E ) So transactions are run through as in onine

7nd No I mode

5ny use if you choose the processing mode 7 (dispay errors ony) Then the transaction is processed in the acground in atch input mode and if there is an error the screens run through in

the foreground

copy SAP AG BC420 12-38

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 3988

07

983209 SAP AG 1999

I Mode

atch input

mode

nline

Some transactions behae differentl( in batch input mode

than in online Cbatch input capabilit(

atch input mode sets the s(stem field SIPT H

Not every transaction can run the same onine and in atch input mode The transaction must decide

itsef $hether it is caed onine or in atch input mode

The system sets the system fied SC9INPT E G if the atch input mode is active (this aso appies

to ca transaction) From this system fied the transaction can identify $hether to run onine or in

atch input mode

copy SAP AG BC420 12-39

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 4088

040

983209 SAP AG 1999

reating a Session 9rom the Recording

Recordingnl( contains the data

from the recording

Seon name 02amp

Aoraon ampBS(eep eon

oclt dae 10102000

Cou can create a atch input session directy from the recording that you can then process using the

atch input monitor

copy SAP AG BC420 12-40

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 4188

046

983209 SAP AG 1999

reating Test Data

Test Data

Recording

ranranpBC420AAe name

The file onl( contains the data from the recording

Rgt

Application Serer

Structure

Cou can create a fie from the recordingH the fie $i contain a the fieds from the recording The

fieds are added to the fie $ith the ength you specified in the definition

The fied order corresponds to the order in the recording overvie$ Technica fieds

(2356257 2324ampS5amp and so on) are incuded

The data can ony e stored on the appication server If you do not specify a path the fie is stored in

the $or directory of the appication server

If the specified test fie aready eists the ne$ data record is added to this fie

copy SAP AG BC420 12-41

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 4288

04amp

983209 SAP AG 1999

ed conen

reating a Program

Recording

ZBC420ampProram name

Transfer Program

e daa

ead =rom =e

ran=er =rom recordn

reate

9ile nameTest data

ranranpBC420AA

Cou can generate a program from the recording

In the foo$ing diaog o enter a program name In addition you can choose the type and method

for fiing the maintained fied contents from the recorded screens

4se the vaues used for the recording If you reuire feie data transfer you $i have to modify

this program ater

ParameteriDe the input vaues and read these vaues from a fie A data structure is created for

parameteriDationH the data records are read from an eterna fie into this data structure The

program assumes the fie $as taiored to this data structure

If you have decided to parameteriDe the input vaues you shoud aso create a test fie during

generation To do this seect the checo and enter a name for the fie

The attriute maintenance screen of the AAP editor appears aintain the attriutes and save the

program

copy SAP AG BC420 12-42

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 4388

04

983209 SAP AG 1999

Program 9unctions

Online

transaction

Transfer program

To

error

1rror

ption 6ption ampFlat SAP

structure

Monitor

Cou have no$ generated a data transfer program for importing data into the amp System The

program can eecute the data transfer using atch input or ca transaction

If you choose option 1 and there is an error the data record is paced into a atch input session

copy SAP AG BC420 12-43

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 4488

044

983209 SAP AG 1999

Benerating 9unction Modules

Recording

Zcreaedeor ncon mode

ncon rop

Sor eD

ZBC420

Creae comer

9unction module

nl( one data record can be processed at a time

In the net diaog o you can generate a function modue a function group and short tet from the

recording The function modue is automaticay created in the function group

copy SAP AG BC420 12-44

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 4588

042

983209 SAP AG 1999

9unction of 9unction Modules

Online

transaction

To

error

1rror

ption 6 ption amp

9unction module

Import

Parameter 1port

parameter

Tables

M1SSTA

Monitor

S$BC

Import interface

The import interface consists of a technica part and the fieds from the recording (A parameter is

created for each input fied of the recorded transactions)

7port interface

Simpy consists of the parameter S4amp2 The function modue $i return a vaue in the system

fied SC9S4amp2 after caing ca transaction This return vaue is set to Dero if the data record has

een correcty processed (5ny appies to 2T)

If a session is created you $i e notified $hether the data record coud e paced into the session

Tae interfaceThis is used ony if the function modue $ors $ith ca transaction The tae contains a the

system messages

copy SAP AG BC420 12-45

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 4688

048

983209 SAP AG 1999

Import Interface of 9unction Module

$

Technical

fields

Data

fields

BI session or CALL TRANSACTION

Processin $ode

pdate $ode

a$e oamp BI session iamp (T initial)

Bacround user iamp (T initial)

Delete session aampter processin

Loc date oamp session

ODATA indicator

TU

MD1

UPDAT1

BRUP

US1R

=11P

ELDDAT1

DATA

Cou can use parameter 2T4 to specify $hether the function modue creates a atch input session

(2T4 E ) or updates the data record directy using ca transaction (2T4 E G)

The other parameters are fied as for a atch input session header

Note 7very time the function modue is caed a atch input session is created

If the session is to contain severa transactions proceed as foo$s

ltenerate the transaction severa times This can e achieved y recording the transaction again The

function modue interface $i then contain more than one transaction -hen the function modue is

caed severa transactions can e generated for each session

copy SAP AG BC420 12-46

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 4788

043

983209 SAP AG 1999

The Transaction Recorder

PrinciplesPrinciples

Recording )ith the LSMWRecording )ith the LSMW

Principles of atch Input and all TransactionPrinciples of atch Input and all Transaction

Integrating the TA Program into the DWIntegrating the TA Program into the DW

Using the TA Recorder Using the TA Recorder

copy SAP AG BC420 12-47

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 4888

045

983209 SAP AG 1999

Benerated Program

9unction modules DltP1ltBRUP

DltIS1RT

DltLS1ltBRUP

AAP Program

Define structure of

data in seJuential

fileDefine D

table

pen seJuential file

pen I session

Read data recordCseJuential file

9ill D table

9ill I session gtALL TRASATI

Last data record K

lose I session

lose seJuential file

The generated program has the structure dispayed aove It uses the standard function modues for

creating atch input sessions

copy SAP AG BC420 12-48

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 4988

047

983209 SAP AG 1999

Structure of the Benerated Program

Benerated part

Define D

table

pen seJuential file

pen I session

Read data record

9ill D table

9ill I session gtALL TRASATI

Last data recordK

lose I session

lose seJuential file

Include DR16

Define filestructure

P1ltDATAS1T

P1ltBRUP

DltDPR

Dlt9I1LD

DltTRASATI

LS1ltBRUP

LS1ltDATAS1T

The generated program consists of t$o parts 9 a generated part and the incude 2amp72G8 The

incude is provided in the standard system

The incude contains the definition of the reuired 2 tae and a further seven suroutines These

suroutines eecute the foo$ing functions

5pen and cose fie

5pen and cose session

Fi 2 tae

Fi session

The generated part is the main program and cas the reevant suroutines A structure is aso

generated in the generated part to read the eterna data into the fie

See the Appendi for more information on the 2amp72G8 program

copy SAP AG BC420 12-49

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 5088

020

983209 SAP AG 1999

Structure of D Table

PRBRAM DPR D1BI 9AM 9ALPRBRAMPRBRAM DPRDPR D1BID1BI 9AM9AM 9AL9AL

SAPM90ampD 0602

R90ampD=UR 600000

R90ampDU=RS 0006

R90ampD=T=D =UA

SAPM90ampD 0660

=A6AM16 Smith

=A6PSTL 87000

=A6LAD6 US

=A6SPRAS 1

SAPM90ampD 06amp0

=A6ST1B US6amp428357DDATA

PRBRAM

DPR

D1BI

9AM

9AL

EAR

UM

EAR

EAR

EAR

40

4

6

6amp

6amp

D Module pool

D Screen number

D Start of screen

D 9ield name

D 9ield contents

9ield ame T(pe Length Short Tet

AAP Dictionar(

The 2 tae has the same structure as in a standard transfer

copy SAP AG BC420 12-50

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 5188

026

983209 SAP AG 1999

Read Structure

Recording

DATA BEGIN OF record data element BUKRS bukr$amp data element KTOKD ktokd$amp data element NA(EG) name$+amp data element SORT ortl$ampEND OF record-

record

Automaticall( generated

from recording

The structure of the fie is automaticay generated and is a$ays defined $ith the name amp725amp

The generated structure a$ays has the same ayout 7ach fied is defined y t$o generated ro$s

The first ro$ is a$ays a comment ro$ containing the tet J data eement and the data eement of

the screen fied from the recording In the net ro$ the fied itsef is defined $ith the name of the

data eement foo$ed y a three9digit position numer $hich specifies the ocation in the structure

The ength of the fied is set y the ength of the data eement If a fied is not defined through a data

eement the system uses the ength of the screen fied

copy SAP AG BC420 12-51

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 5288

02amp

983209 SAP AG 1999

pening and losing the 9ile

P1ltDATAS1T

LS1ltDATAS1T

FOR( oendataet USING dataet-O)EN DATASET dataet IN TET (ODE-

IF S01SUBR2 34 - 5RITE 6 te7t1e S01SUBR2-STO)-

ENDIF-

ENDFOR(-

FOR( cloedataet USING dataet-2OSE DATASET dataet-

ENDFOR(-

Include

DR16

The suroutine 5P7N3ATAS7T opens the seuentia fie

The suroutine 2+5S73ATAS7T coses the seuentia fie

copy SAP AG BC420 12-52

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 5388

02

983209 SAP AG 1999

9unction Modules for I Program

lient

Session name

Eold date

=eep session

D user name

RecordK

LI1T

BRUP

ELDDAT1

=11P

US1R

R1RD

DltP1ltBRUPDltP1ltBRUP

Transaction code

D table

TD1

DPRTA

DltIS1RTDltIS1RT

DltLS1ltBRUPDltLS1ltBRUP

pen Isessionpen Isession

Insert data for

transactions

Insert data for

transactions

lose I

session

lose I

session

The foo$ing function modues are provided for creating atch input sessions (function group

S2)

235P7N3ltamp54P

2reates a ne$ session and contains genera data for the $hoe session

23INS7ampT

Inserts a the data for a transaction into the session The transferred interna tae $ith the

structure 2ATA must contain a the data reuired for fuy processing the transaction

232+5S73ltamp54P

2oses the session after a the data has een inserted As soon as the session has een cosed it

can e processed

The interna tae $ith the structure 2ATA can ony contain atch input data for one singe

transaction run So the individua transactions are inserted into the atch input session in a oop

using severa 23INS7ampT cas

copy SAP AG BC420 12-53

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 5488

024

983209 SAP AG 2001

9unction Module DltP1ltBRUP

ALL 9UTI DltP1ltBRUPALL 9UTI DltP1ltBRUP

1PRTIB

LI1T client

BRUP session name

ELDDAT1 loc+ date

=11P delete flag

US1R bdc user name

R1RD recording

IMPRTIB

NID internal session +e(

11PTIS

1PRTIB

LI1T client

BRUP session name

ELDDAT1 loc+ date

=11P delete flag

US1R bdc user name

R1RD recording

IMPRTIB NID internal session +e(

11PTIS

-ith the function modue 235P7N3ltamp54P you can open a atch input session

The foo$ing parameters are mandatory

2+I7NT (cient)

ltamp54P (session name)

4S7amp (user name)

Note The 4S7amp must a$ays e specified This user name is reuired for processing the session

in atch mode

The foo$ing parameters are optiona

=5+AT7 specifies the eariest date on $hich the session can e started677P fag specifies $hether session shoud e deeted after it has een successfuy processed The

677P fag is ignored if the session contains errors

677P E K K means deete the session after processing (defaut vaue) H

677P E KGK means do not deete session

amp725amp E KGK ao$s you to create a recording instead of a I session

If gtI is specified the function modue returns the interna session ey This is needed to e ae to

differentiate sessions that have the same name

-ith 7G27PTI5NS you get various return vaues that can e ueried $ith SC9S4amp2

Note In onine mode the onine user is used for the authoriDation checs regardess of the user

name specified

copy SAP AG BC420 12-54

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 5588

022

983209 SAP AG 1999

Subprogram P1ltBRUP

P1ltBRUP

FOR( oen8rou-IF e9on -

2A FUN2TION BD2O)ENGROU) E)ORTING 2IENT lt1mandt GROU) 8rou USER uer KEE) kee

=ODDATE gtolddate-

ENDIF-ENDFOR(-

Include

DR16

The suprogram 5P7N3ltamp54P opens the atch input session

copy SAP AG BC420 12-55

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 5688

028

983209 SAP AG 1999

9unction Module DltIS1RT

ALL 9UTI DltIS1RTALL 9UTI DltIS1RT

IMPRT

TD1 Transaction code

PSTltLAL Update locall(

PRITIB print list

TAL1S DPRTA bdclttable

11PTIS

IMPRT

TD1 Transaction code

PSTltLAL Update locall(

PRITIB print list

TAL1S DPRTA bdclttable

11PTIS

-ith the function modue 23INS7ampT you can add transaction data to the session

Cou need an interna 2 tae to transfer the data

The foo$ing parameters are mandatory

T257 Transaction code

CNPamp5TA 2 tae

The foo$ing parameters are optiona

P5ST3+52A+ E KGK activates oca updating This means that the data to e updated is ept in the

appication server and updated in the ast step of the transaction This does not invove the update

process (For more information see course 28 Programming ataase 4pdates)

PampINTINlt E KGK 9 ists processed in I $i e printed immediatey -ith 7G27PTI5NS you get various return vaues that can e ueried $ith SC9S4amp2

copy SAP AG BC420 12-56

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 5788

023

983209 SAP AG 1999

Subprogram DltTRASATI

DltTRASATI

FOR( BD2TRANSA2TION USING tcode-

IF e9on -2A FUN2TION BD2INSERT

E)ORTING T2ODE tcode TABES D0N)ROTAB bdcdata-

ESE-

ENDIF-ENDFOR(-

T

Include

DR16

The suprogram 23TampANSA2TI5N moves the fied 2 tae either to a atch input session

or uses ca transaction to import the data into the system 5n the seection screen you can specify

$hether you $ant to create a session or you $ant to use ca transaction to process the data directy

The S7SSI5N fied is then set according to your seection

copy SAP AG BC420 12-57

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 5888

025

983209 SAP AG 1999

9unction Module DltLS1ltBRUP

ALL 9UTI DltLS1ltBRUP

11PTIS

TltP1 6

NU1U1lt1RRR amp

-ith the function modue 232+5S73ltamp54P you can cose a atch input session

In 7G27PTI5NS you get various return vaues that can e ueried $ith SC9S4amp2

copy SAP AG BC420 12-58

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 5988

027

983209 SAP AG 1999

Subprogram LS1ltBRUP

FOR( cloe8rou-IF e9on -cloe batcgt 9nut 8rou

2A FUN2TION BD22OSEGROU)-

ESE-IF e8rouoened -

2A FUN2TION BD22OSEGROU)-

ENDIF-ENDIF-

ENDFOR(-

LS1ltBRUPlose session

lose error session

Include

DR16

The suprogram 2+5S73ltamp54P coses the atch input session The suprogram differentiates

et$een a norma I session (S7SSI5N E G) and a session opened $hen ca transaction

encountered an error (73ltamp54P35P7N7 E G)

copy SAP AG BC420 12-59

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 6088

080

983209 SAP AG 1999

Subprograms DltDPRG Dlt9I1LD

DltDPR

Dlt9I1LD

FOR( bdc9eld USING nam al-IF al 34 nodata-2EAR bdcdata- bdcdata1nam nam- bdcdata1al al- A))END bdcdata-ENDIF-

ENDFOR(-

FOR( bdcdltnro USING ro8ram dltnro- 2EAR bdcdata-Bdcdata1ro8ram ro8ram-Bdcdata1dltnro dltnro-Bdcdata1dltnbe89n - A))END bdcdata-ENDFOR(-

Include

DR16

The incude 2amp72GG contains t$o suprograms 23CNPamp5 and 23FI7+

Suprogram 23CNPamp5 fis the 2 tae $ith program names and screen numers

Suprogram 23FI7+ fis the 2 tae $ith fied names and vaues

7ach suprogram creates an entry in the 2 tae

copy SAP AG BC420 12-60

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 6188

086

983209 SAP AG 1999

9illing the D Table

erorm bdcdltnro u9n8 SA)(FD +- erorm bdc9eld u9n8 BD22URSOR RFD1BUKRS- erorm bdc9eld u9n8 BD2OK2ODE 6- erorm bdc9eld u9n8 RFD1BUKRS record1BUKRS- erorm bdc9eld u9n8 RFD1KTOKD record1KTOKD-

erorm bdcdltnro u9n8 SA)(FD -

erorm bdc9eld u9n8 BD22URSOR KNA1S)RAS- erorm bdc9eld u9n8 BD2OK2ODE 6- erorm bdc9eld u9n8 KNA1NA(E record1NA(E-

erorm bdc9eld u9n8 KNA1SORT record1SORT-

Recording Benerated automaticall(

from the recording

)ERFOR( bdcdltnro USING SA)(FD +- )ERFOR( bdc9eld USING BD22URSOR RFD1BUKRS-)ERFOR( bdc9eld USING BD2OK2ODE 6-)ERFOR( bdc9eld USING RFD1BUKRS record1BUKRS-)ERFOR( bdc9eld USING RFD1KTOKD record1KTOKD-

)ERFOR( bdcdltnro USING SA)(FD -

)ERFOR( bdc9eld USING BD22URSOR KNA1S)RAS-)ERFOR( bdc9eld USING BD2OK2ODE 6-)ERFOR( bdc9eld USING KNA1NA(E record1NA(E-

)ERFOR( bdc9eld USING KNA1SORT record1SORT- ---

The 2 tae is fied $ith data from the recording The suroutines 23CNPamp5 and

23FI7+ are used for this

The suroutines are caed in the reuired structure or seuence

copy SAP AG BC420 12-61

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 6288

08amp

983209 SAP AG 1999

erie)

SAPDatabase

SeJuential9ile

SAPDatabase

ALL TRASATIALL TRASATI

SeJuential9ile

ATE IPUTATE IPUT

D TableD TableD TableD Table

I Monitor

T

In contrast to atch input you can use ca transaction to directy pass data to the diaog interface

$ithout using a atch input session Cou use an interna tae (2 tae same structure and ayout

as atch input) to temporariy store your screen data Then you ca the desired transaction in your

program

Note 5n average the 2a Transaction method is 8 to times faster than using atch Input

copy SAP AG BC420 12-62

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 6388

08

983209 SAP AG 1999

all Transaction Program$ 1ample

RE)ORT abcbdcdcdeb9ct-

)ARA(ETERS d9mode DEFAUT A

udmode DEFAUT S-FOR( calltranact9on-2A TRANSA2TION FD

USING bdcdata (ODE d9mode

U)DATE udmode-

IF lt1ubrc NE - 5RITE 6 ---

ENDIF-ENDFOR(-

Screen

00

Screen

100

Screen

An additiona system ro area is added for the caed transaction The system uses this area for

processing the individua screens in the transactionH the data from the tae is added here After the

transaction is processed the second ro area is reeasedH the system continues processing in the first

ro area

Notes

In contrast to atch input there is no error ogging (error sessions) here For processing the caed

transaction the system uses the authoriDations of the user that caed the transaction The 2 tae

can ony hod data for one transaction run at a time efore another transaction is caed and its data

can e added you must eecute a amp7Famp7S= for the 2 tae

copy SAP AG BC420 12-63

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 6488

084

983209 SAP AG 1999

ALL TRASATI C6

RE)ORT 777-

2A TRANSA2TION FD USING bdcdata (ODE E-

Default for MD1 is A

2A TRANSA2TION 3tranact9oncode4 USING 3bdc1table4 C (ODE A E N C-

-ith the parameter 57 you can seect a specific dispay mode for processing the transaction The

foo$ing three modes are avaiae

A (ispay a)

If you eecute the program a the screens and a their data are dispayed This is the defaut vaue

for the 57 in 2A++ TampANSA2TI5N

N (ispay nothing)

The screens are not dispayed at a regardess of $hether any of them contained errors As soon as

the transaction has een fuy processed contro is returned to your program (The vaue of the

parameter 4PAT7 determines $hether dataase updates are eecuted or not)

7 (ispay errors ony)As soon as an error occurs in a screen the transaction is s$itched to dispay mode so that you can

correct the errors

These dispay modes are the same as those in the atch input session processing

copy SAP AG BC420 12-64

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 6588

082

983209 SAP AG 1999

RE)ORT 777-

2A TRANSA2TION FD USING BD2DATA U)DATE -

ALL TRASATI Camp

RE)ORT 777-

2A TRANSA2TION FD USING bdcdata U)DATE -

2A TRANSA2TION 3tranact9oncode4 USING 3bdc1table4 C (ODE A E N C U)DATE A S C -

Default for UPDAT1 is A

-ith the parameter 4PAT7 you can contro ho$ dataase updates arising from a transaction are

carried out There are three options

A (asynchronous updating) The caed transaction does not $ait unti the dataase has een

updated it simpy for$ard the updates to the SAP update service This usuay speeds up the 2T

program This processing mode is N5T recommended for arge data sets as the caed transaction

does not receive a competion message from the update modue

The caing 2T program therefore cannot te if the transaction has een successfuy competed Cou

shoud use the updating administration function (transaction S8) to determine $hether updating

$as terminated eary The error anaysis correction functions for are ess hepfu than $ith

synchronous updating

S (synchronous updating) -ith synchronous updating the caed transaction $aits unti a the

updates have een competed So processing is so$er than $ith synchronous updating The caed

transaction can ho$ever report any updating errors to the program $hich maes error

anaysiscorrection easier

+ (local updating) $ith oca updating the dataase is not updated in a separate process it is

updated in the caers process (see appication hep documentation for the AAP ey$ord S7T

4PAT7 TAS6 +52A+)

copy SAP AG BC420 12-65

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 6688

088

983209 SAP AG 1999

ALL TRASATI C

RE)ORT 777-DATA mtab T0)E TABE OF bdcm8coll-

2A TRANSA2TION FD USING bdcdata (ESSAGES INTO mtab-

2A TRANSA2TION 3tranact9oncode4 USING 3bdc1table4 C (ODE A E N C U)DATE A S C (ESSAGES INTO 3metab4 C -

7SSAlt7S specifies that a system messages that are output during the eecution of a 2A++

TampANSA2TI5N are $ritten to the interna tae L7SSTA The interna tae must have the

structure 2Slt25++

4nie the cassica atch input processing $ith sessions 2A++ TampANSA2TI5N does not offer any

specia processing procedures for transactions containing errors There are no restart functions for

transactions that contain errors or that cause updating terminations

copy SAP AG BC420 12-66

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 6788

083

983209 SAP AG 1999

ALL TRASATI C4

RE)ORT 777-DATA mltot T0)E ctuaram-

2A TRANSA2TION FD USING BD2DATA

O)TIONS FRO( mltot-

2A TRANSA2TION 3tranact9oncode4 USING 3bdc1table4 C (ODE A E N C U)DATE A S C (ESSAGES INTO 3metab4 C O)TIONS FRO( ot C -

RE)ORT 777-DATA mltot T0)E ctuaram-2A TRANSA2TION FD USING bdcdata

O)TIONS FRO( mltot-

The addition 5PTI5NS enaes the ca transaction statement to e controed through a structure

The structure must have the dictionary type 2T43PAampAS

The addition 5PTI5NS Famp5 must not e comined either $ith the addition 57 or $ith

4PAT7 ore information on the net side

copy SAP AG BC420 12-67

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 6888

085

983209 SAP AG 1999

Structure TUltPARAMS

DISMD1 Procen mode anaoo o addon amp

UPDMD1 $pdae mode anaoo o addon $PA

ATTMD1 CA mode CA conro

D19SI1 orce de=a EndoE e drn procen

RAMMIT +o eD a Camp amp(

IPT +o a ac np eonF a F S-B+P SPAC

I1D +o a ac np eon a=er end o= BC daa

The components are defined as foo$s

The components 7FSIM7 ampA25IT N5INPT and N5I7N can have the foo$ing

vaues KGK E Ces or K K E No

If the addition 5PTI5NS Famp5 is not specified the foo$ing settings appy to the contro

parameters

IS57 from addition 57

4P57 from addition 4PAT7

2ATT57 2ATT not active

7FSIM7 o not not use defaut $indo$s siDe

ampA25IT Successfu eit at 25IT -5amp6

N5INPT atch input session active (SC9INPT E G)

N5I7N atch input session sti active after end of 2 data

copy SAP AG BC420 12-68

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 6988

087

983209 SAP AG 1999

SMSBID Message ID

SMSBT Message T(pe C1GIGWGSGA

SMSB Message umber

SMSB6 Message ariable 6

SMSBamp Message ariable amp

SMSB Message ariable

SMSB4 Message ariable 4

SMSBID Message ID

SMSBT Message T(pe C1GIGWGSGA

SMSB Message umber

SMSB6 Message ariable 6

SMSBamp Message ariable amp

SMSB Message ariable

SMSB4 Message ariable 4

Return code$

S(stem fields$

alue Meaning

0 Successful

6000 1rror in transaction

6000 1rror in processing call transaction

see also the s(stem fields specified

alue Meaning

0 Successful

6000 1rror in transaction

6000 1rror in processing call transaction

see also the s(stem fields specified

9ield name Meaning9ield name9ield name MeaningMeaning

Return ode and S(stem 9ields

The return code is used to specify $hether the caed transaction $as processed successfuy In

addition severa system fieds are fied The numer I type and variaes of the diaog message

output y the caed transaction Cou need this information to output the message tet

copy SAP AG BC420 12-69

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 7088

030

983209 SAP AG 1999

Benerated Program of the TA Recorder

REFRES= (ESSTAB-

2A TRANSA2TION tcode USING bdcdata (ODE ctumode U)DATE cudate (ESSAGES INTO metab-OO) AT metab- ENDOO)-IF lubrc 34 AND e8rou 34 S)A2E- IF e8rouoenend - 2A FUN2TION BD2O)ENGROU) E)ORTING ---------

--------- E8rouoened - ENDIF- 2A FUN2TION BD2INSERT E)ORTING T2ODE tcode TABES D0N)ROTAB bdcdata-ENDIF-REFRES= bdcdata-

Message table output

pen error session

Insert data record that

has errors into error

session

If you have seected ca transaction on the seection screen the generated program runs as foo$s

The onine transaction is caed $ith ca transaction and passed to tae 2ATA A the

messages arising during the ca transaction are put in the interna tae 7SSTA

7SSTA is output as a ist

If you have specified an error session ( 73ltamp54P L SPA27) on the seection screen and the

ca transaction comes across an error (+3S4amp2 L 0) the error session is opened The error

session is ho$ever ony opened once Then the data record is paced in the session

A the other data records that have errors $ith ca transaction are paced in the same session

copy SAP AG BC420 12-70

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 7188

036

983209 SAP AG 1999

The Transaction Recorder

PrinciplesPrinciples

Recording )ith the LSMWRecording )ith the LSMW

Principles of atch Input and all TransactionPrinciples of atch Input and all Transaction

Integrating the TA Program into the DWIntegrating the TA Program into the DW

Using the TA Recorder Using the TA Recorder

copy SAP AG BC420 12-71

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 7288

03amp

983209 SAP AG 1999

Integrating into the DW

Transfer program

AAP Dictionar(

Integrate

SDA0

SDA6

SDAamp

SDA

Cou can integrate the generated program into the G9- The structure of the fie must e created

in the AAP ictionary The taes SGA0 SGA8 SGA1 and SGA $i e fied

copy SAP AG BC420 12-72

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 7388

03

983209 SAP AG 1999

DW Release 42

Goo

-B eeae 45

aa ran=er ogtec

Int customer data transfer ob-ect

ecord =ed

Dece daa ran=er

d Goo

The ampunction ampor interatin TA recorder prora$s is

i$ple$ented in the

D+-B in Release

The recorder can e integrated as of ampeease and it is provided in the G9- ampeease

ltot to the G9- ampeease 5n the initia screen you can integrate programs y choosing ampoto

( +nt customer ata transfer o-ect

copy SAP AG BC420 12-73

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 7488

034

983209 SAP AG 1999

reating Program as D b-ect

Comer ran=er ogtec

ampgtec ype

Sor eD =or ogtec

aa ran=er proram

Srcre name

9900

(+A1

Cane comer

ZBCA+G

ZB

ustomer transfer ob-ect

umber bet)een 7000 and 7777

b-ect t(pe

Assignment to R ob-ect

Short tet for D ob-ectShort description

Data transfer program

ame of generated program

Structure name

A structure Cstructure la(out )ith this name is created in

the AAP Dictionar(

For ampeease transfer oects $ere not organiDed y 5amp oects ut y a G numer (00089

OOOO) The numer range O0009OOOO is reserved for customers

To create a connection to the ne$ G 9- you must assign the program to a 5amp oect

2reate a short tet for the G oect This tet $i appear in the method seection ist

Specify the program to e incuded

Specify a name for the structure to e created in the AAP ictionary

Note $he generated program appears under program type +N and not under program type

-

copy SAP AG BC420 12-74

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 7588

032

983209 SAP AG 1999

Adantages

Automatic program registration in the DW in

Release 48

ou can use all the functions defined for

standard ob-ects

1ception$ The (reate ampile ith data

function

If you incuded the oect in the ampeease $orench it is automaticay avaiae in the ampeease

B $orench

A the $orench functions are avaiae for your oect ecept for Create files ith transfer ata

copy SAP AG BC420 12-75

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 7688

038

983209 SAP AG 1999

ou are no) able to$

The Transaction Recorder$ Unit Summar(

Use the recording function in the LSMW to create

a batch input session )ith the data from the

eternal s(stem

Use the TA Recorder to create (our o)n data

transfer program

Anal(e programs that )or+ )ith batch input or

call transaction

Integrate the TA Recorder programs into the

DW

copy SAP AG BC420 12-76

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 7788

ercise 1

nit $ -ecorder

$opic 2reating etors

$ransaction -ecorder ercise 1

bull 2reating detors $ith eterna numer assignment

bull etor numers M9980008 to M9980080

Address data for detors $ith eterna numer assignment is to

e transferred using program ampFI700

ro4ect F5

Supro4ect +5

-un +575

$as)s 85 95 8S25

9oad program -F+00

8 In the foo$ing eercises eisting data is to e changed Therefore these detors $ith

eterna numer assignment have to first e created

898 4nder suproect 79 create run 797G9 $ith the name Detors ith

eternal numers

copy SAP AG BC420 12-77

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 7888

891 2reate the foo$ing three tass The tass map the foo$ing process steps

convert data create + session and process + session

89198 In run 797G9 create the foo$ing tas

9 Tas AP9

9 Name 2onvert data 9 Tas type AP

9 Program type +S-

Seect the foo$ing +S- oect

+S- proect 2109

+S- suproect 7I9

+S- oect I997GT

89191 In run 797G9 create the foo$ing tas 9 Tas +5A9

9 Name 2reate I session

Tas type +5A

9 Program type INP

Seect program ampFI700 $ith the variant

I97G9

8919 In run 797G9 create the foo$ing tas

9 Tas S29

9 Name Process I session Tas type S2

9 Program type amp7P5

Seect program ampS2S4 $ith the variant

S497G9

Note that you have to correct the seuence of the tass 2onvert data

create + session and process + session

4se the uttons

89 Start the run

The detors $i e created $ith eterna numer assignments

89 2hec in transaction F0 that the detors M9980008 to M9980080 have een

created

copy SAP AG BC420 12-78

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 7988

ercise

nit $ransaction -ecorder

$opic -ecording function in the 9S8(

bull 2reate a recording using the +S-

bull ltenerate a atch input session

2hange the detor address data in the amp System

Name of the recording +

Name of the file +2055+F9

8 2reate the recording 7I3 using the +S- ampecord the transaction F01 (2hange

detor)

898 efore you create the recording first test the transaction onineQ

For the recording use detor M9980008 5n the initia screen of the F01

maintain the foo$ing fieds ony

etor etor M9980008

2ompany code 0008

Address data seect

Note $he data record must e saved hile recording

891 aintain the names and the descriptions for the foo$ing fieds

Name city street posta code and teephone numereete a other fieds in screen 880 from the recording (eg S5ampT+ +AN8

SPampAS)

4se the same technica names as sho$n in the tae eo$ (automatic fied

mapping)

copy SAP AG BC420 12-79

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 8088

1 2reate the suproect 7I9 and the ne$ oect TA3 in your proect 2109

aintain the oect attriutes and seect the item atch input recording Seect your

recording 7I3

2reate the source structure address

2reate the source fieds according to the tae eo$ 5r copy them from proect 2109S37N suproect 7I900 oect TA900

198 Fie setup The data from the egacy system are dispayed in the foo$ing tae

Fied name Fied type Fied ength escription

N5 2 8B etor numer

NA7 2 Name

STamp77T 2 Street

2ITC 2 2ityPace of residence

MIP 2 80 Posta code

T7+ 2 8B Teephone numer

191 aintain the fied mapping 4se the automatic fied mapping (via menu item

7tras)

19 Specify the fies 5ny maintain the fie name of the source fie

Name of the fie 21099IFI+7

2odepage 8800

19 Import the data and convert them ispay the data in each caseQ

19 2reate a atch input session

19B ampun the atch input session

copy SAP AG BC420 12-80

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 8188

ercise 3

nit $ransaction -ecorder

$opic -ecording ith the $ -ecorder

bull ltenerate a recording using the TA recorder

bull Test the recording

2hange the address data of detors in the amp system

Name recording $+

Name of the file +2055+F9

8 2reate the recording TA37I3 using the transaction recorder ampecord the

transaction F01 (change detor)

898 4se detor M9980008 for the recording 5n the F01 initia screen ony

maintain the foo$ing fieds

etor etor M9980008

2ompany 2ode 0008

Address data seect

Note $he data record must e saved hen recording

eete a fieds that do not eist in the source fie 21099IFI+7 from screen

880 in the recording (eg 6NA89S5ampT+ 6NA89+AN8 6ANNQ9SPampAS) Note o not deete fieds ampF01946ampS and ampF0190880

Save the recording no$

1 S$itch to the recordings overvie$

198 Process the recording $ith the processing mode A (dispay a)

191 Process the recording $ith the processing mode RN (no dispay)

19 If the recording has een tested and no error has occurred generate a I session

and run it using the I monitor If an error shoud occur generate the recordingagainQ

copy SAP AG BC420 12-81

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 8288

From the recording generate the program M21037I3 in your deveopment cass

2109 Seect the foo$ing

bull ampead fied contents from fie

bull 2reate test data in the fie 2103dei3test3tt

98 Save this program and eecute it ltenerate one I session each and process it

2arry out the same steps again using the ca transaction

The generated program shoud no$ e changed so that fie 21099IFI+7 can e

read and processed

98 2hange the defaut vaue of the fie name (parameter dataset) in 21099

IFI+7

91 2hange the structure definition eete the company code fied and the address

data checo from the structure

9 2hange the su9routine ca perform dc3fied for the company code (KampF019

46ampSK) so that the vaue 0008 is transferred

9 2hange the su9routine ca perform dc3fied for the address data checo

(KampF0190880K) so that the vaue G is transferred

9 Start the program again and read the data from the fie 21099IFI+7 $ith

detor data ltenerate a I session $ith it and run it

copy SAP AG BC420 12-82

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 8388

033 Include DR16INCLUDE BDCRECX1

SELECTION-SCREEN BEGIN OF LINE

PARAMETERS SESSION RADIOBUTTON GROUP CTU create sessi SELECTION-SCREEN COMMENT $amp TEXT-S FOR FIELD SESSION

se(ecti-scree )siti +

PARAMETERS CTU RADIOBUTTON GROUP CTU ca(( trasacti

SELECTION-SCREEN COMMENT $amp TEXT-S FOR FIELD CTU

SELECTION-SCREEN END OF LINE

SELECTION-SCREEN BEGIN OF LINE

SELECTION-SCREEN COMMENT $amp TEXT-S1 FOR FIELD GROUP

se(ecti-scree )siti $+

PARAMETERS GROUP1$amp r) ae 0 sessi

SELECTION-SCREEN COMMENT $amp TEXT-S+ FOR FIELD CTUMODE

se(ecti-scree )siti

PARAMETERS CTUMODE LIE CTU2PARAMS-DISMODE DEFAULT 3N3

A4 s56 a(( 78)rs

E4 s56 78)r errr (8

N4 7 t 7is)(a8 78)r

SELECTION-SCREEN END OF LINE

SELECTION-SCREEN BEGIN OF LINE

SELECTION-SCREEN COMMENT $amp TEXT-S$ FOR FIELD USER

se(ecti-scree )siti $+

PARAMETERS4 USER1$amp DEFAULT S9-UNAME ser 0r sessi i atc5

SELECTION-SCREEN COMMENT $amp TEXT-S FOR FIELD CUPDATE

se(ecti-scree )siti

PARAMETERS CUPDATE LIE CTU2PARAMS-UPDMODE DEFAULT 3L3

S4 s8c5rs(8

A4 as8c5rs(8

L4 (ca(

SELECTION-SCREEN END OF LINE

SELECTION-SCREEN BEGIN OF LINE

SELECTION-SCREEN COMMENT $amp TEXT-S FOR FIELD EEP

se(ecti-scree )siti $+

PARAMETERS4 EEP AS CltECBOX 3 3 = 7e(ete sessi i0 0iis5e7

3X3 = gtee) sessi i0 0iis5e7

SELECTION-SCREEN COMMENT $amp TEXT-S FOR FIELD E2GROUP

copy SAP AG BC420 12-83

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 8488

se(ecti-scree )siti

)araeters E2GROUP1$amp r) ae 0 errr-sessi

SELECTION-SCREEN END OF LINE

SELECTION-SCREEN BEGIN OF LINE

SELECTION-SCREEN COMMENT $amp TEXT-S FOR FIELD ltOLDDATE

se(ecti-scree )siti $+

PARAMETERS4 ltOLDDATE LIE S9-DATUM

SELECTION-SCREEN COMMENT +11amp TEXT-S$ FOR FIELD E2USER

se(ecti-scree )siti

PARAMETERS4 E2USER1$amp DEFAULT S9-UNAME ser 0r errr-sessi

SELECTION-SCREEN END OF LINE

SELECTION-SCREEN BEGIN OF LINE

SELECTION-SCREEN COMMENT +11amp TEXT-S FOR FIELD E2EEP

se(ecti-scree )siti

PARAMETERS4 E2EEP AS CltECBOX 3 3 = 7e(ete sessi i0 0iis5e7

3X3 = gtee) sessi i0 0iis5e7

SELECTION-SCREEN END OF LINE

SELECTION-SCREEN BEGIN OF LINE

SELECTION-SCREEN COMMENT +11amp TEXT-S FOR FIELD E2ltDATE

se(ecti-scree )siti

PARAMETERS4 E2ltDATE LIE S9-DATUM

SELECTION-SCREEN END OF LINE

SELECTION-SCREEN SIP

SELECTION-SCREEN BEGIN OF LINE

SELECTION-SCREEN COMMENT 1amp TEXT-S1 FOR FIELD NODATA

PARAMETERS4 NODATA DEFAULT 33 LOER CASE 7ata

SELECTION-SCREEN END OF LINE

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

Batc5i)t7ata 0 si(e trasacti

DATA4 BDCDATA LIE BDCDATA OCCURS ITlt ltEADER LINE

essaes 0 ca(( trasacti

DATA4 MESSTAB LIE BDCMSGCOLL OCCURS ITlt ltEADER LINE

errr sessi )ee7 3 3 r 3X3amp

DATA4 E2GROUP2OPENED

essae tets

TABLES4 T1

copy SAP AG BC420 12-84

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 8588

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

at se(ecti scree

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

AT SELECTION-SCREEN

r) a7 ser st e 0i((e7 0r create sessi

IF SESSION = 3X3 AND

GROUP = SPACE OR USER = SPACE

MESSAGE E1MSamp

ENDIF

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

)e 7ataset

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

FORM OPEN2DATASET USING P2DATASET

OPEN DATASET P2DATASET IN TEXT MODE

IF S9-SUBRC

RITE4 TEXT-E S9-SUBRC

STOP

ENDIF

ENDFORM

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

c(se 7ataset

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

FORM CLOSE2DATASET USING P2DATASET

CLOSE DATASET P2DATASET

ENDFORM

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

create atc5i)t sessi

t 0r ca(( trasacti siamp

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

FORM OPEN2GROUP

IF SESSION = 3X3

SIP

RITE4 $amp 3Create r)3I1amp GROUP

SIP

)e atc5i)t r)

CALL FUNCTION 3BDC2OPEN2GROUP3

EXPORTING CLIENT = S9-MANDT

copy SAP AG BC420 12-85

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 8688

GROUP = GROUP

USER = USER

EEP = EEP

ltOLDDATE = ltOLDDATE

RITE4 amp 3BDC2OPEN2GROUP3I$amp

1$amp 3retrc7e43I+amp

S9-SUBRC

ENDIF

ENDFORM

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

e7 atc5i)t sessi

ca(( trasacti si4 errr sessiamp

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

FORM CLOSE2GROUP

IF SESSION = 3X3

c(se atc5i)t r)

CALL FUNCTION 3BDC2CLOSE2GROUP3

RITE4 amp 3BDC2CLOSE2GROUP3Iamp

1$amp 3retrc7e43I+amp

S9-SUBRC

ELSE

IF E2GROUP2OPENED = 3X3

CALL FUNCTION 3BDC2CLOSE2GROUP3

RITE4

RITE4 amp 3Fe5(era))e 6r7e eret3Iamp

ENDIF

ENDIF

ENDFORM

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

Start e6 trasacti accr7i t )araeters

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

FORM BDC2TRANSACTION USING TCODE

DATA4 L2MSTRINGamp

DATA4 L2SUBRC LIE S9-SUBRC

atc5 i)t sessi

IF SESSION = 3X3

CALL FUNCTION 3BDC2INSERT3

EXPORTING TCODE = TCODE

TABLES D9NPROTAB = BDCDATA

RITE4 3BDC2INSERT3Iamp

copy SAP AG BC420 12-86

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 8788

TCODE

3retrc7e43I+amp

S9-SUBRC

3RECORD43

S9-INDEX

ca(( trasacti si

ELSE

REFRESlt MESSTAB

CALL TRANSACTION TCODE USING BDCDATA

MODE CTUMODE

UPDATE CUPDATE

MESSAGES INTO MESSTAB

L2SUBRC = S9-SUBRC

RITE4 3CALL2TRANSACTION3

TCODE

3retrc7e43I+amp

L2SUBRC

3RECORD43

S9-INDEX

LOOP AT MESSTAB

SELECT SINGLE FROM T1 ltERE SPRSL = MESSTAB-MSGSPRA

AND ARBGB = MESSTAB-MSGID

AND MSGNR = MESSTAB-MSGNR

IF S9-SUBRC =

L2MSTRING = T1-TEXT

IF L2MSTRING CS 313

REPLACE 313 ITlt MESSTAB-MSGH1 INTO L2MSTRING

REPLACE 3$3 ITlt MESSTAB-MSGH$ INTO L2MSTRING

REPLACE 33 ITlt MESSTAB-MSGH INTO L2MSTRING

REPLACE 33 ITlt MESSTAB-MSGH INTO L2MSTRING

ELSE

REPLACE 33 ITlt MESSTAB-MSGH1 INTO L2MSTRING

REPLACE 33 ITlt MESSTAB-MSGH$ INTO L2MSTRING

REPLACE 33 ITlt MESSTAB-MSGH INTO L2MSTRING

REPLACE 33 ITlt MESSTAB-MSGH INTO L2MSTRING

ENDIF

CONDENSE L2MSTRING

RITE4 MESSTAB-MSGT9P L2MSTRING$+amp

ELSE

RITE4 MESSTAB

ENDIF

ENDLOOP

copy SAP AG BC420 12-87

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 8888

SIP

Eree 0e5(era))e

IF L2SUBRC AND E2GROUP SPACE

IF E2GROUP2OPENED = 3 3

CALL FUNCTION 3BDC2OPEN2GROUP3

EXPORTING CLIENT = S9-MANDT

GROUP = E2GROUP

USER = E2USER

EEP = E2EEP

ltOLDDATE = E2ltDATE

E2GROUP2OPENED = 3X3

ENDIF

CALL FUNCTION 3BDC2INSERT3

EXPORTING TCODE = TCODE

TABLES D9NPROTAB = BDCDATA

ENDIF

ENDIF

REFRESlt BDCDATA

ENDFORM

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

Start e6 scree

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

FORM BDC2D9NPRO USING PROGRAM D9NPRO

CLEAR BDCDATA

BDCDATA-PROGRAM = PROGRAM

BDCDATA-D9NPRO = D9NPRO

BDCDATA-D9NBEGIN = 3X3

APPEND BDCDATA

ENDFORM

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

Isert 0ie(7

Page 8: BC420_46C - 012The Transaction Recorder

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 888

05

983209 SAP AG 1999

hanging ustomer Data$ Initial Screen

Vendor

Company code

Z-88-10000

Screen

106

Genera daa9ield ontents

BCC$Samp $SZAVBCamp(Camp )00

02-($++ -88-10000

02-0110

02-0130

$SZAV

9ield ame

Transaction 9D0amp

Addre

In the aove eampe the transaction Change customer F01 is recorded

In addition to the screen fieds the fieds 2324ampS5amp and 2356257 are aso

automaticay recorded

Note

You must change the field values for all the fields required later for the transfer For the

recording a change can simply mean overriting one single character in a field ith the

same character

f fields are to e filled using S$amp$ parameters the value must also e changed

(ith online transactions screen sequences may appear that are different than in therecording

copy SAP AG BC420 12-8

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 988

07

983209 SAP AG 1999

hanging ustomer Data$ Address

ustomer 5560000

+ame

Searc erm

Addre

Screen

111

9ield ontents

BCamp(Camp $PABCS$BSC SAPSZA1 0300ASS

BCS$BSC SAPSZA1 0301Camp$

BCC$Samp A1AA-amp$S+$1

A1AA-S Garden Sree

A1AA-amp$S+$1 02105

9ield ame

If there is a suscreen on the screens this is automaticay recorded In the recording the fied

23S4S2amp77N containing the name of the suscreen appears

-ith customer master data the address is a suscreen area The centra address management is

integrated here A the address input fieds are dispayed on one suscreen

2entra address management is ony used if you specificay seect this option on the initia screen

copy SAP AG BC420 12-9

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 1088

060

983209 SAP AG 1999

Results of the Recording

Recording

SAPM90ampD 0608

DltURSR R90ampD=UR

Dlt=D1 gt00

R90ampD=UR 5560000

R90ampDD0660

US1ltA

SAPM90ampD 0666

Dlt=D1 UPDA

DltSUSR SAPLSA6 000ADDR1SS DltSUSR SAPLSA6 006UTRltSR11

DltURSR SA6ltD0600T1LltUM1R

ADDR6ltDATASTR11T 4 Barden Street

ADDR6ltDATAPSTltD1 0amp602

ADDR6ltDATAIT6 oston

SA6ltD0600T1LltUM1 8638257755

The resut of the recording is a ist of a the fieds and fied vaues that $ere changed in the

recording

copy SAP AG BC420 12-10

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 1188

066

983209 SAP AG 1999

Special Recording 9ields

9unction code triggered on

this screen

9ield name )here cursor

)as last positioned on the

screen

Comer

Company code

Z-88-10000

Genera daa

Dlt=D1

DltURSR

uring a recording the foo$ing additiona fieds are automaticay recorded

The BDC_OKCODE fied contains the function code triggered on the screen

The BDC_CURSOR fied contains the fied name of the ast fied the cursor $as positioned in

efore eiting the screen

copy SAP AG BC420 12-11

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 1288

06amp

983209 SAP AG 1999

Determining the 9ield ame

Technical info

Screen field

R90ampD =UR

Comer

Company code

Z-88-10000

Genera daa

96help

Sa

Program SAPM90ampDScreen number 608

The information recorded in the TA recorder can aso e dispayed onine for each transaction

To find out the current modue poo name and the screen numer choose Systemrarr Status from the

menu

To determine the fied name pace the cursor on a fied and seect F8 hep The name of the screen

fied can e found under technical information

copy SAP AG BC420 12-12

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 1388

06

983209 SAP AG 1999

Subscreens

Comer Z-88-10000

+ame

+ame

ADDR6ltDATAAM16

DltSUSR

Information$

ode poo name

Screen nmer

Screen name

Some screens contain suscreen areas

To determine the fied name pace the cursor on the fied and choose F1 The name of the screen

fied is specified under Technical info

copy SAP AG BC420 12-13

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 1488

064

983209 SAP AG 2001

Tabstrips

$er Roberts

1ample$ User Profile Defaults

Sar men +

oon anae

ampp dece Pr1

ParameerDefaults

DltSUSR

USD19AULTSSPLD

The tastrip eement sho$n is used on the aintain User rofile (5$n data) screen

4nder the tastrip tite Defaults the user can set various vaues such as the defaut printer

The user profie are user9dependent settings (as the name impies)

copy SAP AG BC420 12-14

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 1588

062

983209 SAP AG 1999

Step Loops and Table ontrols

1ample$ an+ Details

Comer

ntr( an+ +e( Account

08154711

123456789

Z-00-12345

an+ Details

00708155546344536

Banlt daa

==A=C06)

==A=C0amp)

Step oops and tae contros are treated identicay for the recording

The fied names of the fieds isted are the same for every ro$

7ach ro$ contains a customers an detais The fieds must e accessed using an inde (this is

specified as an addition to the fied name for eampe 6N69AN6N(1) The inde must match

the ro$ numer

5ny the visie fieds on a screen can e fied $ith data If some fieds are ony visie after paging

the paging must e recorded as $e This means that for the recording you must eecute a the steps

in the onine transaction

For eampe age on $oud e eecuted using the function code 1 (Paging icons)

Paging to the end of a ist 1Page up 11

lto to first page 18

copy SAP AG BC420 12-15

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 1688

068

983209 SAP AG 2001

Recording Buidelines

Test the transaction before recording

Start the recording

hange field alues onl( for fields

releant to the recording

As of 48 all filled fields are recorded

Transaction must be properl( eitedCSA1

Use of scroll bars cannot be recorded

Specia recording notes

F8 F and your o$n F8 and F hep (Pamp527SS 5N =7+P9amp7gt47ST Pamp527SS 5N A+479

amp7gt47ST) are not recorded This aso appies to a commands under the System and $el

menus aues for defaut variants ( transaction variants) are not incuded

7rror and $arning diaogs are not recorded 5ny the 56 code and the fied contents reuired for

further processing on the current screen are recorded

Note uring recording the data entered is $ritten to the dataase

copy SAP AG BC420 12-16

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 1788

063

983209 SAP AG 2001

1n-o( SAP ontrols and Data Transfer

bull SAP Picture ontrolbull SAP ETML ie)er ontrol

bull SAP Tet 1dit ontrol

bull AL Brid ontrol

bull SAP Tree ontrol

bull

ranch 6

ranch amp

Root

These and other controls do not support batch input$

Root

ranch amp

ranch amp6

The ne$ 7noy SAP contros deveoped for ampeease B do not support atch input or ca

transaction

=o$ever tae contros and tastrips do support atch input

copy SAP AG BC420 12-17

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 1888

065

983209 SAP AG 1999

The Transaction Recorder

PrinciplesPrinciples

Recording )ith the LSMWRecording )ith the LSMW

Principles of atch Input and all TransactionPrinciples of atch Input and all Transaction

Integrating the TA Program into the DWIntegrating the TA Program into the DW

Using the TA Recorder Using the TA Recorder

copy SAP AG BC420 12-18

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 1988

067

983209 SAP AG 1999

Session

generator

Recording Using the LSMW

-ith the +S- you can create your o$n recordings

The +S- uses the standard TA recorder here yet evauates the recording itsef The information

from the recording is used to create atch input sessions

The created atch input session can e processed as usua $ith the atch input monitor

Note As $ith the standard procedure it is euay important that the data is converted

copy SAP AG BC420 12-19

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 2088

0amp0

983209 SAP AG 1999

reating Recording

Admnraon

ecordn

Goo

ame of recording

Description

)ner

ame of transaction

Start recording

lto into the +S- and seect the menu path ampoto (Recorings An overvie$ of a previousy

created recordings for your proect are dispayed To start a ne$ recording seect Create

To create a recording you must define the name the description and the o$ner

7nter the name of the transaction you $ant to record

7ecute the transaction and compete it propery

Note ampecordings are assigned to ony one proect 9 so the name of the recording must e uniue

copy SAP AG BC420 12-20

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 2188

0amp6

983209 SAP AG 1999

hanging ustomer Data$ Initial Screen

9ield ontents

BCC$Samp $SZAV

BCamp(Camp )00

02-($++ -88-10000

02-0110

02-0130

$SZAV

9ield ame

Comer

Company code

Z-88-10000

Genera daa

Comer Z-88-10000

+ame

9ield ontents

BCamp(Camp $PA

BCS$BSC SAPSZA1 0300ASS

BCS$BSC SAPSZA1 0301Camp$

BCC$Samp SZA10100-+$B

A1AA-S Garden Sree

A1AA-amp$S+$1 34

A1AA-PampSCamp1 02105

9ield ame

Screen

111

Screen

106

In the aove eampe the transaction Change customer F01 is recorded

Note

You must ma)e some modification to the field values for all the fields you ant to capture

for the data transfer For the purposes of recording a change can simply mean overriting

one single character in a field ith the same character

ven if fields are to e filled using S$amp$ parameters the values must still e changed on

the screen in order to capture them

(ith online transactions screen sequences may appear that are different than in the

recording

copy SAP AG BC420 12-21

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 2288

0ampamp

983209 SAP AG 1999

Results

RecordingRecording R1lt6 Demolt6

9D0amp hange customer Caccounting

SAPM90ampD 0608

DltURSR R90ampD=UR

Dlt=D1 gt00

R90ampD=UR 5560000

R90ampDD0660

US1ltA

SAPM90ampD 0666

Dlt=D1 UPDA

DltSUSR SAPLSA6

DltSUSR SAPLSA6

DltURSR SA6ltD0600T1LltUM1

ADDR6ltDATASTR11T 4 Barden Street

ADDR6ltDATAPSTltD1 0amp602

ADDR6ltDATAIT6 oston

SA6ltD0600T1LltUM1 8638257755

The resuts of the recording using the +S- are dispayed in a tree structure

After the recording has finished you can edit it Cou can deete fieds or add ne$ ones

copy SAP AG BC420 12-22

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 2388

0amp

983209 SAP AG 1999

Assigning 9ield ames

Recording R16 Demolt6

Dlt=D1 UPDA

DltSUSR SAPLSA6

DltSUSR SAPLSA6

DltURSR SA6ltD0600T1L

ADDR6ltDATAAM16 Lisa Eofmeister

ADDR6ltDATAPSTltD1 0amp602

ADDR6ltDATAIT6 oston

ame

+ame

ecrpon

e=a ae

A1AA-+A1

A1AA-+A1

Comer name

a o=meer

Screen =ed

ustomer name

double clic+

Cou can assign names for each recorded fied The specia fieds (2356257 2324ampS5amp

and 23S4S2amp77N) are not incuded here Cou can choose the fied names -hen the atch

input session is created the contents of these fieds are assigned to the target fieds specified in the

eft coumn

Functions

efaut Assigns to the fied names of the underying target fied and its fied description

ampeset eetes fied name and fied description

oue cic 7dits fied name fied description and defaut vaue

Note Cou can use fied names more than once =o$ever the fied name is ony avaiae once in thefied mapping For this reason it is not practica to use fied names more than once

For a those fieds for $hich you do not assign a name the defaut vaue is used $hen the atch

input session is created These defaut vaues can e seen as constants This is especiay usefu for

chec oes (for eampe 08 vie$ seection)

The +S- supports automatic fied mapping Source fieds and target fieds can e assigned to each

other automaticay The fieds are assigned to the corresponding fieds of the same name Therefore

the fied names of the source structure shoud e given the same or simiar names as the fied names

in the target structure

copy SAP AG BC420 12-23

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 2488

0amp4

983209 SAP AG 2001

Addinggtremoing screen fields

Repeating recording

9or identical field names the name and description are

assigned automaticall(

1diting Recording

02-($++

(+A1-A+

(+A1-+A1

(+A1-Samp

(+A1-+A2

(+A1-SAS

Comer accon nmer

e

+ame 1

Sor =ed

+ame 2

Sree

Selection of all

aailable screen

fields

Cou can ater add ne$ screen fieds if you need to 6eep in mind that fieds shoud ony e added in

paces $here they are aso provided on the screen other$ise you $i get an error $hen the I

session is processed

After saving you $i get the message The data has een saved successfuy No$ the recordings

are avaiae for the oect attriutes

If you repeat the recording you can record a ne$ screen seuence $ith ne$ fieds Provided that the

fied names (eg 6NA89NA78) are identica the names and descriptions are automaticay

assigned

copy SAP AG BC420 12-24

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 2588

0amp2

983209 SAP AG 1999

b-ect T(pe and Import Method$ Recording

Standard atch Input gt Direct Input

atch Input Recording

API

IDoc

ampgtec ype ) mpor meod

Bac np recordn

ecordn ec1

The recording is no$ avaiae $ith the oect attriutes

Net you create a proect or su9proect in the +S- and specify process the data transfer

Cou eecute the data transfer as in the standard system

efine the source fieds and structures

efine the fied mapping

ampead and convert the data

2reate and import a atch input session

copy SAP AG BC420 12-25

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 2688

0amp8

983209 SAP AG 1999

The Transaction Recorder

PrinciplesPrinciples

Recording )ith the LSMWRecording )ith the LSMW

Principles of atch Input and all TransactionPrinciples of atch Input and all Transaction

Integrating the TA Program into the DWIntegrating the TA Program into the DW

Using the TA Recorder Using the TA Recorder

copy SAP AG BC420 12-26

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 2788

0amp3

983209 SAP AG 1999

Transaction Recorder

Online

Transaction

RecordingTransfer Program

T

Included in the Batch Input Monitor

Cou use the transaction recorder to record transactions and then use the transaction recording to

generate a transfer program The program ao$s you to transfer data using either atch input or ca

transaction

copy SAP AG BC420 12-27

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 2888

0amp5

983209 SAP AG 1999

hanging ustomer Data$ Initial Screen

9ield ontents

BCC$Samp $SZAV

BCamp(Camp )00

02-($++ Z-88-10000

02-0110

02-0130

$SZAV

9ield ame

Comer

Company code

Z-88-10000

Genera daa

Comer Z-88-10000

+ame

9ield ontents

BCamp(Camp $PA

BCS$BSC SAPSZA1 0300ASS

BCS$BSC SAPSZA1 0301Camp$

BCC$Samp SZA10100-+$B

A1AA-S Garden Sree

A1AA-amp$S+$1 34

A1AA-PampSCamp1 02105

9ield ame

Screen

111

Screen

106

In the aove eampe the transaction Change customer F01 is recorded

copy SAP AG BC420 12-28

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 2988

0amp7

983209 SAP AG 2001

hange Debitor$ Pa(ment Transactions C6

Banlt dea

Screen

10

9ield ontent

BCC$Samp (+B(-BA+(+01

BCamp(Camp BA+((+B(-BA+(S01

(+B(-BA+(01 12345679

(+B(-BA+(+01 22222222

Debitor 5560000

9ield ame

Inde

copy SAP AG BC420 12-29

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 3088

00

983209 SAP AG 1999

hanging ustomer Data$ Pa(ment Transactions Camp

Addre

an+ countr( US

an+ code 6amp42837

Banlt dea

ustomer 5560000

9ield ontents9ield ame

BCC$Samp (+A1-(+ZA

BCamp(Camp $PA

(+B(-Z01

Screen

10

Screen

100

SAPLBA

9ield ontents

BCC$Samp B+(A-BA+(A

BCamp(Camp +

B+(A-BA+(A +aona Banlt

9ield ame

In different transactions the modue poo may change This is the case $ith for eampe customer

master data The TA recorder records modue poo changes automaticay

copy SAP AG BC420 12-30

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 3188

06

983209 SAP AG 1999

Eierarch( Displa( of the Recording

02amp

02

SAP02 0106

BCC$Samp 02-0130

BCamp(Camp )00

02-($++ -88-10000

02-0110

02-0130

SAP02 0111

BCamp(Camp V

BCC$Samp A1AA-amp$S+$1

A1AA-S Garden Sree

Recording

-ith the TA recorder the resuts are aso a ist in a hierarchy dispay =o$ever you cannot assign

your o$n fied names as you can in the +S-

copy SAP AG BC420 12-31

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 3288

0amp

983209 SAP AG 1999

Recording erie)

Recording

Transfer program

9unction module

ontains onl( the data

from the recording

Test data

Test

reate

reate

reate

reate

1dit hange recording

Process recording

Cou can edit the recording as needed

The recording can e tested and eecuted again The screens are run through in the same $ay as in

the recording

The recording can then e used to create

atch input sessions

Test data

ata transfer programs $ith atch input or ca transaction

Function modues

copy SAP AG BC420 12-32

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 3388

0

983209 SAP AG 1999

1 02 BS

2 SAP02 106

3 BCC$Samp $SZAV

4 BCamp(Camp )00 5 02-($++ -88-10000

6 02-0110

7 02-0130

8 $SZAV

9 SAP02 111

10 BCamp(Camp V

11 BCC$Samp A1AA-amp$S+$1

12 A1AA-S Garden Sree

Program Screen St 9ield ame 9ield alue

Recording 1ditor

Recording

Add gt delete lines 9ormat chec+

Import gt eport of recording

In the editor you can add or deete ines Cou can aso change the contents of individua ines

-ith the function Chec) you can specify $hether the edited version of the recording sti has the

correct synta

Cou can aso eport import recordings to from a seuentia fie

After editing save the recording changes

copy SAP AG BC420 12-33

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 3488

04

983209 SAP AG 1999

Recording Seeral Transaction Runs

RecordingF

Directl( after the first recordingG or

In the displa( mode of the recording

In this step you can record additiona transactions and add additiona transaction runs to the

recording

Cou can record the additiona transactions directy after a recording or in the edit screen of a

recording

copy SAP AG BC420 12-34

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 3588

02

983209 SAP AG 1999

1ditor$ Importing and 1porting Recordings

6 T 9D0amp S

amp SAPM90ampD 608

DltURSR

4

2

8 SAPM90ampD 666

60

66

Program Screen St 9ield name 9ield alue

cempA

e name

aa =orma

cemp

A

e name

aa =orma

1port

Import

Presentation Serer

If the editor functions in the systems do not provide a the functions you need you can do$noad the

recording to your presentation server using the Eort function and then edit the recording using a

P2 editor

Cou use the Import function to import the data ac into the amp System ae sure the fie is sti in

the correct format

copy SAP AG BC420 12-35

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 3688

08

983209 SAP AG 1999

Processing the Recording

Recording

Process )ith ALL TRASATI

Parameer

Proce mode$pdae mode

CA mode

e=a e

Con a=er comm

+o a B eon

nd +o a B mode

A

A

T

The recording can e eecuted directy The data from the recording is used and the transaction is

processed $ith ca transaction

2a transaction provides a range of options for caing appication transactions $hich are discussed

on the foo$ing t$o pages

copy SAP AG BC420 12-36

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 3788

03

983209 SAP AG 1999

Process mode

Update mode

ATT mode

Processing Recording )ith T 6

A

1

Displa( all screens

Displa( errors onl(

o displa(

L

S

A

Local

S(nchronous

As(nchronous

A

o ATT

ATT )ithout indiidual screen control

ATT )ith indiidual screen control

Processing mode

=ere you can specify the processing mode 9 it is the same as the processing mode for atch input

4pdate mode

=ere you can specify the update mode For more information see the unit ca transaction

2ATT mode

=ere you can mae specia settings if you $ant to test the recording under 2ATT conditions (ony

necessary for 2ATT runs) Specia functions are caed in the 2ATT too for each screen at the end of

P5 and at the start of PAI

copy SAP AG BC420 12-37

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 3888

05

983209 SAP AG 1999

Default sie

ont after commit

ot a I session

1nd$ ot a I mode

Processing Recording )ith T amp

The screen standard sie is used for the

processing

ommit )or+ does not end the processing

o I mode is actie The transaction )ill run

through as in online

I mode is selected nce the data in the D

table is processedG the I mode is set to inactie

Standard siDe

If you seect this the screens are processed in the standard siDe in the foreground (in foreground or

dispay errors ony) Note the standard siDe is a$ays used for acground processing

Further after commit

The first commit $or in a transaction does not ead to the end of the recording

Note A atch input transaction is ended $ith the first commit $or

No I mode

The system fied SC9INPT is not set (SC9INPT E ) So transactions are run through as in onine

7nd No I mode

5ny use if you choose the processing mode 7 (dispay errors ony) Then the transaction is processed in the acground in atch input mode and if there is an error the screens run through in

the foreground

copy SAP AG BC420 12-38

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 3988

07

983209 SAP AG 1999

I Mode

atch input

mode

nline

Some transactions behae differentl( in batch input mode

than in online Cbatch input capabilit(

atch input mode sets the s(stem field SIPT H

Not every transaction can run the same onine and in atch input mode The transaction must decide

itsef $hether it is caed onine or in atch input mode

The system sets the system fied SC9INPT E G if the atch input mode is active (this aso appies

to ca transaction) From this system fied the transaction can identify $hether to run onine or in

atch input mode

copy SAP AG BC420 12-39

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 4088

040

983209 SAP AG 1999

reating a Session 9rom the Recording

Recordingnl( contains the data

from the recording

Seon name 02amp

Aoraon ampBS(eep eon

oclt dae 10102000

Cou can create a atch input session directy from the recording that you can then process using the

atch input monitor

copy SAP AG BC420 12-40

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 4188

046

983209 SAP AG 1999

reating Test Data

Test Data

Recording

ranranpBC420AAe name

The file onl( contains the data from the recording

Rgt

Application Serer

Structure

Cou can create a fie from the recordingH the fie $i contain a the fieds from the recording The

fieds are added to the fie $ith the ength you specified in the definition

The fied order corresponds to the order in the recording overvie$ Technica fieds

(2356257 2324ampS5amp and so on) are incuded

The data can ony e stored on the appication server If you do not specify a path the fie is stored in

the $or directory of the appication server

If the specified test fie aready eists the ne$ data record is added to this fie

copy SAP AG BC420 12-41

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 4288

04amp

983209 SAP AG 1999

ed conen

reating a Program

Recording

ZBC420ampProram name

Transfer Program

e daa

ead =rom =e

ran=er =rom recordn

reate

9ile nameTest data

ranranpBC420AA

Cou can generate a program from the recording

In the foo$ing diaog o enter a program name In addition you can choose the type and method

for fiing the maintained fied contents from the recorded screens

4se the vaues used for the recording If you reuire feie data transfer you $i have to modify

this program ater

ParameteriDe the input vaues and read these vaues from a fie A data structure is created for

parameteriDationH the data records are read from an eterna fie into this data structure The

program assumes the fie $as taiored to this data structure

If you have decided to parameteriDe the input vaues you shoud aso create a test fie during

generation To do this seect the checo and enter a name for the fie

The attriute maintenance screen of the AAP editor appears aintain the attriutes and save the

program

copy SAP AG BC420 12-42

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 4388

04

983209 SAP AG 1999

Program 9unctions

Online

transaction

Transfer program

To

error

1rror

ption 6ption ampFlat SAP

structure

Monitor

Cou have no$ generated a data transfer program for importing data into the amp System The

program can eecute the data transfer using atch input or ca transaction

If you choose option 1 and there is an error the data record is paced into a atch input session

copy SAP AG BC420 12-43

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 4488

044

983209 SAP AG 1999

Benerating 9unction Modules

Recording

Zcreaedeor ncon mode

ncon rop

Sor eD

ZBC420

Creae comer

9unction module

nl( one data record can be processed at a time

In the net diaog o you can generate a function modue a function group and short tet from the

recording The function modue is automaticay created in the function group

copy SAP AG BC420 12-44

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 4588

042

983209 SAP AG 1999

9unction of 9unction Modules

Online

transaction

To

error

1rror

ption 6 ption amp

9unction module

Import

Parameter 1port

parameter

Tables

M1SSTA

Monitor

S$BC

Import interface

The import interface consists of a technica part and the fieds from the recording (A parameter is

created for each input fied of the recorded transactions)

7port interface

Simpy consists of the parameter S4amp2 The function modue $i return a vaue in the system

fied SC9S4amp2 after caing ca transaction This return vaue is set to Dero if the data record has

een correcty processed (5ny appies to 2T)

If a session is created you $i e notified $hether the data record coud e paced into the session

Tae interfaceThis is used ony if the function modue $ors $ith ca transaction The tae contains a the

system messages

copy SAP AG BC420 12-45

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 4688

048

983209 SAP AG 1999

Import Interface of 9unction Module

$

Technical

fields

Data

fields

BI session or CALL TRANSACTION

Processin $ode

pdate $ode

a$e oamp BI session iamp (T initial)

Bacround user iamp (T initial)

Delete session aampter processin

Loc date oamp session

ODATA indicator

TU

MD1

UPDAT1

BRUP

US1R

=11P

ELDDAT1

DATA

Cou can use parameter 2T4 to specify $hether the function modue creates a atch input session

(2T4 E ) or updates the data record directy using ca transaction (2T4 E G)

The other parameters are fied as for a atch input session header

Note 7very time the function modue is caed a atch input session is created

If the session is to contain severa transactions proceed as foo$s

ltenerate the transaction severa times This can e achieved y recording the transaction again The

function modue interface $i then contain more than one transaction -hen the function modue is

caed severa transactions can e generated for each session

copy SAP AG BC420 12-46

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 4788

043

983209 SAP AG 1999

The Transaction Recorder

PrinciplesPrinciples

Recording )ith the LSMWRecording )ith the LSMW

Principles of atch Input and all TransactionPrinciples of atch Input and all Transaction

Integrating the TA Program into the DWIntegrating the TA Program into the DW

Using the TA Recorder Using the TA Recorder

copy SAP AG BC420 12-47

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 4888

045

983209 SAP AG 1999

Benerated Program

9unction modules DltP1ltBRUP

DltIS1RT

DltLS1ltBRUP

AAP Program

Define structure of

data in seJuential

fileDefine D

table

pen seJuential file

pen I session

Read data recordCseJuential file

9ill D table

9ill I session gtALL TRASATI

Last data record K

lose I session

lose seJuential file

The generated program has the structure dispayed aove It uses the standard function modues for

creating atch input sessions

copy SAP AG BC420 12-48

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 4988

047

983209 SAP AG 1999

Structure of the Benerated Program

Benerated part

Define D

table

pen seJuential file

pen I session

Read data record

9ill D table

9ill I session gtALL TRASATI

Last data recordK

lose I session

lose seJuential file

Include DR16

Define filestructure

P1ltDATAS1T

P1ltBRUP

DltDPR

Dlt9I1LD

DltTRASATI

LS1ltBRUP

LS1ltDATAS1T

The generated program consists of t$o parts 9 a generated part and the incude 2amp72G8 The

incude is provided in the standard system

The incude contains the definition of the reuired 2 tae and a further seven suroutines These

suroutines eecute the foo$ing functions

5pen and cose fie

5pen and cose session

Fi 2 tae

Fi session

The generated part is the main program and cas the reevant suroutines A structure is aso

generated in the generated part to read the eterna data into the fie

See the Appendi for more information on the 2amp72G8 program

copy SAP AG BC420 12-49

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 5088

020

983209 SAP AG 1999

Structure of D Table

PRBRAM DPR D1BI 9AM 9ALPRBRAMPRBRAM DPRDPR D1BID1BI 9AM9AM 9AL9AL

SAPM90ampD 0602

R90ampD=UR 600000

R90ampDU=RS 0006

R90ampD=T=D =UA

SAPM90ampD 0660

=A6AM16 Smith

=A6PSTL 87000

=A6LAD6 US

=A6SPRAS 1

SAPM90ampD 06amp0

=A6ST1B US6amp428357DDATA

PRBRAM

DPR

D1BI

9AM

9AL

EAR

UM

EAR

EAR

EAR

40

4

6

6amp

6amp

D Module pool

D Screen number

D Start of screen

D 9ield name

D 9ield contents

9ield ame T(pe Length Short Tet

AAP Dictionar(

The 2 tae has the same structure as in a standard transfer

copy SAP AG BC420 12-50

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 5188

026

983209 SAP AG 1999

Read Structure

Recording

DATA BEGIN OF record data element BUKRS bukr$amp data element KTOKD ktokd$amp data element NA(EG) name$+amp data element SORT ortl$ampEND OF record-

record

Automaticall( generated

from recording

The structure of the fie is automaticay generated and is a$ays defined $ith the name amp725amp

The generated structure a$ays has the same ayout 7ach fied is defined y t$o generated ro$s

The first ro$ is a$ays a comment ro$ containing the tet J data eement and the data eement of

the screen fied from the recording In the net ro$ the fied itsef is defined $ith the name of the

data eement foo$ed y a three9digit position numer $hich specifies the ocation in the structure

The ength of the fied is set y the ength of the data eement If a fied is not defined through a data

eement the system uses the ength of the screen fied

copy SAP AG BC420 12-51

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 5288

02amp

983209 SAP AG 1999

pening and losing the 9ile

P1ltDATAS1T

LS1ltDATAS1T

FOR( oendataet USING dataet-O)EN DATASET dataet IN TET (ODE-

IF S01SUBR2 34 - 5RITE 6 te7t1e S01SUBR2-STO)-

ENDIF-

ENDFOR(-

FOR( cloedataet USING dataet-2OSE DATASET dataet-

ENDFOR(-

Include

DR16

The suroutine 5P7N3ATAS7T opens the seuentia fie

The suroutine 2+5S73ATAS7T coses the seuentia fie

copy SAP AG BC420 12-52

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 5388

02

983209 SAP AG 1999

9unction Modules for I Program

lient

Session name

Eold date

=eep session

D user name

RecordK

LI1T

BRUP

ELDDAT1

=11P

US1R

R1RD

DltP1ltBRUPDltP1ltBRUP

Transaction code

D table

TD1

DPRTA

DltIS1RTDltIS1RT

DltLS1ltBRUPDltLS1ltBRUP

pen Isessionpen Isession

Insert data for

transactions

Insert data for

transactions

lose I

session

lose I

session

The foo$ing function modues are provided for creating atch input sessions (function group

S2)

235P7N3ltamp54P

2reates a ne$ session and contains genera data for the $hoe session

23INS7ampT

Inserts a the data for a transaction into the session The transferred interna tae $ith the

structure 2ATA must contain a the data reuired for fuy processing the transaction

232+5S73ltamp54P

2oses the session after a the data has een inserted As soon as the session has een cosed it

can e processed

The interna tae $ith the structure 2ATA can ony contain atch input data for one singe

transaction run So the individua transactions are inserted into the atch input session in a oop

using severa 23INS7ampT cas

copy SAP AG BC420 12-53

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 5488

024

983209 SAP AG 2001

9unction Module DltP1ltBRUP

ALL 9UTI DltP1ltBRUPALL 9UTI DltP1ltBRUP

1PRTIB

LI1T client

BRUP session name

ELDDAT1 loc+ date

=11P delete flag

US1R bdc user name

R1RD recording

IMPRTIB

NID internal session +e(

11PTIS

1PRTIB

LI1T client

BRUP session name

ELDDAT1 loc+ date

=11P delete flag

US1R bdc user name

R1RD recording

IMPRTIB NID internal session +e(

11PTIS

-ith the function modue 235P7N3ltamp54P you can open a atch input session

The foo$ing parameters are mandatory

2+I7NT (cient)

ltamp54P (session name)

4S7amp (user name)

Note The 4S7amp must a$ays e specified This user name is reuired for processing the session

in atch mode

The foo$ing parameters are optiona

=5+AT7 specifies the eariest date on $hich the session can e started677P fag specifies $hether session shoud e deeted after it has een successfuy processed The

677P fag is ignored if the session contains errors

677P E K K means deete the session after processing (defaut vaue) H

677P E KGK means do not deete session

amp725amp E KGK ao$s you to create a recording instead of a I session

If gtI is specified the function modue returns the interna session ey This is needed to e ae to

differentiate sessions that have the same name

-ith 7G27PTI5NS you get various return vaues that can e ueried $ith SC9S4amp2

Note In onine mode the onine user is used for the authoriDation checs regardess of the user

name specified

copy SAP AG BC420 12-54

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 5588

022

983209 SAP AG 1999

Subprogram P1ltBRUP

P1ltBRUP

FOR( oen8rou-IF e9on -

2A FUN2TION BD2O)ENGROU) E)ORTING 2IENT lt1mandt GROU) 8rou USER uer KEE) kee

=ODDATE gtolddate-

ENDIF-ENDFOR(-

Include

DR16

The suprogram 5P7N3ltamp54P opens the atch input session

copy SAP AG BC420 12-55

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 5688

028

983209 SAP AG 1999

9unction Module DltIS1RT

ALL 9UTI DltIS1RTALL 9UTI DltIS1RT

IMPRT

TD1 Transaction code

PSTltLAL Update locall(

PRITIB print list

TAL1S DPRTA bdclttable

11PTIS

IMPRT

TD1 Transaction code

PSTltLAL Update locall(

PRITIB print list

TAL1S DPRTA bdclttable

11PTIS

-ith the function modue 23INS7ampT you can add transaction data to the session

Cou need an interna 2 tae to transfer the data

The foo$ing parameters are mandatory

T257 Transaction code

CNPamp5TA 2 tae

The foo$ing parameters are optiona

P5ST3+52A+ E KGK activates oca updating This means that the data to e updated is ept in the

appication server and updated in the ast step of the transaction This does not invove the update

process (For more information see course 28 Programming ataase 4pdates)

PampINTINlt E KGK 9 ists processed in I $i e printed immediatey -ith 7G27PTI5NS you get various return vaues that can e ueried $ith SC9S4amp2

copy SAP AG BC420 12-56

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 5788

023

983209 SAP AG 1999

Subprogram DltTRASATI

DltTRASATI

FOR( BD2TRANSA2TION USING tcode-

IF e9on -2A FUN2TION BD2INSERT

E)ORTING T2ODE tcode TABES D0N)ROTAB bdcdata-

ESE-

ENDIF-ENDFOR(-

T

Include

DR16

The suprogram 23TampANSA2TI5N moves the fied 2 tae either to a atch input session

or uses ca transaction to import the data into the system 5n the seection screen you can specify

$hether you $ant to create a session or you $ant to use ca transaction to process the data directy

The S7SSI5N fied is then set according to your seection

copy SAP AG BC420 12-57

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 5888

025

983209 SAP AG 1999

9unction Module DltLS1ltBRUP

ALL 9UTI DltLS1ltBRUP

11PTIS

TltP1 6

NU1U1lt1RRR amp

-ith the function modue 232+5S73ltamp54P you can cose a atch input session

In 7G27PTI5NS you get various return vaues that can e ueried $ith SC9S4amp2

copy SAP AG BC420 12-58

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 5988

027

983209 SAP AG 1999

Subprogram LS1ltBRUP

FOR( cloe8rou-IF e9on -cloe batcgt 9nut 8rou

2A FUN2TION BD22OSEGROU)-

ESE-IF e8rouoened -

2A FUN2TION BD22OSEGROU)-

ENDIF-ENDIF-

ENDFOR(-

LS1ltBRUPlose session

lose error session

Include

DR16

The suprogram 2+5S73ltamp54P coses the atch input session The suprogram differentiates

et$een a norma I session (S7SSI5N E G) and a session opened $hen ca transaction

encountered an error (73ltamp54P35P7N7 E G)

copy SAP AG BC420 12-59

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 6088

080

983209 SAP AG 1999

Subprograms DltDPRG Dlt9I1LD

DltDPR

Dlt9I1LD

FOR( bdc9eld USING nam al-IF al 34 nodata-2EAR bdcdata- bdcdata1nam nam- bdcdata1al al- A))END bdcdata-ENDIF-

ENDFOR(-

FOR( bdcdltnro USING ro8ram dltnro- 2EAR bdcdata-Bdcdata1ro8ram ro8ram-Bdcdata1dltnro dltnro-Bdcdata1dltnbe89n - A))END bdcdata-ENDFOR(-

Include

DR16

The incude 2amp72GG contains t$o suprograms 23CNPamp5 and 23FI7+

Suprogram 23CNPamp5 fis the 2 tae $ith program names and screen numers

Suprogram 23FI7+ fis the 2 tae $ith fied names and vaues

7ach suprogram creates an entry in the 2 tae

copy SAP AG BC420 12-60

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 6188

086

983209 SAP AG 1999

9illing the D Table

erorm bdcdltnro u9n8 SA)(FD +- erorm bdc9eld u9n8 BD22URSOR RFD1BUKRS- erorm bdc9eld u9n8 BD2OK2ODE 6- erorm bdc9eld u9n8 RFD1BUKRS record1BUKRS- erorm bdc9eld u9n8 RFD1KTOKD record1KTOKD-

erorm bdcdltnro u9n8 SA)(FD -

erorm bdc9eld u9n8 BD22URSOR KNA1S)RAS- erorm bdc9eld u9n8 BD2OK2ODE 6- erorm bdc9eld u9n8 KNA1NA(E record1NA(E-

erorm bdc9eld u9n8 KNA1SORT record1SORT-

Recording Benerated automaticall(

from the recording

)ERFOR( bdcdltnro USING SA)(FD +- )ERFOR( bdc9eld USING BD22URSOR RFD1BUKRS-)ERFOR( bdc9eld USING BD2OK2ODE 6-)ERFOR( bdc9eld USING RFD1BUKRS record1BUKRS-)ERFOR( bdc9eld USING RFD1KTOKD record1KTOKD-

)ERFOR( bdcdltnro USING SA)(FD -

)ERFOR( bdc9eld USING BD22URSOR KNA1S)RAS-)ERFOR( bdc9eld USING BD2OK2ODE 6-)ERFOR( bdc9eld USING KNA1NA(E record1NA(E-

)ERFOR( bdc9eld USING KNA1SORT record1SORT- ---

The 2 tae is fied $ith data from the recording The suroutines 23CNPamp5 and

23FI7+ are used for this

The suroutines are caed in the reuired structure or seuence

copy SAP AG BC420 12-61

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 6288

08amp

983209 SAP AG 1999

erie)

SAPDatabase

SeJuential9ile

SAPDatabase

ALL TRASATIALL TRASATI

SeJuential9ile

ATE IPUTATE IPUT

D TableD TableD TableD Table

I Monitor

T

In contrast to atch input you can use ca transaction to directy pass data to the diaog interface

$ithout using a atch input session Cou use an interna tae (2 tae same structure and ayout

as atch input) to temporariy store your screen data Then you ca the desired transaction in your

program

Note 5n average the 2a Transaction method is 8 to times faster than using atch Input

copy SAP AG BC420 12-62

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 6388

08

983209 SAP AG 1999

all Transaction Program$ 1ample

RE)ORT abcbdcdcdeb9ct-

)ARA(ETERS d9mode DEFAUT A

udmode DEFAUT S-FOR( calltranact9on-2A TRANSA2TION FD

USING bdcdata (ODE d9mode

U)DATE udmode-

IF lt1ubrc NE - 5RITE 6 ---

ENDIF-ENDFOR(-

Screen

00

Screen

100

Screen

An additiona system ro area is added for the caed transaction The system uses this area for

processing the individua screens in the transactionH the data from the tae is added here After the

transaction is processed the second ro area is reeasedH the system continues processing in the first

ro area

Notes

In contrast to atch input there is no error ogging (error sessions) here For processing the caed

transaction the system uses the authoriDations of the user that caed the transaction The 2 tae

can ony hod data for one transaction run at a time efore another transaction is caed and its data

can e added you must eecute a amp7Famp7S= for the 2 tae

copy SAP AG BC420 12-63

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 6488

084

983209 SAP AG 1999

ALL TRASATI C6

RE)ORT 777-

2A TRANSA2TION FD USING bdcdata (ODE E-

Default for MD1 is A

2A TRANSA2TION 3tranact9oncode4 USING 3bdc1table4 C (ODE A E N C-

-ith the parameter 57 you can seect a specific dispay mode for processing the transaction The

foo$ing three modes are avaiae

A (ispay a)

If you eecute the program a the screens and a their data are dispayed This is the defaut vaue

for the 57 in 2A++ TampANSA2TI5N

N (ispay nothing)

The screens are not dispayed at a regardess of $hether any of them contained errors As soon as

the transaction has een fuy processed contro is returned to your program (The vaue of the

parameter 4PAT7 determines $hether dataase updates are eecuted or not)

7 (ispay errors ony)As soon as an error occurs in a screen the transaction is s$itched to dispay mode so that you can

correct the errors

These dispay modes are the same as those in the atch input session processing

copy SAP AG BC420 12-64

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 6588

082

983209 SAP AG 1999

RE)ORT 777-

2A TRANSA2TION FD USING BD2DATA U)DATE -

ALL TRASATI Camp

RE)ORT 777-

2A TRANSA2TION FD USING bdcdata U)DATE -

2A TRANSA2TION 3tranact9oncode4 USING 3bdc1table4 C (ODE A E N C U)DATE A S C -

Default for UPDAT1 is A

-ith the parameter 4PAT7 you can contro ho$ dataase updates arising from a transaction are

carried out There are three options

A (asynchronous updating) The caed transaction does not $ait unti the dataase has een

updated it simpy for$ard the updates to the SAP update service This usuay speeds up the 2T

program This processing mode is N5T recommended for arge data sets as the caed transaction

does not receive a competion message from the update modue

The caing 2T program therefore cannot te if the transaction has een successfuy competed Cou

shoud use the updating administration function (transaction S8) to determine $hether updating

$as terminated eary The error anaysis correction functions for are ess hepfu than $ith

synchronous updating

S (synchronous updating) -ith synchronous updating the caed transaction $aits unti a the

updates have een competed So processing is so$er than $ith synchronous updating The caed

transaction can ho$ever report any updating errors to the program $hich maes error

anaysiscorrection easier

+ (local updating) $ith oca updating the dataase is not updated in a separate process it is

updated in the caers process (see appication hep documentation for the AAP ey$ord S7T

4PAT7 TAS6 +52A+)

copy SAP AG BC420 12-65

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 6688

088

983209 SAP AG 1999

ALL TRASATI C

RE)ORT 777-DATA mtab T0)E TABE OF bdcm8coll-

2A TRANSA2TION FD USING bdcdata (ESSAGES INTO mtab-

2A TRANSA2TION 3tranact9oncode4 USING 3bdc1table4 C (ODE A E N C U)DATE A S C (ESSAGES INTO 3metab4 C -

7SSAlt7S specifies that a system messages that are output during the eecution of a 2A++

TampANSA2TI5N are $ritten to the interna tae L7SSTA The interna tae must have the

structure 2Slt25++

4nie the cassica atch input processing $ith sessions 2A++ TampANSA2TI5N does not offer any

specia processing procedures for transactions containing errors There are no restart functions for

transactions that contain errors or that cause updating terminations

copy SAP AG BC420 12-66

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 6788

083

983209 SAP AG 1999

ALL TRASATI C4

RE)ORT 777-DATA mltot T0)E ctuaram-

2A TRANSA2TION FD USING BD2DATA

O)TIONS FRO( mltot-

2A TRANSA2TION 3tranact9oncode4 USING 3bdc1table4 C (ODE A E N C U)DATE A S C (ESSAGES INTO 3metab4 C O)TIONS FRO( ot C -

RE)ORT 777-DATA mltot T0)E ctuaram-2A TRANSA2TION FD USING bdcdata

O)TIONS FRO( mltot-

The addition 5PTI5NS enaes the ca transaction statement to e controed through a structure

The structure must have the dictionary type 2T43PAampAS

The addition 5PTI5NS Famp5 must not e comined either $ith the addition 57 or $ith

4PAT7 ore information on the net side

copy SAP AG BC420 12-67

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 6888

085

983209 SAP AG 1999

Structure TUltPARAMS

DISMD1 Procen mode anaoo o addon amp

UPDMD1 $pdae mode anaoo o addon $PA

ATTMD1 CA mode CA conro

D19SI1 orce de=a EndoE e drn procen

RAMMIT +o eD a Camp amp(

IPT +o a ac np eonF a F S-B+P SPAC

I1D +o a ac np eon a=er end o= BC daa

The components are defined as foo$s

The components 7FSIM7 ampA25IT N5INPT and N5I7N can have the foo$ing

vaues KGK E Ces or K K E No

If the addition 5PTI5NS Famp5 is not specified the foo$ing settings appy to the contro

parameters

IS57 from addition 57

4P57 from addition 4PAT7

2ATT57 2ATT not active

7FSIM7 o not not use defaut $indo$s siDe

ampA25IT Successfu eit at 25IT -5amp6

N5INPT atch input session active (SC9INPT E G)

N5I7N atch input session sti active after end of 2 data

copy SAP AG BC420 12-68

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 6988

087

983209 SAP AG 1999

SMSBID Message ID

SMSBT Message T(pe C1GIGWGSGA

SMSB Message umber

SMSB6 Message ariable 6

SMSBamp Message ariable amp

SMSB Message ariable

SMSB4 Message ariable 4

SMSBID Message ID

SMSBT Message T(pe C1GIGWGSGA

SMSB Message umber

SMSB6 Message ariable 6

SMSBamp Message ariable amp

SMSB Message ariable

SMSB4 Message ariable 4

Return code$

S(stem fields$

alue Meaning

0 Successful

6000 1rror in transaction

6000 1rror in processing call transaction

see also the s(stem fields specified

alue Meaning

0 Successful

6000 1rror in transaction

6000 1rror in processing call transaction

see also the s(stem fields specified

9ield name Meaning9ield name9ield name MeaningMeaning

Return ode and S(stem 9ields

The return code is used to specify $hether the caed transaction $as processed successfuy In

addition severa system fieds are fied The numer I type and variaes of the diaog message

output y the caed transaction Cou need this information to output the message tet

copy SAP AG BC420 12-69

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 7088

030

983209 SAP AG 1999

Benerated Program of the TA Recorder

REFRES= (ESSTAB-

2A TRANSA2TION tcode USING bdcdata (ODE ctumode U)DATE cudate (ESSAGES INTO metab-OO) AT metab- ENDOO)-IF lubrc 34 AND e8rou 34 S)A2E- IF e8rouoenend - 2A FUN2TION BD2O)ENGROU) E)ORTING ---------

--------- E8rouoened - ENDIF- 2A FUN2TION BD2INSERT E)ORTING T2ODE tcode TABES D0N)ROTAB bdcdata-ENDIF-REFRES= bdcdata-

Message table output

pen error session

Insert data record that

has errors into error

session

If you have seected ca transaction on the seection screen the generated program runs as foo$s

The onine transaction is caed $ith ca transaction and passed to tae 2ATA A the

messages arising during the ca transaction are put in the interna tae 7SSTA

7SSTA is output as a ist

If you have specified an error session ( 73ltamp54P L SPA27) on the seection screen and the

ca transaction comes across an error (+3S4amp2 L 0) the error session is opened The error

session is ho$ever ony opened once Then the data record is paced in the session

A the other data records that have errors $ith ca transaction are paced in the same session

copy SAP AG BC420 12-70

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 7188

036

983209 SAP AG 1999

The Transaction Recorder

PrinciplesPrinciples

Recording )ith the LSMWRecording )ith the LSMW

Principles of atch Input and all TransactionPrinciples of atch Input and all Transaction

Integrating the TA Program into the DWIntegrating the TA Program into the DW

Using the TA Recorder Using the TA Recorder

copy SAP AG BC420 12-71

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 7288

03amp

983209 SAP AG 1999

Integrating into the DW

Transfer program

AAP Dictionar(

Integrate

SDA0

SDA6

SDAamp

SDA

Cou can integrate the generated program into the G9- The structure of the fie must e created

in the AAP ictionary The taes SGA0 SGA8 SGA1 and SGA $i e fied

copy SAP AG BC420 12-72

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 7388

03

983209 SAP AG 1999

DW Release 42

Goo

-B eeae 45

aa ran=er ogtec

Int customer data transfer ob-ect

ecord =ed

Dece daa ran=er

d Goo

The ampunction ampor interatin TA recorder prora$s is

i$ple$ented in the

D+-B in Release

The recorder can e integrated as of ampeease and it is provided in the G9- ampeease

ltot to the G9- ampeease 5n the initia screen you can integrate programs y choosing ampoto

( +nt customer ata transfer o-ect

copy SAP AG BC420 12-73

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 7488

034

983209 SAP AG 1999

reating Program as D b-ect

Comer ran=er ogtec

ampgtec ype

Sor eD =or ogtec

aa ran=er proram

Srcre name

9900

(+A1

Cane comer

ZBCA+G

ZB

ustomer transfer ob-ect

umber bet)een 7000 and 7777

b-ect t(pe

Assignment to R ob-ect

Short tet for D ob-ectShort description

Data transfer program

ame of generated program

Structure name

A structure Cstructure la(out )ith this name is created in

the AAP Dictionar(

For ampeease transfer oects $ere not organiDed y 5amp oects ut y a G numer (00089

OOOO) The numer range O0009OOOO is reserved for customers

To create a connection to the ne$ G 9- you must assign the program to a 5amp oect

2reate a short tet for the G oect This tet $i appear in the method seection ist

Specify the program to e incuded

Specify a name for the structure to e created in the AAP ictionary

Note $he generated program appears under program type +N and not under program type

-

copy SAP AG BC420 12-74

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 7588

032

983209 SAP AG 1999

Adantages

Automatic program registration in the DW in

Release 48

ou can use all the functions defined for

standard ob-ects

1ception$ The (reate ampile ith data

function

If you incuded the oect in the ampeease $orench it is automaticay avaiae in the ampeease

B $orench

A the $orench functions are avaiae for your oect ecept for Create files ith transfer ata

copy SAP AG BC420 12-75

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 7688

038

983209 SAP AG 1999

ou are no) able to$

The Transaction Recorder$ Unit Summar(

Use the recording function in the LSMW to create

a batch input session )ith the data from the

eternal s(stem

Use the TA Recorder to create (our o)n data

transfer program

Anal(e programs that )or+ )ith batch input or

call transaction

Integrate the TA Recorder programs into the

DW

copy SAP AG BC420 12-76

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 7788

ercise 1

nit $ -ecorder

$opic 2reating etors

$ransaction -ecorder ercise 1

bull 2reating detors $ith eterna numer assignment

bull etor numers M9980008 to M9980080

Address data for detors $ith eterna numer assignment is to

e transferred using program ampFI700

ro4ect F5

Supro4ect +5

-un +575

$as)s 85 95 8S25

9oad program -F+00

8 In the foo$ing eercises eisting data is to e changed Therefore these detors $ith

eterna numer assignment have to first e created

898 4nder suproect 79 create run 797G9 $ith the name Detors ith

eternal numers

copy SAP AG BC420 12-77

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 7888

891 2reate the foo$ing three tass The tass map the foo$ing process steps

convert data create + session and process + session

89198 In run 797G9 create the foo$ing tas

9 Tas AP9

9 Name 2onvert data 9 Tas type AP

9 Program type +S-

Seect the foo$ing +S- oect

+S- proect 2109

+S- suproect 7I9

+S- oect I997GT

89191 In run 797G9 create the foo$ing tas 9 Tas +5A9

9 Name 2reate I session

Tas type +5A

9 Program type INP

Seect program ampFI700 $ith the variant

I97G9

8919 In run 797G9 create the foo$ing tas

9 Tas S29

9 Name Process I session Tas type S2

9 Program type amp7P5

Seect program ampS2S4 $ith the variant

S497G9

Note that you have to correct the seuence of the tass 2onvert data

create + session and process + session

4se the uttons

89 Start the run

The detors $i e created $ith eterna numer assignments

89 2hec in transaction F0 that the detors M9980008 to M9980080 have een

created

copy SAP AG BC420 12-78

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 7988

ercise

nit $ransaction -ecorder

$opic -ecording function in the 9S8(

bull 2reate a recording using the +S-

bull ltenerate a atch input session

2hange the detor address data in the amp System

Name of the recording +

Name of the file +2055+F9

8 2reate the recording 7I3 using the +S- ampecord the transaction F01 (2hange

detor)

898 efore you create the recording first test the transaction onineQ

For the recording use detor M9980008 5n the initia screen of the F01

maintain the foo$ing fieds ony

etor etor M9980008

2ompany code 0008

Address data seect

Note $he data record must e saved hile recording

891 aintain the names and the descriptions for the foo$ing fieds

Name city street posta code and teephone numereete a other fieds in screen 880 from the recording (eg S5ampT+ +AN8

SPampAS)

4se the same technica names as sho$n in the tae eo$ (automatic fied

mapping)

copy SAP AG BC420 12-79

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 8088

1 2reate the suproect 7I9 and the ne$ oect TA3 in your proect 2109

aintain the oect attriutes and seect the item atch input recording Seect your

recording 7I3

2reate the source structure address

2reate the source fieds according to the tae eo$ 5r copy them from proect 2109S37N suproect 7I900 oect TA900

198 Fie setup The data from the egacy system are dispayed in the foo$ing tae

Fied name Fied type Fied ength escription

N5 2 8B etor numer

NA7 2 Name

STamp77T 2 Street

2ITC 2 2ityPace of residence

MIP 2 80 Posta code

T7+ 2 8B Teephone numer

191 aintain the fied mapping 4se the automatic fied mapping (via menu item

7tras)

19 Specify the fies 5ny maintain the fie name of the source fie

Name of the fie 21099IFI+7

2odepage 8800

19 Import the data and convert them ispay the data in each caseQ

19 2reate a atch input session

19B ampun the atch input session

copy SAP AG BC420 12-80

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 8188

ercise 3

nit $ransaction -ecorder

$opic -ecording ith the $ -ecorder

bull ltenerate a recording using the TA recorder

bull Test the recording

2hange the address data of detors in the amp system

Name recording $+

Name of the file +2055+F9

8 2reate the recording TA37I3 using the transaction recorder ampecord the

transaction F01 (change detor)

898 4se detor M9980008 for the recording 5n the F01 initia screen ony

maintain the foo$ing fieds

etor etor M9980008

2ompany 2ode 0008

Address data seect

Note $he data record must e saved hen recording

eete a fieds that do not eist in the source fie 21099IFI+7 from screen

880 in the recording (eg 6NA89S5ampT+ 6NA89+AN8 6ANNQ9SPampAS) Note o not deete fieds ampF01946ampS and ampF0190880

Save the recording no$

1 S$itch to the recordings overvie$

198 Process the recording $ith the processing mode A (dispay a)

191 Process the recording $ith the processing mode RN (no dispay)

19 If the recording has een tested and no error has occurred generate a I session

and run it using the I monitor If an error shoud occur generate the recordingagainQ

copy SAP AG BC420 12-81

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 8288

From the recording generate the program M21037I3 in your deveopment cass

2109 Seect the foo$ing

bull ampead fied contents from fie

bull 2reate test data in the fie 2103dei3test3tt

98 Save this program and eecute it ltenerate one I session each and process it

2arry out the same steps again using the ca transaction

The generated program shoud no$ e changed so that fie 21099IFI+7 can e

read and processed

98 2hange the defaut vaue of the fie name (parameter dataset) in 21099

IFI+7

91 2hange the structure definition eete the company code fied and the address

data checo from the structure

9 2hange the su9routine ca perform dc3fied for the company code (KampF019

46ampSK) so that the vaue 0008 is transferred

9 2hange the su9routine ca perform dc3fied for the address data checo

(KampF0190880K) so that the vaue G is transferred

9 Start the program again and read the data from the fie 21099IFI+7 $ith

detor data ltenerate a I session $ith it and run it

copy SAP AG BC420 12-82

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 8388

033 Include DR16INCLUDE BDCRECX1

SELECTION-SCREEN BEGIN OF LINE

PARAMETERS SESSION RADIOBUTTON GROUP CTU create sessi SELECTION-SCREEN COMMENT $amp TEXT-S FOR FIELD SESSION

se(ecti-scree )siti +

PARAMETERS CTU RADIOBUTTON GROUP CTU ca(( trasacti

SELECTION-SCREEN COMMENT $amp TEXT-S FOR FIELD CTU

SELECTION-SCREEN END OF LINE

SELECTION-SCREEN BEGIN OF LINE

SELECTION-SCREEN COMMENT $amp TEXT-S1 FOR FIELD GROUP

se(ecti-scree )siti $+

PARAMETERS GROUP1$amp r) ae 0 sessi

SELECTION-SCREEN COMMENT $amp TEXT-S+ FOR FIELD CTUMODE

se(ecti-scree )siti

PARAMETERS CTUMODE LIE CTU2PARAMS-DISMODE DEFAULT 3N3

A4 s56 a(( 78)rs

E4 s56 78)r errr (8

N4 7 t 7is)(a8 78)r

SELECTION-SCREEN END OF LINE

SELECTION-SCREEN BEGIN OF LINE

SELECTION-SCREEN COMMENT $amp TEXT-S$ FOR FIELD USER

se(ecti-scree )siti $+

PARAMETERS4 USER1$amp DEFAULT S9-UNAME ser 0r sessi i atc5

SELECTION-SCREEN COMMENT $amp TEXT-S FOR FIELD CUPDATE

se(ecti-scree )siti

PARAMETERS CUPDATE LIE CTU2PARAMS-UPDMODE DEFAULT 3L3

S4 s8c5rs(8

A4 as8c5rs(8

L4 (ca(

SELECTION-SCREEN END OF LINE

SELECTION-SCREEN BEGIN OF LINE

SELECTION-SCREEN COMMENT $amp TEXT-S FOR FIELD EEP

se(ecti-scree )siti $+

PARAMETERS4 EEP AS CltECBOX 3 3 = 7e(ete sessi i0 0iis5e7

3X3 = gtee) sessi i0 0iis5e7

SELECTION-SCREEN COMMENT $amp TEXT-S FOR FIELD E2GROUP

copy SAP AG BC420 12-83

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 8488

se(ecti-scree )siti

)araeters E2GROUP1$amp r) ae 0 errr-sessi

SELECTION-SCREEN END OF LINE

SELECTION-SCREEN BEGIN OF LINE

SELECTION-SCREEN COMMENT $amp TEXT-S FOR FIELD ltOLDDATE

se(ecti-scree )siti $+

PARAMETERS4 ltOLDDATE LIE S9-DATUM

SELECTION-SCREEN COMMENT +11amp TEXT-S$ FOR FIELD E2USER

se(ecti-scree )siti

PARAMETERS4 E2USER1$amp DEFAULT S9-UNAME ser 0r errr-sessi

SELECTION-SCREEN END OF LINE

SELECTION-SCREEN BEGIN OF LINE

SELECTION-SCREEN COMMENT +11amp TEXT-S FOR FIELD E2EEP

se(ecti-scree )siti

PARAMETERS4 E2EEP AS CltECBOX 3 3 = 7e(ete sessi i0 0iis5e7

3X3 = gtee) sessi i0 0iis5e7

SELECTION-SCREEN END OF LINE

SELECTION-SCREEN BEGIN OF LINE

SELECTION-SCREEN COMMENT +11amp TEXT-S FOR FIELD E2ltDATE

se(ecti-scree )siti

PARAMETERS4 E2ltDATE LIE S9-DATUM

SELECTION-SCREEN END OF LINE

SELECTION-SCREEN SIP

SELECTION-SCREEN BEGIN OF LINE

SELECTION-SCREEN COMMENT 1amp TEXT-S1 FOR FIELD NODATA

PARAMETERS4 NODATA DEFAULT 33 LOER CASE 7ata

SELECTION-SCREEN END OF LINE

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

Batc5i)t7ata 0 si(e trasacti

DATA4 BDCDATA LIE BDCDATA OCCURS ITlt ltEADER LINE

essaes 0 ca(( trasacti

DATA4 MESSTAB LIE BDCMSGCOLL OCCURS ITlt ltEADER LINE

errr sessi )ee7 3 3 r 3X3amp

DATA4 E2GROUP2OPENED

essae tets

TABLES4 T1

copy SAP AG BC420 12-84

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 8588

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

at se(ecti scree

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

AT SELECTION-SCREEN

r) a7 ser st e 0i((e7 0r create sessi

IF SESSION = 3X3 AND

GROUP = SPACE OR USER = SPACE

MESSAGE E1MSamp

ENDIF

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

)e 7ataset

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

FORM OPEN2DATASET USING P2DATASET

OPEN DATASET P2DATASET IN TEXT MODE

IF S9-SUBRC

RITE4 TEXT-E S9-SUBRC

STOP

ENDIF

ENDFORM

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

c(se 7ataset

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

FORM CLOSE2DATASET USING P2DATASET

CLOSE DATASET P2DATASET

ENDFORM

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

create atc5i)t sessi

t 0r ca(( trasacti siamp

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

FORM OPEN2GROUP

IF SESSION = 3X3

SIP

RITE4 $amp 3Create r)3I1amp GROUP

SIP

)e atc5i)t r)

CALL FUNCTION 3BDC2OPEN2GROUP3

EXPORTING CLIENT = S9-MANDT

copy SAP AG BC420 12-85

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 8688

GROUP = GROUP

USER = USER

EEP = EEP

ltOLDDATE = ltOLDDATE

RITE4 amp 3BDC2OPEN2GROUP3I$amp

1$amp 3retrc7e43I+amp

S9-SUBRC

ENDIF

ENDFORM

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

e7 atc5i)t sessi

ca(( trasacti si4 errr sessiamp

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

FORM CLOSE2GROUP

IF SESSION = 3X3

c(se atc5i)t r)

CALL FUNCTION 3BDC2CLOSE2GROUP3

RITE4 amp 3BDC2CLOSE2GROUP3Iamp

1$amp 3retrc7e43I+amp

S9-SUBRC

ELSE

IF E2GROUP2OPENED = 3X3

CALL FUNCTION 3BDC2CLOSE2GROUP3

RITE4

RITE4 amp 3Fe5(era))e 6r7e eret3Iamp

ENDIF

ENDIF

ENDFORM

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

Start e6 trasacti accr7i t )araeters

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

FORM BDC2TRANSACTION USING TCODE

DATA4 L2MSTRINGamp

DATA4 L2SUBRC LIE S9-SUBRC

atc5 i)t sessi

IF SESSION = 3X3

CALL FUNCTION 3BDC2INSERT3

EXPORTING TCODE = TCODE

TABLES D9NPROTAB = BDCDATA

RITE4 3BDC2INSERT3Iamp

copy SAP AG BC420 12-86

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 8788

TCODE

3retrc7e43I+amp

S9-SUBRC

3RECORD43

S9-INDEX

ca(( trasacti si

ELSE

REFRESlt MESSTAB

CALL TRANSACTION TCODE USING BDCDATA

MODE CTUMODE

UPDATE CUPDATE

MESSAGES INTO MESSTAB

L2SUBRC = S9-SUBRC

RITE4 3CALL2TRANSACTION3

TCODE

3retrc7e43I+amp

L2SUBRC

3RECORD43

S9-INDEX

LOOP AT MESSTAB

SELECT SINGLE FROM T1 ltERE SPRSL = MESSTAB-MSGSPRA

AND ARBGB = MESSTAB-MSGID

AND MSGNR = MESSTAB-MSGNR

IF S9-SUBRC =

L2MSTRING = T1-TEXT

IF L2MSTRING CS 313

REPLACE 313 ITlt MESSTAB-MSGH1 INTO L2MSTRING

REPLACE 3$3 ITlt MESSTAB-MSGH$ INTO L2MSTRING

REPLACE 33 ITlt MESSTAB-MSGH INTO L2MSTRING

REPLACE 33 ITlt MESSTAB-MSGH INTO L2MSTRING

ELSE

REPLACE 33 ITlt MESSTAB-MSGH1 INTO L2MSTRING

REPLACE 33 ITlt MESSTAB-MSGH$ INTO L2MSTRING

REPLACE 33 ITlt MESSTAB-MSGH INTO L2MSTRING

REPLACE 33 ITlt MESSTAB-MSGH INTO L2MSTRING

ENDIF

CONDENSE L2MSTRING

RITE4 MESSTAB-MSGT9P L2MSTRING$+amp

ELSE

RITE4 MESSTAB

ENDIF

ENDLOOP

copy SAP AG BC420 12-87

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 8888

SIP

Eree 0e5(era))e

IF L2SUBRC AND E2GROUP SPACE

IF E2GROUP2OPENED = 3 3

CALL FUNCTION 3BDC2OPEN2GROUP3

EXPORTING CLIENT = S9-MANDT

GROUP = E2GROUP

USER = E2USER

EEP = E2EEP

ltOLDDATE = E2ltDATE

E2GROUP2OPENED = 3X3

ENDIF

CALL FUNCTION 3BDC2INSERT3

EXPORTING TCODE = TCODE

TABLES D9NPROTAB = BDCDATA

ENDIF

ENDIF

REFRESlt BDCDATA

ENDFORM

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

Start e6 scree

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

FORM BDC2D9NPRO USING PROGRAM D9NPRO

CLEAR BDCDATA

BDCDATA-PROGRAM = PROGRAM

BDCDATA-D9NPRO = D9NPRO

BDCDATA-D9NBEGIN = 3X3

APPEND BDCDATA

ENDFORM

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

Isert 0ie(7

Page 9: BC420_46C - 012The Transaction Recorder

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 988

07

983209 SAP AG 1999

hanging ustomer Data$ Address

ustomer 5560000

+ame

Searc erm

Addre

Screen

111

9ield ontents

BCamp(Camp $PABCS$BSC SAPSZA1 0300ASS

BCS$BSC SAPSZA1 0301Camp$

BCC$Samp A1AA-amp$S+$1

A1AA-S Garden Sree

A1AA-amp$S+$1 02105

9ield ame

If there is a suscreen on the screens this is automaticay recorded In the recording the fied

23S4S2amp77N containing the name of the suscreen appears

-ith customer master data the address is a suscreen area The centra address management is

integrated here A the address input fieds are dispayed on one suscreen

2entra address management is ony used if you specificay seect this option on the initia screen

copy SAP AG BC420 12-9

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 1088

060

983209 SAP AG 1999

Results of the Recording

Recording

SAPM90ampD 0608

DltURSR R90ampD=UR

Dlt=D1 gt00

R90ampD=UR 5560000

R90ampDD0660

US1ltA

SAPM90ampD 0666

Dlt=D1 UPDA

DltSUSR SAPLSA6 000ADDR1SS DltSUSR SAPLSA6 006UTRltSR11

DltURSR SA6ltD0600T1LltUM1R

ADDR6ltDATASTR11T 4 Barden Street

ADDR6ltDATAPSTltD1 0amp602

ADDR6ltDATAIT6 oston

SA6ltD0600T1LltUM1 8638257755

The resut of the recording is a ist of a the fieds and fied vaues that $ere changed in the

recording

copy SAP AG BC420 12-10

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 1188

066

983209 SAP AG 1999

Special Recording 9ields

9unction code triggered on

this screen

9ield name )here cursor

)as last positioned on the

screen

Comer

Company code

Z-88-10000

Genera daa

Dlt=D1

DltURSR

uring a recording the foo$ing additiona fieds are automaticay recorded

The BDC_OKCODE fied contains the function code triggered on the screen

The BDC_CURSOR fied contains the fied name of the ast fied the cursor $as positioned in

efore eiting the screen

copy SAP AG BC420 12-11

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 1288

06amp

983209 SAP AG 1999

Determining the 9ield ame

Technical info

Screen field

R90ampD =UR

Comer

Company code

Z-88-10000

Genera daa

96help

Sa

Program SAPM90ampDScreen number 608

The information recorded in the TA recorder can aso e dispayed onine for each transaction

To find out the current modue poo name and the screen numer choose Systemrarr Status from the

menu

To determine the fied name pace the cursor on a fied and seect F8 hep The name of the screen

fied can e found under technical information

copy SAP AG BC420 12-12

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 1388

06

983209 SAP AG 1999

Subscreens

Comer Z-88-10000

+ame

+ame

ADDR6ltDATAAM16

DltSUSR

Information$

ode poo name

Screen nmer

Screen name

Some screens contain suscreen areas

To determine the fied name pace the cursor on the fied and choose F1 The name of the screen

fied is specified under Technical info

copy SAP AG BC420 12-13

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 1488

064

983209 SAP AG 2001

Tabstrips

$er Roberts

1ample$ User Profile Defaults

Sar men +

oon anae

ampp dece Pr1

ParameerDefaults

DltSUSR

USD19AULTSSPLD

The tastrip eement sho$n is used on the aintain User rofile (5$n data) screen

4nder the tastrip tite Defaults the user can set various vaues such as the defaut printer

The user profie are user9dependent settings (as the name impies)

copy SAP AG BC420 12-14

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 1588

062

983209 SAP AG 1999

Step Loops and Table ontrols

1ample$ an+ Details

Comer

ntr( an+ +e( Account

08154711

123456789

Z-00-12345

an+ Details

00708155546344536

Banlt daa

==A=C06)

==A=C0amp)

Step oops and tae contros are treated identicay for the recording

The fied names of the fieds isted are the same for every ro$

7ach ro$ contains a customers an detais The fieds must e accessed using an inde (this is

specified as an addition to the fied name for eampe 6N69AN6N(1) The inde must match

the ro$ numer

5ny the visie fieds on a screen can e fied $ith data If some fieds are ony visie after paging

the paging must e recorded as $e This means that for the recording you must eecute a the steps

in the onine transaction

For eampe age on $oud e eecuted using the function code 1 (Paging icons)

Paging to the end of a ist 1Page up 11

lto to first page 18

copy SAP AG BC420 12-15

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 1688

068

983209 SAP AG 2001

Recording Buidelines

Test the transaction before recording

Start the recording

hange field alues onl( for fields

releant to the recording

As of 48 all filled fields are recorded

Transaction must be properl( eitedCSA1

Use of scroll bars cannot be recorded

Specia recording notes

F8 F and your o$n F8 and F hep (Pamp527SS 5N =7+P9amp7gt47ST Pamp527SS 5N A+479

amp7gt47ST) are not recorded This aso appies to a commands under the System and $el

menus aues for defaut variants ( transaction variants) are not incuded

7rror and $arning diaogs are not recorded 5ny the 56 code and the fied contents reuired for

further processing on the current screen are recorded

Note uring recording the data entered is $ritten to the dataase

copy SAP AG BC420 12-16

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 1788

063

983209 SAP AG 2001

1n-o( SAP ontrols and Data Transfer

bull SAP Picture ontrolbull SAP ETML ie)er ontrol

bull SAP Tet 1dit ontrol

bull AL Brid ontrol

bull SAP Tree ontrol

bull

ranch 6

ranch amp

Root

These and other controls do not support batch input$

Root

ranch amp

ranch amp6

The ne$ 7noy SAP contros deveoped for ampeease B do not support atch input or ca

transaction

=o$ever tae contros and tastrips do support atch input

copy SAP AG BC420 12-17

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 1888

065

983209 SAP AG 1999

The Transaction Recorder

PrinciplesPrinciples

Recording )ith the LSMWRecording )ith the LSMW

Principles of atch Input and all TransactionPrinciples of atch Input and all Transaction

Integrating the TA Program into the DWIntegrating the TA Program into the DW

Using the TA Recorder Using the TA Recorder

copy SAP AG BC420 12-18

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 1988

067

983209 SAP AG 1999

Session

generator

Recording Using the LSMW

-ith the +S- you can create your o$n recordings

The +S- uses the standard TA recorder here yet evauates the recording itsef The information

from the recording is used to create atch input sessions

The created atch input session can e processed as usua $ith the atch input monitor

Note As $ith the standard procedure it is euay important that the data is converted

copy SAP AG BC420 12-19

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 2088

0amp0

983209 SAP AG 1999

reating Recording

Admnraon

ecordn

Goo

ame of recording

Description

)ner

ame of transaction

Start recording

lto into the +S- and seect the menu path ampoto (Recorings An overvie$ of a previousy

created recordings for your proect are dispayed To start a ne$ recording seect Create

To create a recording you must define the name the description and the o$ner

7nter the name of the transaction you $ant to record

7ecute the transaction and compete it propery

Note ampecordings are assigned to ony one proect 9 so the name of the recording must e uniue

copy SAP AG BC420 12-20

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 2188

0amp6

983209 SAP AG 1999

hanging ustomer Data$ Initial Screen

9ield ontents

BCC$Samp $SZAV

BCamp(Camp )00

02-($++ -88-10000

02-0110

02-0130

$SZAV

9ield ame

Comer

Company code

Z-88-10000

Genera daa

Comer Z-88-10000

+ame

9ield ontents

BCamp(Camp $PA

BCS$BSC SAPSZA1 0300ASS

BCS$BSC SAPSZA1 0301Camp$

BCC$Samp SZA10100-+$B

A1AA-S Garden Sree

A1AA-amp$S+$1 34

A1AA-PampSCamp1 02105

9ield ame

Screen

111

Screen

106

In the aove eampe the transaction Change customer F01 is recorded

Note

You must ma)e some modification to the field values for all the fields you ant to capture

for the data transfer For the purposes of recording a change can simply mean overriting

one single character in a field ith the same character

ven if fields are to e filled using S$amp$ parameters the values must still e changed on

the screen in order to capture them

(ith online transactions screen sequences may appear that are different than in the

recording

copy SAP AG BC420 12-21

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 2288

0ampamp

983209 SAP AG 1999

Results

RecordingRecording R1lt6 Demolt6

9D0amp hange customer Caccounting

SAPM90ampD 0608

DltURSR R90ampD=UR

Dlt=D1 gt00

R90ampD=UR 5560000

R90ampDD0660

US1ltA

SAPM90ampD 0666

Dlt=D1 UPDA

DltSUSR SAPLSA6

DltSUSR SAPLSA6

DltURSR SA6ltD0600T1LltUM1

ADDR6ltDATASTR11T 4 Barden Street

ADDR6ltDATAPSTltD1 0amp602

ADDR6ltDATAIT6 oston

SA6ltD0600T1LltUM1 8638257755

The resuts of the recording using the +S- are dispayed in a tree structure

After the recording has finished you can edit it Cou can deete fieds or add ne$ ones

copy SAP AG BC420 12-22

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 2388

0amp

983209 SAP AG 1999

Assigning 9ield ames

Recording R16 Demolt6

Dlt=D1 UPDA

DltSUSR SAPLSA6

DltSUSR SAPLSA6

DltURSR SA6ltD0600T1L

ADDR6ltDATAAM16 Lisa Eofmeister

ADDR6ltDATAPSTltD1 0amp602

ADDR6ltDATAIT6 oston

ame

+ame

ecrpon

e=a ae

A1AA-+A1

A1AA-+A1

Comer name

a o=meer

Screen =ed

ustomer name

double clic+

Cou can assign names for each recorded fied The specia fieds (2356257 2324ampS5amp

and 23S4S2amp77N) are not incuded here Cou can choose the fied names -hen the atch

input session is created the contents of these fieds are assigned to the target fieds specified in the

eft coumn

Functions

efaut Assigns to the fied names of the underying target fied and its fied description

ampeset eetes fied name and fied description

oue cic 7dits fied name fied description and defaut vaue

Note Cou can use fied names more than once =o$ever the fied name is ony avaiae once in thefied mapping For this reason it is not practica to use fied names more than once

For a those fieds for $hich you do not assign a name the defaut vaue is used $hen the atch

input session is created These defaut vaues can e seen as constants This is especiay usefu for

chec oes (for eampe 08 vie$ seection)

The +S- supports automatic fied mapping Source fieds and target fieds can e assigned to each

other automaticay The fieds are assigned to the corresponding fieds of the same name Therefore

the fied names of the source structure shoud e given the same or simiar names as the fied names

in the target structure

copy SAP AG BC420 12-23

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 2488

0amp4

983209 SAP AG 2001

Addinggtremoing screen fields

Repeating recording

9or identical field names the name and description are

assigned automaticall(

1diting Recording

02-($++

(+A1-A+

(+A1-+A1

(+A1-Samp

(+A1-+A2

(+A1-SAS

Comer accon nmer

e

+ame 1

Sor =ed

+ame 2

Sree

Selection of all

aailable screen

fields

Cou can ater add ne$ screen fieds if you need to 6eep in mind that fieds shoud ony e added in

paces $here they are aso provided on the screen other$ise you $i get an error $hen the I

session is processed

After saving you $i get the message The data has een saved successfuy No$ the recordings

are avaiae for the oect attriutes

If you repeat the recording you can record a ne$ screen seuence $ith ne$ fieds Provided that the

fied names (eg 6NA89NA78) are identica the names and descriptions are automaticay

assigned

copy SAP AG BC420 12-24

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 2588

0amp2

983209 SAP AG 1999

b-ect T(pe and Import Method$ Recording

Standard atch Input gt Direct Input

atch Input Recording

API

IDoc

ampgtec ype ) mpor meod

Bac np recordn

ecordn ec1

The recording is no$ avaiae $ith the oect attriutes

Net you create a proect or su9proect in the +S- and specify process the data transfer

Cou eecute the data transfer as in the standard system

efine the source fieds and structures

efine the fied mapping

ampead and convert the data

2reate and import a atch input session

copy SAP AG BC420 12-25

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 2688

0amp8

983209 SAP AG 1999

The Transaction Recorder

PrinciplesPrinciples

Recording )ith the LSMWRecording )ith the LSMW

Principles of atch Input and all TransactionPrinciples of atch Input and all Transaction

Integrating the TA Program into the DWIntegrating the TA Program into the DW

Using the TA Recorder Using the TA Recorder

copy SAP AG BC420 12-26

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 2788

0amp3

983209 SAP AG 1999

Transaction Recorder

Online

Transaction

RecordingTransfer Program

T

Included in the Batch Input Monitor

Cou use the transaction recorder to record transactions and then use the transaction recording to

generate a transfer program The program ao$s you to transfer data using either atch input or ca

transaction

copy SAP AG BC420 12-27

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 2888

0amp5

983209 SAP AG 1999

hanging ustomer Data$ Initial Screen

9ield ontents

BCC$Samp $SZAV

BCamp(Camp )00

02-($++ Z-88-10000

02-0110

02-0130

$SZAV

9ield ame

Comer

Company code

Z-88-10000

Genera daa

Comer Z-88-10000

+ame

9ield ontents

BCamp(Camp $PA

BCS$BSC SAPSZA1 0300ASS

BCS$BSC SAPSZA1 0301Camp$

BCC$Samp SZA10100-+$B

A1AA-S Garden Sree

A1AA-amp$S+$1 34

A1AA-PampSCamp1 02105

9ield ame

Screen

111

Screen

106

In the aove eampe the transaction Change customer F01 is recorded

copy SAP AG BC420 12-28

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 2988

0amp7

983209 SAP AG 2001

hange Debitor$ Pa(ment Transactions C6

Banlt dea

Screen

10

9ield ontent

BCC$Samp (+B(-BA+(+01

BCamp(Camp BA+((+B(-BA+(S01

(+B(-BA+(01 12345679

(+B(-BA+(+01 22222222

Debitor 5560000

9ield ame

Inde

copy SAP AG BC420 12-29

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 3088

00

983209 SAP AG 1999

hanging ustomer Data$ Pa(ment Transactions Camp

Addre

an+ countr( US

an+ code 6amp42837

Banlt dea

ustomer 5560000

9ield ontents9ield ame

BCC$Samp (+A1-(+ZA

BCamp(Camp $PA

(+B(-Z01

Screen

10

Screen

100

SAPLBA

9ield ontents

BCC$Samp B+(A-BA+(A

BCamp(Camp +

B+(A-BA+(A +aona Banlt

9ield ame

In different transactions the modue poo may change This is the case $ith for eampe customer

master data The TA recorder records modue poo changes automaticay

copy SAP AG BC420 12-30

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 3188

06

983209 SAP AG 1999

Eierarch( Displa( of the Recording

02amp

02

SAP02 0106

BCC$Samp 02-0130

BCamp(Camp )00

02-($++ -88-10000

02-0110

02-0130

SAP02 0111

BCamp(Camp V

BCC$Samp A1AA-amp$S+$1

A1AA-S Garden Sree

Recording

-ith the TA recorder the resuts are aso a ist in a hierarchy dispay =o$ever you cannot assign

your o$n fied names as you can in the +S-

copy SAP AG BC420 12-31

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 3288

0amp

983209 SAP AG 1999

Recording erie)

Recording

Transfer program

9unction module

ontains onl( the data

from the recording

Test data

Test

reate

reate

reate

reate

1dit hange recording

Process recording

Cou can edit the recording as needed

The recording can e tested and eecuted again The screens are run through in the same $ay as in

the recording

The recording can then e used to create

atch input sessions

Test data

ata transfer programs $ith atch input or ca transaction

Function modues

copy SAP AG BC420 12-32

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 3388

0

983209 SAP AG 1999

1 02 BS

2 SAP02 106

3 BCC$Samp $SZAV

4 BCamp(Camp )00 5 02-($++ -88-10000

6 02-0110

7 02-0130

8 $SZAV

9 SAP02 111

10 BCamp(Camp V

11 BCC$Samp A1AA-amp$S+$1

12 A1AA-S Garden Sree

Program Screen St 9ield ame 9ield alue

Recording 1ditor

Recording

Add gt delete lines 9ormat chec+

Import gt eport of recording

In the editor you can add or deete ines Cou can aso change the contents of individua ines

-ith the function Chec) you can specify $hether the edited version of the recording sti has the

correct synta

Cou can aso eport import recordings to from a seuentia fie

After editing save the recording changes

copy SAP AG BC420 12-33

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 3488

04

983209 SAP AG 1999

Recording Seeral Transaction Runs

RecordingF

Directl( after the first recordingG or

In the displa( mode of the recording

In this step you can record additiona transactions and add additiona transaction runs to the

recording

Cou can record the additiona transactions directy after a recording or in the edit screen of a

recording

copy SAP AG BC420 12-34

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 3588

02

983209 SAP AG 1999

1ditor$ Importing and 1porting Recordings

6 T 9D0amp S

amp SAPM90ampD 608

DltURSR

4

2

8 SAPM90ampD 666

60

66

Program Screen St 9ield name 9ield alue

cempA

e name

aa =orma

cemp

A

e name

aa =orma

1port

Import

Presentation Serer

If the editor functions in the systems do not provide a the functions you need you can do$noad the

recording to your presentation server using the Eort function and then edit the recording using a

P2 editor

Cou use the Import function to import the data ac into the amp System ae sure the fie is sti in

the correct format

copy SAP AG BC420 12-35

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 3688

08

983209 SAP AG 1999

Processing the Recording

Recording

Process )ith ALL TRASATI

Parameer

Proce mode$pdae mode

CA mode

e=a e

Con a=er comm

+o a B eon

nd +o a B mode

A

A

T

The recording can e eecuted directy The data from the recording is used and the transaction is

processed $ith ca transaction

2a transaction provides a range of options for caing appication transactions $hich are discussed

on the foo$ing t$o pages

copy SAP AG BC420 12-36

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 3788

03

983209 SAP AG 1999

Process mode

Update mode

ATT mode

Processing Recording )ith T 6

A

1

Displa( all screens

Displa( errors onl(

o displa(

L

S

A

Local

S(nchronous

As(nchronous

A

o ATT

ATT )ithout indiidual screen control

ATT )ith indiidual screen control

Processing mode

=ere you can specify the processing mode 9 it is the same as the processing mode for atch input

4pdate mode

=ere you can specify the update mode For more information see the unit ca transaction

2ATT mode

=ere you can mae specia settings if you $ant to test the recording under 2ATT conditions (ony

necessary for 2ATT runs) Specia functions are caed in the 2ATT too for each screen at the end of

P5 and at the start of PAI

copy SAP AG BC420 12-37

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 3888

05

983209 SAP AG 1999

Default sie

ont after commit

ot a I session

1nd$ ot a I mode

Processing Recording )ith T amp

The screen standard sie is used for the

processing

ommit )or+ does not end the processing

o I mode is actie The transaction )ill run

through as in online

I mode is selected nce the data in the D

table is processedG the I mode is set to inactie

Standard siDe

If you seect this the screens are processed in the standard siDe in the foreground (in foreground or

dispay errors ony) Note the standard siDe is a$ays used for acground processing

Further after commit

The first commit $or in a transaction does not ead to the end of the recording

Note A atch input transaction is ended $ith the first commit $or

No I mode

The system fied SC9INPT is not set (SC9INPT E ) So transactions are run through as in onine

7nd No I mode

5ny use if you choose the processing mode 7 (dispay errors ony) Then the transaction is processed in the acground in atch input mode and if there is an error the screens run through in

the foreground

copy SAP AG BC420 12-38

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 3988

07

983209 SAP AG 1999

I Mode

atch input

mode

nline

Some transactions behae differentl( in batch input mode

than in online Cbatch input capabilit(

atch input mode sets the s(stem field SIPT H

Not every transaction can run the same onine and in atch input mode The transaction must decide

itsef $hether it is caed onine or in atch input mode

The system sets the system fied SC9INPT E G if the atch input mode is active (this aso appies

to ca transaction) From this system fied the transaction can identify $hether to run onine or in

atch input mode

copy SAP AG BC420 12-39

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 4088

040

983209 SAP AG 1999

reating a Session 9rom the Recording

Recordingnl( contains the data

from the recording

Seon name 02amp

Aoraon ampBS(eep eon

oclt dae 10102000

Cou can create a atch input session directy from the recording that you can then process using the

atch input monitor

copy SAP AG BC420 12-40

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 4188

046

983209 SAP AG 1999

reating Test Data

Test Data

Recording

ranranpBC420AAe name

The file onl( contains the data from the recording

Rgt

Application Serer

Structure

Cou can create a fie from the recordingH the fie $i contain a the fieds from the recording The

fieds are added to the fie $ith the ength you specified in the definition

The fied order corresponds to the order in the recording overvie$ Technica fieds

(2356257 2324ampS5amp and so on) are incuded

The data can ony e stored on the appication server If you do not specify a path the fie is stored in

the $or directory of the appication server

If the specified test fie aready eists the ne$ data record is added to this fie

copy SAP AG BC420 12-41

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 4288

04amp

983209 SAP AG 1999

ed conen

reating a Program

Recording

ZBC420ampProram name

Transfer Program

e daa

ead =rom =e

ran=er =rom recordn

reate

9ile nameTest data

ranranpBC420AA

Cou can generate a program from the recording

In the foo$ing diaog o enter a program name In addition you can choose the type and method

for fiing the maintained fied contents from the recorded screens

4se the vaues used for the recording If you reuire feie data transfer you $i have to modify

this program ater

ParameteriDe the input vaues and read these vaues from a fie A data structure is created for

parameteriDationH the data records are read from an eterna fie into this data structure The

program assumes the fie $as taiored to this data structure

If you have decided to parameteriDe the input vaues you shoud aso create a test fie during

generation To do this seect the checo and enter a name for the fie

The attriute maintenance screen of the AAP editor appears aintain the attriutes and save the

program

copy SAP AG BC420 12-42

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 4388

04

983209 SAP AG 1999

Program 9unctions

Online

transaction

Transfer program

To

error

1rror

ption 6ption ampFlat SAP

structure

Monitor

Cou have no$ generated a data transfer program for importing data into the amp System The

program can eecute the data transfer using atch input or ca transaction

If you choose option 1 and there is an error the data record is paced into a atch input session

copy SAP AG BC420 12-43

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 4488

044

983209 SAP AG 1999

Benerating 9unction Modules

Recording

Zcreaedeor ncon mode

ncon rop

Sor eD

ZBC420

Creae comer

9unction module

nl( one data record can be processed at a time

In the net diaog o you can generate a function modue a function group and short tet from the

recording The function modue is automaticay created in the function group

copy SAP AG BC420 12-44

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 4588

042

983209 SAP AG 1999

9unction of 9unction Modules

Online

transaction

To

error

1rror

ption 6 ption amp

9unction module

Import

Parameter 1port

parameter

Tables

M1SSTA

Monitor

S$BC

Import interface

The import interface consists of a technica part and the fieds from the recording (A parameter is

created for each input fied of the recorded transactions)

7port interface

Simpy consists of the parameter S4amp2 The function modue $i return a vaue in the system

fied SC9S4amp2 after caing ca transaction This return vaue is set to Dero if the data record has

een correcty processed (5ny appies to 2T)

If a session is created you $i e notified $hether the data record coud e paced into the session

Tae interfaceThis is used ony if the function modue $ors $ith ca transaction The tae contains a the

system messages

copy SAP AG BC420 12-45

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 4688

048

983209 SAP AG 1999

Import Interface of 9unction Module

$

Technical

fields

Data

fields

BI session or CALL TRANSACTION

Processin $ode

pdate $ode

a$e oamp BI session iamp (T initial)

Bacround user iamp (T initial)

Delete session aampter processin

Loc date oamp session

ODATA indicator

TU

MD1

UPDAT1

BRUP

US1R

=11P

ELDDAT1

DATA

Cou can use parameter 2T4 to specify $hether the function modue creates a atch input session

(2T4 E ) or updates the data record directy using ca transaction (2T4 E G)

The other parameters are fied as for a atch input session header

Note 7very time the function modue is caed a atch input session is created

If the session is to contain severa transactions proceed as foo$s

ltenerate the transaction severa times This can e achieved y recording the transaction again The

function modue interface $i then contain more than one transaction -hen the function modue is

caed severa transactions can e generated for each session

copy SAP AG BC420 12-46

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 4788

043

983209 SAP AG 1999

The Transaction Recorder

PrinciplesPrinciples

Recording )ith the LSMWRecording )ith the LSMW

Principles of atch Input and all TransactionPrinciples of atch Input and all Transaction

Integrating the TA Program into the DWIntegrating the TA Program into the DW

Using the TA Recorder Using the TA Recorder

copy SAP AG BC420 12-47

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 4888

045

983209 SAP AG 1999

Benerated Program

9unction modules DltP1ltBRUP

DltIS1RT

DltLS1ltBRUP

AAP Program

Define structure of

data in seJuential

fileDefine D

table

pen seJuential file

pen I session

Read data recordCseJuential file

9ill D table

9ill I session gtALL TRASATI

Last data record K

lose I session

lose seJuential file

The generated program has the structure dispayed aove It uses the standard function modues for

creating atch input sessions

copy SAP AG BC420 12-48

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 4988

047

983209 SAP AG 1999

Structure of the Benerated Program

Benerated part

Define D

table

pen seJuential file

pen I session

Read data record

9ill D table

9ill I session gtALL TRASATI

Last data recordK

lose I session

lose seJuential file

Include DR16

Define filestructure

P1ltDATAS1T

P1ltBRUP

DltDPR

Dlt9I1LD

DltTRASATI

LS1ltBRUP

LS1ltDATAS1T

The generated program consists of t$o parts 9 a generated part and the incude 2amp72G8 The

incude is provided in the standard system

The incude contains the definition of the reuired 2 tae and a further seven suroutines These

suroutines eecute the foo$ing functions

5pen and cose fie

5pen and cose session

Fi 2 tae

Fi session

The generated part is the main program and cas the reevant suroutines A structure is aso

generated in the generated part to read the eterna data into the fie

See the Appendi for more information on the 2amp72G8 program

copy SAP AG BC420 12-49

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 5088

020

983209 SAP AG 1999

Structure of D Table

PRBRAM DPR D1BI 9AM 9ALPRBRAMPRBRAM DPRDPR D1BID1BI 9AM9AM 9AL9AL

SAPM90ampD 0602

R90ampD=UR 600000

R90ampDU=RS 0006

R90ampD=T=D =UA

SAPM90ampD 0660

=A6AM16 Smith

=A6PSTL 87000

=A6LAD6 US

=A6SPRAS 1

SAPM90ampD 06amp0

=A6ST1B US6amp428357DDATA

PRBRAM

DPR

D1BI

9AM

9AL

EAR

UM

EAR

EAR

EAR

40

4

6

6amp

6amp

D Module pool

D Screen number

D Start of screen

D 9ield name

D 9ield contents

9ield ame T(pe Length Short Tet

AAP Dictionar(

The 2 tae has the same structure as in a standard transfer

copy SAP AG BC420 12-50

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 5188

026

983209 SAP AG 1999

Read Structure

Recording

DATA BEGIN OF record data element BUKRS bukr$amp data element KTOKD ktokd$amp data element NA(EG) name$+amp data element SORT ortl$ampEND OF record-

record

Automaticall( generated

from recording

The structure of the fie is automaticay generated and is a$ays defined $ith the name amp725amp

The generated structure a$ays has the same ayout 7ach fied is defined y t$o generated ro$s

The first ro$ is a$ays a comment ro$ containing the tet J data eement and the data eement of

the screen fied from the recording In the net ro$ the fied itsef is defined $ith the name of the

data eement foo$ed y a three9digit position numer $hich specifies the ocation in the structure

The ength of the fied is set y the ength of the data eement If a fied is not defined through a data

eement the system uses the ength of the screen fied

copy SAP AG BC420 12-51

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 5288

02amp

983209 SAP AG 1999

pening and losing the 9ile

P1ltDATAS1T

LS1ltDATAS1T

FOR( oendataet USING dataet-O)EN DATASET dataet IN TET (ODE-

IF S01SUBR2 34 - 5RITE 6 te7t1e S01SUBR2-STO)-

ENDIF-

ENDFOR(-

FOR( cloedataet USING dataet-2OSE DATASET dataet-

ENDFOR(-

Include

DR16

The suroutine 5P7N3ATAS7T opens the seuentia fie

The suroutine 2+5S73ATAS7T coses the seuentia fie

copy SAP AG BC420 12-52

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 5388

02

983209 SAP AG 1999

9unction Modules for I Program

lient

Session name

Eold date

=eep session

D user name

RecordK

LI1T

BRUP

ELDDAT1

=11P

US1R

R1RD

DltP1ltBRUPDltP1ltBRUP

Transaction code

D table

TD1

DPRTA

DltIS1RTDltIS1RT

DltLS1ltBRUPDltLS1ltBRUP

pen Isessionpen Isession

Insert data for

transactions

Insert data for

transactions

lose I

session

lose I

session

The foo$ing function modues are provided for creating atch input sessions (function group

S2)

235P7N3ltamp54P

2reates a ne$ session and contains genera data for the $hoe session

23INS7ampT

Inserts a the data for a transaction into the session The transferred interna tae $ith the

structure 2ATA must contain a the data reuired for fuy processing the transaction

232+5S73ltamp54P

2oses the session after a the data has een inserted As soon as the session has een cosed it

can e processed

The interna tae $ith the structure 2ATA can ony contain atch input data for one singe

transaction run So the individua transactions are inserted into the atch input session in a oop

using severa 23INS7ampT cas

copy SAP AG BC420 12-53

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 5488

024

983209 SAP AG 2001

9unction Module DltP1ltBRUP

ALL 9UTI DltP1ltBRUPALL 9UTI DltP1ltBRUP

1PRTIB

LI1T client

BRUP session name

ELDDAT1 loc+ date

=11P delete flag

US1R bdc user name

R1RD recording

IMPRTIB

NID internal session +e(

11PTIS

1PRTIB

LI1T client

BRUP session name

ELDDAT1 loc+ date

=11P delete flag

US1R bdc user name

R1RD recording

IMPRTIB NID internal session +e(

11PTIS

-ith the function modue 235P7N3ltamp54P you can open a atch input session

The foo$ing parameters are mandatory

2+I7NT (cient)

ltamp54P (session name)

4S7amp (user name)

Note The 4S7amp must a$ays e specified This user name is reuired for processing the session

in atch mode

The foo$ing parameters are optiona

=5+AT7 specifies the eariest date on $hich the session can e started677P fag specifies $hether session shoud e deeted after it has een successfuy processed The

677P fag is ignored if the session contains errors

677P E K K means deete the session after processing (defaut vaue) H

677P E KGK means do not deete session

amp725amp E KGK ao$s you to create a recording instead of a I session

If gtI is specified the function modue returns the interna session ey This is needed to e ae to

differentiate sessions that have the same name

-ith 7G27PTI5NS you get various return vaues that can e ueried $ith SC9S4amp2

Note In onine mode the onine user is used for the authoriDation checs regardess of the user

name specified

copy SAP AG BC420 12-54

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 5588

022

983209 SAP AG 1999

Subprogram P1ltBRUP

P1ltBRUP

FOR( oen8rou-IF e9on -

2A FUN2TION BD2O)ENGROU) E)ORTING 2IENT lt1mandt GROU) 8rou USER uer KEE) kee

=ODDATE gtolddate-

ENDIF-ENDFOR(-

Include

DR16

The suprogram 5P7N3ltamp54P opens the atch input session

copy SAP AG BC420 12-55

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 5688

028

983209 SAP AG 1999

9unction Module DltIS1RT

ALL 9UTI DltIS1RTALL 9UTI DltIS1RT

IMPRT

TD1 Transaction code

PSTltLAL Update locall(

PRITIB print list

TAL1S DPRTA bdclttable

11PTIS

IMPRT

TD1 Transaction code

PSTltLAL Update locall(

PRITIB print list

TAL1S DPRTA bdclttable

11PTIS

-ith the function modue 23INS7ampT you can add transaction data to the session

Cou need an interna 2 tae to transfer the data

The foo$ing parameters are mandatory

T257 Transaction code

CNPamp5TA 2 tae

The foo$ing parameters are optiona

P5ST3+52A+ E KGK activates oca updating This means that the data to e updated is ept in the

appication server and updated in the ast step of the transaction This does not invove the update

process (For more information see course 28 Programming ataase 4pdates)

PampINTINlt E KGK 9 ists processed in I $i e printed immediatey -ith 7G27PTI5NS you get various return vaues that can e ueried $ith SC9S4amp2

copy SAP AG BC420 12-56

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 5788

023

983209 SAP AG 1999

Subprogram DltTRASATI

DltTRASATI

FOR( BD2TRANSA2TION USING tcode-

IF e9on -2A FUN2TION BD2INSERT

E)ORTING T2ODE tcode TABES D0N)ROTAB bdcdata-

ESE-

ENDIF-ENDFOR(-

T

Include

DR16

The suprogram 23TampANSA2TI5N moves the fied 2 tae either to a atch input session

or uses ca transaction to import the data into the system 5n the seection screen you can specify

$hether you $ant to create a session or you $ant to use ca transaction to process the data directy

The S7SSI5N fied is then set according to your seection

copy SAP AG BC420 12-57

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 5888

025

983209 SAP AG 1999

9unction Module DltLS1ltBRUP

ALL 9UTI DltLS1ltBRUP

11PTIS

TltP1 6

NU1U1lt1RRR amp

-ith the function modue 232+5S73ltamp54P you can cose a atch input session

In 7G27PTI5NS you get various return vaues that can e ueried $ith SC9S4amp2

copy SAP AG BC420 12-58

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 5988

027

983209 SAP AG 1999

Subprogram LS1ltBRUP

FOR( cloe8rou-IF e9on -cloe batcgt 9nut 8rou

2A FUN2TION BD22OSEGROU)-

ESE-IF e8rouoened -

2A FUN2TION BD22OSEGROU)-

ENDIF-ENDIF-

ENDFOR(-

LS1ltBRUPlose session

lose error session

Include

DR16

The suprogram 2+5S73ltamp54P coses the atch input session The suprogram differentiates

et$een a norma I session (S7SSI5N E G) and a session opened $hen ca transaction

encountered an error (73ltamp54P35P7N7 E G)

copy SAP AG BC420 12-59

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 6088

080

983209 SAP AG 1999

Subprograms DltDPRG Dlt9I1LD

DltDPR

Dlt9I1LD

FOR( bdc9eld USING nam al-IF al 34 nodata-2EAR bdcdata- bdcdata1nam nam- bdcdata1al al- A))END bdcdata-ENDIF-

ENDFOR(-

FOR( bdcdltnro USING ro8ram dltnro- 2EAR bdcdata-Bdcdata1ro8ram ro8ram-Bdcdata1dltnro dltnro-Bdcdata1dltnbe89n - A))END bdcdata-ENDFOR(-

Include

DR16

The incude 2amp72GG contains t$o suprograms 23CNPamp5 and 23FI7+

Suprogram 23CNPamp5 fis the 2 tae $ith program names and screen numers

Suprogram 23FI7+ fis the 2 tae $ith fied names and vaues

7ach suprogram creates an entry in the 2 tae

copy SAP AG BC420 12-60

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 6188

086

983209 SAP AG 1999

9illing the D Table

erorm bdcdltnro u9n8 SA)(FD +- erorm bdc9eld u9n8 BD22URSOR RFD1BUKRS- erorm bdc9eld u9n8 BD2OK2ODE 6- erorm bdc9eld u9n8 RFD1BUKRS record1BUKRS- erorm bdc9eld u9n8 RFD1KTOKD record1KTOKD-

erorm bdcdltnro u9n8 SA)(FD -

erorm bdc9eld u9n8 BD22URSOR KNA1S)RAS- erorm bdc9eld u9n8 BD2OK2ODE 6- erorm bdc9eld u9n8 KNA1NA(E record1NA(E-

erorm bdc9eld u9n8 KNA1SORT record1SORT-

Recording Benerated automaticall(

from the recording

)ERFOR( bdcdltnro USING SA)(FD +- )ERFOR( bdc9eld USING BD22URSOR RFD1BUKRS-)ERFOR( bdc9eld USING BD2OK2ODE 6-)ERFOR( bdc9eld USING RFD1BUKRS record1BUKRS-)ERFOR( bdc9eld USING RFD1KTOKD record1KTOKD-

)ERFOR( bdcdltnro USING SA)(FD -

)ERFOR( bdc9eld USING BD22URSOR KNA1S)RAS-)ERFOR( bdc9eld USING BD2OK2ODE 6-)ERFOR( bdc9eld USING KNA1NA(E record1NA(E-

)ERFOR( bdc9eld USING KNA1SORT record1SORT- ---

The 2 tae is fied $ith data from the recording The suroutines 23CNPamp5 and

23FI7+ are used for this

The suroutines are caed in the reuired structure or seuence

copy SAP AG BC420 12-61

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 6288

08amp

983209 SAP AG 1999

erie)

SAPDatabase

SeJuential9ile

SAPDatabase

ALL TRASATIALL TRASATI

SeJuential9ile

ATE IPUTATE IPUT

D TableD TableD TableD Table

I Monitor

T

In contrast to atch input you can use ca transaction to directy pass data to the diaog interface

$ithout using a atch input session Cou use an interna tae (2 tae same structure and ayout

as atch input) to temporariy store your screen data Then you ca the desired transaction in your

program

Note 5n average the 2a Transaction method is 8 to times faster than using atch Input

copy SAP AG BC420 12-62

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 6388

08

983209 SAP AG 1999

all Transaction Program$ 1ample

RE)ORT abcbdcdcdeb9ct-

)ARA(ETERS d9mode DEFAUT A

udmode DEFAUT S-FOR( calltranact9on-2A TRANSA2TION FD

USING bdcdata (ODE d9mode

U)DATE udmode-

IF lt1ubrc NE - 5RITE 6 ---

ENDIF-ENDFOR(-

Screen

00

Screen

100

Screen

An additiona system ro area is added for the caed transaction The system uses this area for

processing the individua screens in the transactionH the data from the tae is added here After the

transaction is processed the second ro area is reeasedH the system continues processing in the first

ro area

Notes

In contrast to atch input there is no error ogging (error sessions) here For processing the caed

transaction the system uses the authoriDations of the user that caed the transaction The 2 tae

can ony hod data for one transaction run at a time efore another transaction is caed and its data

can e added you must eecute a amp7Famp7S= for the 2 tae

copy SAP AG BC420 12-63

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 6488

084

983209 SAP AG 1999

ALL TRASATI C6

RE)ORT 777-

2A TRANSA2TION FD USING bdcdata (ODE E-

Default for MD1 is A

2A TRANSA2TION 3tranact9oncode4 USING 3bdc1table4 C (ODE A E N C-

-ith the parameter 57 you can seect a specific dispay mode for processing the transaction The

foo$ing three modes are avaiae

A (ispay a)

If you eecute the program a the screens and a their data are dispayed This is the defaut vaue

for the 57 in 2A++ TampANSA2TI5N

N (ispay nothing)

The screens are not dispayed at a regardess of $hether any of them contained errors As soon as

the transaction has een fuy processed contro is returned to your program (The vaue of the

parameter 4PAT7 determines $hether dataase updates are eecuted or not)

7 (ispay errors ony)As soon as an error occurs in a screen the transaction is s$itched to dispay mode so that you can

correct the errors

These dispay modes are the same as those in the atch input session processing

copy SAP AG BC420 12-64

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 6588

082

983209 SAP AG 1999

RE)ORT 777-

2A TRANSA2TION FD USING BD2DATA U)DATE -

ALL TRASATI Camp

RE)ORT 777-

2A TRANSA2TION FD USING bdcdata U)DATE -

2A TRANSA2TION 3tranact9oncode4 USING 3bdc1table4 C (ODE A E N C U)DATE A S C -

Default for UPDAT1 is A

-ith the parameter 4PAT7 you can contro ho$ dataase updates arising from a transaction are

carried out There are three options

A (asynchronous updating) The caed transaction does not $ait unti the dataase has een

updated it simpy for$ard the updates to the SAP update service This usuay speeds up the 2T

program This processing mode is N5T recommended for arge data sets as the caed transaction

does not receive a competion message from the update modue

The caing 2T program therefore cannot te if the transaction has een successfuy competed Cou

shoud use the updating administration function (transaction S8) to determine $hether updating

$as terminated eary The error anaysis correction functions for are ess hepfu than $ith

synchronous updating

S (synchronous updating) -ith synchronous updating the caed transaction $aits unti a the

updates have een competed So processing is so$er than $ith synchronous updating The caed

transaction can ho$ever report any updating errors to the program $hich maes error

anaysiscorrection easier

+ (local updating) $ith oca updating the dataase is not updated in a separate process it is

updated in the caers process (see appication hep documentation for the AAP ey$ord S7T

4PAT7 TAS6 +52A+)

copy SAP AG BC420 12-65

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 6688

088

983209 SAP AG 1999

ALL TRASATI C

RE)ORT 777-DATA mtab T0)E TABE OF bdcm8coll-

2A TRANSA2TION FD USING bdcdata (ESSAGES INTO mtab-

2A TRANSA2TION 3tranact9oncode4 USING 3bdc1table4 C (ODE A E N C U)DATE A S C (ESSAGES INTO 3metab4 C -

7SSAlt7S specifies that a system messages that are output during the eecution of a 2A++

TampANSA2TI5N are $ritten to the interna tae L7SSTA The interna tae must have the

structure 2Slt25++

4nie the cassica atch input processing $ith sessions 2A++ TampANSA2TI5N does not offer any

specia processing procedures for transactions containing errors There are no restart functions for

transactions that contain errors or that cause updating terminations

copy SAP AG BC420 12-66

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 6788

083

983209 SAP AG 1999

ALL TRASATI C4

RE)ORT 777-DATA mltot T0)E ctuaram-

2A TRANSA2TION FD USING BD2DATA

O)TIONS FRO( mltot-

2A TRANSA2TION 3tranact9oncode4 USING 3bdc1table4 C (ODE A E N C U)DATE A S C (ESSAGES INTO 3metab4 C O)TIONS FRO( ot C -

RE)ORT 777-DATA mltot T0)E ctuaram-2A TRANSA2TION FD USING bdcdata

O)TIONS FRO( mltot-

The addition 5PTI5NS enaes the ca transaction statement to e controed through a structure

The structure must have the dictionary type 2T43PAampAS

The addition 5PTI5NS Famp5 must not e comined either $ith the addition 57 or $ith

4PAT7 ore information on the net side

copy SAP AG BC420 12-67

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 6888

085

983209 SAP AG 1999

Structure TUltPARAMS

DISMD1 Procen mode anaoo o addon amp

UPDMD1 $pdae mode anaoo o addon $PA

ATTMD1 CA mode CA conro

D19SI1 orce de=a EndoE e drn procen

RAMMIT +o eD a Camp amp(

IPT +o a ac np eonF a F S-B+P SPAC

I1D +o a ac np eon a=er end o= BC daa

The components are defined as foo$s

The components 7FSIM7 ampA25IT N5INPT and N5I7N can have the foo$ing

vaues KGK E Ces or K K E No

If the addition 5PTI5NS Famp5 is not specified the foo$ing settings appy to the contro

parameters

IS57 from addition 57

4P57 from addition 4PAT7

2ATT57 2ATT not active

7FSIM7 o not not use defaut $indo$s siDe

ampA25IT Successfu eit at 25IT -5amp6

N5INPT atch input session active (SC9INPT E G)

N5I7N atch input session sti active after end of 2 data

copy SAP AG BC420 12-68

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 6988

087

983209 SAP AG 1999

SMSBID Message ID

SMSBT Message T(pe C1GIGWGSGA

SMSB Message umber

SMSB6 Message ariable 6

SMSBamp Message ariable amp

SMSB Message ariable

SMSB4 Message ariable 4

SMSBID Message ID

SMSBT Message T(pe C1GIGWGSGA

SMSB Message umber

SMSB6 Message ariable 6

SMSBamp Message ariable amp

SMSB Message ariable

SMSB4 Message ariable 4

Return code$

S(stem fields$

alue Meaning

0 Successful

6000 1rror in transaction

6000 1rror in processing call transaction

see also the s(stem fields specified

alue Meaning

0 Successful

6000 1rror in transaction

6000 1rror in processing call transaction

see also the s(stem fields specified

9ield name Meaning9ield name9ield name MeaningMeaning

Return ode and S(stem 9ields

The return code is used to specify $hether the caed transaction $as processed successfuy In

addition severa system fieds are fied The numer I type and variaes of the diaog message

output y the caed transaction Cou need this information to output the message tet

copy SAP AG BC420 12-69

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 7088

030

983209 SAP AG 1999

Benerated Program of the TA Recorder

REFRES= (ESSTAB-

2A TRANSA2TION tcode USING bdcdata (ODE ctumode U)DATE cudate (ESSAGES INTO metab-OO) AT metab- ENDOO)-IF lubrc 34 AND e8rou 34 S)A2E- IF e8rouoenend - 2A FUN2TION BD2O)ENGROU) E)ORTING ---------

--------- E8rouoened - ENDIF- 2A FUN2TION BD2INSERT E)ORTING T2ODE tcode TABES D0N)ROTAB bdcdata-ENDIF-REFRES= bdcdata-

Message table output

pen error session

Insert data record that

has errors into error

session

If you have seected ca transaction on the seection screen the generated program runs as foo$s

The onine transaction is caed $ith ca transaction and passed to tae 2ATA A the

messages arising during the ca transaction are put in the interna tae 7SSTA

7SSTA is output as a ist

If you have specified an error session ( 73ltamp54P L SPA27) on the seection screen and the

ca transaction comes across an error (+3S4amp2 L 0) the error session is opened The error

session is ho$ever ony opened once Then the data record is paced in the session

A the other data records that have errors $ith ca transaction are paced in the same session

copy SAP AG BC420 12-70

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 7188

036

983209 SAP AG 1999

The Transaction Recorder

PrinciplesPrinciples

Recording )ith the LSMWRecording )ith the LSMW

Principles of atch Input and all TransactionPrinciples of atch Input and all Transaction

Integrating the TA Program into the DWIntegrating the TA Program into the DW

Using the TA Recorder Using the TA Recorder

copy SAP AG BC420 12-71

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 7288

03amp

983209 SAP AG 1999

Integrating into the DW

Transfer program

AAP Dictionar(

Integrate

SDA0

SDA6

SDAamp

SDA

Cou can integrate the generated program into the G9- The structure of the fie must e created

in the AAP ictionary The taes SGA0 SGA8 SGA1 and SGA $i e fied

copy SAP AG BC420 12-72

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 7388

03

983209 SAP AG 1999

DW Release 42

Goo

-B eeae 45

aa ran=er ogtec

Int customer data transfer ob-ect

ecord =ed

Dece daa ran=er

d Goo

The ampunction ampor interatin TA recorder prora$s is

i$ple$ented in the

D+-B in Release

The recorder can e integrated as of ampeease and it is provided in the G9- ampeease

ltot to the G9- ampeease 5n the initia screen you can integrate programs y choosing ampoto

( +nt customer ata transfer o-ect

copy SAP AG BC420 12-73

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 7488

034

983209 SAP AG 1999

reating Program as D b-ect

Comer ran=er ogtec

ampgtec ype

Sor eD =or ogtec

aa ran=er proram

Srcre name

9900

(+A1

Cane comer

ZBCA+G

ZB

ustomer transfer ob-ect

umber bet)een 7000 and 7777

b-ect t(pe

Assignment to R ob-ect

Short tet for D ob-ectShort description

Data transfer program

ame of generated program

Structure name

A structure Cstructure la(out )ith this name is created in

the AAP Dictionar(

For ampeease transfer oects $ere not organiDed y 5amp oects ut y a G numer (00089

OOOO) The numer range O0009OOOO is reserved for customers

To create a connection to the ne$ G 9- you must assign the program to a 5amp oect

2reate a short tet for the G oect This tet $i appear in the method seection ist

Specify the program to e incuded

Specify a name for the structure to e created in the AAP ictionary

Note $he generated program appears under program type +N and not under program type

-

copy SAP AG BC420 12-74

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 7588

032

983209 SAP AG 1999

Adantages

Automatic program registration in the DW in

Release 48

ou can use all the functions defined for

standard ob-ects

1ception$ The (reate ampile ith data

function

If you incuded the oect in the ampeease $orench it is automaticay avaiae in the ampeease

B $orench

A the $orench functions are avaiae for your oect ecept for Create files ith transfer ata

copy SAP AG BC420 12-75

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 7688

038

983209 SAP AG 1999

ou are no) able to$

The Transaction Recorder$ Unit Summar(

Use the recording function in the LSMW to create

a batch input session )ith the data from the

eternal s(stem

Use the TA Recorder to create (our o)n data

transfer program

Anal(e programs that )or+ )ith batch input or

call transaction

Integrate the TA Recorder programs into the

DW

copy SAP AG BC420 12-76

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 7788

ercise 1

nit $ -ecorder

$opic 2reating etors

$ransaction -ecorder ercise 1

bull 2reating detors $ith eterna numer assignment

bull etor numers M9980008 to M9980080

Address data for detors $ith eterna numer assignment is to

e transferred using program ampFI700

ro4ect F5

Supro4ect +5

-un +575

$as)s 85 95 8S25

9oad program -F+00

8 In the foo$ing eercises eisting data is to e changed Therefore these detors $ith

eterna numer assignment have to first e created

898 4nder suproect 79 create run 797G9 $ith the name Detors ith

eternal numers

copy SAP AG BC420 12-77

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 7888

891 2reate the foo$ing three tass The tass map the foo$ing process steps

convert data create + session and process + session

89198 In run 797G9 create the foo$ing tas

9 Tas AP9

9 Name 2onvert data 9 Tas type AP

9 Program type +S-

Seect the foo$ing +S- oect

+S- proect 2109

+S- suproect 7I9

+S- oect I997GT

89191 In run 797G9 create the foo$ing tas 9 Tas +5A9

9 Name 2reate I session

Tas type +5A

9 Program type INP

Seect program ampFI700 $ith the variant

I97G9

8919 In run 797G9 create the foo$ing tas

9 Tas S29

9 Name Process I session Tas type S2

9 Program type amp7P5

Seect program ampS2S4 $ith the variant

S497G9

Note that you have to correct the seuence of the tass 2onvert data

create + session and process + session

4se the uttons

89 Start the run

The detors $i e created $ith eterna numer assignments

89 2hec in transaction F0 that the detors M9980008 to M9980080 have een

created

copy SAP AG BC420 12-78

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 7988

ercise

nit $ransaction -ecorder

$opic -ecording function in the 9S8(

bull 2reate a recording using the +S-

bull ltenerate a atch input session

2hange the detor address data in the amp System

Name of the recording +

Name of the file +2055+F9

8 2reate the recording 7I3 using the +S- ampecord the transaction F01 (2hange

detor)

898 efore you create the recording first test the transaction onineQ

For the recording use detor M9980008 5n the initia screen of the F01

maintain the foo$ing fieds ony

etor etor M9980008

2ompany code 0008

Address data seect

Note $he data record must e saved hile recording

891 aintain the names and the descriptions for the foo$ing fieds

Name city street posta code and teephone numereete a other fieds in screen 880 from the recording (eg S5ampT+ +AN8

SPampAS)

4se the same technica names as sho$n in the tae eo$ (automatic fied

mapping)

copy SAP AG BC420 12-79

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 8088

1 2reate the suproect 7I9 and the ne$ oect TA3 in your proect 2109

aintain the oect attriutes and seect the item atch input recording Seect your

recording 7I3

2reate the source structure address

2reate the source fieds according to the tae eo$ 5r copy them from proect 2109S37N suproect 7I900 oect TA900

198 Fie setup The data from the egacy system are dispayed in the foo$ing tae

Fied name Fied type Fied ength escription

N5 2 8B etor numer

NA7 2 Name

STamp77T 2 Street

2ITC 2 2ityPace of residence

MIP 2 80 Posta code

T7+ 2 8B Teephone numer

191 aintain the fied mapping 4se the automatic fied mapping (via menu item

7tras)

19 Specify the fies 5ny maintain the fie name of the source fie

Name of the fie 21099IFI+7

2odepage 8800

19 Import the data and convert them ispay the data in each caseQ

19 2reate a atch input session

19B ampun the atch input session

copy SAP AG BC420 12-80

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 8188

ercise 3

nit $ransaction -ecorder

$opic -ecording ith the $ -ecorder

bull ltenerate a recording using the TA recorder

bull Test the recording

2hange the address data of detors in the amp system

Name recording $+

Name of the file +2055+F9

8 2reate the recording TA37I3 using the transaction recorder ampecord the

transaction F01 (change detor)

898 4se detor M9980008 for the recording 5n the F01 initia screen ony

maintain the foo$ing fieds

etor etor M9980008

2ompany 2ode 0008

Address data seect

Note $he data record must e saved hen recording

eete a fieds that do not eist in the source fie 21099IFI+7 from screen

880 in the recording (eg 6NA89S5ampT+ 6NA89+AN8 6ANNQ9SPampAS) Note o not deete fieds ampF01946ampS and ampF0190880

Save the recording no$

1 S$itch to the recordings overvie$

198 Process the recording $ith the processing mode A (dispay a)

191 Process the recording $ith the processing mode RN (no dispay)

19 If the recording has een tested and no error has occurred generate a I session

and run it using the I monitor If an error shoud occur generate the recordingagainQ

copy SAP AG BC420 12-81

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 8288

From the recording generate the program M21037I3 in your deveopment cass

2109 Seect the foo$ing

bull ampead fied contents from fie

bull 2reate test data in the fie 2103dei3test3tt

98 Save this program and eecute it ltenerate one I session each and process it

2arry out the same steps again using the ca transaction

The generated program shoud no$ e changed so that fie 21099IFI+7 can e

read and processed

98 2hange the defaut vaue of the fie name (parameter dataset) in 21099

IFI+7

91 2hange the structure definition eete the company code fied and the address

data checo from the structure

9 2hange the su9routine ca perform dc3fied for the company code (KampF019

46ampSK) so that the vaue 0008 is transferred

9 2hange the su9routine ca perform dc3fied for the address data checo

(KampF0190880K) so that the vaue G is transferred

9 Start the program again and read the data from the fie 21099IFI+7 $ith

detor data ltenerate a I session $ith it and run it

copy SAP AG BC420 12-82

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 8388

033 Include DR16INCLUDE BDCRECX1

SELECTION-SCREEN BEGIN OF LINE

PARAMETERS SESSION RADIOBUTTON GROUP CTU create sessi SELECTION-SCREEN COMMENT $amp TEXT-S FOR FIELD SESSION

se(ecti-scree )siti +

PARAMETERS CTU RADIOBUTTON GROUP CTU ca(( trasacti

SELECTION-SCREEN COMMENT $amp TEXT-S FOR FIELD CTU

SELECTION-SCREEN END OF LINE

SELECTION-SCREEN BEGIN OF LINE

SELECTION-SCREEN COMMENT $amp TEXT-S1 FOR FIELD GROUP

se(ecti-scree )siti $+

PARAMETERS GROUP1$amp r) ae 0 sessi

SELECTION-SCREEN COMMENT $amp TEXT-S+ FOR FIELD CTUMODE

se(ecti-scree )siti

PARAMETERS CTUMODE LIE CTU2PARAMS-DISMODE DEFAULT 3N3

A4 s56 a(( 78)rs

E4 s56 78)r errr (8

N4 7 t 7is)(a8 78)r

SELECTION-SCREEN END OF LINE

SELECTION-SCREEN BEGIN OF LINE

SELECTION-SCREEN COMMENT $amp TEXT-S$ FOR FIELD USER

se(ecti-scree )siti $+

PARAMETERS4 USER1$amp DEFAULT S9-UNAME ser 0r sessi i atc5

SELECTION-SCREEN COMMENT $amp TEXT-S FOR FIELD CUPDATE

se(ecti-scree )siti

PARAMETERS CUPDATE LIE CTU2PARAMS-UPDMODE DEFAULT 3L3

S4 s8c5rs(8

A4 as8c5rs(8

L4 (ca(

SELECTION-SCREEN END OF LINE

SELECTION-SCREEN BEGIN OF LINE

SELECTION-SCREEN COMMENT $amp TEXT-S FOR FIELD EEP

se(ecti-scree )siti $+

PARAMETERS4 EEP AS CltECBOX 3 3 = 7e(ete sessi i0 0iis5e7

3X3 = gtee) sessi i0 0iis5e7

SELECTION-SCREEN COMMENT $amp TEXT-S FOR FIELD E2GROUP

copy SAP AG BC420 12-83

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 8488

se(ecti-scree )siti

)araeters E2GROUP1$amp r) ae 0 errr-sessi

SELECTION-SCREEN END OF LINE

SELECTION-SCREEN BEGIN OF LINE

SELECTION-SCREEN COMMENT $amp TEXT-S FOR FIELD ltOLDDATE

se(ecti-scree )siti $+

PARAMETERS4 ltOLDDATE LIE S9-DATUM

SELECTION-SCREEN COMMENT +11amp TEXT-S$ FOR FIELD E2USER

se(ecti-scree )siti

PARAMETERS4 E2USER1$amp DEFAULT S9-UNAME ser 0r errr-sessi

SELECTION-SCREEN END OF LINE

SELECTION-SCREEN BEGIN OF LINE

SELECTION-SCREEN COMMENT +11amp TEXT-S FOR FIELD E2EEP

se(ecti-scree )siti

PARAMETERS4 E2EEP AS CltECBOX 3 3 = 7e(ete sessi i0 0iis5e7

3X3 = gtee) sessi i0 0iis5e7

SELECTION-SCREEN END OF LINE

SELECTION-SCREEN BEGIN OF LINE

SELECTION-SCREEN COMMENT +11amp TEXT-S FOR FIELD E2ltDATE

se(ecti-scree )siti

PARAMETERS4 E2ltDATE LIE S9-DATUM

SELECTION-SCREEN END OF LINE

SELECTION-SCREEN SIP

SELECTION-SCREEN BEGIN OF LINE

SELECTION-SCREEN COMMENT 1amp TEXT-S1 FOR FIELD NODATA

PARAMETERS4 NODATA DEFAULT 33 LOER CASE 7ata

SELECTION-SCREEN END OF LINE

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

Batc5i)t7ata 0 si(e trasacti

DATA4 BDCDATA LIE BDCDATA OCCURS ITlt ltEADER LINE

essaes 0 ca(( trasacti

DATA4 MESSTAB LIE BDCMSGCOLL OCCURS ITlt ltEADER LINE

errr sessi )ee7 3 3 r 3X3amp

DATA4 E2GROUP2OPENED

essae tets

TABLES4 T1

copy SAP AG BC420 12-84

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 8588

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

at se(ecti scree

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

AT SELECTION-SCREEN

r) a7 ser st e 0i((e7 0r create sessi

IF SESSION = 3X3 AND

GROUP = SPACE OR USER = SPACE

MESSAGE E1MSamp

ENDIF

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

)e 7ataset

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

FORM OPEN2DATASET USING P2DATASET

OPEN DATASET P2DATASET IN TEXT MODE

IF S9-SUBRC

RITE4 TEXT-E S9-SUBRC

STOP

ENDIF

ENDFORM

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

c(se 7ataset

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

FORM CLOSE2DATASET USING P2DATASET

CLOSE DATASET P2DATASET

ENDFORM

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

create atc5i)t sessi

t 0r ca(( trasacti siamp

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

FORM OPEN2GROUP

IF SESSION = 3X3

SIP

RITE4 $amp 3Create r)3I1amp GROUP

SIP

)e atc5i)t r)

CALL FUNCTION 3BDC2OPEN2GROUP3

EXPORTING CLIENT = S9-MANDT

copy SAP AG BC420 12-85

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 8688

GROUP = GROUP

USER = USER

EEP = EEP

ltOLDDATE = ltOLDDATE

RITE4 amp 3BDC2OPEN2GROUP3I$amp

1$amp 3retrc7e43I+amp

S9-SUBRC

ENDIF

ENDFORM

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

e7 atc5i)t sessi

ca(( trasacti si4 errr sessiamp

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

FORM CLOSE2GROUP

IF SESSION = 3X3

c(se atc5i)t r)

CALL FUNCTION 3BDC2CLOSE2GROUP3

RITE4 amp 3BDC2CLOSE2GROUP3Iamp

1$amp 3retrc7e43I+amp

S9-SUBRC

ELSE

IF E2GROUP2OPENED = 3X3

CALL FUNCTION 3BDC2CLOSE2GROUP3

RITE4

RITE4 amp 3Fe5(era))e 6r7e eret3Iamp

ENDIF

ENDIF

ENDFORM

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

Start e6 trasacti accr7i t )araeters

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

FORM BDC2TRANSACTION USING TCODE

DATA4 L2MSTRINGamp

DATA4 L2SUBRC LIE S9-SUBRC

atc5 i)t sessi

IF SESSION = 3X3

CALL FUNCTION 3BDC2INSERT3

EXPORTING TCODE = TCODE

TABLES D9NPROTAB = BDCDATA

RITE4 3BDC2INSERT3Iamp

copy SAP AG BC420 12-86

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 8788

TCODE

3retrc7e43I+amp

S9-SUBRC

3RECORD43

S9-INDEX

ca(( trasacti si

ELSE

REFRESlt MESSTAB

CALL TRANSACTION TCODE USING BDCDATA

MODE CTUMODE

UPDATE CUPDATE

MESSAGES INTO MESSTAB

L2SUBRC = S9-SUBRC

RITE4 3CALL2TRANSACTION3

TCODE

3retrc7e43I+amp

L2SUBRC

3RECORD43

S9-INDEX

LOOP AT MESSTAB

SELECT SINGLE FROM T1 ltERE SPRSL = MESSTAB-MSGSPRA

AND ARBGB = MESSTAB-MSGID

AND MSGNR = MESSTAB-MSGNR

IF S9-SUBRC =

L2MSTRING = T1-TEXT

IF L2MSTRING CS 313

REPLACE 313 ITlt MESSTAB-MSGH1 INTO L2MSTRING

REPLACE 3$3 ITlt MESSTAB-MSGH$ INTO L2MSTRING

REPLACE 33 ITlt MESSTAB-MSGH INTO L2MSTRING

REPLACE 33 ITlt MESSTAB-MSGH INTO L2MSTRING

ELSE

REPLACE 33 ITlt MESSTAB-MSGH1 INTO L2MSTRING

REPLACE 33 ITlt MESSTAB-MSGH$ INTO L2MSTRING

REPLACE 33 ITlt MESSTAB-MSGH INTO L2MSTRING

REPLACE 33 ITlt MESSTAB-MSGH INTO L2MSTRING

ENDIF

CONDENSE L2MSTRING

RITE4 MESSTAB-MSGT9P L2MSTRING$+amp

ELSE

RITE4 MESSTAB

ENDIF

ENDLOOP

copy SAP AG BC420 12-87

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 8888

SIP

Eree 0e5(era))e

IF L2SUBRC AND E2GROUP SPACE

IF E2GROUP2OPENED = 3 3

CALL FUNCTION 3BDC2OPEN2GROUP3

EXPORTING CLIENT = S9-MANDT

GROUP = E2GROUP

USER = E2USER

EEP = E2EEP

ltOLDDATE = E2ltDATE

E2GROUP2OPENED = 3X3

ENDIF

CALL FUNCTION 3BDC2INSERT3

EXPORTING TCODE = TCODE

TABLES D9NPROTAB = BDCDATA

ENDIF

ENDIF

REFRESlt BDCDATA

ENDFORM

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

Start e6 scree

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

FORM BDC2D9NPRO USING PROGRAM D9NPRO

CLEAR BDCDATA

BDCDATA-PROGRAM = PROGRAM

BDCDATA-D9NPRO = D9NPRO

BDCDATA-D9NBEGIN = 3X3

APPEND BDCDATA

ENDFORM

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

Isert 0ie(7

Page 10: BC420_46C - 012The Transaction Recorder

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 1088

060

983209 SAP AG 1999

Results of the Recording

Recording

SAPM90ampD 0608

DltURSR R90ampD=UR

Dlt=D1 gt00

R90ampD=UR 5560000

R90ampDD0660

US1ltA

SAPM90ampD 0666

Dlt=D1 UPDA

DltSUSR SAPLSA6 000ADDR1SS DltSUSR SAPLSA6 006UTRltSR11

DltURSR SA6ltD0600T1LltUM1R

ADDR6ltDATASTR11T 4 Barden Street

ADDR6ltDATAPSTltD1 0amp602

ADDR6ltDATAIT6 oston

SA6ltD0600T1LltUM1 8638257755

The resut of the recording is a ist of a the fieds and fied vaues that $ere changed in the

recording

copy SAP AG BC420 12-10

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 1188

066

983209 SAP AG 1999

Special Recording 9ields

9unction code triggered on

this screen

9ield name )here cursor

)as last positioned on the

screen

Comer

Company code

Z-88-10000

Genera daa

Dlt=D1

DltURSR

uring a recording the foo$ing additiona fieds are automaticay recorded

The BDC_OKCODE fied contains the function code triggered on the screen

The BDC_CURSOR fied contains the fied name of the ast fied the cursor $as positioned in

efore eiting the screen

copy SAP AG BC420 12-11

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 1288

06amp

983209 SAP AG 1999

Determining the 9ield ame

Technical info

Screen field

R90ampD =UR

Comer

Company code

Z-88-10000

Genera daa

96help

Sa

Program SAPM90ampDScreen number 608

The information recorded in the TA recorder can aso e dispayed onine for each transaction

To find out the current modue poo name and the screen numer choose Systemrarr Status from the

menu

To determine the fied name pace the cursor on a fied and seect F8 hep The name of the screen

fied can e found under technical information

copy SAP AG BC420 12-12

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 1388

06

983209 SAP AG 1999

Subscreens

Comer Z-88-10000

+ame

+ame

ADDR6ltDATAAM16

DltSUSR

Information$

ode poo name

Screen nmer

Screen name

Some screens contain suscreen areas

To determine the fied name pace the cursor on the fied and choose F1 The name of the screen

fied is specified under Technical info

copy SAP AG BC420 12-13

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 1488

064

983209 SAP AG 2001

Tabstrips

$er Roberts

1ample$ User Profile Defaults

Sar men +

oon anae

ampp dece Pr1

ParameerDefaults

DltSUSR

USD19AULTSSPLD

The tastrip eement sho$n is used on the aintain User rofile (5$n data) screen

4nder the tastrip tite Defaults the user can set various vaues such as the defaut printer

The user profie are user9dependent settings (as the name impies)

copy SAP AG BC420 12-14

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 1588

062

983209 SAP AG 1999

Step Loops and Table ontrols

1ample$ an+ Details

Comer

ntr( an+ +e( Account

08154711

123456789

Z-00-12345

an+ Details

00708155546344536

Banlt daa

==A=C06)

==A=C0amp)

Step oops and tae contros are treated identicay for the recording

The fied names of the fieds isted are the same for every ro$

7ach ro$ contains a customers an detais The fieds must e accessed using an inde (this is

specified as an addition to the fied name for eampe 6N69AN6N(1) The inde must match

the ro$ numer

5ny the visie fieds on a screen can e fied $ith data If some fieds are ony visie after paging

the paging must e recorded as $e This means that for the recording you must eecute a the steps

in the onine transaction

For eampe age on $oud e eecuted using the function code 1 (Paging icons)

Paging to the end of a ist 1Page up 11

lto to first page 18

copy SAP AG BC420 12-15

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 1688

068

983209 SAP AG 2001

Recording Buidelines

Test the transaction before recording

Start the recording

hange field alues onl( for fields

releant to the recording

As of 48 all filled fields are recorded

Transaction must be properl( eitedCSA1

Use of scroll bars cannot be recorded

Specia recording notes

F8 F and your o$n F8 and F hep (Pamp527SS 5N =7+P9amp7gt47ST Pamp527SS 5N A+479

amp7gt47ST) are not recorded This aso appies to a commands under the System and $el

menus aues for defaut variants ( transaction variants) are not incuded

7rror and $arning diaogs are not recorded 5ny the 56 code and the fied contents reuired for

further processing on the current screen are recorded

Note uring recording the data entered is $ritten to the dataase

copy SAP AG BC420 12-16

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 1788

063

983209 SAP AG 2001

1n-o( SAP ontrols and Data Transfer

bull SAP Picture ontrolbull SAP ETML ie)er ontrol

bull SAP Tet 1dit ontrol

bull AL Brid ontrol

bull SAP Tree ontrol

bull

ranch 6

ranch amp

Root

These and other controls do not support batch input$

Root

ranch amp

ranch amp6

The ne$ 7noy SAP contros deveoped for ampeease B do not support atch input or ca

transaction

=o$ever tae contros and tastrips do support atch input

copy SAP AG BC420 12-17

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 1888

065

983209 SAP AG 1999

The Transaction Recorder

PrinciplesPrinciples

Recording )ith the LSMWRecording )ith the LSMW

Principles of atch Input and all TransactionPrinciples of atch Input and all Transaction

Integrating the TA Program into the DWIntegrating the TA Program into the DW

Using the TA Recorder Using the TA Recorder

copy SAP AG BC420 12-18

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 1988

067

983209 SAP AG 1999

Session

generator

Recording Using the LSMW

-ith the +S- you can create your o$n recordings

The +S- uses the standard TA recorder here yet evauates the recording itsef The information

from the recording is used to create atch input sessions

The created atch input session can e processed as usua $ith the atch input monitor

Note As $ith the standard procedure it is euay important that the data is converted

copy SAP AG BC420 12-19

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 2088

0amp0

983209 SAP AG 1999

reating Recording

Admnraon

ecordn

Goo

ame of recording

Description

)ner

ame of transaction

Start recording

lto into the +S- and seect the menu path ampoto (Recorings An overvie$ of a previousy

created recordings for your proect are dispayed To start a ne$ recording seect Create

To create a recording you must define the name the description and the o$ner

7nter the name of the transaction you $ant to record

7ecute the transaction and compete it propery

Note ampecordings are assigned to ony one proect 9 so the name of the recording must e uniue

copy SAP AG BC420 12-20

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 2188

0amp6

983209 SAP AG 1999

hanging ustomer Data$ Initial Screen

9ield ontents

BCC$Samp $SZAV

BCamp(Camp )00

02-($++ -88-10000

02-0110

02-0130

$SZAV

9ield ame

Comer

Company code

Z-88-10000

Genera daa

Comer Z-88-10000

+ame

9ield ontents

BCamp(Camp $PA

BCS$BSC SAPSZA1 0300ASS

BCS$BSC SAPSZA1 0301Camp$

BCC$Samp SZA10100-+$B

A1AA-S Garden Sree

A1AA-amp$S+$1 34

A1AA-PampSCamp1 02105

9ield ame

Screen

111

Screen

106

In the aove eampe the transaction Change customer F01 is recorded

Note

You must ma)e some modification to the field values for all the fields you ant to capture

for the data transfer For the purposes of recording a change can simply mean overriting

one single character in a field ith the same character

ven if fields are to e filled using S$amp$ parameters the values must still e changed on

the screen in order to capture them

(ith online transactions screen sequences may appear that are different than in the

recording

copy SAP AG BC420 12-21

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 2288

0ampamp

983209 SAP AG 1999

Results

RecordingRecording R1lt6 Demolt6

9D0amp hange customer Caccounting

SAPM90ampD 0608

DltURSR R90ampD=UR

Dlt=D1 gt00

R90ampD=UR 5560000

R90ampDD0660

US1ltA

SAPM90ampD 0666

Dlt=D1 UPDA

DltSUSR SAPLSA6

DltSUSR SAPLSA6

DltURSR SA6ltD0600T1LltUM1

ADDR6ltDATASTR11T 4 Barden Street

ADDR6ltDATAPSTltD1 0amp602

ADDR6ltDATAIT6 oston

SA6ltD0600T1LltUM1 8638257755

The resuts of the recording using the +S- are dispayed in a tree structure

After the recording has finished you can edit it Cou can deete fieds or add ne$ ones

copy SAP AG BC420 12-22

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 2388

0amp

983209 SAP AG 1999

Assigning 9ield ames

Recording R16 Demolt6

Dlt=D1 UPDA

DltSUSR SAPLSA6

DltSUSR SAPLSA6

DltURSR SA6ltD0600T1L

ADDR6ltDATAAM16 Lisa Eofmeister

ADDR6ltDATAPSTltD1 0amp602

ADDR6ltDATAIT6 oston

ame

+ame

ecrpon

e=a ae

A1AA-+A1

A1AA-+A1

Comer name

a o=meer

Screen =ed

ustomer name

double clic+

Cou can assign names for each recorded fied The specia fieds (2356257 2324ampS5amp

and 23S4S2amp77N) are not incuded here Cou can choose the fied names -hen the atch

input session is created the contents of these fieds are assigned to the target fieds specified in the

eft coumn

Functions

efaut Assigns to the fied names of the underying target fied and its fied description

ampeset eetes fied name and fied description

oue cic 7dits fied name fied description and defaut vaue

Note Cou can use fied names more than once =o$ever the fied name is ony avaiae once in thefied mapping For this reason it is not practica to use fied names more than once

For a those fieds for $hich you do not assign a name the defaut vaue is used $hen the atch

input session is created These defaut vaues can e seen as constants This is especiay usefu for

chec oes (for eampe 08 vie$ seection)

The +S- supports automatic fied mapping Source fieds and target fieds can e assigned to each

other automaticay The fieds are assigned to the corresponding fieds of the same name Therefore

the fied names of the source structure shoud e given the same or simiar names as the fied names

in the target structure

copy SAP AG BC420 12-23

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 2488

0amp4

983209 SAP AG 2001

Addinggtremoing screen fields

Repeating recording

9or identical field names the name and description are

assigned automaticall(

1diting Recording

02-($++

(+A1-A+

(+A1-+A1

(+A1-Samp

(+A1-+A2

(+A1-SAS

Comer accon nmer

e

+ame 1

Sor =ed

+ame 2

Sree

Selection of all

aailable screen

fields

Cou can ater add ne$ screen fieds if you need to 6eep in mind that fieds shoud ony e added in

paces $here they are aso provided on the screen other$ise you $i get an error $hen the I

session is processed

After saving you $i get the message The data has een saved successfuy No$ the recordings

are avaiae for the oect attriutes

If you repeat the recording you can record a ne$ screen seuence $ith ne$ fieds Provided that the

fied names (eg 6NA89NA78) are identica the names and descriptions are automaticay

assigned

copy SAP AG BC420 12-24

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 2588

0amp2

983209 SAP AG 1999

b-ect T(pe and Import Method$ Recording

Standard atch Input gt Direct Input

atch Input Recording

API

IDoc

ampgtec ype ) mpor meod

Bac np recordn

ecordn ec1

The recording is no$ avaiae $ith the oect attriutes

Net you create a proect or su9proect in the +S- and specify process the data transfer

Cou eecute the data transfer as in the standard system

efine the source fieds and structures

efine the fied mapping

ampead and convert the data

2reate and import a atch input session

copy SAP AG BC420 12-25

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 2688

0amp8

983209 SAP AG 1999

The Transaction Recorder

PrinciplesPrinciples

Recording )ith the LSMWRecording )ith the LSMW

Principles of atch Input and all TransactionPrinciples of atch Input and all Transaction

Integrating the TA Program into the DWIntegrating the TA Program into the DW

Using the TA Recorder Using the TA Recorder

copy SAP AG BC420 12-26

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 2788

0amp3

983209 SAP AG 1999

Transaction Recorder

Online

Transaction

RecordingTransfer Program

T

Included in the Batch Input Monitor

Cou use the transaction recorder to record transactions and then use the transaction recording to

generate a transfer program The program ao$s you to transfer data using either atch input or ca

transaction

copy SAP AG BC420 12-27

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 2888

0amp5

983209 SAP AG 1999

hanging ustomer Data$ Initial Screen

9ield ontents

BCC$Samp $SZAV

BCamp(Camp )00

02-($++ Z-88-10000

02-0110

02-0130

$SZAV

9ield ame

Comer

Company code

Z-88-10000

Genera daa

Comer Z-88-10000

+ame

9ield ontents

BCamp(Camp $PA

BCS$BSC SAPSZA1 0300ASS

BCS$BSC SAPSZA1 0301Camp$

BCC$Samp SZA10100-+$B

A1AA-S Garden Sree

A1AA-amp$S+$1 34

A1AA-PampSCamp1 02105

9ield ame

Screen

111

Screen

106

In the aove eampe the transaction Change customer F01 is recorded

copy SAP AG BC420 12-28

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 2988

0amp7

983209 SAP AG 2001

hange Debitor$ Pa(ment Transactions C6

Banlt dea

Screen

10

9ield ontent

BCC$Samp (+B(-BA+(+01

BCamp(Camp BA+((+B(-BA+(S01

(+B(-BA+(01 12345679

(+B(-BA+(+01 22222222

Debitor 5560000

9ield ame

Inde

copy SAP AG BC420 12-29

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 3088

00

983209 SAP AG 1999

hanging ustomer Data$ Pa(ment Transactions Camp

Addre

an+ countr( US

an+ code 6amp42837

Banlt dea

ustomer 5560000

9ield ontents9ield ame

BCC$Samp (+A1-(+ZA

BCamp(Camp $PA

(+B(-Z01

Screen

10

Screen

100

SAPLBA

9ield ontents

BCC$Samp B+(A-BA+(A

BCamp(Camp +

B+(A-BA+(A +aona Banlt

9ield ame

In different transactions the modue poo may change This is the case $ith for eampe customer

master data The TA recorder records modue poo changes automaticay

copy SAP AG BC420 12-30

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 3188

06

983209 SAP AG 1999

Eierarch( Displa( of the Recording

02amp

02

SAP02 0106

BCC$Samp 02-0130

BCamp(Camp )00

02-($++ -88-10000

02-0110

02-0130

SAP02 0111

BCamp(Camp V

BCC$Samp A1AA-amp$S+$1

A1AA-S Garden Sree

Recording

-ith the TA recorder the resuts are aso a ist in a hierarchy dispay =o$ever you cannot assign

your o$n fied names as you can in the +S-

copy SAP AG BC420 12-31

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 3288

0amp

983209 SAP AG 1999

Recording erie)

Recording

Transfer program

9unction module

ontains onl( the data

from the recording

Test data

Test

reate

reate

reate

reate

1dit hange recording

Process recording

Cou can edit the recording as needed

The recording can e tested and eecuted again The screens are run through in the same $ay as in

the recording

The recording can then e used to create

atch input sessions

Test data

ata transfer programs $ith atch input or ca transaction

Function modues

copy SAP AG BC420 12-32

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 3388

0

983209 SAP AG 1999

1 02 BS

2 SAP02 106

3 BCC$Samp $SZAV

4 BCamp(Camp )00 5 02-($++ -88-10000

6 02-0110

7 02-0130

8 $SZAV

9 SAP02 111

10 BCamp(Camp V

11 BCC$Samp A1AA-amp$S+$1

12 A1AA-S Garden Sree

Program Screen St 9ield ame 9ield alue

Recording 1ditor

Recording

Add gt delete lines 9ormat chec+

Import gt eport of recording

In the editor you can add or deete ines Cou can aso change the contents of individua ines

-ith the function Chec) you can specify $hether the edited version of the recording sti has the

correct synta

Cou can aso eport import recordings to from a seuentia fie

After editing save the recording changes

copy SAP AG BC420 12-33

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 3488

04

983209 SAP AG 1999

Recording Seeral Transaction Runs

RecordingF

Directl( after the first recordingG or

In the displa( mode of the recording

In this step you can record additiona transactions and add additiona transaction runs to the

recording

Cou can record the additiona transactions directy after a recording or in the edit screen of a

recording

copy SAP AG BC420 12-34

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 3588

02

983209 SAP AG 1999

1ditor$ Importing and 1porting Recordings

6 T 9D0amp S

amp SAPM90ampD 608

DltURSR

4

2

8 SAPM90ampD 666

60

66

Program Screen St 9ield name 9ield alue

cempA

e name

aa =orma

cemp

A

e name

aa =orma

1port

Import

Presentation Serer

If the editor functions in the systems do not provide a the functions you need you can do$noad the

recording to your presentation server using the Eort function and then edit the recording using a

P2 editor

Cou use the Import function to import the data ac into the amp System ae sure the fie is sti in

the correct format

copy SAP AG BC420 12-35

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 3688

08

983209 SAP AG 1999

Processing the Recording

Recording

Process )ith ALL TRASATI

Parameer

Proce mode$pdae mode

CA mode

e=a e

Con a=er comm

+o a B eon

nd +o a B mode

A

A

T

The recording can e eecuted directy The data from the recording is used and the transaction is

processed $ith ca transaction

2a transaction provides a range of options for caing appication transactions $hich are discussed

on the foo$ing t$o pages

copy SAP AG BC420 12-36

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 3788

03

983209 SAP AG 1999

Process mode

Update mode

ATT mode

Processing Recording )ith T 6

A

1

Displa( all screens

Displa( errors onl(

o displa(

L

S

A

Local

S(nchronous

As(nchronous

A

o ATT

ATT )ithout indiidual screen control

ATT )ith indiidual screen control

Processing mode

=ere you can specify the processing mode 9 it is the same as the processing mode for atch input

4pdate mode

=ere you can specify the update mode For more information see the unit ca transaction

2ATT mode

=ere you can mae specia settings if you $ant to test the recording under 2ATT conditions (ony

necessary for 2ATT runs) Specia functions are caed in the 2ATT too for each screen at the end of

P5 and at the start of PAI

copy SAP AG BC420 12-37

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 3888

05

983209 SAP AG 1999

Default sie

ont after commit

ot a I session

1nd$ ot a I mode

Processing Recording )ith T amp

The screen standard sie is used for the

processing

ommit )or+ does not end the processing

o I mode is actie The transaction )ill run

through as in online

I mode is selected nce the data in the D

table is processedG the I mode is set to inactie

Standard siDe

If you seect this the screens are processed in the standard siDe in the foreground (in foreground or

dispay errors ony) Note the standard siDe is a$ays used for acground processing

Further after commit

The first commit $or in a transaction does not ead to the end of the recording

Note A atch input transaction is ended $ith the first commit $or

No I mode

The system fied SC9INPT is not set (SC9INPT E ) So transactions are run through as in onine

7nd No I mode

5ny use if you choose the processing mode 7 (dispay errors ony) Then the transaction is processed in the acground in atch input mode and if there is an error the screens run through in

the foreground

copy SAP AG BC420 12-38

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 3988

07

983209 SAP AG 1999

I Mode

atch input

mode

nline

Some transactions behae differentl( in batch input mode

than in online Cbatch input capabilit(

atch input mode sets the s(stem field SIPT H

Not every transaction can run the same onine and in atch input mode The transaction must decide

itsef $hether it is caed onine or in atch input mode

The system sets the system fied SC9INPT E G if the atch input mode is active (this aso appies

to ca transaction) From this system fied the transaction can identify $hether to run onine or in

atch input mode

copy SAP AG BC420 12-39

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 4088

040

983209 SAP AG 1999

reating a Session 9rom the Recording

Recordingnl( contains the data

from the recording

Seon name 02amp

Aoraon ampBS(eep eon

oclt dae 10102000

Cou can create a atch input session directy from the recording that you can then process using the

atch input monitor

copy SAP AG BC420 12-40

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 4188

046

983209 SAP AG 1999

reating Test Data

Test Data

Recording

ranranpBC420AAe name

The file onl( contains the data from the recording

Rgt

Application Serer

Structure

Cou can create a fie from the recordingH the fie $i contain a the fieds from the recording The

fieds are added to the fie $ith the ength you specified in the definition

The fied order corresponds to the order in the recording overvie$ Technica fieds

(2356257 2324ampS5amp and so on) are incuded

The data can ony e stored on the appication server If you do not specify a path the fie is stored in

the $or directory of the appication server

If the specified test fie aready eists the ne$ data record is added to this fie

copy SAP AG BC420 12-41

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 4288

04amp

983209 SAP AG 1999

ed conen

reating a Program

Recording

ZBC420ampProram name

Transfer Program

e daa

ead =rom =e

ran=er =rom recordn

reate

9ile nameTest data

ranranpBC420AA

Cou can generate a program from the recording

In the foo$ing diaog o enter a program name In addition you can choose the type and method

for fiing the maintained fied contents from the recorded screens

4se the vaues used for the recording If you reuire feie data transfer you $i have to modify

this program ater

ParameteriDe the input vaues and read these vaues from a fie A data structure is created for

parameteriDationH the data records are read from an eterna fie into this data structure The

program assumes the fie $as taiored to this data structure

If you have decided to parameteriDe the input vaues you shoud aso create a test fie during

generation To do this seect the checo and enter a name for the fie

The attriute maintenance screen of the AAP editor appears aintain the attriutes and save the

program

copy SAP AG BC420 12-42

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 4388

04

983209 SAP AG 1999

Program 9unctions

Online

transaction

Transfer program

To

error

1rror

ption 6ption ampFlat SAP

structure

Monitor

Cou have no$ generated a data transfer program for importing data into the amp System The

program can eecute the data transfer using atch input or ca transaction

If you choose option 1 and there is an error the data record is paced into a atch input session

copy SAP AG BC420 12-43

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 4488

044

983209 SAP AG 1999

Benerating 9unction Modules

Recording

Zcreaedeor ncon mode

ncon rop

Sor eD

ZBC420

Creae comer

9unction module

nl( one data record can be processed at a time

In the net diaog o you can generate a function modue a function group and short tet from the

recording The function modue is automaticay created in the function group

copy SAP AG BC420 12-44

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 4588

042

983209 SAP AG 1999

9unction of 9unction Modules

Online

transaction

To

error

1rror

ption 6 ption amp

9unction module

Import

Parameter 1port

parameter

Tables

M1SSTA

Monitor

S$BC

Import interface

The import interface consists of a technica part and the fieds from the recording (A parameter is

created for each input fied of the recorded transactions)

7port interface

Simpy consists of the parameter S4amp2 The function modue $i return a vaue in the system

fied SC9S4amp2 after caing ca transaction This return vaue is set to Dero if the data record has

een correcty processed (5ny appies to 2T)

If a session is created you $i e notified $hether the data record coud e paced into the session

Tae interfaceThis is used ony if the function modue $ors $ith ca transaction The tae contains a the

system messages

copy SAP AG BC420 12-45

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 4688

048

983209 SAP AG 1999

Import Interface of 9unction Module

$

Technical

fields

Data

fields

BI session or CALL TRANSACTION

Processin $ode

pdate $ode

a$e oamp BI session iamp (T initial)

Bacround user iamp (T initial)

Delete session aampter processin

Loc date oamp session

ODATA indicator

TU

MD1

UPDAT1

BRUP

US1R

=11P

ELDDAT1

DATA

Cou can use parameter 2T4 to specify $hether the function modue creates a atch input session

(2T4 E ) or updates the data record directy using ca transaction (2T4 E G)

The other parameters are fied as for a atch input session header

Note 7very time the function modue is caed a atch input session is created

If the session is to contain severa transactions proceed as foo$s

ltenerate the transaction severa times This can e achieved y recording the transaction again The

function modue interface $i then contain more than one transaction -hen the function modue is

caed severa transactions can e generated for each session

copy SAP AG BC420 12-46

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 4788

043

983209 SAP AG 1999

The Transaction Recorder

PrinciplesPrinciples

Recording )ith the LSMWRecording )ith the LSMW

Principles of atch Input and all TransactionPrinciples of atch Input and all Transaction

Integrating the TA Program into the DWIntegrating the TA Program into the DW

Using the TA Recorder Using the TA Recorder

copy SAP AG BC420 12-47

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 4888

045

983209 SAP AG 1999

Benerated Program

9unction modules DltP1ltBRUP

DltIS1RT

DltLS1ltBRUP

AAP Program

Define structure of

data in seJuential

fileDefine D

table

pen seJuential file

pen I session

Read data recordCseJuential file

9ill D table

9ill I session gtALL TRASATI

Last data record K

lose I session

lose seJuential file

The generated program has the structure dispayed aove It uses the standard function modues for

creating atch input sessions

copy SAP AG BC420 12-48

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 4988

047

983209 SAP AG 1999

Structure of the Benerated Program

Benerated part

Define D

table

pen seJuential file

pen I session

Read data record

9ill D table

9ill I session gtALL TRASATI

Last data recordK

lose I session

lose seJuential file

Include DR16

Define filestructure

P1ltDATAS1T

P1ltBRUP

DltDPR

Dlt9I1LD

DltTRASATI

LS1ltBRUP

LS1ltDATAS1T

The generated program consists of t$o parts 9 a generated part and the incude 2amp72G8 The

incude is provided in the standard system

The incude contains the definition of the reuired 2 tae and a further seven suroutines These

suroutines eecute the foo$ing functions

5pen and cose fie

5pen and cose session

Fi 2 tae

Fi session

The generated part is the main program and cas the reevant suroutines A structure is aso

generated in the generated part to read the eterna data into the fie

See the Appendi for more information on the 2amp72G8 program

copy SAP AG BC420 12-49

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 5088

020

983209 SAP AG 1999

Structure of D Table

PRBRAM DPR D1BI 9AM 9ALPRBRAMPRBRAM DPRDPR D1BID1BI 9AM9AM 9AL9AL

SAPM90ampD 0602

R90ampD=UR 600000

R90ampDU=RS 0006

R90ampD=T=D =UA

SAPM90ampD 0660

=A6AM16 Smith

=A6PSTL 87000

=A6LAD6 US

=A6SPRAS 1

SAPM90ampD 06amp0

=A6ST1B US6amp428357DDATA

PRBRAM

DPR

D1BI

9AM

9AL

EAR

UM

EAR

EAR

EAR

40

4

6

6amp

6amp

D Module pool

D Screen number

D Start of screen

D 9ield name

D 9ield contents

9ield ame T(pe Length Short Tet

AAP Dictionar(

The 2 tae has the same structure as in a standard transfer

copy SAP AG BC420 12-50

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 5188

026

983209 SAP AG 1999

Read Structure

Recording

DATA BEGIN OF record data element BUKRS bukr$amp data element KTOKD ktokd$amp data element NA(EG) name$+amp data element SORT ortl$ampEND OF record-

record

Automaticall( generated

from recording

The structure of the fie is automaticay generated and is a$ays defined $ith the name amp725amp

The generated structure a$ays has the same ayout 7ach fied is defined y t$o generated ro$s

The first ro$ is a$ays a comment ro$ containing the tet J data eement and the data eement of

the screen fied from the recording In the net ro$ the fied itsef is defined $ith the name of the

data eement foo$ed y a three9digit position numer $hich specifies the ocation in the structure

The ength of the fied is set y the ength of the data eement If a fied is not defined through a data

eement the system uses the ength of the screen fied

copy SAP AG BC420 12-51

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 5288

02amp

983209 SAP AG 1999

pening and losing the 9ile

P1ltDATAS1T

LS1ltDATAS1T

FOR( oendataet USING dataet-O)EN DATASET dataet IN TET (ODE-

IF S01SUBR2 34 - 5RITE 6 te7t1e S01SUBR2-STO)-

ENDIF-

ENDFOR(-

FOR( cloedataet USING dataet-2OSE DATASET dataet-

ENDFOR(-

Include

DR16

The suroutine 5P7N3ATAS7T opens the seuentia fie

The suroutine 2+5S73ATAS7T coses the seuentia fie

copy SAP AG BC420 12-52

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 5388

02

983209 SAP AG 1999

9unction Modules for I Program

lient

Session name

Eold date

=eep session

D user name

RecordK

LI1T

BRUP

ELDDAT1

=11P

US1R

R1RD

DltP1ltBRUPDltP1ltBRUP

Transaction code

D table

TD1

DPRTA

DltIS1RTDltIS1RT

DltLS1ltBRUPDltLS1ltBRUP

pen Isessionpen Isession

Insert data for

transactions

Insert data for

transactions

lose I

session

lose I

session

The foo$ing function modues are provided for creating atch input sessions (function group

S2)

235P7N3ltamp54P

2reates a ne$ session and contains genera data for the $hoe session

23INS7ampT

Inserts a the data for a transaction into the session The transferred interna tae $ith the

structure 2ATA must contain a the data reuired for fuy processing the transaction

232+5S73ltamp54P

2oses the session after a the data has een inserted As soon as the session has een cosed it

can e processed

The interna tae $ith the structure 2ATA can ony contain atch input data for one singe

transaction run So the individua transactions are inserted into the atch input session in a oop

using severa 23INS7ampT cas

copy SAP AG BC420 12-53

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 5488

024

983209 SAP AG 2001

9unction Module DltP1ltBRUP

ALL 9UTI DltP1ltBRUPALL 9UTI DltP1ltBRUP

1PRTIB

LI1T client

BRUP session name

ELDDAT1 loc+ date

=11P delete flag

US1R bdc user name

R1RD recording

IMPRTIB

NID internal session +e(

11PTIS

1PRTIB

LI1T client

BRUP session name

ELDDAT1 loc+ date

=11P delete flag

US1R bdc user name

R1RD recording

IMPRTIB NID internal session +e(

11PTIS

-ith the function modue 235P7N3ltamp54P you can open a atch input session

The foo$ing parameters are mandatory

2+I7NT (cient)

ltamp54P (session name)

4S7amp (user name)

Note The 4S7amp must a$ays e specified This user name is reuired for processing the session

in atch mode

The foo$ing parameters are optiona

=5+AT7 specifies the eariest date on $hich the session can e started677P fag specifies $hether session shoud e deeted after it has een successfuy processed The

677P fag is ignored if the session contains errors

677P E K K means deete the session after processing (defaut vaue) H

677P E KGK means do not deete session

amp725amp E KGK ao$s you to create a recording instead of a I session

If gtI is specified the function modue returns the interna session ey This is needed to e ae to

differentiate sessions that have the same name

-ith 7G27PTI5NS you get various return vaues that can e ueried $ith SC9S4amp2

Note In onine mode the onine user is used for the authoriDation checs regardess of the user

name specified

copy SAP AG BC420 12-54

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 5588

022

983209 SAP AG 1999

Subprogram P1ltBRUP

P1ltBRUP

FOR( oen8rou-IF e9on -

2A FUN2TION BD2O)ENGROU) E)ORTING 2IENT lt1mandt GROU) 8rou USER uer KEE) kee

=ODDATE gtolddate-

ENDIF-ENDFOR(-

Include

DR16

The suprogram 5P7N3ltamp54P opens the atch input session

copy SAP AG BC420 12-55

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 5688

028

983209 SAP AG 1999

9unction Module DltIS1RT

ALL 9UTI DltIS1RTALL 9UTI DltIS1RT

IMPRT

TD1 Transaction code

PSTltLAL Update locall(

PRITIB print list

TAL1S DPRTA bdclttable

11PTIS

IMPRT

TD1 Transaction code

PSTltLAL Update locall(

PRITIB print list

TAL1S DPRTA bdclttable

11PTIS

-ith the function modue 23INS7ampT you can add transaction data to the session

Cou need an interna 2 tae to transfer the data

The foo$ing parameters are mandatory

T257 Transaction code

CNPamp5TA 2 tae

The foo$ing parameters are optiona

P5ST3+52A+ E KGK activates oca updating This means that the data to e updated is ept in the

appication server and updated in the ast step of the transaction This does not invove the update

process (For more information see course 28 Programming ataase 4pdates)

PampINTINlt E KGK 9 ists processed in I $i e printed immediatey -ith 7G27PTI5NS you get various return vaues that can e ueried $ith SC9S4amp2

copy SAP AG BC420 12-56

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 5788

023

983209 SAP AG 1999

Subprogram DltTRASATI

DltTRASATI

FOR( BD2TRANSA2TION USING tcode-

IF e9on -2A FUN2TION BD2INSERT

E)ORTING T2ODE tcode TABES D0N)ROTAB bdcdata-

ESE-

ENDIF-ENDFOR(-

T

Include

DR16

The suprogram 23TampANSA2TI5N moves the fied 2 tae either to a atch input session

or uses ca transaction to import the data into the system 5n the seection screen you can specify

$hether you $ant to create a session or you $ant to use ca transaction to process the data directy

The S7SSI5N fied is then set according to your seection

copy SAP AG BC420 12-57

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 5888

025

983209 SAP AG 1999

9unction Module DltLS1ltBRUP

ALL 9UTI DltLS1ltBRUP

11PTIS

TltP1 6

NU1U1lt1RRR amp

-ith the function modue 232+5S73ltamp54P you can cose a atch input session

In 7G27PTI5NS you get various return vaues that can e ueried $ith SC9S4amp2

copy SAP AG BC420 12-58

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 5988

027

983209 SAP AG 1999

Subprogram LS1ltBRUP

FOR( cloe8rou-IF e9on -cloe batcgt 9nut 8rou

2A FUN2TION BD22OSEGROU)-

ESE-IF e8rouoened -

2A FUN2TION BD22OSEGROU)-

ENDIF-ENDIF-

ENDFOR(-

LS1ltBRUPlose session

lose error session

Include

DR16

The suprogram 2+5S73ltamp54P coses the atch input session The suprogram differentiates

et$een a norma I session (S7SSI5N E G) and a session opened $hen ca transaction

encountered an error (73ltamp54P35P7N7 E G)

copy SAP AG BC420 12-59

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 6088

080

983209 SAP AG 1999

Subprograms DltDPRG Dlt9I1LD

DltDPR

Dlt9I1LD

FOR( bdc9eld USING nam al-IF al 34 nodata-2EAR bdcdata- bdcdata1nam nam- bdcdata1al al- A))END bdcdata-ENDIF-

ENDFOR(-

FOR( bdcdltnro USING ro8ram dltnro- 2EAR bdcdata-Bdcdata1ro8ram ro8ram-Bdcdata1dltnro dltnro-Bdcdata1dltnbe89n - A))END bdcdata-ENDFOR(-

Include

DR16

The incude 2amp72GG contains t$o suprograms 23CNPamp5 and 23FI7+

Suprogram 23CNPamp5 fis the 2 tae $ith program names and screen numers

Suprogram 23FI7+ fis the 2 tae $ith fied names and vaues

7ach suprogram creates an entry in the 2 tae

copy SAP AG BC420 12-60

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 6188

086

983209 SAP AG 1999

9illing the D Table

erorm bdcdltnro u9n8 SA)(FD +- erorm bdc9eld u9n8 BD22URSOR RFD1BUKRS- erorm bdc9eld u9n8 BD2OK2ODE 6- erorm bdc9eld u9n8 RFD1BUKRS record1BUKRS- erorm bdc9eld u9n8 RFD1KTOKD record1KTOKD-

erorm bdcdltnro u9n8 SA)(FD -

erorm bdc9eld u9n8 BD22URSOR KNA1S)RAS- erorm bdc9eld u9n8 BD2OK2ODE 6- erorm bdc9eld u9n8 KNA1NA(E record1NA(E-

erorm bdc9eld u9n8 KNA1SORT record1SORT-

Recording Benerated automaticall(

from the recording

)ERFOR( bdcdltnro USING SA)(FD +- )ERFOR( bdc9eld USING BD22URSOR RFD1BUKRS-)ERFOR( bdc9eld USING BD2OK2ODE 6-)ERFOR( bdc9eld USING RFD1BUKRS record1BUKRS-)ERFOR( bdc9eld USING RFD1KTOKD record1KTOKD-

)ERFOR( bdcdltnro USING SA)(FD -

)ERFOR( bdc9eld USING BD22URSOR KNA1S)RAS-)ERFOR( bdc9eld USING BD2OK2ODE 6-)ERFOR( bdc9eld USING KNA1NA(E record1NA(E-

)ERFOR( bdc9eld USING KNA1SORT record1SORT- ---

The 2 tae is fied $ith data from the recording The suroutines 23CNPamp5 and

23FI7+ are used for this

The suroutines are caed in the reuired structure or seuence

copy SAP AG BC420 12-61

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 6288

08amp

983209 SAP AG 1999

erie)

SAPDatabase

SeJuential9ile

SAPDatabase

ALL TRASATIALL TRASATI

SeJuential9ile

ATE IPUTATE IPUT

D TableD TableD TableD Table

I Monitor

T

In contrast to atch input you can use ca transaction to directy pass data to the diaog interface

$ithout using a atch input session Cou use an interna tae (2 tae same structure and ayout

as atch input) to temporariy store your screen data Then you ca the desired transaction in your

program

Note 5n average the 2a Transaction method is 8 to times faster than using atch Input

copy SAP AG BC420 12-62

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 6388

08

983209 SAP AG 1999

all Transaction Program$ 1ample

RE)ORT abcbdcdcdeb9ct-

)ARA(ETERS d9mode DEFAUT A

udmode DEFAUT S-FOR( calltranact9on-2A TRANSA2TION FD

USING bdcdata (ODE d9mode

U)DATE udmode-

IF lt1ubrc NE - 5RITE 6 ---

ENDIF-ENDFOR(-

Screen

00

Screen

100

Screen

An additiona system ro area is added for the caed transaction The system uses this area for

processing the individua screens in the transactionH the data from the tae is added here After the

transaction is processed the second ro area is reeasedH the system continues processing in the first

ro area

Notes

In contrast to atch input there is no error ogging (error sessions) here For processing the caed

transaction the system uses the authoriDations of the user that caed the transaction The 2 tae

can ony hod data for one transaction run at a time efore another transaction is caed and its data

can e added you must eecute a amp7Famp7S= for the 2 tae

copy SAP AG BC420 12-63

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 6488

084

983209 SAP AG 1999

ALL TRASATI C6

RE)ORT 777-

2A TRANSA2TION FD USING bdcdata (ODE E-

Default for MD1 is A

2A TRANSA2TION 3tranact9oncode4 USING 3bdc1table4 C (ODE A E N C-

-ith the parameter 57 you can seect a specific dispay mode for processing the transaction The

foo$ing three modes are avaiae

A (ispay a)

If you eecute the program a the screens and a their data are dispayed This is the defaut vaue

for the 57 in 2A++ TampANSA2TI5N

N (ispay nothing)

The screens are not dispayed at a regardess of $hether any of them contained errors As soon as

the transaction has een fuy processed contro is returned to your program (The vaue of the

parameter 4PAT7 determines $hether dataase updates are eecuted or not)

7 (ispay errors ony)As soon as an error occurs in a screen the transaction is s$itched to dispay mode so that you can

correct the errors

These dispay modes are the same as those in the atch input session processing

copy SAP AG BC420 12-64

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 6588

082

983209 SAP AG 1999

RE)ORT 777-

2A TRANSA2TION FD USING BD2DATA U)DATE -

ALL TRASATI Camp

RE)ORT 777-

2A TRANSA2TION FD USING bdcdata U)DATE -

2A TRANSA2TION 3tranact9oncode4 USING 3bdc1table4 C (ODE A E N C U)DATE A S C -

Default for UPDAT1 is A

-ith the parameter 4PAT7 you can contro ho$ dataase updates arising from a transaction are

carried out There are three options

A (asynchronous updating) The caed transaction does not $ait unti the dataase has een

updated it simpy for$ard the updates to the SAP update service This usuay speeds up the 2T

program This processing mode is N5T recommended for arge data sets as the caed transaction

does not receive a competion message from the update modue

The caing 2T program therefore cannot te if the transaction has een successfuy competed Cou

shoud use the updating administration function (transaction S8) to determine $hether updating

$as terminated eary The error anaysis correction functions for are ess hepfu than $ith

synchronous updating

S (synchronous updating) -ith synchronous updating the caed transaction $aits unti a the

updates have een competed So processing is so$er than $ith synchronous updating The caed

transaction can ho$ever report any updating errors to the program $hich maes error

anaysiscorrection easier

+ (local updating) $ith oca updating the dataase is not updated in a separate process it is

updated in the caers process (see appication hep documentation for the AAP ey$ord S7T

4PAT7 TAS6 +52A+)

copy SAP AG BC420 12-65

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 6688

088

983209 SAP AG 1999

ALL TRASATI C

RE)ORT 777-DATA mtab T0)E TABE OF bdcm8coll-

2A TRANSA2TION FD USING bdcdata (ESSAGES INTO mtab-

2A TRANSA2TION 3tranact9oncode4 USING 3bdc1table4 C (ODE A E N C U)DATE A S C (ESSAGES INTO 3metab4 C -

7SSAlt7S specifies that a system messages that are output during the eecution of a 2A++

TampANSA2TI5N are $ritten to the interna tae L7SSTA The interna tae must have the

structure 2Slt25++

4nie the cassica atch input processing $ith sessions 2A++ TampANSA2TI5N does not offer any

specia processing procedures for transactions containing errors There are no restart functions for

transactions that contain errors or that cause updating terminations

copy SAP AG BC420 12-66

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 6788

083

983209 SAP AG 1999

ALL TRASATI C4

RE)ORT 777-DATA mltot T0)E ctuaram-

2A TRANSA2TION FD USING BD2DATA

O)TIONS FRO( mltot-

2A TRANSA2TION 3tranact9oncode4 USING 3bdc1table4 C (ODE A E N C U)DATE A S C (ESSAGES INTO 3metab4 C O)TIONS FRO( ot C -

RE)ORT 777-DATA mltot T0)E ctuaram-2A TRANSA2TION FD USING bdcdata

O)TIONS FRO( mltot-

The addition 5PTI5NS enaes the ca transaction statement to e controed through a structure

The structure must have the dictionary type 2T43PAampAS

The addition 5PTI5NS Famp5 must not e comined either $ith the addition 57 or $ith

4PAT7 ore information on the net side

copy SAP AG BC420 12-67

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 6888

085

983209 SAP AG 1999

Structure TUltPARAMS

DISMD1 Procen mode anaoo o addon amp

UPDMD1 $pdae mode anaoo o addon $PA

ATTMD1 CA mode CA conro

D19SI1 orce de=a EndoE e drn procen

RAMMIT +o eD a Camp amp(

IPT +o a ac np eonF a F S-B+P SPAC

I1D +o a ac np eon a=er end o= BC daa

The components are defined as foo$s

The components 7FSIM7 ampA25IT N5INPT and N5I7N can have the foo$ing

vaues KGK E Ces or K K E No

If the addition 5PTI5NS Famp5 is not specified the foo$ing settings appy to the contro

parameters

IS57 from addition 57

4P57 from addition 4PAT7

2ATT57 2ATT not active

7FSIM7 o not not use defaut $indo$s siDe

ampA25IT Successfu eit at 25IT -5amp6

N5INPT atch input session active (SC9INPT E G)

N5I7N atch input session sti active after end of 2 data

copy SAP AG BC420 12-68

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 6988

087

983209 SAP AG 1999

SMSBID Message ID

SMSBT Message T(pe C1GIGWGSGA

SMSB Message umber

SMSB6 Message ariable 6

SMSBamp Message ariable amp

SMSB Message ariable

SMSB4 Message ariable 4

SMSBID Message ID

SMSBT Message T(pe C1GIGWGSGA

SMSB Message umber

SMSB6 Message ariable 6

SMSBamp Message ariable amp

SMSB Message ariable

SMSB4 Message ariable 4

Return code$

S(stem fields$

alue Meaning

0 Successful

6000 1rror in transaction

6000 1rror in processing call transaction

see also the s(stem fields specified

alue Meaning

0 Successful

6000 1rror in transaction

6000 1rror in processing call transaction

see also the s(stem fields specified

9ield name Meaning9ield name9ield name MeaningMeaning

Return ode and S(stem 9ields

The return code is used to specify $hether the caed transaction $as processed successfuy In

addition severa system fieds are fied The numer I type and variaes of the diaog message

output y the caed transaction Cou need this information to output the message tet

copy SAP AG BC420 12-69

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 7088

030

983209 SAP AG 1999

Benerated Program of the TA Recorder

REFRES= (ESSTAB-

2A TRANSA2TION tcode USING bdcdata (ODE ctumode U)DATE cudate (ESSAGES INTO metab-OO) AT metab- ENDOO)-IF lubrc 34 AND e8rou 34 S)A2E- IF e8rouoenend - 2A FUN2TION BD2O)ENGROU) E)ORTING ---------

--------- E8rouoened - ENDIF- 2A FUN2TION BD2INSERT E)ORTING T2ODE tcode TABES D0N)ROTAB bdcdata-ENDIF-REFRES= bdcdata-

Message table output

pen error session

Insert data record that

has errors into error

session

If you have seected ca transaction on the seection screen the generated program runs as foo$s

The onine transaction is caed $ith ca transaction and passed to tae 2ATA A the

messages arising during the ca transaction are put in the interna tae 7SSTA

7SSTA is output as a ist

If you have specified an error session ( 73ltamp54P L SPA27) on the seection screen and the

ca transaction comes across an error (+3S4amp2 L 0) the error session is opened The error

session is ho$ever ony opened once Then the data record is paced in the session

A the other data records that have errors $ith ca transaction are paced in the same session

copy SAP AG BC420 12-70

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 7188

036

983209 SAP AG 1999

The Transaction Recorder

PrinciplesPrinciples

Recording )ith the LSMWRecording )ith the LSMW

Principles of atch Input and all TransactionPrinciples of atch Input and all Transaction

Integrating the TA Program into the DWIntegrating the TA Program into the DW

Using the TA Recorder Using the TA Recorder

copy SAP AG BC420 12-71

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 7288

03amp

983209 SAP AG 1999

Integrating into the DW

Transfer program

AAP Dictionar(

Integrate

SDA0

SDA6

SDAamp

SDA

Cou can integrate the generated program into the G9- The structure of the fie must e created

in the AAP ictionary The taes SGA0 SGA8 SGA1 and SGA $i e fied

copy SAP AG BC420 12-72

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 7388

03

983209 SAP AG 1999

DW Release 42

Goo

-B eeae 45

aa ran=er ogtec

Int customer data transfer ob-ect

ecord =ed

Dece daa ran=er

d Goo

The ampunction ampor interatin TA recorder prora$s is

i$ple$ented in the

D+-B in Release

The recorder can e integrated as of ampeease and it is provided in the G9- ampeease

ltot to the G9- ampeease 5n the initia screen you can integrate programs y choosing ampoto

( +nt customer ata transfer o-ect

copy SAP AG BC420 12-73

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 7488

034

983209 SAP AG 1999

reating Program as D b-ect

Comer ran=er ogtec

ampgtec ype

Sor eD =or ogtec

aa ran=er proram

Srcre name

9900

(+A1

Cane comer

ZBCA+G

ZB

ustomer transfer ob-ect

umber bet)een 7000 and 7777

b-ect t(pe

Assignment to R ob-ect

Short tet for D ob-ectShort description

Data transfer program

ame of generated program

Structure name

A structure Cstructure la(out )ith this name is created in

the AAP Dictionar(

For ampeease transfer oects $ere not organiDed y 5amp oects ut y a G numer (00089

OOOO) The numer range O0009OOOO is reserved for customers

To create a connection to the ne$ G 9- you must assign the program to a 5amp oect

2reate a short tet for the G oect This tet $i appear in the method seection ist

Specify the program to e incuded

Specify a name for the structure to e created in the AAP ictionary

Note $he generated program appears under program type +N and not under program type

-

copy SAP AG BC420 12-74

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 7588

032

983209 SAP AG 1999

Adantages

Automatic program registration in the DW in

Release 48

ou can use all the functions defined for

standard ob-ects

1ception$ The (reate ampile ith data

function

If you incuded the oect in the ampeease $orench it is automaticay avaiae in the ampeease

B $orench

A the $orench functions are avaiae for your oect ecept for Create files ith transfer ata

copy SAP AG BC420 12-75

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 7688

038

983209 SAP AG 1999

ou are no) able to$

The Transaction Recorder$ Unit Summar(

Use the recording function in the LSMW to create

a batch input session )ith the data from the

eternal s(stem

Use the TA Recorder to create (our o)n data

transfer program

Anal(e programs that )or+ )ith batch input or

call transaction

Integrate the TA Recorder programs into the

DW

copy SAP AG BC420 12-76

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 7788

ercise 1

nit $ -ecorder

$opic 2reating etors

$ransaction -ecorder ercise 1

bull 2reating detors $ith eterna numer assignment

bull etor numers M9980008 to M9980080

Address data for detors $ith eterna numer assignment is to

e transferred using program ampFI700

ro4ect F5

Supro4ect +5

-un +575

$as)s 85 95 8S25

9oad program -F+00

8 In the foo$ing eercises eisting data is to e changed Therefore these detors $ith

eterna numer assignment have to first e created

898 4nder suproect 79 create run 797G9 $ith the name Detors ith

eternal numers

copy SAP AG BC420 12-77

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 7888

891 2reate the foo$ing three tass The tass map the foo$ing process steps

convert data create + session and process + session

89198 In run 797G9 create the foo$ing tas

9 Tas AP9

9 Name 2onvert data 9 Tas type AP

9 Program type +S-

Seect the foo$ing +S- oect

+S- proect 2109

+S- suproect 7I9

+S- oect I997GT

89191 In run 797G9 create the foo$ing tas 9 Tas +5A9

9 Name 2reate I session

Tas type +5A

9 Program type INP

Seect program ampFI700 $ith the variant

I97G9

8919 In run 797G9 create the foo$ing tas

9 Tas S29

9 Name Process I session Tas type S2

9 Program type amp7P5

Seect program ampS2S4 $ith the variant

S497G9

Note that you have to correct the seuence of the tass 2onvert data

create + session and process + session

4se the uttons

89 Start the run

The detors $i e created $ith eterna numer assignments

89 2hec in transaction F0 that the detors M9980008 to M9980080 have een

created

copy SAP AG BC420 12-78

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 7988

ercise

nit $ransaction -ecorder

$opic -ecording function in the 9S8(

bull 2reate a recording using the +S-

bull ltenerate a atch input session

2hange the detor address data in the amp System

Name of the recording +

Name of the file +2055+F9

8 2reate the recording 7I3 using the +S- ampecord the transaction F01 (2hange

detor)

898 efore you create the recording first test the transaction onineQ

For the recording use detor M9980008 5n the initia screen of the F01

maintain the foo$ing fieds ony

etor etor M9980008

2ompany code 0008

Address data seect

Note $he data record must e saved hile recording

891 aintain the names and the descriptions for the foo$ing fieds

Name city street posta code and teephone numereete a other fieds in screen 880 from the recording (eg S5ampT+ +AN8

SPampAS)

4se the same technica names as sho$n in the tae eo$ (automatic fied

mapping)

copy SAP AG BC420 12-79

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 8088

1 2reate the suproect 7I9 and the ne$ oect TA3 in your proect 2109

aintain the oect attriutes and seect the item atch input recording Seect your

recording 7I3

2reate the source structure address

2reate the source fieds according to the tae eo$ 5r copy them from proect 2109S37N suproect 7I900 oect TA900

198 Fie setup The data from the egacy system are dispayed in the foo$ing tae

Fied name Fied type Fied ength escription

N5 2 8B etor numer

NA7 2 Name

STamp77T 2 Street

2ITC 2 2ityPace of residence

MIP 2 80 Posta code

T7+ 2 8B Teephone numer

191 aintain the fied mapping 4se the automatic fied mapping (via menu item

7tras)

19 Specify the fies 5ny maintain the fie name of the source fie

Name of the fie 21099IFI+7

2odepage 8800

19 Import the data and convert them ispay the data in each caseQ

19 2reate a atch input session

19B ampun the atch input session

copy SAP AG BC420 12-80

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 8188

ercise 3

nit $ransaction -ecorder

$opic -ecording ith the $ -ecorder

bull ltenerate a recording using the TA recorder

bull Test the recording

2hange the address data of detors in the amp system

Name recording $+

Name of the file +2055+F9

8 2reate the recording TA37I3 using the transaction recorder ampecord the

transaction F01 (change detor)

898 4se detor M9980008 for the recording 5n the F01 initia screen ony

maintain the foo$ing fieds

etor etor M9980008

2ompany 2ode 0008

Address data seect

Note $he data record must e saved hen recording

eete a fieds that do not eist in the source fie 21099IFI+7 from screen

880 in the recording (eg 6NA89S5ampT+ 6NA89+AN8 6ANNQ9SPampAS) Note o not deete fieds ampF01946ampS and ampF0190880

Save the recording no$

1 S$itch to the recordings overvie$

198 Process the recording $ith the processing mode A (dispay a)

191 Process the recording $ith the processing mode RN (no dispay)

19 If the recording has een tested and no error has occurred generate a I session

and run it using the I monitor If an error shoud occur generate the recordingagainQ

copy SAP AG BC420 12-81

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 8288

From the recording generate the program M21037I3 in your deveopment cass

2109 Seect the foo$ing

bull ampead fied contents from fie

bull 2reate test data in the fie 2103dei3test3tt

98 Save this program and eecute it ltenerate one I session each and process it

2arry out the same steps again using the ca transaction

The generated program shoud no$ e changed so that fie 21099IFI+7 can e

read and processed

98 2hange the defaut vaue of the fie name (parameter dataset) in 21099

IFI+7

91 2hange the structure definition eete the company code fied and the address

data checo from the structure

9 2hange the su9routine ca perform dc3fied for the company code (KampF019

46ampSK) so that the vaue 0008 is transferred

9 2hange the su9routine ca perform dc3fied for the address data checo

(KampF0190880K) so that the vaue G is transferred

9 Start the program again and read the data from the fie 21099IFI+7 $ith

detor data ltenerate a I session $ith it and run it

copy SAP AG BC420 12-82

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 8388

033 Include DR16INCLUDE BDCRECX1

SELECTION-SCREEN BEGIN OF LINE

PARAMETERS SESSION RADIOBUTTON GROUP CTU create sessi SELECTION-SCREEN COMMENT $amp TEXT-S FOR FIELD SESSION

se(ecti-scree )siti +

PARAMETERS CTU RADIOBUTTON GROUP CTU ca(( trasacti

SELECTION-SCREEN COMMENT $amp TEXT-S FOR FIELD CTU

SELECTION-SCREEN END OF LINE

SELECTION-SCREEN BEGIN OF LINE

SELECTION-SCREEN COMMENT $amp TEXT-S1 FOR FIELD GROUP

se(ecti-scree )siti $+

PARAMETERS GROUP1$amp r) ae 0 sessi

SELECTION-SCREEN COMMENT $amp TEXT-S+ FOR FIELD CTUMODE

se(ecti-scree )siti

PARAMETERS CTUMODE LIE CTU2PARAMS-DISMODE DEFAULT 3N3

A4 s56 a(( 78)rs

E4 s56 78)r errr (8

N4 7 t 7is)(a8 78)r

SELECTION-SCREEN END OF LINE

SELECTION-SCREEN BEGIN OF LINE

SELECTION-SCREEN COMMENT $amp TEXT-S$ FOR FIELD USER

se(ecti-scree )siti $+

PARAMETERS4 USER1$amp DEFAULT S9-UNAME ser 0r sessi i atc5

SELECTION-SCREEN COMMENT $amp TEXT-S FOR FIELD CUPDATE

se(ecti-scree )siti

PARAMETERS CUPDATE LIE CTU2PARAMS-UPDMODE DEFAULT 3L3

S4 s8c5rs(8

A4 as8c5rs(8

L4 (ca(

SELECTION-SCREEN END OF LINE

SELECTION-SCREEN BEGIN OF LINE

SELECTION-SCREEN COMMENT $amp TEXT-S FOR FIELD EEP

se(ecti-scree )siti $+

PARAMETERS4 EEP AS CltECBOX 3 3 = 7e(ete sessi i0 0iis5e7

3X3 = gtee) sessi i0 0iis5e7

SELECTION-SCREEN COMMENT $amp TEXT-S FOR FIELD E2GROUP

copy SAP AG BC420 12-83

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 8488

se(ecti-scree )siti

)araeters E2GROUP1$amp r) ae 0 errr-sessi

SELECTION-SCREEN END OF LINE

SELECTION-SCREEN BEGIN OF LINE

SELECTION-SCREEN COMMENT $amp TEXT-S FOR FIELD ltOLDDATE

se(ecti-scree )siti $+

PARAMETERS4 ltOLDDATE LIE S9-DATUM

SELECTION-SCREEN COMMENT +11amp TEXT-S$ FOR FIELD E2USER

se(ecti-scree )siti

PARAMETERS4 E2USER1$amp DEFAULT S9-UNAME ser 0r errr-sessi

SELECTION-SCREEN END OF LINE

SELECTION-SCREEN BEGIN OF LINE

SELECTION-SCREEN COMMENT +11amp TEXT-S FOR FIELD E2EEP

se(ecti-scree )siti

PARAMETERS4 E2EEP AS CltECBOX 3 3 = 7e(ete sessi i0 0iis5e7

3X3 = gtee) sessi i0 0iis5e7

SELECTION-SCREEN END OF LINE

SELECTION-SCREEN BEGIN OF LINE

SELECTION-SCREEN COMMENT +11amp TEXT-S FOR FIELD E2ltDATE

se(ecti-scree )siti

PARAMETERS4 E2ltDATE LIE S9-DATUM

SELECTION-SCREEN END OF LINE

SELECTION-SCREEN SIP

SELECTION-SCREEN BEGIN OF LINE

SELECTION-SCREEN COMMENT 1amp TEXT-S1 FOR FIELD NODATA

PARAMETERS4 NODATA DEFAULT 33 LOER CASE 7ata

SELECTION-SCREEN END OF LINE

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

Batc5i)t7ata 0 si(e trasacti

DATA4 BDCDATA LIE BDCDATA OCCURS ITlt ltEADER LINE

essaes 0 ca(( trasacti

DATA4 MESSTAB LIE BDCMSGCOLL OCCURS ITlt ltEADER LINE

errr sessi )ee7 3 3 r 3X3amp

DATA4 E2GROUP2OPENED

essae tets

TABLES4 T1

copy SAP AG BC420 12-84

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 8588

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

at se(ecti scree

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

AT SELECTION-SCREEN

r) a7 ser st e 0i((e7 0r create sessi

IF SESSION = 3X3 AND

GROUP = SPACE OR USER = SPACE

MESSAGE E1MSamp

ENDIF

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

)e 7ataset

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

FORM OPEN2DATASET USING P2DATASET

OPEN DATASET P2DATASET IN TEXT MODE

IF S9-SUBRC

RITE4 TEXT-E S9-SUBRC

STOP

ENDIF

ENDFORM

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

c(se 7ataset

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

FORM CLOSE2DATASET USING P2DATASET

CLOSE DATASET P2DATASET

ENDFORM

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

create atc5i)t sessi

t 0r ca(( trasacti siamp

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

FORM OPEN2GROUP

IF SESSION = 3X3

SIP

RITE4 $amp 3Create r)3I1amp GROUP

SIP

)e atc5i)t r)

CALL FUNCTION 3BDC2OPEN2GROUP3

EXPORTING CLIENT = S9-MANDT

copy SAP AG BC420 12-85

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 8688

GROUP = GROUP

USER = USER

EEP = EEP

ltOLDDATE = ltOLDDATE

RITE4 amp 3BDC2OPEN2GROUP3I$amp

1$amp 3retrc7e43I+amp

S9-SUBRC

ENDIF

ENDFORM

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

e7 atc5i)t sessi

ca(( trasacti si4 errr sessiamp

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

FORM CLOSE2GROUP

IF SESSION = 3X3

c(se atc5i)t r)

CALL FUNCTION 3BDC2CLOSE2GROUP3

RITE4 amp 3BDC2CLOSE2GROUP3Iamp

1$amp 3retrc7e43I+amp

S9-SUBRC

ELSE

IF E2GROUP2OPENED = 3X3

CALL FUNCTION 3BDC2CLOSE2GROUP3

RITE4

RITE4 amp 3Fe5(era))e 6r7e eret3Iamp

ENDIF

ENDIF

ENDFORM

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

Start e6 trasacti accr7i t )araeters

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

FORM BDC2TRANSACTION USING TCODE

DATA4 L2MSTRINGamp

DATA4 L2SUBRC LIE S9-SUBRC

atc5 i)t sessi

IF SESSION = 3X3

CALL FUNCTION 3BDC2INSERT3

EXPORTING TCODE = TCODE

TABLES D9NPROTAB = BDCDATA

RITE4 3BDC2INSERT3Iamp

copy SAP AG BC420 12-86

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 8788

TCODE

3retrc7e43I+amp

S9-SUBRC

3RECORD43

S9-INDEX

ca(( trasacti si

ELSE

REFRESlt MESSTAB

CALL TRANSACTION TCODE USING BDCDATA

MODE CTUMODE

UPDATE CUPDATE

MESSAGES INTO MESSTAB

L2SUBRC = S9-SUBRC

RITE4 3CALL2TRANSACTION3

TCODE

3retrc7e43I+amp

L2SUBRC

3RECORD43

S9-INDEX

LOOP AT MESSTAB

SELECT SINGLE FROM T1 ltERE SPRSL = MESSTAB-MSGSPRA

AND ARBGB = MESSTAB-MSGID

AND MSGNR = MESSTAB-MSGNR

IF S9-SUBRC =

L2MSTRING = T1-TEXT

IF L2MSTRING CS 313

REPLACE 313 ITlt MESSTAB-MSGH1 INTO L2MSTRING

REPLACE 3$3 ITlt MESSTAB-MSGH$ INTO L2MSTRING

REPLACE 33 ITlt MESSTAB-MSGH INTO L2MSTRING

REPLACE 33 ITlt MESSTAB-MSGH INTO L2MSTRING

ELSE

REPLACE 33 ITlt MESSTAB-MSGH1 INTO L2MSTRING

REPLACE 33 ITlt MESSTAB-MSGH$ INTO L2MSTRING

REPLACE 33 ITlt MESSTAB-MSGH INTO L2MSTRING

REPLACE 33 ITlt MESSTAB-MSGH INTO L2MSTRING

ENDIF

CONDENSE L2MSTRING

RITE4 MESSTAB-MSGT9P L2MSTRING$+amp

ELSE

RITE4 MESSTAB

ENDIF

ENDLOOP

copy SAP AG BC420 12-87

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 8888

SIP

Eree 0e5(era))e

IF L2SUBRC AND E2GROUP SPACE

IF E2GROUP2OPENED = 3 3

CALL FUNCTION 3BDC2OPEN2GROUP3

EXPORTING CLIENT = S9-MANDT

GROUP = E2GROUP

USER = E2USER

EEP = E2EEP

ltOLDDATE = E2ltDATE

E2GROUP2OPENED = 3X3

ENDIF

CALL FUNCTION 3BDC2INSERT3

EXPORTING TCODE = TCODE

TABLES D9NPROTAB = BDCDATA

ENDIF

ENDIF

REFRESlt BDCDATA

ENDFORM

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

Start e6 scree

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

FORM BDC2D9NPRO USING PROGRAM D9NPRO

CLEAR BDCDATA

BDCDATA-PROGRAM = PROGRAM

BDCDATA-D9NPRO = D9NPRO

BDCDATA-D9NBEGIN = 3X3

APPEND BDCDATA

ENDFORM

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

Isert 0ie(7

Page 11: BC420_46C - 012The Transaction Recorder

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 1188

066

983209 SAP AG 1999

Special Recording 9ields

9unction code triggered on

this screen

9ield name )here cursor

)as last positioned on the

screen

Comer

Company code

Z-88-10000

Genera daa

Dlt=D1

DltURSR

uring a recording the foo$ing additiona fieds are automaticay recorded

The BDC_OKCODE fied contains the function code triggered on the screen

The BDC_CURSOR fied contains the fied name of the ast fied the cursor $as positioned in

efore eiting the screen

copy SAP AG BC420 12-11

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 1288

06amp

983209 SAP AG 1999

Determining the 9ield ame

Technical info

Screen field

R90ampD =UR

Comer

Company code

Z-88-10000

Genera daa

96help

Sa

Program SAPM90ampDScreen number 608

The information recorded in the TA recorder can aso e dispayed onine for each transaction

To find out the current modue poo name and the screen numer choose Systemrarr Status from the

menu

To determine the fied name pace the cursor on a fied and seect F8 hep The name of the screen

fied can e found under technical information

copy SAP AG BC420 12-12

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 1388

06

983209 SAP AG 1999

Subscreens

Comer Z-88-10000

+ame

+ame

ADDR6ltDATAAM16

DltSUSR

Information$

ode poo name

Screen nmer

Screen name

Some screens contain suscreen areas

To determine the fied name pace the cursor on the fied and choose F1 The name of the screen

fied is specified under Technical info

copy SAP AG BC420 12-13

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 1488

064

983209 SAP AG 2001

Tabstrips

$er Roberts

1ample$ User Profile Defaults

Sar men +

oon anae

ampp dece Pr1

ParameerDefaults

DltSUSR

USD19AULTSSPLD

The tastrip eement sho$n is used on the aintain User rofile (5$n data) screen

4nder the tastrip tite Defaults the user can set various vaues such as the defaut printer

The user profie are user9dependent settings (as the name impies)

copy SAP AG BC420 12-14

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 1588

062

983209 SAP AG 1999

Step Loops and Table ontrols

1ample$ an+ Details

Comer

ntr( an+ +e( Account

08154711

123456789

Z-00-12345

an+ Details

00708155546344536

Banlt daa

==A=C06)

==A=C0amp)

Step oops and tae contros are treated identicay for the recording

The fied names of the fieds isted are the same for every ro$

7ach ro$ contains a customers an detais The fieds must e accessed using an inde (this is

specified as an addition to the fied name for eampe 6N69AN6N(1) The inde must match

the ro$ numer

5ny the visie fieds on a screen can e fied $ith data If some fieds are ony visie after paging

the paging must e recorded as $e This means that for the recording you must eecute a the steps

in the onine transaction

For eampe age on $oud e eecuted using the function code 1 (Paging icons)

Paging to the end of a ist 1Page up 11

lto to first page 18

copy SAP AG BC420 12-15

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 1688

068

983209 SAP AG 2001

Recording Buidelines

Test the transaction before recording

Start the recording

hange field alues onl( for fields

releant to the recording

As of 48 all filled fields are recorded

Transaction must be properl( eitedCSA1

Use of scroll bars cannot be recorded

Specia recording notes

F8 F and your o$n F8 and F hep (Pamp527SS 5N =7+P9amp7gt47ST Pamp527SS 5N A+479

amp7gt47ST) are not recorded This aso appies to a commands under the System and $el

menus aues for defaut variants ( transaction variants) are not incuded

7rror and $arning diaogs are not recorded 5ny the 56 code and the fied contents reuired for

further processing on the current screen are recorded

Note uring recording the data entered is $ritten to the dataase

copy SAP AG BC420 12-16

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 1788

063

983209 SAP AG 2001

1n-o( SAP ontrols and Data Transfer

bull SAP Picture ontrolbull SAP ETML ie)er ontrol

bull SAP Tet 1dit ontrol

bull AL Brid ontrol

bull SAP Tree ontrol

bull

ranch 6

ranch amp

Root

These and other controls do not support batch input$

Root

ranch amp

ranch amp6

The ne$ 7noy SAP contros deveoped for ampeease B do not support atch input or ca

transaction

=o$ever tae contros and tastrips do support atch input

copy SAP AG BC420 12-17

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 1888

065

983209 SAP AG 1999

The Transaction Recorder

PrinciplesPrinciples

Recording )ith the LSMWRecording )ith the LSMW

Principles of atch Input and all TransactionPrinciples of atch Input and all Transaction

Integrating the TA Program into the DWIntegrating the TA Program into the DW

Using the TA Recorder Using the TA Recorder

copy SAP AG BC420 12-18

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 1988

067

983209 SAP AG 1999

Session

generator

Recording Using the LSMW

-ith the +S- you can create your o$n recordings

The +S- uses the standard TA recorder here yet evauates the recording itsef The information

from the recording is used to create atch input sessions

The created atch input session can e processed as usua $ith the atch input monitor

Note As $ith the standard procedure it is euay important that the data is converted

copy SAP AG BC420 12-19

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 2088

0amp0

983209 SAP AG 1999

reating Recording

Admnraon

ecordn

Goo

ame of recording

Description

)ner

ame of transaction

Start recording

lto into the +S- and seect the menu path ampoto (Recorings An overvie$ of a previousy

created recordings for your proect are dispayed To start a ne$ recording seect Create

To create a recording you must define the name the description and the o$ner

7nter the name of the transaction you $ant to record

7ecute the transaction and compete it propery

Note ampecordings are assigned to ony one proect 9 so the name of the recording must e uniue

copy SAP AG BC420 12-20

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 2188

0amp6

983209 SAP AG 1999

hanging ustomer Data$ Initial Screen

9ield ontents

BCC$Samp $SZAV

BCamp(Camp )00

02-($++ -88-10000

02-0110

02-0130

$SZAV

9ield ame

Comer

Company code

Z-88-10000

Genera daa

Comer Z-88-10000

+ame

9ield ontents

BCamp(Camp $PA

BCS$BSC SAPSZA1 0300ASS

BCS$BSC SAPSZA1 0301Camp$

BCC$Samp SZA10100-+$B

A1AA-S Garden Sree

A1AA-amp$S+$1 34

A1AA-PampSCamp1 02105

9ield ame

Screen

111

Screen

106

In the aove eampe the transaction Change customer F01 is recorded

Note

You must ma)e some modification to the field values for all the fields you ant to capture

for the data transfer For the purposes of recording a change can simply mean overriting

one single character in a field ith the same character

ven if fields are to e filled using S$amp$ parameters the values must still e changed on

the screen in order to capture them

(ith online transactions screen sequences may appear that are different than in the

recording

copy SAP AG BC420 12-21

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 2288

0ampamp

983209 SAP AG 1999

Results

RecordingRecording R1lt6 Demolt6

9D0amp hange customer Caccounting

SAPM90ampD 0608

DltURSR R90ampD=UR

Dlt=D1 gt00

R90ampD=UR 5560000

R90ampDD0660

US1ltA

SAPM90ampD 0666

Dlt=D1 UPDA

DltSUSR SAPLSA6

DltSUSR SAPLSA6

DltURSR SA6ltD0600T1LltUM1

ADDR6ltDATASTR11T 4 Barden Street

ADDR6ltDATAPSTltD1 0amp602

ADDR6ltDATAIT6 oston

SA6ltD0600T1LltUM1 8638257755

The resuts of the recording using the +S- are dispayed in a tree structure

After the recording has finished you can edit it Cou can deete fieds or add ne$ ones

copy SAP AG BC420 12-22

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 2388

0amp

983209 SAP AG 1999

Assigning 9ield ames

Recording R16 Demolt6

Dlt=D1 UPDA

DltSUSR SAPLSA6

DltSUSR SAPLSA6

DltURSR SA6ltD0600T1L

ADDR6ltDATAAM16 Lisa Eofmeister

ADDR6ltDATAPSTltD1 0amp602

ADDR6ltDATAIT6 oston

ame

+ame

ecrpon

e=a ae

A1AA-+A1

A1AA-+A1

Comer name

a o=meer

Screen =ed

ustomer name

double clic+

Cou can assign names for each recorded fied The specia fieds (2356257 2324ampS5amp

and 23S4S2amp77N) are not incuded here Cou can choose the fied names -hen the atch

input session is created the contents of these fieds are assigned to the target fieds specified in the

eft coumn

Functions

efaut Assigns to the fied names of the underying target fied and its fied description

ampeset eetes fied name and fied description

oue cic 7dits fied name fied description and defaut vaue

Note Cou can use fied names more than once =o$ever the fied name is ony avaiae once in thefied mapping For this reason it is not practica to use fied names more than once

For a those fieds for $hich you do not assign a name the defaut vaue is used $hen the atch

input session is created These defaut vaues can e seen as constants This is especiay usefu for

chec oes (for eampe 08 vie$ seection)

The +S- supports automatic fied mapping Source fieds and target fieds can e assigned to each

other automaticay The fieds are assigned to the corresponding fieds of the same name Therefore

the fied names of the source structure shoud e given the same or simiar names as the fied names

in the target structure

copy SAP AG BC420 12-23

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 2488

0amp4

983209 SAP AG 2001

Addinggtremoing screen fields

Repeating recording

9or identical field names the name and description are

assigned automaticall(

1diting Recording

02-($++

(+A1-A+

(+A1-+A1

(+A1-Samp

(+A1-+A2

(+A1-SAS

Comer accon nmer

e

+ame 1

Sor =ed

+ame 2

Sree

Selection of all

aailable screen

fields

Cou can ater add ne$ screen fieds if you need to 6eep in mind that fieds shoud ony e added in

paces $here they are aso provided on the screen other$ise you $i get an error $hen the I

session is processed

After saving you $i get the message The data has een saved successfuy No$ the recordings

are avaiae for the oect attriutes

If you repeat the recording you can record a ne$ screen seuence $ith ne$ fieds Provided that the

fied names (eg 6NA89NA78) are identica the names and descriptions are automaticay

assigned

copy SAP AG BC420 12-24

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 2588

0amp2

983209 SAP AG 1999

b-ect T(pe and Import Method$ Recording

Standard atch Input gt Direct Input

atch Input Recording

API

IDoc

ampgtec ype ) mpor meod

Bac np recordn

ecordn ec1

The recording is no$ avaiae $ith the oect attriutes

Net you create a proect or su9proect in the +S- and specify process the data transfer

Cou eecute the data transfer as in the standard system

efine the source fieds and structures

efine the fied mapping

ampead and convert the data

2reate and import a atch input session

copy SAP AG BC420 12-25

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 2688

0amp8

983209 SAP AG 1999

The Transaction Recorder

PrinciplesPrinciples

Recording )ith the LSMWRecording )ith the LSMW

Principles of atch Input and all TransactionPrinciples of atch Input and all Transaction

Integrating the TA Program into the DWIntegrating the TA Program into the DW

Using the TA Recorder Using the TA Recorder

copy SAP AG BC420 12-26

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 2788

0amp3

983209 SAP AG 1999

Transaction Recorder

Online

Transaction

RecordingTransfer Program

T

Included in the Batch Input Monitor

Cou use the transaction recorder to record transactions and then use the transaction recording to

generate a transfer program The program ao$s you to transfer data using either atch input or ca

transaction

copy SAP AG BC420 12-27

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 2888

0amp5

983209 SAP AG 1999

hanging ustomer Data$ Initial Screen

9ield ontents

BCC$Samp $SZAV

BCamp(Camp )00

02-($++ Z-88-10000

02-0110

02-0130

$SZAV

9ield ame

Comer

Company code

Z-88-10000

Genera daa

Comer Z-88-10000

+ame

9ield ontents

BCamp(Camp $PA

BCS$BSC SAPSZA1 0300ASS

BCS$BSC SAPSZA1 0301Camp$

BCC$Samp SZA10100-+$B

A1AA-S Garden Sree

A1AA-amp$S+$1 34

A1AA-PampSCamp1 02105

9ield ame

Screen

111

Screen

106

In the aove eampe the transaction Change customer F01 is recorded

copy SAP AG BC420 12-28

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 2988

0amp7

983209 SAP AG 2001

hange Debitor$ Pa(ment Transactions C6

Banlt dea

Screen

10

9ield ontent

BCC$Samp (+B(-BA+(+01

BCamp(Camp BA+((+B(-BA+(S01

(+B(-BA+(01 12345679

(+B(-BA+(+01 22222222

Debitor 5560000

9ield ame

Inde

copy SAP AG BC420 12-29

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 3088

00

983209 SAP AG 1999

hanging ustomer Data$ Pa(ment Transactions Camp

Addre

an+ countr( US

an+ code 6amp42837

Banlt dea

ustomer 5560000

9ield ontents9ield ame

BCC$Samp (+A1-(+ZA

BCamp(Camp $PA

(+B(-Z01

Screen

10

Screen

100

SAPLBA

9ield ontents

BCC$Samp B+(A-BA+(A

BCamp(Camp +

B+(A-BA+(A +aona Banlt

9ield ame

In different transactions the modue poo may change This is the case $ith for eampe customer

master data The TA recorder records modue poo changes automaticay

copy SAP AG BC420 12-30

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 3188

06

983209 SAP AG 1999

Eierarch( Displa( of the Recording

02amp

02

SAP02 0106

BCC$Samp 02-0130

BCamp(Camp )00

02-($++ -88-10000

02-0110

02-0130

SAP02 0111

BCamp(Camp V

BCC$Samp A1AA-amp$S+$1

A1AA-S Garden Sree

Recording

-ith the TA recorder the resuts are aso a ist in a hierarchy dispay =o$ever you cannot assign

your o$n fied names as you can in the +S-

copy SAP AG BC420 12-31

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 3288

0amp

983209 SAP AG 1999

Recording erie)

Recording

Transfer program

9unction module

ontains onl( the data

from the recording

Test data

Test

reate

reate

reate

reate

1dit hange recording

Process recording

Cou can edit the recording as needed

The recording can e tested and eecuted again The screens are run through in the same $ay as in

the recording

The recording can then e used to create

atch input sessions

Test data

ata transfer programs $ith atch input or ca transaction

Function modues

copy SAP AG BC420 12-32

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 3388

0

983209 SAP AG 1999

1 02 BS

2 SAP02 106

3 BCC$Samp $SZAV

4 BCamp(Camp )00 5 02-($++ -88-10000

6 02-0110

7 02-0130

8 $SZAV

9 SAP02 111

10 BCamp(Camp V

11 BCC$Samp A1AA-amp$S+$1

12 A1AA-S Garden Sree

Program Screen St 9ield ame 9ield alue

Recording 1ditor

Recording

Add gt delete lines 9ormat chec+

Import gt eport of recording

In the editor you can add or deete ines Cou can aso change the contents of individua ines

-ith the function Chec) you can specify $hether the edited version of the recording sti has the

correct synta

Cou can aso eport import recordings to from a seuentia fie

After editing save the recording changes

copy SAP AG BC420 12-33

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 3488

04

983209 SAP AG 1999

Recording Seeral Transaction Runs

RecordingF

Directl( after the first recordingG or

In the displa( mode of the recording

In this step you can record additiona transactions and add additiona transaction runs to the

recording

Cou can record the additiona transactions directy after a recording or in the edit screen of a

recording

copy SAP AG BC420 12-34

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 3588

02

983209 SAP AG 1999

1ditor$ Importing and 1porting Recordings

6 T 9D0amp S

amp SAPM90ampD 608

DltURSR

4

2

8 SAPM90ampD 666

60

66

Program Screen St 9ield name 9ield alue

cempA

e name

aa =orma

cemp

A

e name

aa =orma

1port

Import

Presentation Serer

If the editor functions in the systems do not provide a the functions you need you can do$noad the

recording to your presentation server using the Eort function and then edit the recording using a

P2 editor

Cou use the Import function to import the data ac into the amp System ae sure the fie is sti in

the correct format

copy SAP AG BC420 12-35

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 3688

08

983209 SAP AG 1999

Processing the Recording

Recording

Process )ith ALL TRASATI

Parameer

Proce mode$pdae mode

CA mode

e=a e

Con a=er comm

+o a B eon

nd +o a B mode

A

A

T

The recording can e eecuted directy The data from the recording is used and the transaction is

processed $ith ca transaction

2a transaction provides a range of options for caing appication transactions $hich are discussed

on the foo$ing t$o pages

copy SAP AG BC420 12-36

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 3788

03

983209 SAP AG 1999

Process mode

Update mode

ATT mode

Processing Recording )ith T 6

A

1

Displa( all screens

Displa( errors onl(

o displa(

L

S

A

Local

S(nchronous

As(nchronous

A

o ATT

ATT )ithout indiidual screen control

ATT )ith indiidual screen control

Processing mode

=ere you can specify the processing mode 9 it is the same as the processing mode for atch input

4pdate mode

=ere you can specify the update mode For more information see the unit ca transaction

2ATT mode

=ere you can mae specia settings if you $ant to test the recording under 2ATT conditions (ony

necessary for 2ATT runs) Specia functions are caed in the 2ATT too for each screen at the end of

P5 and at the start of PAI

copy SAP AG BC420 12-37

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 3888

05

983209 SAP AG 1999

Default sie

ont after commit

ot a I session

1nd$ ot a I mode

Processing Recording )ith T amp

The screen standard sie is used for the

processing

ommit )or+ does not end the processing

o I mode is actie The transaction )ill run

through as in online

I mode is selected nce the data in the D

table is processedG the I mode is set to inactie

Standard siDe

If you seect this the screens are processed in the standard siDe in the foreground (in foreground or

dispay errors ony) Note the standard siDe is a$ays used for acground processing

Further after commit

The first commit $or in a transaction does not ead to the end of the recording

Note A atch input transaction is ended $ith the first commit $or

No I mode

The system fied SC9INPT is not set (SC9INPT E ) So transactions are run through as in onine

7nd No I mode

5ny use if you choose the processing mode 7 (dispay errors ony) Then the transaction is processed in the acground in atch input mode and if there is an error the screens run through in

the foreground

copy SAP AG BC420 12-38

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 3988

07

983209 SAP AG 1999

I Mode

atch input

mode

nline

Some transactions behae differentl( in batch input mode

than in online Cbatch input capabilit(

atch input mode sets the s(stem field SIPT H

Not every transaction can run the same onine and in atch input mode The transaction must decide

itsef $hether it is caed onine or in atch input mode

The system sets the system fied SC9INPT E G if the atch input mode is active (this aso appies

to ca transaction) From this system fied the transaction can identify $hether to run onine or in

atch input mode

copy SAP AG BC420 12-39

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 4088

040

983209 SAP AG 1999

reating a Session 9rom the Recording

Recordingnl( contains the data

from the recording

Seon name 02amp

Aoraon ampBS(eep eon

oclt dae 10102000

Cou can create a atch input session directy from the recording that you can then process using the

atch input monitor

copy SAP AG BC420 12-40

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 4188

046

983209 SAP AG 1999

reating Test Data

Test Data

Recording

ranranpBC420AAe name

The file onl( contains the data from the recording

Rgt

Application Serer

Structure

Cou can create a fie from the recordingH the fie $i contain a the fieds from the recording The

fieds are added to the fie $ith the ength you specified in the definition

The fied order corresponds to the order in the recording overvie$ Technica fieds

(2356257 2324ampS5amp and so on) are incuded

The data can ony e stored on the appication server If you do not specify a path the fie is stored in

the $or directory of the appication server

If the specified test fie aready eists the ne$ data record is added to this fie

copy SAP AG BC420 12-41

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 4288

04amp

983209 SAP AG 1999

ed conen

reating a Program

Recording

ZBC420ampProram name

Transfer Program

e daa

ead =rom =e

ran=er =rom recordn

reate

9ile nameTest data

ranranpBC420AA

Cou can generate a program from the recording

In the foo$ing diaog o enter a program name In addition you can choose the type and method

for fiing the maintained fied contents from the recorded screens

4se the vaues used for the recording If you reuire feie data transfer you $i have to modify

this program ater

ParameteriDe the input vaues and read these vaues from a fie A data structure is created for

parameteriDationH the data records are read from an eterna fie into this data structure The

program assumes the fie $as taiored to this data structure

If you have decided to parameteriDe the input vaues you shoud aso create a test fie during

generation To do this seect the checo and enter a name for the fie

The attriute maintenance screen of the AAP editor appears aintain the attriutes and save the

program

copy SAP AG BC420 12-42

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 4388

04

983209 SAP AG 1999

Program 9unctions

Online

transaction

Transfer program

To

error

1rror

ption 6ption ampFlat SAP

structure

Monitor

Cou have no$ generated a data transfer program for importing data into the amp System The

program can eecute the data transfer using atch input or ca transaction

If you choose option 1 and there is an error the data record is paced into a atch input session

copy SAP AG BC420 12-43

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 4488

044

983209 SAP AG 1999

Benerating 9unction Modules

Recording

Zcreaedeor ncon mode

ncon rop

Sor eD

ZBC420

Creae comer

9unction module

nl( one data record can be processed at a time

In the net diaog o you can generate a function modue a function group and short tet from the

recording The function modue is automaticay created in the function group

copy SAP AG BC420 12-44

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 4588

042

983209 SAP AG 1999

9unction of 9unction Modules

Online

transaction

To

error

1rror

ption 6 ption amp

9unction module

Import

Parameter 1port

parameter

Tables

M1SSTA

Monitor

S$BC

Import interface

The import interface consists of a technica part and the fieds from the recording (A parameter is

created for each input fied of the recorded transactions)

7port interface

Simpy consists of the parameter S4amp2 The function modue $i return a vaue in the system

fied SC9S4amp2 after caing ca transaction This return vaue is set to Dero if the data record has

een correcty processed (5ny appies to 2T)

If a session is created you $i e notified $hether the data record coud e paced into the session

Tae interfaceThis is used ony if the function modue $ors $ith ca transaction The tae contains a the

system messages

copy SAP AG BC420 12-45

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 4688

048

983209 SAP AG 1999

Import Interface of 9unction Module

$

Technical

fields

Data

fields

BI session or CALL TRANSACTION

Processin $ode

pdate $ode

a$e oamp BI session iamp (T initial)

Bacround user iamp (T initial)

Delete session aampter processin

Loc date oamp session

ODATA indicator

TU

MD1

UPDAT1

BRUP

US1R

=11P

ELDDAT1

DATA

Cou can use parameter 2T4 to specify $hether the function modue creates a atch input session

(2T4 E ) or updates the data record directy using ca transaction (2T4 E G)

The other parameters are fied as for a atch input session header

Note 7very time the function modue is caed a atch input session is created

If the session is to contain severa transactions proceed as foo$s

ltenerate the transaction severa times This can e achieved y recording the transaction again The

function modue interface $i then contain more than one transaction -hen the function modue is

caed severa transactions can e generated for each session

copy SAP AG BC420 12-46

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 4788

043

983209 SAP AG 1999

The Transaction Recorder

PrinciplesPrinciples

Recording )ith the LSMWRecording )ith the LSMW

Principles of atch Input and all TransactionPrinciples of atch Input and all Transaction

Integrating the TA Program into the DWIntegrating the TA Program into the DW

Using the TA Recorder Using the TA Recorder

copy SAP AG BC420 12-47

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 4888

045

983209 SAP AG 1999

Benerated Program

9unction modules DltP1ltBRUP

DltIS1RT

DltLS1ltBRUP

AAP Program

Define structure of

data in seJuential

fileDefine D

table

pen seJuential file

pen I session

Read data recordCseJuential file

9ill D table

9ill I session gtALL TRASATI

Last data record K

lose I session

lose seJuential file

The generated program has the structure dispayed aove It uses the standard function modues for

creating atch input sessions

copy SAP AG BC420 12-48

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 4988

047

983209 SAP AG 1999

Structure of the Benerated Program

Benerated part

Define D

table

pen seJuential file

pen I session

Read data record

9ill D table

9ill I session gtALL TRASATI

Last data recordK

lose I session

lose seJuential file

Include DR16

Define filestructure

P1ltDATAS1T

P1ltBRUP

DltDPR

Dlt9I1LD

DltTRASATI

LS1ltBRUP

LS1ltDATAS1T

The generated program consists of t$o parts 9 a generated part and the incude 2amp72G8 The

incude is provided in the standard system

The incude contains the definition of the reuired 2 tae and a further seven suroutines These

suroutines eecute the foo$ing functions

5pen and cose fie

5pen and cose session

Fi 2 tae

Fi session

The generated part is the main program and cas the reevant suroutines A structure is aso

generated in the generated part to read the eterna data into the fie

See the Appendi for more information on the 2amp72G8 program

copy SAP AG BC420 12-49

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 5088

020

983209 SAP AG 1999

Structure of D Table

PRBRAM DPR D1BI 9AM 9ALPRBRAMPRBRAM DPRDPR D1BID1BI 9AM9AM 9AL9AL

SAPM90ampD 0602

R90ampD=UR 600000

R90ampDU=RS 0006

R90ampD=T=D =UA

SAPM90ampD 0660

=A6AM16 Smith

=A6PSTL 87000

=A6LAD6 US

=A6SPRAS 1

SAPM90ampD 06amp0

=A6ST1B US6amp428357DDATA

PRBRAM

DPR

D1BI

9AM

9AL

EAR

UM

EAR

EAR

EAR

40

4

6

6amp

6amp

D Module pool

D Screen number

D Start of screen

D 9ield name

D 9ield contents

9ield ame T(pe Length Short Tet

AAP Dictionar(

The 2 tae has the same structure as in a standard transfer

copy SAP AG BC420 12-50

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 5188

026

983209 SAP AG 1999

Read Structure

Recording

DATA BEGIN OF record data element BUKRS bukr$amp data element KTOKD ktokd$amp data element NA(EG) name$+amp data element SORT ortl$ampEND OF record-

record

Automaticall( generated

from recording

The structure of the fie is automaticay generated and is a$ays defined $ith the name amp725amp

The generated structure a$ays has the same ayout 7ach fied is defined y t$o generated ro$s

The first ro$ is a$ays a comment ro$ containing the tet J data eement and the data eement of

the screen fied from the recording In the net ro$ the fied itsef is defined $ith the name of the

data eement foo$ed y a three9digit position numer $hich specifies the ocation in the structure

The ength of the fied is set y the ength of the data eement If a fied is not defined through a data

eement the system uses the ength of the screen fied

copy SAP AG BC420 12-51

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 5288

02amp

983209 SAP AG 1999

pening and losing the 9ile

P1ltDATAS1T

LS1ltDATAS1T

FOR( oendataet USING dataet-O)EN DATASET dataet IN TET (ODE-

IF S01SUBR2 34 - 5RITE 6 te7t1e S01SUBR2-STO)-

ENDIF-

ENDFOR(-

FOR( cloedataet USING dataet-2OSE DATASET dataet-

ENDFOR(-

Include

DR16

The suroutine 5P7N3ATAS7T opens the seuentia fie

The suroutine 2+5S73ATAS7T coses the seuentia fie

copy SAP AG BC420 12-52

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 5388

02

983209 SAP AG 1999

9unction Modules for I Program

lient

Session name

Eold date

=eep session

D user name

RecordK

LI1T

BRUP

ELDDAT1

=11P

US1R

R1RD

DltP1ltBRUPDltP1ltBRUP

Transaction code

D table

TD1

DPRTA

DltIS1RTDltIS1RT

DltLS1ltBRUPDltLS1ltBRUP

pen Isessionpen Isession

Insert data for

transactions

Insert data for

transactions

lose I

session

lose I

session

The foo$ing function modues are provided for creating atch input sessions (function group

S2)

235P7N3ltamp54P

2reates a ne$ session and contains genera data for the $hoe session

23INS7ampT

Inserts a the data for a transaction into the session The transferred interna tae $ith the

structure 2ATA must contain a the data reuired for fuy processing the transaction

232+5S73ltamp54P

2oses the session after a the data has een inserted As soon as the session has een cosed it

can e processed

The interna tae $ith the structure 2ATA can ony contain atch input data for one singe

transaction run So the individua transactions are inserted into the atch input session in a oop

using severa 23INS7ampT cas

copy SAP AG BC420 12-53

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 5488

024

983209 SAP AG 2001

9unction Module DltP1ltBRUP

ALL 9UTI DltP1ltBRUPALL 9UTI DltP1ltBRUP

1PRTIB

LI1T client

BRUP session name

ELDDAT1 loc+ date

=11P delete flag

US1R bdc user name

R1RD recording

IMPRTIB

NID internal session +e(

11PTIS

1PRTIB

LI1T client

BRUP session name

ELDDAT1 loc+ date

=11P delete flag

US1R bdc user name

R1RD recording

IMPRTIB NID internal session +e(

11PTIS

-ith the function modue 235P7N3ltamp54P you can open a atch input session

The foo$ing parameters are mandatory

2+I7NT (cient)

ltamp54P (session name)

4S7amp (user name)

Note The 4S7amp must a$ays e specified This user name is reuired for processing the session

in atch mode

The foo$ing parameters are optiona

=5+AT7 specifies the eariest date on $hich the session can e started677P fag specifies $hether session shoud e deeted after it has een successfuy processed The

677P fag is ignored if the session contains errors

677P E K K means deete the session after processing (defaut vaue) H

677P E KGK means do not deete session

amp725amp E KGK ao$s you to create a recording instead of a I session

If gtI is specified the function modue returns the interna session ey This is needed to e ae to

differentiate sessions that have the same name

-ith 7G27PTI5NS you get various return vaues that can e ueried $ith SC9S4amp2

Note In onine mode the onine user is used for the authoriDation checs regardess of the user

name specified

copy SAP AG BC420 12-54

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 5588

022

983209 SAP AG 1999

Subprogram P1ltBRUP

P1ltBRUP

FOR( oen8rou-IF e9on -

2A FUN2TION BD2O)ENGROU) E)ORTING 2IENT lt1mandt GROU) 8rou USER uer KEE) kee

=ODDATE gtolddate-

ENDIF-ENDFOR(-

Include

DR16

The suprogram 5P7N3ltamp54P opens the atch input session

copy SAP AG BC420 12-55

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 5688

028

983209 SAP AG 1999

9unction Module DltIS1RT

ALL 9UTI DltIS1RTALL 9UTI DltIS1RT

IMPRT

TD1 Transaction code

PSTltLAL Update locall(

PRITIB print list

TAL1S DPRTA bdclttable

11PTIS

IMPRT

TD1 Transaction code

PSTltLAL Update locall(

PRITIB print list

TAL1S DPRTA bdclttable

11PTIS

-ith the function modue 23INS7ampT you can add transaction data to the session

Cou need an interna 2 tae to transfer the data

The foo$ing parameters are mandatory

T257 Transaction code

CNPamp5TA 2 tae

The foo$ing parameters are optiona

P5ST3+52A+ E KGK activates oca updating This means that the data to e updated is ept in the

appication server and updated in the ast step of the transaction This does not invove the update

process (For more information see course 28 Programming ataase 4pdates)

PampINTINlt E KGK 9 ists processed in I $i e printed immediatey -ith 7G27PTI5NS you get various return vaues that can e ueried $ith SC9S4amp2

copy SAP AG BC420 12-56

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 5788

023

983209 SAP AG 1999

Subprogram DltTRASATI

DltTRASATI

FOR( BD2TRANSA2TION USING tcode-

IF e9on -2A FUN2TION BD2INSERT

E)ORTING T2ODE tcode TABES D0N)ROTAB bdcdata-

ESE-

ENDIF-ENDFOR(-

T

Include

DR16

The suprogram 23TampANSA2TI5N moves the fied 2 tae either to a atch input session

or uses ca transaction to import the data into the system 5n the seection screen you can specify

$hether you $ant to create a session or you $ant to use ca transaction to process the data directy

The S7SSI5N fied is then set according to your seection

copy SAP AG BC420 12-57

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 5888

025

983209 SAP AG 1999

9unction Module DltLS1ltBRUP

ALL 9UTI DltLS1ltBRUP

11PTIS

TltP1 6

NU1U1lt1RRR amp

-ith the function modue 232+5S73ltamp54P you can cose a atch input session

In 7G27PTI5NS you get various return vaues that can e ueried $ith SC9S4amp2

copy SAP AG BC420 12-58

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 5988

027

983209 SAP AG 1999

Subprogram LS1ltBRUP

FOR( cloe8rou-IF e9on -cloe batcgt 9nut 8rou

2A FUN2TION BD22OSEGROU)-

ESE-IF e8rouoened -

2A FUN2TION BD22OSEGROU)-

ENDIF-ENDIF-

ENDFOR(-

LS1ltBRUPlose session

lose error session

Include

DR16

The suprogram 2+5S73ltamp54P coses the atch input session The suprogram differentiates

et$een a norma I session (S7SSI5N E G) and a session opened $hen ca transaction

encountered an error (73ltamp54P35P7N7 E G)

copy SAP AG BC420 12-59

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 6088

080

983209 SAP AG 1999

Subprograms DltDPRG Dlt9I1LD

DltDPR

Dlt9I1LD

FOR( bdc9eld USING nam al-IF al 34 nodata-2EAR bdcdata- bdcdata1nam nam- bdcdata1al al- A))END bdcdata-ENDIF-

ENDFOR(-

FOR( bdcdltnro USING ro8ram dltnro- 2EAR bdcdata-Bdcdata1ro8ram ro8ram-Bdcdata1dltnro dltnro-Bdcdata1dltnbe89n - A))END bdcdata-ENDFOR(-

Include

DR16

The incude 2amp72GG contains t$o suprograms 23CNPamp5 and 23FI7+

Suprogram 23CNPamp5 fis the 2 tae $ith program names and screen numers

Suprogram 23FI7+ fis the 2 tae $ith fied names and vaues

7ach suprogram creates an entry in the 2 tae

copy SAP AG BC420 12-60

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 6188

086

983209 SAP AG 1999

9illing the D Table

erorm bdcdltnro u9n8 SA)(FD +- erorm bdc9eld u9n8 BD22URSOR RFD1BUKRS- erorm bdc9eld u9n8 BD2OK2ODE 6- erorm bdc9eld u9n8 RFD1BUKRS record1BUKRS- erorm bdc9eld u9n8 RFD1KTOKD record1KTOKD-

erorm bdcdltnro u9n8 SA)(FD -

erorm bdc9eld u9n8 BD22URSOR KNA1S)RAS- erorm bdc9eld u9n8 BD2OK2ODE 6- erorm bdc9eld u9n8 KNA1NA(E record1NA(E-

erorm bdc9eld u9n8 KNA1SORT record1SORT-

Recording Benerated automaticall(

from the recording

)ERFOR( bdcdltnro USING SA)(FD +- )ERFOR( bdc9eld USING BD22URSOR RFD1BUKRS-)ERFOR( bdc9eld USING BD2OK2ODE 6-)ERFOR( bdc9eld USING RFD1BUKRS record1BUKRS-)ERFOR( bdc9eld USING RFD1KTOKD record1KTOKD-

)ERFOR( bdcdltnro USING SA)(FD -

)ERFOR( bdc9eld USING BD22URSOR KNA1S)RAS-)ERFOR( bdc9eld USING BD2OK2ODE 6-)ERFOR( bdc9eld USING KNA1NA(E record1NA(E-

)ERFOR( bdc9eld USING KNA1SORT record1SORT- ---

The 2 tae is fied $ith data from the recording The suroutines 23CNPamp5 and

23FI7+ are used for this

The suroutines are caed in the reuired structure or seuence

copy SAP AG BC420 12-61

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 6288

08amp

983209 SAP AG 1999

erie)

SAPDatabase

SeJuential9ile

SAPDatabase

ALL TRASATIALL TRASATI

SeJuential9ile

ATE IPUTATE IPUT

D TableD TableD TableD Table

I Monitor

T

In contrast to atch input you can use ca transaction to directy pass data to the diaog interface

$ithout using a atch input session Cou use an interna tae (2 tae same structure and ayout

as atch input) to temporariy store your screen data Then you ca the desired transaction in your

program

Note 5n average the 2a Transaction method is 8 to times faster than using atch Input

copy SAP AG BC420 12-62

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 6388

08

983209 SAP AG 1999

all Transaction Program$ 1ample

RE)ORT abcbdcdcdeb9ct-

)ARA(ETERS d9mode DEFAUT A

udmode DEFAUT S-FOR( calltranact9on-2A TRANSA2TION FD

USING bdcdata (ODE d9mode

U)DATE udmode-

IF lt1ubrc NE - 5RITE 6 ---

ENDIF-ENDFOR(-

Screen

00

Screen

100

Screen

An additiona system ro area is added for the caed transaction The system uses this area for

processing the individua screens in the transactionH the data from the tae is added here After the

transaction is processed the second ro area is reeasedH the system continues processing in the first

ro area

Notes

In contrast to atch input there is no error ogging (error sessions) here For processing the caed

transaction the system uses the authoriDations of the user that caed the transaction The 2 tae

can ony hod data for one transaction run at a time efore another transaction is caed and its data

can e added you must eecute a amp7Famp7S= for the 2 tae

copy SAP AG BC420 12-63

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 6488

084

983209 SAP AG 1999

ALL TRASATI C6

RE)ORT 777-

2A TRANSA2TION FD USING bdcdata (ODE E-

Default for MD1 is A

2A TRANSA2TION 3tranact9oncode4 USING 3bdc1table4 C (ODE A E N C-

-ith the parameter 57 you can seect a specific dispay mode for processing the transaction The

foo$ing three modes are avaiae

A (ispay a)

If you eecute the program a the screens and a their data are dispayed This is the defaut vaue

for the 57 in 2A++ TampANSA2TI5N

N (ispay nothing)

The screens are not dispayed at a regardess of $hether any of them contained errors As soon as

the transaction has een fuy processed contro is returned to your program (The vaue of the

parameter 4PAT7 determines $hether dataase updates are eecuted or not)

7 (ispay errors ony)As soon as an error occurs in a screen the transaction is s$itched to dispay mode so that you can

correct the errors

These dispay modes are the same as those in the atch input session processing

copy SAP AG BC420 12-64

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 6588

082

983209 SAP AG 1999

RE)ORT 777-

2A TRANSA2TION FD USING BD2DATA U)DATE -

ALL TRASATI Camp

RE)ORT 777-

2A TRANSA2TION FD USING bdcdata U)DATE -

2A TRANSA2TION 3tranact9oncode4 USING 3bdc1table4 C (ODE A E N C U)DATE A S C -

Default for UPDAT1 is A

-ith the parameter 4PAT7 you can contro ho$ dataase updates arising from a transaction are

carried out There are three options

A (asynchronous updating) The caed transaction does not $ait unti the dataase has een

updated it simpy for$ard the updates to the SAP update service This usuay speeds up the 2T

program This processing mode is N5T recommended for arge data sets as the caed transaction

does not receive a competion message from the update modue

The caing 2T program therefore cannot te if the transaction has een successfuy competed Cou

shoud use the updating administration function (transaction S8) to determine $hether updating

$as terminated eary The error anaysis correction functions for are ess hepfu than $ith

synchronous updating

S (synchronous updating) -ith synchronous updating the caed transaction $aits unti a the

updates have een competed So processing is so$er than $ith synchronous updating The caed

transaction can ho$ever report any updating errors to the program $hich maes error

anaysiscorrection easier

+ (local updating) $ith oca updating the dataase is not updated in a separate process it is

updated in the caers process (see appication hep documentation for the AAP ey$ord S7T

4PAT7 TAS6 +52A+)

copy SAP AG BC420 12-65

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 6688

088

983209 SAP AG 1999

ALL TRASATI C

RE)ORT 777-DATA mtab T0)E TABE OF bdcm8coll-

2A TRANSA2TION FD USING bdcdata (ESSAGES INTO mtab-

2A TRANSA2TION 3tranact9oncode4 USING 3bdc1table4 C (ODE A E N C U)DATE A S C (ESSAGES INTO 3metab4 C -

7SSAlt7S specifies that a system messages that are output during the eecution of a 2A++

TampANSA2TI5N are $ritten to the interna tae L7SSTA The interna tae must have the

structure 2Slt25++

4nie the cassica atch input processing $ith sessions 2A++ TampANSA2TI5N does not offer any

specia processing procedures for transactions containing errors There are no restart functions for

transactions that contain errors or that cause updating terminations

copy SAP AG BC420 12-66

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 6788

083

983209 SAP AG 1999

ALL TRASATI C4

RE)ORT 777-DATA mltot T0)E ctuaram-

2A TRANSA2TION FD USING BD2DATA

O)TIONS FRO( mltot-

2A TRANSA2TION 3tranact9oncode4 USING 3bdc1table4 C (ODE A E N C U)DATE A S C (ESSAGES INTO 3metab4 C O)TIONS FRO( ot C -

RE)ORT 777-DATA mltot T0)E ctuaram-2A TRANSA2TION FD USING bdcdata

O)TIONS FRO( mltot-

The addition 5PTI5NS enaes the ca transaction statement to e controed through a structure

The structure must have the dictionary type 2T43PAampAS

The addition 5PTI5NS Famp5 must not e comined either $ith the addition 57 or $ith

4PAT7 ore information on the net side

copy SAP AG BC420 12-67

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 6888

085

983209 SAP AG 1999

Structure TUltPARAMS

DISMD1 Procen mode anaoo o addon amp

UPDMD1 $pdae mode anaoo o addon $PA

ATTMD1 CA mode CA conro

D19SI1 orce de=a EndoE e drn procen

RAMMIT +o eD a Camp amp(

IPT +o a ac np eonF a F S-B+P SPAC

I1D +o a ac np eon a=er end o= BC daa

The components are defined as foo$s

The components 7FSIM7 ampA25IT N5INPT and N5I7N can have the foo$ing

vaues KGK E Ces or K K E No

If the addition 5PTI5NS Famp5 is not specified the foo$ing settings appy to the contro

parameters

IS57 from addition 57

4P57 from addition 4PAT7

2ATT57 2ATT not active

7FSIM7 o not not use defaut $indo$s siDe

ampA25IT Successfu eit at 25IT -5amp6

N5INPT atch input session active (SC9INPT E G)

N5I7N atch input session sti active after end of 2 data

copy SAP AG BC420 12-68

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 6988

087

983209 SAP AG 1999

SMSBID Message ID

SMSBT Message T(pe C1GIGWGSGA

SMSB Message umber

SMSB6 Message ariable 6

SMSBamp Message ariable amp

SMSB Message ariable

SMSB4 Message ariable 4

SMSBID Message ID

SMSBT Message T(pe C1GIGWGSGA

SMSB Message umber

SMSB6 Message ariable 6

SMSBamp Message ariable amp

SMSB Message ariable

SMSB4 Message ariable 4

Return code$

S(stem fields$

alue Meaning

0 Successful

6000 1rror in transaction

6000 1rror in processing call transaction

see also the s(stem fields specified

alue Meaning

0 Successful

6000 1rror in transaction

6000 1rror in processing call transaction

see also the s(stem fields specified

9ield name Meaning9ield name9ield name MeaningMeaning

Return ode and S(stem 9ields

The return code is used to specify $hether the caed transaction $as processed successfuy In

addition severa system fieds are fied The numer I type and variaes of the diaog message

output y the caed transaction Cou need this information to output the message tet

copy SAP AG BC420 12-69

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 7088

030

983209 SAP AG 1999

Benerated Program of the TA Recorder

REFRES= (ESSTAB-

2A TRANSA2TION tcode USING bdcdata (ODE ctumode U)DATE cudate (ESSAGES INTO metab-OO) AT metab- ENDOO)-IF lubrc 34 AND e8rou 34 S)A2E- IF e8rouoenend - 2A FUN2TION BD2O)ENGROU) E)ORTING ---------

--------- E8rouoened - ENDIF- 2A FUN2TION BD2INSERT E)ORTING T2ODE tcode TABES D0N)ROTAB bdcdata-ENDIF-REFRES= bdcdata-

Message table output

pen error session

Insert data record that

has errors into error

session

If you have seected ca transaction on the seection screen the generated program runs as foo$s

The onine transaction is caed $ith ca transaction and passed to tae 2ATA A the

messages arising during the ca transaction are put in the interna tae 7SSTA

7SSTA is output as a ist

If you have specified an error session ( 73ltamp54P L SPA27) on the seection screen and the

ca transaction comes across an error (+3S4amp2 L 0) the error session is opened The error

session is ho$ever ony opened once Then the data record is paced in the session

A the other data records that have errors $ith ca transaction are paced in the same session

copy SAP AG BC420 12-70

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 7188

036

983209 SAP AG 1999

The Transaction Recorder

PrinciplesPrinciples

Recording )ith the LSMWRecording )ith the LSMW

Principles of atch Input and all TransactionPrinciples of atch Input and all Transaction

Integrating the TA Program into the DWIntegrating the TA Program into the DW

Using the TA Recorder Using the TA Recorder

copy SAP AG BC420 12-71

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 7288

03amp

983209 SAP AG 1999

Integrating into the DW

Transfer program

AAP Dictionar(

Integrate

SDA0

SDA6

SDAamp

SDA

Cou can integrate the generated program into the G9- The structure of the fie must e created

in the AAP ictionary The taes SGA0 SGA8 SGA1 and SGA $i e fied

copy SAP AG BC420 12-72

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 7388

03

983209 SAP AG 1999

DW Release 42

Goo

-B eeae 45

aa ran=er ogtec

Int customer data transfer ob-ect

ecord =ed

Dece daa ran=er

d Goo

The ampunction ampor interatin TA recorder prora$s is

i$ple$ented in the

D+-B in Release

The recorder can e integrated as of ampeease and it is provided in the G9- ampeease

ltot to the G9- ampeease 5n the initia screen you can integrate programs y choosing ampoto

( +nt customer ata transfer o-ect

copy SAP AG BC420 12-73

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 7488

034

983209 SAP AG 1999

reating Program as D b-ect

Comer ran=er ogtec

ampgtec ype

Sor eD =or ogtec

aa ran=er proram

Srcre name

9900

(+A1

Cane comer

ZBCA+G

ZB

ustomer transfer ob-ect

umber bet)een 7000 and 7777

b-ect t(pe

Assignment to R ob-ect

Short tet for D ob-ectShort description

Data transfer program

ame of generated program

Structure name

A structure Cstructure la(out )ith this name is created in

the AAP Dictionar(

For ampeease transfer oects $ere not organiDed y 5amp oects ut y a G numer (00089

OOOO) The numer range O0009OOOO is reserved for customers

To create a connection to the ne$ G 9- you must assign the program to a 5amp oect

2reate a short tet for the G oect This tet $i appear in the method seection ist

Specify the program to e incuded

Specify a name for the structure to e created in the AAP ictionary

Note $he generated program appears under program type +N and not under program type

-

copy SAP AG BC420 12-74

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 7588

032

983209 SAP AG 1999

Adantages

Automatic program registration in the DW in

Release 48

ou can use all the functions defined for

standard ob-ects

1ception$ The (reate ampile ith data

function

If you incuded the oect in the ampeease $orench it is automaticay avaiae in the ampeease

B $orench

A the $orench functions are avaiae for your oect ecept for Create files ith transfer ata

copy SAP AG BC420 12-75

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 7688

038

983209 SAP AG 1999

ou are no) able to$

The Transaction Recorder$ Unit Summar(

Use the recording function in the LSMW to create

a batch input session )ith the data from the

eternal s(stem

Use the TA Recorder to create (our o)n data

transfer program

Anal(e programs that )or+ )ith batch input or

call transaction

Integrate the TA Recorder programs into the

DW

copy SAP AG BC420 12-76

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 7788

ercise 1

nit $ -ecorder

$opic 2reating etors

$ransaction -ecorder ercise 1

bull 2reating detors $ith eterna numer assignment

bull etor numers M9980008 to M9980080

Address data for detors $ith eterna numer assignment is to

e transferred using program ampFI700

ro4ect F5

Supro4ect +5

-un +575

$as)s 85 95 8S25

9oad program -F+00

8 In the foo$ing eercises eisting data is to e changed Therefore these detors $ith

eterna numer assignment have to first e created

898 4nder suproect 79 create run 797G9 $ith the name Detors ith

eternal numers

copy SAP AG BC420 12-77

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 7888

891 2reate the foo$ing three tass The tass map the foo$ing process steps

convert data create + session and process + session

89198 In run 797G9 create the foo$ing tas

9 Tas AP9

9 Name 2onvert data 9 Tas type AP

9 Program type +S-

Seect the foo$ing +S- oect

+S- proect 2109

+S- suproect 7I9

+S- oect I997GT

89191 In run 797G9 create the foo$ing tas 9 Tas +5A9

9 Name 2reate I session

Tas type +5A

9 Program type INP

Seect program ampFI700 $ith the variant

I97G9

8919 In run 797G9 create the foo$ing tas

9 Tas S29

9 Name Process I session Tas type S2

9 Program type amp7P5

Seect program ampS2S4 $ith the variant

S497G9

Note that you have to correct the seuence of the tass 2onvert data

create + session and process + session

4se the uttons

89 Start the run

The detors $i e created $ith eterna numer assignments

89 2hec in transaction F0 that the detors M9980008 to M9980080 have een

created

copy SAP AG BC420 12-78

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 7988

ercise

nit $ransaction -ecorder

$opic -ecording function in the 9S8(

bull 2reate a recording using the +S-

bull ltenerate a atch input session

2hange the detor address data in the amp System

Name of the recording +

Name of the file +2055+F9

8 2reate the recording 7I3 using the +S- ampecord the transaction F01 (2hange

detor)

898 efore you create the recording first test the transaction onineQ

For the recording use detor M9980008 5n the initia screen of the F01

maintain the foo$ing fieds ony

etor etor M9980008

2ompany code 0008

Address data seect

Note $he data record must e saved hile recording

891 aintain the names and the descriptions for the foo$ing fieds

Name city street posta code and teephone numereete a other fieds in screen 880 from the recording (eg S5ampT+ +AN8

SPampAS)

4se the same technica names as sho$n in the tae eo$ (automatic fied

mapping)

copy SAP AG BC420 12-79

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 8088

1 2reate the suproect 7I9 and the ne$ oect TA3 in your proect 2109

aintain the oect attriutes and seect the item atch input recording Seect your

recording 7I3

2reate the source structure address

2reate the source fieds according to the tae eo$ 5r copy them from proect 2109S37N suproect 7I900 oect TA900

198 Fie setup The data from the egacy system are dispayed in the foo$ing tae

Fied name Fied type Fied ength escription

N5 2 8B etor numer

NA7 2 Name

STamp77T 2 Street

2ITC 2 2ityPace of residence

MIP 2 80 Posta code

T7+ 2 8B Teephone numer

191 aintain the fied mapping 4se the automatic fied mapping (via menu item

7tras)

19 Specify the fies 5ny maintain the fie name of the source fie

Name of the fie 21099IFI+7

2odepage 8800

19 Import the data and convert them ispay the data in each caseQ

19 2reate a atch input session

19B ampun the atch input session

copy SAP AG BC420 12-80

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 8188

ercise 3

nit $ransaction -ecorder

$opic -ecording ith the $ -ecorder

bull ltenerate a recording using the TA recorder

bull Test the recording

2hange the address data of detors in the amp system

Name recording $+

Name of the file +2055+F9

8 2reate the recording TA37I3 using the transaction recorder ampecord the

transaction F01 (change detor)

898 4se detor M9980008 for the recording 5n the F01 initia screen ony

maintain the foo$ing fieds

etor etor M9980008

2ompany 2ode 0008

Address data seect

Note $he data record must e saved hen recording

eete a fieds that do not eist in the source fie 21099IFI+7 from screen

880 in the recording (eg 6NA89S5ampT+ 6NA89+AN8 6ANNQ9SPampAS) Note o not deete fieds ampF01946ampS and ampF0190880

Save the recording no$

1 S$itch to the recordings overvie$

198 Process the recording $ith the processing mode A (dispay a)

191 Process the recording $ith the processing mode RN (no dispay)

19 If the recording has een tested and no error has occurred generate a I session

and run it using the I monitor If an error shoud occur generate the recordingagainQ

copy SAP AG BC420 12-81

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 8288

From the recording generate the program M21037I3 in your deveopment cass

2109 Seect the foo$ing

bull ampead fied contents from fie

bull 2reate test data in the fie 2103dei3test3tt

98 Save this program and eecute it ltenerate one I session each and process it

2arry out the same steps again using the ca transaction

The generated program shoud no$ e changed so that fie 21099IFI+7 can e

read and processed

98 2hange the defaut vaue of the fie name (parameter dataset) in 21099

IFI+7

91 2hange the structure definition eete the company code fied and the address

data checo from the structure

9 2hange the su9routine ca perform dc3fied for the company code (KampF019

46ampSK) so that the vaue 0008 is transferred

9 2hange the su9routine ca perform dc3fied for the address data checo

(KampF0190880K) so that the vaue G is transferred

9 Start the program again and read the data from the fie 21099IFI+7 $ith

detor data ltenerate a I session $ith it and run it

copy SAP AG BC420 12-82

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 8388

033 Include DR16INCLUDE BDCRECX1

SELECTION-SCREEN BEGIN OF LINE

PARAMETERS SESSION RADIOBUTTON GROUP CTU create sessi SELECTION-SCREEN COMMENT $amp TEXT-S FOR FIELD SESSION

se(ecti-scree )siti +

PARAMETERS CTU RADIOBUTTON GROUP CTU ca(( trasacti

SELECTION-SCREEN COMMENT $amp TEXT-S FOR FIELD CTU

SELECTION-SCREEN END OF LINE

SELECTION-SCREEN BEGIN OF LINE

SELECTION-SCREEN COMMENT $amp TEXT-S1 FOR FIELD GROUP

se(ecti-scree )siti $+

PARAMETERS GROUP1$amp r) ae 0 sessi

SELECTION-SCREEN COMMENT $amp TEXT-S+ FOR FIELD CTUMODE

se(ecti-scree )siti

PARAMETERS CTUMODE LIE CTU2PARAMS-DISMODE DEFAULT 3N3

A4 s56 a(( 78)rs

E4 s56 78)r errr (8

N4 7 t 7is)(a8 78)r

SELECTION-SCREEN END OF LINE

SELECTION-SCREEN BEGIN OF LINE

SELECTION-SCREEN COMMENT $amp TEXT-S$ FOR FIELD USER

se(ecti-scree )siti $+

PARAMETERS4 USER1$amp DEFAULT S9-UNAME ser 0r sessi i atc5

SELECTION-SCREEN COMMENT $amp TEXT-S FOR FIELD CUPDATE

se(ecti-scree )siti

PARAMETERS CUPDATE LIE CTU2PARAMS-UPDMODE DEFAULT 3L3

S4 s8c5rs(8

A4 as8c5rs(8

L4 (ca(

SELECTION-SCREEN END OF LINE

SELECTION-SCREEN BEGIN OF LINE

SELECTION-SCREEN COMMENT $amp TEXT-S FOR FIELD EEP

se(ecti-scree )siti $+

PARAMETERS4 EEP AS CltECBOX 3 3 = 7e(ete sessi i0 0iis5e7

3X3 = gtee) sessi i0 0iis5e7

SELECTION-SCREEN COMMENT $amp TEXT-S FOR FIELD E2GROUP

copy SAP AG BC420 12-83

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 8488

se(ecti-scree )siti

)araeters E2GROUP1$amp r) ae 0 errr-sessi

SELECTION-SCREEN END OF LINE

SELECTION-SCREEN BEGIN OF LINE

SELECTION-SCREEN COMMENT $amp TEXT-S FOR FIELD ltOLDDATE

se(ecti-scree )siti $+

PARAMETERS4 ltOLDDATE LIE S9-DATUM

SELECTION-SCREEN COMMENT +11amp TEXT-S$ FOR FIELD E2USER

se(ecti-scree )siti

PARAMETERS4 E2USER1$amp DEFAULT S9-UNAME ser 0r errr-sessi

SELECTION-SCREEN END OF LINE

SELECTION-SCREEN BEGIN OF LINE

SELECTION-SCREEN COMMENT +11amp TEXT-S FOR FIELD E2EEP

se(ecti-scree )siti

PARAMETERS4 E2EEP AS CltECBOX 3 3 = 7e(ete sessi i0 0iis5e7

3X3 = gtee) sessi i0 0iis5e7

SELECTION-SCREEN END OF LINE

SELECTION-SCREEN BEGIN OF LINE

SELECTION-SCREEN COMMENT +11amp TEXT-S FOR FIELD E2ltDATE

se(ecti-scree )siti

PARAMETERS4 E2ltDATE LIE S9-DATUM

SELECTION-SCREEN END OF LINE

SELECTION-SCREEN SIP

SELECTION-SCREEN BEGIN OF LINE

SELECTION-SCREEN COMMENT 1amp TEXT-S1 FOR FIELD NODATA

PARAMETERS4 NODATA DEFAULT 33 LOER CASE 7ata

SELECTION-SCREEN END OF LINE

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

Batc5i)t7ata 0 si(e trasacti

DATA4 BDCDATA LIE BDCDATA OCCURS ITlt ltEADER LINE

essaes 0 ca(( trasacti

DATA4 MESSTAB LIE BDCMSGCOLL OCCURS ITlt ltEADER LINE

errr sessi )ee7 3 3 r 3X3amp

DATA4 E2GROUP2OPENED

essae tets

TABLES4 T1

copy SAP AG BC420 12-84

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 8588

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

at se(ecti scree

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

AT SELECTION-SCREEN

r) a7 ser st e 0i((e7 0r create sessi

IF SESSION = 3X3 AND

GROUP = SPACE OR USER = SPACE

MESSAGE E1MSamp

ENDIF

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

)e 7ataset

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

FORM OPEN2DATASET USING P2DATASET

OPEN DATASET P2DATASET IN TEXT MODE

IF S9-SUBRC

RITE4 TEXT-E S9-SUBRC

STOP

ENDIF

ENDFORM

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

c(se 7ataset

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

FORM CLOSE2DATASET USING P2DATASET

CLOSE DATASET P2DATASET

ENDFORM

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

create atc5i)t sessi

t 0r ca(( trasacti siamp

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

FORM OPEN2GROUP

IF SESSION = 3X3

SIP

RITE4 $amp 3Create r)3I1amp GROUP

SIP

)e atc5i)t r)

CALL FUNCTION 3BDC2OPEN2GROUP3

EXPORTING CLIENT = S9-MANDT

copy SAP AG BC420 12-85

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 8688

GROUP = GROUP

USER = USER

EEP = EEP

ltOLDDATE = ltOLDDATE

RITE4 amp 3BDC2OPEN2GROUP3I$amp

1$amp 3retrc7e43I+amp

S9-SUBRC

ENDIF

ENDFORM

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

e7 atc5i)t sessi

ca(( trasacti si4 errr sessiamp

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

FORM CLOSE2GROUP

IF SESSION = 3X3

c(se atc5i)t r)

CALL FUNCTION 3BDC2CLOSE2GROUP3

RITE4 amp 3BDC2CLOSE2GROUP3Iamp

1$amp 3retrc7e43I+amp

S9-SUBRC

ELSE

IF E2GROUP2OPENED = 3X3

CALL FUNCTION 3BDC2CLOSE2GROUP3

RITE4

RITE4 amp 3Fe5(era))e 6r7e eret3Iamp

ENDIF

ENDIF

ENDFORM

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

Start e6 trasacti accr7i t )araeters

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

FORM BDC2TRANSACTION USING TCODE

DATA4 L2MSTRINGamp

DATA4 L2SUBRC LIE S9-SUBRC

atc5 i)t sessi

IF SESSION = 3X3

CALL FUNCTION 3BDC2INSERT3

EXPORTING TCODE = TCODE

TABLES D9NPROTAB = BDCDATA

RITE4 3BDC2INSERT3Iamp

copy SAP AG BC420 12-86

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 8788

TCODE

3retrc7e43I+amp

S9-SUBRC

3RECORD43

S9-INDEX

ca(( trasacti si

ELSE

REFRESlt MESSTAB

CALL TRANSACTION TCODE USING BDCDATA

MODE CTUMODE

UPDATE CUPDATE

MESSAGES INTO MESSTAB

L2SUBRC = S9-SUBRC

RITE4 3CALL2TRANSACTION3

TCODE

3retrc7e43I+amp

L2SUBRC

3RECORD43

S9-INDEX

LOOP AT MESSTAB

SELECT SINGLE FROM T1 ltERE SPRSL = MESSTAB-MSGSPRA

AND ARBGB = MESSTAB-MSGID

AND MSGNR = MESSTAB-MSGNR

IF S9-SUBRC =

L2MSTRING = T1-TEXT

IF L2MSTRING CS 313

REPLACE 313 ITlt MESSTAB-MSGH1 INTO L2MSTRING

REPLACE 3$3 ITlt MESSTAB-MSGH$ INTO L2MSTRING

REPLACE 33 ITlt MESSTAB-MSGH INTO L2MSTRING

REPLACE 33 ITlt MESSTAB-MSGH INTO L2MSTRING

ELSE

REPLACE 33 ITlt MESSTAB-MSGH1 INTO L2MSTRING

REPLACE 33 ITlt MESSTAB-MSGH$ INTO L2MSTRING

REPLACE 33 ITlt MESSTAB-MSGH INTO L2MSTRING

REPLACE 33 ITlt MESSTAB-MSGH INTO L2MSTRING

ENDIF

CONDENSE L2MSTRING

RITE4 MESSTAB-MSGT9P L2MSTRING$+amp

ELSE

RITE4 MESSTAB

ENDIF

ENDLOOP

copy SAP AG BC420 12-87

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 8888

SIP

Eree 0e5(era))e

IF L2SUBRC AND E2GROUP SPACE

IF E2GROUP2OPENED = 3 3

CALL FUNCTION 3BDC2OPEN2GROUP3

EXPORTING CLIENT = S9-MANDT

GROUP = E2GROUP

USER = E2USER

EEP = E2EEP

ltOLDDATE = E2ltDATE

E2GROUP2OPENED = 3X3

ENDIF

CALL FUNCTION 3BDC2INSERT3

EXPORTING TCODE = TCODE

TABLES D9NPROTAB = BDCDATA

ENDIF

ENDIF

REFRESlt BDCDATA

ENDFORM

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

Start e6 scree

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

FORM BDC2D9NPRO USING PROGRAM D9NPRO

CLEAR BDCDATA

BDCDATA-PROGRAM = PROGRAM

BDCDATA-D9NPRO = D9NPRO

BDCDATA-D9NBEGIN = 3X3

APPEND BDCDATA

ENDFORM

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

Isert 0ie(7

Page 12: BC420_46C - 012The Transaction Recorder

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 1288

06amp

983209 SAP AG 1999

Determining the 9ield ame

Technical info

Screen field

R90ampD =UR

Comer

Company code

Z-88-10000

Genera daa

96help

Sa

Program SAPM90ampDScreen number 608

The information recorded in the TA recorder can aso e dispayed onine for each transaction

To find out the current modue poo name and the screen numer choose Systemrarr Status from the

menu

To determine the fied name pace the cursor on a fied and seect F8 hep The name of the screen

fied can e found under technical information

copy SAP AG BC420 12-12

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 1388

06

983209 SAP AG 1999

Subscreens

Comer Z-88-10000

+ame

+ame

ADDR6ltDATAAM16

DltSUSR

Information$

ode poo name

Screen nmer

Screen name

Some screens contain suscreen areas

To determine the fied name pace the cursor on the fied and choose F1 The name of the screen

fied is specified under Technical info

copy SAP AG BC420 12-13

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 1488

064

983209 SAP AG 2001

Tabstrips

$er Roberts

1ample$ User Profile Defaults

Sar men +

oon anae

ampp dece Pr1

ParameerDefaults

DltSUSR

USD19AULTSSPLD

The tastrip eement sho$n is used on the aintain User rofile (5$n data) screen

4nder the tastrip tite Defaults the user can set various vaues such as the defaut printer

The user profie are user9dependent settings (as the name impies)

copy SAP AG BC420 12-14

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 1588

062

983209 SAP AG 1999

Step Loops and Table ontrols

1ample$ an+ Details

Comer

ntr( an+ +e( Account

08154711

123456789

Z-00-12345

an+ Details

00708155546344536

Banlt daa

==A=C06)

==A=C0amp)

Step oops and tae contros are treated identicay for the recording

The fied names of the fieds isted are the same for every ro$

7ach ro$ contains a customers an detais The fieds must e accessed using an inde (this is

specified as an addition to the fied name for eampe 6N69AN6N(1) The inde must match

the ro$ numer

5ny the visie fieds on a screen can e fied $ith data If some fieds are ony visie after paging

the paging must e recorded as $e This means that for the recording you must eecute a the steps

in the onine transaction

For eampe age on $oud e eecuted using the function code 1 (Paging icons)

Paging to the end of a ist 1Page up 11

lto to first page 18

copy SAP AG BC420 12-15

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 1688

068

983209 SAP AG 2001

Recording Buidelines

Test the transaction before recording

Start the recording

hange field alues onl( for fields

releant to the recording

As of 48 all filled fields are recorded

Transaction must be properl( eitedCSA1

Use of scroll bars cannot be recorded

Specia recording notes

F8 F and your o$n F8 and F hep (Pamp527SS 5N =7+P9amp7gt47ST Pamp527SS 5N A+479

amp7gt47ST) are not recorded This aso appies to a commands under the System and $el

menus aues for defaut variants ( transaction variants) are not incuded

7rror and $arning diaogs are not recorded 5ny the 56 code and the fied contents reuired for

further processing on the current screen are recorded

Note uring recording the data entered is $ritten to the dataase

copy SAP AG BC420 12-16

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 1788

063

983209 SAP AG 2001

1n-o( SAP ontrols and Data Transfer

bull SAP Picture ontrolbull SAP ETML ie)er ontrol

bull SAP Tet 1dit ontrol

bull AL Brid ontrol

bull SAP Tree ontrol

bull

ranch 6

ranch amp

Root

These and other controls do not support batch input$

Root

ranch amp

ranch amp6

The ne$ 7noy SAP contros deveoped for ampeease B do not support atch input or ca

transaction

=o$ever tae contros and tastrips do support atch input

copy SAP AG BC420 12-17

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 1888

065

983209 SAP AG 1999

The Transaction Recorder

PrinciplesPrinciples

Recording )ith the LSMWRecording )ith the LSMW

Principles of atch Input and all TransactionPrinciples of atch Input and all Transaction

Integrating the TA Program into the DWIntegrating the TA Program into the DW

Using the TA Recorder Using the TA Recorder

copy SAP AG BC420 12-18

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 1988

067

983209 SAP AG 1999

Session

generator

Recording Using the LSMW

-ith the +S- you can create your o$n recordings

The +S- uses the standard TA recorder here yet evauates the recording itsef The information

from the recording is used to create atch input sessions

The created atch input session can e processed as usua $ith the atch input monitor

Note As $ith the standard procedure it is euay important that the data is converted

copy SAP AG BC420 12-19

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 2088

0amp0

983209 SAP AG 1999

reating Recording

Admnraon

ecordn

Goo

ame of recording

Description

)ner

ame of transaction

Start recording

lto into the +S- and seect the menu path ampoto (Recorings An overvie$ of a previousy

created recordings for your proect are dispayed To start a ne$ recording seect Create

To create a recording you must define the name the description and the o$ner

7nter the name of the transaction you $ant to record

7ecute the transaction and compete it propery

Note ampecordings are assigned to ony one proect 9 so the name of the recording must e uniue

copy SAP AG BC420 12-20

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 2188

0amp6

983209 SAP AG 1999

hanging ustomer Data$ Initial Screen

9ield ontents

BCC$Samp $SZAV

BCamp(Camp )00

02-($++ -88-10000

02-0110

02-0130

$SZAV

9ield ame

Comer

Company code

Z-88-10000

Genera daa

Comer Z-88-10000

+ame

9ield ontents

BCamp(Camp $PA

BCS$BSC SAPSZA1 0300ASS

BCS$BSC SAPSZA1 0301Camp$

BCC$Samp SZA10100-+$B

A1AA-S Garden Sree

A1AA-amp$S+$1 34

A1AA-PampSCamp1 02105

9ield ame

Screen

111

Screen

106

In the aove eampe the transaction Change customer F01 is recorded

Note

You must ma)e some modification to the field values for all the fields you ant to capture

for the data transfer For the purposes of recording a change can simply mean overriting

one single character in a field ith the same character

ven if fields are to e filled using S$amp$ parameters the values must still e changed on

the screen in order to capture them

(ith online transactions screen sequences may appear that are different than in the

recording

copy SAP AG BC420 12-21

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 2288

0ampamp

983209 SAP AG 1999

Results

RecordingRecording R1lt6 Demolt6

9D0amp hange customer Caccounting

SAPM90ampD 0608

DltURSR R90ampD=UR

Dlt=D1 gt00

R90ampD=UR 5560000

R90ampDD0660

US1ltA

SAPM90ampD 0666

Dlt=D1 UPDA

DltSUSR SAPLSA6

DltSUSR SAPLSA6

DltURSR SA6ltD0600T1LltUM1

ADDR6ltDATASTR11T 4 Barden Street

ADDR6ltDATAPSTltD1 0amp602

ADDR6ltDATAIT6 oston

SA6ltD0600T1LltUM1 8638257755

The resuts of the recording using the +S- are dispayed in a tree structure

After the recording has finished you can edit it Cou can deete fieds or add ne$ ones

copy SAP AG BC420 12-22

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 2388

0amp

983209 SAP AG 1999

Assigning 9ield ames

Recording R16 Demolt6

Dlt=D1 UPDA

DltSUSR SAPLSA6

DltSUSR SAPLSA6

DltURSR SA6ltD0600T1L

ADDR6ltDATAAM16 Lisa Eofmeister

ADDR6ltDATAPSTltD1 0amp602

ADDR6ltDATAIT6 oston

ame

+ame

ecrpon

e=a ae

A1AA-+A1

A1AA-+A1

Comer name

a o=meer

Screen =ed

ustomer name

double clic+

Cou can assign names for each recorded fied The specia fieds (2356257 2324ampS5amp

and 23S4S2amp77N) are not incuded here Cou can choose the fied names -hen the atch

input session is created the contents of these fieds are assigned to the target fieds specified in the

eft coumn

Functions

efaut Assigns to the fied names of the underying target fied and its fied description

ampeset eetes fied name and fied description

oue cic 7dits fied name fied description and defaut vaue

Note Cou can use fied names more than once =o$ever the fied name is ony avaiae once in thefied mapping For this reason it is not practica to use fied names more than once

For a those fieds for $hich you do not assign a name the defaut vaue is used $hen the atch

input session is created These defaut vaues can e seen as constants This is especiay usefu for

chec oes (for eampe 08 vie$ seection)

The +S- supports automatic fied mapping Source fieds and target fieds can e assigned to each

other automaticay The fieds are assigned to the corresponding fieds of the same name Therefore

the fied names of the source structure shoud e given the same or simiar names as the fied names

in the target structure

copy SAP AG BC420 12-23

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 2488

0amp4

983209 SAP AG 2001

Addinggtremoing screen fields

Repeating recording

9or identical field names the name and description are

assigned automaticall(

1diting Recording

02-($++

(+A1-A+

(+A1-+A1

(+A1-Samp

(+A1-+A2

(+A1-SAS

Comer accon nmer

e

+ame 1

Sor =ed

+ame 2

Sree

Selection of all

aailable screen

fields

Cou can ater add ne$ screen fieds if you need to 6eep in mind that fieds shoud ony e added in

paces $here they are aso provided on the screen other$ise you $i get an error $hen the I

session is processed

After saving you $i get the message The data has een saved successfuy No$ the recordings

are avaiae for the oect attriutes

If you repeat the recording you can record a ne$ screen seuence $ith ne$ fieds Provided that the

fied names (eg 6NA89NA78) are identica the names and descriptions are automaticay

assigned

copy SAP AG BC420 12-24

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 2588

0amp2

983209 SAP AG 1999

b-ect T(pe and Import Method$ Recording

Standard atch Input gt Direct Input

atch Input Recording

API

IDoc

ampgtec ype ) mpor meod

Bac np recordn

ecordn ec1

The recording is no$ avaiae $ith the oect attriutes

Net you create a proect or su9proect in the +S- and specify process the data transfer

Cou eecute the data transfer as in the standard system

efine the source fieds and structures

efine the fied mapping

ampead and convert the data

2reate and import a atch input session

copy SAP AG BC420 12-25

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 2688

0amp8

983209 SAP AG 1999

The Transaction Recorder

PrinciplesPrinciples

Recording )ith the LSMWRecording )ith the LSMW

Principles of atch Input and all TransactionPrinciples of atch Input and all Transaction

Integrating the TA Program into the DWIntegrating the TA Program into the DW

Using the TA Recorder Using the TA Recorder

copy SAP AG BC420 12-26

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 2788

0amp3

983209 SAP AG 1999

Transaction Recorder

Online

Transaction

RecordingTransfer Program

T

Included in the Batch Input Monitor

Cou use the transaction recorder to record transactions and then use the transaction recording to

generate a transfer program The program ao$s you to transfer data using either atch input or ca

transaction

copy SAP AG BC420 12-27

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 2888

0amp5

983209 SAP AG 1999

hanging ustomer Data$ Initial Screen

9ield ontents

BCC$Samp $SZAV

BCamp(Camp )00

02-($++ Z-88-10000

02-0110

02-0130

$SZAV

9ield ame

Comer

Company code

Z-88-10000

Genera daa

Comer Z-88-10000

+ame

9ield ontents

BCamp(Camp $PA

BCS$BSC SAPSZA1 0300ASS

BCS$BSC SAPSZA1 0301Camp$

BCC$Samp SZA10100-+$B

A1AA-S Garden Sree

A1AA-amp$S+$1 34

A1AA-PampSCamp1 02105

9ield ame

Screen

111

Screen

106

In the aove eampe the transaction Change customer F01 is recorded

copy SAP AG BC420 12-28

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 2988

0amp7

983209 SAP AG 2001

hange Debitor$ Pa(ment Transactions C6

Banlt dea

Screen

10

9ield ontent

BCC$Samp (+B(-BA+(+01

BCamp(Camp BA+((+B(-BA+(S01

(+B(-BA+(01 12345679

(+B(-BA+(+01 22222222

Debitor 5560000

9ield ame

Inde

copy SAP AG BC420 12-29

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 3088

00

983209 SAP AG 1999

hanging ustomer Data$ Pa(ment Transactions Camp

Addre

an+ countr( US

an+ code 6amp42837

Banlt dea

ustomer 5560000

9ield ontents9ield ame

BCC$Samp (+A1-(+ZA

BCamp(Camp $PA

(+B(-Z01

Screen

10

Screen

100

SAPLBA

9ield ontents

BCC$Samp B+(A-BA+(A

BCamp(Camp +

B+(A-BA+(A +aona Banlt

9ield ame

In different transactions the modue poo may change This is the case $ith for eampe customer

master data The TA recorder records modue poo changes automaticay

copy SAP AG BC420 12-30

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 3188

06

983209 SAP AG 1999

Eierarch( Displa( of the Recording

02amp

02

SAP02 0106

BCC$Samp 02-0130

BCamp(Camp )00

02-($++ -88-10000

02-0110

02-0130

SAP02 0111

BCamp(Camp V

BCC$Samp A1AA-amp$S+$1

A1AA-S Garden Sree

Recording

-ith the TA recorder the resuts are aso a ist in a hierarchy dispay =o$ever you cannot assign

your o$n fied names as you can in the +S-

copy SAP AG BC420 12-31

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 3288

0amp

983209 SAP AG 1999

Recording erie)

Recording

Transfer program

9unction module

ontains onl( the data

from the recording

Test data

Test

reate

reate

reate

reate

1dit hange recording

Process recording

Cou can edit the recording as needed

The recording can e tested and eecuted again The screens are run through in the same $ay as in

the recording

The recording can then e used to create

atch input sessions

Test data

ata transfer programs $ith atch input or ca transaction

Function modues

copy SAP AG BC420 12-32

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 3388

0

983209 SAP AG 1999

1 02 BS

2 SAP02 106

3 BCC$Samp $SZAV

4 BCamp(Camp )00 5 02-($++ -88-10000

6 02-0110

7 02-0130

8 $SZAV

9 SAP02 111

10 BCamp(Camp V

11 BCC$Samp A1AA-amp$S+$1

12 A1AA-S Garden Sree

Program Screen St 9ield ame 9ield alue

Recording 1ditor

Recording

Add gt delete lines 9ormat chec+

Import gt eport of recording

In the editor you can add or deete ines Cou can aso change the contents of individua ines

-ith the function Chec) you can specify $hether the edited version of the recording sti has the

correct synta

Cou can aso eport import recordings to from a seuentia fie

After editing save the recording changes

copy SAP AG BC420 12-33

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 3488

04

983209 SAP AG 1999

Recording Seeral Transaction Runs

RecordingF

Directl( after the first recordingG or

In the displa( mode of the recording

In this step you can record additiona transactions and add additiona transaction runs to the

recording

Cou can record the additiona transactions directy after a recording or in the edit screen of a

recording

copy SAP AG BC420 12-34

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 3588

02

983209 SAP AG 1999

1ditor$ Importing and 1porting Recordings

6 T 9D0amp S

amp SAPM90ampD 608

DltURSR

4

2

8 SAPM90ampD 666

60

66

Program Screen St 9ield name 9ield alue

cempA

e name

aa =orma

cemp

A

e name

aa =orma

1port

Import

Presentation Serer

If the editor functions in the systems do not provide a the functions you need you can do$noad the

recording to your presentation server using the Eort function and then edit the recording using a

P2 editor

Cou use the Import function to import the data ac into the amp System ae sure the fie is sti in

the correct format

copy SAP AG BC420 12-35

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 3688

08

983209 SAP AG 1999

Processing the Recording

Recording

Process )ith ALL TRASATI

Parameer

Proce mode$pdae mode

CA mode

e=a e

Con a=er comm

+o a B eon

nd +o a B mode

A

A

T

The recording can e eecuted directy The data from the recording is used and the transaction is

processed $ith ca transaction

2a transaction provides a range of options for caing appication transactions $hich are discussed

on the foo$ing t$o pages

copy SAP AG BC420 12-36

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 3788

03

983209 SAP AG 1999

Process mode

Update mode

ATT mode

Processing Recording )ith T 6

A

1

Displa( all screens

Displa( errors onl(

o displa(

L

S

A

Local

S(nchronous

As(nchronous

A

o ATT

ATT )ithout indiidual screen control

ATT )ith indiidual screen control

Processing mode

=ere you can specify the processing mode 9 it is the same as the processing mode for atch input

4pdate mode

=ere you can specify the update mode For more information see the unit ca transaction

2ATT mode

=ere you can mae specia settings if you $ant to test the recording under 2ATT conditions (ony

necessary for 2ATT runs) Specia functions are caed in the 2ATT too for each screen at the end of

P5 and at the start of PAI

copy SAP AG BC420 12-37

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 3888

05

983209 SAP AG 1999

Default sie

ont after commit

ot a I session

1nd$ ot a I mode

Processing Recording )ith T amp

The screen standard sie is used for the

processing

ommit )or+ does not end the processing

o I mode is actie The transaction )ill run

through as in online

I mode is selected nce the data in the D

table is processedG the I mode is set to inactie

Standard siDe

If you seect this the screens are processed in the standard siDe in the foreground (in foreground or

dispay errors ony) Note the standard siDe is a$ays used for acground processing

Further after commit

The first commit $or in a transaction does not ead to the end of the recording

Note A atch input transaction is ended $ith the first commit $or

No I mode

The system fied SC9INPT is not set (SC9INPT E ) So transactions are run through as in onine

7nd No I mode

5ny use if you choose the processing mode 7 (dispay errors ony) Then the transaction is processed in the acground in atch input mode and if there is an error the screens run through in

the foreground

copy SAP AG BC420 12-38

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 3988

07

983209 SAP AG 1999

I Mode

atch input

mode

nline

Some transactions behae differentl( in batch input mode

than in online Cbatch input capabilit(

atch input mode sets the s(stem field SIPT H

Not every transaction can run the same onine and in atch input mode The transaction must decide

itsef $hether it is caed onine or in atch input mode

The system sets the system fied SC9INPT E G if the atch input mode is active (this aso appies

to ca transaction) From this system fied the transaction can identify $hether to run onine or in

atch input mode

copy SAP AG BC420 12-39

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 4088

040

983209 SAP AG 1999

reating a Session 9rom the Recording

Recordingnl( contains the data

from the recording

Seon name 02amp

Aoraon ampBS(eep eon

oclt dae 10102000

Cou can create a atch input session directy from the recording that you can then process using the

atch input monitor

copy SAP AG BC420 12-40

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 4188

046

983209 SAP AG 1999

reating Test Data

Test Data

Recording

ranranpBC420AAe name

The file onl( contains the data from the recording

Rgt

Application Serer

Structure

Cou can create a fie from the recordingH the fie $i contain a the fieds from the recording The

fieds are added to the fie $ith the ength you specified in the definition

The fied order corresponds to the order in the recording overvie$ Technica fieds

(2356257 2324ampS5amp and so on) are incuded

The data can ony e stored on the appication server If you do not specify a path the fie is stored in

the $or directory of the appication server

If the specified test fie aready eists the ne$ data record is added to this fie

copy SAP AG BC420 12-41

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 4288

04amp

983209 SAP AG 1999

ed conen

reating a Program

Recording

ZBC420ampProram name

Transfer Program

e daa

ead =rom =e

ran=er =rom recordn

reate

9ile nameTest data

ranranpBC420AA

Cou can generate a program from the recording

In the foo$ing diaog o enter a program name In addition you can choose the type and method

for fiing the maintained fied contents from the recorded screens

4se the vaues used for the recording If you reuire feie data transfer you $i have to modify

this program ater

ParameteriDe the input vaues and read these vaues from a fie A data structure is created for

parameteriDationH the data records are read from an eterna fie into this data structure The

program assumes the fie $as taiored to this data structure

If you have decided to parameteriDe the input vaues you shoud aso create a test fie during

generation To do this seect the checo and enter a name for the fie

The attriute maintenance screen of the AAP editor appears aintain the attriutes and save the

program

copy SAP AG BC420 12-42

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 4388

04

983209 SAP AG 1999

Program 9unctions

Online

transaction

Transfer program

To

error

1rror

ption 6ption ampFlat SAP

structure

Monitor

Cou have no$ generated a data transfer program for importing data into the amp System The

program can eecute the data transfer using atch input or ca transaction

If you choose option 1 and there is an error the data record is paced into a atch input session

copy SAP AG BC420 12-43

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 4488

044

983209 SAP AG 1999

Benerating 9unction Modules

Recording

Zcreaedeor ncon mode

ncon rop

Sor eD

ZBC420

Creae comer

9unction module

nl( one data record can be processed at a time

In the net diaog o you can generate a function modue a function group and short tet from the

recording The function modue is automaticay created in the function group

copy SAP AG BC420 12-44

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 4588

042

983209 SAP AG 1999

9unction of 9unction Modules

Online

transaction

To

error

1rror

ption 6 ption amp

9unction module

Import

Parameter 1port

parameter

Tables

M1SSTA

Monitor

S$BC

Import interface

The import interface consists of a technica part and the fieds from the recording (A parameter is

created for each input fied of the recorded transactions)

7port interface

Simpy consists of the parameter S4amp2 The function modue $i return a vaue in the system

fied SC9S4amp2 after caing ca transaction This return vaue is set to Dero if the data record has

een correcty processed (5ny appies to 2T)

If a session is created you $i e notified $hether the data record coud e paced into the session

Tae interfaceThis is used ony if the function modue $ors $ith ca transaction The tae contains a the

system messages

copy SAP AG BC420 12-45

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 4688

048

983209 SAP AG 1999

Import Interface of 9unction Module

$

Technical

fields

Data

fields

BI session or CALL TRANSACTION

Processin $ode

pdate $ode

a$e oamp BI session iamp (T initial)

Bacround user iamp (T initial)

Delete session aampter processin

Loc date oamp session

ODATA indicator

TU

MD1

UPDAT1

BRUP

US1R

=11P

ELDDAT1

DATA

Cou can use parameter 2T4 to specify $hether the function modue creates a atch input session

(2T4 E ) or updates the data record directy using ca transaction (2T4 E G)

The other parameters are fied as for a atch input session header

Note 7very time the function modue is caed a atch input session is created

If the session is to contain severa transactions proceed as foo$s

ltenerate the transaction severa times This can e achieved y recording the transaction again The

function modue interface $i then contain more than one transaction -hen the function modue is

caed severa transactions can e generated for each session

copy SAP AG BC420 12-46

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 4788

043

983209 SAP AG 1999

The Transaction Recorder

PrinciplesPrinciples

Recording )ith the LSMWRecording )ith the LSMW

Principles of atch Input and all TransactionPrinciples of atch Input and all Transaction

Integrating the TA Program into the DWIntegrating the TA Program into the DW

Using the TA Recorder Using the TA Recorder

copy SAP AG BC420 12-47

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 4888

045

983209 SAP AG 1999

Benerated Program

9unction modules DltP1ltBRUP

DltIS1RT

DltLS1ltBRUP

AAP Program

Define structure of

data in seJuential

fileDefine D

table

pen seJuential file

pen I session

Read data recordCseJuential file

9ill D table

9ill I session gtALL TRASATI

Last data record K

lose I session

lose seJuential file

The generated program has the structure dispayed aove It uses the standard function modues for

creating atch input sessions

copy SAP AG BC420 12-48

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 4988

047

983209 SAP AG 1999

Structure of the Benerated Program

Benerated part

Define D

table

pen seJuential file

pen I session

Read data record

9ill D table

9ill I session gtALL TRASATI

Last data recordK

lose I session

lose seJuential file

Include DR16

Define filestructure

P1ltDATAS1T

P1ltBRUP

DltDPR

Dlt9I1LD

DltTRASATI

LS1ltBRUP

LS1ltDATAS1T

The generated program consists of t$o parts 9 a generated part and the incude 2amp72G8 The

incude is provided in the standard system

The incude contains the definition of the reuired 2 tae and a further seven suroutines These

suroutines eecute the foo$ing functions

5pen and cose fie

5pen and cose session

Fi 2 tae

Fi session

The generated part is the main program and cas the reevant suroutines A structure is aso

generated in the generated part to read the eterna data into the fie

See the Appendi for more information on the 2amp72G8 program

copy SAP AG BC420 12-49

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 5088

020

983209 SAP AG 1999

Structure of D Table

PRBRAM DPR D1BI 9AM 9ALPRBRAMPRBRAM DPRDPR D1BID1BI 9AM9AM 9AL9AL

SAPM90ampD 0602

R90ampD=UR 600000

R90ampDU=RS 0006

R90ampD=T=D =UA

SAPM90ampD 0660

=A6AM16 Smith

=A6PSTL 87000

=A6LAD6 US

=A6SPRAS 1

SAPM90ampD 06amp0

=A6ST1B US6amp428357DDATA

PRBRAM

DPR

D1BI

9AM

9AL

EAR

UM

EAR

EAR

EAR

40

4

6

6amp

6amp

D Module pool

D Screen number

D Start of screen

D 9ield name

D 9ield contents

9ield ame T(pe Length Short Tet

AAP Dictionar(

The 2 tae has the same structure as in a standard transfer

copy SAP AG BC420 12-50

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 5188

026

983209 SAP AG 1999

Read Structure

Recording

DATA BEGIN OF record data element BUKRS bukr$amp data element KTOKD ktokd$amp data element NA(EG) name$+amp data element SORT ortl$ampEND OF record-

record

Automaticall( generated

from recording

The structure of the fie is automaticay generated and is a$ays defined $ith the name amp725amp

The generated structure a$ays has the same ayout 7ach fied is defined y t$o generated ro$s

The first ro$ is a$ays a comment ro$ containing the tet J data eement and the data eement of

the screen fied from the recording In the net ro$ the fied itsef is defined $ith the name of the

data eement foo$ed y a three9digit position numer $hich specifies the ocation in the structure

The ength of the fied is set y the ength of the data eement If a fied is not defined through a data

eement the system uses the ength of the screen fied

copy SAP AG BC420 12-51

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 5288

02amp

983209 SAP AG 1999

pening and losing the 9ile

P1ltDATAS1T

LS1ltDATAS1T

FOR( oendataet USING dataet-O)EN DATASET dataet IN TET (ODE-

IF S01SUBR2 34 - 5RITE 6 te7t1e S01SUBR2-STO)-

ENDIF-

ENDFOR(-

FOR( cloedataet USING dataet-2OSE DATASET dataet-

ENDFOR(-

Include

DR16

The suroutine 5P7N3ATAS7T opens the seuentia fie

The suroutine 2+5S73ATAS7T coses the seuentia fie

copy SAP AG BC420 12-52

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 5388

02

983209 SAP AG 1999

9unction Modules for I Program

lient

Session name

Eold date

=eep session

D user name

RecordK

LI1T

BRUP

ELDDAT1

=11P

US1R

R1RD

DltP1ltBRUPDltP1ltBRUP

Transaction code

D table

TD1

DPRTA

DltIS1RTDltIS1RT

DltLS1ltBRUPDltLS1ltBRUP

pen Isessionpen Isession

Insert data for

transactions

Insert data for

transactions

lose I

session

lose I

session

The foo$ing function modues are provided for creating atch input sessions (function group

S2)

235P7N3ltamp54P

2reates a ne$ session and contains genera data for the $hoe session

23INS7ampT

Inserts a the data for a transaction into the session The transferred interna tae $ith the

structure 2ATA must contain a the data reuired for fuy processing the transaction

232+5S73ltamp54P

2oses the session after a the data has een inserted As soon as the session has een cosed it

can e processed

The interna tae $ith the structure 2ATA can ony contain atch input data for one singe

transaction run So the individua transactions are inserted into the atch input session in a oop

using severa 23INS7ampT cas

copy SAP AG BC420 12-53

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 5488

024

983209 SAP AG 2001

9unction Module DltP1ltBRUP

ALL 9UTI DltP1ltBRUPALL 9UTI DltP1ltBRUP

1PRTIB

LI1T client

BRUP session name

ELDDAT1 loc+ date

=11P delete flag

US1R bdc user name

R1RD recording

IMPRTIB

NID internal session +e(

11PTIS

1PRTIB

LI1T client

BRUP session name

ELDDAT1 loc+ date

=11P delete flag

US1R bdc user name

R1RD recording

IMPRTIB NID internal session +e(

11PTIS

-ith the function modue 235P7N3ltamp54P you can open a atch input session

The foo$ing parameters are mandatory

2+I7NT (cient)

ltamp54P (session name)

4S7amp (user name)

Note The 4S7amp must a$ays e specified This user name is reuired for processing the session

in atch mode

The foo$ing parameters are optiona

=5+AT7 specifies the eariest date on $hich the session can e started677P fag specifies $hether session shoud e deeted after it has een successfuy processed The

677P fag is ignored if the session contains errors

677P E K K means deete the session after processing (defaut vaue) H

677P E KGK means do not deete session

amp725amp E KGK ao$s you to create a recording instead of a I session

If gtI is specified the function modue returns the interna session ey This is needed to e ae to

differentiate sessions that have the same name

-ith 7G27PTI5NS you get various return vaues that can e ueried $ith SC9S4amp2

Note In onine mode the onine user is used for the authoriDation checs regardess of the user

name specified

copy SAP AG BC420 12-54

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 5588

022

983209 SAP AG 1999

Subprogram P1ltBRUP

P1ltBRUP

FOR( oen8rou-IF e9on -

2A FUN2TION BD2O)ENGROU) E)ORTING 2IENT lt1mandt GROU) 8rou USER uer KEE) kee

=ODDATE gtolddate-

ENDIF-ENDFOR(-

Include

DR16

The suprogram 5P7N3ltamp54P opens the atch input session

copy SAP AG BC420 12-55

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 5688

028

983209 SAP AG 1999

9unction Module DltIS1RT

ALL 9UTI DltIS1RTALL 9UTI DltIS1RT

IMPRT

TD1 Transaction code

PSTltLAL Update locall(

PRITIB print list

TAL1S DPRTA bdclttable

11PTIS

IMPRT

TD1 Transaction code

PSTltLAL Update locall(

PRITIB print list

TAL1S DPRTA bdclttable

11PTIS

-ith the function modue 23INS7ampT you can add transaction data to the session

Cou need an interna 2 tae to transfer the data

The foo$ing parameters are mandatory

T257 Transaction code

CNPamp5TA 2 tae

The foo$ing parameters are optiona

P5ST3+52A+ E KGK activates oca updating This means that the data to e updated is ept in the

appication server and updated in the ast step of the transaction This does not invove the update

process (For more information see course 28 Programming ataase 4pdates)

PampINTINlt E KGK 9 ists processed in I $i e printed immediatey -ith 7G27PTI5NS you get various return vaues that can e ueried $ith SC9S4amp2

copy SAP AG BC420 12-56

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 5788

023

983209 SAP AG 1999

Subprogram DltTRASATI

DltTRASATI

FOR( BD2TRANSA2TION USING tcode-

IF e9on -2A FUN2TION BD2INSERT

E)ORTING T2ODE tcode TABES D0N)ROTAB bdcdata-

ESE-

ENDIF-ENDFOR(-

T

Include

DR16

The suprogram 23TampANSA2TI5N moves the fied 2 tae either to a atch input session

or uses ca transaction to import the data into the system 5n the seection screen you can specify

$hether you $ant to create a session or you $ant to use ca transaction to process the data directy

The S7SSI5N fied is then set according to your seection

copy SAP AG BC420 12-57

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 5888

025

983209 SAP AG 1999

9unction Module DltLS1ltBRUP

ALL 9UTI DltLS1ltBRUP

11PTIS

TltP1 6

NU1U1lt1RRR amp

-ith the function modue 232+5S73ltamp54P you can cose a atch input session

In 7G27PTI5NS you get various return vaues that can e ueried $ith SC9S4amp2

copy SAP AG BC420 12-58

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 5988

027

983209 SAP AG 1999

Subprogram LS1ltBRUP

FOR( cloe8rou-IF e9on -cloe batcgt 9nut 8rou

2A FUN2TION BD22OSEGROU)-

ESE-IF e8rouoened -

2A FUN2TION BD22OSEGROU)-

ENDIF-ENDIF-

ENDFOR(-

LS1ltBRUPlose session

lose error session

Include

DR16

The suprogram 2+5S73ltamp54P coses the atch input session The suprogram differentiates

et$een a norma I session (S7SSI5N E G) and a session opened $hen ca transaction

encountered an error (73ltamp54P35P7N7 E G)

copy SAP AG BC420 12-59

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 6088

080

983209 SAP AG 1999

Subprograms DltDPRG Dlt9I1LD

DltDPR

Dlt9I1LD

FOR( bdc9eld USING nam al-IF al 34 nodata-2EAR bdcdata- bdcdata1nam nam- bdcdata1al al- A))END bdcdata-ENDIF-

ENDFOR(-

FOR( bdcdltnro USING ro8ram dltnro- 2EAR bdcdata-Bdcdata1ro8ram ro8ram-Bdcdata1dltnro dltnro-Bdcdata1dltnbe89n - A))END bdcdata-ENDFOR(-

Include

DR16

The incude 2amp72GG contains t$o suprograms 23CNPamp5 and 23FI7+

Suprogram 23CNPamp5 fis the 2 tae $ith program names and screen numers

Suprogram 23FI7+ fis the 2 tae $ith fied names and vaues

7ach suprogram creates an entry in the 2 tae

copy SAP AG BC420 12-60

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 6188

086

983209 SAP AG 1999

9illing the D Table

erorm bdcdltnro u9n8 SA)(FD +- erorm bdc9eld u9n8 BD22URSOR RFD1BUKRS- erorm bdc9eld u9n8 BD2OK2ODE 6- erorm bdc9eld u9n8 RFD1BUKRS record1BUKRS- erorm bdc9eld u9n8 RFD1KTOKD record1KTOKD-

erorm bdcdltnro u9n8 SA)(FD -

erorm bdc9eld u9n8 BD22URSOR KNA1S)RAS- erorm bdc9eld u9n8 BD2OK2ODE 6- erorm bdc9eld u9n8 KNA1NA(E record1NA(E-

erorm bdc9eld u9n8 KNA1SORT record1SORT-

Recording Benerated automaticall(

from the recording

)ERFOR( bdcdltnro USING SA)(FD +- )ERFOR( bdc9eld USING BD22URSOR RFD1BUKRS-)ERFOR( bdc9eld USING BD2OK2ODE 6-)ERFOR( bdc9eld USING RFD1BUKRS record1BUKRS-)ERFOR( bdc9eld USING RFD1KTOKD record1KTOKD-

)ERFOR( bdcdltnro USING SA)(FD -

)ERFOR( bdc9eld USING BD22URSOR KNA1S)RAS-)ERFOR( bdc9eld USING BD2OK2ODE 6-)ERFOR( bdc9eld USING KNA1NA(E record1NA(E-

)ERFOR( bdc9eld USING KNA1SORT record1SORT- ---

The 2 tae is fied $ith data from the recording The suroutines 23CNPamp5 and

23FI7+ are used for this

The suroutines are caed in the reuired structure or seuence

copy SAP AG BC420 12-61

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 6288

08amp

983209 SAP AG 1999

erie)

SAPDatabase

SeJuential9ile

SAPDatabase

ALL TRASATIALL TRASATI

SeJuential9ile

ATE IPUTATE IPUT

D TableD TableD TableD Table

I Monitor

T

In contrast to atch input you can use ca transaction to directy pass data to the diaog interface

$ithout using a atch input session Cou use an interna tae (2 tae same structure and ayout

as atch input) to temporariy store your screen data Then you ca the desired transaction in your

program

Note 5n average the 2a Transaction method is 8 to times faster than using atch Input

copy SAP AG BC420 12-62

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 6388

08

983209 SAP AG 1999

all Transaction Program$ 1ample

RE)ORT abcbdcdcdeb9ct-

)ARA(ETERS d9mode DEFAUT A

udmode DEFAUT S-FOR( calltranact9on-2A TRANSA2TION FD

USING bdcdata (ODE d9mode

U)DATE udmode-

IF lt1ubrc NE - 5RITE 6 ---

ENDIF-ENDFOR(-

Screen

00

Screen

100

Screen

An additiona system ro area is added for the caed transaction The system uses this area for

processing the individua screens in the transactionH the data from the tae is added here After the

transaction is processed the second ro area is reeasedH the system continues processing in the first

ro area

Notes

In contrast to atch input there is no error ogging (error sessions) here For processing the caed

transaction the system uses the authoriDations of the user that caed the transaction The 2 tae

can ony hod data for one transaction run at a time efore another transaction is caed and its data

can e added you must eecute a amp7Famp7S= for the 2 tae

copy SAP AG BC420 12-63

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 6488

084

983209 SAP AG 1999

ALL TRASATI C6

RE)ORT 777-

2A TRANSA2TION FD USING bdcdata (ODE E-

Default for MD1 is A

2A TRANSA2TION 3tranact9oncode4 USING 3bdc1table4 C (ODE A E N C-

-ith the parameter 57 you can seect a specific dispay mode for processing the transaction The

foo$ing three modes are avaiae

A (ispay a)

If you eecute the program a the screens and a their data are dispayed This is the defaut vaue

for the 57 in 2A++ TampANSA2TI5N

N (ispay nothing)

The screens are not dispayed at a regardess of $hether any of them contained errors As soon as

the transaction has een fuy processed contro is returned to your program (The vaue of the

parameter 4PAT7 determines $hether dataase updates are eecuted or not)

7 (ispay errors ony)As soon as an error occurs in a screen the transaction is s$itched to dispay mode so that you can

correct the errors

These dispay modes are the same as those in the atch input session processing

copy SAP AG BC420 12-64

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 6588

082

983209 SAP AG 1999

RE)ORT 777-

2A TRANSA2TION FD USING BD2DATA U)DATE -

ALL TRASATI Camp

RE)ORT 777-

2A TRANSA2TION FD USING bdcdata U)DATE -

2A TRANSA2TION 3tranact9oncode4 USING 3bdc1table4 C (ODE A E N C U)DATE A S C -

Default for UPDAT1 is A

-ith the parameter 4PAT7 you can contro ho$ dataase updates arising from a transaction are

carried out There are three options

A (asynchronous updating) The caed transaction does not $ait unti the dataase has een

updated it simpy for$ard the updates to the SAP update service This usuay speeds up the 2T

program This processing mode is N5T recommended for arge data sets as the caed transaction

does not receive a competion message from the update modue

The caing 2T program therefore cannot te if the transaction has een successfuy competed Cou

shoud use the updating administration function (transaction S8) to determine $hether updating

$as terminated eary The error anaysis correction functions for are ess hepfu than $ith

synchronous updating

S (synchronous updating) -ith synchronous updating the caed transaction $aits unti a the

updates have een competed So processing is so$er than $ith synchronous updating The caed

transaction can ho$ever report any updating errors to the program $hich maes error

anaysiscorrection easier

+ (local updating) $ith oca updating the dataase is not updated in a separate process it is

updated in the caers process (see appication hep documentation for the AAP ey$ord S7T

4PAT7 TAS6 +52A+)

copy SAP AG BC420 12-65

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 6688

088

983209 SAP AG 1999

ALL TRASATI C

RE)ORT 777-DATA mtab T0)E TABE OF bdcm8coll-

2A TRANSA2TION FD USING bdcdata (ESSAGES INTO mtab-

2A TRANSA2TION 3tranact9oncode4 USING 3bdc1table4 C (ODE A E N C U)DATE A S C (ESSAGES INTO 3metab4 C -

7SSAlt7S specifies that a system messages that are output during the eecution of a 2A++

TampANSA2TI5N are $ritten to the interna tae L7SSTA The interna tae must have the

structure 2Slt25++

4nie the cassica atch input processing $ith sessions 2A++ TampANSA2TI5N does not offer any

specia processing procedures for transactions containing errors There are no restart functions for

transactions that contain errors or that cause updating terminations

copy SAP AG BC420 12-66

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 6788

083

983209 SAP AG 1999

ALL TRASATI C4

RE)ORT 777-DATA mltot T0)E ctuaram-

2A TRANSA2TION FD USING BD2DATA

O)TIONS FRO( mltot-

2A TRANSA2TION 3tranact9oncode4 USING 3bdc1table4 C (ODE A E N C U)DATE A S C (ESSAGES INTO 3metab4 C O)TIONS FRO( ot C -

RE)ORT 777-DATA mltot T0)E ctuaram-2A TRANSA2TION FD USING bdcdata

O)TIONS FRO( mltot-

The addition 5PTI5NS enaes the ca transaction statement to e controed through a structure

The structure must have the dictionary type 2T43PAampAS

The addition 5PTI5NS Famp5 must not e comined either $ith the addition 57 or $ith

4PAT7 ore information on the net side

copy SAP AG BC420 12-67

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 6888

085

983209 SAP AG 1999

Structure TUltPARAMS

DISMD1 Procen mode anaoo o addon amp

UPDMD1 $pdae mode anaoo o addon $PA

ATTMD1 CA mode CA conro

D19SI1 orce de=a EndoE e drn procen

RAMMIT +o eD a Camp amp(

IPT +o a ac np eonF a F S-B+P SPAC

I1D +o a ac np eon a=er end o= BC daa

The components are defined as foo$s

The components 7FSIM7 ampA25IT N5INPT and N5I7N can have the foo$ing

vaues KGK E Ces or K K E No

If the addition 5PTI5NS Famp5 is not specified the foo$ing settings appy to the contro

parameters

IS57 from addition 57

4P57 from addition 4PAT7

2ATT57 2ATT not active

7FSIM7 o not not use defaut $indo$s siDe

ampA25IT Successfu eit at 25IT -5amp6

N5INPT atch input session active (SC9INPT E G)

N5I7N atch input session sti active after end of 2 data

copy SAP AG BC420 12-68

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 6988

087

983209 SAP AG 1999

SMSBID Message ID

SMSBT Message T(pe C1GIGWGSGA

SMSB Message umber

SMSB6 Message ariable 6

SMSBamp Message ariable amp

SMSB Message ariable

SMSB4 Message ariable 4

SMSBID Message ID

SMSBT Message T(pe C1GIGWGSGA

SMSB Message umber

SMSB6 Message ariable 6

SMSBamp Message ariable amp

SMSB Message ariable

SMSB4 Message ariable 4

Return code$

S(stem fields$

alue Meaning

0 Successful

6000 1rror in transaction

6000 1rror in processing call transaction

see also the s(stem fields specified

alue Meaning

0 Successful

6000 1rror in transaction

6000 1rror in processing call transaction

see also the s(stem fields specified

9ield name Meaning9ield name9ield name MeaningMeaning

Return ode and S(stem 9ields

The return code is used to specify $hether the caed transaction $as processed successfuy In

addition severa system fieds are fied The numer I type and variaes of the diaog message

output y the caed transaction Cou need this information to output the message tet

copy SAP AG BC420 12-69

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 7088

030

983209 SAP AG 1999

Benerated Program of the TA Recorder

REFRES= (ESSTAB-

2A TRANSA2TION tcode USING bdcdata (ODE ctumode U)DATE cudate (ESSAGES INTO metab-OO) AT metab- ENDOO)-IF lubrc 34 AND e8rou 34 S)A2E- IF e8rouoenend - 2A FUN2TION BD2O)ENGROU) E)ORTING ---------

--------- E8rouoened - ENDIF- 2A FUN2TION BD2INSERT E)ORTING T2ODE tcode TABES D0N)ROTAB bdcdata-ENDIF-REFRES= bdcdata-

Message table output

pen error session

Insert data record that

has errors into error

session

If you have seected ca transaction on the seection screen the generated program runs as foo$s

The onine transaction is caed $ith ca transaction and passed to tae 2ATA A the

messages arising during the ca transaction are put in the interna tae 7SSTA

7SSTA is output as a ist

If you have specified an error session ( 73ltamp54P L SPA27) on the seection screen and the

ca transaction comes across an error (+3S4amp2 L 0) the error session is opened The error

session is ho$ever ony opened once Then the data record is paced in the session

A the other data records that have errors $ith ca transaction are paced in the same session

copy SAP AG BC420 12-70

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 7188

036

983209 SAP AG 1999

The Transaction Recorder

PrinciplesPrinciples

Recording )ith the LSMWRecording )ith the LSMW

Principles of atch Input and all TransactionPrinciples of atch Input and all Transaction

Integrating the TA Program into the DWIntegrating the TA Program into the DW

Using the TA Recorder Using the TA Recorder

copy SAP AG BC420 12-71

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 7288

03amp

983209 SAP AG 1999

Integrating into the DW

Transfer program

AAP Dictionar(

Integrate

SDA0

SDA6

SDAamp

SDA

Cou can integrate the generated program into the G9- The structure of the fie must e created

in the AAP ictionary The taes SGA0 SGA8 SGA1 and SGA $i e fied

copy SAP AG BC420 12-72

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 7388

03

983209 SAP AG 1999

DW Release 42

Goo

-B eeae 45

aa ran=er ogtec

Int customer data transfer ob-ect

ecord =ed

Dece daa ran=er

d Goo

The ampunction ampor interatin TA recorder prora$s is

i$ple$ented in the

D+-B in Release

The recorder can e integrated as of ampeease and it is provided in the G9- ampeease

ltot to the G9- ampeease 5n the initia screen you can integrate programs y choosing ampoto

( +nt customer ata transfer o-ect

copy SAP AG BC420 12-73

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 7488

034

983209 SAP AG 1999

reating Program as D b-ect

Comer ran=er ogtec

ampgtec ype

Sor eD =or ogtec

aa ran=er proram

Srcre name

9900

(+A1

Cane comer

ZBCA+G

ZB

ustomer transfer ob-ect

umber bet)een 7000 and 7777

b-ect t(pe

Assignment to R ob-ect

Short tet for D ob-ectShort description

Data transfer program

ame of generated program

Structure name

A structure Cstructure la(out )ith this name is created in

the AAP Dictionar(

For ampeease transfer oects $ere not organiDed y 5amp oects ut y a G numer (00089

OOOO) The numer range O0009OOOO is reserved for customers

To create a connection to the ne$ G 9- you must assign the program to a 5amp oect

2reate a short tet for the G oect This tet $i appear in the method seection ist

Specify the program to e incuded

Specify a name for the structure to e created in the AAP ictionary

Note $he generated program appears under program type +N and not under program type

-

copy SAP AG BC420 12-74

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 7588

032

983209 SAP AG 1999

Adantages

Automatic program registration in the DW in

Release 48

ou can use all the functions defined for

standard ob-ects

1ception$ The (reate ampile ith data

function

If you incuded the oect in the ampeease $orench it is automaticay avaiae in the ampeease

B $orench

A the $orench functions are avaiae for your oect ecept for Create files ith transfer ata

copy SAP AG BC420 12-75

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 7688

038

983209 SAP AG 1999

ou are no) able to$

The Transaction Recorder$ Unit Summar(

Use the recording function in the LSMW to create

a batch input session )ith the data from the

eternal s(stem

Use the TA Recorder to create (our o)n data

transfer program

Anal(e programs that )or+ )ith batch input or

call transaction

Integrate the TA Recorder programs into the

DW

copy SAP AG BC420 12-76

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 7788

ercise 1

nit $ -ecorder

$opic 2reating etors

$ransaction -ecorder ercise 1

bull 2reating detors $ith eterna numer assignment

bull etor numers M9980008 to M9980080

Address data for detors $ith eterna numer assignment is to

e transferred using program ampFI700

ro4ect F5

Supro4ect +5

-un +575

$as)s 85 95 8S25

9oad program -F+00

8 In the foo$ing eercises eisting data is to e changed Therefore these detors $ith

eterna numer assignment have to first e created

898 4nder suproect 79 create run 797G9 $ith the name Detors ith

eternal numers

copy SAP AG BC420 12-77

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 7888

891 2reate the foo$ing three tass The tass map the foo$ing process steps

convert data create + session and process + session

89198 In run 797G9 create the foo$ing tas

9 Tas AP9

9 Name 2onvert data 9 Tas type AP

9 Program type +S-

Seect the foo$ing +S- oect

+S- proect 2109

+S- suproect 7I9

+S- oect I997GT

89191 In run 797G9 create the foo$ing tas 9 Tas +5A9

9 Name 2reate I session

Tas type +5A

9 Program type INP

Seect program ampFI700 $ith the variant

I97G9

8919 In run 797G9 create the foo$ing tas

9 Tas S29

9 Name Process I session Tas type S2

9 Program type amp7P5

Seect program ampS2S4 $ith the variant

S497G9

Note that you have to correct the seuence of the tass 2onvert data

create + session and process + session

4se the uttons

89 Start the run

The detors $i e created $ith eterna numer assignments

89 2hec in transaction F0 that the detors M9980008 to M9980080 have een

created

copy SAP AG BC420 12-78

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 7988

ercise

nit $ransaction -ecorder

$opic -ecording function in the 9S8(

bull 2reate a recording using the +S-

bull ltenerate a atch input session

2hange the detor address data in the amp System

Name of the recording +

Name of the file +2055+F9

8 2reate the recording 7I3 using the +S- ampecord the transaction F01 (2hange

detor)

898 efore you create the recording first test the transaction onineQ

For the recording use detor M9980008 5n the initia screen of the F01

maintain the foo$ing fieds ony

etor etor M9980008

2ompany code 0008

Address data seect

Note $he data record must e saved hile recording

891 aintain the names and the descriptions for the foo$ing fieds

Name city street posta code and teephone numereete a other fieds in screen 880 from the recording (eg S5ampT+ +AN8

SPampAS)

4se the same technica names as sho$n in the tae eo$ (automatic fied

mapping)

copy SAP AG BC420 12-79

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 8088

1 2reate the suproect 7I9 and the ne$ oect TA3 in your proect 2109

aintain the oect attriutes and seect the item atch input recording Seect your

recording 7I3

2reate the source structure address

2reate the source fieds according to the tae eo$ 5r copy them from proect 2109S37N suproect 7I900 oect TA900

198 Fie setup The data from the egacy system are dispayed in the foo$ing tae

Fied name Fied type Fied ength escription

N5 2 8B etor numer

NA7 2 Name

STamp77T 2 Street

2ITC 2 2ityPace of residence

MIP 2 80 Posta code

T7+ 2 8B Teephone numer

191 aintain the fied mapping 4se the automatic fied mapping (via menu item

7tras)

19 Specify the fies 5ny maintain the fie name of the source fie

Name of the fie 21099IFI+7

2odepage 8800

19 Import the data and convert them ispay the data in each caseQ

19 2reate a atch input session

19B ampun the atch input session

copy SAP AG BC420 12-80

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 8188

ercise 3

nit $ransaction -ecorder

$opic -ecording ith the $ -ecorder

bull ltenerate a recording using the TA recorder

bull Test the recording

2hange the address data of detors in the amp system

Name recording $+

Name of the file +2055+F9

8 2reate the recording TA37I3 using the transaction recorder ampecord the

transaction F01 (change detor)

898 4se detor M9980008 for the recording 5n the F01 initia screen ony

maintain the foo$ing fieds

etor etor M9980008

2ompany 2ode 0008

Address data seect

Note $he data record must e saved hen recording

eete a fieds that do not eist in the source fie 21099IFI+7 from screen

880 in the recording (eg 6NA89S5ampT+ 6NA89+AN8 6ANNQ9SPampAS) Note o not deete fieds ampF01946ampS and ampF0190880

Save the recording no$

1 S$itch to the recordings overvie$

198 Process the recording $ith the processing mode A (dispay a)

191 Process the recording $ith the processing mode RN (no dispay)

19 If the recording has een tested and no error has occurred generate a I session

and run it using the I monitor If an error shoud occur generate the recordingagainQ

copy SAP AG BC420 12-81

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 8288

From the recording generate the program M21037I3 in your deveopment cass

2109 Seect the foo$ing

bull ampead fied contents from fie

bull 2reate test data in the fie 2103dei3test3tt

98 Save this program and eecute it ltenerate one I session each and process it

2arry out the same steps again using the ca transaction

The generated program shoud no$ e changed so that fie 21099IFI+7 can e

read and processed

98 2hange the defaut vaue of the fie name (parameter dataset) in 21099

IFI+7

91 2hange the structure definition eete the company code fied and the address

data checo from the structure

9 2hange the su9routine ca perform dc3fied for the company code (KampF019

46ampSK) so that the vaue 0008 is transferred

9 2hange the su9routine ca perform dc3fied for the address data checo

(KampF0190880K) so that the vaue G is transferred

9 Start the program again and read the data from the fie 21099IFI+7 $ith

detor data ltenerate a I session $ith it and run it

copy SAP AG BC420 12-82

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 8388

033 Include DR16INCLUDE BDCRECX1

SELECTION-SCREEN BEGIN OF LINE

PARAMETERS SESSION RADIOBUTTON GROUP CTU create sessi SELECTION-SCREEN COMMENT $amp TEXT-S FOR FIELD SESSION

se(ecti-scree )siti +

PARAMETERS CTU RADIOBUTTON GROUP CTU ca(( trasacti

SELECTION-SCREEN COMMENT $amp TEXT-S FOR FIELD CTU

SELECTION-SCREEN END OF LINE

SELECTION-SCREEN BEGIN OF LINE

SELECTION-SCREEN COMMENT $amp TEXT-S1 FOR FIELD GROUP

se(ecti-scree )siti $+

PARAMETERS GROUP1$amp r) ae 0 sessi

SELECTION-SCREEN COMMENT $amp TEXT-S+ FOR FIELD CTUMODE

se(ecti-scree )siti

PARAMETERS CTUMODE LIE CTU2PARAMS-DISMODE DEFAULT 3N3

A4 s56 a(( 78)rs

E4 s56 78)r errr (8

N4 7 t 7is)(a8 78)r

SELECTION-SCREEN END OF LINE

SELECTION-SCREEN BEGIN OF LINE

SELECTION-SCREEN COMMENT $amp TEXT-S$ FOR FIELD USER

se(ecti-scree )siti $+

PARAMETERS4 USER1$amp DEFAULT S9-UNAME ser 0r sessi i atc5

SELECTION-SCREEN COMMENT $amp TEXT-S FOR FIELD CUPDATE

se(ecti-scree )siti

PARAMETERS CUPDATE LIE CTU2PARAMS-UPDMODE DEFAULT 3L3

S4 s8c5rs(8

A4 as8c5rs(8

L4 (ca(

SELECTION-SCREEN END OF LINE

SELECTION-SCREEN BEGIN OF LINE

SELECTION-SCREEN COMMENT $amp TEXT-S FOR FIELD EEP

se(ecti-scree )siti $+

PARAMETERS4 EEP AS CltECBOX 3 3 = 7e(ete sessi i0 0iis5e7

3X3 = gtee) sessi i0 0iis5e7

SELECTION-SCREEN COMMENT $amp TEXT-S FOR FIELD E2GROUP

copy SAP AG BC420 12-83

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 8488

se(ecti-scree )siti

)araeters E2GROUP1$amp r) ae 0 errr-sessi

SELECTION-SCREEN END OF LINE

SELECTION-SCREEN BEGIN OF LINE

SELECTION-SCREEN COMMENT $amp TEXT-S FOR FIELD ltOLDDATE

se(ecti-scree )siti $+

PARAMETERS4 ltOLDDATE LIE S9-DATUM

SELECTION-SCREEN COMMENT +11amp TEXT-S$ FOR FIELD E2USER

se(ecti-scree )siti

PARAMETERS4 E2USER1$amp DEFAULT S9-UNAME ser 0r errr-sessi

SELECTION-SCREEN END OF LINE

SELECTION-SCREEN BEGIN OF LINE

SELECTION-SCREEN COMMENT +11amp TEXT-S FOR FIELD E2EEP

se(ecti-scree )siti

PARAMETERS4 E2EEP AS CltECBOX 3 3 = 7e(ete sessi i0 0iis5e7

3X3 = gtee) sessi i0 0iis5e7

SELECTION-SCREEN END OF LINE

SELECTION-SCREEN BEGIN OF LINE

SELECTION-SCREEN COMMENT +11amp TEXT-S FOR FIELD E2ltDATE

se(ecti-scree )siti

PARAMETERS4 E2ltDATE LIE S9-DATUM

SELECTION-SCREEN END OF LINE

SELECTION-SCREEN SIP

SELECTION-SCREEN BEGIN OF LINE

SELECTION-SCREEN COMMENT 1amp TEXT-S1 FOR FIELD NODATA

PARAMETERS4 NODATA DEFAULT 33 LOER CASE 7ata

SELECTION-SCREEN END OF LINE

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

Batc5i)t7ata 0 si(e trasacti

DATA4 BDCDATA LIE BDCDATA OCCURS ITlt ltEADER LINE

essaes 0 ca(( trasacti

DATA4 MESSTAB LIE BDCMSGCOLL OCCURS ITlt ltEADER LINE

errr sessi )ee7 3 3 r 3X3amp

DATA4 E2GROUP2OPENED

essae tets

TABLES4 T1

copy SAP AG BC420 12-84

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 8588

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

at se(ecti scree

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

AT SELECTION-SCREEN

r) a7 ser st e 0i((e7 0r create sessi

IF SESSION = 3X3 AND

GROUP = SPACE OR USER = SPACE

MESSAGE E1MSamp

ENDIF

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

)e 7ataset

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

FORM OPEN2DATASET USING P2DATASET

OPEN DATASET P2DATASET IN TEXT MODE

IF S9-SUBRC

RITE4 TEXT-E S9-SUBRC

STOP

ENDIF

ENDFORM

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

c(se 7ataset

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

FORM CLOSE2DATASET USING P2DATASET

CLOSE DATASET P2DATASET

ENDFORM

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

create atc5i)t sessi

t 0r ca(( trasacti siamp

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

FORM OPEN2GROUP

IF SESSION = 3X3

SIP

RITE4 $amp 3Create r)3I1amp GROUP

SIP

)e atc5i)t r)

CALL FUNCTION 3BDC2OPEN2GROUP3

EXPORTING CLIENT = S9-MANDT

copy SAP AG BC420 12-85

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 8688

GROUP = GROUP

USER = USER

EEP = EEP

ltOLDDATE = ltOLDDATE

RITE4 amp 3BDC2OPEN2GROUP3I$amp

1$amp 3retrc7e43I+amp

S9-SUBRC

ENDIF

ENDFORM

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

e7 atc5i)t sessi

ca(( trasacti si4 errr sessiamp

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

FORM CLOSE2GROUP

IF SESSION = 3X3

c(se atc5i)t r)

CALL FUNCTION 3BDC2CLOSE2GROUP3

RITE4 amp 3BDC2CLOSE2GROUP3Iamp

1$amp 3retrc7e43I+amp

S9-SUBRC

ELSE

IF E2GROUP2OPENED = 3X3

CALL FUNCTION 3BDC2CLOSE2GROUP3

RITE4

RITE4 amp 3Fe5(era))e 6r7e eret3Iamp

ENDIF

ENDIF

ENDFORM

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

Start e6 trasacti accr7i t )araeters

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

FORM BDC2TRANSACTION USING TCODE

DATA4 L2MSTRINGamp

DATA4 L2SUBRC LIE S9-SUBRC

atc5 i)t sessi

IF SESSION = 3X3

CALL FUNCTION 3BDC2INSERT3

EXPORTING TCODE = TCODE

TABLES D9NPROTAB = BDCDATA

RITE4 3BDC2INSERT3Iamp

copy SAP AG BC420 12-86

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 8788

TCODE

3retrc7e43I+amp

S9-SUBRC

3RECORD43

S9-INDEX

ca(( trasacti si

ELSE

REFRESlt MESSTAB

CALL TRANSACTION TCODE USING BDCDATA

MODE CTUMODE

UPDATE CUPDATE

MESSAGES INTO MESSTAB

L2SUBRC = S9-SUBRC

RITE4 3CALL2TRANSACTION3

TCODE

3retrc7e43I+amp

L2SUBRC

3RECORD43

S9-INDEX

LOOP AT MESSTAB

SELECT SINGLE FROM T1 ltERE SPRSL = MESSTAB-MSGSPRA

AND ARBGB = MESSTAB-MSGID

AND MSGNR = MESSTAB-MSGNR

IF S9-SUBRC =

L2MSTRING = T1-TEXT

IF L2MSTRING CS 313

REPLACE 313 ITlt MESSTAB-MSGH1 INTO L2MSTRING

REPLACE 3$3 ITlt MESSTAB-MSGH$ INTO L2MSTRING

REPLACE 33 ITlt MESSTAB-MSGH INTO L2MSTRING

REPLACE 33 ITlt MESSTAB-MSGH INTO L2MSTRING

ELSE

REPLACE 33 ITlt MESSTAB-MSGH1 INTO L2MSTRING

REPLACE 33 ITlt MESSTAB-MSGH$ INTO L2MSTRING

REPLACE 33 ITlt MESSTAB-MSGH INTO L2MSTRING

REPLACE 33 ITlt MESSTAB-MSGH INTO L2MSTRING

ENDIF

CONDENSE L2MSTRING

RITE4 MESSTAB-MSGT9P L2MSTRING$+amp

ELSE

RITE4 MESSTAB

ENDIF

ENDLOOP

copy SAP AG BC420 12-87

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 8888

SIP

Eree 0e5(era))e

IF L2SUBRC AND E2GROUP SPACE

IF E2GROUP2OPENED = 3 3

CALL FUNCTION 3BDC2OPEN2GROUP3

EXPORTING CLIENT = S9-MANDT

GROUP = E2GROUP

USER = E2USER

EEP = E2EEP

ltOLDDATE = E2ltDATE

E2GROUP2OPENED = 3X3

ENDIF

CALL FUNCTION 3BDC2INSERT3

EXPORTING TCODE = TCODE

TABLES D9NPROTAB = BDCDATA

ENDIF

ENDIF

REFRESlt BDCDATA

ENDFORM

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

Start e6 scree

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

FORM BDC2D9NPRO USING PROGRAM D9NPRO

CLEAR BDCDATA

BDCDATA-PROGRAM = PROGRAM

BDCDATA-D9NPRO = D9NPRO

BDCDATA-D9NBEGIN = 3X3

APPEND BDCDATA

ENDFORM

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

Isert 0ie(7

Page 13: BC420_46C - 012The Transaction Recorder

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 1388

06

983209 SAP AG 1999

Subscreens

Comer Z-88-10000

+ame

+ame

ADDR6ltDATAAM16

DltSUSR

Information$

ode poo name

Screen nmer

Screen name

Some screens contain suscreen areas

To determine the fied name pace the cursor on the fied and choose F1 The name of the screen

fied is specified under Technical info

copy SAP AG BC420 12-13

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 1488

064

983209 SAP AG 2001

Tabstrips

$er Roberts

1ample$ User Profile Defaults

Sar men +

oon anae

ampp dece Pr1

ParameerDefaults

DltSUSR

USD19AULTSSPLD

The tastrip eement sho$n is used on the aintain User rofile (5$n data) screen

4nder the tastrip tite Defaults the user can set various vaues such as the defaut printer

The user profie are user9dependent settings (as the name impies)

copy SAP AG BC420 12-14

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 1588

062

983209 SAP AG 1999

Step Loops and Table ontrols

1ample$ an+ Details

Comer

ntr( an+ +e( Account

08154711

123456789

Z-00-12345

an+ Details

00708155546344536

Banlt daa

==A=C06)

==A=C0amp)

Step oops and tae contros are treated identicay for the recording

The fied names of the fieds isted are the same for every ro$

7ach ro$ contains a customers an detais The fieds must e accessed using an inde (this is

specified as an addition to the fied name for eampe 6N69AN6N(1) The inde must match

the ro$ numer

5ny the visie fieds on a screen can e fied $ith data If some fieds are ony visie after paging

the paging must e recorded as $e This means that for the recording you must eecute a the steps

in the onine transaction

For eampe age on $oud e eecuted using the function code 1 (Paging icons)

Paging to the end of a ist 1Page up 11

lto to first page 18

copy SAP AG BC420 12-15

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 1688

068

983209 SAP AG 2001

Recording Buidelines

Test the transaction before recording

Start the recording

hange field alues onl( for fields

releant to the recording

As of 48 all filled fields are recorded

Transaction must be properl( eitedCSA1

Use of scroll bars cannot be recorded

Specia recording notes

F8 F and your o$n F8 and F hep (Pamp527SS 5N =7+P9amp7gt47ST Pamp527SS 5N A+479

amp7gt47ST) are not recorded This aso appies to a commands under the System and $el

menus aues for defaut variants ( transaction variants) are not incuded

7rror and $arning diaogs are not recorded 5ny the 56 code and the fied contents reuired for

further processing on the current screen are recorded

Note uring recording the data entered is $ritten to the dataase

copy SAP AG BC420 12-16

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 1788

063

983209 SAP AG 2001

1n-o( SAP ontrols and Data Transfer

bull SAP Picture ontrolbull SAP ETML ie)er ontrol

bull SAP Tet 1dit ontrol

bull AL Brid ontrol

bull SAP Tree ontrol

bull

ranch 6

ranch amp

Root

These and other controls do not support batch input$

Root

ranch amp

ranch amp6

The ne$ 7noy SAP contros deveoped for ampeease B do not support atch input or ca

transaction

=o$ever tae contros and tastrips do support atch input

copy SAP AG BC420 12-17

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 1888

065

983209 SAP AG 1999

The Transaction Recorder

PrinciplesPrinciples

Recording )ith the LSMWRecording )ith the LSMW

Principles of atch Input and all TransactionPrinciples of atch Input and all Transaction

Integrating the TA Program into the DWIntegrating the TA Program into the DW

Using the TA Recorder Using the TA Recorder

copy SAP AG BC420 12-18

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 1988

067

983209 SAP AG 1999

Session

generator

Recording Using the LSMW

-ith the +S- you can create your o$n recordings

The +S- uses the standard TA recorder here yet evauates the recording itsef The information

from the recording is used to create atch input sessions

The created atch input session can e processed as usua $ith the atch input monitor

Note As $ith the standard procedure it is euay important that the data is converted

copy SAP AG BC420 12-19

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 2088

0amp0

983209 SAP AG 1999

reating Recording

Admnraon

ecordn

Goo

ame of recording

Description

)ner

ame of transaction

Start recording

lto into the +S- and seect the menu path ampoto (Recorings An overvie$ of a previousy

created recordings for your proect are dispayed To start a ne$ recording seect Create

To create a recording you must define the name the description and the o$ner

7nter the name of the transaction you $ant to record

7ecute the transaction and compete it propery

Note ampecordings are assigned to ony one proect 9 so the name of the recording must e uniue

copy SAP AG BC420 12-20

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 2188

0amp6

983209 SAP AG 1999

hanging ustomer Data$ Initial Screen

9ield ontents

BCC$Samp $SZAV

BCamp(Camp )00

02-($++ -88-10000

02-0110

02-0130

$SZAV

9ield ame

Comer

Company code

Z-88-10000

Genera daa

Comer Z-88-10000

+ame

9ield ontents

BCamp(Camp $PA

BCS$BSC SAPSZA1 0300ASS

BCS$BSC SAPSZA1 0301Camp$

BCC$Samp SZA10100-+$B

A1AA-S Garden Sree

A1AA-amp$S+$1 34

A1AA-PampSCamp1 02105

9ield ame

Screen

111

Screen

106

In the aove eampe the transaction Change customer F01 is recorded

Note

You must ma)e some modification to the field values for all the fields you ant to capture

for the data transfer For the purposes of recording a change can simply mean overriting

one single character in a field ith the same character

ven if fields are to e filled using S$amp$ parameters the values must still e changed on

the screen in order to capture them

(ith online transactions screen sequences may appear that are different than in the

recording

copy SAP AG BC420 12-21

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 2288

0ampamp

983209 SAP AG 1999

Results

RecordingRecording R1lt6 Demolt6

9D0amp hange customer Caccounting

SAPM90ampD 0608

DltURSR R90ampD=UR

Dlt=D1 gt00

R90ampD=UR 5560000

R90ampDD0660

US1ltA

SAPM90ampD 0666

Dlt=D1 UPDA

DltSUSR SAPLSA6

DltSUSR SAPLSA6

DltURSR SA6ltD0600T1LltUM1

ADDR6ltDATASTR11T 4 Barden Street

ADDR6ltDATAPSTltD1 0amp602

ADDR6ltDATAIT6 oston

SA6ltD0600T1LltUM1 8638257755

The resuts of the recording using the +S- are dispayed in a tree structure

After the recording has finished you can edit it Cou can deete fieds or add ne$ ones

copy SAP AG BC420 12-22

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 2388

0amp

983209 SAP AG 1999

Assigning 9ield ames

Recording R16 Demolt6

Dlt=D1 UPDA

DltSUSR SAPLSA6

DltSUSR SAPLSA6

DltURSR SA6ltD0600T1L

ADDR6ltDATAAM16 Lisa Eofmeister

ADDR6ltDATAPSTltD1 0amp602

ADDR6ltDATAIT6 oston

ame

+ame

ecrpon

e=a ae

A1AA-+A1

A1AA-+A1

Comer name

a o=meer

Screen =ed

ustomer name

double clic+

Cou can assign names for each recorded fied The specia fieds (2356257 2324ampS5amp

and 23S4S2amp77N) are not incuded here Cou can choose the fied names -hen the atch

input session is created the contents of these fieds are assigned to the target fieds specified in the

eft coumn

Functions

efaut Assigns to the fied names of the underying target fied and its fied description

ampeset eetes fied name and fied description

oue cic 7dits fied name fied description and defaut vaue

Note Cou can use fied names more than once =o$ever the fied name is ony avaiae once in thefied mapping For this reason it is not practica to use fied names more than once

For a those fieds for $hich you do not assign a name the defaut vaue is used $hen the atch

input session is created These defaut vaues can e seen as constants This is especiay usefu for

chec oes (for eampe 08 vie$ seection)

The +S- supports automatic fied mapping Source fieds and target fieds can e assigned to each

other automaticay The fieds are assigned to the corresponding fieds of the same name Therefore

the fied names of the source structure shoud e given the same or simiar names as the fied names

in the target structure

copy SAP AG BC420 12-23

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 2488

0amp4

983209 SAP AG 2001

Addinggtremoing screen fields

Repeating recording

9or identical field names the name and description are

assigned automaticall(

1diting Recording

02-($++

(+A1-A+

(+A1-+A1

(+A1-Samp

(+A1-+A2

(+A1-SAS

Comer accon nmer

e

+ame 1

Sor =ed

+ame 2

Sree

Selection of all

aailable screen

fields

Cou can ater add ne$ screen fieds if you need to 6eep in mind that fieds shoud ony e added in

paces $here they are aso provided on the screen other$ise you $i get an error $hen the I

session is processed

After saving you $i get the message The data has een saved successfuy No$ the recordings

are avaiae for the oect attriutes

If you repeat the recording you can record a ne$ screen seuence $ith ne$ fieds Provided that the

fied names (eg 6NA89NA78) are identica the names and descriptions are automaticay

assigned

copy SAP AG BC420 12-24

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 2588

0amp2

983209 SAP AG 1999

b-ect T(pe and Import Method$ Recording

Standard atch Input gt Direct Input

atch Input Recording

API

IDoc

ampgtec ype ) mpor meod

Bac np recordn

ecordn ec1

The recording is no$ avaiae $ith the oect attriutes

Net you create a proect or su9proect in the +S- and specify process the data transfer

Cou eecute the data transfer as in the standard system

efine the source fieds and structures

efine the fied mapping

ampead and convert the data

2reate and import a atch input session

copy SAP AG BC420 12-25

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 2688

0amp8

983209 SAP AG 1999

The Transaction Recorder

PrinciplesPrinciples

Recording )ith the LSMWRecording )ith the LSMW

Principles of atch Input and all TransactionPrinciples of atch Input and all Transaction

Integrating the TA Program into the DWIntegrating the TA Program into the DW

Using the TA Recorder Using the TA Recorder

copy SAP AG BC420 12-26

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 2788

0amp3

983209 SAP AG 1999

Transaction Recorder

Online

Transaction

RecordingTransfer Program

T

Included in the Batch Input Monitor

Cou use the transaction recorder to record transactions and then use the transaction recording to

generate a transfer program The program ao$s you to transfer data using either atch input or ca

transaction

copy SAP AG BC420 12-27

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 2888

0amp5

983209 SAP AG 1999

hanging ustomer Data$ Initial Screen

9ield ontents

BCC$Samp $SZAV

BCamp(Camp )00

02-($++ Z-88-10000

02-0110

02-0130

$SZAV

9ield ame

Comer

Company code

Z-88-10000

Genera daa

Comer Z-88-10000

+ame

9ield ontents

BCamp(Camp $PA

BCS$BSC SAPSZA1 0300ASS

BCS$BSC SAPSZA1 0301Camp$

BCC$Samp SZA10100-+$B

A1AA-S Garden Sree

A1AA-amp$S+$1 34

A1AA-PampSCamp1 02105

9ield ame

Screen

111

Screen

106

In the aove eampe the transaction Change customer F01 is recorded

copy SAP AG BC420 12-28

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 2988

0amp7

983209 SAP AG 2001

hange Debitor$ Pa(ment Transactions C6

Banlt dea

Screen

10

9ield ontent

BCC$Samp (+B(-BA+(+01

BCamp(Camp BA+((+B(-BA+(S01

(+B(-BA+(01 12345679

(+B(-BA+(+01 22222222

Debitor 5560000

9ield ame

Inde

copy SAP AG BC420 12-29

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 3088

00

983209 SAP AG 1999

hanging ustomer Data$ Pa(ment Transactions Camp

Addre

an+ countr( US

an+ code 6amp42837

Banlt dea

ustomer 5560000

9ield ontents9ield ame

BCC$Samp (+A1-(+ZA

BCamp(Camp $PA

(+B(-Z01

Screen

10

Screen

100

SAPLBA

9ield ontents

BCC$Samp B+(A-BA+(A

BCamp(Camp +

B+(A-BA+(A +aona Banlt

9ield ame

In different transactions the modue poo may change This is the case $ith for eampe customer

master data The TA recorder records modue poo changes automaticay

copy SAP AG BC420 12-30

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 3188

06

983209 SAP AG 1999

Eierarch( Displa( of the Recording

02amp

02

SAP02 0106

BCC$Samp 02-0130

BCamp(Camp )00

02-($++ -88-10000

02-0110

02-0130

SAP02 0111

BCamp(Camp V

BCC$Samp A1AA-amp$S+$1

A1AA-S Garden Sree

Recording

-ith the TA recorder the resuts are aso a ist in a hierarchy dispay =o$ever you cannot assign

your o$n fied names as you can in the +S-

copy SAP AG BC420 12-31

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 3288

0amp

983209 SAP AG 1999

Recording erie)

Recording

Transfer program

9unction module

ontains onl( the data

from the recording

Test data

Test

reate

reate

reate

reate

1dit hange recording

Process recording

Cou can edit the recording as needed

The recording can e tested and eecuted again The screens are run through in the same $ay as in

the recording

The recording can then e used to create

atch input sessions

Test data

ata transfer programs $ith atch input or ca transaction

Function modues

copy SAP AG BC420 12-32

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 3388

0

983209 SAP AG 1999

1 02 BS

2 SAP02 106

3 BCC$Samp $SZAV

4 BCamp(Camp )00 5 02-($++ -88-10000

6 02-0110

7 02-0130

8 $SZAV

9 SAP02 111

10 BCamp(Camp V

11 BCC$Samp A1AA-amp$S+$1

12 A1AA-S Garden Sree

Program Screen St 9ield ame 9ield alue

Recording 1ditor

Recording

Add gt delete lines 9ormat chec+

Import gt eport of recording

In the editor you can add or deete ines Cou can aso change the contents of individua ines

-ith the function Chec) you can specify $hether the edited version of the recording sti has the

correct synta

Cou can aso eport import recordings to from a seuentia fie

After editing save the recording changes

copy SAP AG BC420 12-33

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 3488

04

983209 SAP AG 1999

Recording Seeral Transaction Runs

RecordingF

Directl( after the first recordingG or

In the displa( mode of the recording

In this step you can record additiona transactions and add additiona transaction runs to the

recording

Cou can record the additiona transactions directy after a recording or in the edit screen of a

recording

copy SAP AG BC420 12-34

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 3588

02

983209 SAP AG 1999

1ditor$ Importing and 1porting Recordings

6 T 9D0amp S

amp SAPM90ampD 608

DltURSR

4

2

8 SAPM90ampD 666

60

66

Program Screen St 9ield name 9ield alue

cempA

e name

aa =orma

cemp

A

e name

aa =orma

1port

Import

Presentation Serer

If the editor functions in the systems do not provide a the functions you need you can do$noad the

recording to your presentation server using the Eort function and then edit the recording using a

P2 editor

Cou use the Import function to import the data ac into the amp System ae sure the fie is sti in

the correct format

copy SAP AG BC420 12-35

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 3688

08

983209 SAP AG 1999

Processing the Recording

Recording

Process )ith ALL TRASATI

Parameer

Proce mode$pdae mode

CA mode

e=a e

Con a=er comm

+o a B eon

nd +o a B mode

A

A

T

The recording can e eecuted directy The data from the recording is used and the transaction is

processed $ith ca transaction

2a transaction provides a range of options for caing appication transactions $hich are discussed

on the foo$ing t$o pages

copy SAP AG BC420 12-36

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 3788

03

983209 SAP AG 1999

Process mode

Update mode

ATT mode

Processing Recording )ith T 6

A

1

Displa( all screens

Displa( errors onl(

o displa(

L

S

A

Local

S(nchronous

As(nchronous

A

o ATT

ATT )ithout indiidual screen control

ATT )ith indiidual screen control

Processing mode

=ere you can specify the processing mode 9 it is the same as the processing mode for atch input

4pdate mode

=ere you can specify the update mode For more information see the unit ca transaction

2ATT mode

=ere you can mae specia settings if you $ant to test the recording under 2ATT conditions (ony

necessary for 2ATT runs) Specia functions are caed in the 2ATT too for each screen at the end of

P5 and at the start of PAI

copy SAP AG BC420 12-37

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 3888

05

983209 SAP AG 1999

Default sie

ont after commit

ot a I session

1nd$ ot a I mode

Processing Recording )ith T amp

The screen standard sie is used for the

processing

ommit )or+ does not end the processing

o I mode is actie The transaction )ill run

through as in online

I mode is selected nce the data in the D

table is processedG the I mode is set to inactie

Standard siDe

If you seect this the screens are processed in the standard siDe in the foreground (in foreground or

dispay errors ony) Note the standard siDe is a$ays used for acground processing

Further after commit

The first commit $or in a transaction does not ead to the end of the recording

Note A atch input transaction is ended $ith the first commit $or

No I mode

The system fied SC9INPT is not set (SC9INPT E ) So transactions are run through as in onine

7nd No I mode

5ny use if you choose the processing mode 7 (dispay errors ony) Then the transaction is processed in the acground in atch input mode and if there is an error the screens run through in

the foreground

copy SAP AG BC420 12-38

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 3988

07

983209 SAP AG 1999

I Mode

atch input

mode

nline

Some transactions behae differentl( in batch input mode

than in online Cbatch input capabilit(

atch input mode sets the s(stem field SIPT H

Not every transaction can run the same onine and in atch input mode The transaction must decide

itsef $hether it is caed onine or in atch input mode

The system sets the system fied SC9INPT E G if the atch input mode is active (this aso appies

to ca transaction) From this system fied the transaction can identify $hether to run onine or in

atch input mode

copy SAP AG BC420 12-39

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 4088

040

983209 SAP AG 1999

reating a Session 9rom the Recording

Recordingnl( contains the data

from the recording

Seon name 02amp

Aoraon ampBS(eep eon

oclt dae 10102000

Cou can create a atch input session directy from the recording that you can then process using the

atch input monitor

copy SAP AG BC420 12-40

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 4188

046

983209 SAP AG 1999

reating Test Data

Test Data

Recording

ranranpBC420AAe name

The file onl( contains the data from the recording

Rgt

Application Serer

Structure

Cou can create a fie from the recordingH the fie $i contain a the fieds from the recording The

fieds are added to the fie $ith the ength you specified in the definition

The fied order corresponds to the order in the recording overvie$ Technica fieds

(2356257 2324ampS5amp and so on) are incuded

The data can ony e stored on the appication server If you do not specify a path the fie is stored in

the $or directory of the appication server

If the specified test fie aready eists the ne$ data record is added to this fie

copy SAP AG BC420 12-41

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 4288

04amp

983209 SAP AG 1999

ed conen

reating a Program

Recording

ZBC420ampProram name

Transfer Program

e daa

ead =rom =e

ran=er =rom recordn

reate

9ile nameTest data

ranranpBC420AA

Cou can generate a program from the recording

In the foo$ing diaog o enter a program name In addition you can choose the type and method

for fiing the maintained fied contents from the recorded screens

4se the vaues used for the recording If you reuire feie data transfer you $i have to modify

this program ater

ParameteriDe the input vaues and read these vaues from a fie A data structure is created for

parameteriDationH the data records are read from an eterna fie into this data structure The

program assumes the fie $as taiored to this data structure

If you have decided to parameteriDe the input vaues you shoud aso create a test fie during

generation To do this seect the checo and enter a name for the fie

The attriute maintenance screen of the AAP editor appears aintain the attriutes and save the

program

copy SAP AG BC420 12-42

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 4388

04

983209 SAP AG 1999

Program 9unctions

Online

transaction

Transfer program

To

error

1rror

ption 6ption ampFlat SAP

structure

Monitor

Cou have no$ generated a data transfer program for importing data into the amp System The

program can eecute the data transfer using atch input or ca transaction

If you choose option 1 and there is an error the data record is paced into a atch input session

copy SAP AG BC420 12-43

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 4488

044

983209 SAP AG 1999

Benerating 9unction Modules

Recording

Zcreaedeor ncon mode

ncon rop

Sor eD

ZBC420

Creae comer

9unction module

nl( one data record can be processed at a time

In the net diaog o you can generate a function modue a function group and short tet from the

recording The function modue is automaticay created in the function group

copy SAP AG BC420 12-44

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 4588

042

983209 SAP AG 1999

9unction of 9unction Modules

Online

transaction

To

error

1rror

ption 6 ption amp

9unction module

Import

Parameter 1port

parameter

Tables

M1SSTA

Monitor

S$BC

Import interface

The import interface consists of a technica part and the fieds from the recording (A parameter is

created for each input fied of the recorded transactions)

7port interface

Simpy consists of the parameter S4amp2 The function modue $i return a vaue in the system

fied SC9S4amp2 after caing ca transaction This return vaue is set to Dero if the data record has

een correcty processed (5ny appies to 2T)

If a session is created you $i e notified $hether the data record coud e paced into the session

Tae interfaceThis is used ony if the function modue $ors $ith ca transaction The tae contains a the

system messages

copy SAP AG BC420 12-45

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 4688

048

983209 SAP AG 1999

Import Interface of 9unction Module

$

Technical

fields

Data

fields

BI session or CALL TRANSACTION

Processin $ode

pdate $ode

a$e oamp BI session iamp (T initial)

Bacround user iamp (T initial)

Delete session aampter processin

Loc date oamp session

ODATA indicator

TU

MD1

UPDAT1

BRUP

US1R

=11P

ELDDAT1

DATA

Cou can use parameter 2T4 to specify $hether the function modue creates a atch input session

(2T4 E ) or updates the data record directy using ca transaction (2T4 E G)

The other parameters are fied as for a atch input session header

Note 7very time the function modue is caed a atch input session is created

If the session is to contain severa transactions proceed as foo$s

ltenerate the transaction severa times This can e achieved y recording the transaction again The

function modue interface $i then contain more than one transaction -hen the function modue is

caed severa transactions can e generated for each session

copy SAP AG BC420 12-46

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 4788

043

983209 SAP AG 1999

The Transaction Recorder

PrinciplesPrinciples

Recording )ith the LSMWRecording )ith the LSMW

Principles of atch Input and all TransactionPrinciples of atch Input and all Transaction

Integrating the TA Program into the DWIntegrating the TA Program into the DW

Using the TA Recorder Using the TA Recorder

copy SAP AG BC420 12-47

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 4888

045

983209 SAP AG 1999

Benerated Program

9unction modules DltP1ltBRUP

DltIS1RT

DltLS1ltBRUP

AAP Program

Define structure of

data in seJuential

fileDefine D

table

pen seJuential file

pen I session

Read data recordCseJuential file

9ill D table

9ill I session gtALL TRASATI

Last data record K

lose I session

lose seJuential file

The generated program has the structure dispayed aove It uses the standard function modues for

creating atch input sessions

copy SAP AG BC420 12-48

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 4988

047

983209 SAP AG 1999

Structure of the Benerated Program

Benerated part

Define D

table

pen seJuential file

pen I session

Read data record

9ill D table

9ill I session gtALL TRASATI

Last data recordK

lose I session

lose seJuential file

Include DR16

Define filestructure

P1ltDATAS1T

P1ltBRUP

DltDPR

Dlt9I1LD

DltTRASATI

LS1ltBRUP

LS1ltDATAS1T

The generated program consists of t$o parts 9 a generated part and the incude 2amp72G8 The

incude is provided in the standard system

The incude contains the definition of the reuired 2 tae and a further seven suroutines These

suroutines eecute the foo$ing functions

5pen and cose fie

5pen and cose session

Fi 2 tae

Fi session

The generated part is the main program and cas the reevant suroutines A structure is aso

generated in the generated part to read the eterna data into the fie

See the Appendi for more information on the 2amp72G8 program

copy SAP AG BC420 12-49

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 5088

020

983209 SAP AG 1999

Structure of D Table

PRBRAM DPR D1BI 9AM 9ALPRBRAMPRBRAM DPRDPR D1BID1BI 9AM9AM 9AL9AL

SAPM90ampD 0602

R90ampD=UR 600000

R90ampDU=RS 0006

R90ampD=T=D =UA

SAPM90ampD 0660

=A6AM16 Smith

=A6PSTL 87000

=A6LAD6 US

=A6SPRAS 1

SAPM90ampD 06amp0

=A6ST1B US6amp428357DDATA

PRBRAM

DPR

D1BI

9AM

9AL

EAR

UM

EAR

EAR

EAR

40

4

6

6amp

6amp

D Module pool

D Screen number

D Start of screen

D 9ield name

D 9ield contents

9ield ame T(pe Length Short Tet

AAP Dictionar(

The 2 tae has the same structure as in a standard transfer

copy SAP AG BC420 12-50

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 5188

026

983209 SAP AG 1999

Read Structure

Recording

DATA BEGIN OF record data element BUKRS bukr$amp data element KTOKD ktokd$amp data element NA(EG) name$+amp data element SORT ortl$ampEND OF record-

record

Automaticall( generated

from recording

The structure of the fie is automaticay generated and is a$ays defined $ith the name amp725amp

The generated structure a$ays has the same ayout 7ach fied is defined y t$o generated ro$s

The first ro$ is a$ays a comment ro$ containing the tet J data eement and the data eement of

the screen fied from the recording In the net ro$ the fied itsef is defined $ith the name of the

data eement foo$ed y a three9digit position numer $hich specifies the ocation in the structure

The ength of the fied is set y the ength of the data eement If a fied is not defined through a data

eement the system uses the ength of the screen fied

copy SAP AG BC420 12-51

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 5288

02amp

983209 SAP AG 1999

pening and losing the 9ile

P1ltDATAS1T

LS1ltDATAS1T

FOR( oendataet USING dataet-O)EN DATASET dataet IN TET (ODE-

IF S01SUBR2 34 - 5RITE 6 te7t1e S01SUBR2-STO)-

ENDIF-

ENDFOR(-

FOR( cloedataet USING dataet-2OSE DATASET dataet-

ENDFOR(-

Include

DR16

The suroutine 5P7N3ATAS7T opens the seuentia fie

The suroutine 2+5S73ATAS7T coses the seuentia fie

copy SAP AG BC420 12-52

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 5388

02

983209 SAP AG 1999

9unction Modules for I Program

lient

Session name

Eold date

=eep session

D user name

RecordK

LI1T

BRUP

ELDDAT1

=11P

US1R

R1RD

DltP1ltBRUPDltP1ltBRUP

Transaction code

D table

TD1

DPRTA

DltIS1RTDltIS1RT

DltLS1ltBRUPDltLS1ltBRUP

pen Isessionpen Isession

Insert data for

transactions

Insert data for

transactions

lose I

session

lose I

session

The foo$ing function modues are provided for creating atch input sessions (function group

S2)

235P7N3ltamp54P

2reates a ne$ session and contains genera data for the $hoe session

23INS7ampT

Inserts a the data for a transaction into the session The transferred interna tae $ith the

structure 2ATA must contain a the data reuired for fuy processing the transaction

232+5S73ltamp54P

2oses the session after a the data has een inserted As soon as the session has een cosed it

can e processed

The interna tae $ith the structure 2ATA can ony contain atch input data for one singe

transaction run So the individua transactions are inserted into the atch input session in a oop

using severa 23INS7ampT cas

copy SAP AG BC420 12-53

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 5488

024

983209 SAP AG 2001

9unction Module DltP1ltBRUP

ALL 9UTI DltP1ltBRUPALL 9UTI DltP1ltBRUP

1PRTIB

LI1T client

BRUP session name

ELDDAT1 loc+ date

=11P delete flag

US1R bdc user name

R1RD recording

IMPRTIB

NID internal session +e(

11PTIS

1PRTIB

LI1T client

BRUP session name

ELDDAT1 loc+ date

=11P delete flag

US1R bdc user name

R1RD recording

IMPRTIB NID internal session +e(

11PTIS

-ith the function modue 235P7N3ltamp54P you can open a atch input session

The foo$ing parameters are mandatory

2+I7NT (cient)

ltamp54P (session name)

4S7amp (user name)

Note The 4S7amp must a$ays e specified This user name is reuired for processing the session

in atch mode

The foo$ing parameters are optiona

=5+AT7 specifies the eariest date on $hich the session can e started677P fag specifies $hether session shoud e deeted after it has een successfuy processed The

677P fag is ignored if the session contains errors

677P E K K means deete the session after processing (defaut vaue) H

677P E KGK means do not deete session

amp725amp E KGK ao$s you to create a recording instead of a I session

If gtI is specified the function modue returns the interna session ey This is needed to e ae to

differentiate sessions that have the same name

-ith 7G27PTI5NS you get various return vaues that can e ueried $ith SC9S4amp2

Note In onine mode the onine user is used for the authoriDation checs regardess of the user

name specified

copy SAP AG BC420 12-54

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 5588

022

983209 SAP AG 1999

Subprogram P1ltBRUP

P1ltBRUP

FOR( oen8rou-IF e9on -

2A FUN2TION BD2O)ENGROU) E)ORTING 2IENT lt1mandt GROU) 8rou USER uer KEE) kee

=ODDATE gtolddate-

ENDIF-ENDFOR(-

Include

DR16

The suprogram 5P7N3ltamp54P opens the atch input session

copy SAP AG BC420 12-55

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 5688

028

983209 SAP AG 1999

9unction Module DltIS1RT

ALL 9UTI DltIS1RTALL 9UTI DltIS1RT

IMPRT

TD1 Transaction code

PSTltLAL Update locall(

PRITIB print list

TAL1S DPRTA bdclttable

11PTIS

IMPRT

TD1 Transaction code

PSTltLAL Update locall(

PRITIB print list

TAL1S DPRTA bdclttable

11PTIS

-ith the function modue 23INS7ampT you can add transaction data to the session

Cou need an interna 2 tae to transfer the data

The foo$ing parameters are mandatory

T257 Transaction code

CNPamp5TA 2 tae

The foo$ing parameters are optiona

P5ST3+52A+ E KGK activates oca updating This means that the data to e updated is ept in the

appication server and updated in the ast step of the transaction This does not invove the update

process (For more information see course 28 Programming ataase 4pdates)

PampINTINlt E KGK 9 ists processed in I $i e printed immediatey -ith 7G27PTI5NS you get various return vaues that can e ueried $ith SC9S4amp2

copy SAP AG BC420 12-56

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 5788

023

983209 SAP AG 1999

Subprogram DltTRASATI

DltTRASATI

FOR( BD2TRANSA2TION USING tcode-

IF e9on -2A FUN2TION BD2INSERT

E)ORTING T2ODE tcode TABES D0N)ROTAB bdcdata-

ESE-

ENDIF-ENDFOR(-

T

Include

DR16

The suprogram 23TampANSA2TI5N moves the fied 2 tae either to a atch input session

or uses ca transaction to import the data into the system 5n the seection screen you can specify

$hether you $ant to create a session or you $ant to use ca transaction to process the data directy

The S7SSI5N fied is then set according to your seection

copy SAP AG BC420 12-57

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 5888

025

983209 SAP AG 1999

9unction Module DltLS1ltBRUP

ALL 9UTI DltLS1ltBRUP

11PTIS

TltP1 6

NU1U1lt1RRR amp

-ith the function modue 232+5S73ltamp54P you can cose a atch input session

In 7G27PTI5NS you get various return vaues that can e ueried $ith SC9S4amp2

copy SAP AG BC420 12-58

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 5988

027

983209 SAP AG 1999

Subprogram LS1ltBRUP

FOR( cloe8rou-IF e9on -cloe batcgt 9nut 8rou

2A FUN2TION BD22OSEGROU)-

ESE-IF e8rouoened -

2A FUN2TION BD22OSEGROU)-

ENDIF-ENDIF-

ENDFOR(-

LS1ltBRUPlose session

lose error session

Include

DR16

The suprogram 2+5S73ltamp54P coses the atch input session The suprogram differentiates

et$een a norma I session (S7SSI5N E G) and a session opened $hen ca transaction

encountered an error (73ltamp54P35P7N7 E G)

copy SAP AG BC420 12-59

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 6088

080

983209 SAP AG 1999

Subprograms DltDPRG Dlt9I1LD

DltDPR

Dlt9I1LD

FOR( bdc9eld USING nam al-IF al 34 nodata-2EAR bdcdata- bdcdata1nam nam- bdcdata1al al- A))END bdcdata-ENDIF-

ENDFOR(-

FOR( bdcdltnro USING ro8ram dltnro- 2EAR bdcdata-Bdcdata1ro8ram ro8ram-Bdcdata1dltnro dltnro-Bdcdata1dltnbe89n - A))END bdcdata-ENDFOR(-

Include

DR16

The incude 2amp72GG contains t$o suprograms 23CNPamp5 and 23FI7+

Suprogram 23CNPamp5 fis the 2 tae $ith program names and screen numers

Suprogram 23FI7+ fis the 2 tae $ith fied names and vaues

7ach suprogram creates an entry in the 2 tae

copy SAP AG BC420 12-60

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 6188

086

983209 SAP AG 1999

9illing the D Table

erorm bdcdltnro u9n8 SA)(FD +- erorm bdc9eld u9n8 BD22URSOR RFD1BUKRS- erorm bdc9eld u9n8 BD2OK2ODE 6- erorm bdc9eld u9n8 RFD1BUKRS record1BUKRS- erorm bdc9eld u9n8 RFD1KTOKD record1KTOKD-

erorm bdcdltnro u9n8 SA)(FD -

erorm bdc9eld u9n8 BD22URSOR KNA1S)RAS- erorm bdc9eld u9n8 BD2OK2ODE 6- erorm bdc9eld u9n8 KNA1NA(E record1NA(E-

erorm bdc9eld u9n8 KNA1SORT record1SORT-

Recording Benerated automaticall(

from the recording

)ERFOR( bdcdltnro USING SA)(FD +- )ERFOR( bdc9eld USING BD22URSOR RFD1BUKRS-)ERFOR( bdc9eld USING BD2OK2ODE 6-)ERFOR( bdc9eld USING RFD1BUKRS record1BUKRS-)ERFOR( bdc9eld USING RFD1KTOKD record1KTOKD-

)ERFOR( bdcdltnro USING SA)(FD -

)ERFOR( bdc9eld USING BD22URSOR KNA1S)RAS-)ERFOR( bdc9eld USING BD2OK2ODE 6-)ERFOR( bdc9eld USING KNA1NA(E record1NA(E-

)ERFOR( bdc9eld USING KNA1SORT record1SORT- ---

The 2 tae is fied $ith data from the recording The suroutines 23CNPamp5 and

23FI7+ are used for this

The suroutines are caed in the reuired structure or seuence

copy SAP AG BC420 12-61

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 6288

08amp

983209 SAP AG 1999

erie)

SAPDatabase

SeJuential9ile

SAPDatabase

ALL TRASATIALL TRASATI

SeJuential9ile

ATE IPUTATE IPUT

D TableD TableD TableD Table

I Monitor

T

In contrast to atch input you can use ca transaction to directy pass data to the diaog interface

$ithout using a atch input session Cou use an interna tae (2 tae same structure and ayout

as atch input) to temporariy store your screen data Then you ca the desired transaction in your

program

Note 5n average the 2a Transaction method is 8 to times faster than using atch Input

copy SAP AG BC420 12-62

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 6388

08

983209 SAP AG 1999

all Transaction Program$ 1ample

RE)ORT abcbdcdcdeb9ct-

)ARA(ETERS d9mode DEFAUT A

udmode DEFAUT S-FOR( calltranact9on-2A TRANSA2TION FD

USING bdcdata (ODE d9mode

U)DATE udmode-

IF lt1ubrc NE - 5RITE 6 ---

ENDIF-ENDFOR(-

Screen

00

Screen

100

Screen

An additiona system ro area is added for the caed transaction The system uses this area for

processing the individua screens in the transactionH the data from the tae is added here After the

transaction is processed the second ro area is reeasedH the system continues processing in the first

ro area

Notes

In contrast to atch input there is no error ogging (error sessions) here For processing the caed

transaction the system uses the authoriDations of the user that caed the transaction The 2 tae

can ony hod data for one transaction run at a time efore another transaction is caed and its data

can e added you must eecute a amp7Famp7S= for the 2 tae

copy SAP AG BC420 12-63

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 6488

084

983209 SAP AG 1999

ALL TRASATI C6

RE)ORT 777-

2A TRANSA2TION FD USING bdcdata (ODE E-

Default for MD1 is A

2A TRANSA2TION 3tranact9oncode4 USING 3bdc1table4 C (ODE A E N C-

-ith the parameter 57 you can seect a specific dispay mode for processing the transaction The

foo$ing three modes are avaiae

A (ispay a)

If you eecute the program a the screens and a their data are dispayed This is the defaut vaue

for the 57 in 2A++ TampANSA2TI5N

N (ispay nothing)

The screens are not dispayed at a regardess of $hether any of them contained errors As soon as

the transaction has een fuy processed contro is returned to your program (The vaue of the

parameter 4PAT7 determines $hether dataase updates are eecuted or not)

7 (ispay errors ony)As soon as an error occurs in a screen the transaction is s$itched to dispay mode so that you can

correct the errors

These dispay modes are the same as those in the atch input session processing

copy SAP AG BC420 12-64

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 6588

082

983209 SAP AG 1999

RE)ORT 777-

2A TRANSA2TION FD USING BD2DATA U)DATE -

ALL TRASATI Camp

RE)ORT 777-

2A TRANSA2TION FD USING bdcdata U)DATE -

2A TRANSA2TION 3tranact9oncode4 USING 3bdc1table4 C (ODE A E N C U)DATE A S C -

Default for UPDAT1 is A

-ith the parameter 4PAT7 you can contro ho$ dataase updates arising from a transaction are

carried out There are three options

A (asynchronous updating) The caed transaction does not $ait unti the dataase has een

updated it simpy for$ard the updates to the SAP update service This usuay speeds up the 2T

program This processing mode is N5T recommended for arge data sets as the caed transaction

does not receive a competion message from the update modue

The caing 2T program therefore cannot te if the transaction has een successfuy competed Cou

shoud use the updating administration function (transaction S8) to determine $hether updating

$as terminated eary The error anaysis correction functions for are ess hepfu than $ith

synchronous updating

S (synchronous updating) -ith synchronous updating the caed transaction $aits unti a the

updates have een competed So processing is so$er than $ith synchronous updating The caed

transaction can ho$ever report any updating errors to the program $hich maes error

anaysiscorrection easier

+ (local updating) $ith oca updating the dataase is not updated in a separate process it is

updated in the caers process (see appication hep documentation for the AAP ey$ord S7T

4PAT7 TAS6 +52A+)

copy SAP AG BC420 12-65

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 6688

088

983209 SAP AG 1999

ALL TRASATI C

RE)ORT 777-DATA mtab T0)E TABE OF bdcm8coll-

2A TRANSA2TION FD USING bdcdata (ESSAGES INTO mtab-

2A TRANSA2TION 3tranact9oncode4 USING 3bdc1table4 C (ODE A E N C U)DATE A S C (ESSAGES INTO 3metab4 C -

7SSAlt7S specifies that a system messages that are output during the eecution of a 2A++

TampANSA2TI5N are $ritten to the interna tae L7SSTA The interna tae must have the

structure 2Slt25++

4nie the cassica atch input processing $ith sessions 2A++ TampANSA2TI5N does not offer any

specia processing procedures for transactions containing errors There are no restart functions for

transactions that contain errors or that cause updating terminations

copy SAP AG BC420 12-66

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 6788

083

983209 SAP AG 1999

ALL TRASATI C4

RE)ORT 777-DATA mltot T0)E ctuaram-

2A TRANSA2TION FD USING BD2DATA

O)TIONS FRO( mltot-

2A TRANSA2TION 3tranact9oncode4 USING 3bdc1table4 C (ODE A E N C U)DATE A S C (ESSAGES INTO 3metab4 C O)TIONS FRO( ot C -

RE)ORT 777-DATA mltot T0)E ctuaram-2A TRANSA2TION FD USING bdcdata

O)TIONS FRO( mltot-

The addition 5PTI5NS enaes the ca transaction statement to e controed through a structure

The structure must have the dictionary type 2T43PAampAS

The addition 5PTI5NS Famp5 must not e comined either $ith the addition 57 or $ith

4PAT7 ore information on the net side

copy SAP AG BC420 12-67

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 6888

085

983209 SAP AG 1999

Structure TUltPARAMS

DISMD1 Procen mode anaoo o addon amp

UPDMD1 $pdae mode anaoo o addon $PA

ATTMD1 CA mode CA conro

D19SI1 orce de=a EndoE e drn procen

RAMMIT +o eD a Camp amp(

IPT +o a ac np eonF a F S-B+P SPAC

I1D +o a ac np eon a=er end o= BC daa

The components are defined as foo$s

The components 7FSIM7 ampA25IT N5INPT and N5I7N can have the foo$ing

vaues KGK E Ces or K K E No

If the addition 5PTI5NS Famp5 is not specified the foo$ing settings appy to the contro

parameters

IS57 from addition 57

4P57 from addition 4PAT7

2ATT57 2ATT not active

7FSIM7 o not not use defaut $indo$s siDe

ampA25IT Successfu eit at 25IT -5amp6

N5INPT atch input session active (SC9INPT E G)

N5I7N atch input session sti active after end of 2 data

copy SAP AG BC420 12-68

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 6988

087

983209 SAP AG 1999

SMSBID Message ID

SMSBT Message T(pe C1GIGWGSGA

SMSB Message umber

SMSB6 Message ariable 6

SMSBamp Message ariable amp

SMSB Message ariable

SMSB4 Message ariable 4

SMSBID Message ID

SMSBT Message T(pe C1GIGWGSGA

SMSB Message umber

SMSB6 Message ariable 6

SMSBamp Message ariable amp

SMSB Message ariable

SMSB4 Message ariable 4

Return code$

S(stem fields$

alue Meaning

0 Successful

6000 1rror in transaction

6000 1rror in processing call transaction

see also the s(stem fields specified

alue Meaning

0 Successful

6000 1rror in transaction

6000 1rror in processing call transaction

see also the s(stem fields specified

9ield name Meaning9ield name9ield name MeaningMeaning

Return ode and S(stem 9ields

The return code is used to specify $hether the caed transaction $as processed successfuy In

addition severa system fieds are fied The numer I type and variaes of the diaog message

output y the caed transaction Cou need this information to output the message tet

copy SAP AG BC420 12-69

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 7088

030

983209 SAP AG 1999

Benerated Program of the TA Recorder

REFRES= (ESSTAB-

2A TRANSA2TION tcode USING bdcdata (ODE ctumode U)DATE cudate (ESSAGES INTO metab-OO) AT metab- ENDOO)-IF lubrc 34 AND e8rou 34 S)A2E- IF e8rouoenend - 2A FUN2TION BD2O)ENGROU) E)ORTING ---------

--------- E8rouoened - ENDIF- 2A FUN2TION BD2INSERT E)ORTING T2ODE tcode TABES D0N)ROTAB bdcdata-ENDIF-REFRES= bdcdata-

Message table output

pen error session

Insert data record that

has errors into error

session

If you have seected ca transaction on the seection screen the generated program runs as foo$s

The onine transaction is caed $ith ca transaction and passed to tae 2ATA A the

messages arising during the ca transaction are put in the interna tae 7SSTA

7SSTA is output as a ist

If you have specified an error session ( 73ltamp54P L SPA27) on the seection screen and the

ca transaction comes across an error (+3S4amp2 L 0) the error session is opened The error

session is ho$ever ony opened once Then the data record is paced in the session

A the other data records that have errors $ith ca transaction are paced in the same session

copy SAP AG BC420 12-70

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 7188

036

983209 SAP AG 1999

The Transaction Recorder

PrinciplesPrinciples

Recording )ith the LSMWRecording )ith the LSMW

Principles of atch Input and all TransactionPrinciples of atch Input and all Transaction

Integrating the TA Program into the DWIntegrating the TA Program into the DW

Using the TA Recorder Using the TA Recorder

copy SAP AG BC420 12-71

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 7288

03amp

983209 SAP AG 1999

Integrating into the DW

Transfer program

AAP Dictionar(

Integrate

SDA0

SDA6

SDAamp

SDA

Cou can integrate the generated program into the G9- The structure of the fie must e created

in the AAP ictionary The taes SGA0 SGA8 SGA1 and SGA $i e fied

copy SAP AG BC420 12-72

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 7388

03

983209 SAP AG 1999

DW Release 42

Goo

-B eeae 45

aa ran=er ogtec

Int customer data transfer ob-ect

ecord =ed

Dece daa ran=er

d Goo

The ampunction ampor interatin TA recorder prora$s is

i$ple$ented in the

D+-B in Release

The recorder can e integrated as of ampeease and it is provided in the G9- ampeease

ltot to the G9- ampeease 5n the initia screen you can integrate programs y choosing ampoto

( +nt customer ata transfer o-ect

copy SAP AG BC420 12-73

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 7488

034

983209 SAP AG 1999

reating Program as D b-ect

Comer ran=er ogtec

ampgtec ype

Sor eD =or ogtec

aa ran=er proram

Srcre name

9900

(+A1

Cane comer

ZBCA+G

ZB

ustomer transfer ob-ect

umber bet)een 7000 and 7777

b-ect t(pe

Assignment to R ob-ect

Short tet for D ob-ectShort description

Data transfer program

ame of generated program

Structure name

A structure Cstructure la(out )ith this name is created in

the AAP Dictionar(

For ampeease transfer oects $ere not organiDed y 5amp oects ut y a G numer (00089

OOOO) The numer range O0009OOOO is reserved for customers

To create a connection to the ne$ G 9- you must assign the program to a 5amp oect

2reate a short tet for the G oect This tet $i appear in the method seection ist

Specify the program to e incuded

Specify a name for the structure to e created in the AAP ictionary

Note $he generated program appears under program type +N and not under program type

-

copy SAP AG BC420 12-74

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 7588

032

983209 SAP AG 1999

Adantages

Automatic program registration in the DW in

Release 48

ou can use all the functions defined for

standard ob-ects

1ception$ The (reate ampile ith data

function

If you incuded the oect in the ampeease $orench it is automaticay avaiae in the ampeease

B $orench

A the $orench functions are avaiae for your oect ecept for Create files ith transfer ata

copy SAP AG BC420 12-75

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 7688

038

983209 SAP AG 1999

ou are no) able to$

The Transaction Recorder$ Unit Summar(

Use the recording function in the LSMW to create

a batch input session )ith the data from the

eternal s(stem

Use the TA Recorder to create (our o)n data

transfer program

Anal(e programs that )or+ )ith batch input or

call transaction

Integrate the TA Recorder programs into the

DW

copy SAP AG BC420 12-76

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 7788

ercise 1

nit $ -ecorder

$opic 2reating etors

$ransaction -ecorder ercise 1

bull 2reating detors $ith eterna numer assignment

bull etor numers M9980008 to M9980080

Address data for detors $ith eterna numer assignment is to

e transferred using program ampFI700

ro4ect F5

Supro4ect +5

-un +575

$as)s 85 95 8S25

9oad program -F+00

8 In the foo$ing eercises eisting data is to e changed Therefore these detors $ith

eterna numer assignment have to first e created

898 4nder suproect 79 create run 797G9 $ith the name Detors ith

eternal numers

copy SAP AG BC420 12-77

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 7888

891 2reate the foo$ing three tass The tass map the foo$ing process steps

convert data create + session and process + session

89198 In run 797G9 create the foo$ing tas

9 Tas AP9

9 Name 2onvert data 9 Tas type AP

9 Program type +S-

Seect the foo$ing +S- oect

+S- proect 2109

+S- suproect 7I9

+S- oect I997GT

89191 In run 797G9 create the foo$ing tas 9 Tas +5A9

9 Name 2reate I session

Tas type +5A

9 Program type INP

Seect program ampFI700 $ith the variant

I97G9

8919 In run 797G9 create the foo$ing tas

9 Tas S29

9 Name Process I session Tas type S2

9 Program type amp7P5

Seect program ampS2S4 $ith the variant

S497G9

Note that you have to correct the seuence of the tass 2onvert data

create + session and process + session

4se the uttons

89 Start the run

The detors $i e created $ith eterna numer assignments

89 2hec in transaction F0 that the detors M9980008 to M9980080 have een

created

copy SAP AG BC420 12-78

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 7988

ercise

nit $ransaction -ecorder

$opic -ecording function in the 9S8(

bull 2reate a recording using the +S-

bull ltenerate a atch input session

2hange the detor address data in the amp System

Name of the recording +

Name of the file +2055+F9

8 2reate the recording 7I3 using the +S- ampecord the transaction F01 (2hange

detor)

898 efore you create the recording first test the transaction onineQ

For the recording use detor M9980008 5n the initia screen of the F01

maintain the foo$ing fieds ony

etor etor M9980008

2ompany code 0008

Address data seect

Note $he data record must e saved hile recording

891 aintain the names and the descriptions for the foo$ing fieds

Name city street posta code and teephone numereete a other fieds in screen 880 from the recording (eg S5ampT+ +AN8

SPampAS)

4se the same technica names as sho$n in the tae eo$ (automatic fied

mapping)

copy SAP AG BC420 12-79

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 8088

1 2reate the suproect 7I9 and the ne$ oect TA3 in your proect 2109

aintain the oect attriutes and seect the item atch input recording Seect your

recording 7I3

2reate the source structure address

2reate the source fieds according to the tae eo$ 5r copy them from proect 2109S37N suproect 7I900 oect TA900

198 Fie setup The data from the egacy system are dispayed in the foo$ing tae

Fied name Fied type Fied ength escription

N5 2 8B etor numer

NA7 2 Name

STamp77T 2 Street

2ITC 2 2ityPace of residence

MIP 2 80 Posta code

T7+ 2 8B Teephone numer

191 aintain the fied mapping 4se the automatic fied mapping (via menu item

7tras)

19 Specify the fies 5ny maintain the fie name of the source fie

Name of the fie 21099IFI+7

2odepage 8800

19 Import the data and convert them ispay the data in each caseQ

19 2reate a atch input session

19B ampun the atch input session

copy SAP AG BC420 12-80

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 8188

ercise 3

nit $ransaction -ecorder

$opic -ecording ith the $ -ecorder

bull ltenerate a recording using the TA recorder

bull Test the recording

2hange the address data of detors in the amp system

Name recording $+

Name of the file +2055+F9

8 2reate the recording TA37I3 using the transaction recorder ampecord the

transaction F01 (change detor)

898 4se detor M9980008 for the recording 5n the F01 initia screen ony

maintain the foo$ing fieds

etor etor M9980008

2ompany 2ode 0008

Address data seect

Note $he data record must e saved hen recording

eete a fieds that do not eist in the source fie 21099IFI+7 from screen

880 in the recording (eg 6NA89S5ampT+ 6NA89+AN8 6ANNQ9SPampAS) Note o not deete fieds ampF01946ampS and ampF0190880

Save the recording no$

1 S$itch to the recordings overvie$

198 Process the recording $ith the processing mode A (dispay a)

191 Process the recording $ith the processing mode RN (no dispay)

19 If the recording has een tested and no error has occurred generate a I session

and run it using the I monitor If an error shoud occur generate the recordingagainQ

copy SAP AG BC420 12-81

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 8288

From the recording generate the program M21037I3 in your deveopment cass

2109 Seect the foo$ing

bull ampead fied contents from fie

bull 2reate test data in the fie 2103dei3test3tt

98 Save this program and eecute it ltenerate one I session each and process it

2arry out the same steps again using the ca transaction

The generated program shoud no$ e changed so that fie 21099IFI+7 can e

read and processed

98 2hange the defaut vaue of the fie name (parameter dataset) in 21099

IFI+7

91 2hange the structure definition eete the company code fied and the address

data checo from the structure

9 2hange the su9routine ca perform dc3fied for the company code (KampF019

46ampSK) so that the vaue 0008 is transferred

9 2hange the su9routine ca perform dc3fied for the address data checo

(KampF0190880K) so that the vaue G is transferred

9 Start the program again and read the data from the fie 21099IFI+7 $ith

detor data ltenerate a I session $ith it and run it

copy SAP AG BC420 12-82

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 8388

033 Include DR16INCLUDE BDCRECX1

SELECTION-SCREEN BEGIN OF LINE

PARAMETERS SESSION RADIOBUTTON GROUP CTU create sessi SELECTION-SCREEN COMMENT $amp TEXT-S FOR FIELD SESSION

se(ecti-scree )siti +

PARAMETERS CTU RADIOBUTTON GROUP CTU ca(( trasacti

SELECTION-SCREEN COMMENT $amp TEXT-S FOR FIELD CTU

SELECTION-SCREEN END OF LINE

SELECTION-SCREEN BEGIN OF LINE

SELECTION-SCREEN COMMENT $amp TEXT-S1 FOR FIELD GROUP

se(ecti-scree )siti $+

PARAMETERS GROUP1$amp r) ae 0 sessi

SELECTION-SCREEN COMMENT $amp TEXT-S+ FOR FIELD CTUMODE

se(ecti-scree )siti

PARAMETERS CTUMODE LIE CTU2PARAMS-DISMODE DEFAULT 3N3

A4 s56 a(( 78)rs

E4 s56 78)r errr (8

N4 7 t 7is)(a8 78)r

SELECTION-SCREEN END OF LINE

SELECTION-SCREEN BEGIN OF LINE

SELECTION-SCREEN COMMENT $amp TEXT-S$ FOR FIELD USER

se(ecti-scree )siti $+

PARAMETERS4 USER1$amp DEFAULT S9-UNAME ser 0r sessi i atc5

SELECTION-SCREEN COMMENT $amp TEXT-S FOR FIELD CUPDATE

se(ecti-scree )siti

PARAMETERS CUPDATE LIE CTU2PARAMS-UPDMODE DEFAULT 3L3

S4 s8c5rs(8

A4 as8c5rs(8

L4 (ca(

SELECTION-SCREEN END OF LINE

SELECTION-SCREEN BEGIN OF LINE

SELECTION-SCREEN COMMENT $amp TEXT-S FOR FIELD EEP

se(ecti-scree )siti $+

PARAMETERS4 EEP AS CltECBOX 3 3 = 7e(ete sessi i0 0iis5e7

3X3 = gtee) sessi i0 0iis5e7

SELECTION-SCREEN COMMENT $amp TEXT-S FOR FIELD E2GROUP

copy SAP AG BC420 12-83

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 8488

se(ecti-scree )siti

)araeters E2GROUP1$amp r) ae 0 errr-sessi

SELECTION-SCREEN END OF LINE

SELECTION-SCREEN BEGIN OF LINE

SELECTION-SCREEN COMMENT $amp TEXT-S FOR FIELD ltOLDDATE

se(ecti-scree )siti $+

PARAMETERS4 ltOLDDATE LIE S9-DATUM

SELECTION-SCREEN COMMENT +11amp TEXT-S$ FOR FIELD E2USER

se(ecti-scree )siti

PARAMETERS4 E2USER1$amp DEFAULT S9-UNAME ser 0r errr-sessi

SELECTION-SCREEN END OF LINE

SELECTION-SCREEN BEGIN OF LINE

SELECTION-SCREEN COMMENT +11amp TEXT-S FOR FIELD E2EEP

se(ecti-scree )siti

PARAMETERS4 E2EEP AS CltECBOX 3 3 = 7e(ete sessi i0 0iis5e7

3X3 = gtee) sessi i0 0iis5e7

SELECTION-SCREEN END OF LINE

SELECTION-SCREEN BEGIN OF LINE

SELECTION-SCREEN COMMENT +11amp TEXT-S FOR FIELD E2ltDATE

se(ecti-scree )siti

PARAMETERS4 E2ltDATE LIE S9-DATUM

SELECTION-SCREEN END OF LINE

SELECTION-SCREEN SIP

SELECTION-SCREEN BEGIN OF LINE

SELECTION-SCREEN COMMENT 1amp TEXT-S1 FOR FIELD NODATA

PARAMETERS4 NODATA DEFAULT 33 LOER CASE 7ata

SELECTION-SCREEN END OF LINE

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

Batc5i)t7ata 0 si(e trasacti

DATA4 BDCDATA LIE BDCDATA OCCURS ITlt ltEADER LINE

essaes 0 ca(( trasacti

DATA4 MESSTAB LIE BDCMSGCOLL OCCURS ITlt ltEADER LINE

errr sessi )ee7 3 3 r 3X3amp

DATA4 E2GROUP2OPENED

essae tets

TABLES4 T1

copy SAP AG BC420 12-84

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 8588

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

at se(ecti scree

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

AT SELECTION-SCREEN

r) a7 ser st e 0i((e7 0r create sessi

IF SESSION = 3X3 AND

GROUP = SPACE OR USER = SPACE

MESSAGE E1MSamp

ENDIF

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

)e 7ataset

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

FORM OPEN2DATASET USING P2DATASET

OPEN DATASET P2DATASET IN TEXT MODE

IF S9-SUBRC

RITE4 TEXT-E S9-SUBRC

STOP

ENDIF

ENDFORM

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

c(se 7ataset

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

FORM CLOSE2DATASET USING P2DATASET

CLOSE DATASET P2DATASET

ENDFORM

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

create atc5i)t sessi

t 0r ca(( trasacti siamp

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

FORM OPEN2GROUP

IF SESSION = 3X3

SIP

RITE4 $amp 3Create r)3I1amp GROUP

SIP

)e atc5i)t r)

CALL FUNCTION 3BDC2OPEN2GROUP3

EXPORTING CLIENT = S9-MANDT

copy SAP AG BC420 12-85

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 8688

GROUP = GROUP

USER = USER

EEP = EEP

ltOLDDATE = ltOLDDATE

RITE4 amp 3BDC2OPEN2GROUP3I$amp

1$amp 3retrc7e43I+amp

S9-SUBRC

ENDIF

ENDFORM

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

e7 atc5i)t sessi

ca(( trasacti si4 errr sessiamp

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

FORM CLOSE2GROUP

IF SESSION = 3X3

c(se atc5i)t r)

CALL FUNCTION 3BDC2CLOSE2GROUP3

RITE4 amp 3BDC2CLOSE2GROUP3Iamp

1$amp 3retrc7e43I+amp

S9-SUBRC

ELSE

IF E2GROUP2OPENED = 3X3

CALL FUNCTION 3BDC2CLOSE2GROUP3

RITE4

RITE4 amp 3Fe5(era))e 6r7e eret3Iamp

ENDIF

ENDIF

ENDFORM

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

Start e6 trasacti accr7i t )araeters

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

FORM BDC2TRANSACTION USING TCODE

DATA4 L2MSTRINGamp

DATA4 L2SUBRC LIE S9-SUBRC

atc5 i)t sessi

IF SESSION = 3X3

CALL FUNCTION 3BDC2INSERT3

EXPORTING TCODE = TCODE

TABLES D9NPROTAB = BDCDATA

RITE4 3BDC2INSERT3Iamp

copy SAP AG BC420 12-86

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 8788

TCODE

3retrc7e43I+amp

S9-SUBRC

3RECORD43

S9-INDEX

ca(( trasacti si

ELSE

REFRESlt MESSTAB

CALL TRANSACTION TCODE USING BDCDATA

MODE CTUMODE

UPDATE CUPDATE

MESSAGES INTO MESSTAB

L2SUBRC = S9-SUBRC

RITE4 3CALL2TRANSACTION3

TCODE

3retrc7e43I+amp

L2SUBRC

3RECORD43

S9-INDEX

LOOP AT MESSTAB

SELECT SINGLE FROM T1 ltERE SPRSL = MESSTAB-MSGSPRA

AND ARBGB = MESSTAB-MSGID

AND MSGNR = MESSTAB-MSGNR

IF S9-SUBRC =

L2MSTRING = T1-TEXT

IF L2MSTRING CS 313

REPLACE 313 ITlt MESSTAB-MSGH1 INTO L2MSTRING

REPLACE 3$3 ITlt MESSTAB-MSGH$ INTO L2MSTRING

REPLACE 33 ITlt MESSTAB-MSGH INTO L2MSTRING

REPLACE 33 ITlt MESSTAB-MSGH INTO L2MSTRING

ELSE

REPLACE 33 ITlt MESSTAB-MSGH1 INTO L2MSTRING

REPLACE 33 ITlt MESSTAB-MSGH$ INTO L2MSTRING

REPLACE 33 ITlt MESSTAB-MSGH INTO L2MSTRING

REPLACE 33 ITlt MESSTAB-MSGH INTO L2MSTRING

ENDIF

CONDENSE L2MSTRING

RITE4 MESSTAB-MSGT9P L2MSTRING$+amp

ELSE

RITE4 MESSTAB

ENDIF

ENDLOOP

copy SAP AG BC420 12-87

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 8888

SIP

Eree 0e5(era))e

IF L2SUBRC AND E2GROUP SPACE

IF E2GROUP2OPENED = 3 3

CALL FUNCTION 3BDC2OPEN2GROUP3

EXPORTING CLIENT = S9-MANDT

GROUP = E2GROUP

USER = E2USER

EEP = E2EEP

ltOLDDATE = E2ltDATE

E2GROUP2OPENED = 3X3

ENDIF

CALL FUNCTION 3BDC2INSERT3

EXPORTING TCODE = TCODE

TABLES D9NPROTAB = BDCDATA

ENDIF

ENDIF

REFRESlt BDCDATA

ENDFORM

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

Start e6 scree

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

FORM BDC2D9NPRO USING PROGRAM D9NPRO

CLEAR BDCDATA

BDCDATA-PROGRAM = PROGRAM

BDCDATA-D9NPRO = D9NPRO

BDCDATA-D9NBEGIN = 3X3

APPEND BDCDATA

ENDFORM

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

Isert 0ie(7

Page 14: BC420_46C - 012The Transaction Recorder

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 1488

064

983209 SAP AG 2001

Tabstrips

$er Roberts

1ample$ User Profile Defaults

Sar men +

oon anae

ampp dece Pr1

ParameerDefaults

DltSUSR

USD19AULTSSPLD

The tastrip eement sho$n is used on the aintain User rofile (5$n data) screen

4nder the tastrip tite Defaults the user can set various vaues such as the defaut printer

The user profie are user9dependent settings (as the name impies)

copy SAP AG BC420 12-14

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 1588

062

983209 SAP AG 1999

Step Loops and Table ontrols

1ample$ an+ Details

Comer

ntr( an+ +e( Account

08154711

123456789

Z-00-12345

an+ Details

00708155546344536

Banlt daa

==A=C06)

==A=C0amp)

Step oops and tae contros are treated identicay for the recording

The fied names of the fieds isted are the same for every ro$

7ach ro$ contains a customers an detais The fieds must e accessed using an inde (this is

specified as an addition to the fied name for eampe 6N69AN6N(1) The inde must match

the ro$ numer

5ny the visie fieds on a screen can e fied $ith data If some fieds are ony visie after paging

the paging must e recorded as $e This means that for the recording you must eecute a the steps

in the onine transaction

For eampe age on $oud e eecuted using the function code 1 (Paging icons)

Paging to the end of a ist 1Page up 11

lto to first page 18

copy SAP AG BC420 12-15

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 1688

068

983209 SAP AG 2001

Recording Buidelines

Test the transaction before recording

Start the recording

hange field alues onl( for fields

releant to the recording

As of 48 all filled fields are recorded

Transaction must be properl( eitedCSA1

Use of scroll bars cannot be recorded

Specia recording notes

F8 F and your o$n F8 and F hep (Pamp527SS 5N =7+P9amp7gt47ST Pamp527SS 5N A+479

amp7gt47ST) are not recorded This aso appies to a commands under the System and $el

menus aues for defaut variants ( transaction variants) are not incuded

7rror and $arning diaogs are not recorded 5ny the 56 code and the fied contents reuired for

further processing on the current screen are recorded

Note uring recording the data entered is $ritten to the dataase

copy SAP AG BC420 12-16

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 1788

063

983209 SAP AG 2001

1n-o( SAP ontrols and Data Transfer

bull SAP Picture ontrolbull SAP ETML ie)er ontrol

bull SAP Tet 1dit ontrol

bull AL Brid ontrol

bull SAP Tree ontrol

bull

ranch 6

ranch amp

Root

These and other controls do not support batch input$

Root

ranch amp

ranch amp6

The ne$ 7noy SAP contros deveoped for ampeease B do not support atch input or ca

transaction

=o$ever tae contros and tastrips do support atch input

copy SAP AG BC420 12-17

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 1888

065

983209 SAP AG 1999

The Transaction Recorder

PrinciplesPrinciples

Recording )ith the LSMWRecording )ith the LSMW

Principles of atch Input and all TransactionPrinciples of atch Input and all Transaction

Integrating the TA Program into the DWIntegrating the TA Program into the DW

Using the TA Recorder Using the TA Recorder

copy SAP AG BC420 12-18

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 1988

067

983209 SAP AG 1999

Session

generator

Recording Using the LSMW

-ith the +S- you can create your o$n recordings

The +S- uses the standard TA recorder here yet evauates the recording itsef The information

from the recording is used to create atch input sessions

The created atch input session can e processed as usua $ith the atch input monitor

Note As $ith the standard procedure it is euay important that the data is converted

copy SAP AG BC420 12-19

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 2088

0amp0

983209 SAP AG 1999

reating Recording

Admnraon

ecordn

Goo

ame of recording

Description

)ner

ame of transaction

Start recording

lto into the +S- and seect the menu path ampoto (Recorings An overvie$ of a previousy

created recordings for your proect are dispayed To start a ne$ recording seect Create

To create a recording you must define the name the description and the o$ner

7nter the name of the transaction you $ant to record

7ecute the transaction and compete it propery

Note ampecordings are assigned to ony one proect 9 so the name of the recording must e uniue

copy SAP AG BC420 12-20

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 2188

0amp6

983209 SAP AG 1999

hanging ustomer Data$ Initial Screen

9ield ontents

BCC$Samp $SZAV

BCamp(Camp )00

02-($++ -88-10000

02-0110

02-0130

$SZAV

9ield ame

Comer

Company code

Z-88-10000

Genera daa

Comer Z-88-10000

+ame

9ield ontents

BCamp(Camp $PA

BCS$BSC SAPSZA1 0300ASS

BCS$BSC SAPSZA1 0301Camp$

BCC$Samp SZA10100-+$B

A1AA-S Garden Sree

A1AA-amp$S+$1 34

A1AA-PampSCamp1 02105

9ield ame

Screen

111

Screen

106

In the aove eampe the transaction Change customer F01 is recorded

Note

You must ma)e some modification to the field values for all the fields you ant to capture

for the data transfer For the purposes of recording a change can simply mean overriting

one single character in a field ith the same character

ven if fields are to e filled using S$amp$ parameters the values must still e changed on

the screen in order to capture them

(ith online transactions screen sequences may appear that are different than in the

recording

copy SAP AG BC420 12-21

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 2288

0ampamp

983209 SAP AG 1999

Results

RecordingRecording R1lt6 Demolt6

9D0amp hange customer Caccounting

SAPM90ampD 0608

DltURSR R90ampD=UR

Dlt=D1 gt00

R90ampD=UR 5560000

R90ampDD0660

US1ltA

SAPM90ampD 0666

Dlt=D1 UPDA

DltSUSR SAPLSA6

DltSUSR SAPLSA6

DltURSR SA6ltD0600T1LltUM1

ADDR6ltDATASTR11T 4 Barden Street

ADDR6ltDATAPSTltD1 0amp602

ADDR6ltDATAIT6 oston

SA6ltD0600T1LltUM1 8638257755

The resuts of the recording using the +S- are dispayed in a tree structure

After the recording has finished you can edit it Cou can deete fieds or add ne$ ones

copy SAP AG BC420 12-22

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 2388

0amp

983209 SAP AG 1999

Assigning 9ield ames

Recording R16 Demolt6

Dlt=D1 UPDA

DltSUSR SAPLSA6

DltSUSR SAPLSA6

DltURSR SA6ltD0600T1L

ADDR6ltDATAAM16 Lisa Eofmeister

ADDR6ltDATAPSTltD1 0amp602

ADDR6ltDATAIT6 oston

ame

+ame

ecrpon

e=a ae

A1AA-+A1

A1AA-+A1

Comer name

a o=meer

Screen =ed

ustomer name

double clic+

Cou can assign names for each recorded fied The specia fieds (2356257 2324ampS5amp

and 23S4S2amp77N) are not incuded here Cou can choose the fied names -hen the atch

input session is created the contents of these fieds are assigned to the target fieds specified in the

eft coumn

Functions

efaut Assigns to the fied names of the underying target fied and its fied description

ampeset eetes fied name and fied description

oue cic 7dits fied name fied description and defaut vaue

Note Cou can use fied names more than once =o$ever the fied name is ony avaiae once in thefied mapping For this reason it is not practica to use fied names more than once

For a those fieds for $hich you do not assign a name the defaut vaue is used $hen the atch

input session is created These defaut vaues can e seen as constants This is especiay usefu for

chec oes (for eampe 08 vie$ seection)

The +S- supports automatic fied mapping Source fieds and target fieds can e assigned to each

other automaticay The fieds are assigned to the corresponding fieds of the same name Therefore

the fied names of the source structure shoud e given the same or simiar names as the fied names

in the target structure

copy SAP AG BC420 12-23

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 2488

0amp4

983209 SAP AG 2001

Addinggtremoing screen fields

Repeating recording

9or identical field names the name and description are

assigned automaticall(

1diting Recording

02-($++

(+A1-A+

(+A1-+A1

(+A1-Samp

(+A1-+A2

(+A1-SAS

Comer accon nmer

e

+ame 1

Sor =ed

+ame 2

Sree

Selection of all

aailable screen

fields

Cou can ater add ne$ screen fieds if you need to 6eep in mind that fieds shoud ony e added in

paces $here they are aso provided on the screen other$ise you $i get an error $hen the I

session is processed

After saving you $i get the message The data has een saved successfuy No$ the recordings

are avaiae for the oect attriutes

If you repeat the recording you can record a ne$ screen seuence $ith ne$ fieds Provided that the

fied names (eg 6NA89NA78) are identica the names and descriptions are automaticay

assigned

copy SAP AG BC420 12-24

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 2588

0amp2

983209 SAP AG 1999

b-ect T(pe and Import Method$ Recording

Standard atch Input gt Direct Input

atch Input Recording

API

IDoc

ampgtec ype ) mpor meod

Bac np recordn

ecordn ec1

The recording is no$ avaiae $ith the oect attriutes

Net you create a proect or su9proect in the +S- and specify process the data transfer

Cou eecute the data transfer as in the standard system

efine the source fieds and structures

efine the fied mapping

ampead and convert the data

2reate and import a atch input session

copy SAP AG BC420 12-25

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 2688

0amp8

983209 SAP AG 1999

The Transaction Recorder

PrinciplesPrinciples

Recording )ith the LSMWRecording )ith the LSMW

Principles of atch Input and all TransactionPrinciples of atch Input and all Transaction

Integrating the TA Program into the DWIntegrating the TA Program into the DW

Using the TA Recorder Using the TA Recorder

copy SAP AG BC420 12-26

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 2788

0amp3

983209 SAP AG 1999

Transaction Recorder

Online

Transaction

RecordingTransfer Program

T

Included in the Batch Input Monitor

Cou use the transaction recorder to record transactions and then use the transaction recording to

generate a transfer program The program ao$s you to transfer data using either atch input or ca

transaction

copy SAP AG BC420 12-27

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 2888

0amp5

983209 SAP AG 1999

hanging ustomer Data$ Initial Screen

9ield ontents

BCC$Samp $SZAV

BCamp(Camp )00

02-($++ Z-88-10000

02-0110

02-0130

$SZAV

9ield ame

Comer

Company code

Z-88-10000

Genera daa

Comer Z-88-10000

+ame

9ield ontents

BCamp(Camp $PA

BCS$BSC SAPSZA1 0300ASS

BCS$BSC SAPSZA1 0301Camp$

BCC$Samp SZA10100-+$B

A1AA-S Garden Sree

A1AA-amp$S+$1 34

A1AA-PampSCamp1 02105

9ield ame

Screen

111

Screen

106

In the aove eampe the transaction Change customer F01 is recorded

copy SAP AG BC420 12-28

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 2988

0amp7

983209 SAP AG 2001

hange Debitor$ Pa(ment Transactions C6

Banlt dea

Screen

10

9ield ontent

BCC$Samp (+B(-BA+(+01

BCamp(Camp BA+((+B(-BA+(S01

(+B(-BA+(01 12345679

(+B(-BA+(+01 22222222

Debitor 5560000

9ield ame

Inde

copy SAP AG BC420 12-29

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 3088

00

983209 SAP AG 1999

hanging ustomer Data$ Pa(ment Transactions Camp

Addre

an+ countr( US

an+ code 6amp42837

Banlt dea

ustomer 5560000

9ield ontents9ield ame

BCC$Samp (+A1-(+ZA

BCamp(Camp $PA

(+B(-Z01

Screen

10

Screen

100

SAPLBA

9ield ontents

BCC$Samp B+(A-BA+(A

BCamp(Camp +

B+(A-BA+(A +aona Banlt

9ield ame

In different transactions the modue poo may change This is the case $ith for eampe customer

master data The TA recorder records modue poo changes automaticay

copy SAP AG BC420 12-30

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 3188

06

983209 SAP AG 1999

Eierarch( Displa( of the Recording

02amp

02

SAP02 0106

BCC$Samp 02-0130

BCamp(Camp )00

02-($++ -88-10000

02-0110

02-0130

SAP02 0111

BCamp(Camp V

BCC$Samp A1AA-amp$S+$1

A1AA-S Garden Sree

Recording

-ith the TA recorder the resuts are aso a ist in a hierarchy dispay =o$ever you cannot assign

your o$n fied names as you can in the +S-

copy SAP AG BC420 12-31

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 3288

0amp

983209 SAP AG 1999

Recording erie)

Recording

Transfer program

9unction module

ontains onl( the data

from the recording

Test data

Test

reate

reate

reate

reate

1dit hange recording

Process recording

Cou can edit the recording as needed

The recording can e tested and eecuted again The screens are run through in the same $ay as in

the recording

The recording can then e used to create

atch input sessions

Test data

ata transfer programs $ith atch input or ca transaction

Function modues

copy SAP AG BC420 12-32

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 3388

0

983209 SAP AG 1999

1 02 BS

2 SAP02 106

3 BCC$Samp $SZAV

4 BCamp(Camp )00 5 02-($++ -88-10000

6 02-0110

7 02-0130

8 $SZAV

9 SAP02 111

10 BCamp(Camp V

11 BCC$Samp A1AA-amp$S+$1

12 A1AA-S Garden Sree

Program Screen St 9ield ame 9ield alue

Recording 1ditor

Recording

Add gt delete lines 9ormat chec+

Import gt eport of recording

In the editor you can add or deete ines Cou can aso change the contents of individua ines

-ith the function Chec) you can specify $hether the edited version of the recording sti has the

correct synta

Cou can aso eport import recordings to from a seuentia fie

After editing save the recording changes

copy SAP AG BC420 12-33

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 3488

04

983209 SAP AG 1999

Recording Seeral Transaction Runs

RecordingF

Directl( after the first recordingG or

In the displa( mode of the recording

In this step you can record additiona transactions and add additiona transaction runs to the

recording

Cou can record the additiona transactions directy after a recording or in the edit screen of a

recording

copy SAP AG BC420 12-34

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 3588

02

983209 SAP AG 1999

1ditor$ Importing and 1porting Recordings

6 T 9D0amp S

amp SAPM90ampD 608

DltURSR

4

2

8 SAPM90ampD 666

60

66

Program Screen St 9ield name 9ield alue

cempA

e name

aa =orma

cemp

A

e name

aa =orma

1port

Import

Presentation Serer

If the editor functions in the systems do not provide a the functions you need you can do$noad the

recording to your presentation server using the Eort function and then edit the recording using a

P2 editor

Cou use the Import function to import the data ac into the amp System ae sure the fie is sti in

the correct format

copy SAP AG BC420 12-35

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 3688

08

983209 SAP AG 1999

Processing the Recording

Recording

Process )ith ALL TRASATI

Parameer

Proce mode$pdae mode

CA mode

e=a e

Con a=er comm

+o a B eon

nd +o a B mode

A

A

T

The recording can e eecuted directy The data from the recording is used and the transaction is

processed $ith ca transaction

2a transaction provides a range of options for caing appication transactions $hich are discussed

on the foo$ing t$o pages

copy SAP AG BC420 12-36

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 3788

03

983209 SAP AG 1999

Process mode

Update mode

ATT mode

Processing Recording )ith T 6

A

1

Displa( all screens

Displa( errors onl(

o displa(

L

S

A

Local

S(nchronous

As(nchronous

A

o ATT

ATT )ithout indiidual screen control

ATT )ith indiidual screen control

Processing mode

=ere you can specify the processing mode 9 it is the same as the processing mode for atch input

4pdate mode

=ere you can specify the update mode For more information see the unit ca transaction

2ATT mode

=ere you can mae specia settings if you $ant to test the recording under 2ATT conditions (ony

necessary for 2ATT runs) Specia functions are caed in the 2ATT too for each screen at the end of

P5 and at the start of PAI

copy SAP AG BC420 12-37

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 3888

05

983209 SAP AG 1999

Default sie

ont after commit

ot a I session

1nd$ ot a I mode

Processing Recording )ith T amp

The screen standard sie is used for the

processing

ommit )or+ does not end the processing

o I mode is actie The transaction )ill run

through as in online

I mode is selected nce the data in the D

table is processedG the I mode is set to inactie

Standard siDe

If you seect this the screens are processed in the standard siDe in the foreground (in foreground or

dispay errors ony) Note the standard siDe is a$ays used for acground processing

Further after commit

The first commit $or in a transaction does not ead to the end of the recording

Note A atch input transaction is ended $ith the first commit $or

No I mode

The system fied SC9INPT is not set (SC9INPT E ) So transactions are run through as in onine

7nd No I mode

5ny use if you choose the processing mode 7 (dispay errors ony) Then the transaction is processed in the acground in atch input mode and if there is an error the screens run through in

the foreground

copy SAP AG BC420 12-38

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 3988

07

983209 SAP AG 1999

I Mode

atch input

mode

nline

Some transactions behae differentl( in batch input mode

than in online Cbatch input capabilit(

atch input mode sets the s(stem field SIPT H

Not every transaction can run the same onine and in atch input mode The transaction must decide

itsef $hether it is caed onine or in atch input mode

The system sets the system fied SC9INPT E G if the atch input mode is active (this aso appies

to ca transaction) From this system fied the transaction can identify $hether to run onine or in

atch input mode

copy SAP AG BC420 12-39

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 4088

040

983209 SAP AG 1999

reating a Session 9rom the Recording

Recordingnl( contains the data

from the recording

Seon name 02amp

Aoraon ampBS(eep eon

oclt dae 10102000

Cou can create a atch input session directy from the recording that you can then process using the

atch input monitor

copy SAP AG BC420 12-40

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 4188

046

983209 SAP AG 1999

reating Test Data

Test Data

Recording

ranranpBC420AAe name

The file onl( contains the data from the recording

Rgt

Application Serer

Structure

Cou can create a fie from the recordingH the fie $i contain a the fieds from the recording The

fieds are added to the fie $ith the ength you specified in the definition

The fied order corresponds to the order in the recording overvie$ Technica fieds

(2356257 2324ampS5amp and so on) are incuded

The data can ony e stored on the appication server If you do not specify a path the fie is stored in

the $or directory of the appication server

If the specified test fie aready eists the ne$ data record is added to this fie

copy SAP AG BC420 12-41

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 4288

04amp

983209 SAP AG 1999

ed conen

reating a Program

Recording

ZBC420ampProram name

Transfer Program

e daa

ead =rom =e

ran=er =rom recordn

reate

9ile nameTest data

ranranpBC420AA

Cou can generate a program from the recording

In the foo$ing diaog o enter a program name In addition you can choose the type and method

for fiing the maintained fied contents from the recorded screens

4se the vaues used for the recording If you reuire feie data transfer you $i have to modify

this program ater

ParameteriDe the input vaues and read these vaues from a fie A data structure is created for

parameteriDationH the data records are read from an eterna fie into this data structure The

program assumes the fie $as taiored to this data structure

If you have decided to parameteriDe the input vaues you shoud aso create a test fie during

generation To do this seect the checo and enter a name for the fie

The attriute maintenance screen of the AAP editor appears aintain the attriutes and save the

program

copy SAP AG BC420 12-42

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 4388

04

983209 SAP AG 1999

Program 9unctions

Online

transaction

Transfer program

To

error

1rror

ption 6ption ampFlat SAP

structure

Monitor

Cou have no$ generated a data transfer program for importing data into the amp System The

program can eecute the data transfer using atch input or ca transaction

If you choose option 1 and there is an error the data record is paced into a atch input session

copy SAP AG BC420 12-43

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 4488

044

983209 SAP AG 1999

Benerating 9unction Modules

Recording

Zcreaedeor ncon mode

ncon rop

Sor eD

ZBC420

Creae comer

9unction module

nl( one data record can be processed at a time

In the net diaog o you can generate a function modue a function group and short tet from the

recording The function modue is automaticay created in the function group

copy SAP AG BC420 12-44

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 4588

042

983209 SAP AG 1999

9unction of 9unction Modules

Online

transaction

To

error

1rror

ption 6 ption amp

9unction module

Import

Parameter 1port

parameter

Tables

M1SSTA

Monitor

S$BC

Import interface

The import interface consists of a technica part and the fieds from the recording (A parameter is

created for each input fied of the recorded transactions)

7port interface

Simpy consists of the parameter S4amp2 The function modue $i return a vaue in the system

fied SC9S4amp2 after caing ca transaction This return vaue is set to Dero if the data record has

een correcty processed (5ny appies to 2T)

If a session is created you $i e notified $hether the data record coud e paced into the session

Tae interfaceThis is used ony if the function modue $ors $ith ca transaction The tae contains a the

system messages

copy SAP AG BC420 12-45

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 4688

048

983209 SAP AG 1999

Import Interface of 9unction Module

$

Technical

fields

Data

fields

BI session or CALL TRANSACTION

Processin $ode

pdate $ode

a$e oamp BI session iamp (T initial)

Bacround user iamp (T initial)

Delete session aampter processin

Loc date oamp session

ODATA indicator

TU

MD1

UPDAT1

BRUP

US1R

=11P

ELDDAT1

DATA

Cou can use parameter 2T4 to specify $hether the function modue creates a atch input session

(2T4 E ) or updates the data record directy using ca transaction (2T4 E G)

The other parameters are fied as for a atch input session header

Note 7very time the function modue is caed a atch input session is created

If the session is to contain severa transactions proceed as foo$s

ltenerate the transaction severa times This can e achieved y recording the transaction again The

function modue interface $i then contain more than one transaction -hen the function modue is

caed severa transactions can e generated for each session

copy SAP AG BC420 12-46

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 4788

043

983209 SAP AG 1999

The Transaction Recorder

PrinciplesPrinciples

Recording )ith the LSMWRecording )ith the LSMW

Principles of atch Input and all TransactionPrinciples of atch Input and all Transaction

Integrating the TA Program into the DWIntegrating the TA Program into the DW

Using the TA Recorder Using the TA Recorder

copy SAP AG BC420 12-47

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 4888

045

983209 SAP AG 1999

Benerated Program

9unction modules DltP1ltBRUP

DltIS1RT

DltLS1ltBRUP

AAP Program

Define structure of

data in seJuential

fileDefine D

table

pen seJuential file

pen I session

Read data recordCseJuential file

9ill D table

9ill I session gtALL TRASATI

Last data record K

lose I session

lose seJuential file

The generated program has the structure dispayed aove It uses the standard function modues for

creating atch input sessions

copy SAP AG BC420 12-48

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 4988

047

983209 SAP AG 1999

Structure of the Benerated Program

Benerated part

Define D

table

pen seJuential file

pen I session

Read data record

9ill D table

9ill I session gtALL TRASATI

Last data recordK

lose I session

lose seJuential file

Include DR16

Define filestructure

P1ltDATAS1T

P1ltBRUP

DltDPR

Dlt9I1LD

DltTRASATI

LS1ltBRUP

LS1ltDATAS1T

The generated program consists of t$o parts 9 a generated part and the incude 2amp72G8 The

incude is provided in the standard system

The incude contains the definition of the reuired 2 tae and a further seven suroutines These

suroutines eecute the foo$ing functions

5pen and cose fie

5pen and cose session

Fi 2 tae

Fi session

The generated part is the main program and cas the reevant suroutines A structure is aso

generated in the generated part to read the eterna data into the fie

See the Appendi for more information on the 2amp72G8 program

copy SAP AG BC420 12-49

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 5088

020

983209 SAP AG 1999

Structure of D Table

PRBRAM DPR D1BI 9AM 9ALPRBRAMPRBRAM DPRDPR D1BID1BI 9AM9AM 9AL9AL

SAPM90ampD 0602

R90ampD=UR 600000

R90ampDU=RS 0006

R90ampD=T=D =UA

SAPM90ampD 0660

=A6AM16 Smith

=A6PSTL 87000

=A6LAD6 US

=A6SPRAS 1

SAPM90ampD 06amp0

=A6ST1B US6amp428357DDATA

PRBRAM

DPR

D1BI

9AM

9AL

EAR

UM

EAR

EAR

EAR

40

4

6

6amp

6amp

D Module pool

D Screen number

D Start of screen

D 9ield name

D 9ield contents

9ield ame T(pe Length Short Tet

AAP Dictionar(

The 2 tae has the same structure as in a standard transfer

copy SAP AG BC420 12-50

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 5188

026

983209 SAP AG 1999

Read Structure

Recording

DATA BEGIN OF record data element BUKRS bukr$amp data element KTOKD ktokd$amp data element NA(EG) name$+amp data element SORT ortl$ampEND OF record-

record

Automaticall( generated

from recording

The structure of the fie is automaticay generated and is a$ays defined $ith the name amp725amp

The generated structure a$ays has the same ayout 7ach fied is defined y t$o generated ro$s

The first ro$ is a$ays a comment ro$ containing the tet J data eement and the data eement of

the screen fied from the recording In the net ro$ the fied itsef is defined $ith the name of the

data eement foo$ed y a three9digit position numer $hich specifies the ocation in the structure

The ength of the fied is set y the ength of the data eement If a fied is not defined through a data

eement the system uses the ength of the screen fied

copy SAP AG BC420 12-51

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 5288

02amp

983209 SAP AG 1999

pening and losing the 9ile

P1ltDATAS1T

LS1ltDATAS1T

FOR( oendataet USING dataet-O)EN DATASET dataet IN TET (ODE-

IF S01SUBR2 34 - 5RITE 6 te7t1e S01SUBR2-STO)-

ENDIF-

ENDFOR(-

FOR( cloedataet USING dataet-2OSE DATASET dataet-

ENDFOR(-

Include

DR16

The suroutine 5P7N3ATAS7T opens the seuentia fie

The suroutine 2+5S73ATAS7T coses the seuentia fie

copy SAP AG BC420 12-52

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 5388

02

983209 SAP AG 1999

9unction Modules for I Program

lient

Session name

Eold date

=eep session

D user name

RecordK

LI1T

BRUP

ELDDAT1

=11P

US1R

R1RD

DltP1ltBRUPDltP1ltBRUP

Transaction code

D table

TD1

DPRTA

DltIS1RTDltIS1RT

DltLS1ltBRUPDltLS1ltBRUP

pen Isessionpen Isession

Insert data for

transactions

Insert data for

transactions

lose I

session

lose I

session

The foo$ing function modues are provided for creating atch input sessions (function group

S2)

235P7N3ltamp54P

2reates a ne$ session and contains genera data for the $hoe session

23INS7ampT

Inserts a the data for a transaction into the session The transferred interna tae $ith the

structure 2ATA must contain a the data reuired for fuy processing the transaction

232+5S73ltamp54P

2oses the session after a the data has een inserted As soon as the session has een cosed it

can e processed

The interna tae $ith the structure 2ATA can ony contain atch input data for one singe

transaction run So the individua transactions are inserted into the atch input session in a oop

using severa 23INS7ampT cas

copy SAP AG BC420 12-53

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 5488

024

983209 SAP AG 2001

9unction Module DltP1ltBRUP

ALL 9UTI DltP1ltBRUPALL 9UTI DltP1ltBRUP

1PRTIB

LI1T client

BRUP session name

ELDDAT1 loc+ date

=11P delete flag

US1R bdc user name

R1RD recording

IMPRTIB

NID internal session +e(

11PTIS

1PRTIB

LI1T client

BRUP session name

ELDDAT1 loc+ date

=11P delete flag

US1R bdc user name

R1RD recording

IMPRTIB NID internal session +e(

11PTIS

-ith the function modue 235P7N3ltamp54P you can open a atch input session

The foo$ing parameters are mandatory

2+I7NT (cient)

ltamp54P (session name)

4S7amp (user name)

Note The 4S7amp must a$ays e specified This user name is reuired for processing the session

in atch mode

The foo$ing parameters are optiona

=5+AT7 specifies the eariest date on $hich the session can e started677P fag specifies $hether session shoud e deeted after it has een successfuy processed The

677P fag is ignored if the session contains errors

677P E K K means deete the session after processing (defaut vaue) H

677P E KGK means do not deete session

amp725amp E KGK ao$s you to create a recording instead of a I session

If gtI is specified the function modue returns the interna session ey This is needed to e ae to

differentiate sessions that have the same name

-ith 7G27PTI5NS you get various return vaues that can e ueried $ith SC9S4amp2

Note In onine mode the onine user is used for the authoriDation checs regardess of the user

name specified

copy SAP AG BC420 12-54

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 5588

022

983209 SAP AG 1999

Subprogram P1ltBRUP

P1ltBRUP

FOR( oen8rou-IF e9on -

2A FUN2TION BD2O)ENGROU) E)ORTING 2IENT lt1mandt GROU) 8rou USER uer KEE) kee

=ODDATE gtolddate-

ENDIF-ENDFOR(-

Include

DR16

The suprogram 5P7N3ltamp54P opens the atch input session

copy SAP AG BC420 12-55

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 5688

028

983209 SAP AG 1999

9unction Module DltIS1RT

ALL 9UTI DltIS1RTALL 9UTI DltIS1RT

IMPRT

TD1 Transaction code

PSTltLAL Update locall(

PRITIB print list

TAL1S DPRTA bdclttable

11PTIS

IMPRT

TD1 Transaction code

PSTltLAL Update locall(

PRITIB print list

TAL1S DPRTA bdclttable

11PTIS

-ith the function modue 23INS7ampT you can add transaction data to the session

Cou need an interna 2 tae to transfer the data

The foo$ing parameters are mandatory

T257 Transaction code

CNPamp5TA 2 tae

The foo$ing parameters are optiona

P5ST3+52A+ E KGK activates oca updating This means that the data to e updated is ept in the

appication server and updated in the ast step of the transaction This does not invove the update

process (For more information see course 28 Programming ataase 4pdates)

PampINTINlt E KGK 9 ists processed in I $i e printed immediatey -ith 7G27PTI5NS you get various return vaues that can e ueried $ith SC9S4amp2

copy SAP AG BC420 12-56

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 5788

023

983209 SAP AG 1999

Subprogram DltTRASATI

DltTRASATI

FOR( BD2TRANSA2TION USING tcode-

IF e9on -2A FUN2TION BD2INSERT

E)ORTING T2ODE tcode TABES D0N)ROTAB bdcdata-

ESE-

ENDIF-ENDFOR(-

T

Include

DR16

The suprogram 23TampANSA2TI5N moves the fied 2 tae either to a atch input session

or uses ca transaction to import the data into the system 5n the seection screen you can specify

$hether you $ant to create a session or you $ant to use ca transaction to process the data directy

The S7SSI5N fied is then set according to your seection

copy SAP AG BC420 12-57

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 5888

025

983209 SAP AG 1999

9unction Module DltLS1ltBRUP

ALL 9UTI DltLS1ltBRUP

11PTIS

TltP1 6

NU1U1lt1RRR amp

-ith the function modue 232+5S73ltamp54P you can cose a atch input session

In 7G27PTI5NS you get various return vaues that can e ueried $ith SC9S4amp2

copy SAP AG BC420 12-58

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 5988

027

983209 SAP AG 1999

Subprogram LS1ltBRUP

FOR( cloe8rou-IF e9on -cloe batcgt 9nut 8rou

2A FUN2TION BD22OSEGROU)-

ESE-IF e8rouoened -

2A FUN2TION BD22OSEGROU)-

ENDIF-ENDIF-

ENDFOR(-

LS1ltBRUPlose session

lose error session

Include

DR16

The suprogram 2+5S73ltamp54P coses the atch input session The suprogram differentiates

et$een a norma I session (S7SSI5N E G) and a session opened $hen ca transaction

encountered an error (73ltamp54P35P7N7 E G)

copy SAP AG BC420 12-59

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 6088

080

983209 SAP AG 1999

Subprograms DltDPRG Dlt9I1LD

DltDPR

Dlt9I1LD

FOR( bdc9eld USING nam al-IF al 34 nodata-2EAR bdcdata- bdcdata1nam nam- bdcdata1al al- A))END bdcdata-ENDIF-

ENDFOR(-

FOR( bdcdltnro USING ro8ram dltnro- 2EAR bdcdata-Bdcdata1ro8ram ro8ram-Bdcdata1dltnro dltnro-Bdcdata1dltnbe89n - A))END bdcdata-ENDFOR(-

Include

DR16

The incude 2amp72GG contains t$o suprograms 23CNPamp5 and 23FI7+

Suprogram 23CNPamp5 fis the 2 tae $ith program names and screen numers

Suprogram 23FI7+ fis the 2 tae $ith fied names and vaues

7ach suprogram creates an entry in the 2 tae

copy SAP AG BC420 12-60

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 6188

086

983209 SAP AG 1999

9illing the D Table

erorm bdcdltnro u9n8 SA)(FD +- erorm bdc9eld u9n8 BD22URSOR RFD1BUKRS- erorm bdc9eld u9n8 BD2OK2ODE 6- erorm bdc9eld u9n8 RFD1BUKRS record1BUKRS- erorm bdc9eld u9n8 RFD1KTOKD record1KTOKD-

erorm bdcdltnro u9n8 SA)(FD -

erorm bdc9eld u9n8 BD22URSOR KNA1S)RAS- erorm bdc9eld u9n8 BD2OK2ODE 6- erorm bdc9eld u9n8 KNA1NA(E record1NA(E-

erorm bdc9eld u9n8 KNA1SORT record1SORT-

Recording Benerated automaticall(

from the recording

)ERFOR( bdcdltnro USING SA)(FD +- )ERFOR( bdc9eld USING BD22URSOR RFD1BUKRS-)ERFOR( bdc9eld USING BD2OK2ODE 6-)ERFOR( bdc9eld USING RFD1BUKRS record1BUKRS-)ERFOR( bdc9eld USING RFD1KTOKD record1KTOKD-

)ERFOR( bdcdltnro USING SA)(FD -

)ERFOR( bdc9eld USING BD22URSOR KNA1S)RAS-)ERFOR( bdc9eld USING BD2OK2ODE 6-)ERFOR( bdc9eld USING KNA1NA(E record1NA(E-

)ERFOR( bdc9eld USING KNA1SORT record1SORT- ---

The 2 tae is fied $ith data from the recording The suroutines 23CNPamp5 and

23FI7+ are used for this

The suroutines are caed in the reuired structure or seuence

copy SAP AG BC420 12-61

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 6288

08amp

983209 SAP AG 1999

erie)

SAPDatabase

SeJuential9ile

SAPDatabase

ALL TRASATIALL TRASATI

SeJuential9ile

ATE IPUTATE IPUT

D TableD TableD TableD Table

I Monitor

T

In contrast to atch input you can use ca transaction to directy pass data to the diaog interface

$ithout using a atch input session Cou use an interna tae (2 tae same structure and ayout

as atch input) to temporariy store your screen data Then you ca the desired transaction in your

program

Note 5n average the 2a Transaction method is 8 to times faster than using atch Input

copy SAP AG BC420 12-62

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 6388

08

983209 SAP AG 1999

all Transaction Program$ 1ample

RE)ORT abcbdcdcdeb9ct-

)ARA(ETERS d9mode DEFAUT A

udmode DEFAUT S-FOR( calltranact9on-2A TRANSA2TION FD

USING bdcdata (ODE d9mode

U)DATE udmode-

IF lt1ubrc NE - 5RITE 6 ---

ENDIF-ENDFOR(-

Screen

00

Screen

100

Screen

An additiona system ro area is added for the caed transaction The system uses this area for

processing the individua screens in the transactionH the data from the tae is added here After the

transaction is processed the second ro area is reeasedH the system continues processing in the first

ro area

Notes

In contrast to atch input there is no error ogging (error sessions) here For processing the caed

transaction the system uses the authoriDations of the user that caed the transaction The 2 tae

can ony hod data for one transaction run at a time efore another transaction is caed and its data

can e added you must eecute a amp7Famp7S= for the 2 tae

copy SAP AG BC420 12-63

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 6488

084

983209 SAP AG 1999

ALL TRASATI C6

RE)ORT 777-

2A TRANSA2TION FD USING bdcdata (ODE E-

Default for MD1 is A

2A TRANSA2TION 3tranact9oncode4 USING 3bdc1table4 C (ODE A E N C-

-ith the parameter 57 you can seect a specific dispay mode for processing the transaction The

foo$ing three modes are avaiae

A (ispay a)

If you eecute the program a the screens and a their data are dispayed This is the defaut vaue

for the 57 in 2A++ TampANSA2TI5N

N (ispay nothing)

The screens are not dispayed at a regardess of $hether any of them contained errors As soon as

the transaction has een fuy processed contro is returned to your program (The vaue of the

parameter 4PAT7 determines $hether dataase updates are eecuted or not)

7 (ispay errors ony)As soon as an error occurs in a screen the transaction is s$itched to dispay mode so that you can

correct the errors

These dispay modes are the same as those in the atch input session processing

copy SAP AG BC420 12-64

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 6588

082

983209 SAP AG 1999

RE)ORT 777-

2A TRANSA2TION FD USING BD2DATA U)DATE -

ALL TRASATI Camp

RE)ORT 777-

2A TRANSA2TION FD USING bdcdata U)DATE -

2A TRANSA2TION 3tranact9oncode4 USING 3bdc1table4 C (ODE A E N C U)DATE A S C -

Default for UPDAT1 is A

-ith the parameter 4PAT7 you can contro ho$ dataase updates arising from a transaction are

carried out There are three options

A (asynchronous updating) The caed transaction does not $ait unti the dataase has een

updated it simpy for$ard the updates to the SAP update service This usuay speeds up the 2T

program This processing mode is N5T recommended for arge data sets as the caed transaction

does not receive a competion message from the update modue

The caing 2T program therefore cannot te if the transaction has een successfuy competed Cou

shoud use the updating administration function (transaction S8) to determine $hether updating

$as terminated eary The error anaysis correction functions for are ess hepfu than $ith

synchronous updating

S (synchronous updating) -ith synchronous updating the caed transaction $aits unti a the

updates have een competed So processing is so$er than $ith synchronous updating The caed

transaction can ho$ever report any updating errors to the program $hich maes error

anaysiscorrection easier

+ (local updating) $ith oca updating the dataase is not updated in a separate process it is

updated in the caers process (see appication hep documentation for the AAP ey$ord S7T

4PAT7 TAS6 +52A+)

copy SAP AG BC420 12-65

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 6688

088

983209 SAP AG 1999

ALL TRASATI C

RE)ORT 777-DATA mtab T0)E TABE OF bdcm8coll-

2A TRANSA2TION FD USING bdcdata (ESSAGES INTO mtab-

2A TRANSA2TION 3tranact9oncode4 USING 3bdc1table4 C (ODE A E N C U)DATE A S C (ESSAGES INTO 3metab4 C -

7SSAlt7S specifies that a system messages that are output during the eecution of a 2A++

TampANSA2TI5N are $ritten to the interna tae L7SSTA The interna tae must have the

structure 2Slt25++

4nie the cassica atch input processing $ith sessions 2A++ TampANSA2TI5N does not offer any

specia processing procedures for transactions containing errors There are no restart functions for

transactions that contain errors or that cause updating terminations

copy SAP AG BC420 12-66

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 6788

083

983209 SAP AG 1999

ALL TRASATI C4

RE)ORT 777-DATA mltot T0)E ctuaram-

2A TRANSA2TION FD USING BD2DATA

O)TIONS FRO( mltot-

2A TRANSA2TION 3tranact9oncode4 USING 3bdc1table4 C (ODE A E N C U)DATE A S C (ESSAGES INTO 3metab4 C O)TIONS FRO( ot C -

RE)ORT 777-DATA mltot T0)E ctuaram-2A TRANSA2TION FD USING bdcdata

O)TIONS FRO( mltot-

The addition 5PTI5NS enaes the ca transaction statement to e controed through a structure

The structure must have the dictionary type 2T43PAampAS

The addition 5PTI5NS Famp5 must not e comined either $ith the addition 57 or $ith

4PAT7 ore information on the net side

copy SAP AG BC420 12-67

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 6888

085

983209 SAP AG 1999

Structure TUltPARAMS

DISMD1 Procen mode anaoo o addon amp

UPDMD1 $pdae mode anaoo o addon $PA

ATTMD1 CA mode CA conro

D19SI1 orce de=a EndoE e drn procen

RAMMIT +o eD a Camp amp(

IPT +o a ac np eonF a F S-B+P SPAC

I1D +o a ac np eon a=er end o= BC daa

The components are defined as foo$s

The components 7FSIM7 ampA25IT N5INPT and N5I7N can have the foo$ing

vaues KGK E Ces or K K E No

If the addition 5PTI5NS Famp5 is not specified the foo$ing settings appy to the contro

parameters

IS57 from addition 57

4P57 from addition 4PAT7

2ATT57 2ATT not active

7FSIM7 o not not use defaut $indo$s siDe

ampA25IT Successfu eit at 25IT -5amp6

N5INPT atch input session active (SC9INPT E G)

N5I7N atch input session sti active after end of 2 data

copy SAP AG BC420 12-68

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 6988

087

983209 SAP AG 1999

SMSBID Message ID

SMSBT Message T(pe C1GIGWGSGA

SMSB Message umber

SMSB6 Message ariable 6

SMSBamp Message ariable amp

SMSB Message ariable

SMSB4 Message ariable 4

SMSBID Message ID

SMSBT Message T(pe C1GIGWGSGA

SMSB Message umber

SMSB6 Message ariable 6

SMSBamp Message ariable amp

SMSB Message ariable

SMSB4 Message ariable 4

Return code$

S(stem fields$

alue Meaning

0 Successful

6000 1rror in transaction

6000 1rror in processing call transaction

see also the s(stem fields specified

alue Meaning

0 Successful

6000 1rror in transaction

6000 1rror in processing call transaction

see also the s(stem fields specified

9ield name Meaning9ield name9ield name MeaningMeaning

Return ode and S(stem 9ields

The return code is used to specify $hether the caed transaction $as processed successfuy In

addition severa system fieds are fied The numer I type and variaes of the diaog message

output y the caed transaction Cou need this information to output the message tet

copy SAP AG BC420 12-69

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 7088

030

983209 SAP AG 1999

Benerated Program of the TA Recorder

REFRES= (ESSTAB-

2A TRANSA2TION tcode USING bdcdata (ODE ctumode U)DATE cudate (ESSAGES INTO metab-OO) AT metab- ENDOO)-IF lubrc 34 AND e8rou 34 S)A2E- IF e8rouoenend - 2A FUN2TION BD2O)ENGROU) E)ORTING ---------

--------- E8rouoened - ENDIF- 2A FUN2TION BD2INSERT E)ORTING T2ODE tcode TABES D0N)ROTAB bdcdata-ENDIF-REFRES= bdcdata-

Message table output

pen error session

Insert data record that

has errors into error

session

If you have seected ca transaction on the seection screen the generated program runs as foo$s

The onine transaction is caed $ith ca transaction and passed to tae 2ATA A the

messages arising during the ca transaction are put in the interna tae 7SSTA

7SSTA is output as a ist

If you have specified an error session ( 73ltamp54P L SPA27) on the seection screen and the

ca transaction comes across an error (+3S4amp2 L 0) the error session is opened The error

session is ho$ever ony opened once Then the data record is paced in the session

A the other data records that have errors $ith ca transaction are paced in the same session

copy SAP AG BC420 12-70

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 7188

036

983209 SAP AG 1999

The Transaction Recorder

PrinciplesPrinciples

Recording )ith the LSMWRecording )ith the LSMW

Principles of atch Input and all TransactionPrinciples of atch Input and all Transaction

Integrating the TA Program into the DWIntegrating the TA Program into the DW

Using the TA Recorder Using the TA Recorder

copy SAP AG BC420 12-71

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 7288

03amp

983209 SAP AG 1999

Integrating into the DW

Transfer program

AAP Dictionar(

Integrate

SDA0

SDA6

SDAamp

SDA

Cou can integrate the generated program into the G9- The structure of the fie must e created

in the AAP ictionary The taes SGA0 SGA8 SGA1 and SGA $i e fied

copy SAP AG BC420 12-72

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 7388

03

983209 SAP AG 1999

DW Release 42

Goo

-B eeae 45

aa ran=er ogtec

Int customer data transfer ob-ect

ecord =ed

Dece daa ran=er

d Goo

The ampunction ampor interatin TA recorder prora$s is

i$ple$ented in the

D+-B in Release

The recorder can e integrated as of ampeease and it is provided in the G9- ampeease

ltot to the G9- ampeease 5n the initia screen you can integrate programs y choosing ampoto

( +nt customer ata transfer o-ect

copy SAP AG BC420 12-73

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 7488

034

983209 SAP AG 1999

reating Program as D b-ect

Comer ran=er ogtec

ampgtec ype

Sor eD =or ogtec

aa ran=er proram

Srcre name

9900

(+A1

Cane comer

ZBCA+G

ZB

ustomer transfer ob-ect

umber bet)een 7000 and 7777

b-ect t(pe

Assignment to R ob-ect

Short tet for D ob-ectShort description

Data transfer program

ame of generated program

Structure name

A structure Cstructure la(out )ith this name is created in

the AAP Dictionar(

For ampeease transfer oects $ere not organiDed y 5amp oects ut y a G numer (00089

OOOO) The numer range O0009OOOO is reserved for customers

To create a connection to the ne$ G 9- you must assign the program to a 5amp oect

2reate a short tet for the G oect This tet $i appear in the method seection ist

Specify the program to e incuded

Specify a name for the structure to e created in the AAP ictionary

Note $he generated program appears under program type +N and not under program type

-

copy SAP AG BC420 12-74

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 7588

032

983209 SAP AG 1999

Adantages

Automatic program registration in the DW in

Release 48

ou can use all the functions defined for

standard ob-ects

1ception$ The (reate ampile ith data

function

If you incuded the oect in the ampeease $orench it is automaticay avaiae in the ampeease

B $orench

A the $orench functions are avaiae for your oect ecept for Create files ith transfer ata

copy SAP AG BC420 12-75

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 7688

038

983209 SAP AG 1999

ou are no) able to$

The Transaction Recorder$ Unit Summar(

Use the recording function in the LSMW to create

a batch input session )ith the data from the

eternal s(stem

Use the TA Recorder to create (our o)n data

transfer program

Anal(e programs that )or+ )ith batch input or

call transaction

Integrate the TA Recorder programs into the

DW

copy SAP AG BC420 12-76

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 7788

ercise 1

nit $ -ecorder

$opic 2reating etors

$ransaction -ecorder ercise 1

bull 2reating detors $ith eterna numer assignment

bull etor numers M9980008 to M9980080

Address data for detors $ith eterna numer assignment is to

e transferred using program ampFI700

ro4ect F5

Supro4ect +5

-un +575

$as)s 85 95 8S25

9oad program -F+00

8 In the foo$ing eercises eisting data is to e changed Therefore these detors $ith

eterna numer assignment have to first e created

898 4nder suproect 79 create run 797G9 $ith the name Detors ith

eternal numers

copy SAP AG BC420 12-77

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 7888

891 2reate the foo$ing three tass The tass map the foo$ing process steps

convert data create + session and process + session

89198 In run 797G9 create the foo$ing tas

9 Tas AP9

9 Name 2onvert data 9 Tas type AP

9 Program type +S-

Seect the foo$ing +S- oect

+S- proect 2109

+S- suproect 7I9

+S- oect I997GT

89191 In run 797G9 create the foo$ing tas 9 Tas +5A9

9 Name 2reate I session

Tas type +5A

9 Program type INP

Seect program ampFI700 $ith the variant

I97G9

8919 In run 797G9 create the foo$ing tas

9 Tas S29

9 Name Process I session Tas type S2

9 Program type amp7P5

Seect program ampS2S4 $ith the variant

S497G9

Note that you have to correct the seuence of the tass 2onvert data

create + session and process + session

4se the uttons

89 Start the run

The detors $i e created $ith eterna numer assignments

89 2hec in transaction F0 that the detors M9980008 to M9980080 have een

created

copy SAP AG BC420 12-78

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 7988

ercise

nit $ransaction -ecorder

$opic -ecording function in the 9S8(

bull 2reate a recording using the +S-

bull ltenerate a atch input session

2hange the detor address data in the amp System

Name of the recording +

Name of the file +2055+F9

8 2reate the recording 7I3 using the +S- ampecord the transaction F01 (2hange

detor)

898 efore you create the recording first test the transaction onineQ

For the recording use detor M9980008 5n the initia screen of the F01

maintain the foo$ing fieds ony

etor etor M9980008

2ompany code 0008

Address data seect

Note $he data record must e saved hile recording

891 aintain the names and the descriptions for the foo$ing fieds

Name city street posta code and teephone numereete a other fieds in screen 880 from the recording (eg S5ampT+ +AN8

SPampAS)

4se the same technica names as sho$n in the tae eo$ (automatic fied

mapping)

copy SAP AG BC420 12-79

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 8088

1 2reate the suproect 7I9 and the ne$ oect TA3 in your proect 2109

aintain the oect attriutes and seect the item atch input recording Seect your

recording 7I3

2reate the source structure address

2reate the source fieds according to the tae eo$ 5r copy them from proect 2109S37N suproect 7I900 oect TA900

198 Fie setup The data from the egacy system are dispayed in the foo$ing tae

Fied name Fied type Fied ength escription

N5 2 8B etor numer

NA7 2 Name

STamp77T 2 Street

2ITC 2 2ityPace of residence

MIP 2 80 Posta code

T7+ 2 8B Teephone numer

191 aintain the fied mapping 4se the automatic fied mapping (via menu item

7tras)

19 Specify the fies 5ny maintain the fie name of the source fie

Name of the fie 21099IFI+7

2odepage 8800

19 Import the data and convert them ispay the data in each caseQ

19 2reate a atch input session

19B ampun the atch input session

copy SAP AG BC420 12-80

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 8188

ercise 3

nit $ransaction -ecorder

$opic -ecording ith the $ -ecorder

bull ltenerate a recording using the TA recorder

bull Test the recording

2hange the address data of detors in the amp system

Name recording $+

Name of the file +2055+F9

8 2reate the recording TA37I3 using the transaction recorder ampecord the

transaction F01 (change detor)

898 4se detor M9980008 for the recording 5n the F01 initia screen ony

maintain the foo$ing fieds

etor etor M9980008

2ompany 2ode 0008

Address data seect

Note $he data record must e saved hen recording

eete a fieds that do not eist in the source fie 21099IFI+7 from screen

880 in the recording (eg 6NA89S5ampT+ 6NA89+AN8 6ANNQ9SPampAS) Note o not deete fieds ampF01946ampS and ampF0190880

Save the recording no$

1 S$itch to the recordings overvie$

198 Process the recording $ith the processing mode A (dispay a)

191 Process the recording $ith the processing mode RN (no dispay)

19 If the recording has een tested and no error has occurred generate a I session

and run it using the I monitor If an error shoud occur generate the recordingagainQ

copy SAP AG BC420 12-81

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 8288

From the recording generate the program M21037I3 in your deveopment cass

2109 Seect the foo$ing

bull ampead fied contents from fie

bull 2reate test data in the fie 2103dei3test3tt

98 Save this program and eecute it ltenerate one I session each and process it

2arry out the same steps again using the ca transaction

The generated program shoud no$ e changed so that fie 21099IFI+7 can e

read and processed

98 2hange the defaut vaue of the fie name (parameter dataset) in 21099

IFI+7

91 2hange the structure definition eete the company code fied and the address

data checo from the structure

9 2hange the su9routine ca perform dc3fied for the company code (KampF019

46ampSK) so that the vaue 0008 is transferred

9 2hange the su9routine ca perform dc3fied for the address data checo

(KampF0190880K) so that the vaue G is transferred

9 Start the program again and read the data from the fie 21099IFI+7 $ith

detor data ltenerate a I session $ith it and run it

copy SAP AG BC420 12-82

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 8388

033 Include DR16INCLUDE BDCRECX1

SELECTION-SCREEN BEGIN OF LINE

PARAMETERS SESSION RADIOBUTTON GROUP CTU create sessi SELECTION-SCREEN COMMENT $amp TEXT-S FOR FIELD SESSION

se(ecti-scree )siti +

PARAMETERS CTU RADIOBUTTON GROUP CTU ca(( trasacti

SELECTION-SCREEN COMMENT $amp TEXT-S FOR FIELD CTU

SELECTION-SCREEN END OF LINE

SELECTION-SCREEN BEGIN OF LINE

SELECTION-SCREEN COMMENT $amp TEXT-S1 FOR FIELD GROUP

se(ecti-scree )siti $+

PARAMETERS GROUP1$amp r) ae 0 sessi

SELECTION-SCREEN COMMENT $amp TEXT-S+ FOR FIELD CTUMODE

se(ecti-scree )siti

PARAMETERS CTUMODE LIE CTU2PARAMS-DISMODE DEFAULT 3N3

A4 s56 a(( 78)rs

E4 s56 78)r errr (8

N4 7 t 7is)(a8 78)r

SELECTION-SCREEN END OF LINE

SELECTION-SCREEN BEGIN OF LINE

SELECTION-SCREEN COMMENT $amp TEXT-S$ FOR FIELD USER

se(ecti-scree )siti $+

PARAMETERS4 USER1$amp DEFAULT S9-UNAME ser 0r sessi i atc5

SELECTION-SCREEN COMMENT $amp TEXT-S FOR FIELD CUPDATE

se(ecti-scree )siti

PARAMETERS CUPDATE LIE CTU2PARAMS-UPDMODE DEFAULT 3L3

S4 s8c5rs(8

A4 as8c5rs(8

L4 (ca(

SELECTION-SCREEN END OF LINE

SELECTION-SCREEN BEGIN OF LINE

SELECTION-SCREEN COMMENT $amp TEXT-S FOR FIELD EEP

se(ecti-scree )siti $+

PARAMETERS4 EEP AS CltECBOX 3 3 = 7e(ete sessi i0 0iis5e7

3X3 = gtee) sessi i0 0iis5e7

SELECTION-SCREEN COMMENT $amp TEXT-S FOR FIELD E2GROUP

copy SAP AG BC420 12-83

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 8488

se(ecti-scree )siti

)araeters E2GROUP1$amp r) ae 0 errr-sessi

SELECTION-SCREEN END OF LINE

SELECTION-SCREEN BEGIN OF LINE

SELECTION-SCREEN COMMENT $amp TEXT-S FOR FIELD ltOLDDATE

se(ecti-scree )siti $+

PARAMETERS4 ltOLDDATE LIE S9-DATUM

SELECTION-SCREEN COMMENT +11amp TEXT-S$ FOR FIELD E2USER

se(ecti-scree )siti

PARAMETERS4 E2USER1$amp DEFAULT S9-UNAME ser 0r errr-sessi

SELECTION-SCREEN END OF LINE

SELECTION-SCREEN BEGIN OF LINE

SELECTION-SCREEN COMMENT +11amp TEXT-S FOR FIELD E2EEP

se(ecti-scree )siti

PARAMETERS4 E2EEP AS CltECBOX 3 3 = 7e(ete sessi i0 0iis5e7

3X3 = gtee) sessi i0 0iis5e7

SELECTION-SCREEN END OF LINE

SELECTION-SCREEN BEGIN OF LINE

SELECTION-SCREEN COMMENT +11amp TEXT-S FOR FIELD E2ltDATE

se(ecti-scree )siti

PARAMETERS4 E2ltDATE LIE S9-DATUM

SELECTION-SCREEN END OF LINE

SELECTION-SCREEN SIP

SELECTION-SCREEN BEGIN OF LINE

SELECTION-SCREEN COMMENT 1amp TEXT-S1 FOR FIELD NODATA

PARAMETERS4 NODATA DEFAULT 33 LOER CASE 7ata

SELECTION-SCREEN END OF LINE

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

Batc5i)t7ata 0 si(e trasacti

DATA4 BDCDATA LIE BDCDATA OCCURS ITlt ltEADER LINE

essaes 0 ca(( trasacti

DATA4 MESSTAB LIE BDCMSGCOLL OCCURS ITlt ltEADER LINE

errr sessi )ee7 3 3 r 3X3amp

DATA4 E2GROUP2OPENED

essae tets

TABLES4 T1

copy SAP AG BC420 12-84

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 8588

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

at se(ecti scree

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

AT SELECTION-SCREEN

r) a7 ser st e 0i((e7 0r create sessi

IF SESSION = 3X3 AND

GROUP = SPACE OR USER = SPACE

MESSAGE E1MSamp

ENDIF

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

)e 7ataset

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

FORM OPEN2DATASET USING P2DATASET

OPEN DATASET P2DATASET IN TEXT MODE

IF S9-SUBRC

RITE4 TEXT-E S9-SUBRC

STOP

ENDIF

ENDFORM

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

c(se 7ataset

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

FORM CLOSE2DATASET USING P2DATASET

CLOSE DATASET P2DATASET

ENDFORM

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

create atc5i)t sessi

t 0r ca(( trasacti siamp

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

FORM OPEN2GROUP

IF SESSION = 3X3

SIP

RITE4 $amp 3Create r)3I1amp GROUP

SIP

)e atc5i)t r)

CALL FUNCTION 3BDC2OPEN2GROUP3

EXPORTING CLIENT = S9-MANDT

copy SAP AG BC420 12-85

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 8688

GROUP = GROUP

USER = USER

EEP = EEP

ltOLDDATE = ltOLDDATE

RITE4 amp 3BDC2OPEN2GROUP3I$amp

1$amp 3retrc7e43I+amp

S9-SUBRC

ENDIF

ENDFORM

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

e7 atc5i)t sessi

ca(( trasacti si4 errr sessiamp

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

FORM CLOSE2GROUP

IF SESSION = 3X3

c(se atc5i)t r)

CALL FUNCTION 3BDC2CLOSE2GROUP3

RITE4 amp 3BDC2CLOSE2GROUP3Iamp

1$amp 3retrc7e43I+amp

S9-SUBRC

ELSE

IF E2GROUP2OPENED = 3X3

CALL FUNCTION 3BDC2CLOSE2GROUP3

RITE4

RITE4 amp 3Fe5(era))e 6r7e eret3Iamp

ENDIF

ENDIF

ENDFORM

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

Start e6 trasacti accr7i t )araeters

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

FORM BDC2TRANSACTION USING TCODE

DATA4 L2MSTRINGamp

DATA4 L2SUBRC LIE S9-SUBRC

atc5 i)t sessi

IF SESSION = 3X3

CALL FUNCTION 3BDC2INSERT3

EXPORTING TCODE = TCODE

TABLES D9NPROTAB = BDCDATA

RITE4 3BDC2INSERT3Iamp

copy SAP AG BC420 12-86

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 8788

TCODE

3retrc7e43I+amp

S9-SUBRC

3RECORD43

S9-INDEX

ca(( trasacti si

ELSE

REFRESlt MESSTAB

CALL TRANSACTION TCODE USING BDCDATA

MODE CTUMODE

UPDATE CUPDATE

MESSAGES INTO MESSTAB

L2SUBRC = S9-SUBRC

RITE4 3CALL2TRANSACTION3

TCODE

3retrc7e43I+amp

L2SUBRC

3RECORD43

S9-INDEX

LOOP AT MESSTAB

SELECT SINGLE FROM T1 ltERE SPRSL = MESSTAB-MSGSPRA

AND ARBGB = MESSTAB-MSGID

AND MSGNR = MESSTAB-MSGNR

IF S9-SUBRC =

L2MSTRING = T1-TEXT

IF L2MSTRING CS 313

REPLACE 313 ITlt MESSTAB-MSGH1 INTO L2MSTRING

REPLACE 3$3 ITlt MESSTAB-MSGH$ INTO L2MSTRING

REPLACE 33 ITlt MESSTAB-MSGH INTO L2MSTRING

REPLACE 33 ITlt MESSTAB-MSGH INTO L2MSTRING

ELSE

REPLACE 33 ITlt MESSTAB-MSGH1 INTO L2MSTRING

REPLACE 33 ITlt MESSTAB-MSGH$ INTO L2MSTRING

REPLACE 33 ITlt MESSTAB-MSGH INTO L2MSTRING

REPLACE 33 ITlt MESSTAB-MSGH INTO L2MSTRING

ENDIF

CONDENSE L2MSTRING

RITE4 MESSTAB-MSGT9P L2MSTRING$+amp

ELSE

RITE4 MESSTAB

ENDIF

ENDLOOP

copy SAP AG BC420 12-87

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 8888

SIP

Eree 0e5(era))e

IF L2SUBRC AND E2GROUP SPACE

IF E2GROUP2OPENED = 3 3

CALL FUNCTION 3BDC2OPEN2GROUP3

EXPORTING CLIENT = S9-MANDT

GROUP = E2GROUP

USER = E2USER

EEP = E2EEP

ltOLDDATE = E2ltDATE

E2GROUP2OPENED = 3X3

ENDIF

CALL FUNCTION 3BDC2INSERT3

EXPORTING TCODE = TCODE

TABLES D9NPROTAB = BDCDATA

ENDIF

ENDIF

REFRESlt BDCDATA

ENDFORM

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

Start e6 scree

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

FORM BDC2D9NPRO USING PROGRAM D9NPRO

CLEAR BDCDATA

BDCDATA-PROGRAM = PROGRAM

BDCDATA-D9NPRO = D9NPRO

BDCDATA-D9NBEGIN = 3X3

APPEND BDCDATA

ENDFORM

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

Isert 0ie(7

Page 15: BC420_46C - 012The Transaction Recorder

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 1588

062

983209 SAP AG 1999

Step Loops and Table ontrols

1ample$ an+ Details

Comer

ntr( an+ +e( Account

08154711

123456789

Z-00-12345

an+ Details

00708155546344536

Banlt daa

==A=C06)

==A=C0amp)

Step oops and tae contros are treated identicay for the recording

The fied names of the fieds isted are the same for every ro$

7ach ro$ contains a customers an detais The fieds must e accessed using an inde (this is

specified as an addition to the fied name for eampe 6N69AN6N(1) The inde must match

the ro$ numer

5ny the visie fieds on a screen can e fied $ith data If some fieds are ony visie after paging

the paging must e recorded as $e This means that for the recording you must eecute a the steps

in the onine transaction

For eampe age on $oud e eecuted using the function code 1 (Paging icons)

Paging to the end of a ist 1Page up 11

lto to first page 18

copy SAP AG BC420 12-15

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 1688

068

983209 SAP AG 2001

Recording Buidelines

Test the transaction before recording

Start the recording

hange field alues onl( for fields

releant to the recording

As of 48 all filled fields are recorded

Transaction must be properl( eitedCSA1

Use of scroll bars cannot be recorded

Specia recording notes

F8 F and your o$n F8 and F hep (Pamp527SS 5N =7+P9amp7gt47ST Pamp527SS 5N A+479

amp7gt47ST) are not recorded This aso appies to a commands under the System and $el

menus aues for defaut variants ( transaction variants) are not incuded

7rror and $arning diaogs are not recorded 5ny the 56 code and the fied contents reuired for

further processing on the current screen are recorded

Note uring recording the data entered is $ritten to the dataase

copy SAP AG BC420 12-16

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 1788

063

983209 SAP AG 2001

1n-o( SAP ontrols and Data Transfer

bull SAP Picture ontrolbull SAP ETML ie)er ontrol

bull SAP Tet 1dit ontrol

bull AL Brid ontrol

bull SAP Tree ontrol

bull

ranch 6

ranch amp

Root

These and other controls do not support batch input$

Root

ranch amp

ranch amp6

The ne$ 7noy SAP contros deveoped for ampeease B do not support atch input or ca

transaction

=o$ever tae contros and tastrips do support atch input

copy SAP AG BC420 12-17

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 1888

065

983209 SAP AG 1999

The Transaction Recorder

PrinciplesPrinciples

Recording )ith the LSMWRecording )ith the LSMW

Principles of atch Input and all TransactionPrinciples of atch Input and all Transaction

Integrating the TA Program into the DWIntegrating the TA Program into the DW

Using the TA Recorder Using the TA Recorder

copy SAP AG BC420 12-18

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 1988

067

983209 SAP AG 1999

Session

generator

Recording Using the LSMW

-ith the +S- you can create your o$n recordings

The +S- uses the standard TA recorder here yet evauates the recording itsef The information

from the recording is used to create atch input sessions

The created atch input session can e processed as usua $ith the atch input monitor

Note As $ith the standard procedure it is euay important that the data is converted

copy SAP AG BC420 12-19

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 2088

0amp0

983209 SAP AG 1999

reating Recording

Admnraon

ecordn

Goo

ame of recording

Description

)ner

ame of transaction

Start recording

lto into the +S- and seect the menu path ampoto (Recorings An overvie$ of a previousy

created recordings for your proect are dispayed To start a ne$ recording seect Create

To create a recording you must define the name the description and the o$ner

7nter the name of the transaction you $ant to record

7ecute the transaction and compete it propery

Note ampecordings are assigned to ony one proect 9 so the name of the recording must e uniue

copy SAP AG BC420 12-20

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 2188

0amp6

983209 SAP AG 1999

hanging ustomer Data$ Initial Screen

9ield ontents

BCC$Samp $SZAV

BCamp(Camp )00

02-($++ -88-10000

02-0110

02-0130

$SZAV

9ield ame

Comer

Company code

Z-88-10000

Genera daa

Comer Z-88-10000

+ame

9ield ontents

BCamp(Camp $PA

BCS$BSC SAPSZA1 0300ASS

BCS$BSC SAPSZA1 0301Camp$

BCC$Samp SZA10100-+$B

A1AA-S Garden Sree

A1AA-amp$S+$1 34

A1AA-PampSCamp1 02105

9ield ame

Screen

111

Screen

106

In the aove eampe the transaction Change customer F01 is recorded

Note

You must ma)e some modification to the field values for all the fields you ant to capture

for the data transfer For the purposes of recording a change can simply mean overriting

one single character in a field ith the same character

ven if fields are to e filled using S$amp$ parameters the values must still e changed on

the screen in order to capture them

(ith online transactions screen sequences may appear that are different than in the

recording

copy SAP AG BC420 12-21

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 2288

0ampamp

983209 SAP AG 1999

Results

RecordingRecording R1lt6 Demolt6

9D0amp hange customer Caccounting

SAPM90ampD 0608

DltURSR R90ampD=UR

Dlt=D1 gt00

R90ampD=UR 5560000

R90ampDD0660

US1ltA

SAPM90ampD 0666

Dlt=D1 UPDA

DltSUSR SAPLSA6

DltSUSR SAPLSA6

DltURSR SA6ltD0600T1LltUM1

ADDR6ltDATASTR11T 4 Barden Street

ADDR6ltDATAPSTltD1 0amp602

ADDR6ltDATAIT6 oston

SA6ltD0600T1LltUM1 8638257755

The resuts of the recording using the +S- are dispayed in a tree structure

After the recording has finished you can edit it Cou can deete fieds or add ne$ ones

copy SAP AG BC420 12-22

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 2388

0amp

983209 SAP AG 1999

Assigning 9ield ames

Recording R16 Demolt6

Dlt=D1 UPDA

DltSUSR SAPLSA6

DltSUSR SAPLSA6

DltURSR SA6ltD0600T1L

ADDR6ltDATAAM16 Lisa Eofmeister

ADDR6ltDATAPSTltD1 0amp602

ADDR6ltDATAIT6 oston

ame

+ame

ecrpon

e=a ae

A1AA-+A1

A1AA-+A1

Comer name

a o=meer

Screen =ed

ustomer name

double clic+

Cou can assign names for each recorded fied The specia fieds (2356257 2324ampS5amp

and 23S4S2amp77N) are not incuded here Cou can choose the fied names -hen the atch

input session is created the contents of these fieds are assigned to the target fieds specified in the

eft coumn

Functions

efaut Assigns to the fied names of the underying target fied and its fied description

ampeset eetes fied name and fied description

oue cic 7dits fied name fied description and defaut vaue

Note Cou can use fied names more than once =o$ever the fied name is ony avaiae once in thefied mapping For this reason it is not practica to use fied names more than once

For a those fieds for $hich you do not assign a name the defaut vaue is used $hen the atch

input session is created These defaut vaues can e seen as constants This is especiay usefu for

chec oes (for eampe 08 vie$ seection)

The +S- supports automatic fied mapping Source fieds and target fieds can e assigned to each

other automaticay The fieds are assigned to the corresponding fieds of the same name Therefore

the fied names of the source structure shoud e given the same or simiar names as the fied names

in the target structure

copy SAP AG BC420 12-23

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 2488

0amp4

983209 SAP AG 2001

Addinggtremoing screen fields

Repeating recording

9or identical field names the name and description are

assigned automaticall(

1diting Recording

02-($++

(+A1-A+

(+A1-+A1

(+A1-Samp

(+A1-+A2

(+A1-SAS

Comer accon nmer

e

+ame 1

Sor =ed

+ame 2

Sree

Selection of all

aailable screen

fields

Cou can ater add ne$ screen fieds if you need to 6eep in mind that fieds shoud ony e added in

paces $here they are aso provided on the screen other$ise you $i get an error $hen the I

session is processed

After saving you $i get the message The data has een saved successfuy No$ the recordings

are avaiae for the oect attriutes

If you repeat the recording you can record a ne$ screen seuence $ith ne$ fieds Provided that the

fied names (eg 6NA89NA78) are identica the names and descriptions are automaticay

assigned

copy SAP AG BC420 12-24

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 2588

0amp2

983209 SAP AG 1999

b-ect T(pe and Import Method$ Recording

Standard atch Input gt Direct Input

atch Input Recording

API

IDoc

ampgtec ype ) mpor meod

Bac np recordn

ecordn ec1

The recording is no$ avaiae $ith the oect attriutes

Net you create a proect or su9proect in the +S- and specify process the data transfer

Cou eecute the data transfer as in the standard system

efine the source fieds and structures

efine the fied mapping

ampead and convert the data

2reate and import a atch input session

copy SAP AG BC420 12-25

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 2688

0amp8

983209 SAP AG 1999

The Transaction Recorder

PrinciplesPrinciples

Recording )ith the LSMWRecording )ith the LSMW

Principles of atch Input and all TransactionPrinciples of atch Input and all Transaction

Integrating the TA Program into the DWIntegrating the TA Program into the DW

Using the TA Recorder Using the TA Recorder

copy SAP AG BC420 12-26

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 2788

0amp3

983209 SAP AG 1999

Transaction Recorder

Online

Transaction

RecordingTransfer Program

T

Included in the Batch Input Monitor

Cou use the transaction recorder to record transactions and then use the transaction recording to

generate a transfer program The program ao$s you to transfer data using either atch input or ca

transaction

copy SAP AG BC420 12-27

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 2888

0amp5

983209 SAP AG 1999

hanging ustomer Data$ Initial Screen

9ield ontents

BCC$Samp $SZAV

BCamp(Camp )00

02-($++ Z-88-10000

02-0110

02-0130

$SZAV

9ield ame

Comer

Company code

Z-88-10000

Genera daa

Comer Z-88-10000

+ame

9ield ontents

BCamp(Camp $PA

BCS$BSC SAPSZA1 0300ASS

BCS$BSC SAPSZA1 0301Camp$

BCC$Samp SZA10100-+$B

A1AA-S Garden Sree

A1AA-amp$S+$1 34

A1AA-PampSCamp1 02105

9ield ame

Screen

111

Screen

106

In the aove eampe the transaction Change customer F01 is recorded

copy SAP AG BC420 12-28

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 2988

0amp7

983209 SAP AG 2001

hange Debitor$ Pa(ment Transactions C6

Banlt dea

Screen

10

9ield ontent

BCC$Samp (+B(-BA+(+01

BCamp(Camp BA+((+B(-BA+(S01

(+B(-BA+(01 12345679

(+B(-BA+(+01 22222222

Debitor 5560000

9ield ame

Inde

copy SAP AG BC420 12-29

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 3088

00

983209 SAP AG 1999

hanging ustomer Data$ Pa(ment Transactions Camp

Addre

an+ countr( US

an+ code 6amp42837

Banlt dea

ustomer 5560000

9ield ontents9ield ame

BCC$Samp (+A1-(+ZA

BCamp(Camp $PA

(+B(-Z01

Screen

10

Screen

100

SAPLBA

9ield ontents

BCC$Samp B+(A-BA+(A

BCamp(Camp +

B+(A-BA+(A +aona Banlt

9ield ame

In different transactions the modue poo may change This is the case $ith for eampe customer

master data The TA recorder records modue poo changes automaticay

copy SAP AG BC420 12-30

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 3188

06

983209 SAP AG 1999

Eierarch( Displa( of the Recording

02amp

02

SAP02 0106

BCC$Samp 02-0130

BCamp(Camp )00

02-($++ -88-10000

02-0110

02-0130

SAP02 0111

BCamp(Camp V

BCC$Samp A1AA-amp$S+$1

A1AA-S Garden Sree

Recording

-ith the TA recorder the resuts are aso a ist in a hierarchy dispay =o$ever you cannot assign

your o$n fied names as you can in the +S-

copy SAP AG BC420 12-31

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 3288

0amp

983209 SAP AG 1999

Recording erie)

Recording

Transfer program

9unction module

ontains onl( the data

from the recording

Test data

Test

reate

reate

reate

reate

1dit hange recording

Process recording

Cou can edit the recording as needed

The recording can e tested and eecuted again The screens are run through in the same $ay as in

the recording

The recording can then e used to create

atch input sessions

Test data

ata transfer programs $ith atch input or ca transaction

Function modues

copy SAP AG BC420 12-32

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 3388

0

983209 SAP AG 1999

1 02 BS

2 SAP02 106

3 BCC$Samp $SZAV

4 BCamp(Camp )00 5 02-($++ -88-10000

6 02-0110

7 02-0130

8 $SZAV

9 SAP02 111

10 BCamp(Camp V

11 BCC$Samp A1AA-amp$S+$1

12 A1AA-S Garden Sree

Program Screen St 9ield ame 9ield alue

Recording 1ditor

Recording

Add gt delete lines 9ormat chec+

Import gt eport of recording

In the editor you can add or deete ines Cou can aso change the contents of individua ines

-ith the function Chec) you can specify $hether the edited version of the recording sti has the

correct synta

Cou can aso eport import recordings to from a seuentia fie

After editing save the recording changes

copy SAP AG BC420 12-33

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 3488

04

983209 SAP AG 1999

Recording Seeral Transaction Runs

RecordingF

Directl( after the first recordingG or

In the displa( mode of the recording

In this step you can record additiona transactions and add additiona transaction runs to the

recording

Cou can record the additiona transactions directy after a recording or in the edit screen of a

recording

copy SAP AG BC420 12-34

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 3588

02

983209 SAP AG 1999

1ditor$ Importing and 1porting Recordings

6 T 9D0amp S

amp SAPM90ampD 608

DltURSR

4

2

8 SAPM90ampD 666

60

66

Program Screen St 9ield name 9ield alue

cempA

e name

aa =orma

cemp

A

e name

aa =orma

1port

Import

Presentation Serer

If the editor functions in the systems do not provide a the functions you need you can do$noad the

recording to your presentation server using the Eort function and then edit the recording using a

P2 editor

Cou use the Import function to import the data ac into the amp System ae sure the fie is sti in

the correct format

copy SAP AG BC420 12-35

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 3688

08

983209 SAP AG 1999

Processing the Recording

Recording

Process )ith ALL TRASATI

Parameer

Proce mode$pdae mode

CA mode

e=a e

Con a=er comm

+o a B eon

nd +o a B mode

A

A

T

The recording can e eecuted directy The data from the recording is used and the transaction is

processed $ith ca transaction

2a transaction provides a range of options for caing appication transactions $hich are discussed

on the foo$ing t$o pages

copy SAP AG BC420 12-36

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 3788

03

983209 SAP AG 1999

Process mode

Update mode

ATT mode

Processing Recording )ith T 6

A

1

Displa( all screens

Displa( errors onl(

o displa(

L

S

A

Local

S(nchronous

As(nchronous

A

o ATT

ATT )ithout indiidual screen control

ATT )ith indiidual screen control

Processing mode

=ere you can specify the processing mode 9 it is the same as the processing mode for atch input

4pdate mode

=ere you can specify the update mode For more information see the unit ca transaction

2ATT mode

=ere you can mae specia settings if you $ant to test the recording under 2ATT conditions (ony

necessary for 2ATT runs) Specia functions are caed in the 2ATT too for each screen at the end of

P5 and at the start of PAI

copy SAP AG BC420 12-37

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 3888

05

983209 SAP AG 1999

Default sie

ont after commit

ot a I session

1nd$ ot a I mode

Processing Recording )ith T amp

The screen standard sie is used for the

processing

ommit )or+ does not end the processing

o I mode is actie The transaction )ill run

through as in online

I mode is selected nce the data in the D

table is processedG the I mode is set to inactie

Standard siDe

If you seect this the screens are processed in the standard siDe in the foreground (in foreground or

dispay errors ony) Note the standard siDe is a$ays used for acground processing

Further after commit

The first commit $or in a transaction does not ead to the end of the recording

Note A atch input transaction is ended $ith the first commit $or

No I mode

The system fied SC9INPT is not set (SC9INPT E ) So transactions are run through as in onine

7nd No I mode

5ny use if you choose the processing mode 7 (dispay errors ony) Then the transaction is processed in the acground in atch input mode and if there is an error the screens run through in

the foreground

copy SAP AG BC420 12-38

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 3988

07

983209 SAP AG 1999

I Mode

atch input

mode

nline

Some transactions behae differentl( in batch input mode

than in online Cbatch input capabilit(

atch input mode sets the s(stem field SIPT H

Not every transaction can run the same onine and in atch input mode The transaction must decide

itsef $hether it is caed onine or in atch input mode

The system sets the system fied SC9INPT E G if the atch input mode is active (this aso appies

to ca transaction) From this system fied the transaction can identify $hether to run onine or in

atch input mode

copy SAP AG BC420 12-39

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 4088

040

983209 SAP AG 1999

reating a Session 9rom the Recording

Recordingnl( contains the data

from the recording

Seon name 02amp

Aoraon ampBS(eep eon

oclt dae 10102000

Cou can create a atch input session directy from the recording that you can then process using the

atch input monitor

copy SAP AG BC420 12-40

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 4188

046

983209 SAP AG 1999

reating Test Data

Test Data

Recording

ranranpBC420AAe name

The file onl( contains the data from the recording

Rgt

Application Serer

Structure

Cou can create a fie from the recordingH the fie $i contain a the fieds from the recording The

fieds are added to the fie $ith the ength you specified in the definition

The fied order corresponds to the order in the recording overvie$ Technica fieds

(2356257 2324ampS5amp and so on) are incuded

The data can ony e stored on the appication server If you do not specify a path the fie is stored in

the $or directory of the appication server

If the specified test fie aready eists the ne$ data record is added to this fie

copy SAP AG BC420 12-41

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 4288

04amp

983209 SAP AG 1999

ed conen

reating a Program

Recording

ZBC420ampProram name

Transfer Program

e daa

ead =rom =e

ran=er =rom recordn

reate

9ile nameTest data

ranranpBC420AA

Cou can generate a program from the recording

In the foo$ing diaog o enter a program name In addition you can choose the type and method

for fiing the maintained fied contents from the recorded screens

4se the vaues used for the recording If you reuire feie data transfer you $i have to modify

this program ater

ParameteriDe the input vaues and read these vaues from a fie A data structure is created for

parameteriDationH the data records are read from an eterna fie into this data structure The

program assumes the fie $as taiored to this data structure

If you have decided to parameteriDe the input vaues you shoud aso create a test fie during

generation To do this seect the checo and enter a name for the fie

The attriute maintenance screen of the AAP editor appears aintain the attriutes and save the

program

copy SAP AG BC420 12-42

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 4388

04

983209 SAP AG 1999

Program 9unctions

Online

transaction

Transfer program

To

error

1rror

ption 6ption ampFlat SAP

structure

Monitor

Cou have no$ generated a data transfer program for importing data into the amp System The

program can eecute the data transfer using atch input or ca transaction

If you choose option 1 and there is an error the data record is paced into a atch input session

copy SAP AG BC420 12-43

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 4488

044

983209 SAP AG 1999

Benerating 9unction Modules

Recording

Zcreaedeor ncon mode

ncon rop

Sor eD

ZBC420

Creae comer

9unction module

nl( one data record can be processed at a time

In the net diaog o you can generate a function modue a function group and short tet from the

recording The function modue is automaticay created in the function group

copy SAP AG BC420 12-44

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 4588

042

983209 SAP AG 1999

9unction of 9unction Modules

Online

transaction

To

error

1rror

ption 6 ption amp

9unction module

Import

Parameter 1port

parameter

Tables

M1SSTA

Monitor

S$BC

Import interface

The import interface consists of a technica part and the fieds from the recording (A parameter is

created for each input fied of the recorded transactions)

7port interface

Simpy consists of the parameter S4amp2 The function modue $i return a vaue in the system

fied SC9S4amp2 after caing ca transaction This return vaue is set to Dero if the data record has

een correcty processed (5ny appies to 2T)

If a session is created you $i e notified $hether the data record coud e paced into the session

Tae interfaceThis is used ony if the function modue $ors $ith ca transaction The tae contains a the

system messages

copy SAP AG BC420 12-45

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 4688

048

983209 SAP AG 1999

Import Interface of 9unction Module

$

Technical

fields

Data

fields

BI session or CALL TRANSACTION

Processin $ode

pdate $ode

a$e oamp BI session iamp (T initial)

Bacround user iamp (T initial)

Delete session aampter processin

Loc date oamp session

ODATA indicator

TU

MD1

UPDAT1

BRUP

US1R

=11P

ELDDAT1

DATA

Cou can use parameter 2T4 to specify $hether the function modue creates a atch input session

(2T4 E ) or updates the data record directy using ca transaction (2T4 E G)

The other parameters are fied as for a atch input session header

Note 7very time the function modue is caed a atch input session is created

If the session is to contain severa transactions proceed as foo$s

ltenerate the transaction severa times This can e achieved y recording the transaction again The

function modue interface $i then contain more than one transaction -hen the function modue is

caed severa transactions can e generated for each session

copy SAP AG BC420 12-46

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 4788

043

983209 SAP AG 1999

The Transaction Recorder

PrinciplesPrinciples

Recording )ith the LSMWRecording )ith the LSMW

Principles of atch Input and all TransactionPrinciples of atch Input and all Transaction

Integrating the TA Program into the DWIntegrating the TA Program into the DW

Using the TA Recorder Using the TA Recorder

copy SAP AG BC420 12-47

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 4888

045

983209 SAP AG 1999

Benerated Program

9unction modules DltP1ltBRUP

DltIS1RT

DltLS1ltBRUP

AAP Program

Define structure of

data in seJuential

fileDefine D

table

pen seJuential file

pen I session

Read data recordCseJuential file

9ill D table

9ill I session gtALL TRASATI

Last data record K

lose I session

lose seJuential file

The generated program has the structure dispayed aove It uses the standard function modues for

creating atch input sessions

copy SAP AG BC420 12-48

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 4988

047

983209 SAP AG 1999

Structure of the Benerated Program

Benerated part

Define D

table

pen seJuential file

pen I session

Read data record

9ill D table

9ill I session gtALL TRASATI

Last data recordK

lose I session

lose seJuential file

Include DR16

Define filestructure

P1ltDATAS1T

P1ltBRUP

DltDPR

Dlt9I1LD

DltTRASATI

LS1ltBRUP

LS1ltDATAS1T

The generated program consists of t$o parts 9 a generated part and the incude 2amp72G8 The

incude is provided in the standard system

The incude contains the definition of the reuired 2 tae and a further seven suroutines These

suroutines eecute the foo$ing functions

5pen and cose fie

5pen and cose session

Fi 2 tae

Fi session

The generated part is the main program and cas the reevant suroutines A structure is aso

generated in the generated part to read the eterna data into the fie

See the Appendi for more information on the 2amp72G8 program

copy SAP AG BC420 12-49

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 5088

020

983209 SAP AG 1999

Structure of D Table

PRBRAM DPR D1BI 9AM 9ALPRBRAMPRBRAM DPRDPR D1BID1BI 9AM9AM 9AL9AL

SAPM90ampD 0602

R90ampD=UR 600000

R90ampDU=RS 0006

R90ampD=T=D =UA

SAPM90ampD 0660

=A6AM16 Smith

=A6PSTL 87000

=A6LAD6 US

=A6SPRAS 1

SAPM90ampD 06amp0

=A6ST1B US6amp428357DDATA

PRBRAM

DPR

D1BI

9AM

9AL

EAR

UM

EAR

EAR

EAR

40

4

6

6amp

6amp

D Module pool

D Screen number

D Start of screen

D 9ield name

D 9ield contents

9ield ame T(pe Length Short Tet

AAP Dictionar(

The 2 tae has the same structure as in a standard transfer

copy SAP AG BC420 12-50

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 5188

026

983209 SAP AG 1999

Read Structure

Recording

DATA BEGIN OF record data element BUKRS bukr$amp data element KTOKD ktokd$amp data element NA(EG) name$+amp data element SORT ortl$ampEND OF record-

record

Automaticall( generated

from recording

The structure of the fie is automaticay generated and is a$ays defined $ith the name amp725amp

The generated structure a$ays has the same ayout 7ach fied is defined y t$o generated ro$s

The first ro$ is a$ays a comment ro$ containing the tet J data eement and the data eement of

the screen fied from the recording In the net ro$ the fied itsef is defined $ith the name of the

data eement foo$ed y a three9digit position numer $hich specifies the ocation in the structure

The ength of the fied is set y the ength of the data eement If a fied is not defined through a data

eement the system uses the ength of the screen fied

copy SAP AG BC420 12-51

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 5288

02amp

983209 SAP AG 1999

pening and losing the 9ile

P1ltDATAS1T

LS1ltDATAS1T

FOR( oendataet USING dataet-O)EN DATASET dataet IN TET (ODE-

IF S01SUBR2 34 - 5RITE 6 te7t1e S01SUBR2-STO)-

ENDIF-

ENDFOR(-

FOR( cloedataet USING dataet-2OSE DATASET dataet-

ENDFOR(-

Include

DR16

The suroutine 5P7N3ATAS7T opens the seuentia fie

The suroutine 2+5S73ATAS7T coses the seuentia fie

copy SAP AG BC420 12-52

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 5388

02

983209 SAP AG 1999

9unction Modules for I Program

lient

Session name

Eold date

=eep session

D user name

RecordK

LI1T

BRUP

ELDDAT1

=11P

US1R

R1RD

DltP1ltBRUPDltP1ltBRUP

Transaction code

D table

TD1

DPRTA

DltIS1RTDltIS1RT

DltLS1ltBRUPDltLS1ltBRUP

pen Isessionpen Isession

Insert data for

transactions

Insert data for

transactions

lose I

session

lose I

session

The foo$ing function modues are provided for creating atch input sessions (function group

S2)

235P7N3ltamp54P

2reates a ne$ session and contains genera data for the $hoe session

23INS7ampT

Inserts a the data for a transaction into the session The transferred interna tae $ith the

structure 2ATA must contain a the data reuired for fuy processing the transaction

232+5S73ltamp54P

2oses the session after a the data has een inserted As soon as the session has een cosed it

can e processed

The interna tae $ith the structure 2ATA can ony contain atch input data for one singe

transaction run So the individua transactions are inserted into the atch input session in a oop

using severa 23INS7ampT cas

copy SAP AG BC420 12-53

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 5488

024

983209 SAP AG 2001

9unction Module DltP1ltBRUP

ALL 9UTI DltP1ltBRUPALL 9UTI DltP1ltBRUP

1PRTIB

LI1T client

BRUP session name

ELDDAT1 loc+ date

=11P delete flag

US1R bdc user name

R1RD recording

IMPRTIB

NID internal session +e(

11PTIS

1PRTIB

LI1T client

BRUP session name

ELDDAT1 loc+ date

=11P delete flag

US1R bdc user name

R1RD recording

IMPRTIB NID internal session +e(

11PTIS

-ith the function modue 235P7N3ltamp54P you can open a atch input session

The foo$ing parameters are mandatory

2+I7NT (cient)

ltamp54P (session name)

4S7amp (user name)

Note The 4S7amp must a$ays e specified This user name is reuired for processing the session

in atch mode

The foo$ing parameters are optiona

=5+AT7 specifies the eariest date on $hich the session can e started677P fag specifies $hether session shoud e deeted after it has een successfuy processed The

677P fag is ignored if the session contains errors

677P E K K means deete the session after processing (defaut vaue) H

677P E KGK means do not deete session

amp725amp E KGK ao$s you to create a recording instead of a I session

If gtI is specified the function modue returns the interna session ey This is needed to e ae to

differentiate sessions that have the same name

-ith 7G27PTI5NS you get various return vaues that can e ueried $ith SC9S4amp2

Note In onine mode the onine user is used for the authoriDation checs regardess of the user

name specified

copy SAP AG BC420 12-54

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 5588

022

983209 SAP AG 1999

Subprogram P1ltBRUP

P1ltBRUP

FOR( oen8rou-IF e9on -

2A FUN2TION BD2O)ENGROU) E)ORTING 2IENT lt1mandt GROU) 8rou USER uer KEE) kee

=ODDATE gtolddate-

ENDIF-ENDFOR(-

Include

DR16

The suprogram 5P7N3ltamp54P opens the atch input session

copy SAP AG BC420 12-55

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 5688

028

983209 SAP AG 1999

9unction Module DltIS1RT

ALL 9UTI DltIS1RTALL 9UTI DltIS1RT

IMPRT

TD1 Transaction code

PSTltLAL Update locall(

PRITIB print list

TAL1S DPRTA bdclttable

11PTIS

IMPRT

TD1 Transaction code

PSTltLAL Update locall(

PRITIB print list

TAL1S DPRTA bdclttable

11PTIS

-ith the function modue 23INS7ampT you can add transaction data to the session

Cou need an interna 2 tae to transfer the data

The foo$ing parameters are mandatory

T257 Transaction code

CNPamp5TA 2 tae

The foo$ing parameters are optiona

P5ST3+52A+ E KGK activates oca updating This means that the data to e updated is ept in the

appication server and updated in the ast step of the transaction This does not invove the update

process (For more information see course 28 Programming ataase 4pdates)

PampINTINlt E KGK 9 ists processed in I $i e printed immediatey -ith 7G27PTI5NS you get various return vaues that can e ueried $ith SC9S4amp2

copy SAP AG BC420 12-56

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 5788

023

983209 SAP AG 1999

Subprogram DltTRASATI

DltTRASATI

FOR( BD2TRANSA2TION USING tcode-

IF e9on -2A FUN2TION BD2INSERT

E)ORTING T2ODE tcode TABES D0N)ROTAB bdcdata-

ESE-

ENDIF-ENDFOR(-

T

Include

DR16

The suprogram 23TampANSA2TI5N moves the fied 2 tae either to a atch input session

or uses ca transaction to import the data into the system 5n the seection screen you can specify

$hether you $ant to create a session or you $ant to use ca transaction to process the data directy

The S7SSI5N fied is then set according to your seection

copy SAP AG BC420 12-57

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 5888

025

983209 SAP AG 1999

9unction Module DltLS1ltBRUP

ALL 9UTI DltLS1ltBRUP

11PTIS

TltP1 6

NU1U1lt1RRR amp

-ith the function modue 232+5S73ltamp54P you can cose a atch input session

In 7G27PTI5NS you get various return vaues that can e ueried $ith SC9S4amp2

copy SAP AG BC420 12-58

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 5988

027

983209 SAP AG 1999

Subprogram LS1ltBRUP

FOR( cloe8rou-IF e9on -cloe batcgt 9nut 8rou

2A FUN2TION BD22OSEGROU)-

ESE-IF e8rouoened -

2A FUN2TION BD22OSEGROU)-

ENDIF-ENDIF-

ENDFOR(-

LS1ltBRUPlose session

lose error session

Include

DR16

The suprogram 2+5S73ltamp54P coses the atch input session The suprogram differentiates

et$een a norma I session (S7SSI5N E G) and a session opened $hen ca transaction

encountered an error (73ltamp54P35P7N7 E G)

copy SAP AG BC420 12-59

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 6088

080

983209 SAP AG 1999

Subprograms DltDPRG Dlt9I1LD

DltDPR

Dlt9I1LD

FOR( bdc9eld USING nam al-IF al 34 nodata-2EAR bdcdata- bdcdata1nam nam- bdcdata1al al- A))END bdcdata-ENDIF-

ENDFOR(-

FOR( bdcdltnro USING ro8ram dltnro- 2EAR bdcdata-Bdcdata1ro8ram ro8ram-Bdcdata1dltnro dltnro-Bdcdata1dltnbe89n - A))END bdcdata-ENDFOR(-

Include

DR16

The incude 2amp72GG contains t$o suprograms 23CNPamp5 and 23FI7+

Suprogram 23CNPamp5 fis the 2 tae $ith program names and screen numers

Suprogram 23FI7+ fis the 2 tae $ith fied names and vaues

7ach suprogram creates an entry in the 2 tae

copy SAP AG BC420 12-60

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 6188

086

983209 SAP AG 1999

9illing the D Table

erorm bdcdltnro u9n8 SA)(FD +- erorm bdc9eld u9n8 BD22URSOR RFD1BUKRS- erorm bdc9eld u9n8 BD2OK2ODE 6- erorm bdc9eld u9n8 RFD1BUKRS record1BUKRS- erorm bdc9eld u9n8 RFD1KTOKD record1KTOKD-

erorm bdcdltnro u9n8 SA)(FD -

erorm bdc9eld u9n8 BD22URSOR KNA1S)RAS- erorm bdc9eld u9n8 BD2OK2ODE 6- erorm bdc9eld u9n8 KNA1NA(E record1NA(E-

erorm bdc9eld u9n8 KNA1SORT record1SORT-

Recording Benerated automaticall(

from the recording

)ERFOR( bdcdltnro USING SA)(FD +- )ERFOR( bdc9eld USING BD22URSOR RFD1BUKRS-)ERFOR( bdc9eld USING BD2OK2ODE 6-)ERFOR( bdc9eld USING RFD1BUKRS record1BUKRS-)ERFOR( bdc9eld USING RFD1KTOKD record1KTOKD-

)ERFOR( bdcdltnro USING SA)(FD -

)ERFOR( bdc9eld USING BD22URSOR KNA1S)RAS-)ERFOR( bdc9eld USING BD2OK2ODE 6-)ERFOR( bdc9eld USING KNA1NA(E record1NA(E-

)ERFOR( bdc9eld USING KNA1SORT record1SORT- ---

The 2 tae is fied $ith data from the recording The suroutines 23CNPamp5 and

23FI7+ are used for this

The suroutines are caed in the reuired structure or seuence

copy SAP AG BC420 12-61

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 6288

08amp

983209 SAP AG 1999

erie)

SAPDatabase

SeJuential9ile

SAPDatabase

ALL TRASATIALL TRASATI

SeJuential9ile

ATE IPUTATE IPUT

D TableD TableD TableD Table

I Monitor

T

In contrast to atch input you can use ca transaction to directy pass data to the diaog interface

$ithout using a atch input session Cou use an interna tae (2 tae same structure and ayout

as atch input) to temporariy store your screen data Then you ca the desired transaction in your

program

Note 5n average the 2a Transaction method is 8 to times faster than using atch Input

copy SAP AG BC420 12-62

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 6388

08

983209 SAP AG 1999

all Transaction Program$ 1ample

RE)ORT abcbdcdcdeb9ct-

)ARA(ETERS d9mode DEFAUT A

udmode DEFAUT S-FOR( calltranact9on-2A TRANSA2TION FD

USING bdcdata (ODE d9mode

U)DATE udmode-

IF lt1ubrc NE - 5RITE 6 ---

ENDIF-ENDFOR(-

Screen

00

Screen

100

Screen

An additiona system ro area is added for the caed transaction The system uses this area for

processing the individua screens in the transactionH the data from the tae is added here After the

transaction is processed the second ro area is reeasedH the system continues processing in the first

ro area

Notes

In contrast to atch input there is no error ogging (error sessions) here For processing the caed

transaction the system uses the authoriDations of the user that caed the transaction The 2 tae

can ony hod data for one transaction run at a time efore another transaction is caed and its data

can e added you must eecute a amp7Famp7S= for the 2 tae

copy SAP AG BC420 12-63

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 6488

084

983209 SAP AG 1999

ALL TRASATI C6

RE)ORT 777-

2A TRANSA2TION FD USING bdcdata (ODE E-

Default for MD1 is A

2A TRANSA2TION 3tranact9oncode4 USING 3bdc1table4 C (ODE A E N C-

-ith the parameter 57 you can seect a specific dispay mode for processing the transaction The

foo$ing three modes are avaiae

A (ispay a)

If you eecute the program a the screens and a their data are dispayed This is the defaut vaue

for the 57 in 2A++ TampANSA2TI5N

N (ispay nothing)

The screens are not dispayed at a regardess of $hether any of them contained errors As soon as

the transaction has een fuy processed contro is returned to your program (The vaue of the

parameter 4PAT7 determines $hether dataase updates are eecuted or not)

7 (ispay errors ony)As soon as an error occurs in a screen the transaction is s$itched to dispay mode so that you can

correct the errors

These dispay modes are the same as those in the atch input session processing

copy SAP AG BC420 12-64

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 6588

082

983209 SAP AG 1999

RE)ORT 777-

2A TRANSA2TION FD USING BD2DATA U)DATE -

ALL TRASATI Camp

RE)ORT 777-

2A TRANSA2TION FD USING bdcdata U)DATE -

2A TRANSA2TION 3tranact9oncode4 USING 3bdc1table4 C (ODE A E N C U)DATE A S C -

Default for UPDAT1 is A

-ith the parameter 4PAT7 you can contro ho$ dataase updates arising from a transaction are

carried out There are three options

A (asynchronous updating) The caed transaction does not $ait unti the dataase has een

updated it simpy for$ard the updates to the SAP update service This usuay speeds up the 2T

program This processing mode is N5T recommended for arge data sets as the caed transaction

does not receive a competion message from the update modue

The caing 2T program therefore cannot te if the transaction has een successfuy competed Cou

shoud use the updating administration function (transaction S8) to determine $hether updating

$as terminated eary The error anaysis correction functions for are ess hepfu than $ith

synchronous updating

S (synchronous updating) -ith synchronous updating the caed transaction $aits unti a the

updates have een competed So processing is so$er than $ith synchronous updating The caed

transaction can ho$ever report any updating errors to the program $hich maes error

anaysiscorrection easier

+ (local updating) $ith oca updating the dataase is not updated in a separate process it is

updated in the caers process (see appication hep documentation for the AAP ey$ord S7T

4PAT7 TAS6 +52A+)

copy SAP AG BC420 12-65

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 6688

088

983209 SAP AG 1999

ALL TRASATI C

RE)ORT 777-DATA mtab T0)E TABE OF bdcm8coll-

2A TRANSA2TION FD USING bdcdata (ESSAGES INTO mtab-

2A TRANSA2TION 3tranact9oncode4 USING 3bdc1table4 C (ODE A E N C U)DATE A S C (ESSAGES INTO 3metab4 C -

7SSAlt7S specifies that a system messages that are output during the eecution of a 2A++

TampANSA2TI5N are $ritten to the interna tae L7SSTA The interna tae must have the

structure 2Slt25++

4nie the cassica atch input processing $ith sessions 2A++ TampANSA2TI5N does not offer any

specia processing procedures for transactions containing errors There are no restart functions for

transactions that contain errors or that cause updating terminations

copy SAP AG BC420 12-66

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 6788

083

983209 SAP AG 1999

ALL TRASATI C4

RE)ORT 777-DATA mltot T0)E ctuaram-

2A TRANSA2TION FD USING BD2DATA

O)TIONS FRO( mltot-

2A TRANSA2TION 3tranact9oncode4 USING 3bdc1table4 C (ODE A E N C U)DATE A S C (ESSAGES INTO 3metab4 C O)TIONS FRO( ot C -

RE)ORT 777-DATA mltot T0)E ctuaram-2A TRANSA2TION FD USING bdcdata

O)TIONS FRO( mltot-

The addition 5PTI5NS enaes the ca transaction statement to e controed through a structure

The structure must have the dictionary type 2T43PAampAS

The addition 5PTI5NS Famp5 must not e comined either $ith the addition 57 or $ith

4PAT7 ore information on the net side

copy SAP AG BC420 12-67

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 6888

085

983209 SAP AG 1999

Structure TUltPARAMS

DISMD1 Procen mode anaoo o addon amp

UPDMD1 $pdae mode anaoo o addon $PA

ATTMD1 CA mode CA conro

D19SI1 orce de=a EndoE e drn procen

RAMMIT +o eD a Camp amp(

IPT +o a ac np eonF a F S-B+P SPAC

I1D +o a ac np eon a=er end o= BC daa

The components are defined as foo$s

The components 7FSIM7 ampA25IT N5INPT and N5I7N can have the foo$ing

vaues KGK E Ces or K K E No

If the addition 5PTI5NS Famp5 is not specified the foo$ing settings appy to the contro

parameters

IS57 from addition 57

4P57 from addition 4PAT7

2ATT57 2ATT not active

7FSIM7 o not not use defaut $indo$s siDe

ampA25IT Successfu eit at 25IT -5amp6

N5INPT atch input session active (SC9INPT E G)

N5I7N atch input session sti active after end of 2 data

copy SAP AG BC420 12-68

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 6988

087

983209 SAP AG 1999

SMSBID Message ID

SMSBT Message T(pe C1GIGWGSGA

SMSB Message umber

SMSB6 Message ariable 6

SMSBamp Message ariable amp

SMSB Message ariable

SMSB4 Message ariable 4

SMSBID Message ID

SMSBT Message T(pe C1GIGWGSGA

SMSB Message umber

SMSB6 Message ariable 6

SMSBamp Message ariable amp

SMSB Message ariable

SMSB4 Message ariable 4

Return code$

S(stem fields$

alue Meaning

0 Successful

6000 1rror in transaction

6000 1rror in processing call transaction

see also the s(stem fields specified

alue Meaning

0 Successful

6000 1rror in transaction

6000 1rror in processing call transaction

see also the s(stem fields specified

9ield name Meaning9ield name9ield name MeaningMeaning

Return ode and S(stem 9ields

The return code is used to specify $hether the caed transaction $as processed successfuy In

addition severa system fieds are fied The numer I type and variaes of the diaog message

output y the caed transaction Cou need this information to output the message tet

copy SAP AG BC420 12-69

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 7088

030

983209 SAP AG 1999

Benerated Program of the TA Recorder

REFRES= (ESSTAB-

2A TRANSA2TION tcode USING bdcdata (ODE ctumode U)DATE cudate (ESSAGES INTO metab-OO) AT metab- ENDOO)-IF lubrc 34 AND e8rou 34 S)A2E- IF e8rouoenend - 2A FUN2TION BD2O)ENGROU) E)ORTING ---------

--------- E8rouoened - ENDIF- 2A FUN2TION BD2INSERT E)ORTING T2ODE tcode TABES D0N)ROTAB bdcdata-ENDIF-REFRES= bdcdata-

Message table output

pen error session

Insert data record that

has errors into error

session

If you have seected ca transaction on the seection screen the generated program runs as foo$s

The onine transaction is caed $ith ca transaction and passed to tae 2ATA A the

messages arising during the ca transaction are put in the interna tae 7SSTA

7SSTA is output as a ist

If you have specified an error session ( 73ltamp54P L SPA27) on the seection screen and the

ca transaction comes across an error (+3S4amp2 L 0) the error session is opened The error

session is ho$ever ony opened once Then the data record is paced in the session

A the other data records that have errors $ith ca transaction are paced in the same session

copy SAP AG BC420 12-70

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 7188

036

983209 SAP AG 1999

The Transaction Recorder

PrinciplesPrinciples

Recording )ith the LSMWRecording )ith the LSMW

Principles of atch Input and all TransactionPrinciples of atch Input and all Transaction

Integrating the TA Program into the DWIntegrating the TA Program into the DW

Using the TA Recorder Using the TA Recorder

copy SAP AG BC420 12-71

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 7288

03amp

983209 SAP AG 1999

Integrating into the DW

Transfer program

AAP Dictionar(

Integrate

SDA0

SDA6

SDAamp

SDA

Cou can integrate the generated program into the G9- The structure of the fie must e created

in the AAP ictionary The taes SGA0 SGA8 SGA1 and SGA $i e fied

copy SAP AG BC420 12-72

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 7388

03

983209 SAP AG 1999

DW Release 42

Goo

-B eeae 45

aa ran=er ogtec

Int customer data transfer ob-ect

ecord =ed

Dece daa ran=er

d Goo

The ampunction ampor interatin TA recorder prora$s is

i$ple$ented in the

D+-B in Release

The recorder can e integrated as of ampeease and it is provided in the G9- ampeease

ltot to the G9- ampeease 5n the initia screen you can integrate programs y choosing ampoto

( +nt customer ata transfer o-ect

copy SAP AG BC420 12-73

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 7488

034

983209 SAP AG 1999

reating Program as D b-ect

Comer ran=er ogtec

ampgtec ype

Sor eD =or ogtec

aa ran=er proram

Srcre name

9900

(+A1

Cane comer

ZBCA+G

ZB

ustomer transfer ob-ect

umber bet)een 7000 and 7777

b-ect t(pe

Assignment to R ob-ect

Short tet for D ob-ectShort description

Data transfer program

ame of generated program

Structure name

A structure Cstructure la(out )ith this name is created in

the AAP Dictionar(

For ampeease transfer oects $ere not organiDed y 5amp oects ut y a G numer (00089

OOOO) The numer range O0009OOOO is reserved for customers

To create a connection to the ne$ G 9- you must assign the program to a 5amp oect

2reate a short tet for the G oect This tet $i appear in the method seection ist

Specify the program to e incuded

Specify a name for the structure to e created in the AAP ictionary

Note $he generated program appears under program type +N and not under program type

-

copy SAP AG BC420 12-74

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 7588

032

983209 SAP AG 1999

Adantages

Automatic program registration in the DW in

Release 48

ou can use all the functions defined for

standard ob-ects

1ception$ The (reate ampile ith data

function

If you incuded the oect in the ampeease $orench it is automaticay avaiae in the ampeease

B $orench

A the $orench functions are avaiae for your oect ecept for Create files ith transfer ata

copy SAP AG BC420 12-75

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 7688

038

983209 SAP AG 1999

ou are no) able to$

The Transaction Recorder$ Unit Summar(

Use the recording function in the LSMW to create

a batch input session )ith the data from the

eternal s(stem

Use the TA Recorder to create (our o)n data

transfer program

Anal(e programs that )or+ )ith batch input or

call transaction

Integrate the TA Recorder programs into the

DW

copy SAP AG BC420 12-76

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 7788

ercise 1

nit $ -ecorder

$opic 2reating etors

$ransaction -ecorder ercise 1

bull 2reating detors $ith eterna numer assignment

bull etor numers M9980008 to M9980080

Address data for detors $ith eterna numer assignment is to

e transferred using program ampFI700

ro4ect F5

Supro4ect +5

-un +575

$as)s 85 95 8S25

9oad program -F+00

8 In the foo$ing eercises eisting data is to e changed Therefore these detors $ith

eterna numer assignment have to first e created

898 4nder suproect 79 create run 797G9 $ith the name Detors ith

eternal numers

copy SAP AG BC420 12-77

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 7888

891 2reate the foo$ing three tass The tass map the foo$ing process steps

convert data create + session and process + session

89198 In run 797G9 create the foo$ing tas

9 Tas AP9

9 Name 2onvert data 9 Tas type AP

9 Program type +S-

Seect the foo$ing +S- oect

+S- proect 2109

+S- suproect 7I9

+S- oect I997GT

89191 In run 797G9 create the foo$ing tas 9 Tas +5A9

9 Name 2reate I session

Tas type +5A

9 Program type INP

Seect program ampFI700 $ith the variant

I97G9

8919 In run 797G9 create the foo$ing tas

9 Tas S29

9 Name Process I session Tas type S2

9 Program type amp7P5

Seect program ampS2S4 $ith the variant

S497G9

Note that you have to correct the seuence of the tass 2onvert data

create + session and process + session

4se the uttons

89 Start the run

The detors $i e created $ith eterna numer assignments

89 2hec in transaction F0 that the detors M9980008 to M9980080 have een

created

copy SAP AG BC420 12-78

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 7988

ercise

nit $ransaction -ecorder

$opic -ecording function in the 9S8(

bull 2reate a recording using the +S-

bull ltenerate a atch input session

2hange the detor address data in the amp System

Name of the recording +

Name of the file +2055+F9

8 2reate the recording 7I3 using the +S- ampecord the transaction F01 (2hange

detor)

898 efore you create the recording first test the transaction onineQ

For the recording use detor M9980008 5n the initia screen of the F01

maintain the foo$ing fieds ony

etor etor M9980008

2ompany code 0008

Address data seect

Note $he data record must e saved hile recording

891 aintain the names and the descriptions for the foo$ing fieds

Name city street posta code and teephone numereete a other fieds in screen 880 from the recording (eg S5ampT+ +AN8

SPampAS)

4se the same technica names as sho$n in the tae eo$ (automatic fied

mapping)

copy SAP AG BC420 12-79

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 8088

1 2reate the suproect 7I9 and the ne$ oect TA3 in your proect 2109

aintain the oect attriutes and seect the item atch input recording Seect your

recording 7I3

2reate the source structure address

2reate the source fieds according to the tae eo$ 5r copy them from proect 2109S37N suproect 7I900 oect TA900

198 Fie setup The data from the egacy system are dispayed in the foo$ing tae

Fied name Fied type Fied ength escription

N5 2 8B etor numer

NA7 2 Name

STamp77T 2 Street

2ITC 2 2ityPace of residence

MIP 2 80 Posta code

T7+ 2 8B Teephone numer

191 aintain the fied mapping 4se the automatic fied mapping (via menu item

7tras)

19 Specify the fies 5ny maintain the fie name of the source fie

Name of the fie 21099IFI+7

2odepage 8800

19 Import the data and convert them ispay the data in each caseQ

19 2reate a atch input session

19B ampun the atch input session

copy SAP AG BC420 12-80

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 8188

ercise 3

nit $ransaction -ecorder

$opic -ecording ith the $ -ecorder

bull ltenerate a recording using the TA recorder

bull Test the recording

2hange the address data of detors in the amp system

Name recording $+

Name of the file +2055+F9

8 2reate the recording TA37I3 using the transaction recorder ampecord the

transaction F01 (change detor)

898 4se detor M9980008 for the recording 5n the F01 initia screen ony

maintain the foo$ing fieds

etor etor M9980008

2ompany 2ode 0008

Address data seect

Note $he data record must e saved hen recording

eete a fieds that do not eist in the source fie 21099IFI+7 from screen

880 in the recording (eg 6NA89S5ampT+ 6NA89+AN8 6ANNQ9SPampAS) Note o not deete fieds ampF01946ampS and ampF0190880

Save the recording no$

1 S$itch to the recordings overvie$

198 Process the recording $ith the processing mode A (dispay a)

191 Process the recording $ith the processing mode RN (no dispay)

19 If the recording has een tested and no error has occurred generate a I session

and run it using the I monitor If an error shoud occur generate the recordingagainQ

copy SAP AG BC420 12-81

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 8288

From the recording generate the program M21037I3 in your deveopment cass

2109 Seect the foo$ing

bull ampead fied contents from fie

bull 2reate test data in the fie 2103dei3test3tt

98 Save this program and eecute it ltenerate one I session each and process it

2arry out the same steps again using the ca transaction

The generated program shoud no$ e changed so that fie 21099IFI+7 can e

read and processed

98 2hange the defaut vaue of the fie name (parameter dataset) in 21099

IFI+7

91 2hange the structure definition eete the company code fied and the address

data checo from the structure

9 2hange the su9routine ca perform dc3fied for the company code (KampF019

46ampSK) so that the vaue 0008 is transferred

9 2hange the su9routine ca perform dc3fied for the address data checo

(KampF0190880K) so that the vaue G is transferred

9 Start the program again and read the data from the fie 21099IFI+7 $ith

detor data ltenerate a I session $ith it and run it

copy SAP AG BC420 12-82

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 8388

033 Include DR16INCLUDE BDCRECX1

SELECTION-SCREEN BEGIN OF LINE

PARAMETERS SESSION RADIOBUTTON GROUP CTU create sessi SELECTION-SCREEN COMMENT $amp TEXT-S FOR FIELD SESSION

se(ecti-scree )siti +

PARAMETERS CTU RADIOBUTTON GROUP CTU ca(( trasacti

SELECTION-SCREEN COMMENT $amp TEXT-S FOR FIELD CTU

SELECTION-SCREEN END OF LINE

SELECTION-SCREEN BEGIN OF LINE

SELECTION-SCREEN COMMENT $amp TEXT-S1 FOR FIELD GROUP

se(ecti-scree )siti $+

PARAMETERS GROUP1$amp r) ae 0 sessi

SELECTION-SCREEN COMMENT $amp TEXT-S+ FOR FIELD CTUMODE

se(ecti-scree )siti

PARAMETERS CTUMODE LIE CTU2PARAMS-DISMODE DEFAULT 3N3

A4 s56 a(( 78)rs

E4 s56 78)r errr (8

N4 7 t 7is)(a8 78)r

SELECTION-SCREEN END OF LINE

SELECTION-SCREEN BEGIN OF LINE

SELECTION-SCREEN COMMENT $amp TEXT-S$ FOR FIELD USER

se(ecti-scree )siti $+

PARAMETERS4 USER1$amp DEFAULT S9-UNAME ser 0r sessi i atc5

SELECTION-SCREEN COMMENT $amp TEXT-S FOR FIELD CUPDATE

se(ecti-scree )siti

PARAMETERS CUPDATE LIE CTU2PARAMS-UPDMODE DEFAULT 3L3

S4 s8c5rs(8

A4 as8c5rs(8

L4 (ca(

SELECTION-SCREEN END OF LINE

SELECTION-SCREEN BEGIN OF LINE

SELECTION-SCREEN COMMENT $amp TEXT-S FOR FIELD EEP

se(ecti-scree )siti $+

PARAMETERS4 EEP AS CltECBOX 3 3 = 7e(ete sessi i0 0iis5e7

3X3 = gtee) sessi i0 0iis5e7

SELECTION-SCREEN COMMENT $amp TEXT-S FOR FIELD E2GROUP

copy SAP AG BC420 12-83

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 8488

se(ecti-scree )siti

)araeters E2GROUP1$amp r) ae 0 errr-sessi

SELECTION-SCREEN END OF LINE

SELECTION-SCREEN BEGIN OF LINE

SELECTION-SCREEN COMMENT $amp TEXT-S FOR FIELD ltOLDDATE

se(ecti-scree )siti $+

PARAMETERS4 ltOLDDATE LIE S9-DATUM

SELECTION-SCREEN COMMENT +11amp TEXT-S$ FOR FIELD E2USER

se(ecti-scree )siti

PARAMETERS4 E2USER1$amp DEFAULT S9-UNAME ser 0r errr-sessi

SELECTION-SCREEN END OF LINE

SELECTION-SCREEN BEGIN OF LINE

SELECTION-SCREEN COMMENT +11amp TEXT-S FOR FIELD E2EEP

se(ecti-scree )siti

PARAMETERS4 E2EEP AS CltECBOX 3 3 = 7e(ete sessi i0 0iis5e7

3X3 = gtee) sessi i0 0iis5e7

SELECTION-SCREEN END OF LINE

SELECTION-SCREEN BEGIN OF LINE

SELECTION-SCREEN COMMENT +11amp TEXT-S FOR FIELD E2ltDATE

se(ecti-scree )siti

PARAMETERS4 E2ltDATE LIE S9-DATUM

SELECTION-SCREEN END OF LINE

SELECTION-SCREEN SIP

SELECTION-SCREEN BEGIN OF LINE

SELECTION-SCREEN COMMENT 1amp TEXT-S1 FOR FIELD NODATA

PARAMETERS4 NODATA DEFAULT 33 LOER CASE 7ata

SELECTION-SCREEN END OF LINE

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

Batc5i)t7ata 0 si(e trasacti

DATA4 BDCDATA LIE BDCDATA OCCURS ITlt ltEADER LINE

essaes 0 ca(( trasacti

DATA4 MESSTAB LIE BDCMSGCOLL OCCURS ITlt ltEADER LINE

errr sessi )ee7 3 3 r 3X3amp

DATA4 E2GROUP2OPENED

essae tets

TABLES4 T1

copy SAP AG BC420 12-84

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 8588

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

at se(ecti scree

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

AT SELECTION-SCREEN

r) a7 ser st e 0i((e7 0r create sessi

IF SESSION = 3X3 AND

GROUP = SPACE OR USER = SPACE

MESSAGE E1MSamp

ENDIF

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

)e 7ataset

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

FORM OPEN2DATASET USING P2DATASET

OPEN DATASET P2DATASET IN TEXT MODE

IF S9-SUBRC

RITE4 TEXT-E S9-SUBRC

STOP

ENDIF

ENDFORM

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

c(se 7ataset

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

FORM CLOSE2DATASET USING P2DATASET

CLOSE DATASET P2DATASET

ENDFORM

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

create atc5i)t sessi

t 0r ca(( trasacti siamp

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

FORM OPEN2GROUP

IF SESSION = 3X3

SIP

RITE4 $amp 3Create r)3I1amp GROUP

SIP

)e atc5i)t r)

CALL FUNCTION 3BDC2OPEN2GROUP3

EXPORTING CLIENT = S9-MANDT

copy SAP AG BC420 12-85

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 8688

GROUP = GROUP

USER = USER

EEP = EEP

ltOLDDATE = ltOLDDATE

RITE4 amp 3BDC2OPEN2GROUP3I$amp

1$amp 3retrc7e43I+amp

S9-SUBRC

ENDIF

ENDFORM

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

e7 atc5i)t sessi

ca(( trasacti si4 errr sessiamp

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

FORM CLOSE2GROUP

IF SESSION = 3X3

c(se atc5i)t r)

CALL FUNCTION 3BDC2CLOSE2GROUP3

RITE4 amp 3BDC2CLOSE2GROUP3Iamp

1$amp 3retrc7e43I+amp

S9-SUBRC

ELSE

IF E2GROUP2OPENED = 3X3

CALL FUNCTION 3BDC2CLOSE2GROUP3

RITE4

RITE4 amp 3Fe5(era))e 6r7e eret3Iamp

ENDIF

ENDIF

ENDFORM

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

Start e6 trasacti accr7i t )araeters

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

FORM BDC2TRANSACTION USING TCODE

DATA4 L2MSTRINGamp

DATA4 L2SUBRC LIE S9-SUBRC

atc5 i)t sessi

IF SESSION = 3X3

CALL FUNCTION 3BDC2INSERT3

EXPORTING TCODE = TCODE

TABLES D9NPROTAB = BDCDATA

RITE4 3BDC2INSERT3Iamp

copy SAP AG BC420 12-86

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 8788

TCODE

3retrc7e43I+amp

S9-SUBRC

3RECORD43

S9-INDEX

ca(( trasacti si

ELSE

REFRESlt MESSTAB

CALL TRANSACTION TCODE USING BDCDATA

MODE CTUMODE

UPDATE CUPDATE

MESSAGES INTO MESSTAB

L2SUBRC = S9-SUBRC

RITE4 3CALL2TRANSACTION3

TCODE

3retrc7e43I+amp

L2SUBRC

3RECORD43

S9-INDEX

LOOP AT MESSTAB

SELECT SINGLE FROM T1 ltERE SPRSL = MESSTAB-MSGSPRA

AND ARBGB = MESSTAB-MSGID

AND MSGNR = MESSTAB-MSGNR

IF S9-SUBRC =

L2MSTRING = T1-TEXT

IF L2MSTRING CS 313

REPLACE 313 ITlt MESSTAB-MSGH1 INTO L2MSTRING

REPLACE 3$3 ITlt MESSTAB-MSGH$ INTO L2MSTRING

REPLACE 33 ITlt MESSTAB-MSGH INTO L2MSTRING

REPLACE 33 ITlt MESSTAB-MSGH INTO L2MSTRING

ELSE

REPLACE 33 ITlt MESSTAB-MSGH1 INTO L2MSTRING

REPLACE 33 ITlt MESSTAB-MSGH$ INTO L2MSTRING

REPLACE 33 ITlt MESSTAB-MSGH INTO L2MSTRING

REPLACE 33 ITlt MESSTAB-MSGH INTO L2MSTRING

ENDIF

CONDENSE L2MSTRING

RITE4 MESSTAB-MSGT9P L2MSTRING$+amp

ELSE

RITE4 MESSTAB

ENDIF

ENDLOOP

copy SAP AG BC420 12-87

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 8888

SIP

Eree 0e5(era))e

IF L2SUBRC AND E2GROUP SPACE

IF E2GROUP2OPENED = 3 3

CALL FUNCTION 3BDC2OPEN2GROUP3

EXPORTING CLIENT = S9-MANDT

GROUP = E2GROUP

USER = E2USER

EEP = E2EEP

ltOLDDATE = E2ltDATE

E2GROUP2OPENED = 3X3

ENDIF

CALL FUNCTION 3BDC2INSERT3

EXPORTING TCODE = TCODE

TABLES D9NPROTAB = BDCDATA

ENDIF

ENDIF

REFRESlt BDCDATA

ENDFORM

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

Start e6 scree

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

FORM BDC2D9NPRO USING PROGRAM D9NPRO

CLEAR BDCDATA

BDCDATA-PROGRAM = PROGRAM

BDCDATA-D9NPRO = D9NPRO

BDCDATA-D9NBEGIN = 3X3

APPEND BDCDATA

ENDFORM

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

Isert 0ie(7

Page 16: BC420_46C - 012The Transaction Recorder

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 1688

068

983209 SAP AG 2001

Recording Buidelines

Test the transaction before recording

Start the recording

hange field alues onl( for fields

releant to the recording

As of 48 all filled fields are recorded

Transaction must be properl( eitedCSA1

Use of scroll bars cannot be recorded

Specia recording notes

F8 F and your o$n F8 and F hep (Pamp527SS 5N =7+P9amp7gt47ST Pamp527SS 5N A+479

amp7gt47ST) are not recorded This aso appies to a commands under the System and $el

menus aues for defaut variants ( transaction variants) are not incuded

7rror and $arning diaogs are not recorded 5ny the 56 code and the fied contents reuired for

further processing on the current screen are recorded

Note uring recording the data entered is $ritten to the dataase

copy SAP AG BC420 12-16

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 1788

063

983209 SAP AG 2001

1n-o( SAP ontrols and Data Transfer

bull SAP Picture ontrolbull SAP ETML ie)er ontrol

bull SAP Tet 1dit ontrol

bull AL Brid ontrol

bull SAP Tree ontrol

bull

ranch 6

ranch amp

Root

These and other controls do not support batch input$

Root

ranch amp

ranch amp6

The ne$ 7noy SAP contros deveoped for ampeease B do not support atch input or ca

transaction

=o$ever tae contros and tastrips do support atch input

copy SAP AG BC420 12-17

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 1888

065

983209 SAP AG 1999

The Transaction Recorder

PrinciplesPrinciples

Recording )ith the LSMWRecording )ith the LSMW

Principles of atch Input and all TransactionPrinciples of atch Input and all Transaction

Integrating the TA Program into the DWIntegrating the TA Program into the DW

Using the TA Recorder Using the TA Recorder

copy SAP AG BC420 12-18

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 1988

067

983209 SAP AG 1999

Session

generator

Recording Using the LSMW

-ith the +S- you can create your o$n recordings

The +S- uses the standard TA recorder here yet evauates the recording itsef The information

from the recording is used to create atch input sessions

The created atch input session can e processed as usua $ith the atch input monitor

Note As $ith the standard procedure it is euay important that the data is converted

copy SAP AG BC420 12-19

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 2088

0amp0

983209 SAP AG 1999

reating Recording

Admnraon

ecordn

Goo

ame of recording

Description

)ner

ame of transaction

Start recording

lto into the +S- and seect the menu path ampoto (Recorings An overvie$ of a previousy

created recordings for your proect are dispayed To start a ne$ recording seect Create

To create a recording you must define the name the description and the o$ner

7nter the name of the transaction you $ant to record

7ecute the transaction and compete it propery

Note ampecordings are assigned to ony one proect 9 so the name of the recording must e uniue

copy SAP AG BC420 12-20

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 2188

0amp6

983209 SAP AG 1999

hanging ustomer Data$ Initial Screen

9ield ontents

BCC$Samp $SZAV

BCamp(Camp )00

02-($++ -88-10000

02-0110

02-0130

$SZAV

9ield ame

Comer

Company code

Z-88-10000

Genera daa

Comer Z-88-10000

+ame

9ield ontents

BCamp(Camp $PA

BCS$BSC SAPSZA1 0300ASS

BCS$BSC SAPSZA1 0301Camp$

BCC$Samp SZA10100-+$B

A1AA-S Garden Sree

A1AA-amp$S+$1 34

A1AA-PampSCamp1 02105

9ield ame

Screen

111

Screen

106

In the aove eampe the transaction Change customer F01 is recorded

Note

You must ma)e some modification to the field values for all the fields you ant to capture

for the data transfer For the purposes of recording a change can simply mean overriting

one single character in a field ith the same character

ven if fields are to e filled using S$amp$ parameters the values must still e changed on

the screen in order to capture them

(ith online transactions screen sequences may appear that are different than in the

recording

copy SAP AG BC420 12-21

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 2288

0ampamp

983209 SAP AG 1999

Results

RecordingRecording R1lt6 Demolt6

9D0amp hange customer Caccounting

SAPM90ampD 0608

DltURSR R90ampD=UR

Dlt=D1 gt00

R90ampD=UR 5560000

R90ampDD0660

US1ltA

SAPM90ampD 0666

Dlt=D1 UPDA

DltSUSR SAPLSA6

DltSUSR SAPLSA6

DltURSR SA6ltD0600T1LltUM1

ADDR6ltDATASTR11T 4 Barden Street

ADDR6ltDATAPSTltD1 0amp602

ADDR6ltDATAIT6 oston

SA6ltD0600T1LltUM1 8638257755

The resuts of the recording using the +S- are dispayed in a tree structure

After the recording has finished you can edit it Cou can deete fieds or add ne$ ones

copy SAP AG BC420 12-22

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 2388

0amp

983209 SAP AG 1999

Assigning 9ield ames

Recording R16 Demolt6

Dlt=D1 UPDA

DltSUSR SAPLSA6

DltSUSR SAPLSA6

DltURSR SA6ltD0600T1L

ADDR6ltDATAAM16 Lisa Eofmeister

ADDR6ltDATAPSTltD1 0amp602

ADDR6ltDATAIT6 oston

ame

+ame

ecrpon

e=a ae

A1AA-+A1

A1AA-+A1

Comer name

a o=meer

Screen =ed

ustomer name

double clic+

Cou can assign names for each recorded fied The specia fieds (2356257 2324ampS5amp

and 23S4S2amp77N) are not incuded here Cou can choose the fied names -hen the atch

input session is created the contents of these fieds are assigned to the target fieds specified in the

eft coumn

Functions

efaut Assigns to the fied names of the underying target fied and its fied description

ampeset eetes fied name and fied description

oue cic 7dits fied name fied description and defaut vaue

Note Cou can use fied names more than once =o$ever the fied name is ony avaiae once in thefied mapping For this reason it is not practica to use fied names more than once

For a those fieds for $hich you do not assign a name the defaut vaue is used $hen the atch

input session is created These defaut vaues can e seen as constants This is especiay usefu for

chec oes (for eampe 08 vie$ seection)

The +S- supports automatic fied mapping Source fieds and target fieds can e assigned to each

other automaticay The fieds are assigned to the corresponding fieds of the same name Therefore

the fied names of the source structure shoud e given the same or simiar names as the fied names

in the target structure

copy SAP AG BC420 12-23

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 2488

0amp4

983209 SAP AG 2001

Addinggtremoing screen fields

Repeating recording

9or identical field names the name and description are

assigned automaticall(

1diting Recording

02-($++

(+A1-A+

(+A1-+A1

(+A1-Samp

(+A1-+A2

(+A1-SAS

Comer accon nmer

e

+ame 1

Sor =ed

+ame 2

Sree

Selection of all

aailable screen

fields

Cou can ater add ne$ screen fieds if you need to 6eep in mind that fieds shoud ony e added in

paces $here they are aso provided on the screen other$ise you $i get an error $hen the I

session is processed

After saving you $i get the message The data has een saved successfuy No$ the recordings

are avaiae for the oect attriutes

If you repeat the recording you can record a ne$ screen seuence $ith ne$ fieds Provided that the

fied names (eg 6NA89NA78) are identica the names and descriptions are automaticay

assigned

copy SAP AG BC420 12-24

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 2588

0amp2

983209 SAP AG 1999

b-ect T(pe and Import Method$ Recording

Standard atch Input gt Direct Input

atch Input Recording

API

IDoc

ampgtec ype ) mpor meod

Bac np recordn

ecordn ec1

The recording is no$ avaiae $ith the oect attriutes

Net you create a proect or su9proect in the +S- and specify process the data transfer

Cou eecute the data transfer as in the standard system

efine the source fieds and structures

efine the fied mapping

ampead and convert the data

2reate and import a atch input session

copy SAP AG BC420 12-25

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 2688

0amp8

983209 SAP AG 1999

The Transaction Recorder

PrinciplesPrinciples

Recording )ith the LSMWRecording )ith the LSMW

Principles of atch Input and all TransactionPrinciples of atch Input and all Transaction

Integrating the TA Program into the DWIntegrating the TA Program into the DW

Using the TA Recorder Using the TA Recorder

copy SAP AG BC420 12-26

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 2788

0amp3

983209 SAP AG 1999

Transaction Recorder

Online

Transaction

RecordingTransfer Program

T

Included in the Batch Input Monitor

Cou use the transaction recorder to record transactions and then use the transaction recording to

generate a transfer program The program ao$s you to transfer data using either atch input or ca

transaction

copy SAP AG BC420 12-27

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 2888

0amp5

983209 SAP AG 1999

hanging ustomer Data$ Initial Screen

9ield ontents

BCC$Samp $SZAV

BCamp(Camp )00

02-($++ Z-88-10000

02-0110

02-0130

$SZAV

9ield ame

Comer

Company code

Z-88-10000

Genera daa

Comer Z-88-10000

+ame

9ield ontents

BCamp(Camp $PA

BCS$BSC SAPSZA1 0300ASS

BCS$BSC SAPSZA1 0301Camp$

BCC$Samp SZA10100-+$B

A1AA-S Garden Sree

A1AA-amp$S+$1 34

A1AA-PampSCamp1 02105

9ield ame

Screen

111

Screen

106

In the aove eampe the transaction Change customer F01 is recorded

copy SAP AG BC420 12-28

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 2988

0amp7

983209 SAP AG 2001

hange Debitor$ Pa(ment Transactions C6

Banlt dea

Screen

10

9ield ontent

BCC$Samp (+B(-BA+(+01

BCamp(Camp BA+((+B(-BA+(S01

(+B(-BA+(01 12345679

(+B(-BA+(+01 22222222

Debitor 5560000

9ield ame

Inde

copy SAP AG BC420 12-29

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 3088

00

983209 SAP AG 1999

hanging ustomer Data$ Pa(ment Transactions Camp

Addre

an+ countr( US

an+ code 6amp42837

Banlt dea

ustomer 5560000

9ield ontents9ield ame

BCC$Samp (+A1-(+ZA

BCamp(Camp $PA

(+B(-Z01

Screen

10

Screen

100

SAPLBA

9ield ontents

BCC$Samp B+(A-BA+(A

BCamp(Camp +

B+(A-BA+(A +aona Banlt

9ield ame

In different transactions the modue poo may change This is the case $ith for eampe customer

master data The TA recorder records modue poo changes automaticay

copy SAP AG BC420 12-30

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 3188

06

983209 SAP AG 1999

Eierarch( Displa( of the Recording

02amp

02

SAP02 0106

BCC$Samp 02-0130

BCamp(Camp )00

02-($++ -88-10000

02-0110

02-0130

SAP02 0111

BCamp(Camp V

BCC$Samp A1AA-amp$S+$1

A1AA-S Garden Sree

Recording

-ith the TA recorder the resuts are aso a ist in a hierarchy dispay =o$ever you cannot assign

your o$n fied names as you can in the +S-

copy SAP AG BC420 12-31

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 3288

0amp

983209 SAP AG 1999

Recording erie)

Recording

Transfer program

9unction module

ontains onl( the data

from the recording

Test data

Test

reate

reate

reate

reate

1dit hange recording

Process recording

Cou can edit the recording as needed

The recording can e tested and eecuted again The screens are run through in the same $ay as in

the recording

The recording can then e used to create

atch input sessions

Test data

ata transfer programs $ith atch input or ca transaction

Function modues

copy SAP AG BC420 12-32

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 3388

0

983209 SAP AG 1999

1 02 BS

2 SAP02 106

3 BCC$Samp $SZAV

4 BCamp(Camp )00 5 02-($++ -88-10000

6 02-0110

7 02-0130

8 $SZAV

9 SAP02 111

10 BCamp(Camp V

11 BCC$Samp A1AA-amp$S+$1

12 A1AA-S Garden Sree

Program Screen St 9ield ame 9ield alue

Recording 1ditor

Recording

Add gt delete lines 9ormat chec+

Import gt eport of recording

In the editor you can add or deete ines Cou can aso change the contents of individua ines

-ith the function Chec) you can specify $hether the edited version of the recording sti has the

correct synta

Cou can aso eport import recordings to from a seuentia fie

After editing save the recording changes

copy SAP AG BC420 12-33

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 3488

04

983209 SAP AG 1999

Recording Seeral Transaction Runs

RecordingF

Directl( after the first recordingG or

In the displa( mode of the recording

In this step you can record additiona transactions and add additiona transaction runs to the

recording

Cou can record the additiona transactions directy after a recording or in the edit screen of a

recording

copy SAP AG BC420 12-34

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 3588

02

983209 SAP AG 1999

1ditor$ Importing and 1porting Recordings

6 T 9D0amp S

amp SAPM90ampD 608

DltURSR

4

2

8 SAPM90ampD 666

60

66

Program Screen St 9ield name 9ield alue

cempA

e name

aa =orma

cemp

A

e name

aa =orma

1port

Import

Presentation Serer

If the editor functions in the systems do not provide a the functions you need you can do$noad the

recording to your presentation server using the Eort function and then edit the recording using a

P2 editor

Cou use the Import function to import the data ac into the amp System ae sure the fie is sti in

the correct format

copy SAP AG BC420 12-35

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 3688

08

983209 SAP AG 1999

Processing the Recording

Recording

Process )ith ALL TRASATI

Parameer

Proce mode$pdae mode

CA mode

e=a e

Con a=er comm

+o a B eon

nd +o a B mode

A

A

T

The recording can e eecuted directy The data from the recording is used and the transaction is

processed $ith ca transaction

2a transaction provides a range of options for caing appication transactions $hich are discussed

on the foo$ing t$o pages

copy SAP AG BC420 12-36

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 3788

03

983209 SAP AG 1999

Process mode

Update mode

ATT mode

Processing Recording )ith T 6

A

1

Displa( all screens

Displa( errors onl(

o displa(

L

S

A

Local

S(nchronous

As(nchronous

A

o ATT

ATT )ithout indiidual screen control

ATT )ith indiidual screen control

Processing mode

=ere you can specify the processing mode 9 it is the same as the processing mode for atch input

4pdate mode

=ere you can specify the update mode For more information see the unit ca transaction

2ATT mode

=ere you can mae specia settings if you $ant to test the recording under 2ATT conditions (ony

necessary for 2ATT runs) Specia functions are caed in the 2ATT too for each screen at the end of

P5 and at the start of PAI

copy SAP AG BC420 12-37

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 3888

05

983209 SAP AG 1999

Default sie

ont after commit

ot a I session

1nd$ ot a I mode

Processing Recording )ith T amp

The screen standard sie is used for the

processing

ommit )or+ does not end the processing

o I mode is actie The transaction )ill run

through as in online

I mode is selected nce the data in the D

table is processedG the I mode is set to inactie

Standard siDe

If you seect this the screens are processed in the standard siDe in the foreground (in foreground or

dispay errors ony) Note the standard siDe is a$ays used for acground processing

Further after commit

The first commit $or in a transaction does not ead to the end of the recording

Note A atch input transaction is ended $ith the first commit $or

No I mode

The system fied SC9INPT is not set (SC9INPT E ) So transactions are run through as in onine

7nd No I mode

5ny use if you choose the processing mode 7 (dispay errors ony) Then the transaction is processed in the acground in atch input mode and if there is an error the screens run through in

the foreground

copy SAP AG BC420 12-38

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 3988

07

983209 SAP AG 1999

I Mode

atch input

mode

nline

Some transactions behae differentl( in batch input mode

than in online Cbatch input capabilit(

atch input mode sets the s(stem field SIPT H

Not every transaction can run the same onine and in atch input mode The transaction must decide

itsef $hether it is caed onine or in atch input mode

The system sets the system fied SC9INPT E G if the atch input mode is active (this aso appies

to ca transaction) From this system fied the transaction can identify $hether to run onine or in

atch input mode

copy SAP AG BC420 12-39

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 4088

040

983209 SAP AG 1999

reating a Session 9rom the Recording

Recordingnl( contains the data

from the recording

Seon name 02amp

Aoraon ampBS(eep eon

oclt dae 10102000

Cou can create a atch input session directy from the recording that you can then process using the

atch input monitor

copy SAP AG BC420 12-40

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 4188

046

983209 SAP AG 1999

reating Test Data

Test Data

Recording

ranranpBC420AAe name

The file onl( contains the data from the recording

Rgt

Application Serer

Structure

Cou can create a fie from the recordingH the fie $i contain a the fieds from the recording The

fieds are added to the fie $ith the ength you specified in the definition

The fied order corresponds to the order in the recording overvie$ Technica fieds

(2356257 2324ampS5amp and so on) are incuded

The data can ony e stored on the appication server If you do not specify a path the fie is stored in

the $or directory of the appication server

If the specified test fie aready eists the ne$ data record is added to this fie

copy SAP AG BC420 12-41

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 4288

04amp

983209 SAP AG 1999

ed conen

reating a Program

Recording

ZBC420ampProram name

Transfer Program

e daa

ead =rom =e

ran=er =rom recordn

reate

9ile nameTest data

ranranpBC420AA

Cou can generate a program from the recording

In the foo$ing diaog o enter a program name In addition you can choose the type and method

for fiing the maintained fied contents from the recorded screens

4se the vaues used for the recording If you reuire feie data transfer you $i have to modify

this program ater

ParameteriDe the input vaues and read these vaues from a fie A data structure is created for

parameteriDationH the data records are read from an eterna fie into this data structure The

program assumes the fie $as taiored to this data structure

If you have decided to parameteriDe the input vaues you shoud aso create a test fie during

generation To do this seect the checo and enter a name for the fie

The attriute maintenance screen of the AAP editor appears aintain the attriutes and save the

program

copy SAP AG BC420 12-42

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 4388

04

983209 SAP AG 1999

Program 9unctions

Online

transaction

Transfer program

To

error

1rror

ption 6ption ampFlat SAP

structure

Monitor

Cou have no$ generated a data transfer program for importing data into the amp System The

program can eecute the data transfer using atch input or ca transaction

If you choose option 1 and there is an error the data record is paced into a atch input session

copy SAP AG BC420 12-43

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 4488

044

983209 SAP AG 1999

Benerating 9unction Modules

Recording

Zcreaedeor ncon mode

ncon rop

Sor eD

ZBC420

Creae comer

9unction module

nl( one data record can be processed at a time

In the net diaog o you can generate a function modue a function group and short tet from the

recording The function modue is automaticay created in the function group

copy SAP AG BC420 12-44

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 4588

042

983209 SAP AG 1999

9unction of 9unction Modules

Online

transaction

To

error

1rror

ption 6 ption amp

9unction module

Import

Parameter 1port

parameter

Tables

M1SSTA

Monitor

S$BC

Import interface

The import interface consists of a technica part and the fieds from the recording (A parameter is

created for each input fied of the recorded transactions)

7port interface

Simpy consists of the parameter S4amp2 The function modue $i return a vaue in the system

fied SC9S4amp2 after caing ca transaction This return vaue is set to Dero if the data record has

een correcty processed (5ny appies to 2T)

If a session is created you $i e notified $hether the data record coud e paced into the session

Tae interfaceThis is used ony if the function modue $ors $ith ca transaction The tae contains a the

system messages

copy SAP AG BC420 12-45

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 4688

048

983209 SAP AG 1999

Import Interface of 9unction Module

$

Technical

fields

Data

fields

BI session or CALL TRANSACTION

Processin $ode

pdate $ode

a$e oamp BI session iamp (T initial)

Bacround user iamp (T initial)

Delete session aampter processin

Loc date oamp session

ODATA indicator

TU

MD1

UPDAT1

BRUP

US1R

=11P

ELDDAT1

DATA

Cou can use parameter 2T4 to specify $hether the function modue creates a atch input session

(2T4 E ) or updates the data record directy using ca transaction (2T4 E G)

The other parameters are fied as for a atch input session header

Note 7very time the function modue is caed a atch input session is created

If the session is to contain severa transactions proceed as foo$s

ltenerate the transaction severa times This can e achieved y recording the transaction again The

function modue interface $i then contain more than one transaction -hen the function modue is

caed severa transactions can e generated for each session

copy SAP AG BC420 12-46

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 4788

043

983209 SAP AG 1999

The Transaction Recorder

PrinciplesPrinciples

Recording )ith the LSMWRecording )ith the LSMW

Principles of atch Input and all TransactionPrinciples of atch Input and all Transaction

Integrating the TA Program into the DWIntegrating the TA Program into the DW

Using the TA Recorder Using the TA Recorder

copy SAP AG BC420 12-47

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 4888

045

983209 SAP AG 1999

Benerated Program

9unction modules DltP1ltBRUP

DltIS1RT

DltLS1ltBRUP

AAP Program

Define structure of

data in seJuential

fileDefine D

table

pen seJuential file

pen I session

Read data recordCseJuential file

9ill D table

9ill I session gtALL TRASATI

Last data record K

lose I session

lose seJuential file

The generated program has the structure dispayed aove It uses the standard function modues for

creating atch input sessions

copy SAP AG BC420 12-48

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 4988

047

983209 SAP AG 1999

Structure of the Benerated Program

Benerated part

Define D

table

pen seJuential file

pen I session

Read data record

9ill D table

9ill I session gtALL TRASATI

Last data recordK

lose I session

lose seJuential file

Include DR16

Define filestructure

P1ltDATAS1T

P1ltBRUP

DltDPR

Dlt9I1LD

DltTRASATI

LS1ltBRUP

LS1ltDATAS1T

The generated program consists of t$o parts 9 a generated part and the incude 2amp72G8 The

incude is provided in the standard system

The incude contains the definition of the reuired 2 tae and a further seven suroutines These

suroutines eecute the foo$ing functions

5pen and cose fie

5pen and cose session

Fi 2 tae

Fi session

The generated part is the main program and cas the reevant suroutines A structure is aso

generated in the generated part to read the eterna data into the fie

See the Appendi for more information on the 2amp72G8 program

copy SAP AG BC420 12-49

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 5088

020

983209 SAP AG 1999

Structure of D Table

PRBRAM DPR D1BI 9AM 9ALPRBRAMPRBRAM DPRDPR D1BID1BI 9AM9AM 9AL9AL

SAPM90ampD 0602

R90ampD=UR 600000

R90ampDU=RS 0006

R90ampD=T=D =UA

SAPM90ampD 0660

=A6AM16 Smith

=A6PSTL 87000

=A6LAD6 US

=A6SPRAS 1

SAPM90ampD 06amp0

=A6ST1B US6amp428357DDATA

PRBRAM

DPR

D1BI

9AM

9AL

EAR

UM

EAR

EAR

EAR

40

4

6

6amp

6amp

D Module pool

D Screen number

D Start of screen

D 9ield name

D 9ield contents

9ield ame T(pe Length Short Tet

AAP Dictionar(

The 2 tae has the same structure as in a standard transfer

copy SAP AG BC420 12-50

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 5188

026

983209 SAP AG 1999

Read Structure

Recording

DATA BEGIN OF record data element BUKRS bukr$amp data element KTOKD ktokd$amp data element NA(EG) name$+amp data element SORT ortl$ampEND OF record-

record

Automaticall( generated

from recording

The structure of the fie is automaticay generated and is a$ays defined $ith the name amp725amp

The generated structure a$ays has the same ayout 7ach fied is defined y t$o generated ro$s

The first ro$ is a$ays a comment ro$ containing the tet J data eement and the data eement of

the screen fied from the recording In the net ro$ the fied itsef is defined $ith the name of the

data eement foo$ed y a three9digit position numer $hich specifies the ocation in the structure

The ength of the fied is set y the ength of the data eement If a fied is not defined through a data

eement the system uses the ength of the screen fied

copy SAP AG BC420 12-51

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 5288

02amp

983209 SAP AG 1999

pening and losing the 9ile

P1ltDATAS1T

LS1ltDATAS1T

FOR( oendataet USING dataet-O)EN DATASET dataet IN TET (ODE-

IF S01SUBR2 34 - 5RITE 6 te7t1e S01SUBR2-STO)-

ENDIF-

ENDFOR(-

FOR( cloedataet USING dataet-2OSE DATASET dataet-

ENDFOR(-

Include

DR16

The suroutine 5P7N3ATAS7T opens the seuentia fie

The suroutine 2+5S73ATAS7T coses the seuentia fie

copy SAP AG BC420 12-52

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 5388

02

983209 SAP AG 1999

9unction Modules for I Program

lient

Session name

Eold date

=eep session

D user name

RecordK

LI1T

BRUP

ELDDAT1

=11P

US1R

R1RD

DltP1ltBRUPDltP1ltBRUP

Transaction code

D table

TD1

DPRTA

DltIS1RTDltIS1RT

DltLS1ltBRUPDltLS1ltBRUP

pen Isessionpen Isession

Insert data for

transactions

Insert data for

transactions

lose I

session

lose I

session

The foo$ing function modues are provided for creating atch input sessions (function group

S2)

235P7N3ltamp54P

2reates a ne$ session and contains genera data for the $hoe session

23INS7ampT

Inserts a the data for a transaction into the session The transferred interna tae $ith the

structure 2ATA must contain a the data reuired for fuy processing the transaction

232+5S73ltamp54P

2oses the session after a the data has een inserted As soon as the session has een cosed it

can e processed

The interna tae $ith the structure 2ATA can ony contain atch input data for one singe

transaction run So the individua transactions are inserted into the atch input session in a oop

using severa 23INS7ampT cas

copy SAP AG BC420 12-53

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 5488

024

983209 SAP AG 2001

9unction Module DltP1ltBRUP

ALL 9UTI DltP1ltBRUPALL 9UTI DltP1ltBRUP

1PRTIB

LI1T client

BRUP session name

ELDDAT1 loc+ date

=11P delete flag

US1R bdc user name

R1RD recording

IMPRTIB

NID internal session +e(

11PTIS

1PRTIB

LI1T client

BRUP session name

ELDDAT1 loc+ date

=11P delete flag

US1R bdc user name

R1RD recording

IMPRTIB NID internal session +e(

11PTIS

-ith the function modue 235P7N3ltamp54P you can open a atch input session

The foo$ing parameters are mandatory

2+I7NT (cient)

ltamp54P (session name)

4S7amp (user name)

Note The 4S7amp must a$ays e specified This user name is reuired for processing the session

in atch mode

The foo$ing parameters are optiona

=5+AT7 specifies the eariest date on $hich the session can e started677P fag specifies $hether session shoud e deeted after it has een successfuy processed The

677P fag is ignored if the session contains errors

677P E K K means deete the session after processing (defaut vaue) H

677P E KGK means do not deete session

amp725amp E KGK ao$s you to create a recording instead of a I session

If gtI is specified the function modue returns the interna session ey This is needed to e ae to

differentiate sessions that have the same name

-ith 7G27PTI5NS you get various return vaues that can e ueried $ith SC9S4amp2

Note In onine mode the onine user is used for the authoriDation checs regardess of the user

name specified

copy SAP AG BC420 12-54

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 5588

022

983209 SAP AG 1999

Subprogram P1ltBRUP

P1ltBRUP

FOR( oen8rou-IF e9on -

2A FUN2TION BD2O)ENGROU) E)ORTING 2IENT lt1mandt GROU) 8rou USER uer KEE) kee

=ODDATE gtolddate-

ENDIF-ENDFOR(-

Include

DR16

The suprogram 5P7N3ltamp54P opens the atch input session

copy SAP AG BC420 12-55

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 5688

028

983209 SAP AG 1999

9unction Module DltIS1RT

ALL 9UTI DltIS1RTALL 9UTI DltIS1RT

IMPRT

TD1 Transaction code

PSTltLAL Update locall(

PRITIB print list

TAL1S DPRTA bdclttable

11PTIS

IMPRT

TD1 Transaction code

PSTltLAL Update locall(

PRITIB print list

TAL1S DPRTA bdclttable

11PTIS

-ith the function modue 23INS7ampT you can add transaction data to the session

Cou need an interna 2 tae to transfer the data

The foo$ing parameters are mandatory

T257 Transaction code

CNPamp5TA 2 tae

The foo$ing parameters are optiona

P5ST3+52A+ E KGK activates oca updating This means that the data to e updated is ept in the

appication server and updated in the ast step of the transaction This does not invove the update

process (For more information see course 28 Programming ataase 4pdates)

PampINTINlt E KGK 9 ists processed in I $i e printed immediatey -ith 7G27PTI5NS you get various return vaues that can e ueried $ith SC9S4amp2

copy SAP AG BC420 12-56

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 5788

023

983209 SAP AG 1999

Subprogram DltTRASATI

DltTRASATI

FOR( BD2TRANSA2TION USING tcode-

IF e9on -2A FUN2TION BD2INSERT

E)ORTING T2ODE tcode TABES D0N)ROTAB bdcdata-

ESE-

ENDIF-ENDFOR(-

T

Include

DR16

The suprogram 23TampANSA2TI5N moves the fied 2 tae either to a atch input session

or uses ca transaction to import the data into the system 5n the seection screen you can specify

$hether you $ant to create a session or you $ant to use ca transaction to process the data directy

The S7SSI5N fied is then set according to your seection

copy SAP AG BC420 12-57

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 5888

025

983209 SAP AG 1999

9unction Module DltLS1ltBRUP

ALL 9UTI DltLS1ltBRUP

11PTIS

TltP1 6

NU1U1lt1RRR amp

-ith the function modue 232+5S73ltamp54P you can cose a atch input session

In 7G27PTI5NS you get various return vaues that can e ueried $ith SC9S4amp2

copy SAP AG BC420 12-58

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 5988

027

983209 SAP AG 1999

Subprogram LS1ltBRUP

FOR( cloe8rou-IF e9on -cloe batcgt 9nut 8rou

2A FUN2TION BD22OSEGROU)-

ESE-IF e8rouoened -

2A FUN2TION BD22OSEGROU)-

ENDIF-ENDIF-

ENDFOR(-

LS1ltBRUPlose session

lose error session

Include

DR16

The suprogram 2+5S73ltamp54P coses the atch input session The suprogram differentiates

et$een a norma I session (S7SSI5N E G) and a session opened $hen ca transaction

encountered an error (73ltamp54P35P7N7 E G)

copy SAP AG BC420 12-59

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 6088

080

983209 SAP AG 1999

Subprograms DltDPRG Dlt9I1LD

DltDPR

Dlt9I1LD

FOR( bdc9eld USING nam al-IF al 34 nodata-2EAR bdcdata- bdcdata1nam nam- bdcdata1al al- A))END bdcdata-ENDIF-

ENDFOR(-

FOR( bdcdltnro USING ro8ram dltnro- 2EAR bdcdata-Bdcdata1ro8ram ro8ram-Bdcdata1dltnro dltnro-Bdcdata1dltnbe89n - A))END bdcdata-ENDFOR(-

Include

DR16

The incude 2amp72GG contains t$o suprograms 23CNPamp5 and 23FI7+

Suprogram 23CNPamp5 fis the 2 tae $ith program names and screen numers

Suprogram 23FI7+ fis the 2 tae $ith fied names and vaues

7ach suprogram creates an entry in the 2 tae

copy SAP AG BC420 12-60

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 6188

086

983209 SAP AG 1999

9illing the D Table

erorm bdcdltnro u9n8 SA)(FD +- erorm bdc9eld u9n8 BD22URSOR RFD1BUKRS- erorm bdc9eld u9n8 BD2OK2ODE 6- erorm bdc9eld u9n8 RFD1BUKRS record1BUKRS- erorm bdc9eld u9n8 RFD1KTOKD record1KTOKD-

erorm bdcdltnro u9n8 SA)(FD -

erorm bdc9eld u9n8 BD22URSOR KNA1S)RAS- erorm bdc9eld u9n8 BD2OK2ODE 6- erorm bdc9eld u9n8 KNA1NA(E record1NA(E-

erorm bdc9eld u9n8 KNA1SORT record1SORT-

Recording Benerated automaticall(

from the recording

)ERFOR( bdcdltnro USING SA)(FD +- )ERFOR( bdc9eld USING BD22URSOR RFD1BUKRS-)ERFOR( bdc9eld USING BD2OK2ODE 6-)ERFOR( bdc9eld USING RFD1BUKRS record1BUKRS-)ERFOR( bdc9eld USING RFD1KTOKD record1KTOKD-

)ERFOR( bdcdltnro USING SA)(FD -

)ERFOR( bdc9eld USING BD22URSOR KNA1S)RAS-)ERFOR( bdc9eld USING BD2OK2ODE 6-)ERFOR( bdc9eld USING KNA1NA(E record1NA(E-

)ERFOR( bdc9eld USING KNA1SORT record1SORT- ---

The 2 tae is fied $ith data from the recording The suroutines 23CNPamp5 and

23FI7+ are used for this

The suroutines are caed in the reuired structure or seuence

copy SAP AG BC420 12-61

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 6288

08amp

983209 SAP AG 1999

erie)

SAPDatabase

SeJuential9ile

SAPDatabase

ALL TRASATIALL TRASATI

SeJuential9ile

ATE IPUTATE IPUT

D TableD TableD TableD Table

I Monitor

T

In contrast to atch input you can use ca transaction to directy pass data to the diaog interface

$ithout using a atch input session Cou use an interna tae (2 tae same structure and ayout

as atch input) to temporariy store your screen data Then you ca the desired transaction in your

program

Note 5n average the 2a Transaction method is 8 to times faster than using atch Input

copy SAP AG BC420 12-62

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 6388

08

983209 SAP AG 1999

all Transaction Program$ 1ample

RE)ORT abcbdcdcdeb9ct-

)ARA(ETERS d9mode DEFAUT A

udmode DEFAUT S-FOR( calltranact9on-2A TRANSA2TION FD

USING bdcdata (ODE d9mode

U)DATE udmode-

IF lt1ubrc NE - 5RITE 6 ---

ENDIF-ENDFOR(-

Screen

00

Screen

100

Screen

An additiona system ro area is added for the caed transaction The system uses this area for

processing the individua screens in the transactionH the data from the tae is added here After the

transaction is processed the second ro area is reeasedH the system continues processing in the first

ro area

Notes

In contrast to atch input there is no error ogging (error sessions) here For processing the caed

transaction the system uses the authoriDations of the user that caed the transaction The 2 tae

can ony hod data for one transaction run at a time efore another transaction is caed and its data

can e added you must eecute a amp7Famp7S= for the 2 tae

copy SAP AG BC420 12-63

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 6488

084

983209 SAP AG 1999

ALL TRASATI C6

RE)ORT 777-

2A TRANSA2TION FD USING bdcdata (ODE E-

Default for MD1 is A

2A TRANSA2TION 3tranact9oncode4 USING 3bdc1table4 C (ODE A E N C-

-ith the parameter 57 you can seect a specific dispay mode for processing the transaction The

foo$ing three modes are avaiae

A (ispay a)

If you eecute the program a the screens and a their data are dispayed This is the defaut vaue

for the 57 in 2A++ TampANSA2TI5N

N (ispay nothing)

The screens are not dispayed at a regardess of $hether any of them contained errors As soon as

the transaction has een fuy processed contro is returned to your program (The vaue of the

parameter 4PAT7 determines $hether dataase updates are eecuted or not)

7 (ispay errors ony)As soon as an error occurs in a screen the transaction is s$itched to dispay mode so that you can

correct the errors

These dispay modes are the same as those in the atch input session processing

copy SAP AG BC420 12-64

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 6588

082

983209 SAP AG 1999

RE)ORT 777-

2A TRANSA2TION FD USING BD2DATA U)DATE -

ALL TRASATI Camp

RE)ORT 777-

2A TRANSA2TION FD USING bdcdata U)DATE -

2A TRANSA2TION 3tranact9oncode4 USING 3bdc1table4 C (ODE A E N C U)DATE A S C -

Default for UPDAT1 is A

-ith the parameter 4PAT7 you can contro ho$ dataase updates arising from a transaction are

carried out There are three options

A (asynchronous updating) The caed transaction does not $ait unti the dataase has een

updated it simpy for$ard the updates to the SAP update service This usuay speeds up the 2T

program This processing mode is N5T recommended for arge data sets as the caed transaction

does not receive a competion message from the update modue

The caing 2T program therefore cannot te if the transaction has een successfuy competed Cou

shoud use the updating administration function (transaction S8) to determine $hether updating

$as terminated eary The error anaysis correction functions for are ess hepfu than $ith

synchronous updating

S (synchronous updating) -ith synchronous updating the caed transaction $aits unti a the

updates have een competed So processing is so$er than $ith synchronous updating The caed

transaction can ho$ever report any updating errors to the program $hich maes error

anaysiscorrection easier

+ (local updating) $ith oca updating the dataase is not updated in a separate process it is

updated in the caers process (see appication hep documentation for the AAP ey$ord S7T

4PAT7 TAS6 +52A+)

copy SAP AG BC420 12-65

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 6688

088

983209 SAP AG 1999

ALL TRASATI C

RE)ORT 777-DATA mtab T0)E TABE OF bdcm8coll-

2A TRANSA2TION FD USING bdcdata (ESSAGES INTO mtab-

2A TRANSA2TION 3tranact9oncode4 USING 3bdc1table4 C (ODE A E N C U)DATE A S C (ESSAGES INTO 3metab4 C -

7SSAlt7S specifies that a system messages that are output during the eecution of a 2A++

TampANSA2TI5N are $ritten to the interna tae L7SSTA The interna tae must have the

structure 2Slt25++

4nie the cassica atch input processing $ith sessions 2A++ TampANSA2TI5N does not offer any

specia processing procedures for transactions containing errors There are no restart functions for

transactions that contain errors or that cause updating terminations

copy SAP AG BC420 12-66

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 6788

083

983209 SAP AG 1999

ALL TRASATI C4

RE)ORT 777-DATA mltot T0)E ctuaram-

2A TRANSA2TION FD USING BD2DATA

O)TIONS FRO( mltot-

2A TRANSA2TION 3tranact9oncode4 USING 3bdc1table4 C (ODE A E N C U)DATE A S C (ESSAGES INTO 3metab4 C O)TIONS FRO( ot C -

RE)ORT 777-DATA mltot T0)E ctuaram-2A TRANSA2TION FD USING bdcdata

O)TIONS FRO( mltot-

The addition 5PTI5NS enaes the ca transaction statement to e controed through a structure

The structure must have the dictionary type 2T43PAampAS

The addition 5PTI5NS Famp5 must not e comined either $ith the addition 57 or $ith

4PAT7 ore information on the net side

copy SAP AG BC420 12-67

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 6888

085

983209 SAP AG 1999

Structure TUltPARAMS

DISMD1 Procen mode anaoo o addon amp

UPDMD1 $pdae mode anaoo o addon $PA

ATTMD1 CA mode CA conro

D19SI1 orce de=a EndoE e drn procen

RAMMIT +o eD a Camp amp(

IPT +o a ac np eonF a F S-B+P SPAC

I1D +o a ac np eon a=er end o= BC daa

The components are defined as foo$s

The components 7FSIM7 ampA25IT N5INPT and N5I7N can have the foo$ing

vaues KGK E Ces or K K E No

If the addition 5PTI5NS Famp5 is not specified the foo$ing settings appy to the contro

parameters

IS57 from addition 57

4P57 from addition 4PAT7

2ATT57 2ATT not active

7FSIM7 o not not use defaut $indo$s siDe

ampA25IT Successfu eit at 25IT -5amp6

N5INPT atch input session active (SC9INPT E G)

N5I7N atch input session sti active after end of 2 data

copy SAP AG BC420 12-68

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 6988

087

983209 SAP AG 1999

SMSBID Message ID

SMSBT Message T(pe C1GIGWGSGA

SMSB Message umber

SMSB6 Message ariable 6

SMSBamp Message ariable amp

SMSB Message ariable

SMSB4 Message ariable 4

SMSBID Message ID

SMSBT Message T(pe C1GIGWGSGA

SMSB Message umber

SMSB6 Message ariable 6

SMSBamp Message ariable amp

SMSB Message ariable

SMSB4 Message ariable 4

Return code$

S(stem fields$

alue Meaning

0 Successful

6000 1rror in transaction

6000 1rror in processing call transaction

see also the s(stem fields specified

alue Meaning

0 Successful

6000 1rror in transaction

6000 1rror in processing call transaction

see also the s(stem fields specified

9ield name Meaning9ield name9ield name MeaningMeaning

Return ode and S(stem 9ields

The return code is used to specify $hether the caed transaction $as processed successfuy In

addition severa system fieds are fied The numer I type and variaes of the diaog message

output y the caed transaction Cou need this information to output the message tet

copy SAP AG BC420 12-69

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 7088

030

983209 SAP AG 1999

Benerated Program of the TA Recorder

REFRES= (ESSTAB-

2A TRANSA2TION tcode USING bdcdata (ODE ctumode U)DATE cudate (ESSAGES INTO metab-OO) AT metab- ENDOO)-IF lubrc 34 AND e8rou 34 S)A2E- IF e8rouoenend - 2A FUN2TION BD2O)ENGROU) E)ORTING ---------

--------- E8rouoened - ENDIF- 2A FUN2TION BD2INSERT E)ORTING T2ODE tcode TABES D0N)ROTAB bdcdata-ENDIF-REFRES= bdcdata-

Message table output

pen error session

Insert data record that

has errors into error

session

If you have seected ca transaction on the seection screen the generated program runs as foo$s

The onine transaction is caed $ith ca transaction and passed to tae 2ATA A the

messages arising during the ca transaction are put in the interna tae 7SSTA

7SSTA is output as a ist

If you have specified an error session ( 73ltamp54P L SPA27) on the seection screen and the

ca transaction comes across an error (+3S4amp2 L 0) the error session is opened The error

session is ho$ever ony opened once Then the data record is paced in the session

A the other data records that have errors $ith ca transaction are paced in the same session

copy SAP AG BC420 12-70

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 7188

036

983209 SAP AG 1999

The Transaction Recorder

PrinciplesPrinciples

Recording )ith the LSMWRecording )ith the LSMW

Principles of atch Input and all TransactionPrinciples of atch Input and all Transaction

Integrating the TA Program into the DWIntegrating the TA Program into the DW

Using the TA Recorder Using the TA Recorder

copy SAP AG BC420 12-71

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 7288

03amp

983209 SAP AG 1999

Integrating into the DW

Transfer program

AAP Dictionar(

Integrate

SDA0

SDA6

SDAamp

SDA

Cou can integrate the generated program into the G9- The structure of the fie must e created

in the AAP ictionary The taes SGA0 SGA8 SGA1 and SGA $i e fied

copy SAP AG BC420 12-72

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 7388

03

983209 SAP AG 1999

DW Release 42

Goo

-B eeae 45

aa ran=er ogtec

Int customer data transfer ob-ect

ecord =ed

Dece daa ran=er

d Goo

The ampunction ampor interatin TA recorder prora$s is

i$ple$ented in the

D+-B in Release

The recorder can e integrated as of ampeease and it is provided in the G9- ampeease

ltot to the G9- ampeease 5n the initia screen you can integrate programs y choosing ampoto

( +nt customer ata transfer o-ect

copy SAP AG BC420 12-73

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 7488

034

983209 SAP AG 1999

reating Program as D b-ect

Comer ran=er ogtec

ampgtec ype

Sor eD =or ogtec

aa ran=er proram

Srcre name

9900

(+A1

Cane comer

ZBCA+G

ZB

ustomer transfer ob-ect

umber bet)een 7000 and 7777

b-ect t(pe

Assignment to R ob-ect

Short tet for D ob-ectShort description

Data transfer program

ame of generated program

Structure name

A structure Cstructure la(out )ith this name is created in

the AAP Dictionar(

For ampeease transfer oects $ere not organiDed y 5amp oects ut y a G numer (00089

OOOO) The numer range O0009OOOO is reserved for customers

To create a connection to the ne$ G 9- you must assign the program to a 5amp oect

2reate a short tet for the G oect This tet $i appear in the method seection ist

Specify the program to e incuded

Specify a name for the structure to e created in the AAP ictionary

Note $he generated program appears under program type +N and not under program type

-

copy SAP AG BC420 12-74

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 7588

032

983209 SAP AG 1999

Adantages

Automatic program registration in the DW in

Release 48

ou can use all the functions defined for

standard ob-ects

1ception$ The (reate ampile ith data

function

If you incuded the oect in the ampeease $orench it is automaticay avaiae in the ampeease

B $orench

A the $orench functions are avaiae for your oect ecept for Create files ith transfer ata

copy SAP AG BC420 12-75

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 7688

038

983209 SAP AG 1999

ou are no) able to$

The Transaction Recorder$ Unit Summar(

Use the recording function in the LSMW to create

a batch input session )ith the data from the

eternal s(stem

Use the TA Recorder to create (our o)n data

transfer program

Anal(e programs that )or+ )ith batch input or

call transaction

Integrate the TA Recorder programs into the

DW

copy SAP AG BC420 12-76

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 7788

ercise 1

nit $ -ecorder

$opic 2reating etors

$ransaction -ecorder ercise 1

bull 2reating detors $ith eterna numer assignment

bull etor numers M9980008 to M9980080

Address data for detors $ith eterna numer assignment is to

e transferred using program ampFI700

ro4ect F5

Supro4ect +5

-un +575

$as)s 85 95 8S25

9oad program -F+00

8 In the foo$ing eercises eisting data is to e changed Therefore these detors $ith

eterna numer assignment have to first e created

898 4nder suproect 79 create run 797G9 $ith the name Detors ith

eternal numers

copy SAP AG BC420 12-77

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 7888

891 2reate the foo$ing three tass The tass map the foo$ing process steps

convert data create + session and process + session

89198 In run 797G9 create the foo$ing tas

9 Tas AP9

9 Name 2onvert data 9 Tas type AP

9 Program type +S-

Seect the foo$ing +S- oect

+S- proect 2109

+S- suproect 7I9

+S- oect I997GT

89191 In run 797G9 create the foo$ing tas 9 Tas +5A9

9 Name 2reate I session

Tas type +5A

9 Program type INP

Seect program ampFI700 $ith the variant

I97G9

8919 In run 797G9 create the foo$ing tas

9 Tas S29

9 Name Process I session Tas type S2

9 Program type amp7P5

Seect program ampS2S4 $ith the variant

S497G9

Note that you have to correct the seuence of the tass 2onvert data

create + session and process + session

4se the uttons

89 Start the run

The detors $i e created $ith eterna numer assignments

89 2hec in transaction F0 that the detors M9980008 to M9980080 have een

created

copy SAP AG BC420 12-78

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 7988

ercise

nit $ransaction -ecorder

$opic -ecording function in the 9S8(

bull 2reate a recording using the +S-

bull ltenerate a atch input session

2hange the detor address data in the amp System

Name of the recording +

Name of the file +2055+F9

8 2reate the recording 7I3 using the +S- ampecord the transaction F01 (2hange

detor)

898 efore you create the recording first test the transaction onineQ

For the recording use detor M9980008 5n the initia screen of the F01

maintain the foo$ing fieds ony

etor etor M9980008

2ompany code 0008

Address data seect

Note $he data record must e saved hile recording

891 aintain the names and the descriptions for the foo$ing fieds

Name city street posta code and teephone numereete a other fieds in screen 880 from the recording (eg S5ampT+ +AN8

SPampAS)

4se the same technica names as sho$n in the tae eo$ (automatic fied

mapping)

copy SAP AG BC420 12-79

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 8088

1 2reate the suproect 7I9 and the ne$ oect TA3 in your proect 2109

aintain the oect attriutes and seect the item atch input recording Seect your

recording 7I3

2reate the source structure address

2reate the source fieds according to the tae eo$ 5r copy them from proect 2109S37N suproect 7I900 oect TA900

198 Fie setup The data from the egacy system are dispayed in the foo$ing tae

Fied name Fied type Fied ength escription

N5 2 8B etor numer

NA7 2 Name

STamp77T 2 Street

2ITC 2 2ityPace of residence

MIP 2 80 Posta code

T7+ 2 8B Teephone numer

191 aintain the fied mapping 4se the automatic fied mapping (via menu item

7tras)

19 Specify the fies 5ny maintain the fie name of the source fie

Name of the fie 21099IFI+7

2odepage 8800

19 Import the data and convert them ispay the data in each caseQ

19 2reate a atch input session

19B ampun the atch input session

copy SAP AG BC420 12-80

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 8188

ercise 3

nit $ransaction -ecorder

$opic -ecording ith the $ -ecorder

bull ltenerate a recording using the TA recorder

bull Test the recording

2hange the address data of detors in the amp system

Name recording $+

Name of the file +2055+F9

8 2reate the recording TA37I3 using the transaction recorder ampecord the

transaction F01 (change detor)

898 4se detor M9980008 for the recording 5n the F01 initia screen ony

maintain the foo$ing fieds

etor etor M9980008

2ompany 2ode 0008

Address data seect

Note $he data record must e saved hen recording

eete a fieds that do not eist in the source fie 21099IFI+7 from screen

880 in the recording (eg 6NA89S5ampT+ 6NA89+AN8 6ANNQ9SPampAS) Note o not deete fieds ampF01946ampS and ampF0190880

Save the recording no$

1 S$itch to the recordings overvie$

198 Process the recording $ith the processing mode A (dispay a)

191 Process the recording $ith the processing mode RN (no dispay)

19 If the recording has een tested and no error has occurred generate a I session

and run it using the I monitor If an error shoud occur generate the recordingagainQ

copy SAP AG BC420 12-81

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 8288

From the recording generate the program M21037I3 in your deveopment cass

2109 Seect the foo$ing

bull ampead fied contents from fie

bull 2reate test data in the fie 2103dei3test3tt

98 Save this program and eecute it ltenerate one I session each and process it

2arry out the same steps again using the ca transaction

The generated program shoud no$ e changed so that fie 21099IFI+7 can e

read and processed

98 2hange the defaut vaue of the fie name (parameter dataset) in 21099

IFI+7

91 2hange the structure definition eete the company code fied and the address

data checo from the structure

9 2hange the su9routine ca perform dc3fied for the company code (KampF019

46ampSK) so that the vaue 0008 is transferred

9 2hange the su9routine ca perform dc3fied for the address data checo

(KampF0190880K) so that the vaue G is transferred

9 Start the program again and read the data from the fie 21099IFI+7 $ith

detor data ltenerate a I session $ith it and run it

copy SAP AG BC420 12-82

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 8388

033 Include DR16INCLUDE BDCRECX1

SELECTION-SCREEN BEGIN OF LINE

PARAMETERS SESSION RADIOBUTTON GROUP CTU create sessi SELECTION-SCREEN COMMENT $amp TEXT-S FOR FIELD SESSION

se(ecti-scree )siti +

PARAMETERS CTU RADIOBUTTON GROUP CTU ca(( trasacti

SELECTION-SCREEN COMMENT $amp TEXT-S FOR FIELD CTU

SELECTION-SCREEN END OF LINE

SELECTION-SCREEN BEGIN OF LINE

SELECTION-SCREEN COMMENT $amp TEXT-S1 FOR FIELD GROUP

se(ecti-scree )siti $+

PARAMETERS GROUP1$amp r) ae 0 sessi

SELECTION-SCREEN COMMENT $amp TEXT-S+ FOR FIELD CTUMODE

se(ecti-scree )siti

PARAMETERS CTUMODE LIE CTU2PARAMS-DISMODE DEFAULT 3N3

A4 s56 a(( 78)rs

E4 s56 78)r errr (8

N4 7 t 7is)(a8 78)r

SELECTION-SCREEN END OF LINE

SELECTION-SCREEN BEGIN OF LINE

SELECTION-SCREEN COMMENT $amp TEXT-S$ FOR FIELD USER

se(ecti-scree )siti $+

PARAMETERS4 USER1$amp DEFAULT S9-UNAME ser 0r sessi i atc5

SELECTION-SCREEN COMMENT $amp TEXT-S FOR FIELD CUPDATE

se(ecti-scree )siti

PARAMETERS CUPDATE LIE CTU2PARAMS-UPDMODE DEFAULT 3L3

S4 s8c5rs(8

A4 as8c5rs(8

L4 (ca(

SELECTION-SCREEN END OF LINE

SELECTION-SCREEN BEGIN OF LINE

SELECTION-SCREEN COMMENT $amp TEXT-S FOR FIELD EEP

se(ecti-scree )siti $+

PARAMETERS4 EEP AS CltECBOX 3 3 = 7e(ete sessi i0 0iis5e7

3X3 = gtee) sessi i0 0iis5e7

SELECTION-SCREEN COMMENT $amp TEXT-S FOR FIELD E2GROUP

copy SAP AG BC420 12-83

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 8488

se(ecti-scree )siti

)araeters E2GROUP1$amp r) ae 0 errr-sessi

SELECTION-SCREEN END OF LINE

SELECTION-SCREEN BEGIN OF LINE

SELECTION-SCREEN COMMENT $amp TEXT-S FOR FIELD ltOLDDATE

se(ecti-scree )siti $+

PARAMETERS4 ltOLDDATE LIE S9-DATUM

SELECTION-SCREEN COMMENT +11amp TEXT-S$ FOR FIELD E2USER

se(ecti-scree )siti

PARAMETERS4 E2USER1$amp DEFAULT S9-UNAME ser 0r errr-sessi

SELECTION-SCREEN END OF LINE

SELECTION-SCREEN BEGIN OF LINE

SELECTION-SCREEN COMMENT +11amp TEXT-S FOR FIELD E2EEP

se(ecti-scree )siti

PARAMETERS4 E2EEP AS CltECBOX 3 3 = 7e(ete sessi i0 0iis5e7

3X3 = gtee) sessi i0 0iis5e7

SELECTION-SCREEN END OF LINE

SELECTION-SCREEN BEGIN OF LINE

SELECTION-SCREEN COMMENT +11amp TEXT-S FOR FIELD E2ltDATE

se(ecti-scree )siti

PARAMETERS4 E2ltDATE LIE S9-DATUM

SELECTION-SCREEN END OF LINE

SELECTION-SCREEN SIP

SELECTION-SCREEN BEGIN OF LINE

SELECTION-SCREEN COMMENT 1amp TEXT-S1 FOR FIELD NODATA

PARAMETERS4 NODATA DEFAULT 33 LOER CASE 7ata

SELECTION-SCREEN END OF LINE

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

Batc5i)t7ata 0 si(e trasacti

DATA4 BDCDATA LIE BDCDATA OCCURS ITlt ltEADER LINE

essaes 0 ca(( trasacti

DATA4 MESSTAB LIE BDCMSGCOLL OCCURS ITlt ltEADER LINE

errr sessi )ee7 3 3 r 3X3amp

DATA4 E2GROUP2OPENED

essae tets

TABLES4 T1

copy SAP AG BC420 12-84

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 8588

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

at se(ecti scree

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

AT SELECTION-SCREEN

r) a7 ser st e 0i((e7 0r create sessi

IF SESSION = 3X3 AND

GROUP = SPACE OR USER = SPACE

MESSAGE E1MSamp

ENDIF

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

)e 7ataset

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

FORM OPEN2DATASET USING P2DATASET

OPEN DATASET P2DATASET IN TEXT MODE

IF S9-SUBRC

RITE4 TEXT-E S9-SUBRC

STOP

ENDIF

ENDFORM

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

c(se 7ataset

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

FORM CLOSE2DATASET USING P2DATASET

CLOSE DATASET P2DATASET

ENDFORM

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

create atc5i)t sessi

t 0r ca(( trasacti siamp

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

FORM OPEN2GROUP

IF SESSION = 3X3

SIP

RITE4 $amp 3Create r)3I1amp GROUP

SIP

)e atc5i)t r)

CALL FUNCTION 3BDC2OPEN2GROUP3

EXPORTING CLIENT = S9-MANDT

copy SAP AG BC420 12-85

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 8688

GROUP = GROUP

USER = USER

EEP = EEP

ltOLDDATE = ltOLDDATE

RITE4 amp 3BDC2OPEN2GROUP3I$amp

1$amp 3retrc7e43I+amp

S9-SUBRC

ENDIF

ENDFORM

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

e7 atc5i)t sessi

ca(( trasacti si4 errr sessiamp

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

FORM CLOSE2GROUP

IF SESSION = 3X3

c(se atc5i)t r)

CALL FUNCTION 3BDC2CLOSE2GROUP3

RITE4 amp 3BDC2CLOSE2GROUP3Iamp

1$amp 3retrc7e43I+amp

S9-SUBRC

ELSE

IF E2GROUP2OPENED = 3X3

CALL FUNCTION 3BDC2CLOSE2GROUP3

RITE4

RITE4 amp 3Fe5(era))e 6r7e eret3Iamp

ENDIF

ENDIF

ENDFORM

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

Start e6 trasacti accr7i t )araeters

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

FORM BDC2TRANSACTION USING TCODE

DATA4 L2MSTRINGamp

DATA4 L2SUBRC LIE S9-SUBRC

atc5 i)t sessi

IF SESSION = 3X3

CALL FUNCTION 3BDC2INSERT3

EXPORTING TCODE = TCODE

TABLES D9NPROTAB = BDCDATA

RITE4 3BDC2INSERT3Iamp

copy SAP AG BC420 12-86

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 8788

TCODE

3retrc7e43I+amp

S9-SUBRC

3RECORD43

S9-INDEX

ca(( trasacti si

ELSE

REFRESlt MESSTAB

CALL TRANSACTION TCODE USING BDCDATA

MODE CTUMODE

UPDATE CUPDATE

MESSAGES INTO MESSTAB

L2SUBRC = S9-SUBRC

RITE4 3CALL2TRANSACTION3

TCODE

3retrc7e43I+amp

L2SUBRC

3RECORD43

S9-INDEX

LOOP AT MESSTAB

SELECT SINGLE FROM T1 ltERE SPRSL = MESSTAB-MSGSPRA

AND ARBGB = MESSTAB-MSGID

AND MSGNR = MESSTAB-MSGNR

IF S9-SUBRC =

L2MSTRING = T1-TEXT

IF L2MSTRING CS 313

REPLACE 313 ITlt MESSTAB-MSGH1 INTO L2MSTRING

REPLACE 3$3 ITlt MESSTAB-MSGH$ INTO L2MSTRING

REPLACE 33 ITlt MESSTAB-MSGH INTO L2MSTRING

REPLACE 33 ITlt MESSTAB-MSGH INTO L2MSTRING

ELSE

REPLACE 33 ITlt MESSTAB-MSGH1 INTO L2MSTRING

REPLACE 33 ITlt MESSTAB-MSGH$ INTO L2MSTRING

REPLACE 33 ITlt MESSTAB-MSGH INTO L2MSTRING

REPLACE 33 ITlt MESSTAB-MSGH INTO L2MSTRING

ENDIF

CONDENSE L2MSTRING

RITE4 MESSTAB-MSGT9P L2MSTRING$+amp

ELSE

RITE4 MESSTAB

ENDIF

ENDLOOP

copy SAP AG BC420 12-87

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 8888

SIP

Eree 0e5(era))e

IF L2SUBRC AND E2GROUP SPACE

IF E2GROUP2OPENED = 3 3

CALL FUNCTION 3BDC2OPEN2GROUP3

EXPORTING CLIENT = S9-MANDT

GROUP = E2GROUP

USER = E2USER

EEP = E2EEP

ltOLDDATE = E2ltDATE

E2GROUP2OPENED = 3X3

ENDIF

CALL FUNCTION 3BDC2INSERT3

EXPORTING TCODE = TCODE

TABLES D9NPROTAB = BDCDATA

ENDIF

ENDIF

REFRESlt BDCDATA

ENDFORM

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

Start e6 scree

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

FORM BDC2D9NPRO USING PROGRAM D9NPRO

CLEAR BDCDATA

BDCDATA-PROGRAM = PROGRAM

BDCDATA-D9NPRO = D9NPRO

BDCDATA-D9NBEGIN = 3X3

APPEND BDCDATA

ENDFORM

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

Isert 0ie(7

Page 17: BC420_46C - 012The Transaction Recorder

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 1788

063

983209 SAP AG 2001

1n-o( SAP ontrols and Data Transfer

bull SAP Picture ontrolbull SAP ETML ie)er ontrol

bull SAP Tet 1dit ontrol

bull AL Brid ontrol

bull SAP Tree ontrol

bull

ranch 6

ranch amp

Root

These and other controls do not support batch input$

Root

ranch amp

ranch amp6

The ne$ 7noy SAP contros deveoped for ampeease B do not support atch input or ca

transaction

=o$ever tae contros and tastrips do support atch input

copy SAP AG BC420 12-17

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 1888

065

983209 SAP AG 1999

The Transaction Recorder

PrinciplesPrinciples

Recording )ith the LSMWRecording )ith the LSMW

Principles of atch Input and all TransactionPrinciples of atch Input and all Transaction

Integrating the TA Program into the DWIntegrating the TA Program into the DW

Using the TA Recorder Using the TA Recorder

copy SAP AG BC420 12-18

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 1988

067

983209 SAP AG 1999

Session

generator

Recording Using the LSMW

-ith the +S- you can create your o$n recordings

The +S- uses the standard TA recorder here yet evauates the recording itsef The information

from the recording is used to create atch input sessions

The created atch input session can e processed as usua $ith the atch input monitor

Note As $ith the standard procedure it is euay important that the data is converted

copy SAP AG BC420 12-19

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 2088

0amp0

983209 SAP AG 1999

reating Recording

Admnraon

ecordn

Goo

ame of recording

Description

)ner

ame of transaction

Start recording

lto into the +S- and seect the menu path ampoto (Recorings An overvie$ of a previousy

created recordings for your proect are dispayed To start a ne$ recording seect Create

To create a recording you must define the name the description and the o$ner

7nter the name of the transaction you $ant to record

7ecute the transaction and compete it propery

Note ampecordings are assigned to ony one proect 9 so the name of the recording must e uniue

copy SAP AG BC420 12-20

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 2188

0amp6

983209 SAP AG 1999

hanging ustomer Data$ Initial Screen

9ield ontents

BCC$Samp $SZAV

BCamp(Camp )00

02-($++ -88-10000

02-0110

02-0130

$SZAV

9ield ame

Comer

Company code

Z-88-10000

Genera daa

Comer Z-88-10000

+ame

9ield ontents

BCamp(Camp $PA

BCS$BSC SAPSZA1 0300ASS

BCS$BSC SAPSZA1 0301Camp$

BCC$Samp SZA10100-+$B

A1AA-S Garden Sree

A1AA-amp$S+$1 34

A1AA-PampSCamp1 02105

9ield ame

Screen

111

Screen

106

In the aove eampe the transaction Change customer F01 is recorded

Note

You must ma)e some modification to the field values for all the fields you ant to capture

for the data transfer For the purposes of recording a change can simply mean overriting

one single character in a field ith the same character

ven if fields are to e filled using S$amp$ parameters the values must still e changed on

the screen in order to capture them

(ith online transactions screen sequences may appear that are different than in the

recording

copy SAP AG BC420 12-21

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 2288

0ampamp

983209 SAP AG 1999

Results

RecordingRecording R1lt6 Demolt6

9D0amp hange customer Caccounting

SAPM90ampD 0608

DltURSR R90ampD=UR

Dlt=D1 gt00

R90ampD=UR 5560000

R90ampDD0660

US1ltA

SAPM90ampD 0666

Dlt=D1 UPDA

DltSUSR SAPLSA6

DltSUSR SAPLSA6

DltURSR SA6ltD0600T1LltUM1

ADDR6ltDATASTR11T 4 Barden Street

ADDR6ltDATAPSTltD1 0amp602

ADDR6ltDATAIT6 oston

SA6ltD0600T1LltUM1 8638257755

The resuts of the recording using the +S- are dispayed in a tree structure

After the recording has finished you can edit it Cou can deete fieds or add ne$ ones

copy SAP AG BC420 12-22

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 2388

0amp

983209 SAP AG 1999

Assigning 9ield ames

Recording R16 Demolt6

Dlt=D1 UPDA

DltSUSR SAPLSA6

DltSUSR SAPLSA6

DltURSR SA6ltD0600T1L

ADDR6ltDATAAM16 Lisa Eofmeister

ADDR6ltDATAPSTltD1 0amp602

ADDR6ltDATAIT6 oston

ame

+ame

ecrpon

e=a ae

A1AA-+A1

A1AA-+A1

Comer name

a o=meer

Screen =ed

ustomer name

double clic+

Cou can assign names for each recorded fied The specia fieds (2356257 2324ampS5amp

and 23S4S2amp77N) are not incuded here Cou can choose the fied names -hen the atch

input session is created the contents of these fieds are assigned to the target fieds specified in the

eft coumn

Functions

efaut Assigns to the fied names of the underying target fied and its fied description

ampeset eetes fied name and fied description

oue cic 7dits fied name fied description and defaut vaue

Note Cou can use fied names more than once =o$ever the fied name is ony avaiae once in thefied mapping For this reason it is not practica to use fied names more than once

For a those fieds for $hich you do not assign a name the defaut vaue is used $hen the atch

input session is created These defaut vaues can e seen as constants This is especiay usefu for

chec oes (for eampe 08 vie$ seection)

The +S- supports automatic fied mapping Source fieds and target fieds can e assigned to each

other automaticay The fieds are assigned to the corresponding fieds of the same name Therefore

the fied names of the source structure shoud e given the same or simiar names as the fied names

in the target structure

copy SAP AG BC420 12-23

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 2488

0amp4

983209 SAP AG 2001

Addinggtremoing screen fields

Repeating recording

9or identical field names the name and description are

assigned automaticall(

1diting Recording

02-($++

(+A1-A+

(+A1-+A1

(+A1-Samp

(+A1-+A2

(+A1-SAS

Comer accon nmer

e

+ame 1

Sor =ed

+ame 2

Sree

Selection of all

aailable screen

fields

Cou can ater add ne$ screen fieds if you need to 6eep in mind that fieds shoud ony e added in

paces $here they are aso provided on the screen other$ise you $i get an error $hen the I

session is processed

After saving you $i get the message The data has een saved successfuy No$ the recordings

are avaiae for the oect attriutes

If you repeat the recording you can record a ne$ screen seuence $ith ne$ fieds Provided that the

fied names (eg 6NA89NA78) are identica the names and descriptions are automaticay

assigned

copy SAP AG BC420 12-24

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 2588

0amp2

983209 SAP AG 1999

b-ect T(pe and Import Method$ Recording

Standard atch Input gt Direct Input

atch Input Recording

API

IDoc

ampgtec ype ) mpor meod

Bac np recordn

ecordn ec1

The recording is no$ avaiae $ith the oect attriutes

Net you create a proect or su9proect in the +S- and specify process the data transfer

Cou eecute the data transfer as in the standard system

efine the source fieds and structures

efine the fied mapping

ampead and convert the data

2reate and import a atch input session

copy SAP AG BC420 12-25

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 2688

0amp8

983209 SAP AG 1999

The Transaction Recorder

PrinciplesPrinciples

Recording )ith the LSMWRecording )ith the LSMW

Principles of atch Input and all TransactionPrinciples of atch Input and all Transaction

Integrating the TA Program into the DWIntegrating the TA Program into the DW

Using the TA Recorder Using the TA Recorder

copy SAP AG BC420 12-26

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 2788

0amp3

983209 SAP AG 1999

Transaction Recorder

Online

Transaction

RecordingTransfer Program

T

Included in the Batch Input Monitor

Cou use the transaction recorder to record transactions and then use the transaction recording to

generate a transfer program The program ao$s you to transfer data using either atch input or ca

transaction

copy SAP AG BC420 12-27

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 2888

0amp5

983209 SAP AG 1999

hanging ustomer Data$ Initial Screen

9ield ontents

BCC$Samp $SZAV

BCamp(Camp )00

02-($++ Z-88-10000

02-0110

02-0130

$SZAV

9ield ame

Comer

Company code

Z-88-10000

Genera daa

Comer Z-88-10000

+ame

9ield ontents

BCamp(Camp $PA

BCS$BSC SAPSZA1 0300ASS

BCS$BSC SAPSZA1 0301Camp$

BCC$Samp SZA10100-+$B

A1AA-S Garden Sree

A1AA-amp$S+$1 34

A1AA-PampSCamp1 02105

9ield ame

Screen

111

Screen

106

In the aove eampe the transaction Change customer F01 is recorded

copy SAP AG BC420 12-28

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 2988

0amp7

983209 SAP AG 2001

hange Debitor$ Pa(ment Transactions C6

Banlt dea

Screen

10

9ield ontent

BCC$Samp (+B(-BA+(+01

BCamp(Camp BA+((+B(-BA+(S01

(+B(-BA+(01 12345679

(+B(-BA+(+01 22222222

Debitor 5560000

9ield ame

Inde

copy SAP AG BC420 12-29

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 3088

00

983209 SAP AG 1999

hanging ustomer Data$ Pa(ment Transactions Camp

Addre

an+ countr( US

an+ code 6amp42837

Banlt dea

ustomer 5560000

9ield ontents9ield ame

BCC$Samp (+A1-(+ZA

BCamp(Camp $PA

(+B(-Z01

Screen

10

Screen

100

SAPLBA

9ield ontents

BCC$Samp B+(A-BA+(A

BCamp(Camp +

B+(A-BA+(A +aona Banlt

9ield ame

In different transactions the modue poo may change This is the case $ith for eampe customer

master data The TA recorder records modue poo changes automaticay

copy SAP AG BC420 12-30

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 3188

06

983209 SAP AG 1999

Eierarch( Displa( of the Recording

02amp

02

SAP02 0106

BCC$Samp 02-0130

BCamp(Camp )00

02-($++ -88-10000

02-0110

02-0130

SAP02 0111

BCamp(Camp V

BCC$Samp A1AA-amp$S+$1

A1AA-S Garden Sree

Recording

-ith the TA recorder the resuts are aso a ist in a hierarchy dispay =o$ever you cannot assign

your o$n fied names as you can in the +S-

copy SAP AG BC420 12-31

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 3288

0amp

983209 SAP AG 1999

Recording erie)

Recording

Transfer program

9unction module

ontains onl( the data

from the recording

Test data

Test

reate

reate

reate

reate

1dit hange recording

Process recording

Cou can edit the recording as needed

The recording can e tested and eecuted again The screens are run through in the same $ay as in

the recording

The recording can then e used to create

atch input sessions

Test data

ata transfer programs $ith atch input or ca transaction

Function modues

copy SAP AG BC420 12-32

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 3388

0

983209 SAP AG 1999

1 02 BS

2 SAP02 106

3 BCC$Samp $SZAV

4 BCamp(Camp )00 5 02-($++ -88-10000

6 02-0110

7 02-0130

8 $SZAV

9 SAP02 111

10 BCamp(Camp V

11 BCC$Samp A1AA-amp$S+$1

12 A1AA-S Garden Sree

Program Screen St 9ield ame 9ield alue

Recording 1ditor

Recording

Add gt delete lines 9ormat chec+

Import gt eport of recording

In the editor you can add or deete ines Cou can aso change the contents of individua ines

-ith the function Chec) you can specify $hether the edited version of the recording sti has the

correct synta

Cou can aso eport import recordings to from a seuentia fie

After editing save the recording changes

copy SAP AG BC420 12-33

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 3488

04

983209 SAP AG 1999

Recording Seeral Transaction Runs

RecordingF

Directl( after the first recordingG or

In the displa( mode of the recording

In this step you can record additiona transactions and add additiona transaction runs to the

recording

Cou can record the additiona transactions directy after a recording or in the edit screen of a

recording

copy SAP AG BC420 12-34

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 3588

02

983209 SAP AG 1999

1ditor$ Importing and 1porting Recordings

6 T 9D0amp S

amp SAPM90ampD 608

DltURSR

4

2

8 SAPM90ampD 666

60

66

Program Screen St 9ield name 9ield alue

cempA

e name

aa =orma

cemp

A

e name

aa =orma

1port

Import

Presentation Serer

If the editor functions in the systems do not provide a the functions you need you can do$noad the

recording to your presentation server using the Eort function and then edit the recording using a

P2 editor

Cou use the Import function to import the data ac into the amp System ae sure the fie is sti in

the correct format

copy SAP AG BC420 12-35

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 3688

08

983209 SAP AG 1999

Processing the Recording

Recording

Process )ith ALL TRASATI

Parameer

Proce mode$pdae mode

CA mode

e=a e

Con a=er comm

+o a B eon

nd +o a B mode

A

A

T

The recording can e eecuted directy The data from the recording is used and the transaction is

processed $ith ca transaction

2a transaction provides a range of options for caing appication transactions $hich are discussed

on the foo$ing t$o pages

copy SAP AG BC420 12-36

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 3788

03

983209 SAP AG 1999

Process mode

Update mode

ATT mode

Processing Recording )ith T 6

A

1

Displa( all screens

Displa( errors onl(

o displa(

L

S

A

Local

S(nchronous

As(nchronous

A

o ATT

ATT )ithout indiidual screen control

ATT )ith indiidual screen control

Processing mode

=ere you can specify the processing mode 9 it is the same as the processing mode for atch input

4pdate mode

=ere you can specify the update mode For more information see the unit ca transaction

2ATT mode

=ere you can mae specia settings if you $ant to test the recording under 2ATT conditions (ony

necessary for 2ATT runs) Specia functions are caed in the 2ATT too for each screen at the end of

P5 and at the start of PAI

copy SAP AG BC420 12-37

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 3888

05

983209 SAP AG 1999

Default sie

ont after commit

ot a I session

1nd$ ot a I mode

Processing Recording )ith T amp

The screen standard sie is used for the

processing

ommit )or+ does not end the processing

o I mode is actie The transaction )ill run

through as in online

I mode is selected nce the data in the D

table is processedG the I mode is set to inactie

Standard siDe

If you seect this the screens are processed in the standard siDe in the foreground (in foreground or

dispay errors ony) Note the standard siDe is a$ays used for acground processing

Further after commit

The first commit $or in a transaction does not ead to the end of the recording

Note A atch input transaction is ended $ith the first commit $or

No I mode

The system fied SC9INPT is not set (SC9INPT E ) So transactions are run through as in onine

7nd No I mode

5ny use if you choose the processing mode 7 (dispay errors ony) Then the transaction is processed in the acground in atch input mode and if there is an error the screens run through in

the foreground

copy SAP AG BC420 12-38

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 3988

07

983209 SAP AG 1999

I Mode

atch input

mode

nline

Some transactions behae differentl( in batch input mode

than in online Cbatch input capabilit(

atch input mode sets the s(stem field SIPT H

Not every transaction can run the same onine and in atch input mode The transaction must decide

itsef $hether it is caed onine or in atch input mode

The system sets the system fied SC9INPT E G if the atch input mode is active (this aso appies

to ca transaction) From this system fied the transaction can identify $hether to run onine or in

atch input mode

copy SAP AG BC420 12-39

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 4088

040

983209 SAP AG 1999

reating a Session 9rom the Recording

Recordingnl( contains the data

from the recording

Seon name 02amp

Aoraon ampBS(eep eon

oclt dae 10102000

Cou can create a atch input session directy from the recording that you can then process using the

atch input monitor

copy SAP AG BC420 12-40

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 4188

046

983209 SAP AG 1999

reating Test Data

Test Data

Recording

ranranpBC420AAe name

The file onl( contains the data from the recording

Rgt

Application Serer

Structure

Cou can create a fie from the recordingH the fie $i contain a the fieds from the recording The

fieds are added to the fie $ith the ength you specified in the definition

The fied order corresponds to the order in the recording overvie$ Technica fieds

(2356257 2324ampS5amp and so on) are incuded

The data can ony e stored on the appication server If you do not specify a path the fie is stored in

the $or directory of the appication server

If the specified test fie aready eists the ne$ data record is added to this fie

copy SAP AG BC420 12-41

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 4288

04amp

983209 SAP AG 1999

ed conen

reating a Program

Recording

ZBC420ampProram name

Transfer Program

e daa

ead =rom =e

ran=er =rom recordn

reate

9ile nameTest data

ranranpBC420AA

Cou can generate a program from the recording

In the foo$ing diaog o enter a program name In addition you can choose the type and method

for fiing the maintained fied contents from the recorded screens

4se the vaues used for the recording If you reuire feie data transfer you $i have to modify

this program ater

ParameteriDe the input vaues and read these vaues from a fie A data structure is created for

parameteriDationH the data records are read from an eterna fie into this data structure The

program assumes the fie $as taiored to this data structure

If you have decided to parameteriDe the input vaues you shoud aso create a test fie during

generation To do this seect the checo and enter a name for the fie

The attriute maintenance screen of the AAP editor appears aintain the attriutes and save the

program

copy SAP AG BC420 12-42

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 4388

04

983209 SAP AG 1999

Program 9unctions

Online

transaction

Transfer program

To

error

1rror

ption 6ption ampFlat SAP

structure

Monitor

Cou have no$ generated a data transfer program for importing data into the amp System The

program can eecute the data transfer using atch input or ca transaction

If you choose option 1 and there is an error the data record is paced into a atch input session

copy SAP AG BC420 12-43

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 4488

044

983209 SAP AG 1999

Benerating 9unction Modules

Recording

Zcreaedeor ncon mode

ncon rop

Sor eD

ZBC420

Creae comer

9unction module

nl( one data record can be processed at a time

In the net diaog o you can generate a function modue a function group and short tet from the

recording The function modue is automaticay created in the function group

copy SAP AG BC420 12-44

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 4588

042

983209 SAP AG 1999

9unction of 9unction Modules

Online

transaction

To

error

1rror

ption 6 ption amp

9unction module

Import

Parameter 1port

parameter

Tables

M1SSTA

Monitor

S$BC

Import interface

The import interface consists of a technica part and the fieds from the recording (A parameter is

created for each input fied of the recorded transactions)

7port interface

Simpy consists of the parameter S4amp2 The function modue $i return a vaue in the system

fied SC9S4amp2 after caing ca transaction This return vaue is set to Dero if the data record has

een correcty processed (5ny appies to 2T)

If a session is created you $i e notified $hether the data record coud e paced into the session

Tae interfaceThis is used ony if the function modue $ors $ith ca transaction The tae contains a the

system messages

copy SAP AG BC420 12-45

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 4688

048

983209 SAP AG 1999

Import Interface of 9unction Module

$

Technical

fields

Data

fields

BI session or CALL TRANSACTION

Processin $ode

pdate $ode

a$e oamp BI session iamp (T initial)

Bacround user iamp (T initial)

Delete session aampter processin

Loc date oamp session

ODATA indicator

TU

MD1

UPDAT1

BRUP

US1R

=11P

ELDDAT1

DATA

Cou can use parameter 2T4 to specify $hether the function modue creates a atch input session

(2T4 E ) or updates the data record directy using ca transaction (2T4 E G)

The other parameters are fied as for a atch input session header

Note 7very time the function modue is caed a atch input session is created

If the session is to contain severa transactions proceed as foo$s

ltenerate the transaction severa times This can e achieved y recording the transaction again The

function modue interface $i then contain more than one transaction -hen the function modue is

caed severa transactions can e generated for each session

copy SAP AG BC420 12-46

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 4788

043

983209 SAP AG 1999

The Transaction Recorder

PrinciplesPrinciples

Recording )ith the LSMWRecording )ith the LSMW

Principles of atch Input and all TransactionPrinciples of atch Input and all Transaction

Integrating the TA Program into the DWIntegrating the TA Program into the DW

Using the TA Recorder Using the TA Recorder

copy SAP AG BC420 12-47

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 4888

045

983209 SAP AG 1999

Benerated Program

9unction modules DltP1ltBRUP

DltIS1RT

DltLS1ltBRUP

AAP Program

Define structure of

data in seJuential

fileDefine D

table

pen seJuential file

pen I session

Read data recordCseJuential file

9ill D table

9ill I session gtALL TRASATI

Last data record K

lose I session

lose seJuential file

The generated program has the structure dispayed aove It uses the standard function modues for

creating atch input sessions

copy SAP AG BC420 12-48

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 4988

047

983209 SAP AG 1999

Structure of the Benerated Program

Benerated part

Define D

table

pen seJuential file

pen I session

Read data record

9ill D table

9ill I session gtALL TRASATI

Last data recordK

lose I session

lose seJuential file

Include DR16

Define filestructure

P1ltDATAS1T

P1ltBRUP

DltDPR

Dlt9I1LD

DltTRASATI

LS1ltBRUP

LS1ltDATAS1T

The generated program consists of t$o parts 9 a generated part and the incude 2amp72G8 The

incude is provided in the standard system

The incude contains the definition of the reuired 2 tae and a further seven suroutines These

suroutines eecute the foo$ing functions

5pen and cose fie

5pen and cose session

Fi 2 tae

Fi session

The generated part is the main program and cas the reevant suroutines A structure is aso

generated in the generated part to read the eterna data into the fie

See the Appendi for more information on the 2amp72G8 program

copy SAP AG BC420 12-49

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 5088

020

983209 SAP AG 1999

Structure of D Table

PRBRAM DPR D1BI 9AM 9ALPRBRAMPRBRAM DPRDPR D1BID1BI 9AM9AM 9AL9AL

SAPM90ampD 0602

R90ampD=UR 600000

R90ampDU=RS 0006

R90ampD=T=D =UA

SAPM90ampD 0660

=A6AM16 Smith

=A6PSTL 87000

=A6LAD6 US

=A6SPRAS 1

SAPM90ampD 06amp0

=A6ST1B US6amp428357DDATA

PRBRAM

DPR

D1BI

9AM

9AL

EAR

UM

EAR

EAR

EAR

40

4

6

6amp

6amp

D Module pool

D Screen number

D Start of screen

D 9ield name

D 9ield contents

9ield ame T(pe Length Short Tet

AAP Dictionar(

The 2 tae has the same structure as in a standard transfer

copy SAP AG BC420 12-50

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 5188

026

983209 SAP AG 1999

Read Structure

Recording

DATA BEGIN OF record data element BUKRS bukr$amp data element KTOKD ktokd$amp data element NA(EG) name$+amp data element SORT ortl$ampEND OF record-

record

Automaticall( generated

from recording

The structure of the fie is automaticay generated and is a$ays defined $ith the name amp725amp

The generated structure a$ays has the same ayout 7ach fied is defined y t$o generated ro$s

The first ro$ is a$ays a comment ro$ containing the tet J data eement and the data eement of

the screen fied from the recording In the net ro$ the fied itsef is defined $ith the name of the

data eement foo$ed y a three9digit position numer $hich specifies the ocation in the structure

The ength of the fied is set y the ength of the data eement If a fied is not defined through a data

eement the system uses the ength of the screen fied

copy SAP AG BC420 12-51

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 5288

02amp

983209 SAP AG 1999

pening and losing the 9ile

P1ltDATAS1T

LS1ltDATAS1T

FOR( oendataet USING dataet-O)EN DATASET dataet IN TET (ODE-

IF S01SUBR2 34 - 5RITE 6 te7t1e S01SUBR2-STO)-

ENDIF-

ENDFOR(-

FOR( cloedataet USING dataet-2OSE DATASET dataet-

ENDFOR(-

Include

DR16

The suroutine 5P7N3ATAS7T opens the seuentia fie

The suroutine 2+5S73ATAS7T coses the seuentia fie

copy SAP AG BC420 12-52

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 5388

02

983209 SAP AG 1999

9unction Modules for I Program

lient

Session name

Eold date

=eep session

D user name

RecordK

LI1T

BRUP

ELDDAT1

=11P

US1R

R1RD

DltP1ltBRUPDltP1ltBRUP

Transaction code

D table

TD1

DPRTA

DltIS1RTDltIS1RT

DltLS1ltBRUPDltLS1ltBRUP

pen Isessionpen Isession

Insert data for

transactions

Insert data for

transactions

lose I

session

lose I

session

The foo$ing function modues are provided for creating atch input sessions (function group

S2)

235P7N3ltamp54P

2reates a ne$ session and contains genera data for the $hoe session

23INS7ampT

Inserts a the data for a transaction into the session The transferred interna tae $ith the

structure 2ATA must contain a the data reuired for fuy processing the transaction

232+5S73ltamp54P

2oses the session after a the data has een inserted As soon as the session has een cosed it

can e processed

The interna tae $ith the structure 2ATA can ony contain atch input data for one singe

transaction run So the individua transactions are inserted into the atch input session in a oop

using severa 23INS7ampT cas

copy SAP AG BC420 12-53

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 5488

024

983209 SAP AG 2001

9unction Module DltP1ltBRUP

ALL 9UTI DltP1ltBRUPALL 9UTI DltP1ltBRUP

1PRTIB

LI1T client

BRUP session name

ELDDAT1 loc+ date

=11P delete flag

US1R bdc user name

R1RD recording

IMPRTIB

NID internal session +e(

11PTIS

1PRTIB

LI1T client

BRUP session name

ELDDAT1 loc+ date

=11P delete flag

US1R bdc user name

R1RD recording

IMPRTIB NID internal session +e(

11PTIS

-ith the function modue 235P7N3ltamp54P you can open a atch input session

The foo$ing parameters are mandatory

2+I7NT (cient)

ltamp54P (session name)

4S7amp (user name)

Note The 4S7amp must a$ays e specified This user name is reuired for processing the session

in atch mode

The foo$ing parameters are optiona

=5+AT7 specifies the eariest date on $hich the session can e started677P fag specifies $hether session shoud e deeted after it has een successfuy processed The

677P fag is ignored if the session contains errors

677P E K K means deete the session after processing (defaut vaue) H

677P E KGK means do not deete session

amp725amp E KGK ao$s you to create a recording instead of a I session

If gtI is specified the function modue returns the interna session ey This is needed to e ae to

differentiate sessions that have the same name

-ith 7G27PTI5NS you get various return vaues that can e ueried $ith SC9S4amp2

Note In onine mode the onine user is used for the authoriDation checs regardess of the user

name specified

copy SAP AG BC420 12-54

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 5588

022

983209 SAP AG 1999

Subprogram P1ltBRUP

P1ltBRUP

FOR( oen8rou-IF e9on -

2A FUN2TION BD2O)ENGROU) E)ORTING 2IENT lt1mandt GROU) 8rou USER uer KEE) kee

=ODDATE gtolddate-

ENDIF-ENDFOR(-

Include

DR16

The suprogram 5P7N3ltamp54P opens the atch input session

copy SAP AG BC420 12-55

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 5688

028

983209 SAP AG 1999

9unction Module DltIS1RT

ALL 9UTI DltIS1RTALL 9UTI DltIS1RT

IMPRT

TD1 Transaction code

PSTltLAL Update locall(

PRITIB print list

TAL1S DPRTA bdclttable

11PTIS

IMPRT

TD1 Transaction code

PSTltLAL Update locall(

PRITIB print list

TAL1S DPRTA bdclttable

11PTIS

-ith the function modue 23INS7ampT you can add transaction data to the session

Cou need an interna 2 tae to transfer the data

The foo$ing parameters are mandatory

T257 Transaction code

CNPamp5TA 2 tae

The foo$ing parameters are optiona

P5ST3+52A+ E KGK activates oca updating This means that the data to e updated is ept in the

appication server and updated in the ast step of the transaction This does not invove the update

process (For more information see course 28 Programming ataase 4pdates)

PampINTINlt E KGK 9 ists processed in I $i e printed immediatey -ith 7G27PTI5NS you get various return vaues that can e ueried $ith SC9S4amp2

copy SAP AG BC420 12-56

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 5788

023

983209 SAP AG 1999

Subprogram DltTRASATI

DltTRASATI

FOR( BD2TRANSA2TION USING tcode-

IF e9on -2A FUN2TION BD2INSERT

E)ORTING T2ODE tcode TABES D0N)ROTAB bdcdata-

ESE-

ENDIF-ENDFOR(-

T

Include

DR16

The suprogram 23TampANSA2TI5N moves the fied 2 tae either to a atch input session

or uses ca transaction to import the data into the system 5n the seection screen you can specify

$hether you $ant to create a session or you $ant to use ca transaction to process the data directy

The S7SSI5N fied is then set according to your seection

copy SAP AG BC420 12-57

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 5888

025

983209 SAP AG 1999

9unction Module DltLS1ltBRUP

ALL 9UTI DltLS1ltBRUP

11PTIS

TltP1 6

NU1U1lt1RRR amp

-ith the function modue 232+5S73ltamp54P you can cose a atch input session

In 7G27PTI5NS you get various return vaues that can e ueried $ith SC9S4amp2

copy SAP AG BC420 12-58

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 5988

027

983209 SAP AG 1999

Subprogram LS1ltBRUP

FOR( cloe8rou-IF e9on -cloe batcgt 9nut 8rou

2A FUN2TION BD22OSEGROU)-

ESE-IF e8rouoened -

2A FUN2TION BD22OSEGROU)-

ENDIF-ENDIF-

ENDFOR(-

LS1ltBRUPlose session

lose error session

Include

DR16

The suprogram 2+5S73ltamp54P coses the atch input session The suprogram differentiates

et$een a norma I session (S7SSI5N E G) and a session opened $hen ca transaction

encountered an error (73ltamp54P35P7N7 E G)

copy SAP AG BC420 12-59

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 6088

080

983209 SAP AG 1999

Subprograms DltDPRG Dlt9I1LD

DltDPR

Dlt9I1LD

FOR( bdc9eld USING nam al-IF al 34 nodata-2EAR bdcdata- bdcdata1nam nam- bdcdata1al al- A))END bdcdata-ENDIF-

ENDFOR(-

FOR( bdcdltnro USING ro8ram dltnro- 2EAR bdcdata-Bdcdata1ro8ram ro8ram-Bdcdata1dltnro dltnro-Bdcdata1dltnbe89n - A))END bdcdata-ENDFOR(-

Include

DR16

The incude 2amp72GG contains t$o suprograms 23CNPamp5 and 23FI7+

Suprogram 23CNPamp5 fis the 2 tae $ith program names and screen numers

Suprogram 23FI7+ fis the 2 tae $ith fied names and vaues

7ach suprogram creates an entry in the 2 tae

copy SAP AG BC420 12-60

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 6188

086

983209 SAP AG 1999

9illing the D Table

erorm bdcdltnro u9n8 SA)(FD +- erorm bdc9eld u9n8 BD22URSOR RFD1BUKRS- erorm bdc9eld u9n8 BD2OK2ODE 6- erorm bdc9eld u9n8 RFD1BUKRS record1BUKRS- erorm bdc9eld u9n8 RFD1KTOKD record1KTOKD-

erorm bdcdltnro u9n8 SA)(FD -

erorm bdc9eld u9n8 BD22URSOR KNA1S)RAS- erorm bdc9eld u9n8 BD2OK2ODE 6- erorm bdc9eld u9n8 KNA1NA(E record1NA(E-

erorm bdc9eld u9n8 KNA1SORT record1SORT-

Recording Benerated automaticall(

from the recording

)ERFOR( bdcdltnro USING SA)(FD +- )ERFOR( bdc9eld USING BD22URSOR RFD1BUKRS-)ERFOR( bdc9eld USING BD2OK2ODE 6-)ERFOR( bdc9eld USING RFD1BUKRS record1BUKRS-)ERFOR( bdc9eld USING RFD1KTOKD record1KTOKD-

)ERFOR( bdcdltnro USING SA)(FD -

)ERFOR( bdc9eld USING BD22URSOR KNA1S)RAS-)ERFOR( bdc9eld USING BD2OK2ODE 6-)ERFOR( bdc9eld USING KNA1NA(E record1NA(E-

)ERFOR( bdc9eld USING KNA1SORT record1SORT- ---

The 2 tae is fied $ith data from the recording The suroutines 23CNPamp5 and

23FI7+ are used for this

The suroutines are caed in the reuired structure or seuence

copy SAP AG BC420 12-61

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 6288

08amp

983209 SAP AG 1999

erie)

SAPDatabase

SeJuential9ile

SAPDatabase

ALL TRASATIALL TRASATI

SeJuential9ile

ATE IPUTATE IPUT

D TableD TableD TableD Table

I Monitor

T

In contrast to atch input you can use ca transaction to directy pass data to the diaog interface

$ithout using a atch input session Cou use an interna tae (2 tae same structure and ayout

as atch input) to temporariy store your screen data Then you ca the desired transaction in your

program

Note 5n average the 2a Transaction method is 8 to times faster than using atch Input

copy SAP AG BC420 12-62

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 6388

08

983209 SAP AG 1999

all Transaction Program$ 1ample

RE)ORT abcbdcdcdeb9ct-

)ARA(ETERS d9mode DEFAUT A

udmode DEFAUT S-FOR( calltranact9on-2A TRANSA2TION FD

USING bdcdata (ODE d9mode

U)DATE udmode-

IF lt1ubrc NE - 5RITE 6 ---

ENDIF-ENDFOR(-

Screen

00

Screen

100

Screen

An additiona system ro area is added for the caed transaction The system uses this area for

processing the individua screens in the transactionH the data from the tae is added here After the

transaction is processed the second ro area is reeasedH the system continues processing in the first

ro area

Notes

In contrast to atch input there is no error ogging (error sessions) here For processing the caed

transaction the system uses the authoriDations of the user that caed the transaction The 2 tae

can ony hod data for one transaction run at a time efore another transaction is caed and its data

can e added you must eecute a amp7Famp7S= for the 2 tae

copy SAP AG BC420 12-63

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 6488

084

983209 SAP AG 1999

ALL TRASATI C6

RE)ORT 777-

2A TRANSA2TION FD USING bdcdata (ODE E-

Default for MD1 is A

2A TRANSA2TION 3tranact9oncode4 USING 3bdc1table4 C (ODE A E N C-

-ith the parameter 57 you can seect a specific dispay mode for processing the transaction The

foo$ing three modes are avaiae

A (ispay a)

If you eecute the program a the screens and a their data are dispayed This is the defaut vaue

for the 57 in 2A++ TampANSA2TI5N

N (ispay nothing)

The screens are not dispayed at a regardess of $hether any of them contained errors As soon as

the transaction has een fuy processed contro is returned to your program (The vaue of the

parameter 4PAT7 determines $hether dataase updates are eecuted or not)

7 (ispay errors ony)As soon as an error occurs in a screen the transaction is s$itched to dispay mode so that you can

correct the errors

These dispay modes are the same as those in the atch input session processing

copy SAP AG BC420 12-64

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 6588

082

983209 SAP AG 1999

RE)ORT 777-

2A TRANSA2TION FD USING BD2DATA U)DATE -

ALL TRASATI Camp

RE)ORT 777-

2A TRANSA2TION FD USING bdcdata U)DATE -

2A TRANSA2TION 3tranact9oncode4 USING 3bdc1table4 C (ODE A E N C U)DATE A S C -

Default for UPDAT1 is A

-ith the parameter 4PAT7 you can contro ho$ dataase updates arising from a transaction are

carried out There are three options

A (asynchronous updating) The caed transaction does not $ait unti the dataase has een

updated it simpy for$ard the updates to the SAP update service This usuay speeds up the 2T

program This processing mode is N5T recommended for arge data sets as the caed transaction

does not receive a competion message from the update modue

The caing 2T program therefore cannot te if the transaction has een successfuy competed Cou

shoud use the updating administration function (transaction S8) to determine $hether updating

$as terminated eary The error anaysis correction functions for are ess hepfu than $ith

synchronous updating

S (synchronous updating) -ith synchronous updating the caed transaction $aits unti a the

updates have een competed So processing is so$er than $ith synchronous updating The caed

transaction can ho$ever report any updating errors to the program $hich maes error

anaysiscorrection easier

+ (local updating) $ith oca updating the dataase is not updated in a separate process it is

updated in the caers process (see appication hep documentation for the AAP ey$ord S7T

4PAT7 TAS6 +52A+)

copy SAP AG BC420 12-65

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 6688

088

983209 SAP AG 1999

ALL TRASATI C

RE)ORT 777-DATA mtab T0)E TABE OF bdcm8coll-

2A TRANSA2TION FD USING bdcdata (ESSAGES INTO mtab-

2A TRANSA2TION 3tranact9oncode4 USING 3bdc1table4 C (ODE A E N C U)DATE A S C (ESSAGES INTO 3metab4 C -

7SSAlt7S specifies that a system messages that are output during the eecution of a 2A++

TampANSA2TI5N are $ritten to the interna tae L7SSTA The interna tae must have the

structure 2Slt25++

4nie the cassica atch input processing $ith sessions 2A++ TampANSA2TI5N does not offer any

specia processing procedures for transactions containing errors There are no restart functions for

transactions that contain errors or that cause updating terminations

copy SAP AG BC420 12-66

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 6788

083

983209 SAP AG 1999

ALL TRASATI C4

RE)ORT 777-DATA mltot T0)E ctuaram-

2A TRANSA2TION FD USING BD2DATA

O)TIONS FRO( mltot-

2A TRANSA2TION 3tranact9oncode4 USING 3bdc1table4 C (ODE A E N C U)DATE A S C (ESSAGES INTO 3metab4 C O)TIONS FRO( ot C -

RE)ORT 777-DATA mltot T0)E ctuaram-2A TRANSA2TION FD USING bdcdata

O)TIONS FRO( mltot-

The addition 5PTI5NS enaes the ca transaction statement to e controed through a structure

The structure must have the dictionary type 2T43PAampAS

The addition 5PTI5NS Famp5 must not e comined either $ith the addition 57 or $ith

4PAT7 ore information on the net side

copy SAP AG BC420 12-67

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 6888

085

983209 SAP AG 1999

Structure TUltPARAMS

DISMD1 Procen mode anaoo o addon amp

UPDMD1 $pdae mode anaoo o addon $PA

ATTMD1 CA mode CA conro

D19SI1 orce de=a EndoE e drn procen

RAMMIT +o eD a Camp amp(

IPT +o a ac np eonF a F S-B+P SPAC

I1D +o a ac np eon a=er end o= BC daa

The components are defined as foo$s

The components 7FSIM7 ampA25IT N5INPT and N5I7N can have the foo$ing

vaues KGK E Ces or K K E No

If the addition 5PTI5NS Famp5 is not specified the foo$ing settings appy to the contro

parameters

IS57 from addition 57

4P57 from addition 4PAT7

2ATT57 2ATT not active

7FSIM7 o not not use defaut $indo$s siDe

ampA25IT Successfu eit at 25IT -5amp6

N5INPT atch input session active (SC9INPT E G)

N5I7N atch input session sti active after end of 2 data

copy SAP AG BC420 12-68

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 6988

087

983209 SAP AG 1999

SMSBID Message ID

SMSBT Message T(pe C1GIGWGSGA

SMSB Message umber

SMSB6 Message ariable 6

SMSBamp Message ariable amp

SMSB Message ariable

SMSB4 Message ariable 4

SMSBID Message ID

SMSBT Message T(pe C1GIGWGSGA

SMSB Message umber

SMSB6 Message ariable 6

SMSBamp Message ariable amp

SMSB Message ariable

SMSB4 Message ariable 4

Return code$

S(stem fields$

alue Meaning

0 Successful

6000 1rror in transaction

6000 1rror in processing call transaction

see also the s(stem fields specified

alue Meaning

0 Successful

6000 1rror in transaction

6000 1rror in processing call transaction

see also the s(stem fields specified

9ield name Meaning9ield name9ield name MeaningMeaning

Return ode and S(stem 9ields

The return code is used to specify $hether the caed transaction $as processed successfuy In

addition severa system fieds are fied The numer I type and variaes of the diaog message

output y the caed transaction Cou need this information to output the message tet

copy SAP AG BC420 12-69

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 7088

030

983209 SAP AG 1999

Benerated Program of the TA Recorder

REFRES= (ESSTAB-

2A TRANSA2TION tcode USING bdcdata (ODE ctumode U)DATE cudate (ESSAGES INTO metab-OO) AT metab- ENDOO)-IF lubrc 34 AND e8rou 34 S)A2E- IF e8rouoenend - 2A FUN2TION BD2O)ENGROU) E)ORTING ---------

--------- E8rouoened - ENDIF- 2A FUN2TION BD2INSERT E)ORTING T2ODE tcode TABES D0N)ROTAB bdcdata-ENDIF-REFRES= bdcdata-

Message table output

pen error session

Insert data record that

has errors into error

session

If you have seected ca transaction on the seection screen the generated program runs as foo$s

The onine transaction is caed $ith ca transaction and passed to tae 2ATA A the

messages arising during the ca transaction are put in the interna tae 7SSTA

7SSTA is output as a ist

If you have specified an error session ( 73ltamp54P L SPA27) on the seection screen and the

ca transaction comes across an error (+3S4amp2 L 0) the error session is opened The error

session is ho$ever ony opened once Then the data record is paced in the session

A the other data records that have errors $ith ca transaction are paced in the same session

copy SAP AG BC420 12-70

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 7188

036

983209 SAP AG 1999

The Transaction Recorder

PrinciplesPrinciples

Recording )ith the LSMWRecording )ith the LSMW

Principles of atch Input and all TransactionPrinciples of atch Input and all Transaction

Integrating the TA Program into the DWIntegrating the TA Program into the DW

Using the TA Recorder Using the TA Recorder

copy SAP AG BC420 12-71

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 7288

03amp

983209 SAP AG 1999

Integrating into the DW

Transfer program

AAP Dictionar(

Integrate

SDA0

SDA6

SDAamp

SDA

Cou can integrate the generated program into the G9- The structure of the fie must e created

in the AAP ictionary The taes SGA0 SGA8 SGA1 and SGA $i e fied

copy SAP AG BC420 12-72

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 7388

03

983209 SAP AG 1999

DW Release 42

Goo

-B eeae 45

aa ran=er ogtec

Int customer data transfer ob-ect

ecord =ed

Dece daa ran=er

d Goo

The ampunction ampor interatin TA recorder prora$s is

i$ple$ented in the

D+-B in Release

The recorder can e integrated as of ampeease and it is provided in the G9- ampeease

ltot to the G9- ampeease 5n the initia screen you can integrate programs y choosing ampoto

( +nt customer ata transfer o-ect

copy SAP AG BC420 12-73

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 7488

034

983209 SAP AG 1999

reating Program as D b-ect

Comer ran=er ogtec

ampgtec ype

Sor eD =or ogtec

aa ran=er proram

Srcre name

9900

(+A1

Cane comer

ZBCA+G

ZB

ustomer transfer ob-ect

umber bet)een 7000 and 7777

b-ect t(pe

Assignment to R ob-ect

Short tet for D ob-ectShort description

Data transfer program

ame of generated program

Structure name

A structure Cstructure la(out )ith this name is created in

the AAP Dictionar(

For ampeease transfer oects $ere not organiDed y 5amp oects ut y a G numer (00089

OOOO) The numer range O0009OOOO is reserved for customers

To create a connection to the ne$ G 9- you must assign the program to a 5amp oect

2reate a short tet for the G oect This tet $i appear in the method seection ist

Specify the program to e incuded

Specify a name for the structure to e created in the AAP ictionary

Note $he generated program appears under program type +N and not under program type

-

copy SAP AG BC420 12-74

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 7588

032

983209 SAP AG 1999

Adantages

Automatic program registration in the DW in

Release 48

ou can use all the functions defined for

standard ob-ects

1ception$ The (reate ampile ith data

function

If you incuded the oect in the ampeease $orench it is automaticay avaiae in the ampeease

B $orench

A the $orench functions are avaiae for your oect ecept for Create files ith transfer ata

copy SAP AG BC420 12-75

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 7688

038

983209 SAP AG 1999

ou are no) able to$

The Transaction Recorder$ Unit Summar(

Use the recording function in the LSMW to create

a batch input session )ith the data from the

eternal s(stem

Use the TA Recorder to create (our o)n data

transfer program

Anal(e programs that )or+ )ith batch input or

call transaction

Integrate the TA Recorder programs into the

DW

copy SAP AG BC420 12-76

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 7788

ercise 1

nit $ -ecorder

$opic 2reating etors

$ransaction -ecorder ercise 1

bull 2reating detors $ith eterna numer assignment

bull etor numers M9980008 to M9980080

Address data for detors $ith eterna numer assignment is to

e transferred using program ampFI700

ro4ect F5

Supro4ect +5

-un +575

$as)s 85 95 8S25

9oad program -F+00

8 In the foo$ing eercises eisting data is to e changed Therefore these detors $ith

eterna numer assignment have to first e created

898 4nder suproect 79 create run 797G9 $ith the name Detors ith

eternal numers

copy SAP AG BC420 12-77

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 7888

891 2reate the foo$ing three tass The tass map the foo$ing process steps

convert data create + session and process + session

89198 In run 797G9 create the foo$ing tas

9 Tas AP9

9 Name 2onvert data 9 Tas type AP

9 Program type +S-

Seect the foo$ing +S- oect

+S- proect 2109

+S- suproect 7I9

+S- oect I997GT

89191 In run 797G9 create the foo$ing tas 9 Tas +5A9

9 Name 2reate I session

Tas type +5A

9 Program type INP

Seect program ampFI700 $ith the variant

I97G9

8919 In run 797G9 create the foo$ing tas

9 Tas S29

9 Name Process I session Tas type S2

9 Program type amp7P5

Seect program ampS2S4 $ith the variant

S497G9

Note that you have to correct the seuence of the tass 2onvert data

create + session and process + session

4se the uttons

89 Start the run

The detors $i e created $ith eterna numer assignments

89 2hec in transaction F0 that the detors M9980008 to M9980080 have een

created

copy SAP AG BC420 12-78

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 7988

ercise

nit $ransaction -ecorder

$opic -ecording function in the 9S8(

bull 2reate a recording using the +S-

bull ltenerate a atch input session

2hange the detor address data in the amp System

Name of the recording +

Name of the file +2055+F9

8 2reate the recording 7I3 using the +S- ampecord the transaction F01 (2hange

detor)

898 efore you create the recording first test the transaction onineQ

For the recording use detor M9980008 5n the initia screen of the F01

maintain the foo$ing fieds ony

etor etor M9980008

2ompany code 0008

Address data seect

Note $he data record must e saved hile recording

891 aintain the names and the descriptions for the foo$ing fieds

Name city street posta code and teephone numereete a other fieds in screen 880 from the recording (eg S5ampT+ +AN8

SPampAS)

4se the same technica names as sho$n in the tae eo$ (automatic fied

mapping)

copy SAP AG BC420 12-79

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 8088

1 2reate the suproect 7I9 and the ne$ oect TA3 in your proect 2109

aintain the oect attriutes and seect the item atch input recording Seect your

recording 7I3

2reate the source structure address

2reate the source fieds according to the tae eo$ 5r copy them from proect 2109S37N suproect 7I900 oect TA900

198 Fie setup The data from the egacy system are dispayed in the foo$ing tae

Fied name Fied type Fied ength escription

N5 2 8B etor numer

NA7 2 Name

STamp77T 2 Street

2ITC 2 2ityPace of residence

MIP 2 80 Posta code

T7+ 2 8B Teephone numer

191 aintain the fied mapping 4se the automatic fied mapping (via menu item

7tras)

19 Specify the fies 5ny maintain the fie name of the source fie

Name of the fie 21099IFI+7

2odepage 8800

19 Import the data and convert them ispay the data in each caseQ

19 2reate a atch input session

19B ampun the atch input session

copy SAP AG BC420 12-80

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 8188

ercise 3

nit $ransaction -ecorder

$opic -ecording ith the $ -ecorder

bull ltenerate a recording using the TA recorder

bull Test the recording

2hange the address data of detors in the amp system

Name recording $+

Name of the file +2055+F9

8 2reate the recording TA37I3 using the transaction recorder ampecord the

transaction F01 (change detor)

898 4se detor M9980008 for the recording 5n the F01 initia screen ony

maintain the foo$ing fieds

etor etor M9980008

2ompany 2ode 0008

Address data seect

Note $he data record must e saved hen recording

eete a fieds that do not eist in the source fie 21099IFI+7 from screen

880 in the recording (eg 6NA89S5ampT+ 6NA89+AN8 6ANNQ9SPampAS) Note o not deete fieds ampF01946ampS and ampF0190880

Save the recording no$

1 S$itch to the recordings overvie$

198 Process the recording $ith the processing mode A (dispay a)

191 Process the recording $ith the processing mode RN (no dispay)

19 If the recording has een tested and no error has occurred generate a I session

and run it using the I monitor If an error shoud occur generate the recordingagainQ

copy SAP AG BC420 12-81

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 8288

From the recording generate the program M21037I3 in your deveopment cass

2109 Seect the foo$ing

bull ampead fied contents from fie

bull 2reate test data in the fie 2103dei3test3tt

98 Save this program and eecute it ltenerate one I session each and process it

2arry out the same steps again using the ca transaction

The generated program shoud no$ e changed so that fie 21099IFI+7 can e

read and processed

98 2hange the defaut vaue of the fie name (parameter dataset) in 21099

IFI+7

91 2hange the structure definition eete the company code fied and the address

data checo from the structure

9 2hange the su9routine ca perform dc3fied for the company code (KampF019

46ampSK) so that the vaue 0008 is transferred

9 2hange the su9routine ca perform dc3fied for the address data checo

(KampF0190880K) so that the vaue G is transferred

9 Start the program again and read the data from the fie 21099IFI+7 $ith

detor data ltenerate a I session $ith it and run it

copy SAP AG BC420 12-82

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 8388

033 Include DR16INCLUDE BDCRECX1

SELECTION-SCREEN BEGIN OF LINE

PARAMETERS SESSION RADIOBUTTON GROUP CTU create sessi SELECTION-SCREEN COMMENT $amp TEXT-S FOR FIELD SESSION

se(ecti-scree )siti +

PARAMETERS CTU RADIOBUTTON GROUP CTU ca(( trasacti

SELECTION-SCREEN COMMENT $amp TEXT-S FOR FIELD CTU

SELECTION-SCREEN END OF LINE

SELECTION-SCREEN BEGIN OF LINE

SELECTION-SCREEN COMMENT $amp TEXT-S1 FOR FIELD GROUP

se(ecti-scree )siti $+

PARAMETERS GROUP1$amp r) ae 0 sessi

SELECTION-SCREEN COMMENT $amp TEXT-S+ FOR FIELD CTUMODE

se(ecti-scree )siti

PARAMETERS CTUMODE LIE CTU2PARAMS-DISMODE DEFAULT 3N3

A4 s56 a(( 78)rs

E4 s56 78)r errr (8

N4 7 t 7is)(a8 78)r

SELECTION-SCREEN END OF LINE

SELECTION-SCREEN BEGIN OF LINE

SELECTION-SCREEN COMMENT $amp TEXT-S$ FOR FIELD USER

se(ecti-scree )siti $+

PARAMETERS4 USER1$amp DEFAULT S9-UNAME ser 0r sessi i atc5

SELECTION-SCREEN COMMENT $amp TEXT-S FOR FIELD CUPDATE

se(ecti-scree )siti

PARAMETERS CUPDATE LIE CTU2PARAMS-UPDMODE DEFAULT 3L3

S4 s8c5rs(8

A4 as8c5rs(8

L4 (ca(

SELECTION-SCREEN END OF LINE

SELECTION-SCREEN BEGIN OF LINE

SELECTION-SCREEN COMMENT $amp TEXT-S FOR FIELD EEP

se(ecti-scree )siti $+

PARAMETERS4 EEP AS CltECBOX 3 3 = 7e(ete sessi i0 0iis5e7

3X3 = gtee) sessi i0 0iis5e7

SELECTION-SCREEN COMMENT $amp TEXT-S FOR FIELD E2GROUP

copy SAP AG BC420 12-83

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 8488

se(ecti-scree )siti

)araeters E2GROUP1$amp r) ae 0 errr-sessi

SELECTION-SCREEN END OF LINE

SELECTION-SCREEN BEGIN OF LINE

SELECTION-SCREEN COMMENT $amp TEXT-S FOR FIELD ltOLDDATE

se(ecti-scree )siti $+

PARAMETERS4 ltOLDDATE LIE S9-DATUM

SELECTION-SCREEN COMMENT +11amp TEXT-S$ FOR FIELD E2USER

se(ecti-scree )siti

PARAMETERS4 E2USER1$amp DEFAULT S9-UNAME ser 0r errr-sessi

SELECTION-SCREEN END OF LINE

SELECTION-SCREEN BEGIN OF LINE

SELECTION-SCREEN COMMENT +11amp TEXT-S FOR FIELD E2EEP

se(ecti-scree )siti

PARAMETERS4 E2EEP AS CltECBOX 3 3 = 7e(ete sessi i0 0iis5e7

3X3 = gtee) sessi i0 0iis5e7

SELECTION-SCREEN END OF LINE

SELECTION-SCREEN BEGIN OF LINE

SELECTION-SCREEN COMMENT +11amp TEXT-S FOR FIELD E2ltDATE

se(ecti-scree )siti

PARAMETERS4 E2ltDATE LIE S9-DATUM

SELECTION-SCREEN END OF LINE

SELECTION-SCREEN SIP

SELECTION-SCREEN BEGIN OF LINE

SELECTION-SCREEN COMMENT 1amp TEXT-S1 FOR FIELD NODATA

PARAMETERS4 NODATA DEFAULT 33 LOER CASE 7ata

SELECTION-SCREEN END OF LINE

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

Batc5i)t7ata 0 si(e trasacti

DATA4 BDCDATA LIE BDCDATA OCCURS ITlt ltEADER LINE

essaes 0 ca(( trasacti

DATA4 MESSTAB LIE BDCMSGCOLL OCCURS ITlt ltEADER LINE

errr sessi )ee7 3 3 r 3X3amp

DATA4 E2GROUP2OPENED

essae tets

TABLES4 T1

copy SAP AG BC420 12-84

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 8588

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

at se(ecti scree

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

AT SELECTION-SCREEN

r) a7 ser st e 0i((e7 0r create sessi

IF SESSION = 3X3 AND

GROUP = SPACE OR USER = SPACE

MESSAGE E1MSamp

ENDIF

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

)e 7ataset

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

FORM OPEN2DATASET USING P2DATASET

OPEN DATASET P2DATASET IN TEXT MODE

IF S9-SUBRC

RITE4 TEXT-E S9-SUBRC

STOP

ENDIF

ENDFORM

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

c(se 7ataset

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

FORM CLOSE2DATASET USING P2DATASET

CLOSE DATASET P2DATASET

ENDFORM

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

create atc5i)t sessi

t 0r ca(( trasacti siamp

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

FORM OPEN2GROUP

IF SESSION = 3X3

SIP

RITE4 $amp 3Create r)3I1amp GROUP

SIP

)e atc5i)t r)

CALL FUNCTION 3BDC2OPEN2GROUP3

EXPORTING CLIENT = S9-MANDT

copy SAP AG BC420 12-85

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 8688

GROUP = GROUP

USER = USER

EEP = EEP

ltOLDDATE = ltOLDDATE

RITE4 amp 3BDC2OPEN2GROUP3I$amp

1$amp 3retrc7e43I+amp

S9-SUBRC

ENDIF

ENDFORM

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

e7 atc5i)t sessi

ca(( trasacti si4 errr sessiamp

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

FORM CLOSE2GROUP

IF SESSION = 3X3

c(se atc5i)t r)

CALL FUNCTION 3BDC2CLOSE2GROUP3

RITE4 amp 3BDC2CLOSE2GROUP3Iamp

1$amp 3retrc7e43I+amp

S9-SUBRC

ELSE

IF E2GROUP2OPENED = 3X3

CALL FUNCTION 3BDC2CLOSE2GROUP3

RITE4

RITE4 amp 3Fe5(era))e 6r7e eret3Iamp

ENDIF

ENDIF

ENDFORM

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

Start e6 trasacti accr7i t )araeters

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

FORM BDC2TRANSACTION USING TCODE

DATA4 L2MSTRINGamp

DATA4 L2SUBRC LIE S9-SUBRC

atc5 i)t sessi

IF SESSION = 3X3

CALL FUNCTION 3BDC2INSERT3

EXPORTING TCODE = TCODE

TABLES D9NPROTAB = BDCDATA

RITE4 3BDC2INSERT3Iamp

copy SAP AG BC420 12-86

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 8788

TCODE

3retrc7e43I+amp

S9-SUBRC

3RECORD43

S9-INDEX

ca(( trasacti si

ELSE

REFRESlt MESSTAB

CALL TRANSACTION TCODE USING BDCDATA

MODE CTUMODE

UPDATE CUPDATE

MESSAGES INTO MESSTAB

L2SUBRC = S9-SUBRC

RITE4 3CALL2TRANSACTION3

TCODE

3retrc7e43I+amp

L2SUBRC

3RECORD43

S9-INDEX

LOOP AT MESSTAB

SELECT SINGLE FROM T1 ltERE SPRSL = MESSTAB-MSGSPRA

AND ARBGB = MESSTAB-MSGID

AND MSGNR = MESSTAB-MSGNR

IF S9-SUBRC =

L2MSTRING = T1-TEXT

IF L2MSTRING CS 313

REPLACE 313 ITlt MESSTAB-MSGH1 INTO L2MSTRING

REPLACE 3$3 ITlt MESSTAB-MSGH$ INTO L2MSTRING

REPLACE 33 ITlt MESSTAB-MSGH INTO L2MSTRING

REPLACE 33 ITlt MESSTAB-MSGH INTO L2MSTRING

ELSE

REPLACE 33 ITlt MESSTAB-MSGH1 INTO L2MSTRING

REPLACE 33 ITlt MESSTAB-MSGH$ INTO L2MSTRING

REPLACE 33 ITlt MESSTAB-MSGH INTO L2MSTRING

REPLACE 33 ITlt MESSTAB-MSGH INTO L2MSTRING

ENDIF

CONDENSE L2MSTRING

RITE4 MESSTAB-MSGT9P L2MSTRING$+amp

ELSE

RITE4 MESSTAB

ENDIF

ENDLOOP

copy SAP AG BC420 12-87

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 8888

SIP

Eree 0e5(era))e

IF L2SUBRC AND E2GROUP SPACE

IF E2GROUP2OPENED = 3 3

CALL FUNCTION 3BDC2OPEN2GROUP3

EXPORTING CLIENT = S9-MANDT

GROUP = E2GROUP

USER = E2USER

EEP = E2EEP

ltOLDDATE = E2ltDATE

E2GROUP2OPENED = 3X3

ENDIF

CALL FUNCTION 3BDC2INSERT3

EXPORTING TCODE = TCODE

TABLES D9NPROTAB = BDCDATA

ENDIF

ENDIF

REFRESlt BDCDATA

ENDFORM

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

Start e6 scree

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

FORM BDC2D9NPRO USING PROGRAM D9NPRO

CLEAR BDCDATA

BDCDATA-PROGRAM = PROGRAM

BDCDATA-D9NPRO = D9NPRO

BDCDATA-D9NBEGIN = 3X3

APPEND BDCDATA

ENDFORM

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

Isert 0ie(7

Page 18: BC420_46C - 012The Transaction Recorder

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 1888

065

983209 SAP AG 1999

The Transaction Recorder

PrinciplesPrinciples

Recording )ith the LSMWRecording )ith the LSMW

Principles of atch Input and all TransactionPrinciples of atch Input and all Transaction

Integrating the TA Program into the DWIntegrating the TA Program into the DW

Using the TA Recorder Using the TA Recorder

copy SAP AG BC420 12-18

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 1988

067

983209 SAP AG 1999

Session

generator

Recording Using the LSMW

-ith the +S- you can create your o$n recordings

The +S- uses the standard TA recorder here yet evauates the recording itsef The information

from the recording is used to create atch input sessions

The created atch input session can e processed as usua $ith the atch input monitor

Note As $ith the standard procedure it is euay important that the data is converted

copy SAP AG BC420 12-19

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 2088

0amp0

983209 SAP AG 1999

reating Recording

Admnraon

ecordn

Goo

ame of recording

Description

)ner

ame of transaction

Start recording

lto into the +S- and seect the menu path ampoto (Recorings An overvie$ of a previousy

created recordings for your proect are dispayed To start a ne$ recording seect Create

To create a recording you must define the name the description and the o$ner

7nter the name of the transaction you $ant to record

7ecute the transaction and compete it propery

Note ampecordings are assigned to ony one proect 9 so the name of the recording must e uniue

copy SAP AG BC420 12-20

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 2188

0amp6

983209 SAP AG 1999

hanging ustomer Data$ Initial Screen

9ield ontents

BCC$Samp $SZAV

BCamp(Camp )00

02-($++ -88-10000

02-0110

02-0130

$SZAV

9ield ame

Comer

Company code

Z-88-10000

Genera daa

Comer Z-88-10000

+ame

9ield ontents

BCamp(Camp $PA

BCS$BSC SAPSZA1 0300ASS

BCS$BSC SAPSZA1 0301Camp$

BCC$Samp SZA10100-+$B

A1AA-S Garden Sree

A1AA-amp$S+$1 34

A1AA-PampSCamp1 02105

9ield ame

Screen

111

Screen

106

In the aove eampe the transaction Change customer F01 is recorded

Note

You must ma)e some modification to the field values for all the fields you ant to capture

for the data transfer For the purposes of recording a change can simply mean overriting

one single character in a field ith the same character

ven if fields are to e filled using S$amp$ parameters the values must still e changed on

the screen in order to capture them

(ith online transactions screen sequences may appear that are different than in the

recording

copy SAP AG BC420 12-21

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 2288

0ampamp

983209 SAP AG 1999

Results

RecordingRecording R1lt6 Demolt6

9D0amp hange customer Caccounting

SAPM90ampD 0608

DltURSR R90ampD=UR

Dlt=D1 gt00

R90ampD=UR 5560000

R90ampDD0660

US1ltA

SAPM90ampD 0666

Dlt=D1 UPDA

DltSUSR SAPLSA6

DltSUSR SAPLSA6

DltURSR SA6ltD0600T1LltUM1

ADDR6ltDATASTR11T 4 Barden Street

ADDR6ltDATAPSTltD1 0amp602

ADDR6ltDATAIT6 oston

SA6ltD0600T1LltUM1 8638257755

The resuts of the recording using the +S- are dispayed in a tree structure

After the recording has finished you can edit it Cou can deete fieds or add ne$ ones

copy SAP AG BC420 12-22

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 2388

0amp

983209 SAP AG 1999

Assigning 9ield ames

Recording R16 Demolt6

Dlt=D1 UPDA

DltSUSR SAPLSA6

DltSUSR SAPLSA6

DltURSR SA6ltD0600T1L

ADDR6ltDATAAM16 Lisa Eofmeister

ADDR6ltDATAPSTltD1 0amp602

ADDR6ltDATAIT6 oston

ame

+ame

ecrpon

e=a ae

A1AA-+A1

A1AA-+A1

Comer name

a o=meer

Screen =ed

ustomer name

double clic+

Cou can assign names for each recorded fied The specia fieds (2356257 2324ampS5amp

and 23S4S2amp77N) are not incuded here Cou can choose the fied names -hen the atch

input session is created the contents of these fieds are assigned to the target fieds specified in the

eft coumn

Functions

efaut Assigns to the fied names of the underying target fied and its fied description

ampeset eetes fied name and fied description

oue cic 7dits fied name fied description and defaut vaue

Note Cou can use fied names more than once =o$ever the fied name is ony avaiae once in thefied mapping For this reason it is not practica to use fied names more than once

For a those fieds for $hich you do not assign a name the defaut vaue is used $hen the atch

input session is created These defaut vaues can e seen as constants This is especiay usefu for

chec oes (for eampe 08 vie$ seection)

The +S- supports automatic fied mapping Source fieds and target fieds can e assigned to each

other automaticay The fieds are assigned to the corresponding fieds of the same name Therefore

the fied names of the source structure shoud e given the same or simiar names as the fied names

in the target structure

copy SAP AG BC420 12-23

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 2488

0amp4

983209 SAP AG 2001

Addinggtremoing screen fields

Repeating recording

9or identical field names the name and description are

assigned automaticall(

1diting Recording

02-($++

(+A1-A+

(+A1-+A1

(+A1-Samp

(+A1-+A2

(+A1-SAS

Comer accon nmer

e

+ame 1

Sor =ed

+ame 2

Sree

Selection of all

aailable screen

fields

Cou can ater add ne$ screen fieds if you need to 6eep in mind that fieds shoud ony e added in

paces $here they are aso provided on the screen other$ise you $i get an error $hen the I

session is processed

After saving you $i get the message The data has een saved successfuy No$ the recordings

are avaiae for the oect attriutes

If you repeat the recording you can record a ne$ screen seuence $ith ne$ fieds Provided that the

fied names (eg 6NA89NA78) are identica the names and descriptions are automaticay

assigned

copy SAP AG BC420 12-24

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 2588

0amp2

983209 SAP AG 1999

b-ect T(pe and Import Method$ Recording

Standard atch Input gt Direct Input

atch Input Recording

API

IDoc

ampgtec ype ) mpor meod

Bac np recordn

ecordn ec1

The recording is no$ avaiae $ith the oect attriutes

Net you create a proect or su9proect in the +S- and specify process the data transfer

Cou eecute the data transfer as in the standard system

efine the source fieds and structures

efine the fied mapping

ampead and convert the data

2reate and import a atch input session

copy SAP AG BC420 12-25

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 2688

0amp8

983209 SAP AG 1999

The Transaction Recorder

PrinciplesPrinciples

Recording )ith the LSMWRecording )ith the LSMW

Principles of atch Input and all TransactionPrinciples of atch Input and all Transaction

Integrating the TA Program into the DWIntegrating the TA Program into the DW

Using the TA Recorder Using the TA Recorder

copy SAP AG BC420 12-26

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 2788

0amp3

983209 SAP AG 1999

Transaction Recorder

Online

Transaction

RecordingTransfer Program

T

Included in the Batch Input Monitor

Cou use the transaction recorder to record transactions and then use the transaction recording to

generate a transfer program The program ao$s you to transfer data using either atch input or ca

transaction

copy SAP AG BC420 12-27

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 2888

0amp5

983209 SAP AG 1999

hanging ustomer Data$ Initial Screen

9ield ontents

BCC$Samp $SZAV

BCamp(Camp )00

02-($++ Z-88-10000

02-0110

02-0130

$SZAV

9ield ame

Comer

Company code

Z-88-10000

Genera daa

Comer Z-88-10000

+ame

9ield ontents

BCamp(Camp $PA

BCS$BSC SAPSZA1 0300ASS

BCS$BSC SAPSZA1 0301Camp$

BCC$Samp SZA10100-+$B

A1AA-S Garden Sree

A1AA-amp$S+$1 34

A1AA-PampSCamp1 02105

9ield ame

Screen

111

Screen

106

In the aove eampe the transaction Change customer F01 is recorded

copy SAP AG BC420 12-28

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 2988

0amp7

983209 SAP AG 2001

hange Debitor$ Pa(ment Transactions C6

Banlt dea

Screen

10

9ield ontent

BCC$Samp (+B(-BA+(+01

BCamp(Camp BA+((+B(-BA+(S01

(+B(-BA+(01 12345679

(+B(-BA+(+01 22222222

Debitor 5560000

9ield ame

Inde

copy SAP AG BC420 12-29

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 3088

00

983209 SAP AG 1999

hanging ustomer Data$ Pa(ment Transactions Camp

Addre

an+ countr( US

an+ code 6amp42837

Banlt dea

ustomer 5560000

9ield ontents9ield ame

BCC$Samp (+A1-(+ZA

BCamp(Camp $PA

(+B(-Z01

Screen

10

Screen

100

SAPLBA

9ield ontents

BCC$Samp B+(A-BA+(A

BCamp(Camp +

B+(A-BA+(A +aona Banlt

9ield ame

In different transactions the modue poo may change This is the case $ith for eampe customer

master data The TA recorder records modue poo changes automaticay

copy SAP AG BC420 12-30

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 3188

06

983209 SAP AG 1999

Eierarch( Displa( of the Recording

02amp

02

SAP02 0106

BCC$Samp 02-0130

BCamp(Camp )00

02-($++ -88-10000

02-0110

02-0130

SAP02 0111

BCamp(Camp V

BCC$Samp A1AA-amp$S+$1

A1AA-S Garden Sree

Recording

-ith the TA recorder the resuts are aso a ist in a hierarchy dispay =o$ever you cannot assign

your o$n fied names as you can in the +S-

copy SAP AG BC420 12-31

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 3288

0amp

983209 SAP AG 1999

Recording erie)

Recording

Transfer program

9unction module

ontains onl( the data

from the recording

Test data

Test

reate

reate

reate

reate

1dit hange recording

Process recording

Cou can edit the recording as needed

The recording can e tested and eecuted again The screens are run through in the same $ay as in

the recording

The recording can then e used to create

atch input sessions

Test data

ata transfer programs $ith atch input or ca transaction

Function modues

copy SAP AG BC420 12-32

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 3388

0

983209 SAP AG 1999

1 02 BS

2 SAP02 106

3 BCC$Samp $SZAV

4 BCamp(Camp )00 5 02-($++ -88-10000

6 02-0110

7 02-0130

8 $SZAV

9 SAP02 111

10 BCamp(Camp V

11 BCC$Samp A1AA-amp$S+$1

12 A1AA-S Garden Sree

Program Screen St 9ield ame 9ield alue

Recording 1ditor

Recording

Add gt delete lines 9ormat chec+

Import gt eport of recording

In the editor you can add or deete ines Cou can aso change the contents of individua ines

-ith the function Chec) you can specify $hether the edited version of the recording sti has the

correct synta

Cou can aso eport import recordings to from a seuentia fie

After editing save the recording changes

copy SAP AG BC420 12-33

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 3488

04

983209 SAP AG 1999

Recording Seeral Transaction Runs

RecordingF

Directl( after the first recordingG or

In the displa( mode of the recording

In this step you can record additiona transactions and add additiona transaction runs to the

recording

Cou can record the additiona transactions directy after a recording or in the edit screen of a

recording

copy SAP AG BC420 12-34

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 3588

02

983209 SAP AG 1999

1ditor$ Importing and 1porting Recordings

6 T 9D0amp S

amp SAPM90ampD 608

DltURSR

4

2

8 SAPM90ampD 666

60

66

Program Screen St 9ield name 9ield alue

cempA

e name

aa =orma

cemp

A

e name

aa =orma

1port

Import

Presentation Serer

If the editor functions in the systems do not provide a the functions you need you can do$noad the

recording to your presentation server using the Eort function and then edit the recording using a

P2 editor

Cou use the Import function to import the data ac into the amp System ae sure the fie is sti in

the correct format

copy SAP AG BC420 12-35

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 3688

08

983209 SAP AG 1999

Processing the Recording

Recording

Process )ith ALL TRASATI

Parameer

Proce mode$pdae mode

CA mode

e=a e

Con a=er comm

+o a B eon

nd +o a B mode

A

A

T

The recording can e eecuted directy The data from the recording is used and the transaction is

processed $ith ca transaction

2a transaction provides a range of options for caing appication transactions $hich are discussed

on the foo$ing t$o pages

copy SAP AG BC420 12-36

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 3788

03

983209 SAP AG 1999

Process mode

Update mode

ATT mode

Processing Recording )ith T 6

A

1

Displa( all screens

Displa( errors onl(

o displa(

L

S

A

Local

S(nchronous

As(nchronous

A

o ATT

ATT )ithout indiidual screen control

ATT )ith indiidual screen control

Processing mode

=ere you can specify the processing mode 9 it is the same as the processing mode for atch input

4pdate mode

=ere you can specify the update mode For more information see the unit ca transaction

2ATT mode

=ere you can mae specia settings if you $ant to test the recording under 2ATT conditions (ony

necessary for 2ATT runs) Specia functions are caed in the 2ATT too for each screen at the end of

P5 and at the start of PAI

copy SAP AG BC420 12-37

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 3888

05

983209 SAP AG 1999

Default sie

ont after commit

ot a I session

1nd$ ot a I mode

Processing Recording )ith T amp

The screen standard sie is used for the

processing

ommit )or+ does not end the processing

o I mode is actie The transaction )ill run

through as in online

I mode is selected nce the data in the D

table is processedG the I mode is set to inactie

Standard siDe

If you seect this the screens are processed in the standard siDe in the foreground (in foreground or

dispay errors ony) Note the standard siDe is a$ays used for acground processing

Further after commit

The first commit $or in a transaction does not ead to the end of the recording

Note A atch input transaction is ended $ith the first commit $or

No I mode

The system fied SC9INPT is not set (SC9INPT E ) So transactions are run through as in onine

7nd No I mode

5ny use if you choose the processing mode 7 (dispay errors ony) Then the transaction is processed in the acground in atch input mode and if there is an error the screens run through in

the foreground

copy SAP AG BC420 12-38

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 3988

07

983209 SAP AG 1999

I Mode

atch input

mode

nline

Some transactions behae differentl( in batch input mode

than in online Cbatch input capabilit(

atch input mode sets the s(stem field SIPT H

Not every transaction can run the same onine and in atch input mode The transaction must decide

itsef $hether it is caed onine or in atch input mode

The system sets the system fied SC9INPT E G if the atch input mode is active (this aso appies

to ca transaction) From this system fied the transaction can identify $hether to run onine or in

atch input mode

copy SAP AG BC420 12-39

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 4088

040

983209 SAP AG 1999

reating a Session 9rom the Recording

Recordingnl( contains the data

from the recording

Seon name 02amp

Aoraon ampBS(eep eon

oclt dae 10102000

Cou can create a atch input session directy from the recording that you can then process using the

atch input monitor

copy SAP AG BC420 12-40

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 4188

046

983209 SAP AG 1999

reating Test Data

Test Data

Recording

ranranpBC420AAe name

The file onl( contains the data from the recording

Rgt

Application Serer

Structure

Cou can create a fie from the recordingH the fie $i contain a the fieds from the recording The

fieds are added to the fie $ith the ength you specified in the definition

The fied order corresponds to the order in the recording overvie$ Technica fieds

(2356257 2324ampS5amp and so on) are incuded

The data can ony e stored on the appication server If you do not specify a path the fie is stored in

the $or directory of the appication server

If the specified test fie aready eists the ne$ data record is added to this fie

copy SAP AG BC420 12-41

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 4288

04amp

983209 SAP AG 1999

ed conen

reating a Program

Recording

ZBC420ampProram name

Transfer Program

e daa

ead =rom =e

ran=er =rom recordn

reate

9ile nameTest data

ranranpBC420AA

Cou can generate a program from the recording

In the foo$ing diaog o enter a program name In addition you can choose the type and method

for fiing the maintained fied contents from the recorded screens

4se the vaues used for the recording If you reuire feie data transfer you $i have to modify

this program ater

ParameteriDe the input vaues and read these vaues from a fie A data structure is created for

parameteriDationH the data records are read from an eterna fie into this data structure The

program assumes the fie $as taiored to this data structure

If you have decided to parameteriDe the input vaues you shoud aso create a test fie during

generation To do this seect the checo and enter a name for the fie

The attriute maintenance screen of the AAP editor appears aintain the attriutes and save the

program

copy SAP AG BC420 12-42

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 4388

04

983209 SAP AG 1999

Program 9unctions

Online

transaction

Transfer program

To

error

1rror

ption 6ption ampFlat SAP

structure

Monitor

Cou have no$ generated a data transfer program for importing data into the amp System The

program can eecute the data transfer using atch input or ca transaction

If you choose option 1 and there is an error the data record is paced into a atch input session

copy SAP AG BC420 12-43

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 4488

044

983209 SAP AG 1999

Benerating 9unction Modules

Recording

Zcreaedeor ncon mode

ncon rop

Sor eD

ZBC420

Creae comer

9unction module

nl( one data record can be processed at a time

In the net diaog o you can generate a function modue a function group and short tet from the

recording The function modue is automaticay created in the function group

copy SAP AG BC420 12-44

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 4588

042

983209 SAP AG 1999

9unction of 9unction Modules

Online

transaction

To

error

1rror

ption 6 ption amp

9unction module

Import

Parameter 1port

parameter

Tables

M1SSTA

Monitor

S$BC

Import interface

The import interface consists of a technica part and the fieds from the recording (A parameter is

created for each input fied of the recorded transactions)

7port interface

Simpy consists of the parameter S4amp2 The function modue $i return a vaue in the system

fied SC9S4amp2 after caing ca transaction This return vaue is set to Dero if the data record has

een correcty processed (5ny appies to 2T)

If a session is created you $i e notified $hether the data record coud e paced into the session

Tae interfaceThis is used ony if the function modue $ors $ith ca transaction The tae contains a the

system messages

copy SAP AG BC420 12-45

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 4688

048

983209 SAP AG 1999

Import Interface of 9unction Module

$

Technical

fields

Data

fields

BI session or CALL TRANSACTION

Processin $ode

pdate $ode

a$e oamp BI session iamp (T initial)

Bacround user iamp (T initial)

Delete session aampter processin

Loc date oamp session

ODATA indicator

TU

MD1

UPDAT1

BRUP

US1R

=11P

ELDDAT1

DATA

Cou can use parameter 2T4 to specify $hether the function modue creates a atch input session

(2T4 E ) or updates the data record directy using ca transaction (2T4 E G)

The other parameters are fied as for a atch input session header

Note 7very time the function modue is caed a atch input session is created

If the session is to contain severa transactions proceed as foo$s

ltenerate the transaction severa times This can e achieved y recording the transaction again The

function modue interface $i then contain more than one transaction -hen the function modue is

caed severa transactions can e generated for each session

copy SAP AG BC420 12-46

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 4788

043

983209 SAP AG 1999

The Transaction Recorder

PrinciplesPrinciples

Recording )ith the LSMWRecording )ith the LSMW

Principles of atch Input and all TransactionPrinciples of atch Input and all Transaction

Integrating the TA Program into the DWIntegrating the TA Program into the DW

Using the TA Recorder Using the TA Recorder

copy SAP AG BC420 12-47

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 4888

045

983209 SAP AG 1999

Benerated Program

9unction modules DltP1ltBRUP

DltIS1RT

DltLS1ltBRUP

AAP Program

Define structure of

data in seJuential

fileDefine D

table

pen seJuential file

pen I session

Read data recordCseJuential file

9ill D table

9ill I session gtALL TRASATI

Last data record K

lose I session

lose seJuential file

The generated program has the structure dispayed aove It uses the standard function modues for

creating atch input sessions

copy SAP AG BC420 12-48

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 4988

047

983209 SAP AG 1999

Structure of the Benerated Program

Benerated part

Define D

table

pen seJuential file

pen I session

Read data record

9ill D table

9ill I session gtALL TRASATI

Last data recordK

lose I session

lose seJuential file

Include DR16

Define filestructure

P1ltDATAS1T

P1ltBRUP

DltDPR

Dlt9I1LD

DltTRASATI

LS1ltBRUP

LS1ltDATAS1T

The generated program consists of t$o parts 9 a generated part and the incude 2amp72G8 The

incude is provided in the standard system

The incude contains the definition of the reuired 2 tae and a further seven suroutines These

suroutines eecute the foo$ing functions

5pen and cose fie

5pen and cose session

Fi 2 tae

Fi session

The generated part is the main program and cas the reevant suroutines A structure is aso

generated in the generated part to read the eterna data into the fie

See the Appendi for more information on the 2amp72G8 program

copy SAP AG BC420 12-49

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 5088

020

983209 SAP AG 1999

Structure of D Table

PRBRAM DPR D1BI 9AM 9ALPRBRAMPRBRAM DPRDPR D1BID1BI 9AM9AM 9AL9AL

SAPM90ampD 0602

R90ampD=UR 600000

R90ampDU=RS 0006

R90ampD=T=D =UA

SAPM90ampD 0660

=A6AM16 Smith

=A6PSTL 87000

=A6LAD6 US

=A6SPRAS 1

SAPM90ampD 06amp0

=A6ST1B US6amp428357DDATA

PRBRAM

DPR

D1BI

9AM

9AL

EAR

UM

EAR

EAR

EAR

40

4

6

6amp

6amp

D Module pool

D Screen number

D Start of screen

D 9ield name

D 9ield contents

9ield ame T(pe Length Short Tet

AAP Dictionar(

The 2 tae has the same structure as in a standard transfer

copy SAP AG BC420 12-50

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 5188

026

983209 SAP AG 1999

Read Structure

Recording

DATA BEGIN OF record data element BUKRS bukr$amp data element KTOKD ktokd$amp data element NA(EG) name$+amp data element SORT ortl$ampEND OF record-

record

Automaticall( generated

from recording

The structure of the fie is automaticay generated and is a$ays defined $ith the name amp725amp

The generated structure a$ays has the same ayout 7ach fied is defined y t$o generated ro$s

The first ro$ is a$ays a comment ro$ containing the tet J data eement and the data eement of

the screen fied from the recording In the net ro$ the fied itsef is defined $ith the name of the

data eement foo$ed y a three9digit position numer $hich specifies the ocation in the structure

The ength of the fied is set y the ength of the data eement If a fied is not defined through a data

eement the system uses the ength of the screen fied

copy SAP AG BC420 12-51

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 5288

02amp

983209 SAP AG 1999

pening and losing the 9ile

P1ltDATAS1T

LS1ltDATAS1T

FOR( oendataet USING dataet-O)EN DATASET dataet IN TET (ODE-

IF S01SUBR2 34 - 5RITE 6 te7t1e S01SUBR2-STO)-

ENDIF-

ENDFOR(-

FOR( cloedataet USING dataet-2OSE DATASET dataet-

ENDFOR(-

Include

DR16

The suroutine 5P7N3ATAS7T opens the seuentia fie

The suroutine 2+5S73ATAS7T coses the seuentia fie

copy SAP AG BC420 12-52

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 5388

02

983209 SAP AG 1999

9unction Modules for I Program

lient

Session name

Eold date

=eep session

D user name

RecordK

LI1T

BRUP

ELDDAT1

=11P

US1R

R1RD

DltP1ltBRUPDltP1ltBRUP

Transaction code

D table

TD1

DPRTA

DltIS1RTDltIS1RT

DltLS1ltBRUPDltLS1ltBRUP

pen Isessionpen Isession

Insert data for

transactions

Insert data for

transactions

lose I

session

lose I

session

The foo$ing function modues are provided for creating atch input sessions (function group

S2)

235P7N3ltamp54P

2reates a ne$ session and contains genera data for the $hoe session

23INS7ampT

Inserts a the data for a transaction into the session The transferred interna tae $ith the

structure 2ATA must contain a the data reuired for fuy processing the transaction

232+5S73ltamp54P

2oses the session after a the data has een inserted As soon as the session has een cosed it

can e processed

The interna tae $ith the structure 2ATA can ony contain atch input data for one singe

transaction run So the individua transactions are inserted into the atch input session in a oop

using severa 23INS7ampT cas

copy SAP AG BC420 12-53

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 5488

024

983209 SAP AG 2001

9unction Module DltP1ltBRUP

ALL 9UTI DltP1ltBRUPALL 9UTI DltP1ltBRUP

1PRTIB

LI1T client

BRUP session name

ELDDAT1 loc+ date

=11P delete flag

US1R bdc user name

R1RD recording

IMPRTIB

NID internal session +e(

11PTIS

1PRTIB

LI1T client

BRUP session name

ELDDAT1 loc+ date

=11P delete flag

US1R bdc user name

R1RD recording

IMPRTIB NID internal session +e(

11PTIS

-ith the function modue 235P7N3ltamp54P you can open a atch input session

The foo$ing parameters are mandatory

2+I7NT (cient)

ltamp54P (session name)

4S7amp (user name)

Note The 4S7amp must a$ays e specified This user name is reuired for processing the session

in atch mode

The foo$ing parameters are optiona

=5+AT7 specifies the eariest date on $hich the session can e started677P fag specifies $hether session shoud e deeted after it has een successfuy processed The

677P fag is ignored if the session contains errors

677P E K K means deete the session after processing (defaut vaue) H

677P E KGK means do not deete session

amp725amp E KGK ao$s you to create a recording instead of a I session

If gtI is specified the function modue returns the interna session ey This is needed to e ae to

differentiate sessions that have the same name

-ith 7G27PTI5NS you get various return vaues that can e ueried $ith SC9S4amp2

Note In onine mode the onine user is used for the authoriDation checs regardess of the user

name specified

copy SAP AG BC420 12-54

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 5588

022

983209 SAP AG 1999

Subprogram P1ltBRUP

P1ltBRUP

FOR( oen8rou-IF e9on -

2A FUN2TION BD2O)ENGROU) E)ORTING 2IENT lt1mandt GROU) 8rou USER uer KEE) kee

=ODDATE gtolddate-

ENDIF-ENDFOR(-

Include

DR16

The suprogram 5P7N3ltamp54P opens the atch input session

copy SAP AG BC420 12-55

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 5688

028

983209 SAP AG 1999

9unction Module DltIS1RT

ALL 9UTI DltIS1RTALL 9UTI DltIS1RT

IMPRT

TD1 Transaction code

PSTltLAL Update locall(

PRITIB print list

TAL1S DPRTA bdclttable

11PTIS

IMPRT

TD1 Transaction code

PSTltLAL Update locall(

PRITIB print list

TAL1S DPRTA bdclttable

11PTIS

-ith the function modue 23INS7ampT you can add transaction data to the session

Cou need an interna 2 tae to transfer the data

The foo$ing parameters are mandatory

T257 Transaction code

CNPamp5TA 2 tae

The foo$ing parameters are optiona

P5ST3+52A+ E KGK activates oca updating This means that the data to e updated is ept in the

appication server and updated in the ast step of the transaction This does not invove the update

process (For more information see course 28 Programming ataase 4pdates)

PampINTINlt E KGK 9 ists processed in I $i e printed immediatey -ith 7G27PTI5NS you get various return vaues that can e ueried $ith SC9S4amp2

copy SAP AG BC420 12-56

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 5788

023

983209 SAP AG 1999

Subprogram DltTRASATI

DltTRASATI

FOR( BD2TRANSA2TION USING tcode-

IF e9on -2A FUN2TION BD2INSERT

E)ORTING T2ODE tcode TABES D0N)ROTAB bdcdata-

ESE-

ENDIF-ENDFOR(-

T

Include

DR16

The suprogram 23TampANSA2TI5N moves the fied 2 tae either to a atch input session

or uses ca transaction to import the data into the system 5n the seection screen you can specify

$hether you $ant to create a session or you $ant to use ca transaction to process the data directy

The S7SSI5N fied is then set according to your seection

copy SAP AG BC420 12-57

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 5888

025

983209 SAP AG 1999

9unction Module DltLS1ltBRUP

ALL 9UTI DltLS1ltBRUP

11PTIS

TltP1 6

NU1U1lt1RRR amp

-ith the function modue 232+5S73ltamp54P you can cose a atch input session

In 7G27PTI5NS you get various return vaues that can e ueried $ith SC9S4amp2

copy SAP AG BC420 12-58

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 5988

027

983209 SAP AG 1999

Subprogram LS1ltBRUP

FOR( cloe8rou-IF e9on -cloe batcgt 9nut 8rou

2A FUN2TION BD22OSEGROU)-

ESE-IF e8rouoened -

2A FUN2TION BD22OSEGROU)-

ENDIF-ENDIF-

ENDFOR(-

LS1ltBRUPlose session

lose error session

Include

DR16

The suprogram 2+5S73ltamp54P coses the atch input session The suprogram differentiates

et$een a norma I session (S7SSI5N E G) and a session opened $hen ca transaction

encountered an error (73ltamp54P35P7N7 E G)

copy SAP AG BC420 12-59

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 6088

080

983209 SAP AG 1999

Subprograms DltDPRG Dlt9I1LD

DltDPR

Dlt9I1LD

FOR( bdc9eld USING nam al-IF al 34 nodata-2EAR bdcdata- bdcdata1nam nam- bdcdata1al al- A))END bdcdata-ENDIF-

ENDFOR(-

FOR( bdcdltnro USING ro8ram dltnro- 2EAR bdcdata-Bdcdata1ro8ram ro8ram-Bdcdata1dltnro dltnro-Bdcdata1dltnbe89n - A))END bdcdata-ENDFOR(-

Include

DR16

The incude 2amp72GG contains t$o suprograms 23CNPamp5 and 23FI7+

Suprogram 23CNPamp5 fis the 2 tae $ith program names and screen numers

Suprogram 23FI7+ fis the 2 tae $ith fied names and vaues

7ach suprogram creates an entry in the 2 tae

copy SAP AG BC420 12-60

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 6188

086

983209 SAP AG 1999

9illing the D Table

erorm bdcdltnro u9n8 SA)(FD +- erorm bdc9eld u9n8 BD22URSOR RFD1BUKRS- erorm bdc9eld u9n8 BD2OK2ODE 6- erorm bdc9eld u9n8 RFD1BUKRS record1BUKRS- erorm bdc9eld u9n8 RFD1KTOKD record1KTOKD-

erorm bdcdltnro u9n8 SA)(FD -

erorm bdc9eld u9n8 BD22URSOR KNA1S)RAS- erorm bdc9eld u9n8 BD2OK2ODE 6- erorm bdc9eld u9n8 KNA1NA(E record1NA(E-

erorm bdc9eld u9n8 KNA1SORT record1SORT-

Recording Benerated automaticall(

from the recording

)ERFOR( bdcdltnro USING SA)(FD +- )ERFOR( bdc9eld USING BD22URSOR RFD1BUKRS-)ERFOR( bdc9eld USING BD2OK2ODE 6-)ERFOR( bdc9eld USING RFD1BUKRS record1BUKRS-)ERFOR( bdc9eld USING RFD1KTOKD record1KTOKD-

)ERFOR( bdcdltnro USING SA)(FD -

)ERFOR( bdc9eld USING BD22URSOR KNA1S)RAS-)ERFOR( bdc9eld USING BD2OK2ODE 6-)ERFOR( bdc9eld USING KNA1NA(E record1NA(E-

)ERFOR( bdc9eld USING KNA1SORT record1SORT- ---

The 2 tae is fied $ith data from the recording The suroutines 23CNPamp5 and

23FI7+ are used for this

The suroutines are caed in the reuired structure or seuence

copy SAP AG BC420 12-61

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 6288

08amp

983209 SAP AG 1999

erie)

SAPDatabase

SeJuential9ile

SAPDatabase

ALL TRASATIALL TRASATI

SeJuential9ile

ATE IPUTATE IPUT

D TableD TableD TableD Table

I Monitor

T

In contrast to atch input you can use ca transaction to directy pass data to the diaog interface

$ithout using a atch input session Cou use an interna tae (2 tae same structure and ayout

as atch input) to temporariy store your screen data Then you ca the desired transaction in your

program

Note 5n average the 2a Transaction method is 8 to times faster than using atch Input

copy SAP AG BC420 12-62

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 6388

08

983209 SAP AG 1999

all Transaction Program$ 1ample

RE)ORT abcbdcdcdeb9ct-

)ARA(ETERS d9mode DEFAUT A

udmode DEFAUT S-FOR( calltranact9on-2A TRANSA2TION FD

USING bdcdata (ODE d9mode

U)DATE udmode-

IF lt1ubrc NE - 5RITE 6 ---

ENDIF-ENDFOR(-

Screen

00

Screen

100

Screen

An additiona system ro area is added for the caed transaction The system uses this area for

processing the individua screens in the transactionH the data from the tae is added here After the

transaction is processed the second ro area is reeasedH the system continues processing in the first

ro area

Notes

In contrast to atch input there is no error ogging (error sessions) here For processing the caed

transaction the system uses the authoriDations of the user that caed the transaction The 2 tae

can ony hod data for one transaction run at a time efore another transaction is caed and its data

can e added you must eecute a amp7Famp7S= for the 2 tae

copy SAP AG BC420 12-63

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 6488

084

983209 SAP AG 1999

ALL TRASATI C6

RE)ORT 777-

2A TRANSA2TION FD USING bdcdata (ODE E-

Default for MD1 is A

2A TRANSA2TION 3tranact9oncode4 USING 3bdc1table4 C (ODE A E N C-

-ith the parameter 57 you can seect a specific dispay mode for processing the transaction The

foo$ing three modes are avaiae

A (ispay a)

If you eecute the program a the screens and a their data are dispayed This is the defaut vaue

for the 57 in 2A++ TampANSA2TI5N

N (ispay nothing)

The screens are not dispayed at a regardess of $hether any of them contained errors As soon as

the transaction has een fuy processed contro is returned to your program (The vaue of the

parameter 4PAT7 determines $hether dataase updates are eecuted or not)

7 (ispay errors ony)As soon as an error occurs in a screen the transaction is s$itched to dispay mode so that you can

correct the errors

These dispay modes are the same as those in the atch input session processing

copy SAP AG BC420 12-64

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 6588

082

983209 SAP AG 1999

RE)ORT 777-

2A TRANSA2TION FD USING BD2DATA U)DATE -

ALL TRASATI Camp

RE)ORT 777-

2A TRANSA2TION FD USING bdcdata U)DATE -

2A TRANSA2TION 3tranact9oncode4 USING 3bdc1table4 C (ODE A E N C U)DATE A S C -

Default for UPDAT1 is A

-ith the parameter 4PAT7 you can contro ho$ dataase updates arising from a transaction are

carried out There are three options

A (asynchronous updating) The caed transaction does not $ait unti the dataase has een

updated it simpy for$ard the updates to the SAP update service This usuay speeds up the 2T

program This processing mode is N5T recommended for arge data sets as the caed transaction

does not receive a competion message from the update modue

The caing 2T program therefore cannot te if the transaction has een successfuy competed Cou

shoud use the updating administration function (transaction S8) to determine $hether updating

$as terminated eary The error anaysis correction functions for are ess hepfu than $ith

synchronous updating

S (synchronous updating) -ith synchronous updating the caed transaction $aits unti a the

updates have een competed So processing is so$er than $ith synchronous updating The caed

transaction can ho$ever report any updating errors to the program $hich maes error

anaysiscorrection easier

+ (local updating) $ith oca updating the dataase is not updated in a separate process it is

updated in the caers process (see appication hep documentation for the AAP ey$ord S7T

4PAT7 TAS6 +52A+)

copy SAP AG BC420 12-65

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 6688

088

983209 SAP AG 1999

ALL TRASATI C

RE)ORT 777-DATA mtab T0)E TABE OF bdcm8coll-

2A TRANSA2TION FD USING bdcdata (ESSAGES INTO mtab-

2A TRANSA2TION 3tranact9oncode4 USING 3bdc1table4 C (ODE A E N C U)DATE A S C (ESSAGES INTO 3metab4 C -

7SSAlt7S specifies that a system messages that are output during the eecution of a 2A++

TampANSA2TI5N are $ritten to the interna tae L7SSTA The interna tae must have the

structure 2Slt25++

4nie the cassica atch input processing $ith sessions 2A++ TampANSA2TI5N does not offer any

specia processing procedures for transactions containing errors There are no restart functions for

transactions that contain errors or that cause updating terminations

copy SAP AG BC420 12-66

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 6788

083

983209 SAP AG 1999

ALL TRASATI C4

RE)ORT 777-DATA mltot T0)E ctuaram-

2A TRANSA2TION FD USING BD2DATA

O)TIONS FRO( mltot-

2A TRANSA2TION 3tranact9oncode4 USING 3bdc1table4 C (ODE A E N C U)DATE A S C (ESSAGES INTO 3metab4 C O)TIONS FRO( ot C -

RE)ORT 777-DATA mltot T0)E ctuaram-2A TRANSA2TION FD USING bdcdata

O)TIONS FRO( mltot-

The addition 5PTI5NS enaes the ca transaction statement to e controed through a structure

The structure must have the dictionary type 2T43PAampAS

The addition 5PTI5NS Famp5 must not e comined either $ith the addition 57 or $ith

4PAT7 ore information on the net side

copy SAP AG BC420 12-67

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 6888

085

983209 SAP AG 1999

Structure TUltPARAMS

DISMD1 Procen mode anaoo o addon amp

UPDMD1 $pdae mode anaoo o addon $PA

ATTMD1 CA mode CA conro

D19SI1 orce de=a EndoE e drn procen

RAMMIT +o eD a Camp amp(

IPT +o a ac np eonF a F S-B+P SPAC

I1D +o a ac np eon a=er end o= BC daa

The components are defined as foo$s

The components 7FSIM7 ampA25IT N5INPT and N5I7N can have the foo$ing

vaues KGK E Ces or K K E No

If the addition 5PTI5NS Famp5 is not specified the foo$ing settings appy to the contro

parameters

IS57 from addition 57

4P57 from addition 4PAT7

2ATT57 2ATT not active

7FSIM7 o not not use defaut $indo$s siDe

ampA25IT Successfu eit at 25IT -5amp6

N5INPT atch input session active (SC9INPT E G)

N5I7N atch input session sti active after end of 2 data

copy SAP AG BC420 12-68

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 6988

087

983209 SAP AG 1999

SMSBID Message ID

SMSBT Message T(pe C1GIGWGSGA

SMSB Message umber

SMSB6 Message ariable 6

SMSBamp Message ariable amp

SMSB Message ariable

SMSB4 Message ariable 4

SMSBID Message ID

SMSBT Message T(pe C1GIGWGSGA

SMSB Message umber

SMSB6 Message ariable 6

SMSBamp Message ariable amp

SMSB Message ariable

SMSB4 Message ariable 4

Return code$

S(stem fields$

alue Meaning

0 Successful

6000 1rror in transaction

6000 1rror in processing call transaction

see also the s(stem fields specified

alue Meaning

0 Successful

6000 1rror in transaction

6000 1rror in processing call transaction

see also the s(stem fields specified

9ield name Meaning9ield name9ield name MeaningMeaning

Return ode and S(stem 9ields

The return code is used to specify $hether the caed transaction $as processed successfuy In

addition severa system fieds are fied The numer I type and variaes of the diaog message

output y the caed transaction Cou need this information to output the message tet

copy SAP AG BC420 12-69

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 7088

030

983209 SAP AG 1999

Benerated Program of the TA Recorder

REFRES= (ESSTAB-

2A TRANSA2TION tcode USING bdcdata (ODE ctumode U)DATE cudate (ESSAGES INTO metab-OO) AT metab- ENDOO)-IF lubrc 34 AND e8rou 34 S)A2E- IF e8rouoenend - 2A FUN2TION BD2O)ENGROU) E)ORTING ---------

--------- E8rouoened - ENDIF- 2A FUN2TION BD2INSERT E)ORTING T2ODE tcode TABES D0N)ROTAB bdcdata-ENDIF-REFRES= bdcdata-

Message table output

pen error session

Insert data record that

has errors into error

session

If you have seected ca transaction on the seection screen the generated program runs as foo$s

The onine transaction is caed $ith ca transaction and passed to tae 2ATA A the

messages arising during the ca transaction are put in the interna tae 7SSTA

7SSTA is output as a ist

If you have specified an error session ( 73ltamp54P L SPA27) on the seection screen and the

ca transaction comes across an error (+3S4amp2 L 0) the error session is opened The error

session is ho$ever ony opened once Then the data record is paced in the session

A the other data records that have errors $ith ca transaction are paced in the same session

copy SAP AG BC420 12-70

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 7188

036

983209 SAP AG 1999

The Transaction Recorder

PrinciplesPrinciples

Recording )ith the LSMWRecording )ith the LSMW

Principles of atch Input and all TransactionPrinciples of atch Input and all Transaction

Integrating the TA Program into the DWIntegrating the TA Program into the DW

Using the TA Recorder Using the TA Recorder

copy SAP AG BC420 12-71

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 7288

03amp

983209 SAP AG 1999

Integrating into the DW

Transfer program

AAP Dictionar(

Integrate

SDA0

SDA6

SDAamp

SDA

Cou can integrate the generated program into the G9- The structure of the fie must e created

in the AAP ictionary The taes SGA0 SGA8 SGA1 and SGA $i e fied

copy SAP AG BC420 12-72

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 7388

03

983209 SAP AG 1999

DW Release 42

Goo

-B eeae 45

aa ran=er ogtec

Int customer data transfer ob-ect

ecord =ed

Dece daa ran=er

d Goo

The ampunction ampor interatin TA recorder prora$s is

i$ple$ented in the

D+-B in Release

The recorder can e integrated as of ampeease and it is provided in the G9- ampeease

ltot to the G9- ampeease 5n the initia screen you can integrate programs y choosing ampoto

( +nt customer ata transfer o-ect

copy SAP AG BC420 12-73

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 7488

034

983209 SAP AG 1999

reating Program as D b-ect

Comer ran=er ogtec

ampgtec ype

Sor eD =or ogtec

aa ran=er proram

Srcre name

9900

(+A1

Cane comer

ZBCA+G

ZB

ustomer transfer ob-ect

umber bet)een 7000 and 7777

b-ect t(pe

Assignment to R ob-ect

Short tet for D ob-ectShort description

Data transfer program

ame of generated program

Structure name

A structure Cstructure la(out )ith this name is created in

the AAP Dictionar(

For ampeease transfer oects $ere not organiDed y 5amp oects ut y a G numer (00089

OOOO) The numer range O0009OOOO is reserved for customers

To create a connection to the ne$ G 9- you must assign the program to a 5amp oect

2reate a short tet for the G oect This tet $i appear in the method seection ist

Specify the program to e incuded

Specify a name for the structure to e created in the AAP ictionary

Note $he generated program appears under program type +N and not under program type

-

copy SAP AG BC420 12-74

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 7588

032

983209 SAP AG 1999

Adantages

Automatic program registration in the DW in

Release 48

ou can use all the functions defined for

standard ob-ects

1ception$ The (reate ampile ith data

function

If you incuded the oect in the ampeease $orench it is automaticay avaiae in the ampeease

B $orench

A the $orench functions are avaiae for your oect ecept for Create files ith transfer ata

copy SAP AG BC420 12-75

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 7688

038

983209 SAP AG 1999

ou are no) able to$

The Transaction Recorder$ Unit Summar(

Use the recording function in the LSMW to create

a batch input session )ith the data from the

eternal s(stem

Use the TA Recorder to create (our o)n data

transfer program

Anal(e programs that )or+ )ith batch input or

call transaction

Integrate the TA Recorder programs into the

DW

copy SAP AG BC420 12-76

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 7788

ercise 1

nit $ -ecorder

$opic 2reating etors

$ransaction -ecorder ercise 1

bull 2reating detors $ith eterna numer assignment

bull etor numers M9980008 to M9980080

Address data for detors $ith eterna numer assignment is to

e transferred using program ampFI700

ro4ect F5

Supro4ect +5

-un +575

$as)s 85 95 8S25

9oad program -F+00

8 In the foo$ing eercises eisting data is to e changed Therefore these detors $ith

eterna numer assignment have to first e created

898 4nder suproect 79 create run 797G9 $ith the name Detors ith

eternal numers

copy SAP AG BC420 12-77

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 7888

891 2reate the foo$ing three tass The tass map the foo$ing process steps

convert data create + session and process + session

89198 In run 797G9 create the foo$ing tas

9 Tas AP9

9 Name 2onvert data 9 Tas type AP

9 Program type +S-

Seect the foo$ing +S- oect

+S- proect 2109

+S- suproect 7I9

+S- oect I997GT

89191 In run 797G9 create the foo$ing tas 9 Tas +5A9

9 Name 2reate I session

Tas type +5A

9 Program type INP

Seect program ampFI700 $ith the variant

I97G9

8919 In run 797G9 create the foo$ing tas

9 Tas S29

9 Name Process I session Tas type S2

9 Program type amp7P5

Seect program ampS2S4 $ith the variant

S497G9

Note that you have to correct the seuence of the tass 2onvert data

create + session and process + session

4se the uttons

89 Start the run

The detors $i e created $ith eterna numer assignments

89 2hec in transaction F0 that the detors M9980008 to M9980080 have een

created

copy SAP AG BC420 12-78

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 7988

ercise

nit $ransaction -ecorder

$opic -ecording function in the 9S8(

bull 2reate a recording using the +S-

bull ltenerate a atch input session

2hange the detor address data in the amp System

Name of the recording +

Name of the file +2055+F9

8 2reate the recording 7I3 using the +S- ampecord the transaction F01 (2hange

detor)

898 efore you create the recording first test the transaction onineQ

For the recording use detor M9980008 5n the initia screen of the F01

maintain the foo$ing fieds ony

etor etor M9980008

2ompany code 0008

Address data seect

Note $he data record must e saved hile recording

891 aintain the names and the descriptions for the foo$ing fieds

Name city street posta code and teephone numereete a other fieds in screen 880 from the recording (eg S5ampT+ +AN8

SPampAS)

4se the same technica names as sho$n in the tae eo$ (automatic fied

mapping)

copy SAP AG BC420 12-79

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 8088

1 2reate the suproect 7I9 and the ne$ oect TA3 in your proect 2109

aintain the oect attriutes and seect the item atch input recording Seect your

recording 7I3

2reate the source structure address

2reate the source fieds according to the tae eo$ 5r copy them from proect 2109S37N suproect 7I900 oect TA900

198 Fie setup The data from the egacy system are dispayed in the foo$ing tae

Fied name Fied type Fied ength escription

N5 2 8B etor numer

NA7 2 Name

STamp77T 2 Street

2ITC 2 2ityPace of residence

MIP 2 80 Posta code

T7+ 2 8B Teephone numer

191 aintain the fied mapping 4se the automatic fied mapping (via menu item

7tras)

19 Specify the fies 5ny maintain the fie name of the source fie

Name of the fie 21099IFI+7

2odepage 8800

19 Import the data and convert them ispay the data in each caseQ

19 2reate a atch input session

19B ampun the atch input session

copy SAP AG BC420 12-80

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 8188

ercise 3

nit $ransaction -ecorder

$opic -ecording ith the $ -ecorder

bull ltenerate a recording using the TA recorder

bull Test the recording

2hange the address data of detors in the amp system

Name recording $+

Name of the file +2055+F9

8 2reate the recording TA37I3 using the transaction recorder ampecord the

transaction F01 (change detor)

898 4se detor M9980008 for the recording 5n the F01 initia screen ony

maintain the foo$ing fieds

etor etor M9980008

2ompany 2ode 0008

Address data seect

Note $he data record must e saved hen recording

eete a fieds that do not eist in the source fie 21099IFI+7 from screen

880 in the recording (eg 6NA89S5ampT+ 6NA89+AN8 6ANNQ9SPampAS) Note o not deete fieds ampF01946ampS and ampF0190880

Save the recording no$

1 S$itch to the recordings overvie$

198 Process the recording $ith the processing mode A (dispay a)

191 Process the recording $ith the processing mode RN (no dispay)

19 If the recording has een tested and no error has occurred generate a I session

and run it using the I monitor If an error shoud occur generate the recordingagainQ

copy SAP AG BC420 12-81

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 8288

From the recording generate the program M21037I3 in your deveopment cass

2109 Seect the foo$ing

bull ampead fied contents from fie

bull 2reate test data in the fie 2103dei3test3tt

98 Save this program and eecute it ltenerate one I session each and process it

2arry out the same steps again using the ca transaction

The generated program shoud no$ e changed so that fie 21099IFI+7 can e

read and processed

98 2hange the defaut vaue of the fie name (parameter dataset) in 21099

IFI+7

91 2hange the structure definition eete the company code fied and the address

data checo from the structure

9 2hange the su9routine ca perform dc3fied for the company code (KampF019

46ampSK) so that the vaue 0008 is transferred

9 2hange the su9routine ca perform dc3fied for the address data checo

(KampF0190880K) so that the vaue G is transferred

9 Start the program again and read the data from the fie 21099IFI+7 $ith

detor data ltenerate a I session $ith it and run it

copy SAP AG BC420 12-82

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 8388

033 Include DR16INCLUDE BDCRECX1

SELECTION-SCREEN BEGIN OF LINE

PARAMETERS SESSION RADIOBUTTON GROUP CTU create sessi SELECTION-SCREEN COMMENT $amp TEXT-S FOR FIELD SESSION

se(ecti-scree )siti +

PARAMETERS CTU RADIOBUTTON GROUP CTU ca(( trasacti

SELECTION-SCREEN COMMENT $amp TEXT-S FOR FIELD CTU

SELECTION-SCREEN END OF LINE

SELECTION-SCREEN BEGIN OF LINE

SELECTION-SCREEN COMMENT $amp TEXT-S1 FOR FIELD GROUP

se(ecti-scree )siti $+

PARAMETERS GROUP1$amp r) ae 0 sessi

SELECTION-SCREEN COMMENT $amp TEXT-S+ FOR FIELD CTUMODE

se(ecti-scree )siti

PARAMETERS CTUMODE LIE CTU2PARAMS-DISMODE DEFAULT 3N3

A4 s56 a(( 78)rs

E4 s56 78)r errr (8

N4 7 t 7is)(a8 78)r

SELECTION-SCREEN END OF LINE

SELECTION-SCREEN BEGIN OF LINE

SELECTION-SCREEN COMMENT $amp TEXT-S$ FOR FIELD USER

se(ecti-scree )siti $+

PARAMETERS4 USER1$amp DEFAULT S9-UNAME ser 0r sessi i atc5

SELECTION-SCREEN COMMENT $amp TEXT-S FOR FIELD CUPDATE

se(ecti-scree )siti

PARAMETERS CUPDATE LIE CTU2PARAMS-UPDMODE DEFAULT 3L3

S4 s8c5rs(8

A4 as8c5rs(8

L4 (ca(

SELECTION-SCREEN END OF LINE

SELECTION-SCREEN BEGIN OF LINE

SELECTION-SCREEN COMMENT $amp TEXT-S FOR FIELD EEP

se(ecti-scree )siti $+

PARAMETERS4 EEP AS CltECBOX 3 3 = 7e(ete sessi i0 0iis5e7

3X3 = gtee) sessi i0 0iis5e7

SELECTION-SCREEN COMMENT $amp TEXT-S FOR FIELD E2GROUP

copy SAP AG BC420 12-83

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 8488

se(ecti-scree )siti

)araeters E2GROUP1$amp r) ae 0 errr-sessi

SELECTION-SCREEN END OF LINE

SELECTION-SCREEN BEGIN OF LINE

SELECTION-SCREEN COMMENT $amp TEXT-S FOR FIELD ltOLDDATE

se(ecti-scree )siti $+

PARAMETERS4 ltOLDDATE LIE S9-DATUM

SELECTION-SCREEN COMMENT +11amp TEXT-S$ FOR FIELD E2USER

se(ecti-scree )siti

PARAMETERS4 E2USER1$amp DEFAULT S9-UNAME ser 0r errr-sessi

SELECTION-SCREEN END OF LINE

SELECTION-SCREEN BEGIN OF LINE

SELECTION-SCREEN COMMENT +11amp TEXT-S FOR FIELD E2EEP

se(ecti-scree )siti

PARAMETERS4 E2EEP AS CltECBOX 3 3 = 7e(ete sessi i0 0iis5e7

3X3 = gtee) sessi i0 0iis5e7

SELECTION-SCREEN END OF LINE

SELECTION-SCREEN BEGIN OF LINE

SELECTION-SCREEN COMMENT +11amp TEXT-S FOR FIELD E2ltDATE

se(ecti-scree )siti

PARAMETERS4 E2ltDATE LIE S9-DATUM

SELECTION-SCREEN END OF LINE

SELECTION-SCREEN SIP

SELECTION-SCREEN BEGIN OF LINE

SELECTION-SCREEN COMMENT 1amp TEXT-S1 FOR FIELD NODATA

PARAMETERS4 NODATA DEFAULT 33 LOER CASE 7ata

SELECTION-SCREEN END OF LINE

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

Batc5i)t7ata 0 si(e trasacti

DATA4 BDCDATA LIE BDCDATA OCCURS ITlt ltEADER LINE

essaes 0 ca(( trasacti

DATA4 MESSTAB LIE BDCMSGCOLL OCCURS ITlt ltEADER LINE

errr sessi )ee7 3 3 r 3X3amp

DATA4 E2GROUP2OPENED

essae tets

TABLES4 T1

copy SAP AG BC420 12-84

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 8588

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

at se(ecti scree

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

AT SELECTION-SCREEN

r) a7 ser st e 0i((e7 0r create sessi

IF SESSION = 3X3 AND

GROUP = SPACE OR USER = SPACE

MESSAGE E1MSamp

ENDIF

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

)e 7ataset

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

FORM OPEN2DATASET USING P2DATASET

OPEN DATASET P2DATASET IN TEXT MODE

IF S9-SUBRC

RITE4 TEXT-E S9-SUBRC

STOP

ENDIF

ENDFORM

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

c(se 7ataset

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

FORM CLOSE2DATASET USING P2DATASET

CLOSE DATASET P2DATASET

ENDFORM

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

create atc5i)t sessi

t 0r ca(( trasacti siamp

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

FORM OPEN2GROUP

IF SESSION = 3X3

SIP

RITE4 $amp 3Create r)3I1amp GROUP

SIP

)e atc5i)t r)

CALL FUNCTION 3BDC2OPEN2GROUP3

EXPORTING CLIENT = S9-MANDT

copy SAP AG BC420 12-85

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 8688

GROUP = GROUP

USER = USER

EEP = EEP

ltOLDDATE = ltOLDDATE

RITE4 amp 3BDC2OPEN2GROUP3I$amp

1$amp 3retrc7e43I+amp

S9-SUBRC

ENDIF

ENDFORM

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

e7 atc5i)t sessi

ca(( trasacti si4 errr sessiamp

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

FORM CLOSE2GROUP

IF SESSION = 3X3

c(se atc5i)t r)

CALL FUNCTION 3BDC2CLOSE2GROUP3

RITE4 amp 3BDC2CLOSE2GROUP3Iamp

1$amp 3retrc7e43I+amp

S9-SUBRC

ELSE

IF E2GROUP2OPENED = 3X3

CALL FUNCTION 3BDC2CLOSE2GROUP3

RITE4

RITE4 amp 3Fe5(era))e 6r7e eret3Iamp

ENDIF

ENDIF

ENDFORM

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

Start e6 trasacti accr7i t )araeters

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

FORM BDC2TRANSACTION USING TCODE

DATA4 L2MSTRINGamp

DATA4 L2SUBRC LIE S9-SUBRC

atc5 i)t sessi

IF SESSION = 3X3

CALL FUNCTION 3BDC2INSERT3

EXPORTING TCODE = TCODE

TABLES D9NPROTAB = BDCDATA

RITE4 3BDC2INSERT3Iamp

copy SAP AG BC420 12-86

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 8788

TCODE

3retrc7e43I+amp

S9-SUBRC

3RECORD43

S9-INDEX

ca(( trasacti si

ELSE

REFRESlt MESSTAB

CALL TRANSACTION TCODE USING BDCDATA

MODE CTUMODE

UPDATE CUPDATE

MESSAGES INTO MESSTAB

L2SUBRC = S9-SUBRC

RITE4 3CALL2TRANSACTION3

TCODE

3retrc7e43I+amp

L2SUBRC

3RECORD43

S9-INDEX

LOOP AT MESSTAB

SELECT SINGLE FROM T1 ltERE SPRSL = MESSTAB-MSGSPRA

AND ARBGB = MESSTAB-MSGID

AND MSGNR = MESSTAB-MSGNR

IF S9-SUBRC =

L2MSTRING = T1-TEXT

IF L2MSTRING CS 313

REPLACE 313 ITlt MESSTAB-MSGH1 INTO L2MSTRING

REPLACE 3$3 ITlt MESSTAB-MSGH$ INTO L2MSTRING

REPLACE 33 ITlt MESSTAB-MSGH INTO L2MSTRING

REPLACE 33 ITlt MESSTAB-MSGH INTO L2MSTRING

ELSE

REPLACE 33 ITlt MESSTAB-MSGH1 INTO L2MSTRING

REPLACE 33 ITlt MESSTAB-MSGH$ INTO L2MSTRING

REPLACE 33 ITlt MESSTAB-MSGH INTO L2MSTRING

REPLACE 33 ITlt MESSTAB-MSGH INTO L2MSTRING

ENDIF

CONDENSE L2MSTRING

RITE4 MESSTAB-MSGT9P L2MSTRING$+amp

ELSE

RITE4 MESSTAB

ENDIF

ENDLOOP

copy SAP AG BC420 12-87

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 8888

SIP

Eree 0e5(era))e

IF L2SUBRC AND E2GROUP SPACE

IF E2GROUP2OPENED = 3 3

CALL FUNCTION 3BDC2OPEN2GROUP3

EXPORTING CLIENT = S9-MANDT

GROUP = E2GROUP

USER = E2USER

EEP = E2EEP

ltOLDDATE = E2ltDATE

E2GROUP2OPENED = 3X3

ENDIF

CALL FUNCTION 3BDC2INSERT3

EXPORTING TCODE = TCODE

TABLES D9NPROTAB = BDCDATA

ENDIF

ENDIF

REFRESlt BDCDATA

ENDFORM

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

Start e6 scree

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

FORM BDC2D9NPRO USING PROGRAM D9NPRO

CLEAR BDCDATA

BDCDATA-PROGRAM = PROGRAM

BDCDATA-D9NPRO = D9NPRO

BDCDATA-D9NBEGIN = 3X3

APPEND BDCDATA

ENDFORM

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

Isert 0ie(7

Page 19: BC420_46C - 012The Transaction Recorder

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 1988

067

983209 SAP AG 1999

Session

generator

Recording Using the LSMW

-ith the +S- you can create your o$n recordings

The +S- uses the standard TA recorder here yet evauates the recording itsef The information

from the recording is used to create atch input sessions

The created atch input session can e processed as usua $ith the atch input monitor

Note As $ith the standard procedure it is euay important that the data is converted

copy SAP AG BC420 12-19

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 2088

0amp0

983209 SAP AG 1999

reating Recording

Admnraon

ecordn

Goo

ame of recording

Description

)ner

ame of transaction

Start recording

lto into the +S- and seect the menu path ampoto (Recorings An overvie$ of a previousy

created recordings for your proect are dispayed To start a ne$ recording seect Create

To create a recording you must define the name the description and the o$ner

7nter the name of the transaction you $ant to record

7ecute the transaction and compete it propery

Note ampecordings are assigned to ony one proect 9 so the name of the recording must e uniue

copy SAP AG BC420 12-20

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 2188

0amp6

983209 SAP AG 1999

hanging ustomer Data$ Initial Screen

9ield ontents

BCC$Samp $SZAV

BCamp(Camp )00

02-($++ -88-10000

02-0110

02-0130

$SZAV

9ield ame

Comer

Company code

Z-88-10000

Genera daa

Comer Z-88-10000

+ame

9ield ontents

BCamp(Camp $PA

BCS$BSC SAPSZA1 0300ASS

BCS$BSC SAPSZA1 0301Camp$

BCC$Samp SZA10100-+$B

A1AA-S Garden Sree

A1AA-amp$S+$1 34

A1AA-PampSCamp1 02105

9ield ame

Screen

111

Screen

106

In the aove eampe the transaction Change customer F01 is recorded

Note

You must ma)e some modification to the field values for all the fields you ant to capture

for the data transfer For the purposes of recording a change can simply mean overriting

one single character in a field ith the same character

ven if fields are to e filled using S$amp$ parameters the values must still e changed on

the screen in order to capture them

(ith online transactions screen sequences may appear that are different than in the

recording

copy SAP AG BC420 12-21

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 2288

0ampamp

983209 SAP AG 1999

Results

RecordingRecording R1lt6 Demolt6

9D0amp hange customer Caccounting

SAPM90ampD 0608

DltURSR R90ampD=UR

Dlt=D1 gt00

R90ampD=UR 5560000

R90ampDD0660

US1ltA

SAPM90ampD 0666

Dlt=D1 UPDA

DltSUSR SAPLSA6

DltSUSR SAPLSA6

DltURSR SA6ltD0600T1LltUM1

ADDR6ltDATASTR11T 4 Barden Street

ADDR6ltDATAPSTltD1 0amp602

ADDR6ltDATAIT6 oston

SA6ltD0600T1LltUM1 8638257755

The resuts of the recording using the +S- are dispayed in a tree structure

After the recording has finished you can edit it Cou can deete fieds or add ne$ ones

copy SAP AG BC420 12-22

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 2388

0amp

983209 SAP AG 1999

Assigning 9ield ames

Recording R16 Demolt6

Dlt=D1 UPDA

DltSUSR SAPLSA6

DltSUSR SAPLSA6

DltURSR SA6ltD0600T1L

ADDR6ltDATAAM16 Lisa Eofmeister

ADDR6ltDATAPSTltD1 0amp602

ADDR6ltDATAIT6 oston

ame

+ame

ecrpon

e=a ae

A1AA-+A1

A1AA-+A1

Comer name

a o=meer

Screen =ed

ustomer name

double clic+

Cou can assign names for each recorded fied The specia fieds (2356257 2324ampS5amp

and 23S4S2amp77N) are not incuded here Cou can choose the fied names -hen the atch

input session is created the contents of these fieds are assigned to the target fieds specified in the

eft coumn

Functions

efaut Assigns to the fied names of the underying target fied and its fied description

ampeset eetes fied name and fied description

oue cic 7dits fied name fied description and defaut vaue

Note Cou can use fied names more than once =o$ever the fied name is ony avaiae once in thefied mapping For this reason it is not practica to use fied names more than once

For a those fieds for $hich you do not assign a name the defaut vaue is used $hen the atch

input session is created These defaut vaues can e seen as constants This is especiay usefu for

chec oes (for eampe 08 vie$ seection)

The +S- supports automatic fied mapping Source fieds and target fieds can e assigned to each

other automaticay The fieds are assigned to the corresponding fieds of the same name Therefore

the fied names of the source structure shoud e given the same or simiar names as the fied names

in the target structure

copy SAP AG BC420 12-23

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 2488

0amp4

983209 SAP AG 2001

Addinggtremoing screen fields

Repeating recording

9or identical field names the name and description are

assigned automaticall(

1diting Recording

02-($++

(+A1-A+

(+A1-+A1

(+A1-Samp

(+A1-+A2

(+A1-SAS

Comer accon nmer

e

+ame 1

Sor =ed

+ame 2

Sree

Selection of all

aailable screen

fields

Cou can ater add ne$ screen fieds if you need to 6eep in mind that fieds shoud ony e added in

paces $here they are aso provided on the screen other$ise you $i get an error $hen the I

session is processed

After saving you $i get the message The data has een saved successfuy No$ the recordings

are avaiae for the oect attriutes

If you repeat the recording you can record a ne$ screen seuence $ith ne$ fieds Provided that the

fied names (eg 6NA89NA78) are identica the names and descriptions are automaticay

assigned

copy SAP AG BC420 12-24

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 2588

0amp2

983209 SAP AG 1999

b-ect T(pe and Import Method$ Recording

Standard atch Input gt Direct Input

atch Input Recording

API

IDoc

ampgtec ype ) mpor meod

Bac np recordn

ecordn ec1

The recording is no$ avaiae $ith the oect attriutes

Net you create a proect or su9proect in the +S- and specify process the data transfer

Cou eecute the data transfer as in the standard system

efine the source fieds and structures

efine the fied mapping

ampead and convert the data

2reate and import a atch input session

copy SAP AG BC420 12-25

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 2688

0amp8

983209 SAP AG 1999

The Transaction Recorder

PrinciplesPrinciples

Recording )ith the LSMWRecording )ith the LSMW

Principles of atch Input and all TransactionPrinciples of atch Input and all Transaction

Integrating the TA Program into the DWIntegrating the TA Program into the DW

Using the TA Recorder Using the TA Recorder

copy SAP AG BC420 12-26

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 2788

0amp3

983209 SAP AG 1999

Transaction Recorder

Online

Transaction

RecordingTransfer Program

T

Included in the Batch Input Monitor

Cou use the transaction recorder to record transactions and then use the transaction recording to

generate a transfer program The program ao$s you to transfer data using either atch input or ca

transaction

copy SAP AG BC420 12-27

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 2888

0amp5

983209 SAP AG 1999

hanging ustomer Data$ Initial Screen

9ield ontents

BCC$Samp $SZAV

BCamp(Camp )00

02-($++ Z-88-10000

02-0110

02-0130

$SZAV

9ield ame

Comer

Company code

Z-88-10000

Genera daa

Comer Z-88-10000

+ame

9ield ontents

BCamp(Camp $PA

BCS$BSC SAPSZA1 0300ASS

BCS$BSC SAPSZA1 0301Camp$

BCC$Samp SZA10100-+$B

A1AA-S Garden Sree

A1AA-amp$S+$1 34

A1AA-PampSCamp1 02105

9ield ame

Screen

111

Screen

106

In the aove eampe the transaction Change customer F01 is recorded

copy SAP AG BC420 12-28

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 2988

0amp7

983209 SAP AG 2001

hange Debitor$ Pa(ment Transactions C6

Banlt dea

Screen

10

9ield ontent

BCC$Samp (+B(-BA+(+01

BCamp(Camp BA+((+B(-BA+(S01

(+B(-BA+(01 12345679

(+B(-BA+(+01 22222222

Debitor 5560000

9ield ame

Inde

copy SAP AG BC420 12-29

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 3088

00

983209 SAP AG 1999

hanging ustomer Data$ Pa(ment Transactions Camp

Addre

an+ countr( US

an+ code 6amp42837

Banlt dea

ustomer 5560000

9ield ontents9ield ame

BCC$Samp (+A1-(+ZA

BCamp(Camp $PA

(+B(-Z01

Screen

10

Screen

100

SAPLBA

9ield ontents

BCC$Samp B+(A-BA+(A

BCamp(Camp +

B+(A-BA+(A +aona Banlt

9ield ame

In different transactions the modue poo may change This is the case $ith for eampe customer

master data The TA recorder records modue poo changes automaticay

copy SAP AG BC420 12-30

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 3188

06

983209 SAP AG 1999

Eierarch( Displa( of the Recording

02amp

02

SAP02 0106

BCC$Samp 02-0130

BCamp(Camp )00

02-($++ -88-10000

02-0110

02-0130

SAP02 0111

BCamp(Camp V

BCC$Samp A1AA-amp$S+$1

A1AA-S Garden Sree

Recording

-ith the TA recorder the resuts are aso a ist in a hierarchy dispay =o$ever you cannot assign

your o$n fied names as you can in the +S-

copy SAP AG BC420 12-31

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 3288

0amp

983209 SAP AG 1999

Recording erie)

Recording

Transfer program

9unction module

ontains onl( the data

from the recording

Test data

Test

reate

reate

reate

reate

1dit hange recording

Process recording

Cou can edit the recording as needed

The recording can e tested and eecuted again The screens are run through in the same $ay as in

the recording

The recording can then e used to create

atch input sessions

Test data

ata transfer programs $ith atch input or ca transaction

Function modues

copy SAP AG BC420 12-32

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 3388

0

983209 SAP AG 1999

1 02 BS

2 SAP02 106

3 BCC$Samp $SZAV

4 BCamp(Camp )00 5 02-($++ -88-10000

6 02-0110

7 02-0130

8 $SZAV

9 SAP02 111

10 BCamp(Camp V

11 BCC$Samp A1AA-amp$S+$1

12 A1AA-S Garden Sree

Program Screen St 9ield ame 9ield alue

Recording 1ditor

Recording

Add gt delete lines 9ormat chec+

Import gt eport of recording

In the editor you can add or deete ines Cou can aso change the contents of individua ines

-ith the function Chec) you can specify $hether the edited version of the recording sti has the

correct synta

Cou can aso eport import recordings to from a seuentia fie

After editing save the recording changes

copy SAP AG BC420 12-33

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 3488

04

983209 SAP AG 1999

Recording Seeral Transaction Runs

RecordingF

Directl( after the first recordingG or

In the displa( mode of the recording

In this step you can record additiona transactions and add additiona transaction runs to the

recording

Cou can record the additiona transactions directy after a recording or in the edit screen of a

recording

copy SAP AG BC420 12-34

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 3588

02

983209 SAP AG 1999

1ditor$ Importing and 1porting Recordings

6 T 9D0amp S

amp SAPM90ampD 608

DltURSR

4

2

8 SAPM90ampD 666

60

66

Program Screen St 9ield name 9ield alue

cempA

e name

aa =orma

cemp

A

e name

aa =orma

1port

Import

Presentation Serer

If the editor functions in the systems do not provide a the functions you need you can do$noad the

recording to your presentation server using the Eort function and then edit the recording using a

P2 editor

Cou use the Import function to import the data ac into the amp System ae sure the fie is sti in

the correct format

copy SAP AG BC420 12-35

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 3688

08

983209 SAP AG 1999

Processing the Recording

Recording

Process )ith ALL TRASATI

Parameer

Proce mode$pdae mode

CA mode

e=a e

Con a=er comm

+o a B eon

nd +o a B mode

A

A

T

The recording can e eecuted directy The data from the recording is used and the transaction is

processed $ith ca transaction

2a transaction provides a range of options for caing appication transactions $hich are discussed

on the foo$ing t$o pages

copy SAP AG BC420 12-36

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 3788

03

983209 SAP AG 1999

Process mode

Update mode

ATT mode

Processing Recording )ith T 6

A

1

Displa( all screens

Displa( errors onl(

o displa(

L

S

A

Local

S(nchronous

As(nchronous

A

o ATT

ATT )ithout indiidual screen control

ATT )ith indiidual screen control

Processing mode

=ere you can specify the processing mode 9 it is the same as the processing mode for atch input

4pdate mode

=ere you can specify the update mode For more information see the unit ca transaction

2ATT mode

=ere you can mae specia settings if you $ant to test the recording under 2ATT conditions (ony

necessary for 2ATT runs) Specia functions are caed in the 2ATT too for each screen at the end of

P5 and at the start of PAI

copy SAP AG BC420 12-37

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 3888

05

983209 SAP AG 1999

Default sie

ont after commit

ot a I session

1nd$ ot a I mode

Processing Recording )ith T amp

The screen standard sie is used for the

processing

ommit )or+ does not end the processing

o I mode is actie The transaction )ill run

through as in online

I mode is selected nce the data in the D

table is processedG the I mode is set to inactie

Standard siDe

If you seect this the screens are processed in the standard siDe in the foreground (in foreground or

dispay errors ony) Note the standard siDe is a$ays used for acground processing

Further after commit

The first commit $or in a transaction does not ead to the end of the recording

Note A atch input transaction is ended $ith the first commit $or

No I mode

The system fied SC9INPT is not set (SC9INPT E ) So transactions are run through as in onine

7nd No I mode

5ny use if you choose the processing mode 7 (dispay errors ony) Then the transaction is processed in the acground in atch input mode and if there is an error the screens run through in

the foreground

copy SAP AG BC420 12-38

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 3988

07

983209 SAP AG 1999

I Mode

atch input

mode

nline

Some transactions behae differentl( in batch input mode

than in online Cbatch input capabilit(

atch input mode sets the s(stem field SIPT H

Not every transaction can run the same onine and in atch input mode The transaction must decide

itsef $hether it is caed onine or in atch input mode

The system sets the system fied SC9INPT E G if the atch input mode is active (this aso appies

to ca transaction) From this system fied the transaction can identify $hether to run onine or in

atch input mode

copy SAP AG BC420 12-39

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 4088

040

983209 SAP AG 1999

reating a Session 9rom the Recording

Recordingnl( contains the data

from the recording

Seon name 02amp

Aoraon ampBS(eep eon

oclt dae 10102000

Cou can create a atch input session directy from the recording that you can then process using the

atch input monitor

copy SAP AG BC420 12-40

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 4188

046

983209 SAP AG 1999

reating Test Data

Test Data

Recording

ranranpBC420AAe name

The file onl( contains the data from the recording

Rgt

Application Serer

Structure

Cou can create a fie from the recordingH the fie $i contain a the fieds from the recording The

fieds are added to the fie $ith the ength you specified in the definition

The fied order corresponds to the order in the recording overvie$ Technica fieds

(2356257 2324ampS5amp and so on) are incuded

The data can ony e stored on the appication server If you do not specify a path the fie is stored in

the $or directory of the appication server

If the specified test fie aready eists the ne$ data record is added to this fie

copy SAP AG BC420 12-41

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 4288

04amp

983209 SAP AG 1999

ed conen

reating a Program

Recording

ZBC420ampProram name

Transfer Program

e daa

ead =rom =e

ran=er =rom recordn

reate

9ile nameTest data

ranranpBC420AA

Cou can generate a program from the recording

In the foo$ing diaog o enter a program name In addition you can choose the type and method

for fiing the maintained fied contents from the recorded screens

4se the vaues used for the recording If you reuire feie data transfer you $i have to modify

this program ater

ParameteriDe the input vaues and read these vaues from a fie A data structure is created for

parameteriDationH the data records are read from an eterna fie into this data structure The

program assumes the fie $as taiored to this data structure

If you have decided to parameteriDe the input vaues you shoud aso create a test fie during

generation To do this seect the checo and enter a name for the fie

The attriute maintenance screen of the AAP editor appears aintain the attriutes and save the

program

copy SAP AG BC420 12-42

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 4388

04

983209 SAP AG 1999

Program 9unctions

Online

transaction

Transfer program

To

error

1rror

ption 6ption ampFlat SAP

structure

Monitor

Cou have no$ generated a data transfer program for importing data into the amp System The

program can eecute the data transfer using atch input or ca transaction

If you choose option 1 and there is an error the data record is paced into a atch input session

copy SAP AG BC420 12-43

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 4488

044

983209 SAP AG 1999

Benerating 9unction Modules

Recording

Zcreaedeor ncon mode

ncon rop

Sor eD

ZBC420

Creae comer

9unction module

nl( one data record can be processed at a time

In the net diaog o you can generate a function modue a function group and short tet from the

recording The function modue is automaticay created in the function group

copy SAP AG BC420 12-44

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 4588

042

983209 SAP AG 1999

9unction of 9unction Modules

Online

transaction

To

error

1rror

ption 6 ption amp

9unction module

Import

Parameter 1port

parameter

Tables

M1SSTA

Monitor

S$BC

Import interface

The import interface consists of a technica part and the fieds from the recording (A parameter is

created for each input fied of the recorded transactions)

7port interface

Simpy consists of the parameter S4amp2 The function modue $i return a vaue in the system

fied SC9S4amp2 after caing ca transaction This return vaue is set to Dero if the data record has

een correcty processed (5ny appies to 2T)

If a session is created you $i e notified $hether the data record coud e paced into the session

Tae interfaceThis is used ony if the function modue $ors $ith ca transaction The tae contains a the

system messages

copy SAP AG BC420 12-45

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 4688

048

983209 SAP AG 1999

Import Interface of 9unction Module

$

Technical

fields

Data

fields

BI session or CALL TRANSACTION

Processin $ode

pdate $ode

a$e oamp BI session iamp (T initial)

Bacround user iamp (T initial)

Delete session aampter processin

Loc date oamp session

ODATA indicator

TU

MD1

UPDAT1

BRUP

US1R

=11P

ELDDAT1

DATA

Cou can use parameter 2T4 to specify $hether the function modue creates a atch input session

(2T4 E ) or updates the data record directy using ca transaction (2T4 E G)

The other parameters are fied as for a atch input session header

Note 7very time the function modue is caed a atch input session is created

If the session is to contain severa transactions proceed as foo$s

ltenerate the transaction severa times This can e achieved y recording the transaction again The

function modue interface $i then contain more than one transaction -hen the function modue is

caed severa transactions can e generated for each session

copy SAP AG BC420 12-46

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 4788

043

983209 SAP AG 1999

The Transaction Recorder

PrinciplesPrinciples

Recording )ith the LSMWRecording )ith the LSMW

Principles of atch Input and all TransactionPrinciples of atch Input and all Transaction

Integrating the TA Program into the DWIntegrating the TA Program into the DW

Using the TA Recorder Using the TA Recorder

copy SAP AG BC420 12-47

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 4888

045

983209 SAP AG 1999

Benerated Program

9unction modules DltP1ltBRUP

DltIS1RT

DltLS1ltBRUP

AAP Program

Define structure of

data in seJuential

fileDefine D

table

pen seJuential file

pen I session

Read data recordCseJuential file

9ill D table

9ill I session gtALL TRASATI

Last data record K

lose I session

lose seJuential file

The generated program has the structure dispayed aove It uses the standard function modues for

creating atch input sessions

copy SAP AG BC420 12-48

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 4988

047

983209 SAP AG 1999

Structure of the Benerated Program

Benerated part

Define D

table

pen seJuential file

pen I session

Read data record

9ill D table

9ill I session gtALL TRASATI

Last data recordK

lose I session

lose seJuential file

Include DR16

Define filestructure

P1ltDATAS1T

P1ltBRUP

DltDPR

Dlt9I1LD

DltTRASATI

LS1ltBRUP

LS1ltDATAS1T

The generated program consists of t$o parts 9 a generated part and the incude 2amp72G8 The

incude is provided in the standard system

The incude contains the definition of the reuired 2 tae and a further seven suroutines These

suroutines eecute the foo$ing functions

5pen and cose fie

5pen and cose session

Fi 2 tae

Fi session

The generated part is the main program and cas the reevant suroutines A structure is aso

generated in the generated part to read the eterna data into the fie

See the Appendi for more information on the 2amp72G8 program

copy SAP AG BC420 12-49

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 5088

020

983209 SAP AG 1999

Structure of D Table

PRBRAM DPR D1BI 9AM 9ALPRBRAMPRBRAM DPRDPR D1BID1BI 9AM9AM 9AL9AL

SAPM90ampD 0602

R90ampD=UR 600000

R90ampDU=RS 0006

R90ampD=T=D =UA

SAPM90ampD 0660

=A6AM16 Smith

=A6PSTL 87000

=A6LAD6 US

=A6SPRAS 1

SAPM90ampD 06amp0

=A6ST1B US6amp428357DDATA

PRBRAM

DPR

D1BI

9AM

9AL

EAR

UM

EAR

EAR

EAR

40

4

6

6amp

6amp

D Module pool

D Screen number

D Start of screen

D 9ield name

D 9ield contents

9ield ame T(pe Length Short Tet

AAP Dictionar(

The 2 tae has the same structure as in a standard transfer

copy SAP AG BC420 12-50

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 5188

026

983209 SAP AG 1999

Read Structure

Recording

DATA BEGIN OF record data element BUKRS bukr$amp data element KTOKD ktokd$amp data element NA(EG) name$+amp data element SORT ortl$ampEND OF record-

record

Automaticall( generated

from recording

The structure of the fie is automaticay generated and is a$ays defined $ith the name amp725amp

The generated structure a$ays has the same ayout 7ach fied is defined y t$o generated ro$s

The first ro$ is a$ays a comment ro$ containing the tet J data eement and the data eement of

the screen fied from the recording In the net ro$ the fied itsef is defined $ith the name of the

data eement foo$ed y a three9digit position numer $hich specifies the ocation in the structure

The ength of the fied is set y the ength of the data eement If a fied is not defined through a data

eement the system uses the ength of the screen fied

copy SAP AG BC420 12-51

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 5288

02amp

983209 SAP AG 1999

pening and losing the 9ile

P1ltDATAS1T

LS1ltDATAS1T

FOR( oendataet USING dataet-O)EN DATASET dataet IN TET (ODE-

IF S01SUBR2 34 - 5RITE 6 te7t1e S01SUBR2-STO)-

ENDIF-

ENDFOR(-

FOR( cloedataet USING dataet-2OSE DATASET dataet-

ENDFOR(-

Include

DR16

The suroutine 5P7N3ATAS7T opens the seuentia fie

The suroutine 2+5S73ATAS7T coses the seuentia fie

copy SAP AG BC420 12-52

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 5388

02

983209 SAP AG 1999

9unction Modules for I Program

lient

Session name

Eold date

=eep session

D user name

RecordK

LI1T

BRUP

ELDDAT1

=11P

US1R

R1RD

DltP1ltBRUPDltP1ltBRUP

Transaction code

D table

TD1

DPRTA

DltIS1RTDltIS1RT

DltLS1ltBRUPDltLS1ltBRUP

pen Isessionpen Isession

Insert data for

transactions

Insert data for

transactions

lose I

session

lose I

session

The foo$ing function modues are provided for creating atch input sessions (function group

S2)

235P7N3ltamp54P

2reates a ne$ session and contains genera data for the $hoe session

23INS7ampT

Inserts a the data for a transaction into the session The transferred interna tae $ith the

structure 2ATA must contain a the data reuired for fuy processing the transaction

232+5S73ltamp54P

2oses the session after a the data has een inserted As soon as the session has een cosed it

can e processed

The interna tae $ith the structure 2ATA can ony contain atch input data for one singe

transaction run So the individua transactions are inserted into the atch input session in a oop

using severa 23INS7ampT cas

copy SAP AG BC420 12-53

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 5488

024

983209 SAP AG 2001

9unction Module DltP1ltBRUP

ALL 9UTI DltP1ltBRUPALL 9UTI DltP1ltBRUP

1PRTIB

LI1T client

BRUP session name

ELDDAT1 loc+ date

=11P delete flag

US1R bdc user name

R1RD recording

IMPRTIB

NID internal session +e(

11PTIS

1PRTIB

LI1T client

BRUP session name

ELDDAT1 loc+ date

=11P delete flag

US1R bdc user name

R1RD recording

IMPRTIB NID internal session +e(

11PTIS

-ith the function modue 235P7N3ltamp54P you can open a atch input session

The foo$ing parameters are mandatory

2+I7NT (cient)

ltamp54P (session name)

4S7amp (user name)

Note The 4S7amp must a$ays e specified This user name is reuired for processing the session

in atch mode

The foo$ing parameters are optiona

=5+AT7 specifies the eariest date on $hich the session can e started677P fag specifies $hether session shoud e deeted after it has een successfuy processed The

677P fag is ignored if the session contains errors

677P E K K means deete the session after processing (defaut vaue) H

677P E KGK means do not deete session

amp725amp E KGK ao$s you to create a recording instead of a I session

If gtI is specified the function modue returns the interna session ey This is needed to e ae to

differentiate sessions that have the same name

-ith 7G27PTI5NS you get various return vaues that can e ueried $ith SC9S4amp2

Note In onine mode the onine user is used for the authoriDation checs regardess of the user

name specified

copy SAP AG BC420 12-54

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 5588

022

983209 SAP AG 1999

Subprogram P1ltBRUP

P1ltBRUP

FOR( oen8rou-IF e9on -

2A FUN2TION BD2O)ENGROU) E)ORTING 2IENT lt1mandt GROU) 8rou USER uer KEE) kee

=ODDATE gtolddate-

ENDIF-ENDFOR(-

Include

DR16

The suprogram 5P7N3ltamp54P opens the atch input session

copy SAP AG BC420 12-55

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 5688

028

983209 SAP AG 1999

9unction Module DltIS1RT

ALL 9UTI DltIS1RTALL 9UTI DltIS1RT

IMPRT

TD1 Transaction code

PSTltLAL Update locall(

PRITIB print list

TAL1S DPRTA bdclttable

11PTIS

IMPRT

TD1 Transaction code

PSTltLAL Update locall(

PRITIB print list

TAL1S DPRTA bdclttable

11PTIS

-ith the function modue 23INS7ampT you can add transaction data to the session

Cou need an interna 2 tae to transfer the data

The foo$ing parameters are mandatory

T257 Transaction code

CNPamp5TA 2 tae

The foo$ing parameters are optiona

P5ST3+52A+ E KGK activates oca updating This means that the data to e updated is ept in the

appication server and updated in the ast step of the transaction This does not invove the update

process (For more information see course 28 Programming ataase 4pdates)

PampINTINlt E KGK 9 ists processed in I $i e printed immediatey -ith 7G27PTI5NS you get various return vaues that can e ueried $ith SC9S4amp2

copy SAP AG BC420 12-56

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 5788

023

983209 SAP AG 1999

Subprogram DltTRASATI

DltTRASATI

FOR( BD2TRANSA2TION USING tcode-

IF e9on -2A FUN2TION BD2INSERT

E)ORTING T2ODE tcode TABES D0N)ROTAB bdcdata-

ESE-

ENDIF-ENDFOR(-

T

Include

DR16

The suprogram 23TampANSA2TI5N moves the fied 2 tae either to a atch input session

or uses ca transaction to import the data into the system 5n the seection screen you can specify

$hether you $ant to create a session or you $ant to use ca transaction to process the data directy

The S7SSI5N fied is then set according to your seection

copy SAP AG BC420 12-57

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 5888

025

983209 SAP AG 1999

9unction Module DltLS1ltBRUP

ALL 9UTI DltLS1ltBRUP

11PTIS

TltP1 6

NU1U1lt1RRR amp

-ith the function modue 232+5S73ltamp54P you can cose a atch input session

In 7G27PTI5NS you get various return vaues that can e ueried $ith SC9S4amp2

copy SAP AG BC420 12-58

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 5988

027

983209 SAP AG 1999

Subprogram LS1ltBRUP

FOR( cloe8rou-IF e9on -cloe batcgt 9nut 8rou

2A FUN2TION BD22OSEGROU)-

ESE-IF e8rouoened -

2A FUN2TION BD22OSEGROU)-

ENDIF-ENDIF-

ENDFOR(-

LS1ltBRUPlose session

lose error session

Include

DR16

The suprogram 2+5S73ltamp54P coses the atch input session The suprogram differentiates

et$een a norma I session (S7SSI5N E G) and a session opened $hen ca transaction

encountered an error (73ltamp54P35P7N7 E G)

copy SAP AG BC420 12-59

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 6088

080

983209 SAP AG 1999

Subprograms DltDPRG Dlt9I1LD

DltDPR

Dlt9I1LD

FOR( bdc9eld USING nam al-IF al 34 nodata-2EAR bdcdata- bdcdata1nam nam- bdcdata1al al- A))END bdcdata-ENDIF-

ENDFOR(-

FOR( bdcdltnro USING ro8ram dltnro- 2EAR bdcdata-Bdcdata1ro8ram ro8ram-Bdcdata1dltnro dltnro-Bdcdata1dltnbe89n - A))END bdcdata-ENDFOR(-

Include

DR16

The incude 2amp72GG contains t$o suprograms 23CNPamp5 and 23FI7+

Suprogram 23CNPamp5 fis the 2 tae $ith program names and screen numers

Suprogram 23FI7+ fis the 2 tae $ith fied names and vaues

7ach suprogram creates an entry in the 2 tae

copy SAP AG BC420 12-60

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 6188

086

983209 SAP AG 1999

9illing the D Table

erorm bdcdltnro u9n8 SA)(FD +- erorm bdc9eld u9n8 BD22URSOR RFD1BUKRS- erorm bdc9eld u9n8 BD2OK2ODE 6- erorm bdc9eld u9n8 RFD1BUKRS record1BUKRS- erorm bdc9eld u9n8 RFD1KTOKD record1KTOKD-

erorm bdcdltnro u9n8 SA)(FD -

erorm bdc9eld u9n8 BD22URSOR KNA1S)RAS- erorm bdc9eld u9n8 BD2OK2ODE 6- erorm bdc9eld u9n8 KNA1NA(E record1NA(E-

erorm bdc9eld u9n8 KNA1SORT record1SORT-

Recording Benerated automaticall(

from the recording

)ERFOR( bdcdltnro USING SA)(FD +- )ERFOR( bdc9eld USING BD22URSOR RFD1BUKRS-)ERFOR( bdc9eld USING BD2OK2ODE 6-)ERFOR( bdc9eld USING RFD1BUKRS record1BUKRS-)ERFOR( bdc9eld USING RFD1KTOKD record1KTOKD-

)ERFOR( bdcdltnro USING SA)(FD -

)ERFOR( bdc9eld USING BD22URSOR KNA1S)RAS-)ERFOR( bdc9eld USING BD2OK2ODE 6-)ERFOR( bdc9eld USING KNA1NA(E record1NA(E-

)ERFOR( bdc9eld USING KNA1SORT record1SORT- ---

The 2 tae is fied $ith data from the recording The suroutines 23CNPamp5 and

23FI7+ are used for this

The suroutines are caed in the reuired structure or seuence

copy SAP AG BC420 12-61

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 6288

08amp

983209 SAP AG 1999

erie)

SAPDatabase

SeJuential9ile

SAPDatabase

ALL TRASATIALL TRASATI

SeJuential9ile

ATE IPUTATE IPUT

D TableD TableD TableD Table

I Monitor

T

In contrast to atch input you can use ca transaction to directy pass data to the diaog interface

$ithout using a atch input session Cou use an interna tae (2 tae same structure and ayout

as atch input) to temporariy store your screen data Then you ca the desired transaction in your

program

Note 5n average the 2a Transaction method is 8 to times faster than using atch Input

copy SAP AG BC420 12-62

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 6388

08

983209 SAP AG 1999

all Transaction Program$ 1ample

RE)ORT abcbdcdcdeb9ct-

)ARA(ETERS d9mode DEFAUT A

udmode DEFAUT S-FOR( calltranact9on-2A TRANSA2TION FD

USING bdcdata (ODE d9mode

U)DATE udmode-

IF lt1ubrc NE - 5RITE 6 ---

ENDIF-ENDFOR(-

Screen

00

Screen

100

Screen

An additiona system ro area is added for the caed transaction The system uses this area for

processing the individua screens in the transactionH the data from the tae is added here After the

transaction is processed the second ro area is reeasedH the system continues processing in the first

ro area

Notes

In contrast to atch input there is no error ogging (error sessions) here For processing the caed

transaction the system uses the authoriDations of the user that caed the transaction The 2 tae

can ony hod data for one transaction run at a time efore another transaction is caed and its data

can e added you must eecute a amp7Famp7S= for the 2 tae

copy SAP AG BC420 12-63

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 6488

084

983209 SAP AG 1999

ALL TRASATI C6

RE)ORT 777-

2A TRANSA2TION FD USING bdcdata (ODE E-

Default for MD1 is A

2A TRANSA2TION 3tranact9oncode4 USING 3bdc1table4 C (ODE A E N C-

-ith the parameter 57 you can seect a specific dispay mode for processing the transaction The

foo$ing three modes are avaiae

A (ispay a)

If you eecute the program a the screens and a their data are dispayed This is the defaut vaue

for the 57 in 2A++ TampANSA2TI5N

N (ispay nothing)

The screens are not dispayed at a regardess of $hether any of them contained errors As soon as

the transaction has een fuy processed contro is returned to your program (The vaue of the

parameter 4PAT7 determines $hether dataase updates are eecuted or not)

7 (ispay errors ony)As soon as an error occurs in a screen the transaction is s$itched to dispay mode so that you can

correct the errors

These dispay modes are the same as those in the atch input session processing

copy SAP AG BC420 12-64

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 6588

082

983209 SAP AG 1999

RE)ORT 777-

2A TRANSA2TION FD USING BD2DATA U)DATE -

ALL TRASATI Camp

RE)ORT 777-

2A TRANSA2TION FD USING bdcdata U)DATE -

2A TRANSA2TION 3tranact9oncode4 USING 3bdc1table4 C (ODE A E N C U)DATE A S C -

Default for UPDAT1 is A

-ith the parameter 4PAT7 you can contro ho$ dataase updates arising from a transaction are

carried out There are three options

A (asynchronous updating) The caed transaction does not $ait unti the dataase has een

updated it simpy for$ard the updates to the SAP update service This usuay speeds up the 2T

program This processing mode is N5T recommended for arge data sets as the caed transaction

does not receive a competion message from the update modue

The caing 2T program therefore cannot te if the transaction has een successfuy competed Cou

shoud use the updating administration function (transaction S8) to determine $hether updating

$as terminated eary The error anaysis correction functions for are ess hepfu than $ith

synchronous updating

S (synchronous updating) -ith synchronous updating the caed transaction $aits unti a the

updates have een competed So processing is so$er than $ith synchronous updating The caed

transaction can ho$ever report any updating errors to the program $hich maes error

anaysiscorrection easier

+ (local updating) $ith oca updating the dataase is not updated in a separate process it is

updated in the caers process (see appication hep documentation for the AAP ey$ord S7T

4PAT7 TAS6 +52A+)

copy SAP AG BC420 12-65

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 6688

088

983209 SAP AG 1999

ALL TRASATI C

RE)ORT 777-DATA mtab T0)E TABE OF bdcm8coll-

2A TRANSA2TION FD USING bdcdata (ESSAGES INTO mtab-

2A TRANSA2TION 3tranact9oncode4 USING 3bdc1table4 C (ODE A E N C U)DATE A S C (ESSAGES INTO 3metab4 C -

7SSAlt7S specifies that a system messages that are output during the eecution of a 2A++

TampANSA2TI5N are $ritten to the interna tae L7SSTA The interna tae must have the

structure 2Slt25++

4nie the cassica atch input processing $ith sessions 2A++ TampANSA2TI5N does not offer any

specia processing procedures for transactions containing errors There are no restart functions for

transactions that contain errors or that cause updating terminations

copy SAP AG BC420 12-66

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 6788

083

983209 SAP AG 1999

ALL TRASATI C4

RE)ORT 777-DATA mltot T0)E ctuaram-

2A TRANSA2TION FD USING BD2DATA

O)TIONS FRO( mltot-

2A TRANSA2TION 3tranact9oncode4 USING 3bdc1table4 C (ODE A E N C U)DATE A S C (ESSAGES INTO 3metab4 C O)TIONS FRO( ot C -

RE)ORT 777-DATA mltot T0)E ctuaram-2A TRANSA2TION FD USING bdcdata

O)TIONS FRO( mltot-

The addition 5PTI5NS enaes the ca transaction statement to e controed through a structure

The structure must have the dictionary type 2T43PAampAS

The addition 5PTI5NS Famp5 must not e comined either $ith the addition 57 or $ith

4PAT7 ore information on the net side

copy SAP AG BC420 12-67

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 6888

085

983209 SAP AG 1999

Structure TUltPARAMS

DISMD1 Procen mode anaoo o addon amp

UPDMD1 $pdae mode anaoo o addon $PA

ATTMD1 CA mode CA conro

D19SI1 orce de=a EndoE e drn procen

RAMMIT +o eD a Camp amp(

IPT +o a ac np eonF a F S-B+P SPAC

I1D +o a ac np eon a=er end o= BC daa

The components are defined as foo$s

The components 7FSIM7 ampA25IT N5INPT and N5I7N can have the foo$ing

vaues KGK E Ces or K K E No

If the addition 5PTI5NS Famp5 is not specified the foo$ing settings appy to the contro

parameters

IS57 from addition 57

4P57 from addition 4PAT7

2ATT57 2ATT not active

7FSIM7 o not not use defaut $indo$s siDe

ampA25IT Successfu eit at 25IT -5amp6

N5INPT atch input session active (SC9INPT E G)

N5I7N atch input session sti active after end of 2 data

copy SAP AG BC420 12-68

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 6988

087

983209 SAP AG 1999

SMSBID Message ID

SMSBT Message T(pe C1GIGWGSGA

SMSB Message umber

SMSB6 Message ariable 6

SMSBamp Message ariable amp

SMSB Message ariable

SMSB4 Message ariable 4

SMSBID Message ID

SMSBT Message T(pe C1GIGWGSGA

SMSB Message umber

SMSB6 Message ariable 6

SMSBamp Message ariable amp

SMSB Message ariable

SMSB4 Message ariable 4

Return code$

S(stem fields$

alue Meaning

0 Successful

6000 1rror in transaction

6000 1rror in processing call transaction

see also the s(stem fields specified

alue Meaning

0 Successful

6000 1rror in transaction

6000 1rror in processing call transaction

see also the s(stem fields specified

9ield name Meaning9ield name9ield name MeaningMeaning

Return ode and S(stem 9ields

The return code is used to specify $hether the caed transaction $as processed successfuy In

addition severa system fieds are fied The numer I type and variaes of the diaog message

output y the caed transaction Cou need this information to output the message tet

copy SAP AG BC420 12-69

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 7088

030

983209 SAP AG 1999

Benerated Program of the TA Recorder

REFRES= (ESSTAB-

2A TRANSA2TION tcode USING bdcdata (ODE ctumode U)DATE cudate (ESSAGES INTO metab-OO) AT metab- ENDOO)-IF lubrc 34 AND e8rou 34 S)A2E- IF e8rouoenend - 2A FUN2TION BD2O)ENGROU) E)ORTING ---------

--------- E8rouoened - ENDIF- 2A FUN2TION BD2INSERT E)ORTING T2ODE tcode TABES D0N)ROTAB bdcdata-ENDIF-REFRES= bdcdata-

Message table output

pen error session

Insert data record that

has errors into error

session

If you have seected ca transaction on the seection screen the generated program runs as foo$s

The onine transaction is caed $ith ca transaction and passed to tae 2ATA A the

messages arising during the ca transaction are put in the interna tae 7SSTA

7SSTA is output as a ist

If you have specified an error session ( 73ltamp54P L SPA27) on the seection screen and the

ca transaction comes across an error (+3S4amp2 L 0) the error session is opened The error

session is ho$ever ony opened once Then the data record is paced in the session

A the other data records that have errors $ith ca transaction are paced in the same session

copy SAP AG BC420 12-70

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 7188

036

983209 SAP AG 1999

The Transaction Recorder

PrinciplesPrinciples

Recording )ith the LSMWRecording )ith the LSMW

Principles of atch Input and all TransactionPrinciples of atch Input and all Transaction

Integrating the TA Program into the DWIntegrating the TA Program into the DW

Using the TA Recorder Using the TA Recorder

copy SAP AG BC420 12-71

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 7288

03amp

983209 SAP AG 1999

Integrating into the DW

Transfer program

AAP Dictionar(

Integrate

SDA0

SDA6

SDAamp

SDA

Cou can integrate the generated program into the G9- The structure of the fie must e created

in the AAP ictionary The taes SGA0 SGA8 SGA1 and SGA $i e fied

copy SAP AG BC420 12-72

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 7388

03

983209 SAP AG 1999

DW Release 42

Goo

-B eeae 45

aa ran=er ogtec

Int customer data transfer ob-ect

ecord =ed

Dece daa ran=er

d Goo

The ampunction ampor interatin TA recorder prora$s is

i$ple$ented in the

D+-B in Release

The recorder can e integrated as of ampeease and it is provided in the G9- ampeease

ltot to the G9- ampeease 5n the initia screen you can integrate programs y choosing ampoto

( +nt customer ata transfer o-ect

copy SAP AG BC420 12-73

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 7488

034

983209 SAP AG 1999

reating Program as D b-ect

Comer ran=er ogtec

ampgtec ype

Sor eD =or ogtec

aa ran=er proram

Srcre name

9900

(+A1

Cane comer

ZBCA+G

ZB

ustomer transfer ob-ect

umber bet)een 7000 and 7777

b-ect t(pe

Assignment to R ob-ect

Short tet for D ob-ectShort description

Data transfer program

ame of generated program

Structure name

A structure Cstructure la(out )ith this name is created in

the AAP Dictionar(

For ampeease transfer oects $ere not organiDed y 5amp oects ut y a G numer (00089

OOOO) The numer range O0009OOOO is reserved for customers

To create a connection to the ne$ G 9- you must assign the program to a 5amp oect

2reate a short tet for the G oect This tet $i appear in the method seection ist

Specify the program to e incuded

Specify a name for the structure to e created in the AAP ictionary

Note $he generated program appears under program type +N and not under program type

-

copy SAP AG BC420 12-74

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 7588

032

983209 SAP AG 1999

Adantages

Automatic program registration in the DW in

Release 48

ou can use all the functions defined for

standard ob-ects

1ception$ The (reate ampile ith data

function

If you incuded the oect in the ampeease $orench it is automaticay avaiae in the ampeease

B $orench

A the $orench functions are avaiae for your oect ecept for Create files ith transfer ata

copy SAP AG BC420 12-75

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 7688

038

983209 SAP AG 1999

ou are no) able to$

The Transaction Recorder$ Unit Summar(

Use the recording function in the LSMW to create

a batch input session )ith the data from the

eternal s(stem

Use the TA Recorder to create (our o)n data

transfer program

Anal(e programs that )or+ )ith batch input or

call transaction

Integrate the TA Recorder programs into the

DW

copy SAP AG BC420 12-76

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 7788

ercise 1

nit $ -ecorder

$opic 2reating etors

$ransaction -ecorder ercise 1

bull 2reating detors $ith eterna numer assignment

bull etor numers M9980008 to M9980080

Address data for detors $ith eterna numer assignment is to

e transferred using program ampFI700

ro4ect F5

Supro4ect +5

-un +575

$as)s 85 95 8S25

9oad program -F+00

8 In the foo$ing eercises eisting data is to e changed Therefore these detors $ith

eterna numer assignment have to first e created

898 4nder suproect 79 create run 797G9 $ith the name Detors ith

eternal numers

copy SAP AG BC420 12-77

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 7888

891 2reate the foo$ing three tass The tass map the foo$ing process steps

convert data create + session and process + session

89198 In run 797G9 create the foo$ing tas

9 Tas AP9

9 Name 2onvert data 9 Tas type AP

9 Program type +S-

Seect the foo$ing +S- oect

+S- proect 2109

+S- suproect 7I9

+S- oect I997GT

89191 In run 797G9 create the foo$ing tas 9 Tas +5A9

9 Name 2reate I session

Tas type +5A

9 Program type INP

Seect program ampFI700 $ith the variant

I97G9

8919 In run 797G9 create the foo$ing tas

9 Tas S29

9 Name Process I session Tas type S2

9 Program type amp7P5

Seect program ampS2S4 $ith the variant

S497G9

Note that you have to correct the seuence of the tass 2onvert data

create + session and process + session

4se the uttons

89 Start the run

The detors $i e created $ith eterna numer assignments

89 2hec in transaction F0 that the detors M9980008 to M9980080 have een

created

copy SAP AG BC420 12-78

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 7988

ercise

nit $ransaction -ecorder

$opic -ecording function in the 9S8(

bull 2reate a recording using the +S-

bull ltenerate a atch input session

2hange the detor address data in the amp System

Name of the recording +

Name of the file +2055+F9

8 2reate the recording 7I3 using the +S- ampecord the transaction F01 (2hange

detor)

898 efore you create the recording first test the transaction onineQ

For the recording use detor M9980008 5n the initia screen of the F01

maintain the foo$ing fieds ony

etor etor M9980008

2ompany code 0008

Address data seect

Note $he data record must e saved hile recording

891 aintain the names and the descriptions for the foo$ing fieds

Name city street posta code and teephone numereete a other fieds in screen 880 from the recording (eg S5ampT+ +AN8

SPampAS)

4se the same technica names as sho$n in the tae eo$ (automatic fied

mapping)

copy SAP AG BC420 12-79

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 8088

1 2reate the suproect 7I9 and the ne$ oect TA3 in your proect 2109

aintain the oect attriutes and seect the item atch input recording Seect your

recording 7I3

2reate the source structure address

2reate the source fieds according to the tae eo$ 5r copy them from proect 2109S37N suproect 7I900 oect TA900

198 Fie setup The data from the egacy system are dispayed in the foo$ing tae

Fied name Fied type Fied ength escription

N5 2 8B etor numer

NA7 2 Name

STamp77T 2 Street

2ITC 2 2ityPace of residence

MIP 2 80 Posta code

T7+ 2 8B Teephone numer

191 aintain the fied mapping 4se the automatic fied mapping (via menu item

7tras)

19 Specify the fies 5ny maintain the fie name of the source fie

Name of the fie 21099IFI+7

2odepage 8800

19 Import the data and convert them ispay the data in each caseQ

19 2reate a atch input session

19B ampun the atch input session

copy SAP AG BC420 12-80

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 8188

ercise 3

nit $ransaction -ecorder

$opic -ecording ith the $ -ecorder

bull ltenerate a recording using the TA recorder

bull Test the recording

2hange the address data of detors in the amp system

Name recording $+

Name of the file +2055+F9

8 2reate the recording TA37I3 using the transaction recorder ampecord the

transaction F01 (change detor)

898 4se detor M9980008 for the recording 5n the F01 initia screen ony

maintain the foo$ing fieds

etor etor M9980008

2ompany 2ode 0008

Address data seect

Note $he data record must e saved hen recording

eete a fieds that do not eist in the source fie 21099IFI+7 from screen

880 in the recording (eg 6NA89S5ampT+ 6NA89+AN8 6ANNQ9SPampAS) Note o not deete fieds ampF01946ampS and ampF0190880

Save the recording no$

1 S$itch to the recordings overvie$

198 Process the recording $ith the processing mode A (dispay a)

191 Process the recording $ith the processing mode RN (no dispay)

19 If the recording has een tested and no error has occurred generate a I session

and run it using the I monitor If an error shoud occur generate the recordingagainQ

copy SAP AG BC420 12-81

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 8288

From the recording generate the program M21037I3 in your deveopment cass

2109 Seect the foo$ing

bull ampead fied contents from fie

bull 2reate test data in the fie 2103dei3test3tt

98 Save this program and eecute it ltenerate one I session each and process it

2arry out the same steps again using the ca transaction

The generated program shoud no$ e changed so that fie 21099IFI+7 can e

read and processed

98 2hange the defaut vaue of the fie name (parameter dataset) in 21099

IFI+7

91 2hange the structure definition eete the company code fied and the address

data checo from the structure

9 2hange the su9routine ca perform dc3fied for the company code (KampF019

46ampSK) so that the vaue 0008 is transferred

9 2hange the su9routine ca perform dc3fied for the address data checo

(KampF0190880K) so that the vaue G is transferred

9 Start the program again and read the data from the fie 21099IFI+7 $ith

detor data ltenerate a I session $ith it and run it

copy SAP AG BC420 12-82

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 8388

033 Include DR16INCLUDE BDCRECX1

SELECTION-SCREEN BEGIN OF LINE

PARAMETERS SESSION RADIOBUTTON GROUP CTU create sessi SELECTION-SCREEN COMMENT $amp TEXT-S FOR FIELD SESSION

se(ecti-scree )siti +

PARAMETERS CTU RADIOBUTTON GROUP CTU ca(( trasacti

SELECTION-SCREEN COMMENT $amp TEXT-S FOR FIELD CTU

SELECTION-SCREEN END OF LINE

SELECTION-SCREEN BEGIN OF LINE

SELECTION-SCREEN COMMENT $amp TEXT-S1 FOR FIELD GROUP

se(ecti-scree )siti $+

PARAMETERS GROUP1$amp r) ae 0 sessi

SELECTION-SCREEN COMMENT $amp TEXT-S+ FOR FIELD CTUMODE

se(ecti-scree )siti

PARAMETERS CTUMODE LIE CTU2PARAMS-DISMODE DEFAULT 3N3

A4 s56 a(( 78)rs

E4 s56 78)r errr (8

N4 7 t 7is)(a8 78)r

SELECTION-SCREEN END OF LINE

SELECTION-SCREEN BEGIN OF LINE

SELECTION-SCREEN COMMENT $amp TEXT-S$ FOR FIELD USER

se(ecti-scree )siti $+

PARAMETERS4 USER1$amp DEFAULT S9-UNAME ser 0r sessi i atc5

SELECTION-SCREEN COMMENT $amp TEXT-S FOR FIELD CUPDATE

se(ecti-scree )siti

PARAMETERS CUPDATE LIE CTU2PARAMS-UPDMODE DEFAULT 3L3

S4 s8c5rs(8

A4 as8c5rs(8

L4 (ca(

SELECTION-SCREEN END OF LINE

SELECTION-SCREEN BEGIN OF LINE

SELECTION-SCREEN COMMENT $amp TEXT-S FOR FIELD EEP

se(ecti-scree )siti $+

PARAMETERS4 EEP AS CltECBOX 3 3 = 7e(ete sessi i0 0iis5e7

3X3 = gtee) sessi i0 0iis5e7

SELECTION-SCREEN COMMENT $amp TEXT-S FOR FIELD E2GROUP

copy SAP AG BC420 12-83

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 8488

se(ecti-scree )siti

)araeters E2GROUP1$amp r) ae 0 errr-sessi

SELECTION-SCREEN END OF LINE

SELECTION-SCREEN BEGIN OF LINE

SELECTION-SCREEN COMMENT $amp TEXT-S FOR FIELD ltOLDDATE

se(ecti-scree )siti $+

PARAMETERS4 ltOLDDATE LIE S9-DATUM

SELECTION-SCREEN COMMENT +11amp TEXT-S$ FOR FIELD E2USER

se(ecti-scree )siti

PARAMETERS4 E2USER1$amp DEFAULT S9-UNAME ser 0r errr-sessi

SELECTION-SCREEN END OF LINE

SELECTION-SCREEN BEGIN OF LINE

SELECTION-SCREEN COMMENT +11amp TEXT-S FOR FIELD E2EEP

se(ecti-scree )siti

PARAMETERS4 E2EEP AS CltECBOX 3 3 = 7e(ete sessi i0 0iis5e7

3X3 = gtee) sessi i0 0iis5e7

SELECTION-SCREEN END OF LINE

SELECTION-SCREEN BEGIN OF LINE

SELECTION-SCREEN COMMENT +11amp TEXT-S FOR FIELD E2ltDATE

se(ecti-scree )siti

PARAMETERS4 E2ltDATE LIE S9-DATUM

SELECTION-SCREEN END OF LINE

SELECTION-SCREEN SIP

SELECTION-SCREEN BEGIN OF LINE

SELECTION-SCREEN COMMENT 1amp TEXT-S1 FOR FIELD NODATA

PARAMETERS4 NODATA DEFAULT 33 LOER CASE 7ata

SELECTION-SCREEN END OF LINE

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

Batc5i)t7ata 0 si(e trasacti

DATA4 BDCDATA LIE BDCDATA OCCURS ITlt ltEADER LINE

essaes 0 ca(( trasacti

DATA4 MESSTAB LIE BDCMSGCOLL OCCURS ITlt ltEADER LINE

errr sessi )ee7 3 3 r 3X3amp

DATA4 E2GROUP2OPENED

essae tets

TABLES4 T1

copy SAP AG BC420 12-84

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 8588

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

at se(ecti scree

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

AT SELECTION-SCREEN

r) a7 ser st e 0i((e7 0r create sessi

IF SESSION = 3X3 AND

GROUP = SPACE OR USER = SPACE

MESSAGE E1MSamp

ENDIF

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

)e 7ataset

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

FORM OPEN2DATASET USING P2DATASET

OPEN DATASET P2DATASET IN TEXT MODE

IF S9-SUBRC

RITE4 TEXT-E S9-SUBRC

STOP

ENDIF

ENDFORM

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

c(se 7ataset

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

FORM CLOSE2DATASET USING P2DATASET

CLOSE DATASET P2DATASET

ENDFORM

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

create atc5i)t sessi

t 0r ca(( trasacti siamp

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

FORM OPEN2GROUP

IF SESSION = 3X3

SIP

RITE4 $amp 3Create r)3I1amp GROUP

SIP

)e atc5i)t r)

CALL FUNCTION 3BDC2OPEN2GROUP3

EXPORTING CLIENT = S9-MANDT

copy SAP AG BC420 12-85

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 8688

GROUP = GROUP

USER = USER

EEP = EEP

ltOLDDATE = ltOLDDATE

RITE4 amp 3BDC2OPEN2GROUP3I$amp

1$amp 3retrc7e43I+amp

S9-SUBRC

ENDIF

ENDFORM

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

e7 atc5i)t sessi

ca(( trasacti si4 errr sessiamp

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

FORM CLOSE2GROUP

IF SESSION = 3X3

c(se atc5i)t r)

CALL FUNCTION 3BDC2CLOSE2GROUP3

RITE4 amp 3BDC2CLOSE2GROUP3Iamp

1$amp 3retrc7e43I+amp

S9-SUBRC

ELSE

IF E2GROUP2OPENED = 3X3

CALL FUNCTION 3BDC2CLOSE2GROUP3

RITE4

RITE4 amp 3Fe5(era))e 6r7e eret3Iamp

ENDIF

ENDIF

ENDFORM

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

Start e6 trasacti accr7i t )araeters

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

FORM BDC2TRANSACTION USING TCODE

DATA4 L2MSTRINGamp

DATA4 L2SUBRC LIE S9-SUBRC

atc5 i)t sessi

IF SESSION = 3X3

CALL FUNCTION 3BDC2INSERT3

EXPORTING TCODE = TCODE

TABLES D9NPROTAB = BDCDATA

RITE4 3BDC2INSERT3Iamp

copy SAP AG BC420 12-86

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 8788

TCODE

3retrc7e43I+amp

S9-SUBRC

3RECORD43

S9-INDEX

ca(( trasacti si

ELSE

REFRESlt MESSTAB

CALL TRANSACTION TCODE USING BDCDATA

MODE CTUMODE

UPDATE CUPDATE

MESSAGES INTO MESSTAB

L2SUBRC = S9-SUBRC

RITE4 3CALL2TRANSACTION3

TCODE

3retrc7e43I+amp

L2SUBRC

3RECORD43

S9-INDEX

LOOP AT MESSTAB

SELECT SINGLE FROM T1 ltERE SPRSL = MESSTAB-MSGSPRA

AND ARBGB = MESSTAB-MSGID

AND MSGNR = MESSTAB-MSGNR

IF S9-SUBRC =

L2MSTRING = T1-TEXT

IF L2MSTRING CS 313

REPLACE 313 ITlt MESSTAB-MSGH1 INTO L2MSTRING

REPLACE 3$3 ITlt MESSTAB-MSGH$ INTO L2MSTRING

REPLACE 33 ITlt MESSTAB-MSGH INTO L2MSTRING

REPLACE 33 ITlt MESSTAB-MSGH INTO L2MSTRING

ELSE

REPLACE 33 ITlt MESSTAB-MSGH1 INTO L2MSTRING

REPLACE 33 ITlt MESSTAB-MSGH$ INTO L2MSTRING

REPLACE 33 ITlt MESSTAB-MSGH INTO L2MSTRING

REPLACE 33 ITlt MESSTAB-MSGH INTO L2MSTRING

ENDIF

CONDENSE L2MSTRING

RITE4 MESSTAB-MSGT9P L2MSTRING$+amp

ELSE

RITE4 MESSTAB

ENDIF

ENDLOOP

copy SAP AG BC420 12-87

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 8888

SIP

Eree 0e5(era))e

IF L2SUBRC AND E2GROUP SPACE

IF E2GROUP2OPENED = 3 3

CALL FUNCTION 3BDC2OPEN2GROUP3

EXPORTING CLIENT = S9-MANDT

GROUP = E2GROUP

USER = E2USER

EEP = E2EEP

ltOLDDATE = E2ltDATE

E2GROUP2OPENED = 3X3

ENDIF

CALL FUNCTION 3BDC2INSERT3

EXPORTING TCODE = TCODE

TABLES D9NPROTAB = BDCDATA

ENDIF

ENDIF

REFRESlt BDCDATA

ENDFORM

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

Start e6 scree

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

FORM BDC2D9NPRO USING PROGRAM D9NPRO

CLEAR BDCDATA

BDCDATA-PROGRAM = PROGRAM

BDCDATA-D9NPRO = D9NPRO

BDCDATA-D9NBEGIN = 3X3

APPEND BDCDATA

ENDFORM

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

Isert 0ie(7

Page 20: BC420_46C - 012The Transaction Recorder

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 2088

0amp0

983209 SAP AG 1999

reating Recording

Admnraon

ecordn

Goo

ame of recording

Description

)ner

ame of transaction

Start recording

lto into the +S- and seect the menu path ampoto (Recorings An overvie$ of a previousy

created recordings for your proect are dispayed To start a ne$ recording seect Create

To create a recording you must define the name the description and the o$ner

7nter the name of the transaction you $ant to record

7ecute the transaction and compete it propery

Note ampecordings are assigned to ony one proect 9 so the name of the recording must e uniue

copy SAP AG BC420 12-20

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 2188

0amp6

983209 SAP AG 1999

hanging ustomer Data$ Initial Screen

9ield ontents

BCC$Samp $SZAV

BCamp(Camp )00

02-($++ -88-10000

02-0110

02-0130

$SZAV

9ield ame

Comer

Company code

Z-88-10000

Genera daa

Comer Z-88-10000

+ame

9ield ontents

BCamp(Camp $PA

BCS$BSC SAPSZA1 0300ASS

BCS$BSC SAPSZA1 0301Camp$

BCC$Samp SZA10100-+$B

A1AA-S Garden Sree

A1AA-amp$S+$1 34

A1AA-PampSCamp1 02105

9ield ame

Screen

111

Screen

106

In the aove eampe the transaction Change customer F01 is recorded

Note

You must ma)e some modification to the field values for all the fields you ant to capture

for the data transfer For the purposes of recording a change can simply mean overriting

one single character in a field ith the same character

ven if fields are to e filled using S$amp$ parameters the values must still e changed on

the screen in order to capture them

(ith online transactions screen sequences may appear that are different than in the

recording

copy SAP AG BC420 12-21

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 2288

0ampamp

983209 SAP AG 1999

Results

RecordingRecording R1lt6 Demolt6

9D0amp hange customer Caccounting

SAPM90ampD 0608

DltURSR R90ampD=UR

Dlt=D1 gt00

R90ampD=UR 5560000

R90ampDD0660

US1ltA

SAPM90ampD 0666

Dlt=D1 UPDA

DltSUSR SAPLSA6

DltSUSR SAPLSA6

DltURSR SA6ltD0600T1LltUM1

ADDR6ltDATASTR11T 4 Barden Street

ADDR6ltDATAPSTltD1 0amp602

ADDR6ltDATAIT6 oston

SA6ltD0600T1LltUM1 8638257755

The resuts of the recording using the +S- are dispayed in a tree structure

After the recording has finished you can edit it Cou can deete fieds or add ne$ ones

copy SAP AG BC420 12-22

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 2388

0amp

983209 SAP AG 1999

Assigning 9ield ames

Recording R16 Demolt6

Dlt=D1 UPDA

DltSUSR SAPLSA6

DltSUSR SAPLSA6

DltURSR SA6ltD0600T1L

ADDR6ltDATAAM16 Lisa Eofmeister

ADDR6ltDATAPSTltD1 0amp602

ADDR6ltDATAIT6 oston

ame

+ame

ecrpon

e=a ae

A1AA-+A1

A1AA-+A1

Comer name

a o=meer

Screen =ed

ustomer name

double clic+

Cou can assign names for each recorded fied The specia fieds (2356257 2324ampS5amp

and 23S4S2amp77N) are not incuded here Cou can choose the fied names -hen the atch

input session is created the contents of these fieds are assigned to the target fieds specified in the

eft coumn

Functions

efaut Assigns to the fied names of the underying target fied and its fied description

ampeset eetes fied name and fied description

oue cic 7dits fied name fied description and defaut vaue

Note Cou can use fied names more than once =o$ever the fied name is ony avaiae once in thefied mapping For this reason it is not practica to use fied names more than once

For a those fieds for $hich you do not assign a name the defaut vaue is used $hen the atch

input session is created These defaut vaues can e seen as constants This is especiay usefu for

chec oes (for eampe 08 vie$ seection)

The +S- supports automatic fied mapping Source fieds and target fieds can e assigned to each

other automaticay The fieds are assigned to the corresponding fieds of the same name Therefore

the fied names of the source structure shoud e given the same or simiar names as the fied names

in the target structure

copy SAP AG BC420 12-23

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 2488

0amp4

983209 SAP AG 2001

Addinggtremoing screen fields

Repeating recording

9or identical field names the name and description are

assigned automaticall(

1diting Recording

02-($++

(+A1-A+

(+A1-+A1

(+A1-Samp

(+A1-+A2

(+A1-SAS

Comer accon nmer

e

+ame 1

Sor =ed

+ame 2

Sree

Selection of all

aailable screen

fields

Cou can ater add ne$ screen fieds if you need to 6eep in mind that fieds shoud ony e added in

paces $here they are aso provided on the screen other$ise you $i get an error $hen the I

session is processed

After saving you $i get the message The data has een saved successfuy No$ the recordings

are avaiae for the oect attriutes

If you repeat the recording you can record a ne$ screen seuence $ith ne$ fieds Provided that the

fied names (eg 6NA89NA78) are identica the names and descriptions are automaticay

assigned

copy SAP AG BC420 12-24

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 2588

0amp2

983209 SAP AG 1999

b-ect T(pe and Import Method$ Recording

Standard atch Input gt Direct Input

atch Input Recording

API

IDoc

ampgtec ype ) mpor meod

Bac np recordn

ecordn ec1

The recording is no$ avaiae $ith the oect attriutes

Net you create a proect or su9proect in the +S- and specify process the data transfer

Cou eecute the data transfer as in the standard system

efine the source fieds and structures

efine the fied mapping

ampead and convert the data

2reate and import a atch input session

copy SAP AG BC420 12-25

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 2688

0amp8

983209 SAP AG 1999

The Transaction Recorder

PrinciplesPrinciples

Recording )ith the LSMWRecording )ith the LSMW

Principles of atch Input and all TransactionPrinciples of atch Input and all Transaction

Integrating the TA Program into the DWIntegrating the TA Program into the DW

Using the TA Recorder Using the TA Recorder

copy SAP AG BC420 12-26

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 2788

0amp3

983209 SAP AG 1999

Transaction Recorder

Online

Transaction

RecordingTransfer Program

T

Included in the Batch Input Monitor

Cou use the transaction recorder to record transactions and then use the transaction recording to

generate a transfer program The program ao$s you to transfer data using either atch input or ca

transaction

copy SAP AG BC420 12-27

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 2888

0amp5

983209 SAP AG 1999

hanging ustomer Data$ Initial Screen

9ield ontents

BCC$Samp $SZAV

BCamp(Camp )00

02-($++ Z-88-10000

02-0110

02-0130

$SZAV

9ield ame

Comer

Company code

Z-88-10000

Genera daa

Comer Z-88-10000

+ame

9ield ontents

BCamp(Camp $PA

BCS$BSC SAPSZA1 0300ASS

BCS$BSC SAPSZA1 0301Camp$

BCC$Samp SZA10100-+$B

A1AA-S Garden Sree

A1AA-amp$S+$1 34

A1AA-PampSCamp1 02105

9ield ame

Screen

111

Screen

106

In the aove eampe the transaction Change customer F01 is recorded

copy SAP AG BC420 12-28

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 2988

0amp7

983209 SAP AG 2001

hange Debitor$ Pa(ment Transactions C6

Banlt dea

Screen

10

9ield ontent

BCC$Samp (+B(-BA+(+01

BCamp(Camp BA+((+B(-BA+(S01

(+B(-BA+(01 12345679

(+B(-BA+(+01 22222222

Debitor 5560000

9ield ame

Inde

copy SAP AG BC420 12-29

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 3088

00

983209 SAP AG 1999

hanging ustomer Data$ Pa(ment Transactions Camp

Addre

an+ countr( US

an+ code 6amp42837

Banlt dea

ustomer 5560000

9ield ontents9ield ame

BCC$Samp (+A1-(+ZA

BCamp(Camp $PA

(+B(-Z01

Screen

10

Screen

100

SAPLBA

9ield ontents

BCC$Samp B+(A-BA+(A

BCamp(Camp +

B+(A-BA+(A +aona Banlt

9ield ame

In different transactions the modue poo may change This is the case $ith for eampe customer

master data The TA recorder records modue poo changes automaticay

copy SAP AG BC420 12-30

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 3188

06

983209 SAP AG 1999

Eierarch( Displa( of the Recording

02amp

02

SAP02 0106

BCC$Samp 02-0130

BCamp(Camp )00

02-($++ -88-10000

02-0110

02-0130

SAP02 0111

BCamp(Camp V

BCC$Samp A1AA-amp$S+$1

A1AA-S Garden Sree

Recording

-ith the TA recorder the resuts are aso a ist in a hierarchy dispay =o$ever you cannot assign

your o$n fied names as you can in the +S-

copy SAP AG BC420 12-31

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 3288

0amp

983209 SAP AG 1999

Recording erie)

Recording

Transfer program

9unction module

ontains onl( the data

from the recording

Test data

Test

reate

reate

reate

reate

1dit hange recording

Process recording

Cou can edit the recording as needed

The recording can e tested and eecuted again The screens are run through in the same $ay as in

the recording

The recording can then e used to create

atch input sessions

Test data

ata transfer programs $ith atch input or ca transaction

Function modues

copy SAP AG BC420 12-32

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 3388

0

983209 SAP AG 1999

1 02 BS

2 SAP02 106

3 BCC$Samp $SZAV

4 BCamp(Camp )00 5 02-($++ -88-10000

6 02-0110

7 02-0130

8 $SZAV

9 SAP02 111

10 BCamp(Camp V

11 BCC$Samp A1AA-amp$S+$1

12 A1AA-S Garden Sree

Program Screen St 9ield ame 9ield alue

Recording 1ditor

Recording

Add gt delete lines 9ormat chec+

Import gt eport of recording

In the editor you can add or deete ines Cou can aso change the contents of individua ines

-ith the function Chec) you can specify $hether the edited version of the recording sti has the

correct synta

Cou can aso eport import recordings to from a seuentia fie

After editing save the recording changes

copy SAP AG BC420 12-33

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 3488

04

983209 SAP AG 1999

Recording Seeral Transaction Runs

RecordingF

Directl( after the first recordingG or

In the displa( mode of the recording

In this step you can record additiona transactions and add additiona transaction runs to the

recording

Cou can record the additiona transactions directy after a recording or in the edit screen of a

recording

copy SAP AG BC420 12-34

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 3588

02

983209 SAP AG 1999

1ditor$ Importing and 1porting Recordings

6 T 9D0amp S

amp SAPM90ampD 608

DltURSR

4

2

8 SAPM90ampD 666

60

66

Program Screen St 9ield name 9ield alue

cempA

e name

aa =orma

cemp

A

e name

aa =orma

1port

Import

Presentation Serer

If the editor functions in the systems do not provide a the functions you need you can do$noad the

recording to your presentation server using the Eort function and then edit the recording using a

P2 editor

Cou use the Import function to import the data ac into the amp System ae sure the fie is sti in

the correct format

copy SAP AG BC420 12-35

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 3688

08

983209 SAP AG 1999

Processing the Recording

Recording

Process )ith ALL TRASATI

Parameer

Proce mode$pdae mode

CA mode

e=a e

Con a=er comm

+o a B eon

nd +o a B mode

A

A

T

The recording can e eecuted directy The data from the recording is used and the transaction is

processed $ith ca transaction

2a transaction provides a range of options for caing appication transactions $hich are discussed

on the foo$ing t$o pages

copy SAP AG BC420 12-36

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 3788

03

983209 SAP AG 1999

Process mode

Update mode

ATT mode

Processing Recording )ith T 6

A

1

Displa( all screens

Displa( errors onl(

o displa(

L

S

A

Local

S(nchronous

As(nchronous

A

o ATT

ATT )ithout indiidual screen control

ATT )ith indiidual screen control

Processing mode

=ere you can specify the processing mode 9 it is the same as the processing mode for atch input

4pdate mode

=ere you can specify the update mode For more information see the unit ca transaction

2ATT mode

=ere you can mae specia settings if you $ant to test the recording under 2ATT conditions (ony

necessary for 2ATT runs) Specia functions are caed in the 2ATT too for each screen at the end of

P5 and at the start of PAI

copy SAP AG BC420 12-37

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 3888

05

983209 SAP AG 1999

Default sie

ont after commit

ot a I session

1nd$ ot a I mode

Processing Recording )ith T amp

The screen standard sie is used for the

processing

ommit )or+ does not end the processing

o I mode is actie The transaction )ill run

through as in online

I mode is selected nce the data in the D

table is processedG the I mode is set to inactie

Standard siDe

If you seect this the screens are processed in the standard siDe in the foreground (in foreground or

dispay errors ony) Note the standard siDe is a$ays used for acground processing

Further after commit

The first commit $or in a transaction does not ead to the end of the recording

Note A atch input transaction is ended $ith the first commit $or

No I mode

The system fied SC9INPT is not set (SC9INPT E ) So transactions are run through as in onine

7nd No I mode

5ny use if you choose the processing mode 7 (dispay errors ony) Then the transaction is processed in the acground in atch input mode and if there is an error the screens run through in

the foreground

copy SAP AG BC420 12-38

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 3988

07

983209 SAP AG 1999

I Mode

atch input

mode

nline

Some transactions behae differentl( in batch input mode

than in online Cbatch input capabilit(

atch input mode sets the s(stem field SIPT H

Not every transaction can run the same onine and in atch input mode The transaction must decide

itsef $hether it is caed onine or in atch input mode

The system sets the system fied SC9INPT E G if the atch input mode is active (this aso appies

to ca transaction) From this system fied the transaction can identify $hether to run onine or in

atch input mode

copy SAP AG BC420 12-39

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 4088

040

983209 SAP AG 1999

reating a Session 9rom the Recording

Recordingnl( contains the data

from the recording

Seon name 02amp

Aoraon ampBS(eep eon

oclt dae 10102000

Cou can create a atch input session directy from the recording that you can then process using the

atch input monitor

copy SAP AG BC420 12-40

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 4188

046

983209 SAP AG 1999

reating Test Data

Test Data

Recording

ranranpBC420AAe name

The file onl( contains the data from the recording

Rgt

Application Serer

Structure

Cou can create a fie from the recordingH the fie $i contain a the fieds from the recording The

fieds are added to the fie $ith the ength you specified in the definition

The fied order corresponds to the order in the recording overvie$ Technica fieds

(2356257 2324ampS5amp and so on) are incuded

The data can ony e stored on the appication server If you do not specify a path the fie is stored in

the $or directory of the appication server

If the specified test fie aready eists the ne$ data record is added to this fie

copy SAP AG BC420 12-41

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 4288

04amp

983209 SAP AG 1999

ed conen

reating a Program

Recording

ZBC420ampProram name

Transfer Program

e daa

ead =rom =e

ran=er =rom recordn

reate

9ile nameTest data

ranranpBC420AA

Cou can generate a program from the recording

In the foo$ing diaog o enter a program name In addition you can choose the type and method

for fiing the maintained fied contents from the recorded screens

4se the vaues used for the recording If you reuire feie data transfer you $i have to modify

this program ater

ParameteriDe the input vaues and read these vaues from a fie A data structure is created for

parameteriDationH the data records are read from an eterna fie into this data structure The

program assumes the fie $as taiored to this data structure

If you have decided to parameteriDe the input vaues you shoud aso create a test fie during

generation To do this seect the checo and enter a name for the fie

The attriute maintenance screen of the AAP editor appears aintain the attriutes and save the

program

copy SAP AG BC420 12-42

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 4388

04

983209 SAP AG 1999

Program 9unctions

Online

transaction

Transfer program

To

error

1rror

ption 6ption ampFlat SAP

structure

Monitor

Cou have no$ generated a data transfer program for importing data into the amp System The

program can eecute the data transfer using atch input or ca transaction

If you choose option 1 and there is an error the data record is paced into a atch input session

copy SAP AG BC420 12-43

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 4488

044

983209 SAP AG 1999

Benerating 9unction Modules

Recording

Zcreaedeor ncon mode

ncon rop

Sor eD

ZBC420

Creae comer

9unction module

nl( one data record can be processed at a time

In the net diaog o you can generate a function modue a function group and short tet from the

recording The function modue is automaticay created in the function group

copy SAP AG BC420 12-44

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 4588

042

983209 SAP AG 1999

9unction of 9unction Modules

Online

transaction

To

error

1rror

ption 6 ption amp

9unction module

Import

Parameter 1port

parameter

Tables

M1SSTA

Monitor

S$BC

Import interface

The import interface consists of a technica part and the fieds from the recording (A parameter is

created for each input fied of the recorded transactions)

7port interface

Simpy consists of the parameter S4amp2 The function modue $i return a vaue in the system

fied SC9S4amp2 after caing ca transaction This return vaue is set to Dero if the data record has

een correcty processed (5ny appies to 2T)

If a session is created you $i e notified $hether the data record coud e paced into the session

Tae interfaceThis is used ony if the function modue $ors $ith ca transaction The tae contains a the

system messages

copy SAP AG BC420 12-45

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 4688

048

983209 SAP AG 1999

Import Interface of 9unction Module

$

Technical

fields

Data

fields

BI session or CALL TRANSACTION

Processin $ode

pdate $ode

a$e oamp BI session iamp (T initial)

Bacround user iamp (T initial)

Delete session aampter processin

Loc date oamp session

ODATA indicator

TU

MD1

UPDAT1

BRUP

US1R

=11P

ELDDAT1

DATA

Cou can use parameter 2T4 to specify $hether the function modue creates a atch input session

(2T4 E ) or updates the data record directy using ca transaction (2T4 E G)

The other parameters are fied as for a atch input session header

Note 7very time the function modue is caed a atch input session is created

If the session is to contain severa transactions proceed as foo$s

ltenerate the transaction severa times This can e achieved y recording the transaction again The

function modue interface $i then contain more than one transaction -hen the function modue is

caed severa transactions can e generated for each session

copy SAP AG BC420 12-46

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 4788

043

983209 SAP AG 1999

The Transaction Recorder

PrinciplesPrinciples

Recording )ith the LSMWRecording )ith the LSMW

Principles of atch Input and all TransactionPrinciples of atch Input and all Transaction

Integrating the TA Program into the DWIntegrating the TA Program into the DW

Using the TA Recorder Using the TA Recorder

copy SAP AG BC420 12-47

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 4888

045

983209 SAP AG 1999

Benerated Program

9unction modules DltP1ltBRUP

DltIS1RT

DltLS1ltBRUP

AAP Program

Define structure of

data in seJuential

fileDefine D

table

pen seJuential file

pen I session

Read data recordCseJuential file

9ill D table

9ill I session gtALL TRASATI

Last data record K

lose I session

lose seJuential file

The generated program has the structure dispayed aove It uses the standard function modues for

creating atch input sessions

copy SAP AG BC420 12-48

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 4988

047

983209 SAP AG 1999

Structure of the Benerated Program

Benerated part

Define D

table

pen seJuential file

pen I session

Read data record

9ill D table

9ill I session gtALL TRASATI

Last data recordK

lose I session

lose seJuential file

Include DR16

Define filestructure

P1ltDATAS1T

P1ltBRUP

DltDPR

Dlt9I1LD

DltTRASATI

LS1ltBRUP

LS1ltDATAS1T

The generated program consists of t$o parts 9 a generated part and the incude 2amp72G8 The

incude is provided in the standard system

The incude contains the definition of the reuired 2 tae and a further seven suroutines These

suroutines eecute the foo$ing functions

5pen and cose fie

5pen and cose session

Fi 2 tae

Fi session

The generated part is the main program and cas the reevant suroutines A structure is aso

generated in the generated part to read the eterna data into the fie

See the Appendi for more information on the 2amp72G8 program

copy SAP AG BC420 12-49

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 5088

020

983209 SAP AG 1999

Structure of D Table

PRBRAM DPR D1BI 9AM 9ALPRBRAMPRBRAM DPRDPR D1BID1BI 9AM9AM 9AL9AL

SAPM90ampD 0602

R90ampD=UR 600000

R90ampDU=RS 0006

R90ampD=T=D =UA

SAPM90ampD 0660

=A6AM16 Smith

=A6PSTL 87000

=A6LAD6 US

=A6SPRAS 1

SAPM90ampD 06amp0

=A6ST1B US6amp428357DDATA

PRBRAM

DPR

D1BI

9AM

9AL

EAR

UM

EAR

EAR

EAR

40

4

6

6amp

6amp

D Module pool

D Screen number

D Start of screen

D 9ield name

D 9ield contents

9ield ame T(pe Length Short Tet

AAP Dictionar(

The 2 tae has the same structure as in a standard transfer

copy SAP AG BC420 12-50

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 5188

026

983209 SAP AG 1999

Read Structure

Recording

DATA BEGIN OF record data element BUKRS bukr$amp data element KTOKD ktokd$amp data element NA(EG) name$+amp data element SORT ortl$ampEND OF record-

record

Automaticall( generated

from recording

The structure of the fie is automaticay generated and is a$ays defined $ith the name amp725amp

The generated structure a$ays has the same ayout 7ach fied is defined y t$o generated ro$s

The first ro$ is a$ays a comment ro$ containing the tet J data eement and the data eement of

the screen fied from the recording In the net ro$ the fied itsef is defined $ith the name of the

data eement foo$ed y a three9digit position numer $hich specifies the ocation in the structure

The ength of the fied is set y the ength of the data eement If a fied is not defined through a data

eement the system uses the ength of the screen fied

copy SAP AG BC420 12-51

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 5288

02amp

983209 SAP AG 1999

pening and losing the 9ile

P1ltDATAS1T

LS1ltDATAS1T

FOR( oendataet USING dataet-O)EN DATASET dataet IN TET (ODE-

IF S01SUBR2 34 - 5RITE 6 te7t1e S01SUBR2-STO)-

ENDIF-

ENDFOR(-

FOR( cloedataet USING dataet-2OSE DATASET dataet-

ENDFOR(-

Include

DR16

The suroutine 5P7N3ATAS7T opens the seuentia fie

The suroutine 2+5S73ATAS7T coses the seuentia fie

copy SAP AG BC420 12-52

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 5388

02

983209 SAP AG 1999

9unction Modules for I Program

lient

Session name

Eold date

=eep session

D user name

RecordK

LI1T

BRUP

ELDDAT1

=11P

US1R

R1RD

DltP1ltBRUPDltP1ltBRUP

Transaction code

D table

TD1

DPRTA

DltIS1RTDltIS1RT

DltLS1ltBRUPDltLS1ltBRUP

pen Isessionpen Isession

Insert data for

transactions

Insert data for

transactions

lose I

session

lose I

session

The foo$ing function modues are provided for creating atch input sessions (function group

S2)

235P7N3ltamp54P

2reates a ne$ session and contains genera data for the $hoe session

23INS7ampT

Inserts a the data for a transaction into the session The transferred interna tae $ith the

structure 2ATA must contain a the data reuired for fuy processing the transaction

232+5S73ltamp54P

2oses the session after a the data has een inserted As soon as the session has een cosed it

can e processed

The interna tae $ith the structure 2ATA can ony contain atch input data for one singe

transaction run So the individua transactions are inserted into the atch input session in a oop

using severa 23INS7ampT cas

copy SAP AG BC420 12-53

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 5488

024

983209 SAP AG 2001

9unction Module DltP1ltBRUP

ALL 9UTI DltP1ltBRUPALL 9UTI DltP1ltBRUP

1PRTIB

LI1T client

BRUP session name

ELDDAT1 loc+ date

=11P delete flag

US1R bdc user name

R1RD recording

IMPRTIB

NID internal session +e(

11PTIS

1PRTIB

LI1T client

BRUP session name

ELDDAT1 loc+ date

=11P delete flag

US1R bdc user name

R1RD recording

IMPRTIB NID internal session +e(

11PTIS

-ith the function modue 235P7N3ltamp54P you can open a atch input session

The foo$ing parameters are mandatory

2+I7NT (cient)

ltamp54P (session name)

4S7amp (user name)

Note The 4S7amp must a$ays e specified This user name is reuired for processing the session

in atch mode

The foo$ing parameters are optiona

=5+AT7 specifies the eariest date on $hich the session can e started677P fag specifies $hether session shoud e deeted after it has een successfuy processed The

677P fag is ignored if the session contains errors

677P E K K means deete the session after processing (defaut vaue) H

677P E KGK means do not deete session

amp725amp E KGK ao$s you to create a recording instead of a I session

If gtI is specified the function modue returns the interna session ey This is needed to e ae to

differentiate sessions that have the same name

-ith 7G27PTI5NS you get various return vaues that can e ueried $ith SC9S4amp2

Note In onine mode the onine user is used for the authoriDation checs regardess of the user

name specified

copy SAP AG BC420 12-54

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 5588

022

983209 SAP AG 1999

Subprogram P1ltBRUP

P1ltBRUP

FOR( oen8rou-IF e9on -

2A FUN2TION BD2O)ENGROU) E)ORTING 2IENT lt1mandt GROU) 8rou USER uer KEE) kee

=ODDATE gtolddate-

ENDIF-ENDFOR(-

Include

DR16

The suprogram 5P7N3ltamp54P opens the atch input session

copy SAP AG BC420 12-55

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 5688

028

983209 SAP AG 1999

9unction Module DltIS1RT

ALL 9UTI DltIS1RTALL 9UTI DltIS1RT

IMPRT

TD1 Transaction code

PSTltLAL Update locall(

PRITIB print list

TAL1S DPRTA bdclttable

11PTIS

IMPRT

TD1 Transaction code

PSTltLAL Update locall(

PRITIB print list

TAL1S DPRTA bdclttable

11PTIS

-ith the function modue 23INS7ampT you can add transaction data to the session

Cou need an interna 2 tae to transfer the data

The foo$ing parameters are mandatory

T257 Transaction code

CNPamp5TA 2 tae

The foo$ing parameters are optiona

P5ST3+52A+ E KGK activates oca updating This means that the data to e updated is ept in the

appication server and updated in the ast step of the transaction This does not invove the update

process (For more information see course 28 Programming ataase 4pdates)

PampINTINlt E KGK 9 ists processed in I $i e printed immediatey -ith 7G27PTI5NS you get various return vaues that can e ueried $ith SC9S4amp2

copy SAP AG BC420 12-56

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 5788

023

983209 SAP AG 1999

Subprogram DltTRASATI

DltTRASATI

FOR( BD2TRANSA2TION USING tcode-

IF e9on -2A FUN2TION BD2INSERT

E)ORTING T2ODE tcode TABES D0N)ROTAB bdcdata-

ESE-

ENDIF-ENDFOR(-

T

Include

DR16

The suprogram 23TampANSA2TI5N moves the fied 2 tae either to a atch input session

or uses ca transaction to import the data into the system 5n the seection screen you can specify

$hether you $ant to create a session or you $ant to use ca transaction to process the data directy

The S7SSI5N fied is then set according to your seection

copy SAP AG BC420 12-57

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 5888

025

983209 SAP AG 1999

9unction Module DltLS1ltBRUP

ALL 9UTI DltLS1ltBRUP

11PTIS

TltP1 6

NU1U1lt1RRR amp

-ith the function modue 232+5S73ltamp54P you can cose a atch input session

In 7G27PTI5NS you get various return vaues that can e ueried $ith SC9S4amp2

copy SAP AG BC420 12-58

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 5988

027

983209 SAP AG 1999

Subprogram LS1ltBRUP

FOR( cloe8rou-IF e9on -cloe batcgt 9nut 8rou

2A FUN2TION BD22OSEGROU)-

ESE-IF e8rouoened -

2A FUN2TION BD22OSEGROU)-

ENDIF-ENDIF-

ENDFOR(-

LS1ltBRUPlose session

lose error session

Include

DR16

The suprogram 2+5S73ltamp54P coses the atch input session The suprogram differentiates

et$een a norma I session (S7SSI5N E G) and a session opened $hen ca transaction

encountered an error (73ltamp54P35P7N7 E G)

copy SAP AG BC420 12-59

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 6088

080

983209 SAP AG 1999

Subprograms DltDPRG Dlt9I1LD

DltDPR

Dlt9I1LD

FOR( bdc9eld USING nam al-IF al 34 nodata-2EAR bdcdata- bdcdata1nam nam- bdcdata1al al- A))END bdcdata-ENDIF-

ENDFOR(-

FOR( bdcdltnro USING ro8ram dltnro- 2EAR bdcdata-Bdcdata1ro8ram ro8ram-Bdcdata1dltnro dltnro-Bdcdata1dltnbe89n - A))END bdcdata-ENDFOR(-

Include

DR16

The incude 2amp72GG contains t$o suprograms 23CNPamp5 and 23FI7+

Suprogram 23CNPamp5 fis the 2 tae $ith program names and screen numers

Suprogram 23FI7+ fis the 2 tae $ith fied names and vaues

7ach suprogram creates an entry in the 2 tae

copy SAP AG BC420 12-60

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 6188

086

983209 SAP AG 1999

9illing the D Table

erorm bdcdltnro u9n8 SA)(FD +- erorm bdc9eld u9n8 BD22URSOR RFD1BUKRS- erorm bdc9eld u9n8 BD2OK2ODE 6- erorm bdc9eld u9n8 RFD1BUKRS record1BUKRS- erorm bdc9eld u9n8 RFD1KTOKD record1KTOKD-

erorm bdcdltnro u9n8 SA)(FD -

erorm bdc9eld u9n8 BD22URSOR KNA1S)RAS- erorm bdc9eld u9n8 BD2OK2ODE 6- erorm bdc9eld u9n8 KNA1NA(E record1NA(E-

erorm bdc9eld u9n8 KNA1SORT record1SORT-

Recording Benerated automaticall(

from the recording

)ERFOR( bdcdltnro USING SA)(FD +- )ERFOR( bdc9eld USING BD22URSOR RFD1BUKRS-)ERFOR( bdc9eld USING BD2OK2ODE 6-)ERFOR( bdc9eld USING RFD1BUKRS record1BUKRS-)ERFOR( bdc9eld USING RFD1KTOKD record1KTOKD-

)ERFOR( bdcdltnro USING SA)(FD -

)ERFOR( bdc9eld USING BD22URSOR KNA1S)RAS-)ERFOR( bdc9eld USING BD2OK2ODE 6-)ERFOR( bdc9eld USING KNA1NA(E record1NA(E-

)ERFOR( bdc9eld USING KNA1SORT record1SORT- ---

The 2 tae is fied $ith data from the recording The suroutines 23CNPamp5 and

23FI7+ are used for this

The suroutines are caed in the reuired structure or seuence

copy SAP AG BC420 12-61

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 6288

08amp

983209 SAP AG 1999

erie)

SAPDatabase

SeJuential9ile

SAPDatabase

ALL TRASATIALL TRASATI

SeJuential9ile

ATE IPUTATE IPUT

D TableD TableD TableD Table

I Monitor

T

In contrast to atch input you can use ca transaction to directy pass data to the diaog interface

$ithout using a atch input session Cou use an interna tae (2 tae same structure and ayout

as atch input) to temporariy store your screen data Then you ca the desired transaction in your

program

Note 5n average the 2a Transaction method is 8 to times faster than using atch Input

copy SAP AG BC420 12-62

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 6388

08

983209 SAP AG 1999

all Transaction Program$ 1ample

RE)ORT abcbdcdcdeb9ct-

)ARA(ETERS d9mode DEFAUT A

udmode DEFAUT S-FOR( calltranact9on-2A TRANSA2TION FD

USING bdcdata (ODE d9mode

U)DATE udmode-

IF lt1ubrc NE - 5RITE 6 ---

ENDIF-ENDFOR(-

Screen

00

Screen

100

Screen

An additiona system ro area is added for the caed transaction The system uses this area for

processing the individua screens in the transactionH the data from the tae is added here After the

transaction is processed the second ro area is reeasedH the system continues processing in the first

ro area

Notes

In contrast to atch input there is no error ogging (error sessions) here For processing the caed

transaction the system uses the authoriDations of the user that caed the transaction The 2 tae

can ony hod data for one transaction run at a time efore another transaction is caed and its data

can e added you must eecute a amp7Famp7S= for the 2 tae

copy SAP AG BC420 12-63

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 6488

084

983209 SAP AG 1999

ALL TRASATI C6

RE)ORT 777-

2A TRANSA2TION FD USING bdcdata (ODE E-

Default for MD1 is A

2A TRANSA2TION 3tranact9oncode4 USING 3bdc1table4 C (ODE A E N C-

-ith the parameter 57 you can seect a specific dispay mode for processing the transaction The

foo$ing three modes are avaiae

A (ispay a)

If you eecute the program a the screens and a their data are dispayed This is the defaut vaue

for the 57 in 2A++ TampANSA2TI5N

N (ispay nothing)

The screens are not dispayed at a regardess of $hether any of them contained errors As soon as

the transaction has een fuy processed contro is returned to your program (The vaue of the

parameter 4PAT7 determines $hether dataase updates are eecuted or not)

7 (ispay errors ony)As soon as an error occurs in a screen the transaction is s$itched to dispay mode so that you can

correct the errors

These dispay modes are the same as those in the atch input session processing

copy SAP AG BC420 12-64

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 6588

082

983209 SAP AG 1999

RE)ORT 777-

2A TRANSA2TION FD USING BD2DATA U)DATE -

ALL TRASATI Camp

RE)ORT 777-

2A TRANSA2TION FD USING bdcdata U)DATE -

2A TRANSA2TION 3tranact9oncode4 USING 3bdc1table4 C (ODE A E N C U)DATE A S C -

Default for UPDAT1 is A

-ith the parameter 4PAT7 you can contro ho$ dataase updates arising from a transaction are

carried out There are three options

A (asynchronous updating) The caed transaction does not $ait unti the dataase has een

updated it simpy for$ard the updates to the SAP update service This usuay speeds up the 2T

program This processing mode is N5T recommended for arge data sets as the caed transaction

does not receive a competion message from the update modue

The caing 2T program therefore cannot te if the transaction has een successfuy competed Cou

shoud use the updating administration function (transaction S8) to determine $hether updating

$as terminated eary The error anaysis correction functions for are ess hepfu than $ith

synchronous updating

S (synchronous updating) -ith synchronous updating the caed transaction $aits unti a the

updates have een competed So processing is so$er than $ith synchronous updating The caed

transaction can ho$ever report any updating errors to the program $hich maes error

anaysiscorrection easier

+ (local updating) $ith oca updating the dataase is not updated in a separate process it is

updated in the caers process (see appication hep documentation for the AAP ey$ord S7T

4PAT7 TAS6 +52A+)

copy SAP AG BC420 12-65

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 6688

088

983209 SAP AG 1999

ALL TRASATI C

RE)ORT 777-DATA mtab T0)E TABE OF bdcm8coll-

2A TRANSA2TION FD USING bdcdata (ESSAGES INTO mtab-

2A TRANSA2TION 3tranact9oncode4 USING 3bdc1table4 C (ODE A E N C U)DATE A S C (ESSAGES INTO 3metab4 C -

7SSAlt7S specifies that a system messages that are output during the eecution of a 2A++

TampANSA2TI5N are $ritten to the interna tae L7SSTA The interna tae must have the

structure 2Slt25++

4nie the cassica atch input processing $ith sessions 2A++ TampANSA2TI5N does not offer any

specia processing procedures for transactions containing errors There are no restart functions for

transactions that contain errors or that cause updating terminations

copy SAP AG BC420 12-66

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 6788

083

983209 SAP AG 1999

ALL TRASATI C4

RE)ORT 777-DATA mltot T0)E ctuaram-

2A TRANSA2TION FD USING BD2DATA

O)TIONS FRO( mltot-

2A TRANSA2TION 3tranact9oncode4 USING 3bdc1table4 C (ODE A E N C U)DATE A S C (ESSAGES INTO 3metab4 C O)TIONS FRO( ot C -

RE)ORT 777-DATA mltot T0)E ctuaram-2A TRANSA2TION FD USING bdcdata

O)TIONS FRO( mltot-

The addition 5PTI5NS enaes the ca transaction statement to e controed through a structure

The structure must have the dictionary type 2T43PAampAS

The addition 5PTI5NS Famp5 must not e comined either $ith the addition 57 or $ith

4PAT7 ore information on the net side

copy SAP AG BC420 12-67

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 6888

085

983209 SAP AG 1999

Structure TUltPARAMS

DISMD1 Procen mode anaoo o addon amp

UPDMD1 $pdae mode anaoo o addon $PA

ATTMD1 CA mode CA conro

D19SI1 orce de=a EndoE e drn procen

RAMMIT +o eD a Camp amp(

IPT +o a ac np eonF a F S-B+P SPAC

I1D +o a ac np eon a=er end o= BC daa

The components are defined as foo$s

The components 7FSIM7 ampA25IT N5INPT and N5I7N can have the foo$ing

vaues KGK E Ces or K K E No

If the addition 5PTI5NS Famp5 is not specified the foo$ing settings appy to the contro

parameters

IS57 from addition 57

4P57 from addition 4PAT7

2ATT57 2ATT not active

7FSIM7 o not not use defaut $indo$s siDe

ampA25IT Successfu eit at 25IT -5amp6

N5INPT atch input session active (SC9INPT E G)

N5I7N atch input session sti active after end of 2 data

copy SAP AG BC420 12-68

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 6988

087

983209 SAP AG 1999

SMSBID Message ID

SMSBT Message T(pe C1GIGWGSGA

SMSB Message umber

SMSB6 Message ariable 6

SMSBamp Message ariable amp

SMSB Message ariable

SMSB4 Message ariable 4

SMSBID Message ID

SMSBT Message T(pe C1GIGWGSGA

SMSB Message umber

SMSB6 Message ariable 6

SMSBamp Message ariable amp

SMSB Message ariable

SMSB4 Message ariable 4

Return code$

S(stem fields$

alue Meaning

0 Successful

6000 1rror in transaction

6000 1rror in processing call transaction

see also the s(stem fields specified

alue Meaning

0 Successful

6000 1rror in transaction

6000 1rror in processing call transaction

see also the s(stem fields specified

9ield name Meaning9ield name9ield name MeaningMeaning

Return ode and S(stem 9ields

The return code is used to specify $hether the caed transaction $as processed successfuy In

addition severa system fieds are fied The numer I type and variaes of the diaog message

output y the caed transaction Cou need this information to output the message tet

copy SAP AG BC420 12-69

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 7088

030

983209 SAP AG 1999

Benerated Program of the TA Recorder

REFRES= (ESSTAB-

2A TRANSA2TION tcode USING bdcdata (ODE ctumode U)DATE cudate (ESSAGES INTO metab-OO) AT metab- ENDOO)-IF lubrc 34 AND e8rou 34 S)A2E- IF e8rouoenend - 2A FUN2TION BD2O)ENGROU) E)ORTING ---------

--------- E8rouoened - ENDIF- 2A FUN2TION BD2INSERT E)ORTING T2ODE tcode TABES D0N)ROTAB bdcdata-ENDIF-REFRES= bdcdata-

Message table output

pen error session

Insert data record that

has errors into error

session

If you have seected ca transaction on the seection screen the generated program runs as foo$s

The onine transaction is caed $ith ca transaction and passed to tae 2ATA A the

messages arising during the ca transaction are put in the interna tae 7SSTA

7SSTA is output as a ist

If you have specified an error session ( 73ltamp54P L SPA27) on the seection screen and the

ca transaction comes across an error (+3S4amp2 L 0) the error session is opened The error

session is ho$ever ony opened once Then the data record is paced in the session

A the other data records that have errors $ith ca transaction are paced in the same session

copy SAP AG BC420 12-70

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 7188

036

983209 SAP AG 1999

The Transaction Recorder

PrinciplesPrinciples

Recording )ith the LSMWRecording )ith the LSMW

Principles of atch Input and all TransactionPrinciples of atch Input and all Transaction

Integrating the TA Program into the DWIntegrating the TA Program into the DW

Using the TA Recorder Using the TA Recorder

copy SAP AG BC420 12-71

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 7288

03amp

983209 SAP AG 1999

Integrating into the DW

Transfer program

AAP Dictionar(

Integrate

SDA0

SDA6

SDAamp

SDA

Cou can integrate the generated program into the G9- The structure of the fie must e created

in the AAP ictionary The taes SGA0 SGA8 SGA1 and SGA $i e fied

copy SAP AG BC420 12-72

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 7388

03

983209 SAP AG 1999

DW Release 42

Goo

-B eeae 45

aa ran=er ogtec

Int customer data transfer ob-ect

ecord =ed

Dece daa ran=er

d Goo

The ampunction ampor interatin TA recorder prora$s is

i$ple$ented in the

D+-B in Release

The recorder can e integrated as of ampeease and it is provided in the G9- ampeease

ltot to the G9- ampeease 5n the initia screen you can integrate programs y choosing ampoto

( +nt customer ata transfer o-ect

copy SAP AG BC420 12-73

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 7488

034

983209 SAP AG 1999

reating Program as D b-ect

Comer ran=er ogtec

ampgtec ype

Sor eD =or ogtec

aa ran=er proram

Srcre name

9900

(+A1

Cane comer

ZBCA+G

ZB

ustomer transfer ob-ect

umber bet)een 7000 and 7777

b-ect t(pe

Assignment to R ob-ect

Short tet for D ob-ectShort description

Data transfer program

ame of generated program

Structure name

A structure Cstructure la(out )ith this name is created in

the AAP Dictionar(

For ampeease transfer oects $ere not organiDed y 5amp oects ut y a G numer (00089

OOOO) The numer range O0009OOOO is reserved for customers

To create a connection to the ne$ G 9- you must assign the program to a 5amp oect

2reate a short tet for the G oect This tet $i appear in the method seection ist

Specify the program to e incuded

Specify a name for the structure to e created in the AAP ictionary

Note $he generated program appears under program type +N and not under program type

-

copy SAP AG BC420 12-74

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 7588

032

983209 SAP AG 1999

Adantages

Automatic program registration in the DW in

Release 48

ou can use all the functions defined for

standard ob-ects

1ception$ The (reate ampile ith data

function

If you incuded the oect in the ampeease $orench it is automaticay avaiae in the ampeease

B $orench

A the $orench functions are avaiae for your oect ecept for Create files ith transfer ata

copy SAP AG BC420 12-75

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 7688

038

983209 SAP AG 1999

ou are no) able to$

The Transaction Recorder$ Unit Summar(

Use the recording function in the LSMW to create

a batch input session )ith the data from the

eternal s(stem

Use the TA Recorder to create (our o)n data

transfer program

Anal(e programs that )or+ )ith batch input or

call transaction

Integrate the TA Recorder programs into the

DW

copy SAP AG BC420 12-76

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 7788

ercise 1

nit $ -ecorder

$opic 2reating etors

$ransaction -ecorder ercise 1

bull 2reating detors $ith eterna numer assignment

bull etor numers M9980008 to M9980080

Address data for detors $ith eterna numer assignment is to

e transferred using program ampFI700

ro4ect F5

Supro4ect +5

-un +575

$as)s 85 95 8S25

9oad program -F+00

8 In the foo$ing eercises eisting data is to e changed Therefore these detors $ith

eterna numer assignment have to first e created

898 4nder suproect 79 create run 797G9 $ith the name Detors ith

eternal numers

copy SAP AG BC420 12-77

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 7888

891 2reate the foo$ing three tass The tass map the foo$ing process steps

convert data create + session and process + session

89198 In run 797G9 create the foo$ing tas

9 Tas AP9

9 Name 2onvert data 9 Tas type AP

9 Program type +S-

Seect the foo$ing +S- oect

+S- proect 2109

+S- suproect 7I9

+S- oect I997GT

89191 In run 797G9 create the foo$ing tas 9 Tas +5A9

9 Name 2reate I session

Tas type +5A

9 Program type INP

Seect program ampFI700 $ith the variant

I97G9

8919 In run 797G9 create the foo$ing tas

9 Tas S29

9 Name Process I session Tas type S2

9 Program type amp7P5

Seect program ampS2S4 $ith the variant

S497G9

Note that you have to correct the seuence of the tass 2onvert data

create + session and process + session

4se the uttons

89 Start the run

The detors $i e created $ith eterna numer assignments

89 2hec in transaction F0 that the detors M9980008 to M9980080 have een

created

copy SAP AG BC420 12-78

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 7988

ercise

nit $ransaction -ecorder

$opic -ecording function in the 9S8(

bull 2reate a recording using the +S-

bull ltenerate a atch input session

2hange the detor address data in the amp System

Name of the recording +

Name of the file +2055+F9

8 2reate the recording 7I3 using the +S- ampecord the transaction F01 (2hange

detor)

898 efore you create the recording first test the transaction onineQ

For the recording use detor M9980008 5n the initia screen of the F01

maintain the foo$ing fieds ony

etor etor M9980008

2ompany code 0008

Address data seect

Note $he data record must e saved hile recording

891 aintain the names and the descriptions for the foo$ing fieds

Name city street posta code and teephone numereete a other fieds in screen 880 from the recording (eg S5ampT+ +AN8

SPampAS)

4se the same technica names as sho$n in the tae eo$ (automatic fied

mapping)

copy SAP AG BC420 12-79

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 8088

1 2reate the suproect 7I9 and the ne$ oect TA3 in your proect 2109

aintain the oect attriutes and seect the item atch input recording Seect your

recording 7I3

2reate the source structure address

2reate the source fieds according to the tae eo$ 5r copy them from proect 2109S37N suproect 7I900 oect TA900

198 Fie setup The data from the egacy system are dispayed in the foo$ing tae

Fied name Fied type Fied ength escription

N5 2 8B etor numer

NA7 2 Name

STamp77T 2 Street

2ITC 2 2ityPace of residence

MIP 2 80 Posta code

T7+ 2 8B Teephone numer

191 aintain the fied mapping 4se the automatic fied mapping (via menu item

7tras)

19 Specify the fies 5ny maintain the fie name of the source fie

Name of the fie 21099IFI+7

2odepage 8800

19 Import the data and convert them ispay the data in each caseQ

19 2reate a atch input session

19B ampun the atch input session

copy SAP AG BC420 12-80

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 8188

ercise 3

nit $ransaction -ecorder

$opic -ecording ith the $ -ecorder

bull ltenerate a recording using the TA recorder

bull Test the recording

2hange the address data of detors in the amp system

Name recording $+

Name of the file +2055+F9

8 2reate the recording TA37I3 using the transaction recorder ampecord the

transaction F01 (change detor)

898 4se detor M9980008 for the recording 5n the F01 initia screen ony

maintain the foo$ing fieds

etor etor M9980008

2ompany 2ode 0008

Address data seect

Note $he data record must e saved hen recording

eete a fieds that do not eist in the source fie 21099IFI+7 from screen

880 in the recording (eg 6NA89S5ampT+ 6NA89+AN8 6ANNQ9SPampAS) Note o not deete fieds ampF01946ampS and ampF0190880

Save the recording no$

1 S$itch to the recordings overvie$

198 Process the recording $ith the processing mode A (dispay a)

191 Process the recording $ith the processing mode RN (no dispay)

19 If the recording has een tested and no error has occurred generate a I session

and run it using the I monitor If an error shoud occur generate the recordingagainQ

copy SAP AG BC420 12-81

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 8288

From the recording generate the program M21037I3 in your deveopment cass

2109 Seect the foo$ing

bull ampead fied contents from fie

bull 2reate test data in the fie 2103dei3test3tt

98 Save this program and eecute it ltenerate one I session each and process it

2arry out the same steps again using the ca transaction

The generated program shoud no$ e changed so that fie 21099IFI+7 can e

read and processed

98 2hange the defaut vaue of the fie name (parameter dataset) in 21099

IFI+7

91 2hange the structure definition eete the company code fied and the address

data checo from the structure

9 2hange the su9routine ca perform dc3fied for the company code (KampF019

46ampSK) so that the vaue 0008 is transferred

9 2hange the su9routine ca perform dc3fied for the address data checo

(KampF0190880K) so that the vaue G is transferred

9 Start the program again and read the data from the fie 21099IFI+7 $ith

detor data ltenerate a I session $ith it and run it

copy SAP AG BC420 12-82

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 8388

033 Include DR16INCLUDE BDCRECX1

SELECTION-SCREEN BEGIN OF LINE

PARAMETERS SESSION RADIOBUTTON GROUP CTU create sessi SELECTION-SCREEN COMMENT $amp TEXT-S FOR FIELD SESSION

se(ecti-scree )siti +

PARAMETERS CTU RADIOBUTTON GROUP CTU ca(( trasacti

SELECTION-SCREEN COMMENT $amp TEXT-S FOR FIELD CTU

SELECTION-SCREEN END OF LINE

SELECTION-SCREEN BEGIN OF LINE

SELECTION-SCREEN COMMENT $amp TEXT-S1 FOR FIELD GROUP

se(ecti-scree )siti $+

PARAMETERS GROUP1$amp r) ae 0 sessi

SELECTION-SCREEN COMMENT $amp TEXT-S+ FOR FIELD CTUMODE

se(ecti-scree )siti

PARAMETERS CTUMODE LIE CTU2PARAMS-DISMODE DEFAULT 3N3

A4 s56 a(( 78)rs

E4 s56 78)r errr (8

N4 7 t 7is)(a8 78)r

SELECTION-SCREEN END OF LINE

SELECTION-SCREEN BEGIN OF LINE

SELECTION-SCREEN COMMENT $amp TEXT-S$ FOR FIELD USER

se(ecti-scree )siti $+

PARAMETERS4 USER1$amp DEFAULT S9-UNAME ser 0r sessi i atc5

SELECTION-SCREEN COMMENT $amp TEXT-S FOR FIELD CUPDATE

se(ecti-scree )siti

PARAMETERS CUPDATE LIE CTU2PARAMS-UPDMODE DEFAULT 3L3

S4 s8c5rs(8

A4 as8c5rs(8

L4 (ca(

SELECTION-SCREEN END OF LINE

SELECTION-SCREEN BEGIN OF LINE

SELECTION-SCREEN COMMENT $amp TEXT-S FOR FIELD EEP

se(ecti-scree )siti $+

PARAMETERS4 EEP AS CltECBOX 3 3 = 7e(ete sessi i0 0iis5e7

3X3 = gtee) sessi i0 0iis5e7

SELECTION-SCREEN COMMENT $amp TEXT-S FOR FIELD E2GROUP

copy SAP AG BC420 12-83

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 8488

se(ecti-scree )siti

)araeters E2GROUP1$amp r) ae 0 errr-sessi

SELECTION-SCREEN END OF LINE

SELECTION-SCREEN BEGIN OF LINE

SELECTION-SCREEN COMMENT $amp TEXT-S FOR FIELD ltOLDDATE

se(ecti-scree )siti $+

PARAMETERS4 ltOLDDATE LIE S9-DATUM

SELECTION-SCREEN COMMENT +11amp TEXT-S$ FOR FIELD E2USER

se(ecti-scree )siti

PARAMETERS4 E2USER1$amp DEFAULT S9-UNAME ser 0r errr-sessi

SELECTION-SCREEN END OF LINE

SELECTION-SCREEN BEGIN OF LINE

SELECTION-SCREEN COMMENT +11amp TEXT-S FOR FIELD E2EEP

se(ecti-scree )siti

PARAMETERS4 E2EEP AS CltECBOX 3 3 = 7e(ete sessi i0 0iis5e7

3X3 = gtee) sessi i0 0iis5e7

SELECTION-SCREEN END OF LINE

SELECTION-SCREEN BEGIN OF LINE

SELECTION-SCREEN COMMENT +11amp TEXT-S FOR FIELD E2ltDATE

se(ecti-scree )siti

PARAMETERS4 E2ltDATE LIE S9-DATUM

SELECTION-SCREEN END OF LINE

SELECTION-SCREEN SIP

SELECTION-SCREEN BEGIN OF LINE

SELECTION-SCREEN COMMENT 1amp TEXT-S1 FOR FIELD NODATA

PARAMETERS4 NODATA DEFAULT 33 LOER CASE 7ata

SELECTION-SCREEN END OF LINE

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

Batc5i)t7ata 0 si(e trasacti

DATA4 BDCDATA LIE BDCDATA OCCURS ITlt ltEADER LINE

essaes 0 ca(( trasacti

DATA4 MESSTAB LIE BDCMSGCOLL OCCURS ITlt ltEADER LINE

errr sessi )ee7 3 3 r 3X3amp

DATA4 E2GROUP2OPENED

essae tets

TABLES4 T1

copy SAP AG BC420 12-84

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 8588

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

at se(ecti scree

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

AT SELECTION-SCREEN

r) a7 ser st e 0i((e7 0r create sessi

IF SESSION = 3X3 AND

GROUP = SPACE OR USER = SPACE

MESSAGE E1MSamp

ENDIF

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

)e 7ataset

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

FORM OPEN2DATASET USING P2DATASET

OPEN DATASET P2DATASET IN TEXT MODE

IF S9-SUBRC

RITE4 TEXT-E S9-SUBRC

STOP

ENDIF

ENDFORM

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

c(se 7ataset

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

FORM CLOSE2DATASET USING P2DATASET

CLOSE DATASET P2DATASET

ENDFORM

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

create atc5i)t sessi

t 0r ca(( trasacti siamp

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

FORM OPEN2GROUP

IF SESSION = 3X3

SIP

RITE4 $amp 3Create r)3I1amp GROUP

SIP

)e atc5i)t r)

CALL FUNCTION 3BDC2OPEN2GROUP3

EXPORTING CLIENT = S9-MANDT

copy SAP AG BC420 12-85

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 8688

GROUP = GROUP

USER = USER

EEP = EEP

ltOLDDATE = ltOLDDATE

RITE4 amp 3BDC2OPEN2GROUP3I$amp

1$amp 3retrc7e43I+amp

S9-SUBRC

ENDIF

ENDFORM

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

e7 atc5i)t sessi

ca(( trasacti si4 errr sessiamp

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

FORM CLOSE2GROUP

IF SESSION = 3X3

c(se atc5i)t r)

CALL FUNCTION 3BDC2CLOSE2GROUP3

RITE4 amp 3BDC2CLOSE2GROUP3Iamp

1$amp 3retrc7e43I+amp

S9-SUBRC

ELSE

IF E2GROUP2OPENED = 3X3

CALL FUNCTION 3BDC2CLOSE2GROUP3

RITE4

RITE4 amp 3Fe5(era))e 6r7e eret3Iamp

ENDIF

ENDIF

ENDFORM

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

Start e6 trasacti accr7i t )araeters

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

FORM BDC2TRANSACTION USING TCODE

DATA4 L2MSTRINGamp

DATA4 L2SUBRC LIE S9-SUBRC

atc5 i)t sessi

IF SESSION = 3X3

CALL FUNCTION 3BDC2INSERT3

EXPORTING TCODE = TCODE

TABLES D9NPROTAB = BDCDATA

RITE4 3BDC2INSERT3Iamp

copy SAP AG BC420 12-86

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 8788

TCODE

3retrc7e43I+amp

S9-SUBRC

3RECORD43

S9-INDEX

ca(( trasacti si

ELSE

REFRESlt MESSTAB

CALL TRANSACTION TCODE USING BDCDATA

MODE CTUMODE

UPDATE CUPDATE

MESSAGES INTO MESSTAB

L2SUBRC = S9-SUBRC

RITE4 3CALL2TRANSACTION3

TCODE

3retrc7e43I+amp

L2SUBRC

3RECORD43

S9-INDEX

LOOP AT MESSTAB

SELECT SINGLE FROM T1 ltERE SPRSL = MESSTAB-MSGSPRA

AND ARBGB = MESSTAB-MSGID

AND MSGNR = MESSTAB-MSGNR

IF S9-SUBRC =

L2MSTRING = T1-TEXT

IF L2MSTRING CS 313

REPLACE 313 ITlt MESSTAB-MSGH1 INTO L2MSTRING

REPLACE 3$3 ITlt MESSTAB-MSGH$ INTO L2MSTRING

REPLACE 33 ITlt MESSTAB-MSGH INTO L2MSTRING

REPLACE 33 ITlt MESSTAB-MSGH INTO L2MSTRING

ELSE

REPLACE 33 ITlt MESSTAB-MSGH1 INTO L2MSTRING

REPLACE 33 ITlt MESSTAB-MSGH$ INTO L2MSTRING

REPLACE 33 ITlt MESSTAB-MSGH INTO L2MSTRING

REPLACE 33 ITlt MESSTAB-MSGH INTO L2MSTRING

ENDIF

CONDENSE L2MSTRING

RITE4 MESSTAB-MSGT9P L2MSTRING$+amp

ELSE

RITE4 MESSTAB

ENDIF

ENDLOOP

copy SAP AG BC420 12-87

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 8888

SIP

Eree 0e5(era))e

IF L2SUBRC AND E2GROUP SPACE

IF E2GROUP2OPENED = 3 3

CALL FUNCTION 3BDC2OPEN2GROUP3

EXPORTING CLIENT = S9-MANDT

GROUP = E2GROUP

USER = E2USER

EEP = E2EEP

ltOLDDATE = E2ltDATE

E2GROUP2OPENED = 3X3

ENDIF

CALL FUNCTION 3BDC2INSERT3

EXPORTING TCODE = TCODE

TABLES D9NPROTAB = BDCDATA

ENDIF

ENDIF

REFRESlt BDCDATA

ENDFORM

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

Start e6 scree

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

FORM BDC2D9NPRO USING PROGRAM D9NPRO

CLEAR BDCDATA

BDCDATA-PROGRAM = PROGRAM

BDCDATA-D9NPRO = D9NPRO

BDCDATA-D9NBEGIN = 3X3

APPEND BDCDATA

ENDFORM

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

Isert 0ie(7

Page 21: BC420_46C - 012The Transaction Recorder

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 2188

0amp6

983209 SAP AG 1999

hanging ustomer Data$ Initial Screen

9ield ontents

BCC$Samp $SZAV

BCamp(Camp )00

02-($++ -88-10000

02-0110

02-0130

$SZAV

9ield ame

Comer

Company code

Z-88-10000

Genera daa

Comer Z-88-10000

+ame

9ield ontents

BCamp(Camp $PA

BCS$BSC SAPSZA1 0300ASS

BCS$BSC SAPSZA1 0301Camp$

BCC$Samp SZA10100-+$B

A1AA-S Garden Sree

A1AA-amp$S+$1 34

A1AA-PampSCamp1 02105

9ield ame

Screen

111

Screen

106

In the aove eampe the transaction Change customer F01 is recorded

Note

You must ma)e some modification to the field values for all the fields you ant to capture

for the data transfer For the purposes of recording a change can simply mean overriting

one single character in a field ith the same character

ven if fields are to e filled using S$amp$ parameters the values must still e changed on

the screen in order to capture them

(ith online transactions screen sequences may appear that are different than in the

recording

copy SAP AG BC420 12-21

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 2288

0ampamp

983209 SAP AG 1999

Results

RecordingRecording R1lt6 Demolt6

9D0amp hange customer Caccounting

SAPM90ampD 0608

DltURSR R90ampD=UR

Dlt=D1 gt00

R90ampD=UR 5560000

R90ampDD0660

US1ltA

SAPM90ampD 0666

Dlt=D1 UPDA

DltSUSR SAPLSA6

DltSUSR SAPLSA6

DltURSR SA6ltD0600T1LltUM1

ADDR6ltDATASTR11T 4 Barden Street

ADDR6ltDATAPSTltD1 0amp602

ADDR6ltDATAIT6 oston

SA6ltD0600T1LltUM1 8638257755

The resuts of the recording using the +S- are dispayed in a tree structure

After the recording has finished you can edit it Cou can deete fieds or add ne$ ones

copy SAP AG BC420 12-22

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 2388

0amp

983209 SAP AG 1999

Assigning 9ield ames

Recording R16 Demolt6

Dlt=D1 UPDA

DltSUSR SAPLSA6

DltSUSR SAPLSA6

DltURSR SA6ltD0600T1L

ADDR6ltDATAAM16 Lisa Eofmeister

ADDR6ltDATAPSTltD1 0amp602

ADDR6ltDATAIT6 oston

ame

+ame

ecrpon

e=a ae

A1AA-+A1

A1AA-+A1

Comer name

a o=meer

Screen =ed

ustomer name

double clic+

Cou can assign names for each recorded fied The specia fieds (2356257 2324ampS5amp

and 23S4S2amp77N) are not incuded here Cou can choose the fied names -hen the atch

input session is created the contents of these fieds are assigned to the target fieds specified in the

eft coumn

Functions

efaut Assigns to the fied names of the underying target fied and its fied description

ampeset eetes fied name and fied description

oue cic 7dits fied name fied description and defaut vaue

Note Cou can use fied names more than once =o$ever the fied name is ony avaiae once in thefied mapping For this reason it is not practica to use fied names more than once

For a those fieds for $hich you do not assign a name the defaut vaue is used $hen the atch

input session is created These defaut vaues can e seen as constants This is especiay usefu for

chec oes (for eampe 08 vie$ seection)

The +S- supports automatic fied mapping Source fieds and target fieds can e assigned to each

other automaticay The fieds are assigned to the corresponding fieds of the same name Therefore

the fied names of the source structure shoud e given the same or simiar names as the fied names

in the target structure

copy SAP AG BC420 12-23

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 2488

0amp4

983209 SAP AG 2001

Addinggtremoing screen fields

Repeating recording

9or identical field names the name and description are

assigned automaticall(

1diting Recording

02-($++

(+A1-A+

(+A1-+A1

(+A1-Samp

(+A1-+A2

(+A1-SAS

Comer accon nmer

e

+ame 1

Sor =ed

+ame 2

Sree

Selection of all

aailable screen

fields

Cou can ater add ne$ screen fieds if you need to 6eep in mind that fieds shoud ony e added in

paces $here they are aso provided on the screen other$ise you $i get an error $hen the I

session is processed

After saving you $i get the message The data has een saved successfuy No$ the recordings

are avaiae for the oect attriutes

If you repeat the recording you can record a ne$ screen seuence $ith ne$ fieds Provided that the

fied names (eg 6NA89NA78) are identica the names and descriptions are automaticay

assigned

copy SAP AG BC420 12-24

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 2588

0amp2

983209 SAP AG 1999

b-ect T(pe and Import Method$ Recording

Standard atch Input gt Direct Input

atch Input Recording

API

IDoc

ampgtec ype ) mpor meod

Bac np recordn

ecordn ec1

The recording is no$ avaiae $ith the oect attriutes

Net you create a proect or su9proect in the +S- and specify process the data transfer

Cou eecute the data transfer as in the standard system

efine the source fieds and structures

efine the fied mapping

ampead and convert the data

2reate and import a atch input session

copy SAP AG BC420 12-25

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 2688

0amp8

983209 SAP AG 1999

The Transaction Recorder

PrinciplesPrinciples

Recording )ith the LSMWRecording )ith the LSMW

Principles of atch Input and all TransactionPrinciples of atch Input and all Transaction

Integrating the TA Program into the DWIntegrating the TA Program into the DW

Using the TA Recorder Using the TA Recorder

copy SAP AG BC420 12-26

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 2788

0amp3

983209 SAP AG 1999

Transaction Recorder

Online

Transaction

RecordingTransfer Program

T

Included in the Batch Input Monitor

Cou use the transaction recorder to record transactions and then use the transaction recording to

generate a transfer program The program ao$s you to transfer data using either atch input or ca

transaction

copy SAP AG BC420 12-27

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 2888

0amp5

983209 SAP AG 1999

hanging ustomer Data$ Initial Screen

9ield ontents

BCC$Samp $SZAV

BCamp(Camp )00

02-($++ Z-88-10000

02-0110

02-0130

$SZAV

9ield ame

Comer

Company code

Z-88-10000

Genera daa

Comer Z-88-10000

+ame

9ield ontents

BCamp(Camp $PA

BCS$BSC SAPSZA1 0300ASS

BCS$BSC SAPSZA1 0301Camp$

BCC$Samp SZA10100-+$B

A1AA-S Garden Sree

A1AA-amp$S+$1 34

A1AA-PampSCamp1 02105

9ield ame

Screen

111

Screen

106

In the aove eampe the transaction Change customer F01 is recorded

copy SAP AG BC420 12-28

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 2988

0amp7

983209 SAP AG 2001

hange Debitor$ Pa(ment Transactions C6

Banlt dea

Screen

10

9ield ontent

BCC$Samp (+B(-BA+(+01

BCamp(Camp BA+((+B(-BA+(S01

(+B(-BA+(01 12345679

(+B(-BA+(+01 22222222

Debitor 5560000

9ield ame

Inde

copy SAP AG BC420 12-29

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 3088

00

983209 SAP AG 1999

hanging ustomer Data$ Pa(ment Transactions Camp

Addre

an+ countr( US

an+ code 6amp42837

Banlt dea

ustomer 5560000

9ield ontents9ield ame

BCC$Samp (+A1-(+ZA

BCamp(Camp $PA

(+B(-Z01

Screen

10

Screen

100

SAPLBA

9ield ontents

BCC$Samp B+(A-BA+(A

BCamp(Camp +

B+(A-BA+(A +aona Banlt

9ield ame

In different transactions the modue poo may change This is the case $ith for eampe customer

master data The TA recorder records modue poo changes automaticay

copy SAP AG BC420 12-30

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 3188

06

983209 SAP AG 1999

Eierarch( Displa( of the Recording

02amp

02

SAP02 0106

BCC$Samp 02-0130

BCamp(Camp )00

02-($++ -88-10000

02-0110

02-0130

SAP02 0111

BCamp(Camp V

BCC$Samp A1AA-amp$S+$1

A1AA-S Garden Sree

Recording

-ith the TA recorder the resuts are aso a ist in a hierarchy dispay =o$ever you cannot assign

your o$n fied names as you can in the +S-

copy SAP AG BC420 12-31

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 3288

0amp

983209 SAP AG 1999

Recording erie)

Recording

Transfer program

9unction module

ontains onl( the data

from the recording

Test data

Test

reate

reate

reate

reate

1dit hange recording

Process recording

Cou can edit the recording as needed

The recording can e tested and eecuted again The screens are run through in the same $ay as in

the recording

The recording can then e used to create

atch input sessions

Test data

ata transfer programs $ith atch input or ca transaction

Function modues

copy SAP AG BC420 12-32

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 3388

0

983209 SAP AG 1999

1 02 BS

2 SAP02 106

3 BCC$Samp $SZAV

4 BCamp(Camp )00 5 02-($++ -88-10000

6 02-0110

7 02-0130

8 $SZAV

9 SAP02 111

10 BCamp(Camp V

11 BCC$Samp A1AA-amp$S+$1

12 A1AA-S Garden Sree

Program Screen St 9ield ame 9ield alue

Recording 1ditor

Recording

Add gt delete lines 9ormat chec+

Import gt eport of recording

In the editor you can add or deete ines Cou can aso change the contents of individua ines

-ith the function Chec) you can specify $hether the edited version of the recording sti has the

correct synta

Cou can aso eport import recordings to from a seuentia fie

After editing save the recording changes

copy SAP AG BC420 12-33

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 3488

04

983209 SAP AG 1999

Recording Seeral Transaction Runs

RecordingF

Directl( after the first recordingG or

In the displa( mode of the recording

In this step you can record additiona transactions and add additiona transaction runs to the

recording

Cou can record the additiona transactions directy after a recording or in the edit screen of a

recording

copy SAP AG BC420 12-34

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 3588

02

983209 SAP AG 1999

1ditor$ Importing and 1porting Recordings

6 T 9D0amp S

amp SAPM90ampD 608

DltURSR

4

2

8 SAPM90ampD 666

60

66

Program Screen St 9ield name 9ield alue

cempA

e name

aa =orma

cemp

A

e name

aa =orma

1port

Import

Presentation Serer

If the editor functions in the systems do not provide a the functions you need you can do$noad the

recording to your presentation server using the Eort function and then edit the recording using a

P2 editor

Cou use the Import function to import the data ac into the amp System ae sure the fie is sti in

the correct format

copy SAP AG BC420 12-35

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 3688

08

983209 SAP AG 1999

Processing the Recording

Recording

Process )ith ALL TRASATI

Parameer

Proce mode$pdae mode

CA mode

e=a e

Con a=er comm

+o a B eon

nd +o a B mode

A

A

T

The recording can e eecuted directy The data from the recording is used and the transaction is

processed $ith ca transaction

2a transaction provides a range of options for caing appication transactions $hich are discussed

on the foo$ing t$o pages

copy SAP AG BC420 12-36

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 3788

03

983209 SAP AG 1999

Process mode

Update mode

ATT mode

Processing Recording )ith T 6

A

1

Displa( all screens

Displa( errors onl(

o displa(

L

S

A

Local

S(nchronous

As(nchronous

A

o ATT

ATT )ithout indiidual screen control

ATT )ith indiidual screen control

Processing mode

=ere you can specify the processing mode 9 it is the same as the processing mode for atch input

4pdate mode

=ere you can specify the update mode For more information see the unit ca transaction

2ATT mode

=ere you can mae specia settings if you $ant to test the recording under 2ATT conditions (ony

necessary for 2ATT runs) Specia functions are caed in the 2ATT too for each screen at the end of

P5 and at the start of PAI

copy SAP AG BC420 12-37

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 3888

05

983209 SAP AG 1999

Default sie

ont after commit

ot a I session

1nd$ ot a I mode

Processing Recording )ith T amp

The screen standard sie is used for the

processing

ommit )or+ does not end the processing

o I mode is actie The transaction )ill run

through as in online

I mode is selected nce the data in the D

table is processedG the I mode is set to inactie

Standard siDe

If you seect this the screens are processed in the standard siDe in the foreground (in foreground or

dispay errors ony) Note the standard siDe is a$ays used for acground processing

Further after commit

The first commit $or in a transaction does not ead to the end of the recording

Note A atch input transaction is ended $ith the first commit $or

No I mode

The system fied SC9INPT is not set (SC9INPT E ) So transactions are run through as in onine

7nd No I mode

5ny use if you choose the processing mode 7 (dispay errors ony) Then the transaction is processed in the acground in atch input mode and if there is an error the screens run through in

the foreground

copy SAP AG BC420 12-38

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 3988

07

983209 SAP AG 1999

I Mode

atch input

mode

nline

Some transactions behae differentl( in batch input mode

than in online Cbatch input capabilit(

atch input mode sets the s(stem field SIPT H

Not every transaction can run the same onine and in atch input mode The transaction must decide

itsef $hether it is caed onine or in atch input mode

The system sets the system fied SC9INPT E G if the atch input mode is active (this aso appies

to ca transaction) From this system fied the transaction can identify $hether to run onine or in

atch input mode

copy SAP AG BC420 12-39

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 4088

040

983209 SAP AG 1999

reating a Session 9rom the Recording

Recordingnl( contains the data

from the recording

Seon name 02amp

Aoraon ampBS(eep eon

oclt dae 10102000

Cou can create a atch input session directy from the recording that you can then process using the

atch input monitor

copy SAP AG BC420 12-40

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 4188

046

983209 SAP AG 1999

reating Test Data

Test Data

Recording

ranranpBC420AAe name

The file onl( contains the data from the recording

Rgt

Application Serer

Structure

Cou can create a fie from the recordingH the fie $i contain a the fieds from the recording The

fieds are added to the fie $ith the ength you specified in the definition

The fied order corresponds to the order in the recording overvie$ Technica fieds

(2356257 2324ampS5amp and so on) are incuded

The data can ony e stored on the appication server If you do not specify a path the fie is stored in

the $or directory of the appication server

If the specified test fie aready eists the ne$ data record is added to this fie

copy SAP AG BC420 12-41

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 4288

04amp

983209 SAP AG 1999

ed conen

reating a Program

Recording

ZBC420ampProram name

Transfer Program

e daa

ead =rom =e

ran=er =rom recordn

reate

9ile nameTest data

ranranpBC420AA

Cou can generate a program from the recording

In the foo$ing diaog o enter a program name In addition you can choose the type and method

for fiing the maintained fied contents from the recorded screens

4se the vaues used for the recording If you reuire feie data transfer you $i have to modify

this program ater

ParameteriDe the input vaues and read these vaues from a fie A data structure is created for

parameteriDationH the data records are read from an eterna fie into this data structure The

program assumes the fie $as taiored to this data structure

If you have decided to parameteriDe the input vaues you shoud aso create a test fie during

generation To do this seect the checo and enter a name for the fie

The attriute maintenance screen of the AAP editor appears aintain the attriutes and save the

program

copy SAP AG BC420 12-42

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 4388

04

983209 SAP AG 1999

Program 9unctions

Online

transaction

Transfer program

To

error

1rror

ption 6ption ampFlat SAP

structure

Monitor

Cou have no$ generated a data transfer program for importing data into the amp System The

program can eecute the data transfer using atch input or ca transaction

If you choose option 1 and there is an error the data record is paced into a atch input session

copy SAP AG BC420 12-43

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 4488

044

983209 SAP AG 1999

Benerating 9unction Modules

Recording

Zcreaedeor ncon mode

ncon rop

Sor eD

ZBC420

Creae comer

9unction module

nl( one data record can be processed at a time

In the net diaog o you can generate a function modue a function group and short tet from the

recording The function modue is automaticay created in the function group

copy SAP AG BC420 12-44

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 4588

042

983209 SAP AG 1999

9unction of 9unction Modules

Online

transaction

To

error

1rror

ption 6 ption amp

9unction module

Import

Parameter 1port

parameter

Tables

M1SSTA

Monitor

S$BC

Import interface

The import interface consists of a technica part and the fieds from the recording (A parameter is

created for each input fied of the recorded transactions)

7port interface

Simpy consists of the parameter S4amp2 The function modue $i return a vaue in the system

fied SC9S4amp2 after caing ca transaction This return vaue is set to Dero if the data record has

een correcty processed (5ny appies to 2T)

If a session is created you $i e notified $hether the data record coud e paced into the session

Tae interfaceThis is used ony if the function modue $ors $ith ca transaction The tae contains a the

system messages

copy SAP AG BC420 12-45

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 4688

048

983209 SAP AG 1999

Import Interface of 9unction Module

$

Technical

fields

Data

fields

BI session or CALL TRANSACTION

Processin $ode

pdate $ode

a$e oamp BI session iamp (T initial)

Bacround user iamp (T initial)

Delete session aampter processin

Loc date oamp session

ODATA indicator

TU

MD1

UPDAT1

BRUP

US1R

=11P

ELDDAT1

DATA

Cou can use parameter 2T4 to specify $hether the function modue creates a atch input session

(2T4 E ) or updates the data record directy using ca transaction (2T4 E G)

The other parameters are fied as for a atch input session header

Note 7very time the function modue is caed a atch input session is created

If the session is to contain severa transactions proceed as foo$s

ltenerate the transaction severa times This can e achieved y recording the transaction again The

function modue interface $i then contain more than one transaction -hen the function modue is

caed severa transactions can e generated for each session

copy SAP AG BC420 12-46

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 4788

043

983209 SAP AG 1999

The Transaction Recorder

PrinciplesPrinciples

Recording )ith the LSMWRecording )ith the LSMW

Principles of atch Input and all TransactionPrinciples of atch Input and all Transaction

Integrating the TA Program into the DWIntegrating the TA Program into the DW

Using the TA Recorder Using the TA Recorder

copy SAP AG BC420 12-47

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 4888

045

983209 SAP AG 1999

Benerated Program

9unction modules DltP1ltBRUP

DltIS1RT

DltLS1ltBRUP

AAP Program

Define structure of

data in seJuential

fileDefine D

table

pen seJuential file

pen I session

Read data recordCseJuential file

9ill D table

9ill I session gtALL TRASATI

Last data record K

lose I session

lose seJuential file

The generated program has the structure dispayed aove It uses the standard function modues for

creating atch input sessions

copy SAP AG BC420 12-48

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 4988

047

983209 SAP AG 1999

Structure of the Benerated Program

Benerated part

Define D

table

pen seJuential file

pen I session

Read data record

9ill D table

9ill I session gtALL TRASATI

Last data recordK

lose I session

lose seJuential file

Include DR16

Define filestructure

P1ltDATAS1T

P1ltBRUP

DltDPR

Dlt9I1LD

DltTRASATI

LS1ltBRUP

LS1ltDATAS1T

The generated program consists of t$o parts 9 a generated part and the incude 2amp72G8 The

incude is provided in the standard system

The incude contains the definition of the reuired 2 tae and a further seven suroutines These

suroutines eecute the foo$ing functions

5pen and cose fie

5pen and cose session

Fi 2 tae

Fi session

The generated part is the main program and cas the reevant suroutines A structure is aso

generated in the generated part to read the eterna data into the fie

See the Appendi for more information on the 2amp72G8 program

copy SAP AG BC420 12-49

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 5088

020

983209 SAP AG 1999

Structure of D Table

PRBRAM DPR D1BI 9AM 9ALPRBRAMPRBRAM DPRDPR D1BID1BI 9AM9AM 9AL9AL

SAPM90ampD 0602

R90ampD=UR 600000

R90ampDU=RS 0006

R90ampD=T=D =UA

SAPM90ampD 0660

=A6AM16 Smith

=A6PSTL 87000

=A6LAD6 US

=A6SPRAS 1

SAPM90ampD 06amp0

=A6ST1B US6amp428357DDATA

PRBRAM

DPR

D1BI

9AM

9AL

EAR

UM

EAR

EAR

EAR

40

4

6

6amp

6amp

D Module pool

D Screen number

D Start of screen

D 9ield name

D 9ield contents

9ield ame T(pe Length Short Tet

AAP Dictionar(

The 2 tae has the same structure as in a standard transfer

copy SAP AG BC420 12-50

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 5188

026

983209 SAP AG 1999

Read Structure

Recording

DATA BEGIN OF record data element BUKRS bukr$amp data element KTOKD ktokd$amp data element NA(EG) name$+amp data element SORT ortl$ampEND OF record-

record

Automaticall( generated

from recording

The structure of the fie is automaticay generated and is a$ays defined $ith the name amp725amp

The generated structure a$ays has the same ayout 7ach fied is defined y t$o generated ro$s

The first ro$ is a$ays a comment ro$ containing the tet J data eement and the data eement of

the screen fied from the recording In the net ro$ the fied itsef is defined $ith the name of the

data eement foo$ed y a three9digit position numer $hich specifies the ocation in the structure

The ength of the fied is set y the ength of the data eement If a fied is not defined through a data

eement the system uses the ength of the screen fied

copy SAP AG BC420 12-51

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 5288

02amp

983209 SAP AG 1999

pening and losing the 9ile

P1ltDATAS1T

LS1ltDATAS1T

FOR( oendataet USING dataet-O)EN DATASET dataet IN TET (ODE-

IF S01SUBR2 34 - 5RITE 6 te7t1e S01SUBR2-STO)-

ENDIF-

ENDFOR(-

FOR( cloedataet USING dataet-2OSE DATASET dataet-

ENDFOR(-

Include

DR16

The suroutine 5P7N3ATAS7T opens the seuentia fie

The suroutine 2+5S73ATAS7T coses the seuentia fie

copy SAP AG BC420 12-52

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 5388

02

983209 SAP AG 1999

9unction Modules for I Program

lient

Session name

Eold date

=eep session

D user name

RecordK

LI1T

BRUP

ELDDAT1

=11P

US1R

R1RD

DltP1ltBRUPDltP1ltBRUP

Transaction code

D table

TD1

DPRTA

DltIS1RTDltIS1RT

DltLS1ltBRUPDltLS1ltBRUP

pen Isessionpen Isession

Insert data for

transactions

Insert data for

transactions

lose I

session

lose I

session

The foo$ing function modues are provided for creating atch input sessions (function group

S2)

235P7N3ltamp54P

2reates a ne$ session and contains genera data for the $hoe session

23INS7ampT

Inserts a the data for a transaction into the session The transferred interna tae $ith the

structure 2ATA must contain a the data reuired for fuy processing the transaction

232+5S73ltamp54P

2oses the session after a the data has een inserted As soon as the session has een cosed it

can e processed

The interna tae $ith the structure 2ATA can ony contain atch input data for one singe

transaction run So the individua transactions are inserted into the atch input session in a oop

using severa 23INS7ampT cas

copy SAP AG BC420 12-53

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 5488

024

983209 SAP AG 2001

9unction Module DltP1ltBRUP

ALL 9UTI DltP1ltBRUPALL 9UTI DltP1ltBRUP

1PRTIB

LI1T client

BRUP session name

ELDDAT1 loc+ date

=11P delete flag

US1R bdc user name

R1RD recording

IMPRTIB

NID internal session +e(

11PTIS

1PRTIB

LI1T client

BRUP session name

ELDDAT1 loc+ date

=11P delete flag

US1R bdc user name

R1RD recording

IMPRTIB NID internal session +e(

11PTIS

-ith the function modue 235P7N3ltamp54P you can open a atch input session

The foo$ing parameters are mandatory

2+I7NT (cient)

ltamp54P (session name)

4S7amp (user name)

Note The 4S7amp must a$ays e specified This user name is reuired for processing the session

in atch mode

The foo$ing parameters are optiona

=5+AT7 specifies the eariest date on $hich the session can e started677P fag specifies $hether session shoud e deeted after it has een successfuy processed The

677P fag is ignored if the session contains errors

677P E K K means deete the session after processing (defaut vaue) H

677P E KGK means do not deete session

amp725amp E KGK ao$s you to create a recording instead of a I session

If gtI is specified the function modue returns the interna session ey This is needed to e ae to

differentiate sessions that have the same name

-ith 7G27PTI5NS you get various return vaues that can e ueried $ith SC9S4amp2

Note In onine mode the onine user is used for the authoriDation checs regardess of the user

name specified

copy SAP AG BC420 12-54

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 5588

022

983209 SAP AG 1999

Subprogram P1ltBRUP

P1ltBRUP

FOR( oen8rou-IF e9on -

2A FUN2TION BD2O)ENGROU) E)ORTING 2IENT lt1mandt GROU) 8rou USER uer KEE) kee

=ODDATE gtolddate-

ENDIF-ENDFOR(-

Include

DR16

The suprogram 5P7N3ltamp54P opens the atch input session

copy SAP AG BC420 12-55

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 5688

028

983209 SAP AG 1999

9unction Module DltIS1RT

ALL 9UTI DltIS1RTALL 9UTI DltIS1RT

IMPRT

TD1 Transaction code

PSTltLAL Update locall(

PRITIB print list

TAL1S DPRTA bdclttable

11PTIS

IMPRT

TD1 Transaction code

PSTltLAL Update locall(

PRITIB print list

TAL1S DPRTA bdclttable

11PTIS

-ith the function modue 23INS7ampT you can add transaction data to the session

Cou need an interna 2 tae to transfer the data

The foo$ing parameters are mandatory

T257 Transaction code

CNPamp5TA 2 tae

The foo$ing parameters are optiona

P5ST3+52A+ E KGK activates oca updating This means that the data to e updated is ept in the

appication server and updated in the ast step of the transaction This does not invove the update

process (For more information see course 28 Programming ataase 4pdates)

PampINTINlt E KGK 9 ists processed in I $i e printed immediatey -ith 7G27PTI5NS you get various return vaues that can e ueried $ith SC9S4amp2

copy SAP AG BC420 12-56

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 5788

023

983209 SAP AG 1999

Subprogram DltTRASATI

DltTRASATI

FOR( BD2TRANSA2TION USING tcode-

IF e9on -2A FUN2TION BD2INSERT

E)ORTING T2ODE tcode TABES D0N)ROTAB bdcdata-

ESE-

ENDIF-ENDFOR(-

T

Include

DR16

The suprogram 23TampANSA2TI5N moves the fied 2 tae either to a atch input session

or uses ca transaction to import the data into the system 5n the seection screen you can specify

$hether you $ant to create a session or you $ant to use ca transaction to process the data directy

The S7SSI5N fied is then set according to your seection

copy SAP AG BC420 12-57

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 5888

025

983209 SAP AG 1999

9unction Module DltLS1ltBRUP

ALL 9UTI DltLS1ltBRUP

11PTIS

TltP1 6

NU1U1lt1RRR amp

-ith the function modue 232+5S73ltamp54P you can cose a atch input session

In 7G27PTI5NS you get various return vaues that can e ueried $ith SC9S4amp2

copy SAP AG BC420 12-58

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 5988

027

983209 SAP AG 1999

Subprogram LS1ltBRUP

FOR( cloe8rou-IF e9on -cloe batcgt 9nut 8rou

2A FUN2TION BD22OSEGROU)-

ESE-IF e8rouoened -

2A FUN2TION BD22OSEGROU)-

ENDIF-ENDIF-

ENDFOR(-

LS1ltBRUPlose session

lose error session

Include

DR16

The suprogram 2+5S73ltamp54P coses the atch input session The suprogram differentiates

et$een a norma I session (S7SSI5N E G) and a session opened $hen ca transaction

encountered an error (73ltamp54P35P7N7 E G)

copy SAP AG BC420 12-59

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 6088

080

983209 SAP AG 1999

Subprograms DltDPRG Dlt9I1LD

DltDPR

Dlt9I1LD

FOR( bdc9eld USING nam al-IF al 34 nodata-2EAR bdcdata- bdcdata1nam nam- bdcdata1al al- A))END bdcdata-ENDIF-

ENDFOR(-

FOR( bdcdltnro USING ro8ram dltnro- 2EAR bdcdata-Bdcdata1ro8ram ro8ram-Bdcdata1dltnro dltnro-Bdcdata1dltnbe89n - A))END bdcdata-ENDFOR(-

Include

DR16

The incude 2amp72GG contains t$o suprograms 23CNPamp5 and 23FI7+

Suprogram 23CNPamp5 fis the 2 tae $ith program names and screen numers

Suprogram 23FI7+ fis the 2 tae $ith fied names and vaues

7ach suprogram creates an entry in the 2 tae

copy SAP AG BC420 12-60

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 6188

086

983209 SAP AG 1999

9illing the D Table

erorm bdcdltnro u9n8 SA)(FD +- erorm bdc9eld u9n8 BD22URSOR RFD1BUKRS- erorm bdc9eld u9n8 BD2OK2ODE 6- erorm bdc9eld u9n8 RFD1BUKRS record1BUKRS- erorm bdc9eld u9n8 RFD1KTOKD record1KTOKD-

erorm bdcdltnro u9n8 SA)(FD -

erorm bdc9eld u9n8 BD22URSOR KNA1S)RAS- erorm bdc9eld u9n8 BD2OK2ODE 6- erorm bdc9eld u9n8 KNA1NA(E record1NA(E-

erorm bdc9eld u9n8 KNA1SORT record1SORT-

Recording Benerated automaticall(

from the recording

)ERFOR( bdcdltnro USING SA)(FD +- )ERFOR( bdc9eld USING BD22URSOR RFD1BUKRS-)ERFOR( bdc9eld USING BD2OK2ODE 6-)ERFOR( bdc9eld USING RFD1BUKRS record1BUKRS-)ERFOR( bdc9eld USING RFD1KTOKD record1KTOKD-

)ERFOR( bdcdltnro USING SA)(FD -

)ERFOR( bdc9eld USING BD22URSOR KNA1S)RAS-)ERFOR( bdc9eld USING BD2OK2ODE 6-)ERFOR( bdc9eld USING KNA1NA(E record1NA(E-

)ERFOR( bdc9eld USING KNA1SORT record1SORT- ---

The 2 tae is fied $ith data from the recording The suroutines 23CNPamp5 and

23FI7+ are used for this

The suroutines are caed in the reuired structure or seuence

copy SAP AG BC420 12-61

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 6288

08amp

983209 SAP AG 1999

erie)

SAPDatabase

SeJuential9ile

SAPDatabase

ALL TRASATIALL TRASATI

SeJuential9ile

ATE IPUTATE IPUT

D TableD TableD TableD Table

I Monitor

T

In contrast to atch input you can use ca transaction to directy pass data to the diaog interface

$ithout using a atch input session Cou use an interna tae (2 tae same structure and ayout

as atch input) to temporariy store your screen data Then you ca the desired transaction in your

program

Note 5n average the 2a Transaction method is 8 to times faster than using atch Input

copy SAP AG BC420 12-62

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 6388

08

983209 SAP AG 1999

all Transaction Program$ 1ample

RE)ORT abcbdcdcdeb9ct-

)ARA(ETERS d9mode DEFAUT A

udmode DEFAUT S-FOR( calltranact9on-2A TRANSA2TION FD

USING bdcdata (ODE d9mode

U)DATE udmode-

IF lt1ubrc NE - 5RITE 6 ---

ENDIF-ENDFOR(-

Screen

00

Screen

100

Screen

An additiona system ro area is added for the caed transaction The system uses this area for

processing the individua screens in the transactionH the data from the tae is added here After the

transaction is processed the second ro area is reeasedH the system continues processing in the first

ro area

Notes

In contrast to atch input there is no error ogging (error sessions) here For processing the caed

transaction the system uses the authoriDations of the user that caed the transaction The 2 tae

can ony hod data for one transaction run at a time efore another transaction is caed and its data

can e added you must eecute a amp7Famp7S= for the 2 tae

copy SAP AG BC420 12-63

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 6488

084

983209 SAP AG 1999

ALL TRASATI C6

RE)ORT 777-

2A TRANSA2TION FD USING bdcdata (ODE E-

Default for MD1 is A

2A TRANSA2TION 3tranact9oncode4 USING 3bdc1table4 C (ODE A E N C-

-ith the parameter 57 you can seect a specific dispay mode for processing the transaction The

foo$ing three modes are avaiae

A (ispay a)

If you eecute the program a the screens and a their data are dispayed This is the defaut vaue

for the 57 in 2A++ TampANSA2TI5N

N (ispay nothing)

The screens are not dispayed at a regardess of $hether any of them contained errors As soon as

the transaction has een fuy processed contro is returned to your program (The vaue of the

parameter 4PAT7 determines $hether dataase updates are eecuted or not)

7 (ispay errors ony)As soon as an error occurs in a screen the transaction is s$itched to dispay mode so that you can

correct the errors

These dispay modes are the same as those in the atch input session processing

copy SAP AG BC420 12-64

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 6588

082

983209 SAP AG 1999

RE)ORT 777-

2A TRANSA2TION FD USING BD2DATA U)DATE -

ALL TRASATI Camp

RE)ORT 777-

2A TRANSA2TION FD USING bdcdata U)DATE -

2A TRANSA2TION 3tranact9oncode4 USING 3bdc1table4 C (ODE A E N C U)DATE A S C -

Default for UPDAT1 is A

-ith the parameter 4PAT7 you can contro ho$ dataase updates arising from a transaction are

carried out There are three options

A (asynchronous updating) The caed transaction does not $ait unti the dataase has een

updated it simpy for$ard the updates to the SAP update service This usuay speeds up the 2T

program This processing mode is N5T recommended for arge data sets as the caed transaction

does not receive a competion message from the update modue

The caing 2T program therefore cannot te if the transaction has een successfuy competed Cou

shoud use the updating administration function (transaction S8) to determine $hether updating

$as terminated eary The error anaysis correction functions for are ess hepfu than $ith

synchronous updating

S (synchronous updating) -ith synchronous updating the caed transaction $aits unti a the

updates have een competed So processing is so$er than $ith synchronous updating The caed

transaction can ho$ever report any updating errors to the program $hich maes error

anaysiscorrection easier

+ (local updating) $ith oca updating the dataase is not updated in a separate process it is

updated in the caers process (see appication hep documentation for the AAP ey$ord S7T

4PAT7 TAS6 +52A+)

copy SAP AG BC420 12-65

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 6688

088

983209 SAP AG 1999

ALL TRASATI C

RE)ORT 777-DATA mtab T0)E TABE OF bdcm8coll-

2A TRANSA2TION FD USING bdcdata (ESSAGES INTO mtab-

2A TRANSA2TION 3tranact9oncode4 USING 3bdc1table4 C (ODE A E N C U)DATE A S C (ESSAGES INTO 3metab4 C -

7SSAlt7S specifies that a system messages that are output during the eecution of a 2A++

TampANSA2TI5N are $ritten to the interna tae L7SSTA The interna tae must have the

structure 2Slt25++

4nie the cassica atch input processing $ith sessions 2A++ TampANSA2TI5N does not offer any

specia processing procedures for transactions containing errors There are no restart functions for

transactions that contain errors or that cause updating terminations

copy SAP AG BC420 12-66

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 6788

083

983209 SAP AG 1999

ALL TRASATI C4

RE)ORT 777-DATA mltot T0)E ctuaram-

2A TRANSA2TION FD USING BD2DATA

O)TIONS FRO( mltot-

2A TRANSA2TION 3tranact9oncode4 USING 3bdc1table4 C (ODE A E N C U)DATE A S C (ESSAGES INTO 3metab4 C O)TIONS FRO( ot C -

RE)ORT 777-DATA mltot T0)E ctuaram-2A TRANSA2TION FD USING bdcdata

O)TIONS FRO( mltot-

The addition 5PTI5NS enaes the ca transaction statement to e controed through a structure

The structure must have the dictionary type 2T43PAampAS

The addition 5PTI5NS Famp5 must not e comined either $ith the addition 57 or $ith

4PAT7 ore information on the net side

copy SAP AG BC420 12-67

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 6888

085

983209 SAP AG 1999

Structure TUltPARAMS

DISMD1 Procen mode anaoo o addon amp

UPDMD1 $pdae mode anaoo o addon $PA

ATTMD1 CA mode CA conro

D19SI1 orce de=a EndoE e drn procen

RAMMIT +o eD a Camp amp(

IPT +o a ac np eonF a F S-B+P SPAC

I1D +o a ac np eon a=er end o= BC daa

The components are defined as foo$s

The components 7FSIM7 ampA25IT N5INPT and N5I7N can have the foo$ing

vaues KGK E Ces or K K E No

If the addition 5PTI5NS Famp5 is not specified the foo$ing settings appy to the contro

parameters

IS57 from addition 57

4P57 from addition 4PAT7

2ATT57 2ATT not active

7FSIM7 o not not use defaut $indo$s siDe

ampA25IT Successfu eit at 25IT -5amp6

N5INPT atch input session active (SC9INPT E G)

N5I7N atch input session sti active after end of 2 data

copy SAP AG BC420 12-68

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 6988

087

983209 SAP AG 1999

SMSBID Message ID

SMSBT Message T(pe C1GIGWGSGA

SMSB Message umber

SMSB6 Message ariable 6

SMSBamp Message ariable amp

SMSB Message ariable

SMSB4 Message ariable 4

SMSBID Message ID

SMSBT Message T(pe C1GIGWGSGA

SMSB Message umber

SMSB6 Message ariable 6

SMSBamp Message ariable amp

SMSB Message ariable

SMSB4 Message ariable 4

Return code$

S(stem fields$

alue Meaning

0 Successful

6000 1rror in transaction

6000 1rror in processing call transaction

see also the s(stem fields specified

alue Meaning

0 Successful

6000 1rror in transaction

6000 1rror in processing call transaction

see also the s(stem fields specified

9ield name Meaning9ield name9ield name MeaningMeaning

Return ode and S(stem 9ields

The return code is used to specify $hether the caed transaction $as processed successfuy In

addition severa system fieds are fied The numer I type and variaes of the diaog message

output y the caed transaction Cou need this information to output the message tet

copy SAP AG BC420 12-69

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 7088

030

983209 SAP AG 1999

Benerated Program of the TA Recorder

REFRES= (ESSTAB-

2A TRANSA2TION tcode USING bdcdata (ODE ctumode U)DATE cudate (ESSAGES INTO metab-OO) AT metab- ENDOO)-IF lubrc 34 AND e8rou 34 S)A2E- IF e8rouoenend - 2A FUN2TION BD2O)ENGROU) E)ORTING ---------

--------- E8rouoened - ENDIF- 2A FUN2TION BD2INSERT E)ORTING T2ODE tcode TABES D0N)ROTAB bdcdata-ENDIF-REFRES= bdcdata-

Message table output

pen error session

Insert data record that

has errors into error

session

If you have seected ca transaction on the seection screen the generated program runs as foo$s

The onine transaction is caed $ith ca transaction and passed to tae 2ATA A the

messages arising during the ca transaction are put in the interna tae 7SSTA

7SSTA is output as a ist

If you have specified an error session ( 73ltamp54P L SPA27) on the seection screen and the

ca transaction comes across an error (+3S4amp2 L 0) the error session is opened The error

session is ho$ever ony opened once Then the data record is paced in the session

A the other data records that have errors $ith ca transaction are paced in the same session

copy SAP AG BC420 12-70

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 7188

036

983209 SAP AG 1999

The Transaction Recorder

PrinciplesPrinciples

Recording )ith the LSMWRecording )ith the LSMW

Principles of atch Input and all TransactionPrinciples of atch Input and all Transaction

Integrating the TA Program into the DWIntegrating the TA Program into the DW

Using the TA Recorder Using the TA Recorder

copy SAP AG BC420 12-71

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 7288

03amp

983209 SAP AG 1999

Integrating into the DW

Transfer program

AAP Dictionar(

Integrate

SDA0

SDA6

SDAamp

SDA

Cou can integrate the generated program into the G9- The structure of the fie must e created

in the AAP ictionary The taes SGA0 SGA8 SGA1 and SGA $i e fied

copy SAP AG BC420 12-72

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 7388

03

983209 SAP AG 1999

DW Release 42

Goo

-B eeae 45

aa ran=er ogtec

Int customer data transfer ob-ect

ecord =ed

Dece daa ran=er

d Goo

The ampunction ampor interatin TA recorder prora$s is

i$ple$ented in the

D+-B in Release

The recorder can e integrated as of ampeease and it is provided in the G9- ampeease

ltot to the G9- ampeease 5n the initia screen you can integrate programs y choosing ampoto

( +nt customer ata transfer o-ect

copy SAP AG BC420 12-73

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 7488

034

983209 SAP AG 1999

reating Program as D b-ect

Comer ran=er ogtec

ampgtec ype

Sor eD =or ogtec

aa ran=er proram

Srcre name

9900

(+A1

Cane comer

ZBCA+G

ZB

ustomer transfer ob-ect

umber bet)een 7000 and 7777

b-ect t(pe

Assignment to R ob-ect

Short tet for D ob-ectShort description

Data transfer program

ame of generated program

Structure name

A structure Cstructure la(out )ith this name is created in

the AAP Dictionar(

For ampeease transfer oects $ere not organiDed y 5amp oects ut y a G numer (00089

OOOO) The numer range O0009OOOO is reserved for customers

To create a connection to the ne$ G 9- you must assign the program to a 5amp oect

2reate a short tet for the G oect This tet $i appear in the method seection ist

Specify the program to e incuded

Specify a name for the structure to e created in the AAP ictionary

Note $he generated program appears under program type +N and not under program type

-

copy SAP AG BC420 12-74

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 7588

032

983209 SAP AG 1999

Adantages

Automatic program registration in the DW in

Release 48

ou can use all the functions defined for

standard ob-ects

1ception$ The (reate ampile ith data

function

If you incuded the oect in the ampeease $orench it is automaticay avaiae in the ampeease

B $orench

A the $orench functions are avaiae for your oect ecept for Create files ith transfer ata

copy SAP AG BC420 12-75

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 7688

038

983209 SAP AG 1999

ou are no) able to$

The Transaction Recorder$ Unit Summar(

Use the recording function in the LSMW to create

a batch input session )ith the data from the

eternal s(stem

Use the TA Recorder to create (our o)n data

transfer program

Anal(e programs that )or+ )ith batch input or

call transaction

Integrate the TA Recorder programs into the

DW

copy SAP AG BC420 12-76

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 7788

ercise 1

nit $ -ecorder

$opic 2reating etors

$ransaction -ecorder ercise 1

bull 2reating detors $ith eterna numer assignment

bull etor numers M9980008 to M9980080

Address data for detors $ith eterna numer assignment is to

e transferred using program ampFI700

ro4ect F5

Supro4ect +5

-un +575

$as)s 85 95 8S25

9oad program -F+00

8 In the foo$ing eercises eisting data is to e changed Therefore these detors $ith

eterna numer assignment have to first e created

898 4nder suproect 79 create run 797G9 $ith the name Detors ith

eternal numers

copy SAP AG BC420 12-77

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 7888

891 2reate the foo$ing three tass The tass map the foo$ing process steps

convert data create + session and process + session

89198 In run 797G9 create the foo$ing tas

9 Tas AP9

9 Name 2onvert data 9 Tas type AP

9 Program type +S-

Seect the foo$ing +S- oect

+S- proect 2109

+S- suproect 7I9

+S- oect I997GT

89191 In run 797G9 create the foo$ing tas 9 Tas +5A9

9 Name 2reate I session

Tas type +5A

9 Program type INP

Seect program ampFI700 $ith the variant

I97G9

8919 In run 797G9 create the foo$ing tas

9 Tas S29

9 Name Process I session Tas type S2

9 Program type amp7P5

Seect program ampS2S4 $ith the variant

S497G9

Note that you have to correct the seuence of the tass 2onvert data

create + session and process + session

4se the uttons

89 Start the run

The detors $i e created $ith eterna numer assignments

89 2hec in transaction F0 that the detors M9980008 to M9980080 have een

created

copy SAP AG BC420 12-78

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 7988

ercise

nit $ransaction -ecorder

$opic -ecording function in the 9S8(

bull 2reate a recording using the +S-

bull ltenerate a atch input session

2hange the detor address data in the amp System

Name of the recording +

Name of the file +2055+F9

8 2reate the recording 7I3 using the +S- ampecord the transaction F01 (2hange

detor)

898 efore you create the recording first test the transaction onineQ

For the recording use detor M9980008 5n the initia screen of the F01

maintain the foo$ing fieds ony

etor etor M9980008

2ompany code 0008

Address data seect

Note $he data record must e saved hile recording

891 aintain the names and the descriptions for the foo$ing fieds

Name city street posta code and teephone numereete a other fieds in screen 880 from the recording (eg S5ampT+ +AN8

SPampAS)

4se the same technica names as sho$n in the tae eo$ (automatic fied

mapping)

copy SAP AG BC420 12-79

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 8088

1 2reate the suproect 7I9 and the ne$ oect TA3 in your proect 2109

aintain the oect attriutes and seect the item atch input recording Seect your

recording 7I3

2reate the source structure address

2reate the source fieds according to the tae eo$ 5r copy them from proect 2109S37N suproect 7I900 oect TA900

198 Fie setup The data from the egacy system are dispayed in the foo$ing tae

Fied name Fied type Fied ength escription

N5 2 8B etor numer

NA7 2 Name

STamp77T 2 Street

2ITC 2 2ityPace of residence

MIP 2 80 Posta code

T7+ 2 8B Teephone numer

191 aintain the fied mapping 4se the automatic fied mapping (via menu item

7tras)

19 Specify the fies 5ny maintain the fie name of the source fie

Name of the fie 21099IFI+7

2odepage 8800

19 Import the data and convert them ispay the data in each caseQ

19 2reate a atch input session

19B ampun the atch input session

copy SAP AG BC420 12-80

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 8188

ercise 3

nit $ransaction -ecorder

$opic -ecording ith the $ -ecorder

bull ltenerate a recording using the TA recorder

bull Test the recording

2hange the address data of detors in the amp system

Name recording $+

Name of the file +2055+F9

8 2reate the recording TA37I3 using the transaction recorder ampecord the

transaction F01 (change detor)

898 4se detor M9980008 for the recording 5n the F01 initia screen ony

maintain the foo$ing fieds

etor etor M9980008

2ompany 2ode 0008

Address data seect

Note $he data record must e saved hen recording

eete a fieds that do not eist in the source fie 21099IFI+7 from screen

880 in the recording (eg 6NA89S5ampT+ 6NA89+AN8 6ANNQ9SPampAS) Note o not deete fieds ampF01946ampS and ampF0190880

Save the recording no$

1 S$itch to the recordings overvie$

198 Process the recording $ith the processing mode A (dispay a)

191 Process the recording $ith the processing mode RN (no dispay)

19 If the recording has een tested and no error has occurred generate a I session

and run it using the I monitor If an error shoud occur generate the recordingagainQ

copy SAP AG BC420 12-81

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 8288

From the recording generate the program M21037I3 in your deveopment cass

2109 Seect the foo$ing

bull ampead fied contents from fie

bull 2reate test data in the fie 2103dei3test3tt

98 Save this program and eecute it ltenerate one I session each and process it

2arry out the same steps again using the ca transaction

The generated program shoud no$ e changed so that fie 21099IFI+7 can e

read and processed

98 2hange the defaut vaue of the fie name (parameter dataset) in 21099

IFI+7

91 2hange the structure definition eete the company code fied and the address

data checo from the structure

9 2hange the su9routine ca perform dc3fied for the company code (KampF019

46ampSK) so that the vaue 0008 is transferred

9 2hange the su9routine ca perform dc3fied for the address data checo

(KampF0190880K) so that the vaue G is transferred

9 Start the program again and read the data from the fie 21099IFI+7 $ith

detor data ltenerate a I session $ith it and run it

copy SAP AG BC420 12-82

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 8388

033 Include DR16INCLUDE BDCRECX1

SELECTION-SCREEN BEGIN OF LINE

PARAMETERS SESSION RADIOBUTTON GROUP CTU create sessi SELECTION-SCREEN COMMENT $amp TEXT-S FOR FIELD SESSION

se(ecti-scree )siti +

PARAMETERS CTU RADIOBUTTON GROUP CTU ca(( trasacti

SELECTION-SCREEN COMMENT $amp TEXT-S FOR FIELD CTU

SELECTION-SCREEN END OF LINE

SELECTION-SCREEN BEGIN OF LINE

SELECTION-SCREEN COMMENT $amp TEXT-S1 FOR FIELD GROUP

se(ecti-scree )siti $+

PARAMETERS GROUP1$amp r) ae 0 sessi

SELECTION-SCREEN COMMENT $amp TEXT-S+ FOR FIELD CTUMODE

se(ecti-scree )siti

PARAMETERS CTUMODE LIE CTU2PARAMS-DISMODE DEFAULT 3N3

A4 s56 a(( 78)rs

E4 s56 78)r errr (8

N4 7 t 7is)(a8 78)r

SELECTION-SCREEN END OF LINE

SELECTION-SCREEN BEGIN OF LINE

SELECTION-SCREEN COMMENT $amp TEXT-S$ FOR FIELD USER

se(ecti-scree )siti $+

PARAMETERS4 USER1$amp DEFAULT S9-UNAME ser 0r sessi i atc5

SELECTION-SCREEN COMMENT $amp TEXT-S FOR FIELD CUPDATE

se(ecti-scree )siti

PARAMETERS CUPDATE LIE CTU2PARAMS-UPDMODE DEFAULT 3L3

S4 s8c5rs(8

A4 as8c5rs(8

L4 (ca(

SELECTION-SCREEN END OF LINE

SELECTION-SCREEN BEGIN OF LINE

SELECTION-SCREEN COMMENT $amp TEXT-S FOR FIELD EEP

se(ecti-scree )siti $+

PARAMETERS4 EEP AS CltECBOX 3 3 = 7e(ete sessi i0 0iis5e7

3X3 = gtee) sessi i0 0iis5e7

SELECTION-SCREEN COMMENT $amp TEXT-S FOR FIELD E2GROUP

copy SAP AG BC420 12-83

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 8488

se(ecti-scree )siti

)araeters E2GROUP1$amp r) ae 0 errr-sessi

SELECTION-SCREEN END OF LINE

SELECTION-SCREEN BEGIN OF LINE

SELECTION-SCREEN COMMENT $amp TEXT-S FOR FIELD ltOLDDATE

se(ecti-scree )siti $+

PARAMETERS4 ltOLDDATE LIE S9-DATUM

SELECTION-SCREEN COMMENT +11amp TEXT-S$ FOR FIELD E2USER

se(ecti-scree )siti

PARAMETERS4 E2USER1$amp DEFAULT S9-UNAME ser 0r errr-sessi

SELECTION-SCREEN END OF LINE

SELECTION-SCREEN BEGIN OF LINE

SELECTION-SCREEN COMMENT +11amp TEXT-S FOR FIELD E2EEP

se(ecti-scree )siti

PARAMETERS4 E2EEP AS CltECBOX 3 3 = 7e(ete sessi i0 0iis5e7

3X3 = gtee) sessi i0 0iis5e7

SELECTION-SCREEN END OF LINE

SELECTION-SCREEN BEGIN OF LINE

SELECTION-SCREEN COMMENT +11amp TEXT-S FOR FIELD E2ltDATE

se(ecti-scree )siti

PARAMETERS4 E2ltDATE LIE S9-DATUM

SELECTION-SCREEN END OF LINE

SELECTION-SCREEN SIP

SELECTION-SCREEN BEGIN OF LINE

SELECTION-SCREEN COMMENT 1amp TEXT-S1 FOR FIELD NODATA

PARAMETERS4 NODATA DEFAULT 33 LOER CASE 7ata

SELECTION-SCREEN END OF LINE

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

Batc5i)t7ata 0 si(e trasacti

DATA4 BDCDATA LIE BDCDATA OCCURS ITlt ltEADER LINE

essaes 0 ca(( trasacti

DATA4 MESSTAB LIE BDCMSGCOLL OCCURS ITlt ltEADER LINE

errr sessi )ee7 3 3 r 3X3amp

DATA4 E2GROUP2OPENED

essae tets

TABLES4 T1

copy SAP AG BC420 12-84

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 8588

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

at se(ecti scree

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

AT SELECTION-SCREEN

r) a7 ser st e 0i((e7 0r create sessi

IF SESSION = 3X3 AND

GROUP = SPACE OR USER = SPACE

MESSAGE E1MSamp

ENDIF

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

)e 7ataset

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

FORM OPEN2DATASET USING P2DATASET

OPEN DATASET P2DATASET IN TEXT MODE

IF S9-SUBRC

RITE4 TEXT-E S9-SUBRC

STOP

ENDIF

ENDFORM

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

c(se 7ataset

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

FORM CLOSE2DATASET USING P2DATASET

CLOSE DATASET P2DATASET

ENDFORM

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

create atc5i)t sessi

t 0r ca(( trasacti siamp

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

FORM OPEN2GROUP

IF SESSION = 3X3

SIP

RITE4 $amp 3Create r)3I1amp GROUP

SIP

)e atc5i)t r)

CALL FUNCTION 3BDC2OPEN2GROUP3

EXPORTING CLIENT = S9-MANDT

copy SAP AG BC420 12-85

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 8688

GROUP = GROUP

USER = USER

EEP = EEP

ltOLDDATE = ltOLDDATE

RITE4 amp 3BDC2OPEN2GROUP3I$amp

1$amp 3retrc7e43I+amp

S9-SUBRC

ENDIF

ENDFORM

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

e7 atc5i)t sessi

ca(( trasacti si4 errr sessiamp

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

FORM CLOSE2GROUP

IF SESSION = 3X3

c(se atc5i)t r)

CALL FUNCTION 3BDC2CLOSE2GROUP3

RITE4 amp 3BDC2CLOSE2GROUP3Iamp

1$amp 3retrc7e43I+amp

S9-SUBRC

ELSE

IF E2GROUP2OPENED = 3X3

CALL FUNCTION 3BDC2CLOSE2GROUP3

RITE4

RITE4 amp 3Fe5(era))e 6r7e eret3Iamp

ENDIF

ENDIF

ENDFORM

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

Start e6 trasacti accr7i t )araeters

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

FORM BDC2TRANSACTION USING TCODE

DATA4 L2MSTRINGamp

DATA4 L2SUBRC LIE S9-SUBRC

atc5 i)t sessi

IF SESSION = 3X3

CALL FUNCTION 3BDC2INSERT3

EXPORTING TCODE = TCODE

TABLES D9NPROTAB = BDCDATA

RITE4 3BDC2INSERT3Iamp

copy SAP AG BC420 12-86

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 8788

TCODE

3retrc7e43I+amp

S9-SUBRC

3RECORD43

S9-INDEX

ca(( trasacti si

ELSE

REFRESlt MESSTAB

CALL TRANSACTION TCODE USING BDCDATA

MODE CTUMODE

UPDATE CUPDATE

MESSAGES INTO MESSTAB

L2SUBRC = S9-SUBRC

RITE4 3CALL2TRANSACTION3

TCODE

3retrc7e43I+amp

L2SUBRC

3RECORD43

S9-INDEX

LOOP AT MESSTAB

SELECT SINGLE FROM T1 ltERE SPRSL = MESSTAB-MSGSPRA

AND ARBGB = MESSTAB-MSGID

AND MSGNR = MESSTAB-MSGNR

IF S9-SUBRC =

L2MSTRING = T1-TEXT

IF L2MSTRING CS 313

REPLACE 313 ITlt MESSTAB-MSGH1 INTO L2MSTRING

REPLACE 3$3 ITlt MESSTAB-MSGH$ INTO L2MSTRING

REPLACE 33 ITlt MESSTAB-MSGH INTO L2MSTRING

REPLACE 33 ITlt MESSTAB-MSGH INTO L2MSTRING

ELSE

REPLACE 33 ITlt MESSTAB-MSGH1 INTO L2MSTRING

REPLACE 33 ITlt MESSTAB-MSGH$ INTO L2MSTRING

REPLACE 33 ITlt MESSTAB-MSGH INTO L2MSTRING

REPLACE 33 ITlt MESSTAB-MSGH INTO L2MSTRING

ENDIF

CONDENSE L2MSTRING

RITE4 MESSTAB-MSGT9P L2MSTRING$+amp

ELSE

RITE4 MESSTAB

ENDIF

ENDLOOP

copy SAP AG BC420 12-87

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 8888

SIP

Eree 0e5(era))e

IF L2SUBRC AND E2GROUP SPACE

IF E2GROUP2OPENED = 3 3

CALL FUNCTION 3BDC2OPEN2GROUP3

EXPORTING CLIENT = S9-MANDT

GROUP = E2GROUP

USER = E2USER

EEP = E2EEP

ltOLDDATE = E2ltDATE

E2GROUP2OPENED = 3X3

ENDIF

CALL FUNCTION 3BDC2INSERT3

EXPORTING TCODE = TCODE

TABLES D9NPROTAB = BDCDATA

ENDIF

ENDIF

REFRESlt BDCDATA

ENDFORM

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

Start e6 scree

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

FORM BDC2D9NPRO USING PROGRAM D9NPRO

CLEAR BDCDATA

BDCDATA-PROGRAM = PROGRAM

BDCDATA-D9NPRO = D9NPRO

BDCDATA-D9NBEGIN = 3X3

APPEND BDCDATA

ENDFORM

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

Isert 0ie(7

Page 22: BC420_46C - 012The Transaction Recorder

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 2288

0ampamp

983209 SAP AG 1999

Results

RecordingRecording R1lt6 Demolt6

9D0amp hange customer Caccounting

SAPM90ampD 0608

DltURSR R90ampD=UR

Dlt=D1 gt00

R90ampD=UR 5560000

R90ampDD0660

US1ltA

SAPM90ampD 0666

Dlt=D1 UPDA

DltSUSR SAPLSA6

DltSUSR SAPLSA6

DltURSR SA6ltD0600T1LltUM1

ADDR6ltDATASTR11T 4 Barden Street

ADDR6ltDATAPSTltD1 0amp602

ADDR6ltDATAIT6 oston

SA6ltD0600T1LltUM1 8638257755

The resuts of the recording using the +S- are dispayed in a tree structure

After the recording has finished you can edit it Cou can deete fieds or add ne$ ones

copy SAP AG BC420 12-22

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 2388

0amp

983209 SAP AG 1999

Assigning 9ield ames

Recording R16 Demolt6

Dlt=D1 UPDA

DltSUSR SAPLSA6

DltSUSR SAPLSA6

DltURSR SA6ltD0600T1L

ADDR6ltDATAAM16 Lisa Eofmeister

ADDR6ltDATAPSTltD1 0amp602

ADDR6ltDATAIT6 oston

ame

+ame

ecrpon

e=a ae

A1AA-+A1

A1AA-+A1

Comer name

a o=meer

Screen =ed

ustomer name

double clic+

Cou can assign names for each recorded fied The specia fieds (2356257 2324ampS5amp

and 23S4S2amp77N) are not incuded here Cou can choose the fied names -hen the atch

input session is created the contents of these fieds are assigned to the target fieds specified in the

eft coumn

Functions

efaut Assigns to the fied names of the underying target fied and its fied description

ampeset eetes fied name and fied description

oue cic 7dits fied name fied description and defaut vaue

Note Cou can use fied names more than once =o$ever the fied name is ony avaiae once in thefied mapping For this reason it is not practica to use fied names more than once

For a those fieds for $hich you do not assign a name the defaut vaue is used $hen the atch

input session is created These defaut vaues can e seen as constants This is especiay usefu for

chec oes (for eampe 08 vie$ seection)

The +S- supports automatic fied mapping Source fieds and target fieds can e assigned to each

other automaticay The fieds are assigned to the corresponding fieds of the same name Therefore

the fied names of the source structure shoud e given the same or simiar names as the fied names

in the target structure

copy SAP AG BC420 12-23

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 2488

0amp4

983209 SAP AG 2001

Addinggtremoing screen fields

Repeating recording

9or identical field names the name and description are

assigned automaticall(

1diting Recording

02-($++

(+A1-A+

(+A1-+A1

(+A1-Samp

(+A1-+A2

(+A1-SAS

Comer accon nmer

e

+ame 1

Sor =ed

+ame 2

Sree

Selection of all

aailable screen

fields

Cou can ater add ne$ screen fieds if you need to 6eep in mind that fieds shoud ony e added in

paces $here they are aso provided on the screen other$ise you $i get an error $hen the I

session is processed

After saving you $i get the message The data has een saved successfuy No$ the recordings

are avaiae for the oect attriutes

If you repeat the recording you can record a ne$ screen seuence $ith ne$ fieds Provided that the

fied names (eg 6NA89NA78) are identica the names and descriptions are automaticay

assigned

copy SAP AG BC420 12-24

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 2588

0amp2

983209 SAP AG 1999

b-ect T(pe and Import Method$ Recording

Standard atch Input gt Direct Input

atch Input Recording

API

IDoc

ampgtec ype ) mpor meod

Bac np recordn

ecordn ec1

The recording is no$ avaiae $ith the oect attriutes

Net you create a proect or su9proect in the +S- and specify process the data transfer

Cou eecute the data transfer as in the standard system

efine the source fieds and structures

efine the fied mapping

ampead and convert the data

2reate and import a atch input session

copy SAP AG BC420 12-25

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 2688

0amp8

983209 SAP AG 1999

The Transaction Recorder

PrinciplesPrinciples

Recording )ith the LSMWRecording )ith the LSMW

Principles of atch Input and all TransactionPrinciples of atch Input and all Transaction

Integrating the TA Program into the DWIntegrating the TA Program into the DW

Using the TA Recorder Using the TA Recorder

copy SAP AG BC420 12-26

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 2788

0amp3

983209 SAP AG 1999

Transaction Recorder

Online

Transaction

RecordingTransfer Program

T

Included in the Batch Input Monitor

Cou use the transaction recorder to record transactions and then use the transaction recording to

generate a transfer program The program ao$s you to transfer data using either atch input or ca

transaction

copy SAP AG BC420 12-27

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 2888

0amp5

983209 SAP AG 1999

hanging ustomer Data$ Initial Screen

9ield ontents

BCC$Samp $SZAV

BCamp(Camp )00

02-($++ Z-88-10000

02-0110

02-0130

$SZAV

9ield ame

Comer

Company code

Z-88-10000

Genera daa

Comer Z-88-10000

+ame

9ield ontents

BCamp(Camp $PA

BCS$BSC SAPSZA1 0300ASS

BCS$BSC SAPSZA1 0301Camp$

BCC$Samp SZA10100-+$B

A1AA-S Garden Sree

A1AA-amp$S+$1 34

A1AA-PampSCamp1 02105

9ield ame

Screen

111

Screen

106

In the aove eampe the transaction Change customer F01 is recorded

copy SAP AG BC420 12-28

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 2988

0amp7

983209 SAP AG 2001

hange Debitor$ Pa(ment Transactions C6

Banlt dea

Screen

10

9ield ontent

BCC$Samp (+B(-BA+(+01

BCamp(Camp BA+((+B(-BA+(S01

(+B(-BA+(01 12345679

(+B(-BA+(+01 22222222

Debitor 5560000

9ield ame

Inde

copy SAP AG BC420 12-29

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 3088

00

983209 SAP AG 1999

hanging ustomer Data$ Pa(ment Transactions Camp

Addre

an+ countr( US

an+ code 6amp42837

Banlt dea

ustomer 5560000

9ield ontents9ield ame

BCC$Samp (+A1-(+ZA

BCamp(Camp $PA

(+B(-Z01

Screen

10

Screen

100

SAPLBA

9ield ontents

BCC$Samp B+(A-BA+(A

BCamp(Camp +

B+(A-BA+(A +aona Banlt

9ield ame

In different transactions the modue poo may change This is the case $ith for eampe customer

master data The TA recorder records modue poo changes automaticay

copy SAP AG BC420 12-30

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 3188

06

983209 SAP AG 1999

Eierarch( Displa( of the Recording

02amp

02

SAP02 0106

BCC$Samp 02-0130

BCamp(Camp )00

02-($++ -88-10000

02-0110

02-0130

SAP02 0111

BCamp(Camp V

BCC$Samp A1AA-amp$S+$1

A1AA-S Garden Sree

Recording

-ith the TA recorder the resuts are aso a ist in a hierarchy dispay =o$ever you cannot assign

your o$n fied names as you can in the +S-

copy SAP AG BC420 12-31

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 3288

0amp

983209 SAP AG 1999

Recording erie)

Recording

Transfer program

9unction module

ontains onl( the data

from the recording

Test data

Test

reate

reate

reate

reate

1dit hange recording

Process recording

Cou can edit the recording as needed

The recording can e tested and eecuted again The screens are run through in the same $ay as in

the recording

The recording can then e used to create

atch input sessions

Test data

ata transfer programs $ith atch input or ca transaction

Function modues

copy SAP AG BC420 12-32

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 3388

0

983209 SAP AG 1999

1 02 BS

2 SAP02 106

3 BCC$Samp $SZAV

4 BCamp(Camp )00 5 02-($++ -88-10000

6 02-0110

7 02-0130

8 $SZAV

9 SAP02 111

10 BCamp(Camp V

11 BCC$Samp A1AA-amp$S+$1

12 A1AA-S Garden Sree

Program Screen St 9ield ame 9ield alue

Recording 1ditor

Recording

Add gt delete lines 9ormat chec+

Import gt eport of recording

In the editor you can add or deete ines Cou can aso change the contents of individua ines

-ith the function Chec) you can specify $hether the edited version of the recording sti has the

correct synta

Cou can aso eport import recordings to from a seuentia fie

After editing save the recording changes

copy SAP AG BC420 12-33

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 3488

04

983209 SAP AG 1999

Recording Seeral Transaction Runs

RecordingF

Directl( after the first recordingG or

In the displa( mode of the recording

In this step you can record additiona transactions and add additiona transaction runs to the

recording

Cou can record the additiona transactions directy after a recording or in the edit screen of a

recording

copy SAP AG BC420 12-34

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 3588

02

983209 SAP AG 1999

1ditor$ Importing and 1porting Recordings

6 T 9D0amp S

amp SAPM90ampD 608

DltURSR

4

2

8 SAPM90ampD 666

60

66

Program Screen St 9ield name 9ield alue

cempA

e name

aa =orma

cemp

A

e name

aa =orma

1port

Import

Presentation Serer

If the editor functions in the systems do not provide a the functions you need you can do$noad the

recording to your presentation server using the Eort function and then edit the recording using a

P2 editor

Cou use the Import function to import the data ac into the amp System ae sure the fie is sti in

the correct format

copy SAP AG BC420 12-35

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 3688

08

983209 SAP AG 1999

Processing the Recording

Recording

Process )ith ALL TRASATI

Parameer

Proce mode$pdae mode

CA mode

e=a e

Con a=er comm

+o a B eon

nd +o a B mode

A

A

T

The recording can e eecuted directy The data from the recording is used and the transaction is

processed $ith ca transaction

2a transaction provides a range of options for caing appication transactions $hich are discussed

on the foo$ing t$o pages

copy SAP AG BC420 12-36

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 3788

03

983209 SAP AG 1999

Process mode

Update mode

ATT mode

Processing Recording )ith T 6

A

1

Displa( all screens

Displa( errors onl(

o displa(

L

S

A

Local

S(nchronous

As(nchronous

A

o ATT

ATT )ithout indiidual screen control

ATT )ith indiidual screen control

Processing mode

=ere you can specify the processing mode 9 it is the same as the processing mode for atch input

4pdate mode

=ere you can specify the update mode For more information see the unit ca transaction

2ATT mode

=ere you can mae specia settings if you $ant to test the recording under 2ATT conditions (ony

necessary for 2ATT runs) Specia functions are caed in the 2ATT too for each screen at the end of

P5 and at the start of PAI

copy SAP AG BC420 12-37

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 3888

05

983209 SAP AG 1999

Default sie

ont after commit

ot a I session

1nd$ ot a I mode

Processing Recording )ith T amp

The screen standard sie is used for the

processing

ommit )or+ does not end the processing

o I mode is actie The transaction )ill run

through as in online

I mode is selected nce the data in the D

table is processedG the I mode is set to inactie

Standard siDe

If you seect this the screens are processed in the standard siDe in the foreground (in foreground or

dispay errors ony) Note the standard siDe is a$ays used for acground processing

Further after commit

The first commit $or in a transaction does not ead to the end of the recording

Note A atch input transaction is ended $ith the first commit $or

No I mode

The system fied SC9INPT is not set (SC9INPT E ) So transactions are run through as in onine

7nd No I mode

5ny use if you choose the processing mode 7 (dispay errors ony) Then the transaction is processed in the acground in atch input mode and if there is an error the screens run through in

the foreground

copy SAP AG BC420 12-38

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 3988

07

983209 SAP AG 1999

I Mode

atch input

mode

nline

Some transactions behae differentl( in batch input mode

than in online Cbatch input capabilit(

atch input mode sets the s(stem field SIPT H

Not every transaction can run the same onine and in atch input mode The transaction must decide

itsef $hether it is caed onine or in atch input mode

The system sets the system fied SC9INPT E G if the atch input mode is active (this aso appies

to ca transaction) From this system fied the transaction can identify $hether to run onine or in

atch input mode

copy SAP AG BC420 12-39

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 4088

040

983209 SAP AG 1999

reating a Session 9rom the Recording

Recordingnl( contains the data

from the recording

Seon name 02amp

Aoraon ampBS(eep eon

oclt dae 10102000

Cou can create a atch input session directy from the recording that you can then process using the

atch input monitor

copy SAP AG BC420 12-40

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 4188

046

983209 SAP AG 1999

reating Test Data

Test Data

Recording

ranranpBC420AAe name

The file onl( contains the data from the recording

Rgt

Application Serer

Structure

Cou can create a fie from the recordingH the fie $i contain a the fieds from the recording The

fieds are added to the fie $ith the ength you specified in the definition

The fied order corresponds to the order in the recording overvie$ Technica fieds

(2356257 2324ampS5amp and so on) are incuded

The data can ony e stored on the appication server If you do not specify a path the fie is stored in

the $or directory of the appication server

If the specified test fie aready eists the ne$ data record is added to this fie

copy SAP AG BC420 12-41

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 4288

04amp

983209 SAP AG 1999

ed conen

reating a Program

Recording

ZBC420ampProram name

Transfer Program

e daa

ead =rom =e

ran=er =rom recordn

reate

9ile nameTest data

ranranpBC420AA

Cou can generate a program from the recording

In the foo$ing diaog o enter a program name In addition you can choose the type and method

for fiing the maintained fied contents from the recorded screens

4se the vaues used for the recording If you reuire feie data transfer you $i have to modify

this program ater

ParameteriDe the input vaues and read these vaues from a fie A data structure is created for

parameteriDationH the data records are read from an eterna fie into this data structure The

program assumes the fie $as taiored to this data structure

If you have decided to parameteriDe the input vaues you shoud aso create a test fie during

generation To do this seect the checo and enter a name for the fie

The attriute maintenance screen of the AAP editor appears aintain the attriutes and save the

program

copy SAP AG BC420 12-42

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 4388

04

983209 SAP AG 1999

Program 9unctions

Online

transaction

Transfer program

To

error

1rror

ption 6ption ampFlat SAP

structure

Monitor

Cou have no$ generated a data transfer program for importing data into the amp System The

program can eecute the data transfer using atch input or ca transaction

If you choose option 1 and there is an error the data record is paced into a atch input session

copy SAP AG BC420 12-43

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 4488

044

983209 SAP AG 1999

Benerating 9unction Modules

Recording

Zcreaedeor ncon mode

ncon rop

Sor eD

ZBC420

Creae comer

9unction module

nl( one data record can be processed at a time

In the net diaog o you can generate a function modue a function group and short tet from the

recording The function modue is automaticay created in the function group

copy SAP AG BC420 12-44

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 4588

042

983209 SAP AG 1999

9unction of 9unction Modules

Online

transaction

To

error

1rror

ption 6 ption amp

9unction module

Import

Parameter 1port

parameter

Tables

M1SSTA

Monitor

S$BC

Import interface

The import interface consists of a technica part and the fieds from the recording (A parameter is

created for each input fied of the recorded transactions)

7port interface

Simpy consists of the parameter S4amp2 The function modue $i return a vaue in the system

fied SC9S4amp2 after caing ca transaction This return vaue is set to Dero if the data record has

een correcty processed (5ny appies to 2T)

If a session is created you $i e notified $hether the data record coud e paced into the session

Tae interfaceThis is used ony if the function modue $ors $ith ca transaction The tae contains a the

system messages

copy SAP AG BC420 12-45

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 4688

048

983209 SAP AG 1999

Import Interface of 9unction Module

$

Technical

fields

Data

fields

BI session or CALL TRANSACTION

Processin $ode

pdate $ode

a$e oamp BI session iamp (T initial)

Bacround user iamp (T initial)

Delete session aampter processin

Loc date oamp session

ODATA indicator

TU

MD1

UPDAT1

BRUP

US1R

=11P

ELDDAT1

DATA

Cou can use parameter 2T4 to specify $hether the function modue creates a atch input session

(2T4 E ) or updates the data record directy using ca transaction (2T4 E G)

The other parameters are fied as for a atch input session header

Note 7very time the function modue is caed a atch input session is created

If the session is to contain severa transactions proceed as foo$s

ltenerate the transaction severa times This can e achieved y recording the transaction again The

function modue interface $i then contain more than one transaction -hen the function modue is

caed severa transactions can e generated for each session

copy SAP AG BC420 12-46

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 4788

043

983209 SAP AG 1999

The Transaction Recorder

PrinciplesPrinciples

Recording )ith the LSMWRecording )ith the LSMW

Principles of atch Input and all TransactionPrinciples of atch Input and all Transaction

Integrating the TA Program into the DWIntegrating the TA Program into the DW

Using the TA Recorder Using the TA Recorder

copy SAP AG BC420 12-47

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 4888

045

983209 SAP AG 1999

Benerated Program

9unction modules DltP1ltBRUP

DltIS1RT

DltLS1ltBRUP

AAP Program

Define structure of

data in seJuential

fileDefine D

table

pen seJuential file

pen I session

Read data recordCseJuential file

9ill D table

9ill I session gtALL TRASATI

Last data record K

lose I session

lose seJuential file

The generated program has the structure dispayed aove It uses the standard function modues for

creating atch input sessions

copy SAP AG BC420 12-48

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 4988

047

983209 SAP AG 1999

Structure of the Benerated Program

Benerated part

Define D

table

pen seJuential file

pen I session

Read data record

9ill D table

9ill I session gtALL TRASATI

Last data recordK

lose I session

lose seJuential file

Include DR16

Define filestructure

P1ltDATAS1T

P1ltBRUP

DltDPR

Dlt9I1LD

DltTRASATI

LS1ltBRUP

LS1ltDATAS1T

The generated program consists of t$o parts 9 a generated part and the incude 2amp72G8 The

incude is provided in the standard system

The incude contains the definition of the reuired 2 tae and a further seven suroutines These

suroutines eecute the foo$ing functions

5pen and cose fie

5pen and cose session

Fi 2 tae

Fi session

The generated part is the main program and cas the reevant suroutines A structure is aso

generated in the generated part to read the eterna data into the fie

See the Appendi for more information on the 2amp72G8 program

copy SAP AG BC420 12-49

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 5088

020

983209 SAP AG 1999

Structure of D Table

PRBRAM DPR D1BI 9AM 9ALPRBRAMPRBRAM DPRDPR D1BID1BI 9AM9AM 9AL9AL

SAPM90ampD 0602

R90ampD=UR 600000

R90ampDU=RS 0006

R90ampD=T=D =UA

SAPM90ampD 0660

=A6AM16 Smith

=A6PSTL 87000

=A6LAD6 US

=A6SPRAS 1

SAPM90ampD 06amp0

=A6ST1B US6amp428357DDATA

PRBRAM

DPR

D1BI

9AM

9AL

EAR

UM

EAR

EAR

EAR

40

4

6

6amp

6amp

D Module pool

D Screen number

D Start of screen

D 9ield name

D 9ield contents

9ield ame T(pe Length Short Tet

AAP Dictionar(

The 2 tae has the same structure as in a standard transfer

copy SAP AG BC420 12-50

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 5188

026

983209 SAP AG 1999

Read Structure

Recording

DATA BEGIN OF record data element BUKRS bukr$amp data element KTOKD ktokd$amp data element NA(EG) name$+amp data element SORT ortl$ampEND OF record-

record

Automaticall( generated

from recording

The structure of the fie is automaticay generated and is a$ays defined $ith the name amp725amp

The generated structure a$ays has the same ayout 7ach fied is defined y t$o generated ro$s

The first ro$ is a$ays a comment ro$ containing the tet J data eement and the data eement of

the screen fied from the recording In the net ro$ the fied itsef is defined $ith the name of the

data eement foo$ed y a three9digit position numer $hich specifies the ocation in the structure

The ength of the fied is set y the ength of the data eement If a fied is not defined through a data

eement the system uses the ength of the screen fied

copy SAP AG BC420 12-51

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 5288

02amp

983209 SAP AG 1999

pening and losing the 9ile

P1ltDATAS1T

LS1ltDATAS1T

FOR( oendataet USING dataet-O)EN DATASET dataet IN TET (ODE-

IF S01SUBR2 34 - 5RITE 6 te7t1e S01SUBR2-STO)-

ENDIF-

ENDFOR(-

FOR( cloedataet USING dataet-2OSE DATASET dataet-

ENDFOR(-

Include

DR16

The suroutine 5P7N3ATAS7T opens the seuentia fie

The suroutine 2+5S73ATAS7T coses the seuentia fie

copy SAP AG BC420 12-52

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 5388

02

983209 SAP AG 1999

9unction Modules for I Program

lient

Session name

Eold date

=eep session

D user name

RecordK

LI1T

BRUP

ELDDAT1

=11P

US1R

R1RD

DltP1ltBRUPDltP1ltBRUP

Transaction code

D table

TD1

DPRTA

DltIS1RTDltIS1RT

DltLS1ltBRUPDltLS1ltBRUP

pen Isessionpen Isession

Insert data for

transactions

Insert data for

transactions

lose I

session

lose I

session

The foo$ing function modues are provided for creating atch input sessions (function group

S2)

235P7N3ltamp54P

2reates a ne$ session and contains genera data for the $hoe session

23INS7ampT

Inserts a the data for a transaction into the session The transferred interna tae $ith the

structure 2ATA must contain a the data reuired for fuy processing the transaction

232+5S73ltamp54P

2oses the session after a the data has een inserted As soon as the session has een cosed it

can e processed

The interna tae $ith the structure 2ATA can ony contain atch input data for one singe

transaction run So the individua transactions are inserted into the atch input session in a oop

using severa 23INS7ampT cas

copy SAP AG BC420 12-53

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 5488

024

983209 SAP AG 2001

9unction Module DltP1ltBRUP

ALL 9UTI DltP1ltBRUPALL 9UTI DltP1ltBRUP

1PRTIB

LI1T client

BRUP session name

ELDDAT1 loc+ date

=11P delete flag

US1R bdc user name

R1RD recording

IMPRTIB

NID internal session +e(

11PTIS

1PRTIB

LI1T client

BRUP session name

ELDDAT1 loc+ date

=11P delete flag

US1R bdc user name

R1RD recording

IMPRTIB NID internal session +e(

11PTIS

-ith the function modue 235P7N3ltamp54P you can open a atch input session

The foo$ing parameters are mandatory

2+I7NT (cient)

ltamp54P (session name)

4S7amp (user name)

Note The 4S7amp must a$ays e specified This user name is reuired for processing the session

in atch mode

The foo$ing parameters are optiona

=5+AT7 specifies the eariest date on $hich the session can e started677P fag specifies $hether session shoud e deeted after it has een successfuy processed The

677P fag is ignored if the session contains errors

677P E K K means deete the session after processing (defaut vaue) H

677P E KGK means do not deete session

amp725amp E KGK ao$s you to create a recording instead of a I session

If gtI is specified the function modue returns the interna session ey This is needed to e ae to

differentiate sessions that have the same name

-ith 7G27PTI5NS you get various return vaues that can e ueried $ith SC9S4amp2

Note In onine mode the onine user is used for the authoriDation checs regardess of the user

name specified

copy SAP AG BC420 12-54

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 5588

022

983209 SAP AG 1999

Subprogram P1ltBRUP

P1ltBRUP

FOR( oen8rou-IF e9on -

2A FUN2TION BD2O)ENGROU) E)ORTING 2IENT lt1mandt GROU) 8rou USER uer KEE) kee

=ODDATE gtolddate-

ENDIF-ENDFOR(-

Include

DR16

The suprogram 5P7N3ltamp54P opens the atch input session

copy SAP AG BC420 12-55

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 5688

028

983209 SAP AG 1999

9unction Module DltIS1RT

ALL 9UTI DltIS1RTALL 9UTI DltIS1RT

IMPRT

TD1 Transaction code

PSTltLAL Update locall(

PRITIB print list

TAL1S DPRTA bdclttable

11PTIS

IMPRT

TD1 Transaction code

PSTltLAL Update locall(

PRITIB print list

TAL1S DPRTA bdclttable

11PTIS

-ith the function modue 23INS7ampT you can add transaction data to the session

Cou need an interna 2 tae to transfer the data

The foo$ing parameters are mandatory

T257 Transaction code

CNPamp5TA 2 tae

The foo$ing parameters are optiona

P5ST3+52A+ E KGK activates oca updating This means that the data to e updated is ept in the

appication server and updated in the ast step of the transaction This does not invove the update

process (For more information see course 28 Programming ataase 4pdates)

PampINTINlt E KGK 9 ists processed in I $i e printed immediatey -ith 7G27PTI5NS you get various return vaues that can e ueried $ith SC9S4amp2

copy SAP AG BC420 12-56

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 5788

023

983209 SAP AG 1999

Subprogram DltTRASATI

DltTRASATI

FOR( BD2TRANSA2TION USING tcode-

IF e9on -2A FUN2TION BD2INSERT

E)ORTING T2ODE tcode TABES D0N)ROTAB bdcdata-

ESE-

ENDIF-ENDFOR(-

T

Include

DR16

The suprogram 23TampANSA2TI5N moves the fied 2 tae either to a atch input session

or uses ca transaction to import the data into the system 5n the seection screen you can specify

$hether you $ant to create a session or you $ant to use ca transaction to process the data directy

The S7SSI5N fied is then set according to your seection

copy SAP AG BC420 12-57

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 5888

025

983209 SAP AG 1999

9unction Module DltLS1ltBRUP

ALL 9UTI DltLS1ltBRUP

11PTIS

TltP1 6

NU1U1lt1RRR amp

-ith the function modue 232+5S73ltamp54P you can cose a atch input session

In 7G27PTI5NS you get various return vaues that can e ueried $ith SC9S4amp2

copy SAP AG BC420 12-58

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 5988

027

983209 SAP AG 1999

Subprogram LS1ltBRUP

FOR( cloe8rou-IF e9on -cloe batcgt 9nut 8rou

2A FUN2TION BD22OSEGROU)-

ESE-IF e8rouoened -

2A FUN2TION BD22OSEGROU)-

ENDIF-ENDIF-

ENDFOR(-

LS1ltBRUPlose session

lose error session

Include

DR16

The suprogram 2+5S73ltamp54P coses the atch input session The suprogram differentiates

et$een a norma I session (S7SSI5N E G) and a session opened $hen ca transaction

encountered an error (73ltamp54P35P7N7 E G)

copy SAP AG BC420 12-59

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 6088

080

983209 SAP AG 1999

Subprograms DltDPRG Dlt9I1LD

DltDPR

Dlt9I1LD

FOR( bdc9eld USING nam al-IF al 34 nodata-2EAR bdcdata- bdcdata1nam nam- bdcdata1al al- A))END bdcdata-ENDIF-

ENDFOR(-

FOR( bdcdltnro USING ro8ram dltnro- 2EAR bdcdata-Bdcdata1ro8ram ro8ram-Bdcdata1dltnro dltnro-Bdcdata1dltnbe89n - A))END bdcdata-ENDFOR(-

Include

DR16

The incude 2amp72GG contains t$o suprograms 23CNPamp5 and 23FI7+

Suprogram 23CNPamp5 fis the 2 tae $ith program names and screen numers

Suprogram 23FI7+ fis the 2 tae $ith fied names and vaues

7ach suprogram creates an entry in the 2 tae

copy SAP AG BC420 12-60

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 6188

086

983209 SAP AG 1999

9illing the D Table

erorm bdcdltnro u9n8 SA)(FD +- erorm bdc9eld u9n8 BD22URSOR RFD1BUKRS- erorm bdc9eld u9n8 BD2OK2ODE 6- erorm bdc9eld u9n8 RFD1BUKRS record1BUKRS- erorm bdc9eld u9n8 RFD1KTOKD record1KTOKD-

erorm bdcdltnro u9n8 SA)(FD -

erorm bdc9eld u9n8 BD22URSOR KNA1S)RAS- erorm bdc9eld u9n8 BD2OK2ODE 6- erorm bdc9eld u9n8 KNA1NA(E record1NA(E-

erorm bdc9eld u9n8 KNA1SORT record1SORT-

Recording Benerated automaticall(

from the recording

)ERFOR( bdcdltnro USING SA)(FD +- )ERFOR( bdc9eld USING BD22URSOR RFD1BUKRS-)ERFOR( bdc9eld USING BD2OK2ODE 6-)ERFOR( bdc9eld USING RFD1BUKRS record1BUKRS-)ERFOR( bdc9eld USING RFD1KTOKD record1KTOKD-

)ERFOR( bdcdltnro USING SA)(FD -

)ERFOR( bdc9eld USING BD22URSOR KNA1S)RAS-)ERFOR( bdc9eld USING BD2OK2ODE 6-)ERFOR( bdc9eld USING KNA1NA(E record1NA(E-

)ERFOR( bdc9eld USING KNA1SORT record1SORT- ---

The 2 tae is fied $ith data from the recording The suroutines 23CNPamp5 and

23FI7+ are used for this

The suroutines are caed in the reuired structure or seuence

copy SAP AG BC420 12-61

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 6288

08amp

983209 SAP AG 1999

erie)

SAPDatabase

SeJuential9ile

SAPDatabase

ALL TRASATIALL TRASATI

SeJuential9ile

ATE IPUTATE IPUT

D TableD TableD TableD Table

I Monitor

T

In contrast to atch input you can use ca transaction to directy pass data to the diaog interface

$ithout using a atch input session Cou use an interna tae (2 tae same structure and ayout

as atch input) to temporariy store your screen data Then you ca the desired transaction in your

program

Note 5n average the 2a Transaction method is 8 to times faster than using atch Input

copy SAP AG BC420 12-62

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 6388

08

983209 SAP AG 1999

all Transaction Program$ 1ample

RE)ORT abcbdcdcdeb9ct-

)ARA(ETERS d9mode DEFAUT A

udmode DEFAUT S-FOR( calltranact9on-2A TRANSA2TION FD

USING bdcdata (ODE d9mode

U)DATE udmode-

IF lt1ubrc NE - 5RITE 6 ---

ENDIF-ENDFOR(-

Screen

00

Screen

100

Screen

An additiona system ro area is added for the caed transaction The system uses this area for

processing the individua screens in the transactionH the data from the tae is added here After the

transaction is processed the second ro area is reeasedH the system continues processing in the first

ro area

Notes

In contrast to atch input there is no error ogging (error sessions) here For processing the caed

transaction the system uses the authoriDations of the user that caed the transaction The 2 tae

can ony hod data for one transaction run at a time efore another transaction is caed and its data

can e added you must eecute a amp7Famp7S= for the 2 tae

copy SAP AG BC420 12-63

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 6488

084

983209 SAP AG 1999

ALL TRASATI C6

RE)ORT 777-

2A TRANSA2TION FD USING bdcdata (ODE E-

Default for MD1 is A

2A TRANSA2TION 3tranact9oncode4 USING 3bdc1table4 C (ODE A E N C-

-ith the parameter 57 you can seect a specific dispay mode for processing the transaction The

foo$ing three modes are avaiae

A (ispay a)

If you eecute the program a the screens and a their data are dispayed This is the defaut vaue

for the 57 in 2A++ TampANSA2TI5N

N (ispay nothing)

The screens are not dispayed at a regardess of $hether any of them contained errors As soon as

the transaction has een fuy processed contro is returned to your program (The vaue of the

parameter 4PAT7 determines $hether dataase updates are eecuted or not)

7 (ispay errors ony)As soon as an error occurs in a screen the transaction is s$itched to dispay mode so that you can

correct the errors

These dispay modes are the same as those in the atch input session processing

copy SAP AG BC420 12-64

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 6588

082

983209 SAP AG 1999

RE)ORT 777-

2A TRANSA2TION FD USING BD2DATA U)DATE -

ALL TRASATI Camp

RE)ORT 777-

2A TRANSA2TION FD USING bdcdata U)DATE -

2A TRANSA2TION 3tranact9oncode4 USING 3bdc1table4 C (ODE A E N C U)DATE A S C -

Default for UPDAT1 is A

-ith the parameter 4PAT7 you can contro ho$ dataase updates arising from a transaction are

carried out There are three options

A (asynchronous updating) The caed transaction does not $ait unti the dataase has een

updated it simpy for$ard the updates to the SAP update service This usuay speeds up the 2T

program This processing mode is N5T recommended for arge data sets as the caed transaction

does not receive a competion message from the update modue

The caing 2T program therefore cannot te if the transaction has een successfuy competed Cou

shoud use the updating administration function (transaction S8) to determine $hether updating

$as terminated eary The error anaysis correction functions for are ess hepfu than $ith

synchronous updating

S (synchronous updating) -ith synchronous updating the caed transaction $aits unti a the

updates have een competed So processing is so$er than $ith synchronous updating The caed

transaction can ho$ever report any updating errors to the program $hich maes error

anaysiscorrection easier

+ (local updating) $ith oca updating the dataase is not updated in a separate process it is

updated in the caers process (see appication hep documentation for the AAP ey$ord S7T

4PAT7 TAS6 +52A+)

copy SAP AG BC420 12-65

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 6688

088

983209 SAP AG 1999

ALL TRASATI C

RE)ORT 777-DATA mtab T0)E TABE OF bdcm8coll-

2A TRANSA2TION FD USING bdcdata (ESSAGES INTO mtab-

2A TRANSA2TION 3tranact9oncode4 USING 3bdc1table4 C (ODE A E N C U)DATE A S C (ESSAGES INTO 3metab4 C -

7SSAlt7S specifies that a system messages that are output during the eecution of a 2A++

TampANSA2TI5N are $ritten to the interna tae L7SSTA The interna tae must have the

structure 2Slt25++

4nie the cassica atch input processing $ith sessions 2A++ TampANSA2TI5N does not offer any

specia processing procedures for transactions containing errors There are no restart functions for

transactions that contain errors or that cause updating terminations

copy SAP AG BC420 12-66

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 6788

083

983209 SAP AG 1999

ALL TRASATI C4

RE)ORT 777-DATA mltot T0)E ctuaram-

2A TRANSA2TION FD USING BD2DATA

O)TIONS FRO( mltot-

2A TRANSA2TION 3tranact9oncode4 USING 3bdc1table4 C (ODE A E N C U)DATE A S C (ESSAGES INTO 3metab4 C O)TIONS FRO( ot C -

RE)ORT 777-DATA mltot T0)E ctuaram-2A TRANSA2TION FD USING bdcdata

O)TIONS FRO( mltot-

The addition 5PTI5NS enaes the ca transaction statement to e controed through a structure

The structure must have the dictionary type 2T43PAampAS

The addition 5PTI5NS Famp5 must not e comined either $ith the addition 57 or $ith

4PAT7 ore information on the net side

copy SAP AG BC420 12-67

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 6888

085

983209 SAP AG 1999

Structure TUltPARAMS

DISMD1 Procen mode anaoo o addon amp

UPDMD1 $pdae mode anaoo o addon $PA

ATTMD1 CA mode CA conro

D19SI1 orce de=a EndoE e drn procen

RAMMIT +o eD a Camp amp(

IPT +o a ac np eonF a F S-B+P SPAC

I1D +o a ac np eon a=er end o= BC daa

The components are defined as foo$s

The components 7FSIM7 ampA25IT N5INPT and N5I7N can have the foo$ing

vaues KGK E Ces or K K E No

If the addition 5PTI5NS Famp5 is not specified the foo$ing settings appy to the contro

parameters

IS57 from addition 57

4P57 from addition 4PAT7

2ATT57 2ATT not active

7FSIM7 o not not use defaut $indo$s siDe

ampA25IT Successfu eit at 25IT -5amp6

N5INPT atch input session active (SC9INPT E G)

N5I7N atch input session sti active after end of 2 data

copy SAP AG BC420 12-68

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 6988

087

983209 SAP AG 1999

SMSBID Message ID

SMSBT Message T(pe C1GIGWGSGA

SMSB Message umber

SMSB6 Message ariable 6

SMSBamp Message ariable amp

SMSB Message ariable

SMSB4 Message ariable 4

SMSBID Message ID

SMSBT Message T(pe C1GIGWGSGA

SMSB Message umber

SMSB6 Message ariable 6

SMSBamp Message ariable amp

SMSB Message ariable

SMSB4 Message ariable 4

Return code$

S(stem fields$

alue Meaning

0 Successful

6000 1rror in transaction

6000 1rror in processing call transaction

see also the s(stem fields specified

alue Meaning

0 Successful

6000 1rror in transaction

6000 1rror in processing call transaction

see also the s(stem fields specified

9ield name Meaning9ield name9ield name MeaningMeaning

Return ode and S(stem 9ields

The return code is used to specify $hether the caed transaction $as processed successfuy In

addition severa system fieds are fied The numer I type and variaes of the diaog message

output y the caed transaction Cou need this information to output the message tet

copy SAP AG BC420 12-69

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 7088

030

983209 SAP AG 1999

Benerated Program of the TA Recorder

REFRES= (ESSTAB-

2A TRANSA2TION tcode USING bdcdata (ODE ctumode U)DATE cudate (ESSAGES INTO metab-OO) AT metab- ENDOO)-IF lubrc 34 AND e8rou 34 S)A2E- IF e8rouoenend - 2A FUN2TION BD2O)ENGROU) E)ORTING ---------

--------- E8rouoened - ENDIF- 2A FUN2TION BD2INSERT E)ORTING T2ODE tcode TABES D0N)ROTAB bdcdata-ENDIF-REFRES= bdcdata-

Message table output

pen error session

Insert data record that

has errors into error

session

If you have seected ca transaction on the seection screen the generated program runs as foo$s

The onine transaction is caed $ith ca transaction and passed to tae 2ATA A the

messages arising during the ca transaction are put in the interna tae 7SSTA

7SSTA is output as a ist

If you have specified an error session ( 73ltamp54P L SPA27) on the seection screen and the

ca transaction comes across an error (+3S4amp2 L 0) the error session is opened The error

session is ho$ever ony opened once Then the data record is paced in the session

A the other data records that have errors $ith ca transaction are paced in the same session

copy SAP AG BC420 12-70

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 7188

036

983209 SAP AG 1999

The Transaction Recorder

PrinciplesPrinciples

Recording )ith the LSMWRecording )ith the LSMW

Principles of atch Input and all TransactionPrinciples of atch Input and all Transaction

Integrating the TA Program into the DWIntegrating the TA Program into the DW

Using the TA Recorder Using the TA Recorder

copy SAP AG BC420 12-71

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 7288

03amp

983209 SAP AG 1999

Integrating into the DW

Transfer program

AAP Dictionar(

Integrate

SDA0

SDA6

SDAamp

SDA

Cou can integrate the generated program into the G9- The structure of the fie must e created

in the AAP ictionary The taes SGA0 SGA8 SGA1 and SGA $i e fied

copy SAP AG BC420 12-72

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 7388

03

983209 SAP AG 1999

DW Release 42

Goo

-B eeae 45

aa ran=er ogtec

Int customer data transfer ob-ect

ecord =ed

Dece daa ran=er

d Goo

The ampunction ampor interatin TA recorder prora$s is

i$ple$ented in the

D+-B in Release

The recorder can e integrated as of ampeease and it is provided in the G9- ampeease

ltot to the G9- ampeease 5n the initia screen you can integrate programs y choosing ampoto

( +nt customer ata transfer o-ect

copy SAP AG BC420 12-73

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 7488

034

983209 SAP AG 1999

reating Program as D b-ect

Comer ran=er ogtec

ampgtec ype

Sor eD =or ogtec

aa ran=er proram

Srcre name

9900

(+A1

Cane comer

ZBCA+G

ZB

ustomer transfer ob-ect

umber bet)een 7000 and 7777

b-ect t(pe

Assignment to R ob-ect

Short tet for D ob-ectShort description

Data transfer program

ame of generated program

Structure name

A structure Cstructure la(out )ith this name is created in

the AAP Dictionar(

For ampeease transfer oects $ere not organiDed y 5amp oects ut y a G numer (00089

OOOO) The numer range O0009OOOO is reserved for customers

To create a connection to the ne$ G 9- you must assign the program to a 5amp oect

2reate a short tet for the G oect This tet $i appear in the method seection ist

Specify the program to e incuded

Specify a name for the structure to e created in the AAP ictionary

Note $he generated program appears under program type +N and not under program type

-

copy SAP AG BC420 12-74

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 7588

032

983209 SAP AG 1999

Adantages

Automatic program registration in the DW in

Release 48

ou can use all the functions defined for

standard ob-ects

1ception$ The (reate ampile ith data

function

If you incuded the oect in the ampeease $orench it is automaticay avaiae in the ampeease

B $orench

A the $orench functions are avaiae for your oect ecept for Create files ith transfer ata

copy SAP AG BC420 12-75

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 7688

038

983209 SAP AG 1999

ou are no) able to$

The Transaction Recorder$ Unit Summar(

Use the recording function in the LSMW to create

a batch input session )ith the data from the

eternal s(stem

Use the TA Recorder to create (our o)n data

transfer program

Anal(e programs that )or+ )ith batch input or

call transaction

Integrate the TA Recorder programs into the

DW

copy SAP AG BC420 12-76

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 7788

ercise 1

nit $ -ecorder

$opic 2reating etors

$ransaction -ecorder ercise 1

bull 2reating detors $ith eterna numer assignment

bull etor numers M9980008 to M9980080

Address data for detors $ith eterna numer assignment is to

e transferred using program ampFI700

ro4ect F5

Supro4ect +5

-un +575

$as)s 85 95 8S25

9oad program -F+00

8 In the foo$ing eercises eisting data is to e changed Therefore these detors $ith

eterna numer assignment have to first e created

898 4nder suproect 79 create run 797G9 $ith the name Detors ith

eternal numers

copy SAP AG BC420 12-77

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 7888

891 2reate the foo$ing three tass The tass map the foo$ing process steps

convert data create + session and process + session

89198 In run 797G9 create the foo$ing tas

9 Tas AP9

9 Name 2onvert data 9 Tas type AP

9 Program type +S-

Seect the foo$ing +S- oect

+S- proect 2109

+S- suproect 7I9

+S- oect I997GT

89191 In run 797G9 create the foo$ing tas 9 Tas +5A9

9 Name 2reate I session

Tas type +5A

9 Program type INP

Seect program ampFI700 $ith the variant

I97G9

8919 In run 797G9 create the foo$ing tas

9 Tas S29

9 Name Process I session Tas type S2

9 Program type amp7P5

Seect program ampS2S4 $ith the variant

S497G9

Note that you have to correct the seuence of the tass 2onvert data

create + session and process + session

4se the uttons

89 Start the run

The detors $i e created $ith eterna numer assignments

89 2hec in transaction F0 that the detors M9980008 to M9980080 have een

created

copy SAP AG BC420 12-78

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 7988

ercise

nit $ransaction -ecorder

$opic -ecording function in the 9S8(

bull 2reate a recording using the +S-

bull ltenerate a atch input session

2hange the detor address data in the amp System

Name of the recording +

Name of the file +2055+F9

8 2reate the recording 7I3 using the +S- ampecord the transaction F01 (2hange

detor)

898 efore you create the recording first test the transaction onineQ

For the recording use detor M9980008 5n the initia screen of the F01

maintain the foo$ing fieds ony

etor etor M9980008

2ompany code 0008

Address data seect

Note $he data record must e saved hile recording

891 aintain the names and the descriptions for the foo$ing fieds

Name city street posta code and teephone numereete a other fieds in screen 880 from the recording (eg S5ampT+ +AN8

SPampAS)

4se the same technica names as sho$n in the tae eo$ (automatic fied

mapping)

copy SAP AG BC420 12-79

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 8088

1 2reate the suproect 7I9 and the ne$ oect TA3 in your proect 2109

aintain the oect attriutes and seect the item atch input recording Seect your

recording 7I3

2reate the source structure address

2reate the source fieds according to the tae eo$ 5r copy them from proect 2109S37N suproect 7I900 oect TA900

198 Fie setup The data from the egacy system are dispayed in the foo$ing tae

Fied name Fied type Fied ength escription

N5 2 8B etor numer

NA7 2 Name

STamp77T 2 Street

2ITC 2 2ityPace of residence

MIP 2 80 Posta code

T7+ 2 8B Teephone numer

191 aintain the fied mapping 4se the automatic fied mapping (via menu item

7tras)

19 Specify the fies 5ny maintain the fie name of the source fie

Name of the fie 21099IFI+7

2odepage 8800

19 Import the data and convert them ispay the data in each caseQ

19 2reate a atch input session

19B ampun the atch input session

copy SAP AG BC420 12-80

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 8188

ercise 3

nit $ransaction -ecorder

$opic -ecording ith the $ -ecorder

bull ltenerate a recording using the TA recorder

bull Test the recording

2hange the address data of detors in the amp system

Name recording $+

Name of the file +2055+F9

8 2reate the recording TA37I3 using the transaction recorder ampecord the

transaction F01 (change detor)

898 4se detor M9980008 for the recording 5n the F01 initia screen ony

maintain the foo$ing fieds

etor etor M9980008

2ompany 2ode 0008

Address data seect

Note $he data record must e saved hen recording

eete a fieds that do not eist in the source fie 21099IFI+7 from screen

880 in the recording (eg 6NA89S5ampT+ 6NA89+AN8 6ANNQ9SPampAS) Note o not deete fieds ampF01946ampS and ampF0190880

Save the recording no$

1 S$itch to the recordings overvie$

198 Process the recording $ith the processing mode A (dispay a)

191 Process the recording $ith the processing mode RN (no dispay)

19 If the recording has een tested and no error has occurred generate a I session

and run it using the I monitor If an error shoud occur generate the recordingagainQ

copy SAP AG BC420 12-81

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 8288

From the recording generate the program M21037I3 in your deveopment cass

2109 Seect the foo$ing

bull ampead fied contents from fie

bull 2reate test data in the fie 2103dei3test3tt

98 Save this program and eecute it ltenerate one I session each and process it

2arry out the same steps again using the ca transaction

The generated program shoud no$ e changed so that fie 21099IFI+7 can e

read and processed

98 2hange the defaut vaue of the fie name (parameter dataset) in 21099

IFI+7

91 2hange the structure definition eete the company code fied and the address

data checo from the structure

9 2hange the su9routine ca perform dc3fied for the company code (KampF019

46ampSK) so that the vaue 0008 is transferred

9 2hange the su9routine ca perform dc3fied for the address data checo

(KampF0190880K) so that the vaue G is transferred

9 Start the program again and read the data from the fie 21099IFI+7 $ith

detor data ltenerate a I session $ith it and run it

copy SAP AG BC420 12-82

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 8388

033 Include DR16INCLUDE BDCRECX1

SELECTION-SCREEN BEGIN OF LINE

PARAMETERS SESSION RADIOBUTTON GROUP CTU create sessi SELECTION-SCREEN COMMENT $amp TEXT-S FOR FIELD SESSION

se(ecti-scree )siti +

PARAMETERS CTU RADIOBUTTON GROUP CTU ca(( trasacti

SELECTION-SCREEN COMMENT $amp TEXT-S FOR FIELD CTU

SELECTION-SCREEN END OF LINE

SELECTION-SCREEN BEGIN OF LINE

SELECTION-SCREEN COMMENT $amp TEXT-S1 FOR FIELD GROUP

se(ecti-scree )siti $+

PARAMETERS GROUP1$amp r) ae 0 sessi

SELECTION-SCREEN COMMENT $amp TEXT-S+ FOR FIELD CTUMODE

se(ecti-scree )siti

PARAMETERS CTUMODE LIE CTU2PARAMS-DISMODE DEFAULT 3N3

A4 s56 a(( 78)rs

E4 s56 78)r errr (8

N4 7 t 7is)(a8 78)r

SELECTION-SCREEN END OF LINE

SELECTION-SCREEN BEGIN OF LINE

SELECTION-SCREEN COMMENT $amp TEXT-S$ FOR FIELD USER

se(ecti-scree )siti $+

PARAMETERS4 USER1$amp DEFAULT S9-UNAME ser 0r sessi i atc5

SELECTION-SCREEN COMMENT $amp TEXT-S FOR FIELD CUPDATE

se(ecti-scree )siti

PARAMETERS CUPDATE LIE CTU2PARAMS-UPDMODE DEFAULT 3L3

S4 s8c5rs(8

A4 as8c5rs(8

L4 (ca(

SELECTION-SCREEN END OF LINE

SELECTION-SCREEN BEGIN OF LINE

SELECTION-SCREEN COMMENT $amp TEXT-S FOR FIELD EEP

se(ecti-scree )siti $+

PARAMETERS4 EEP AS CltECBOX 3 3 = 7e(ete sessi i0 0iis5e7

3X3 = gtee) sessi i0 0iis5e7

SELECTION-SCREEN COMMENT $amp TEXT-S FOR FIELD E2GROUP

copy SAP AG BC420 12-83

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 8488

se(ecti-scree )siti

)araeters E2GROUP1$amp r) ae 0 errr-sessi

SELECTION-SCREEN END OF LINE

SELECTION-SCREEN BEGIN OF LINE

SELECTION-SCREEN COMMENT $amp TEXT-S FOR FIELD ltOLDDATE

se(ecti-scree )siti $+

PARAMETERS4 ltOLDDATE LIE S9-DATUM

SELECTION-SCREEN COMMENT +11amp TEXT-S$ FOR FIELD E2USER

se(ecti-scree )siti

PARAMETERS4 E2USER1$amp DEFAULT S9-UNAME ser 0r errr-sessi

SELECTION-SCREEN END OF LINE

SELECTION-SCREEN BEGIN OF LINE

SELECTION-SCREEN COMMENT +11amp TEXT-S FOR FIELD E2EEP

se(ecti-scree )siti

PARAMETERS4 E2EEP AS CltECBOX 3 3 = 7e(ete sessi i0 0iis5e7

3X3 = gtee) sessi i0 0iis5e7

SELECTION-SCREEN END OF LINE

SELECTION-SCREEN BEGIN OF LINE

SELECTION-SCREEN COMMENT +11amp TEXT-S FOR FIELD E2ltDATE

se(ecti-scree )siti

PARAMETERS4 E2ltDATE LIE S9-DATUM

SELECTION-SCREEN END OF LINE

SELECTION-SCREEN SIP

SELECTION-SCREEN BEGIN OF LINE

SELECTION-SCREEN COMMENT 1amp TEXT-S1 FOR FIELD NODATA

PARAMETERS4 NODATA DEFAULT 33 LOER CASE 7ata

SELECTION-SCREEN END OF LINE

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

Batc5i)t7ata 0 si(e trasacti

DATA4 BDCDATA LIE BDCDATA OCCURS ITlt ltEADER LINE

essaes 0 ca(( trasacti

DATA4 MESSTAB LIE BDCMSGCOLL OCCURS ITlt ltEADER LINE

errr sessi )ee7 3 3 r 3X3amp

DATA4 E2GROUP2OPENED

essae tets

TABLES4 T1

copy SAP AG BC420 12-84

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 8588

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

at se(ecti scree

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

AT SELECTION-SCREEN

r) a7 ser st e 0i((e7 0r create sessi

IF SESSION = 3X3 AND

GROUP = SPACE OR USER = SPACE

MESSAGE E1MSamp

ENDIF

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

)e 7ataset

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

FORM OPEN2DATASET USING P2DATASET

OPEN DATASET P2DATASET IN TEXT MODE

IF S9-SUBRC

RITE4 TEXT-E S9-SUBRC

STOP

ENDIF

ENDFORM

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

c(se 7ataset

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

FORM CLOSE2DATASET USING P2DATASET

CLOSE DATASET P2DATASET

ENDFORM

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

create atc5i)t sessi

t 0r ca(( trasacti siamp

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

FORM OPEN2GROUP

IF SESSION = 3X3

SIP

RITE4 $amp 3Create r)3I1amp GROUP

SIP

)e atc5i)t r)

CALL FUNCTION 3BDC2OPEN2GROUP3

EXPORTING CLIENT = S9-MANDT

copy SAP AG BC420 12-85

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 8688

GROUP = GROUP

USER = USER

EEP = EEP

ltOLDDATE = ltOLDDATE

RITE4 amp 3BDC2OPEN2GROUP3I$amp

1$amp 3retrc7e43I+amp

S9-SUBRC

ENDIF

ENDFORM

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

e7 atc5i)t sessi

ca(( trasacti si4 errr sessiamp

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

FORM CLOSE2GROUP

IF SESSION = 3X3

c(se atc5i)t r)

CALL FUNCTION 3BDC2CLOSE2GROUP3

RITE4 amp 3BDC2CLOSE2GROUP3Iamp

1$amp 3retrc7e43I+amp

S9-SUBRC

ELSE

IF E2GROUP2OPENED = 3X3

CALL FUNCTION 3BDC2CLOSE2GROUP3

RITE4

RITE4 amp 3Fe5(era))e 6r7e eret3Iamp

ENDIF

ENDIF

ENDFORM

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

Start e6 trasacti accr7i t )araeters

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

FORM BDC2TRANSACTION USING TCODE

DATA4 L2MSTRINGamp

DATA4 L2SUBRC LIE S9-SUBRC

atc5 i)t sessi

IF SESSION = 3X3

CALL FUNCTION 3BDC2INSERT3

EXPORTING TCODE = TCODE

TABLES D9NPROTAB = BDCDATA

RITE4 3BDC2INSERT3Iamp

copy SAP AG BC420 12-86

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 8788

TCODE

3retrc7e43I+amp

S9-SUBRC

3RECORD43

S9-INDEX

ca(( trasacti si

ELSE

REFRESlt MESSTAB

CALL TRANSACTION TCODE USING BDCDATA

MODE CTUMODE

UPDATE CUPDATE

MESSAGES INTO MESSTAB

L2SUBRC = S9-SUBRC

RITE4 3CALL2TRANSACTION3

TCODE

3retrc7e43I+amp

L2SUBRC

3RECORD43

S9-INDEX

LOOP AT MESSTAB

SELECT SINGLE FROM T1 ltERE SPRSL = MESSTAB-MSGSPRA

AND ARBGB = MESSTAB-MSGID

AND MSGNR = MESSTAB-MSGNR

IF S9-SUBRC =

L2MSTRING = T1-TEXT

IF L2MSTRING CS 313

REPLACE 313 ITlt MESSTAB-MSGH1 INTO L2MSTRING

REPLACE 3$3 ITlt MESSTAB-MSGH$ INTO L2MSTRING

REPLACE 33 ITlt MESSTAB-MSGH INTO L2MSTRING

REPLACE 33 ITlt MESSTAB-MSGH INTO L2MSTRING

ELSE

REPLACE 33 ITlt MESSTAB-MSGH1 INTO L2MSTRING

REPLACE 33 ITlt MESSTAB-MSGH$ INTO L2MSTRING

REPLACE 33 ITlt MESSTAB-MSGH INTO L2MSTRING

REPLACE 33 ITlt MESSTAB-MSGH INTO L2MSTRING

ENDIF

CONDENSE L2MSTRING

RITE4 MESSTAB-MSGT9P L2MSTRING$+amp

ELSE

RITE4 MESSTAB

ENDIF

ENDLOOP

copy SAP AG BC420 12-87

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 8888

SIP

Eree 0e5(era))e

IF L2SUBRC AND E2GROUP SPACE

IF E2GROUP2OPENED = 3 3

CALL FUNCTION 3BDC2OPEN2GROUP3

EXPORTING CLIENT = S9-MANDT

GROUP = E2GROUP

USER = E2USER

EEP = E2EEP

ltOLDDATE = E2ltDATE

E2GROUP2OPENED = 3X3

ENDIF

CALL FUNCTION 3BDC2INSERT3

EXPORTING TCODE = TCODE

TABLES D9NPROTAB = BDCDATA

ENDIF

ENDIF

REFRESlt BDCDATA

ENDFORM

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

Start e6 scree

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

FORM BDC2D9NPRO USING PROGRAM D9NPRO

CLEAR BDCDATA

BDCDATA-PROGRAM = PROGRAM

BDCDATA-D9NPRO = D9NPRO

BDCDATA-D9NBEGIN = 3X3

APPEND BDCDATA

ENDFORM

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

Isert 0ie(7

Page 23: BC420_46C - 012The Transaction Recorder

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 2388

0amp

983209 SAP AG 1999

Assigning 9ield ames

Recording R16 Demolt6

Dlt=D1 UPDA

DltSUSR SAPLSA6

DltSUSR SAPLSA6

DltURSR SA6ltD0600T1L

ADDR6ltDATAAM16 Lisa Eofmeister

ADDR6ltDATAPSTltD1 0amp602

ADDR6ltDATAIT6 oston

ame

+ame

ecrpon

e=a ae

A1AA-+A1

A1AA-+A1

Comer name

a o=meer

Screen =ed

ustomer name

double clic+

Cou can assign names for each recorded fied The specia fieds (2356257 2324ampS5amp

and 23S4S2amp77N) are not incuded here Cou can choose the fied names -hen the atch

input session is created the contents of these fieds are assigned to the target fieds specified in the

eft coumn

Functions

efaut Assigns to the fied names of the underying target fied and its fied description

ampeset eetes fied name and fied description

oue cic 7dits fied name fied description and defaut vaue

Note Cou can use fied names more than once =o$ever the fied name is ony avaiae once in thefied mapping For this reason it is not practica to use fied names more than once

For a those fieds for $hich you do not assign a name the defaut vaue is used $hen the atch

input session is created These defaut vaues can e seen as constants This is especiay usefu for

chec oes (for eampe 08 vie$ seection)

The +S- supports automatic fied mapping Source fieds and target fieds can e assigned to each

other automaticay The fieds are assigned to the corresponding fieds of the same name Therefore

the fied names of the source structure shoud e given the same or simiar names as the fied names

in the target structure

copy SAP AG BC420 12-23

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 2488

0amp4

983209 SAP AG 2001

Addinggtremoing screen fields

Repeating recording

9or identical field names the name and description are

assigned automaticall(

1diting Recording

02-($++

(+A1-A+

(+A1-+A1

(+A1-Samp

(+A1-+A2

(+A1-SAS

Comer accon nmer

e

+ame 1

Sor =ed

+ame 2

Sree

Selection of all

aailable screen

fields

Cou can ater add ne$ screen fieds if you need to 6eep in mind that fieds shoud ony e added in

paces $here they are aso provided on the screen other$ise you $i get an error $hen the I

session is processed

After saving you $i get the message The data has een saved successfuy No$ the recordings

are avaiae for the oect attriutes

If you repeat the recording you can record a ne$ screen seuence $ith ne$ fieds Provided that the

fied names (eg 6NA89NA78) are identica the names and descriptions are automaticay

assigned

copy SAP AG BC420 12-24

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 2588

0amp2

983209 SAP AG 1999

b-ect T(pe and Import Method$ Recording

Standard atch Input gt Direct Input

atch Input Recording

API

IDoc

ampgtec ype ) mpor meod

Bac np recordn

ecordn ec1

The recording is no$ avaiae $ith the oect attriutes

Net you create a proect or su9proect in the +S- and specify process the data transfer

Cou eecute the data transfer as in the standard system

efine the source fieds and structures

efine the fied mapping

ampead and convert the data

2reate and import a atch input session

copy SAP AG BC420 12-25

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 2688

0amp8

983209 SAP AG 1999

The Transaction Recorder

PrinciplesPrinciples

Recording )ith the LSMWRecording )ith the LSMW

Principles of atch Input and all TransactionPrinciples of atch Input and all Transaction

Integrating the TA Program into the DWIntegrating the TA Program into the DW

Using the TA Recorder Using the TA Recorder

copy SAP AG BC420 12-26

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 2788

0amp3

983209 SAP AG 1999

Transaction Recorder

Online

Transaction

RecordingTransfer Program

T

Included in the Batch Input Monitor

Cou use the transaction recorder to record transactions and then use the transaction recording to

generate a transfer program The program ao$s you to transfer data using either atch input or ca

transaction

copy SAP AG BC420 12-27

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 2888

0amp5

983209 SAP AG 1999

hanging ustomer Data$ Initial Screen

9ield ontents

BCC$Samp $SZAV

BCamp(Camp )00

02-($++ Z-88-10000

02-0110

02-0130

$SZAV

9ield ame

Comer

Company code

Z-88-10000

Genera daa

Comer Z-88-10000

+ame

9ield ontents

BCamp(Camp $PA

BCS$BSC SAPSZA1 0300ASS

BCS$BSC SAPSZA1 0301Camp$

BCC$Samp SZA10100-+$B

A1AA-S Garden Sree

A1AA-amp$S+$1 34

A1AA-PampSCamp1 02105

9ield ame

Screen

111

Screen

106

In the aove eampe the transaction Change customer F01 is recorded

copy SAP AG BC420 12-28

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 2988

0amp7

983209 SAP AG 2001

hange Debitor$ Pa(ment Transactions C6

Banlt dea

Screen

10

9ield ontent

BCC$Samp (+B(-BA+(+01

BCamp(Camp BA+((+B(-BA+(S01

(+B(-BA+(01 12345679

(+B(-BA+(+01 22222222

Debitor 5560000

9ield ame

Inde

copy SAP AG BC420 12-29

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 3088

00

983209 SAP AG 1999

hanging ustomer Data$ Pa(ment Transactions Camp

Addre

an+ countr( US

an+ code 6amp42837

Banlt dea

ustomer 5560000

9ield ontents9ield ame

BCC$Samp (+A1-(+ZA

BCamp(Camp $PA

(+B(-Z01

Screen

10

Screen

100

SAPLBA

9ield ontents

BCC$Samp B+(A-BA+(A

BCamp(Camp +

B+(A-BA+(A +aona Banlt

9ield ame

In different transactions the modue poo may change This is the case $ith for eampe customer

master data The TA recorder records modue poo changes automaticay

copy SAP AG BC420 12-30

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 3188

06

983209 SAP AG 1999

Eierarch( Displa( of the Recording

02amp

02

SAP02 0106

BCC$Samp 02-0130

BCamp(Camp )00

02-($++ -88-10000

02-0110

02-0130

SAP02 0111

BCamp(Camp V

BCC$Samp A1AA-amp$S+$1

A1AA-S Garden Sree

Recording

-ith the TA recorder the resuts are aso a ist in a hierarchy dispay =o$ever you cannot assign

your o$n fied names as you can in the +S-

copy SAP AG BC420 12-31

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 3288

0amp

983209 SAP AG 1999

Recording erie)

Recording

Transfer program

9unction module

ontains onl( the data

from the recording

Test data

Test

reate

reate

reate

reate

1dit hange recording

Process recording

Cou can edit the recording as needed

The recording can e tested and eecuted again The screens are run through in the same $ay as in

the recording

The recording can then e used to create

atch input sessions

Test data

ata transfer programs $ith atch input or ca transaction

Function modues

copy SAP AG BC420 12-32

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 3388

0

983209 SAP AG 1999

1 02 BS

2 SAP02 106

3 BCC$Samp $SZAV

4 BCamp(Camp )00 5 02-($++ -88-10000

6 02-0110

7 02-0130

8 $SZAV

9 SAP02 111

10 BCamp(Camp V

11 BCC$Samp A1AA-amp$S+$1

12 A1AA-S Garden Sree

Program Screen St 9ield ame 9ield alue

Recording 1ditor

Recording

Add gt delete lines 9ormat chec+

Import gt eport of recording

In the editor you can add or deete ines Cou can aso change the contents of individua ines

-ith the function Chec) you can specify $hether the edited version of the recording sti has the

correct synta

Cou can aso eport import recordings to from a seuentia fie

After editing save the recording changes

copy SAP AG BC420 12-33

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 3488

04

983209 SAP AG 1999

Recording Seeral Transaction Runs

RecordingF

Directl( after the first recordingG or

In the displa( mode of the recording

In this step you can record additiona transactions and add additiona transaction runs to the

recording

Cou can record the additiona transactions directy after a recording or in the edit screen of a

recording

copy SAP AG BC420 12-34

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 3588

02

983209 SAP AG 1999

1ditor$ Importing and 1porting Recordings

6 T 9D0amp S

amp SAPM90ampD 608

DltURSR

4

2

8 SAPM90ampD 666

60

66

Program Screen St 9ield name 9ield alue

cempA

e name

aa =orma

cemp

A

e name

aa =orma

1port

Import

Presentation Serer

If the editor functions in the systems do not provide a the functions you need you can do$noad the

recording to your presentation server using the Eort function and then edit the recording using a

P2 editor

Cou use the Import function to import the data ac into the amp System ae sure the fie is sti in

the correct format

copy SAP AG BC420 12-35

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 3688

08

983209 SAP AG 1999

Processing the Recording

Recording

Process )ith ALL TRASATI

Parameer

Proce mode$pdae mode

CA mode

e=a e

Con a=er comm

+o a B eon

nd +o a B mode

A

A

T

The recording can e eecuted directy The data from the recording is used and the transaction is

processed $ith ca transaction

2a transaction provides a range of options for caing appication transactions $hich are discussed

on the foo$ing t$o pages

copy SAP AG BC420 12-36

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 3788

03

983209 SAP AG 1999

Process mode

Update mode

ATT mode

Processing Recording )ith T 6

A

1

Displa( all screens

Displa( errors onl(

o displa(

L

S

A

Local

S(nchronous

As(nchronous

A

o ATT

ATT )ithout indiidual screen control

ATT )ith indiidual screen control

Processing mode

=ere you can specify the processing mode 9 it is the same as the processing mode for atch input

4pdate mode

=ere you can specify the update mode For more information see the unit ca transaction

2ATT mode

=ere you can mae specia settings if you $ant to test the recording under 2ATT conditions (ony

necessary for 2ATT runs) Specia functions are caed in the 2ATT too for each screen at the end of

P5 and at the start of PAI

copy SAP AG BC420 12-37

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 3888

05

983209 SAP AG 1999

Default sie

ont after commit

ot a I session

1nd$ ot a I mode

Processing Recording )ith T amp

The screen standard sie is used for the

processing

ommit )or+ does not end the processing

o I mode is actie The transaction )ill run

through as in online

I mode is selected nce the data in the D

table is processedG the I mode is set to inactie

Standard siDe

If you seect this the screens are processed in the standard siDe in the foreground (in foreground or

dispay errors ony) Note the standard siDe is a$ays used for acground processing

Further after commit

The first commit $or in a transaction does not ead to the end of the recording

Note A atch input transaction is ended $ith the first commit $or

No I mode

The system fied SC9INPT is not set (SC9INPT E ) So transactions are run through as in onine

7nd No I mode

5ny use if you choose the processing mode 7 (dispay errors ony) Then the transaction is processed in the acground in atch input mode and if there is an error the screens run through in

the foreground

copy SAP AG BC420 12-38

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 3988

07

983209 SAP AG 1999

I Mode

atch input

mode

nline

Some transactions behae differentl( in batch input mode

than in online Cbatch input capabilit(

atch input mode sets the s(stem field SIPT H

Not every transaction can run the same onine and in atch input mode The transaction must decide

itsef $hether it is caed onine or in atch input mode

The system sets the system fied SC9INPT E G if the atch input mode is active (this aso appies

to ca transaction) From this system fied the transaction can identify $hether to run onine or in

atch input mode

copy SAP AG BC420 12-39

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 4088

040

983209 SAP AG 1999

reating a Session 9rom the Recording

Recordingnl( contains the data

from the recording

Seon name 02amp

Aoraon ampBS(eep eon

oclt dae 10102000

Cou can create a atch input session directy from the recording that you can then process using the

atch input monitor

copy SAP AG BC420 12-40

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 4188

046

983209 SAP AG 1999

reating Test Data

Test Data

Recording

ranranpBC420AAe name

The file onl( contains the data from the recording

Rgt

Application Serer

Structure

Cou can create a fie from the recordingH the fie $i contain a the fieds from the recording The

fieds are added to the fie $ith the ength you specified in the definition

The fied order corresponds to the order in the recording overvie$ Technica fieds

(2356257 2324ampS5amp and so on) are incuded

The data can ony e stored on the appication server If you do not specify a path the fie is stored in

the $or directory of the appication server

If the specified test fie aready eists the ne$ data record is added to this fie

copy SAP AG BC420 12-41

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 4288

04amp

983209 SAP AG 1999

ed conen

reating a Program

Recording

ZBC420ampProram name

Transfer Program

e daa

ead =rom =e

ran=er =rom recordn

reate

9ile nameTest data

ranranpBC420AA

Cou can generate a program from the recording

In the foo$ing diaog o enter a program name In addition you can choose the type and method

for fiing the maintained fied contents from the recorded screens

4se the vaues used for the recording If you reuire feie data transfer you $i have to modify

this program ater

ParameteriDe the input vaues and read these vaues from a fie A data structure is created for

parameteriDationH the data records are read from an eterna fie into this data structure The

program assumes the fie $as taiored to this data structure

If you have decided to parameteriDe the input vaues you shoud aso create a test fie during

generation To do this seect the checo and enter a name for the fie

The attriute maintenance screen of the AAP editor appears aintain the attriutes and save the

program

copy SAP AG BC420 12-42

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 4388

04

983209 SAP AG 1999

Program 9unctions

Online

transaction

Transfer program

To

error

1rror

ption 6ption ampFlat SAP

structure

Monitor

Cou have no$ generated a data transfer program for importing data into the amp System The

program can eecute the data transfer using atch input or ca transaction

If you choose option 1 and there is an error the data record is paced into a atch input session

copy SAP AG BC420 12-43

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 4488

044

983209 SAP AG 1999

Benerating 9unction Modules

Recording

Zcreaedeor ncon mode

ncon rop

Sor eD

ZBC420

Creae comer

9unction module

nl( one data record can be processed at a time

In the net diaog o you can generate a function modue a function group and short tet from the

recording The function modue is automaticay created in the function group

copy SAP AG BC420 12-44

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 4588

042

983209 SAP AG 1999

9unction of 9unction Modules

Online

transaction

To

error

1rror

ption 6 ption amp

9unction module

Import

Parameter 1port

parameter

Tables

M1SSTA

Monitor

S$BC

Import interface

The import interface consists of a technica part and the fieds from the recording (A parameter is

created for each input fied of the recorded transactions)

7port interface

Simpy consists of the parameter S4amp2 The function modue $i return a vaue in the system

fied SC9S4amp2 after caing ca transaction This return vaue is set to Dero if the data record has

een correcty processed (5ny appies to 2T)

If a session is created you $i e notified $hether the data record coud e paced into the session

Tae interfaceThis is used ony if the function modue $ors $ith ca transaction The tae contains a the

system messages

copy SAP AG BC420 12-45

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 4688

048

983209 SAP AG 1999

Import Interface of 9unction Module

$

Technical

fields

Data

fields

BI session or CALL TRANSACTION

Processin $ode

pdate $ode

a$e oamp BI session iamp (T initial)

Bacround user iamp (T initial)

Delete session aampter processin

Loc date oamp session

ODATA indicator

TU

MD1

UPDAT1

BRUP

US1R

=11P

ELDDAT1

DATA

Cou can use parameter 2T4 to specify $hether the function modue creates a atch input session

(2T4 E ) or updates the data record directy using ca transaction (2T4 E G)

The other parameters are fied as for a atch input session header

Note 7very time the function modue is caed a atch input session is created

If the session is to contain severa transactions proceed as foo$s

ltenerate the transaction severa times This can e achieved y recording the transaction again The

function modue interface $i then contain more than one transaction -hen the function modue is

caed severa transactions can e generated for each session

copy SAP AG BC420 12-46

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 4788

043

983209 SAP AG 1999

The Transaction Recorder

PrinciplesPrinciples

Recording )ith the LSMWRecording )ith the LSMW

Principles of atch Input and all TransactionPrinciples of atch Input and all Transaction

Integrating the TA Program into the DWIntegrating the TA Program into the DW

Using the TA Recorder Using the TA Recorder

copy SAP AG BC420 12-47

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 4888

045

983209 SAP AG 1999

Benerated Program

9unction modules DltP1ltBRUP

DltIS1RT

DltLS1ltBRUP

AAP Program

Define structure of

data in seJuential

fileDefine D

table

pen seJuential file

pen I session

Read data recordCseJuential file

9ill D table

9ill I session gtALL TRASATI

Last data record K

lose I session

lose seJuential file

The generated program has the structure dispayed aove It uses the standard function modues for

creating atch input sessions

copy SAP AG BC420 12-48

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 4988

047

983209 SAP AG 1999

Structure of the Benerated Program

Benerated part

Define D

table

pen seJuential file

pen I session

Read data record

9ill D table

9ill I session gtALL TRASATI

Last data recordK

lose I session

lose seJuential file

Include DR16

Define filestructure

P1ltDATAS1T

P1ltBRUP

DltDPR

Dlt9I1LD

DltTRASATI

LS1ltBRUP

LS1ltDATAS1T

The generated program consists of t$o parts 9 a generated part and the incude 2amp72G8 The

incude is provided in the standard system

The incude contains the definition of the reuired 2 tae and a further seven suroutines These

suroutines eecute the foo$ing functions

5pen and cose fie

5pen and cose session

Fi 2 tae

Fi session

The generated part is the main program and cas the reevant suroutines A structure is aso

generated in the generated part to read the eterna data into the fie

See the Appendi for more information on the 2amp72G8 program

copy SAP AG BC420 12-49

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 5088

020

983209 SAP AG 1999

Structure of D Table

PRBRAM DPR D1BI 9AM 9ALPRBRAMPRBRAM DPRDPR D1BID1BI 9AM9AM 9AL9AL

SAPM90ampD 0602

R90ampD=UR 600000

R90ampDU=RS 0006

R90ampD=T=D =UA

SAPM90ampD 0660

=A6AM16 Smith

=A6PSTL 87000

=A6LAD6 US

=A6SPRAS 1

SAPM90ampD 06amp0

=A6ST1B US6amp428357DDATA

PRBRAM

DPR

D1BI

9AM

9AL

EAR

UM

EAR

EAR

EAR

40

4

6

6amp

6amp

D Module pool

D Screen number

D Start of screen

D 9ield name

D 9ield contents

9ield ame T(pe Length Short Tet

AAP Dictionar(

The 2 tae has the same structure as in a standard transfer

copy SAP AG BC420 12-50

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 5188

026

983209 SAP AG 1999

Read Structure

Recording

DATA BEGIN OF record data element BUKRS bukr$amp data element KTOKD ktokd$amp data element NA(EG) name$+amp data element SORT ortl$ampEND OF record-

record

Automaticall( generated

from recording

The structure of the fie is automaticay generated and is a$ays defined $ith the name amp725amp

The generated structure a$ays has the same ayout 7ach fied is defined y t$o generated ro$s

The first ro$ is a$ays a comment ro$ containing the tet J data eement and the data eement of

the screen fied from the recording In the net ro$ the fied itsef is defined $ith the name of the

data eement foo$ed y a three9digit position numer $hich specifies the ocation in the structure

The ength of the fied is set y the ength of the data eement If a fied is not defined through a data

eement the system uses the ength of the screen fied

copy SAP AG BC420 12-51

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 5288

02amp

983209 SAP AG 1999

pening and losing the 9ile

P1ltDATAS1T

LS1ltDATAS1T

FOR( oendataet USING dataet-O)EN DATASET dataet IN TET (ODE-

IF S01SUBR2 34 - 5RITE 6 te7t1e S01SUBR2-STO)-

ENDIF-

ENDFOR(-

FOR( cloedataet USING dataet-2OSE DATASET dataet-

ENDFOR(-

Include

DR16

The suroutine 5P7N3ATAS7T opens the seuentia fie

The suroutine 2+5S73ATAS7T coses the seuentia fie

copy SAP AG BC420 12-52

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 5388

02

983209 SAP AG 1999

9unction Modules for I Program

lient

Session name

Eold date

=eep session

D user name

RecordK

LI1T

BRUP

ELDDAT1

=11P

US1R

R1RD

DltP1ltBRUPDltP1ltBRUP

Transaction code

D table

TD1

DPRTA

DltIS1RTDltIS1RT

DltLS1ltBRUPDltLS1ltBRUP

pen Isessionpen Isession

Insert data for

transactions

Insert data for

transactions

lose I

session

lose I

session

The foo$ing function modues are provided for creating atch input sessions (function group

S2)

235P7N3ltamp54P

2reates a ne$ session and contains genera data for the $hoe session

23INS7ampT

Inserts a the data for a transaction into the session The transferred interna tae $ith the

structure 2ATA must contain a the data reuired for fuy processing the transaction

232+5S73ltamp54P

2oses the session after a the data has een inserted As soon as the session has een cosed it

can e processed

The interna tae $ith the structure 2ATA can ony contain atch input data for one singe

transaction run So the individua transactions are inserted into the atch input session in a oop

using severa 23INS7ampT cas

copy SAP AG BC420 12-53

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 5488

024

983209 SAP AG 2001

9unction Module DltP1ltBRUP

ALL 9UTI DltP1ltBRUPALL 9UTI DltP1ltBRUP

1PRTIB

LI1T client

BRUP session name

ELDDAT1 loc+ date

=11P delete flag

US1R bdc user name

R1RD recording

IMPRTIB

NID internal session +e(

11PTIS

1PRTIB

LI1T client

BRUP session name

ELDDAT1 loc+ date

=11P delete flag

US1R bdc user name

R1RD recording

IMPRTIB NID internal session +e(

11PTIS

-ith the function modue 235P7N3ltamp54P you can open a atch input session

The foo$ing parameters are mandatory

2+I7NT (cient)

ltamp54P (session name)

4S7amp (user name)

Note The 4S7amp must a$ays e specified This user name is reuired for processing the session

in atch mode

The foo$ing parameters are optiona

=5+AT7 specifies the eariest date on $hich the session can e started677P fag specifies $hether session shoud e deeted after it has een successfuy processed The

677P fag is ignored if the session contains errors

677P E K K means deete the session after processing (defaut vaue) H

677P E KGK means do not deete session

amp725amp E KGK ao$s you to create a recording instead of a I session

If gtI is specified the function modue returns the interna session ey This is needed to e ae to

differentiate sessions that have the same name

-ith 7G27PTI5NS you get various return vaues that can e ueried $ith SC9S4amp2

Note In onine mode the onine user is used for the authoriDation checs regardess of the user

name specified

copy SAP AG BC420 12-54

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 5588

022

983209 SAP AG 1999

Subprogram P1ltBRUP

P1ltBRUP

FOR( oen8rou-IF e9on -

2A FUN2TION BD2O)ENGROU) E)ORTING 2IENT lt1mandt GROU) 8rou USER uer KEE) kee

=ODDATE gtolddate-

ENDIF-ENDFOR(-

Include

DR16

The suprogram 5P7N3ltamp54P opens the atch input session

copy SAP AG BC420 12-55

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 5688

028

983209 SAP AG 1999

9unction Module DltIS1RT

ALL 9UTI DltIS1RTALL 9UTI DltIS1RT

IMPRT

TD1 Transaction code

PSTltLAL Update locall(

PRITIB print list

TAL1S DPRTA bdclttable

11PTIS

IMPRT

TD1 Transaction code

PSTltLAL Update locall(

PRITIB print list

TAL1S DPRTA bdclttable

11PTIS

-ith the function modue 23INS7ampT you can add transaction data to the session

Cou need an interna 2 tae to transfer the data

The foo$ing parameters are mandatory

T257 Transaction code

CNPamp5TA 2 tae

The foo$ing parameters are optiona

P5ST3+52A+ E KGK activates oca updating This means that the data to e updated is ept in the

appication server and updated in the ast step of the transaction This does not invove the update

process (For more information see course 28 Programming ataase 4pdates)

PampINTINlt E KGK 9 ists processed in I $i e printed immediatey -ith 7G27PTI5NS you get various return vaues that can e ueried $ith SC9S4amp2

copy SAP AG BC420 12-56

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 5788

023

983209 SAP AG 1999

Subprogram DltTRASATI

DltTRASATI

FOR( BD2TRANSA2TION USING tcode-

IF e9on -2A FUN2TION BD2INSERT

E)ORTING T2ODE tcode TABES D0N)ROTAB bdcdata-

ESE-

ENDIF-ENDFOR(-

T

Include

DR16

The suprogram 23TampANSA2TI5N moves the fied 2 tae either to a atch input session

or uses ca transaction to import the data into the system 5n the seection screen you can specify

$hether you $ant to create a session or you $ant to use ca transaction to process the data directy

The S7SSI5N fied is then set according to your seection

copy SAP AG BC420 12-57

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 5888

025

983209 SAP AG 1999

9unction Module DltLS1ltBRUP

ALL 9UTI DltLS1ltBRUP

11PTIS

TltP1 6

NU1U1lt1RRR amp

-ith the function modue 232+5S73ltamp54P you can cose a atch input session

In 7G27PTI5NS you get various return vaues that can e ueried $ith SC9S4amp2

copy SAP AG BC420 12-58

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 5988

027

983209 SAP AG 1999

Subprogram LS1ltBRUP

FOR( cloe8rou-IF e9on -cloe batcgt 9nut 8rou

2A FUN2TION BD22OSEGROU)-

ESE-IF e8rouoened -

2A FUN2TION BD22OSEGROU)-

ENDIF-ENDIF-

ENDFOR(-

LS1ltBRUPlose session

lose error session

Include

DR16

The suprogram 2+5S73ltamp54P coses the atch input session The suprogram differentiates

et$een a norma I session (S7SSI5N E G) and a session opened $hen ca transaction

encountered an error (73ltamp54P35P7N7 E G)

copy SAP AG BC420 12-59

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 6088

080

983209 SAP AG 1999

Subprograms DltDPRG Dlt9I1LD

DltDPR

Dlt9I1LD

FOR( bdc9eld USING nam al-IF al 34 nodata-2EAR bdcdata- bdcdata1nam nam- bdcdata1al al- A))END bdcdata-ENDIF-

ENDFOR(-

FOR( bdcdltnro USING ro8ram dltnro- 2EAR bdcdata-Bdcdata1ro8ram ro8ram-Bdcdata1dltnro dltnro-Bdcdata1dltnbe89n - A))END bdcdata-ENDFOR(-

Include

DR16

The incude 2amp72GG contains t$o suprograms 23CNPamp5 and 23FI7+

Suprogram 23CNPamp5 fis the 2 tae $ith program names and screen numers

Suprogram 23FI7+ fis the 2 tae $ith fied names and vaues

7ach suprogram creates an entry in the 2 tae

copy SAP AG BC420 12-60

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 6188

086

983209 SAP AG 1999

9illing the D Table

erorm bdcdltnro u9n8 SA)(FD +- erorm bdc9eld u9n8 BD22URSOR RFD1BUKRS- erorm bdc9eld u9n8 BD2OK2ODE 6- erorm bdc9eld u9n8 RFD1BUKRS record1BUKRS- erorm bdc9eld u9n8 RFD1KTOKD record1KTOKD-

erorm bdcdltnro u9n8 SA)(FD -

erorm bdc9eld u9n8 BD22URSOR KNA1S)RAS- erorm bdc9eld u9n8 BD2OK2ODE 6- erorm bdc9eld u9n8 KNA1NA(E record1NA(E-

erorm bdc9eld u9n8 KNA1SORT record1SORT-

Recording Benerated automaticall(

from the recording

)ERFOR( bdcdltnro USING SA)(FD +- )ERFOR( bdc9eld USING BD22URSOR RFD1BUKRS-)ERFOR( bdc9eld USING BD2OK2ODE 6-)ERFOR( bdc9eld USING RFD1BUKRS record1BUKRS-)ERFOR( bdc9eld USING RFD1KTOKD record1KTOKD-

)ERFOR( bdcdltnro USING SA)(FD -

)ERFOR( bdc9eld USING BD22URSOR KNA1S)RAS-)ERFOR( bdc9eld USING BD2OK2ODE 6-)ERFOR( bdc9eld USING KNA1NA(E record1NA(E-

)ERFOR( bdc9eld USING KNA1SORT record1SORT- ---

The 2 tae is fied $ith data from the recording The suroutines 23CNPamp5 and

23FI7+ are used for this

The suroutines are caed in the reuired structure or seuence

copy SAP AG BC420 12-61

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 6288

08amp

983209 SAP AG 1999

erie)

SAPDatabase

SeJuential9ile

SAPDatabase

ALL TRASATIALL TRASATI

SeJuential9ile

ATE IPUTATE IPUT

D TableD TableD TableD Table

I Monitor

T

In contrast to atch input you can use ca transaction to directy pass data to the diaog interface

$ithout using a atch input session Cou use an interna tae (2 tae same structure and ayout

as atch input) to temporariy store your screen data Then you ca the desired transaction in your

program

Note 5n average the 2a Transaction method is 8 to times faster than using atch Input

copy SAP AG BC420 12-62

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 6388

08

983209 SAP AG 1999

all Transaction Program$ 1ample

RE)ORT abcbdcdcdeb9ct-

)ARA(ETERS d9mode DEFAUT A

udmode DEFAUT S-FOR( calltranact9on-2A TRANSA2TION FD

USING bdcdata (ODE d9mode

U)DATE udmode-

IF lt1ubrc NE - 5RITE 6 ---

ENDIF-ENDFOR(-

Screen

00

Screen

100

Screen

An additiona system ro area is added for the caed transaction The system uses this area for

processing the individua screens in the transactionH the data from the tae is added here After the

transaction is processed the second ro area is reeasedH the system continues processing in the first

ro area

Notes

In contrast to atch input there is no error ogging (error sessions) here For processing the caed

transaction the system uses the authoriDations of the user that caed the transaction The 2 tae

can ony hod data for one transaction run at a time efore another transaction is caed and its data

can e added you must eecute a amp7Famp7S= for the 2 tae

copy SAP AG BC420 12-63

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 6488

084

983209 SAP AG 1999

ALL TRASATI C6

RE)ORT 777-

2A TRANSA2TION FD USING bdcdata (ODE E-

Default for MD1 is A

2A TRANSA2TION 3tranact9oncode4 USING 3bdc1table4 C (ODE A E N C-

-ith the parameter 57 you can seect a specific dispay mode for processing the transaction The

foo$ing three modes are avaiae

A (ispay a)

If you eecute the program a the screens and a their data are dispayed This is the defaut vaue

for the 57 in 2A++ TampANSA2TI5N

N (ispay nothing)

The screens are not dispayed at a regardess of $hether any of them contained errors As soon as

the transaction has een fuy processed contro is returned to your program (The vaue of the

parameter 4PAT7 determines $hether dataase updates are eecuted or not)

7 (ispay errors ony)As soon as an error occurs in a screen the transaction is s$itched to dispay mode so that you can

correct the errors

These dispay modes are the same as those in the atch input session processing

copy SAP AG BC420 12-64

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 6588

082

983209 SAP AG 1999

RE)ORT 777-

2A TRANSA2TION FD USING BD2DATA U)DATE -

ALL TRASATI Camp

RE)ORT 777-

2A TRANSA2TION FD USING bdcdata U)DATE -

2A TRANSA2TION 3tranact9oncode4 USING 3bdc1table4 C (ODE A E N C U)DATE A S C -

Default for UPDAT1 is A

-ith the parameter 4PAT7 you can contro ho$ dataase updates arising from a transaction are

carried out There are three options

A (asynchronous updating) The caed transaction does not $ait unti the dataase has een

updated it simpy for$ard the updates to the SAP update service This usuay speeds up the 2T

program This processing mode is N5T recommended for arge data sets as the caed transaction

does not receive a competion message from the update modue

The caing 2T program therefore cannot te if the transaction has een successfuy competed Cou

shoud use the updating administration function (transaction S8) to determine $hether updating

$as terminated eary The error anaysis correction functions for are ess hepfu than $ith

synchronous updating

S (synchronous updating) -ith synchronous updating the caed transaction $aits unti a the

updates have een competed So processing is so$er than $ith synchronous updating The caed

transaction can ho$ever report any updating errors to the program $hich maes error

anaysiscorrection easier

+ (local updating) $ith oca updating the dataase is not updated in a separate process it is

updated in the caers process (see appication hep documentation for the AAP ey$ord S7T

4PAT7 TAS6 +52A+)

copy SAP AG BC420 12-65

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 6688

088

983209 SAP AG 1999

ALL TRASATI C

RE)ORT 777-DATA mtab T0)E TABE OF bdcm8coll-

2A TRANSA2TION FD USING bdcdata (ESSAGES INTO mtab-

2A TRANSA2TION 3tranact9oncode4 USING 3bdc1table4 C (ODE A E N C U)DATE A S C (ESSAGES INTO 3metab4 C -

7SSAlt7S specifies that a system messages that are output during the eecution of a 2A++

TampANSA2TI5N are $ritten to the interna tae L7SSTA The interna tae must have the

structure 2Slt25++

4nie the cassica atch input processing $ith sessions 2A++ TampANSA2TI5N does not offer any

specia processing procedures for transactions containing errors There are no restart functions for

transactions that contain errors or that cause updating terminations

copy SAP AG BC420 12-66

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 6788

083

983209 SAP AG 1999

ALL TRASATI C4

RE)ORT 777-DATA mltot T0)E ctuaram-

2A TRANSA2TION FD USING BD2DATA

O)TIONS FRO( mltot-

2A TRANSA2TION 3tranact9oncode4 USING 3bdc1table4 C (ODE A E N C U)DATE A S C (ESSAGES INTO 3metab4 C O)TIONS FRO( ot C -

RE)ORT 777-DATA mltot T0)E ctuaram-2A TRANSA2TION FD USING bdcdata

O)TIONS FRO( mltot-

The addition 5PTI5NS enaes the ca transaction statement to e controed through a structure

The structure must have the dictionary type 2T43PAampAS

The addition 5PTI5NS Famp5 must not e comined either $ith the addition 57 or $ith

4PAT7 ore information on the net side

copy SAP AG BC420 12-67

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 6888

085

983209 SAP AG 1999

Structure TUltPARAMS

DISMD1 Procen mode anaoo o addon amp

UPDMD1 $pdae mode anaoo o addon $PA

ATTMD1 CA mode CA conro

D19SI1 orce de=a EndoE e drn procen

RAMMIT +o eD a Camp amp(

IPT +o a ac np eonF a F S-B+P SPAC

I1D +o a ac np eon a=er end o= BC daa

The components are defined as foo$s

The components 7FSIM7 ampA25IT N5INPT and N5I7N can have the foo$ing

vaues KGK E Ces or K K E No

If the addition 5PTI5NS Famp5 is not specified the foo$ing settings appy to the contro

parameters

IS57 from addition 57

4P57 from addition 4PAT7

2ATT57 2ATT not active

7FSIM7 o not not use defaut $indo$s siDe

ampA25IT Successfu eit at 25IT -5amp6

N5INPT atch input session active (SC9INPT E G)

N5I7N atch input session sti active after end of 2 data

copy SAP AG BC420 12-68

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 6988

087

983209 SAP AG 1999

SMSBID Message ID

SMSBT Message T(pe C1GIGWGSGA

SMSB Message umber

SMSB6 Message ariable 6

SMSBamp Message ariable amp

SMSB Message ariable

SMSB4 Message ariable 4

SMSBID Message ID

SMSBT Message T(pe C1GIGWGSGA

SMSB Message umber

SMSB6 Message ariable 6

SMSBamp Message ariable amp

SMSB Message ariable

SMSB4 Message ariable 4

Return code$

S(stem fields$

alue Meaning

0 Successful

6000 1rror in transaction

6000 1rror in processing call transaction

see also the s(stem fields specified

alue Meaning

0 Successful

6000 1rror in transaction

6000 1rror in processing call transaction

see also the s(stem fields specified

9ield name Meaning9ield name9ield name MeaningMeaning

Return ode and S(stem 9ields

The return code is used to specify $hether the caed transaction $as processed successfuy In

addition severa system fieds are fied The numer I type and variaes of the diaog message

output y the caed transaction Cou need this information to output the message tet

copy SAP AG BC420 12-69

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 7088

030

983209 SAP AG 1999

Benerated Program of the TA Recorder

REFRES= (ESSTAB-

2A TRANSA2TION tcode USING bdcdata (ODE ctumode U)DATE cudate (ESSAGES INTO metab-OO) AT metab- ENDOO)-IF lubrc 34 AND e8rou 34 S)A2E- IF e8rouoenend - 2A FUN2TION BD2O)ENGROU) E)ORTING ---------

--------- E8rouoened - ENDIF- 2A FUN2TION BD2INSERT E)ORTING T2ODE tcode TABES D0N)ROTAB bdcdata-ENDIF-REFRES= bdcdata-

Message table output

pen error session

Insert data record that

has errors into error

session

If you have seected ca transaction on the seection screen the generated program runs as foo$s

The onine transaction is caed $ith ca transaction and passed to tae 2ATA A the

messages arising during the ca transaction are put in the interna tae 7SSTA

7SSTA is output as a ist

If you have specified an error session ( 73ltamp54P L SPA27) on the seection screen and the

ca transaction comes across an error (+3S4amp2 L 0) the error session is opened The error

session is ho$ever ony opened once Then the data record is paced in the session

A the other data records that have errors $ith ca transaction are paced in the same session

copy SAP AG BC420 12-70

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 7188

036

983209 SAP AG 1999

The Transaction Recorder

PrinciplesPrinciples

Recording )ith the LSMWRecording )ith the LSMW

Principles of atch Input and all TransactionPrinciples of atch Input and all Transaction

Integrating the TA Program into the DWIntegrating the TA Program into the DW

Using the TA Recorder Using the TA Recorder

copy SAP AG BC420 12-71

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 7288

03amp

983209 SAP AG 1999

Integrating into the DW

Transfer program

AAP Dictionar(

Integrate

SDA0

SDA6

SDAamp

SDA

Cou can integrate the generated program into the G9- The structure of the fie must e created

in the AAP ictionary The taes SGA0 SGA8 SGA1 and SGA $i e fied

copy SAP AG BC420 12-72

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 7388

03

983209 SAP AG 1999

DW Release 42

Goo

-B eeae 45

aa ran=er ogtec

Int customer data transfer ob-ect

ecord =ed

Dece daa ran=er

d Goo

The ampunction ampor interatin TA recorder prora$s is

i$ple$ented in the

D+-B in Release

The recorder can e integrated as of ampeease and it is provided in the G9- ampeease

ltot to the G9- ampeease 5n the initia screen you can integrate programs y choosing ampoto

( +nt customer ata transfer o-ect

copy SAP AG BC420 12-73

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 7488

034

983209 SAP AG 1999

reating Program as D b-ect

Comer ran=er ogtec

ampgtec ype

Sor eD =or ogtec

aa ran=er proram

Srcre name

9900

(+A1

Cane comer

ZBCA+G

ZB

ustomer transfer ob-ect

umber bet)een 7000 and 7777

b-ect t(pe

Assignment to R ob-ect

Short tet for D ob-ectShort description

Data transfer program

ame of generated program

Structure name

A structure Cstructure la(out )ith this name is created in

the AAP Dictionar(

For ampeease transfer oects $ere not organiDed y 5amp oects ut y a G numer (00089

OOOO) The numer range O0009OOOO is reserved for customers

To create a connection to the ne$ G 9- you must assign the program to a 5amp oect

2reate a short tet for the G oect This tet $i appear in the method seection ist

Specify the program to e incuded

Specify a name for the structure to e created in the AAP ictionary

Note $he generated program appears under program type +N and not under program type

-

copy SAP AG BC420 12-74

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 7588

032

983209 SAP AG 1999

Adantages

Automatic program registration in the DW in

Release 48

ou can use all the functions defined for

standard ob-ects

1ception$ The (reate ampile ith data

function

If you incuded the oect in the ampeease $orench it is automaticay avaiae in the ampeease

B $orench

A the $orench functions are avaiae for your oect ecept for Create files ith transfer ata

copy SAP AG BC420 12-75

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 7688

038

983209 SAP AG 1999

ou are no) able to$

The Transaction Recorder$ Unit Summar(

Use the recording function in the LSMW to create

a batch input session )ith the data from the

eternal s(stem

Use the TA Recorder to create (our o)n data

transfer program

Anal(e programs that )or+ )ith batch input or

call transaction

Integrate the TA Recorder programs into the

DW

copy SAP AG BC420 12-76

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 7788

ercise 1

nit $ -ecorder

$opic 2reating etors

$ransaction -ecorder ercise 1

bull 2reating detors $ith eterna numer assignment

bull etor numers M9980008 to M9980080

Address data for detors $ith eterna numer assignment is to

e transferred using program ampFI700

ro4ect F5

Supro4ect +5

-un +575

$as)s 85 95 8S25

9oad program -F+00

8 In the foo$ing eercises eisting data is to e changed Therefore these detors $ith

eterna numer assignment have to first e created

898 4nder suproect 79 create run 797G9 $ith the name Detors ith

eternal numers

copy SAP AG BC420 12-77

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 7888

891 2reate the foo$ing three tass The tass map the foo$ing process steps

convert data create + session and process + session

89198 In run 797G9 create the foo$ing tas

9 Tas AP9

9 Name 2onvert data 9 Tas type AP

9 Program type +S-

Seect the foo$ing +S- oect

+S- proect 2109

+S- suproect 7I9

+S- oect I997GT

89191 In run 797G9 create the foo$ing tas 9 Tas +5A9

9 Name 2reate I session

Tas type +5A

9 Program type INP

Seect program ampFI700 $ith the variant

I97G9

8919 In run 797G9 create the foo$ing tas

9 Tas S29

9 Name Process I session Tas type S2

9 Program type amp7P5

Seect program ampS2S4 $ith the variant

S497G9

Note that you have to correct the seuence of the tass 2onvert data

create + session and process + session

4se the uttons

89 Start the run

The detors $i e created $ith eterna numer assignments

89 2hec in transaction F0 that the detors M9980008 to M9980080 have een

created

copy SAP AG BC420 12-78

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 7988

ercise

nit $ransaction -ecorder

$opic -ecording function in the 9S8(

bull 2reate a recording using the +S-

bull ltenerate a atch input session

2hange the detor address data in the amp System

Name of the recording +

Name of the file +2055+F9

8 2reate the recording 7I3 using the +S- ampecord the transaction F01 (2hange

detor)

898 efore you create the recording first test the transaction onineQ

For the recording use detor M9980008 5n the initia screen of the F01

maintain the foo$ing fieds ony

etor etor M9980008

2ompany code 0008

Address data seect

Note $he data record must e saved hile recording

891 aintain the names and the descriptions for the foo$ing fieds

Name city street posta code and teephone numereete a other fieds in screen 880 from the recording (eg S5ampT+ +AN8

SPampAS)

4se the same technica names as sho$n in the tae eo$ (automatic fied

mapping)

copy SAP AG BC420 12-79

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 8088

1 2reate the suproect 7I9 and the ne$ oect TA3 in your proect 2109

aintain the oect attriutes and seect the item atch input recording Seect your

recording 7I3

2reate the source structure address

2reate the source fieds according to the tae eo$ 5r copy them from proect 2109S37N suproect 7I900 oect TA900

198 Fie setup The data from the egacy system are dispayed in the foo$ing tae

Fied name Fied type Fied ength escription

N5 2 8B etor numer

NA7 2 Name

STamp77T 2 Street

2ITC 2 2ityPace of residence

MIP 2 80 Posta code

T7+ 2 8B Teephone numer

191 aintain the fied mapping 4se the automatic fied mapping (via menu item

7tras)

19 Specify the fies 5ny maintain the fie name of the source fie

Name of the fie 21099IFI+7

2odepage 8800

19 Import the data and convert them ispay the data in each caseQ

19 2reate a atch input session

19B ampun the atch input session

copy SAP AG BC420 12-80

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 8188

ercise 3

nit $ransaction -ecorder

$opic -ecording ith the $ -ecorder

bull ltenerate a recording using the TA recorder

bull Test the recording

2hange the address data of detors in the amp system

Name recording $+

Name of the file +2055+F9

8 2reate the recording TA37I3 using the transaction recorder ampecord the

transaction F01 (change detor)

898 4se detor M9980008 for the recording 5n the F01 initia screen ony

maintain the foo$ing fieds

etor etor M9980008

2ompany 2ode 0008

Address data seect

Note $he data record must e saved hen recording

eete a fieds that do not eist in the source fie 21099IFI+7 from screen

880 in the recording (eg 6NA89S5ampT+ 6NA89+AN8 6ANNQ9SPampAS) Note o not deete fieds ampF01946ampS and ampF0190880

Save the recording no$

1 S$itch to the recordings overvie$

198 Process the recording $ith the processing mode A (dispay a)

191 Process the recording $ith the processing mode RN (no dispay)

19 If the recording has een tested and no error has occurred generate a I session

and run it using the I monitor If an error shoud occur generate the recordingagainQ

copy SAP AG BC420 12-81

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 8288

From the recording generate the program M21037I3 in your deveopment cass

2109 Seect the foo$ing

bull ampead fied contents from fie

bull 2reate test data in the fie 2103dei3test3tt

98 Save this program and eecute it ltenerate one I session each and process it

2arry out the same steps again using the ca transaction

The generated program shoud no$ e changed so that fie 21099IFI+7 can e

read and processed

98 2hange the defaut vaue of the fie name (parameter dataset) in 21099

IFI+7

91 2hange the structure definition eete the company code fied and the address

data checo from the structure

9 2hange the su9routine ca perform dc3fied for the company code (KampF019

46ampSK) so that the vaue 0008 is transferred

9 2hange the su9routine ca perform dc3fied for the address data checo

(KampF0190880K) so that the vaue G is transferred

9 Start the program again and read the data from the fie 21099IFI+7 $ith

detor data ltenerate a I session $ith it and run it

copy SAP AG BC420 12-82

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 8388

033 Include DR16INCLUDE BDCRECX1

SELECTION-SCREEN BEGIN OF LINE

PARAMETERS SESSION RADIOBUTTON GROUP CTU create sessi SELECTION-SCREEN COMMENT $amp TEXT-S FOR FIELD SESSION

se(ecti-scree )siti +

PARAMETERS CTU RADIOBUTTON GROUP CTU ca(( trasacti

SELECTION-SCREEN COMMENT $amp TEXT-S FOR FIELD CTU

SELECTION-SCREEN END OF LINE

SELECTION-SCREEN BEGIN OF LINE

SELECTION-SCREEN COMMENT $amp TEXT-S1 FOR FIELD GROUP

se(ecti-scree )siti $+

PARAMETERS GROUP1$amp r) ae 0 sessi

SELECTION-SCREEN COMMENT $amp TEXT-S+ FOR FIELD CTUMODE

se(ecti-scree )siti

PARAMETERS CTUMODE LIE CTU2PARAMS-DISMODE DEFAULT 3N3

A4 s56 a(( 78)rs

E4 s56 78)r errr (8

N4 7 t 7is)(a8 78)r

SELECTION-SCREEN END OF LINE

SELECTION-SCREEN BEGIN OF LINE

SELECTION-SCREEN COMMENT $amp TEXT-S$ FOR FIELD USER

se(ecti-scree )siti $+

PARAMETERS4 USER1$amp DEFAULT S9-UNAME ser 0r sessi i atc5

SELECTION-SCREEN COMMENT $amp TEXT-S FOR FIELD CUPDATE

se(ecti-scree )siti

PARAMETERS CUPDATE LIE CTU2PARAMS-UPDMODE DEFAULT 3L3

S4 s8c5rs(8

A4 as8c5rs(8

L4 (ca(

SELECTION-SCREEN END OF LINE

SELECTION-SCREEN BEGIN OF LINE

SELECTION-SCREEN COMMENT $amp TEXT-S FOR FIELD EEP

se(ecti-scree )siti $+

PARAMETERS4 EEP AS CltECBOX 3 3 = 7e(ete sessi i0 0iis5e7

3X3 = gtee) sessi i0 0iis5e7

SELECTION-SCREEN COMMENT $amp TEXT-S FOR FIELD E2GROUP

copy SAP AG BC420 12-83

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 8488

se(ecti-scree )siti

)araeters E2GROUP1$amp r) ae 0 errr-sessi

SELECTION-SCREEN END OF LINE

SELECTION-SCREEN BEGIN OF LINE

SELECTION-SCREEN COMMENT $amp TEXT-S FOR FIELD ltOLDDATE

se(ecti-scree )siti $+

PARAMETERS4 ltOLDDATE LIE S9-DATUM

SELECTION-SCREEN COMMENT +11amp TEXT-S$ FOR FIELD E2USER

se(ecti-scree )siti

PARAMETERS4 E2USER1$amp DEFAULT S9-UNAME ser 0r errr-sessi

SELECTION-SCREEN END OF LINE

SELECTION-SCREEN BEGIN OF LINE

SELECTION-SCREEN COMMENT +11amp TEXT-S FOR FIELD E2EEP

se(ecti-scree )siti

PARAMETERS4 E2EEP AS CltECBOX 3 3 = 7e(ete sessi i0 0iis5e7

3X3 = gtee) sessi i0 0iis5e7

SELECTION-SCREEN END OF LINE

SELECTION-SCREEN BEGIN OF LINE

SELECTION-SCREEN COMMENT +11amp TEXT-S FOR FIELD E2ltDATE

se(ecti-scree )siti

PARAMETERS4 E2ltDATE LIE S9-DATUM

SELECTION-SCREEN END OF LINE

SELECTION-SCREEN SIP

SELECTION-SCREEN BEGIN OF LINE

SELECTION-SCREEN COMMENT 1amp TEXT-S1 FOR FIELD NODATA

PARAMETERS4 NODATA DEFAULT 33 LOER CASE 7ata

SELECTION-SCREEN END OF LINE

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

Batc5i)t7ata 0 si(e trasacti

DATA4 BDCDATA LIE BDCDATA OCCURS ITlt ltEADER LINE

essaes 0 ca(( trasacti

DATA4 MESSTAB LIE BDCMSGCOLL OCCURS ITlt ltEADER LINE

errr sessi )ee7 3 3 r 3X3amp

DATA4 E2GROUP2OPENED

essae tets

TABLES4 T1

copy SAP AG BC420 12-84

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 8588

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

at se(ecti scree

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

AT SELECTION-SCREEN

r) a7 ser st e 0i((e7 0r create sessi

IF SESSION = 3X3 AND

GROUP = SPACE OR USER = SPACE

MESSAGE E1MSamp

ENDIF

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

)e 7ataset

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

FORM OPEN2DATASET USING P2DATASET

OPEN DATASET P2DATASET IN TEXT MODE

IF S9-SUBRC

RITE4 TEXT-E S9-SUBRC

STOP

ENDIF

ENDFORM

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

c(se 7ataset

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

FORM CLOSE2DATASET USING P2DATASET

CLOSE DATASET P2DATASET

ENDFORM

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

create atc5i)t sessi

t 0r ca(( trasacti siamp

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

FORM OPEN2GROUP

IF SESSION = 3X3

SIP

RITE4 $amp 3Create r)3I1amp GROUP

SIP

)e atc5i)t r)

CALL FUNCTION 3BDC2OPEN2GROUP3

EXPORTING CLIENT = S9-MANDT

copy SAP AG BC420 12-85

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 8688

GROUP = GROUP

USER = USER

EEP = EEP

ltOLDDATE = ltOLDDATE

RITE4 amp 3BDC2OPEN2GROUP3I$amp

1$amp 3retrc7e43I+amp

S9-SUBRC

ENDIF

ENDFORM

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

e7 atc5i)t sessi

ca(( trasacti si4 errr sessiamp

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

FORM CLOSE2GROUP

IF SESSION = 3X3

c(se atc5i)t r)

CALL FUNCTION 3BDC2CLOSE2GROUP3

RITE4 amp 3BDC2CLOSE2GROUP3Iamp

1$amp 3retrc7e43I+amp

S9-SUBRC

ELSE

IF E2GROUP2OPENED = 3X3

CALL FUNCTION 3BDC2CLOSE2GROUP3

RITE4

RITE4 amp 3Fe5(era))e 6r7e eret3Iamp

ENDIF

ENDIF

ENDFORM

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

Start e6 trasacti accr7i t )araeters

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

FORM BDC2TRANSACTION USING TCODE

DATA4 L2MSTRINGamp

DATA4 L2SUBRC LIE S9-SUBRC

atc5 i)t sessi

IF SESSION = 3X3

CALL FUNCTION 3BDC2INSERT3

EXPORTING TCODE = TCODE

TABLES D9NPROTAB = BDCDATA

RITE4 3BDC2INSERT3Iamp

copy SAP AG BC420 12-86

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 8788

TCODE

3retrc7e43I+amp

S9-SUBRC

3RECORD43

S9-INDEX

ca(( trasacti si

ELSE

REFRESlt MESSTAB

CALL TRANSACTION TCODE USING BDCDATA

MODE CTUMODE

UPDATE CUPDATE

MESSAGES INTO MESSTAB

L2SUBRC = S9-SUBRC

RITE4 3CALL2TRANSACTION3

TCODE

3retrc7e43I+amp

L2SUBRC

3RECORD43

S9-INDEX

LOOP AT MESSTAB

SELECT SINGLE FROM T1 ltERE SPRSL = MESSTAB-MSGSPRA

AND ARBGB = MESSTAB-MSGID

AND MSGNR = MESSTAB-MSGNR

IF S9-SUBRC =

L2MSTRING = T1-TEXT

IF L2MSTRING CS 313

REPLACE 313 ITlt MESSTAB-MSGH1 INTO L2MSTRING

REPLACE 3$3 ITlt MESSTAB-MSGH$ INTO L2MSTRING

REPLACE 33 ITlt MESSTAB-MSGH INTO L2MSTRING

REPLACE 33 ITlt MESSTAB-MSGH INTO L2MSTRING

ELSE

REPLACE 33 ITlt MESSTAB-MSGH1 INTO L2MSTRING

REPLACE 33 ITlt MESSTAB-MSGH$ INTO L2MSTRING

REPLACE 33 ITlt MESSTAB-MSGH INTO L2MSTRING

REPLACE 33 ITlt MESSTAB-MSGH INTO L2MSTRING

ENDIF

CONDENSE L2MSTRING

RITE4 MESSTAB-MSGT9P L2MSTRING$+amp

ELSE

RITE4 MESSTAB

ENDIF

ENDLOOP

copy SAP AG BC420 12-87

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 8888

SIP

Eree 0e5(era))e

IF L2SUBRC AND E2GROUP SPACE

IF E2GROUP2OPENED = 3 3

CALL FUNCTION 3BDC2OPEN2GROUP3

EXPORTING CLIENT = S9-MANDT

GROUP = E2GROUP

USER = E2USER

EEP = E2EEP

ltOLDDATE = E2ltDATE

E2GROUP2OPENED = 3X3

ENDIF

CALL FUNCTION 3BDC2INSERT3

EXPORTING TCODE = TCODE

TABLES D9NPROTAB = BDCDATA

ENDIF

ENDIF

REFRESlt BDCDATA

ENDFORM

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

Start e6 scree

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

FORM BDC2D9NPRO USING PROGRAM D9NPRO

CLEAR BDCDATA

BDCDATA-PROGRAM = PROGRAM

BDCDATA-D9NPRO = D9NPRO

BDCDATA-D9NBEGIN = 3X3

APPEND BDCDATA

ENDFORM

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

Isert 0ie(7

Page 24: BC420_46C - 012The Transaction Recorder

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 2488

0amp4

983209 SAP AG 2001

Addinggtremoing screen fields

Repeating recording

9or identical field names the name and description are

assigned automaticall(

1diting Recording

02-($++

(+A1-A+

(+A1-+A1

(+A1-Samp

(+A1-+A2

(+A1-SAS

Comer accon nmer

e

+ame 1

Sor =ed

+ame 2

Sree

Selection of all

aailable screen

fields

Cou can ater add ne$ screen fieds if you need to 6eep in mind that fieds shoud ony e added in

paces $here they are aso provided on the screen other$ise you $i get an error $hen the I

session is processed

After saving you $i get the message The data has een saved successfuy No$ the recordings

are avaiae for the oect attriutes

If you repeat the recording you can record a ne$ screen seuence $ith ne$ fieds Provided that the

fied names (eg 6NA89NA78) are identica the names and descriptions are automaticay

assigned

copy SAP AG BC420 12-24

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 2588

0amp2

983209 SAP AG 1999

b-ect T(pe and Import Method$ Recording

Standard atch Input gt Direct Input

atch Input Recording

API

IDoc

ampgtec ype ) mpor meod

Bac np recordn

ecordn ec1

The recording is no$ avaiae $ith the oect attriutes

Net you create a proect or su9proect in the +S- and specify process the data transfer

Cou eecute the data transfer as in the standard system

efine the source fieds and structures

efine the fied mapping

ampead and convert the data

2reate and import a atch input session

copy SAP AG BC420 12-25

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 2688

0amp8

983209 SAP AG 1999

The Transaction Recorder

PrinciplesPrinciples

Recording )ith the LSMWRecording )ith the LSMW

Principles of atch Input and all TransactionPrinciples of atch Input and all Transaction

Integrating the TA Program into the DWIntegrating the TA Program into the DW

Using the TA Recorder Using the TA Recorder

copy SAP AG BC420 12-26

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 2788

0amp3

983209 SAP AG 1999

Transaction Recorder

Online

Transaction

RecordingTransfer Program

T

Included in the Batch Input Monitor

Cou use the transaction recorder to record transactions and then use the transaction recording to

generate a transfer program The program ao$s you to transfer data using either atch input or ca

transaction

copy SAP AG BC420 12-27

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 2888

0amp5

983209 SAP AG 1999

hanging ustomer Data$ Initial Screen

9ield ontents

BCC$Samp $SZAV

BCamp(Camp )00

02-($++ Z-88-10000

02-0110

02-0130

$SZAV

9ield ame

Comer

Company code

Z-88-10000

Genera daa

Comer Z-88-10000

+ame

9ield ontents

BCamp(Camp $PA

BCS$BSC SAPSZA1 0300ASS

BCS$BSC SAPSZA1 0301Camp$

BCC$Samp SZA10100-+$B

A1AA-S Garden Sree

A1AA-amp$S+$1 34

A1AA-PampSCamp1 02105

9ield ame

Screen

111

Screen

106

In the aove eampe the transaction Change customer F01 is recorded

copy SAP AG BC420 12-28

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 2988

0amp7

983209 SAP AG 2001

hange Debitor$ Pa(ment Transactions C6

Banlt dea

Screen

10

9ield ontent

BCC$Samp (+B(-BA+(+01

BCamp(Camp BA+((+B(-BA+(S01

(+B(-BA+(01 12345679

(+B(-BA+(+01 22222222

Debitor 5560000

9ield ame

Inde

copy SAP AG BC420 12-29

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 3088

00

983209 SAP AG 1999

hanging ustomer Data$ Pa(ment Transactions Camp

Addre

an+ countr( US

an+ code 6amp42837

Banlt dea

ustomer 5560000

9ield ontents9ield ame

BCC$Samp (+A1-(+ZA

BCamp(Camp $PA

(+B(-Z01

Screen

10

Screen

100

SAPLBA

9ield ontents

BCC$Samp B+(A-BA+(A

BCamp(Camp +

B+(A-BA+(A +aona Banlt

9ield ame

In different transactions the modue poo may change This is the case $ith for eampe customer

master data The TA recorder records modue poo changes automaticay

copy SAP AG BC420 12-30

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 3188

06

983209 SAP AG 1999

Eierarch( Displa( of the Recording

02amp

02

SAP02 0106

BCC$Samp 02-0130

BCamp(Camp )00

02-($++ -88-10000

02-0110

02-0130

SAP02 0111

BCamp(Camp V

BCC$Samp A1AA-amp$S+$1

A1AA-S Garden Sree

Recording

-ith the TA recorder the resuts are aso a ist in a hierarchy dispay =o$ever you cannot assign

your o$n fied names as you can in the +S-

copy SAP AG BC420 12-31

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 3288

0amp

983209 SAP AG 1999

Recording erie)

Recording

Transfer program

9unction module

ontains onl( the data

from the recording

Test data

Test

reate

reate

reate

reate

1dit hange recording

Process recording

Cou can edit the recording as needed

The recording can e tested and eecuted again The screens are run through in the same $ay as in

the recording

The recording can then e used to create

atch input sessions

Test data

ata transfer programs $ith atch input or ca transaction

Function modues

copy SAP AG BC420 12-32

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 3388

0

983209 SAP AG 1999

1 02 BS

2 SAP02 106

3 BCC$Samp $SZAV

4 BCamp(Camp )00 5 02-($++ -88-10000

6 02-0110

7 02-0130

8 $SZAV

9 SAP02 111

10 BCamp(Camp V

11 BCC$Samp A1AA-amp$S+$1

12 A1AA-S Garden Sree

Program Screen St 9ield ame 9ield alue

Recording 1ditor

Recording

Add gt delete lines 9ormat chec+

Import gt eport of recording

In the editor you can add or deete ines Cou can aso change the contents of individua ines

-ith the function Chec) you can specify $hether the edited version of the recording sti has the

correct synta

Cou can aso eport import recordings to from a seuentia fie

After editing save the recording changes

copy SAP AG BC420 12-33

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 3488

04

983209 SAP AG 1999

Recording Seeral Transaction Runs

RecordingF

Directl( after the first recordingG or

In the displa( mode of the recording

In this step you can record additiona transactions and add additiona transaction runs to the

recording

Cou can record the additiona transactions directy after a recording or in the edit screen of a

recording

copy SAP AG BC420 12-34

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 3588

02

983209 SAP AG 1999

1ditor$ Importing and 1porting Recordings

6 T 9D0amp S

amp SAPM90ampD 608

DltURSR

4

2

8 SAPM90ampD 666

60

66

Program Screen St 9ield name 9ield alue

cempA

e name

aa =orma

cemp

A

e name

aa =orma

1port

Import

Presentation Serer

If the editor functions in the systems do not provide a the functions you need you can do$noad the

recording to your presentation server using the Eort function and then edit the recording using a

P2 editor

Cou use the Import function to import the data ac into the amp System ae sure the fie is sti in

the correct format

copy SAP AG BC420 12-35

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 3688

08

983209 SAP AG 1999

Processing the Recording

Recording

Process )ith ALL TRASATI

Parameer

Proce mode$pdae mode

CA mode

e=a e

Con a=er comm

+o a B eon

nd +o a B mode

A

A

T

The recording can e eecuted directy The data from the recording is used and the transaction is

processed $ith ca transaction

2a transaction provides a range of options for caing appication transactions $hich are discussed

on the foo$ing t$o pages

copy SAP AG BC420 12-36

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 3788

03

983209 SAP AG 1999

Process mode

Update mode

ATT mode

Processing Recording )ith T 6

A

1

Displa( all screens

Displa( errors onl(

o displa(

L

S

A

Local

S(nchronous

As(nchronous

A

o ATT

ATT )ithout indiidual screen control

ATT )ith indiidual screen control

Processing mode

=ere you can specify the processing mode 9 it is the same as the processing mode for atch input

4pdate mode

=ere you can specify the update mode For more information see the unit ca transaction

2ATT mode

=ere you can mae specia settings if you $ant to test the recording under 2ATT conditions (ony

necessary for 2ATT runs) Specia functions are caed in the 2ATT too for each screen at the end of

P5 and at the start of PAI

copy SAP AG BC420 12-37

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 3888

05

983209 SAP AG 1999

Default sie

ont after commit

ot a I session

1nd$ ot a I mode

Processing Recording )ith T amp

The screen standard sie is used for the

processing

ommit )or+ does not end the processing

o I mode is actie The transaction )ill run

through as in online

I mode is selected nce the data in the D

table is processedG the I mode is set to inactie

Standard siDe

If you seect this the screens are processed in the standard siDe in the foreground (in foreground or

dispay errors ony) Note the standard siDe is a$ays used for acground processing

Further after commit

The first commit $or in a transaction does not ead to the end of the recording

Note A atch input transaction is ended $ith the first commit $or

No I mode

The system fied SC9INPT is not set (SC9INPT E ) So transactions are run through as in onine

7nd No I mode

5ny use if you choose the processing mode 7 (dispay errors ony) Then the transaction is processed in the acground in atch input mode and if there is an error the screens run through in

the foreground

copy SAP AG BC420 12-38

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 3988

07

983209 SAP AG 1999

I Mode

atch input

mode

nline

Some transactions behae differentl( in batch input mode

than in online Cbatch input capabilit(

atch input mode sets the s(stem field SIPT H

Not every transaction can run the same onine and in atch input mode The transaction must decide

itsef $hether it is caed onine or in atch input mode

The system sets the system fied SC9INPT E G if the atch input mode is active (this aso appies

to ca transaction) From this system fied the transaction can identify $hether to run onine or in

atch input mode

copy SAP AG BC420 12-39

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 4088

040

983209 SAP AG 1999

reating a Session 9rom the Recording

Recordingnl( contains the data

from the recording

Seon name 02amp

Aoraon ampBS(eep eon

oclt dae 10102000

Cou can create a atch input session directy from the recording that you can then process using the

atch input monitor

copy SAP AG BC420 12-40

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 4188

046

983209 SAP AG 1999

reating Test Data

Test Data

Recording

ranranpBC420AAe name

The file onl( contains the data from the recording

Rgt

Application Serer

Structure

Cou can create a fie from the recordingH the fie $i contain a the fieds from the recording The

fieds are added to the fie $ith the ength you specified in the definition

The fied order corresponds to the order in the recording overvie$ Technica fieds

(2356257 2324ampS5amp and so on) are incuded

The data can ony e stored on the appication server If you do not specify a path the fie is stored in

the $or directory of the appication server

If the specified test fie aready eists the ne$ data record is added to this fie

copy SAP AG BC420 12-41

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 4288

04amp

983209 SAP AG 1999

ed conen

reating a Program

Recording

ZBC420ampProram name

Transfer Program

e daa

ead =rom =e

ran=er =rom recordn

reate

9ile nameTest data

ranranpBC420AA

Cou can generate a program from the recording

In the foo$ing diaog o enter a program name In addition you can choose the type and method

for fiing the maintained fied contents from the recorded screens

4se the vaues used for the recording If you reuire feie data transfer you $i have to modify

this program ater

ParameteriDe the input vaues and read these vaues from a fie A data structure is created for

parameteriDationH the data records are read from an eterna fie into this data structure The

program assumes the fie $as taiored to this data structure

If you have decided to parameteriDe the input vaues you shoud aso create a test fie during

generation To do this seect the checo and enter a name for the fie

The attriute maintenance screen of the AAP editor appears aintain the attriutes and save the

program

copy SAP AG BC420 12-42

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 4388

04

983209 SAP AG 1999

Program 9unctions

Online

transaction

Transfer program

To

error

1rror

ption 6ption ampFlat SAP

structure

Monitor

Cou have no$ generated a data transfer program for importing data into the amp System The

program can eecute the data transfer using atch input or ca transaction

If you choose option 1 and there is an error the data record is paced into a atch input session

copy SAP AG BC420 12-43

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 4488

044

983209 SAP AG 1999

Benerating 9unction Modules

Recording

Zcreaedeor ncon mode

ncon rop

Sor eD

ZBC420

Creae comer

9unction module

nl( one data record can be processed at a time

In the net diaog o you can generate a function modue a function group and short tet from the

recording The function modue is automaticay created in the function group

copy SAP AG BC420 12-44

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 4588

042

983209 SAP AG 1999

9unction of 9unction Modules

Online

transaction

To

error

1rror

ption 6 ption amp

9unction module

Import

Parameter 1port

parameter

Tables

M1SSTA

Monitor

S$BC

Import interface

The import interface consists of a technica part and the fieds from the recording (A parameter is

created for each input fied of the recorded transactions)

7port interface

Simpy consists of the parameter S4amp2 The function modue $i return a vaue in the system

fied SC9S4amp2 after caing ca transaction This return vaue is set to Dero if the data record has

een correcty processed (5ny appies to 2T)

If a session is created you $i e notified $hether the data record coud e paced into the session

Tae interfaceThis is used ony if the function modue $ors $ith ca transaction The tae contains a the

system messages

copy SAP AG BC420 12-45

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 4688

048

983209 SAP AG 1999

Import Interface of 9unction Module

$

Technical

fields

Data

fields

BI session or CALL TRANSACTION

Processin $ode

pdate $ode

a$e oamp BI session iamp (T initial)

Bacround user iamp (T initial)

Delete session aampter processin

Loc date oamp session

ODATA indicator

TU

MD1

UPDAT1

BRUP

US1R

=11P

ELDDAT1

DATA

Cou can use parameter 2T4 to specify $hether the function modue creates a atch input session

(2T4 E ) or updates the data record directy using ca transaction (2T4 E G)

The other parameters are fied as for a atch input session header

Note 7very time the function modue is caed a atch input session is created

If the session is to contain severa transactions proceed as foo$s

ltenerate the transaction severa times This can e achieved y recording the transaction again The

function modue interface $i then contain more than one transaction -hen the function modue is

caed severa transactions can e generated for each session

copy SAP AG BC420 12-46

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 4788

043

983209 SAP AG 1999

The Transaction Recorder

PrinciplesPrinciples

Recording )ith the LSMWRecording )ith the LSMW

Principles of atch Input and all TransactionPrinciples of atch Input and all Transaction

Integrating the TA Program into the DWIntegrating the TA Program into the DW

Using the TA Recorder Using the TA Recorder

copy SAP AG BC420 12-47

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 4888

045

983209 SAP AG 1999

Benerated Program

9unction modules DltP1ltBRUP

DltIS1RT

DltLS1ltBRUP

AAP Program

Define structure of

data in seJuential

fileDefine D

table

pen seJuential file

pen I session

Read data recordCseJuential file

9ill D table

9ill I session gtALL TRASATI

Last data record K

lose I session

lose seJuential file

The generated program has the structure dispayed aove It uses the standard function modues for

creating atch input sessions

copy SAP AG BC420 12-48

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 4988

047

983209 SAP AG 1999

Structure of the Benerated Program

Benerated part

Define D

table

pen seJuential file

pen I session

Read data record

9ill D table

9ill I session gtALL TRASATI

Last data recordK

lose I session

lose seJuential file

Include DR16

Define filestructure

P1ltDATAS1T

P1ltBRUP

DltDPR

Dlt9I1LD

DltTRASATI

LS1ltBRUP

LS1ltDATAS1T

The generated program consists of t$o parts 9 a generated part and the incude 2amp72G8 The

incude is provided in the standard system

The incude contains the definition of the reuired 2 tae and a further seven suroutines These

suroutines eecute the foo$ing functions

5pen and cose fie

5pen and cose session

Fi 2 tae

Fi session

The generated part is the main program and cas the reevant suroutines A structure is aso

generated in the generated part to read the eterna data into the fie

See the Appendi for more information on the 2amp72G8 program

copy SAP AG BC420 12-49

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 5088

020

983209 SAP AG 1999

Structure of D Table

PRBRAM DPR D1BI 9AM 9ALPRBRAMPRBRAM DPRDPR D1BID1BI 9AM9AM 9AL9AL

SAPM90ampD 0602

R90ampD=UR 600000

R90ampDU=RS 0006

R90ampD=T=D =UA

SAPM90ampD 0660

=A6AM16 Smith

=A6PSTL 87000

=A6LAD6 US

=A6SPRAS 1

SAPM90ampD 06amp0

=A6ST1B US6amp428357DDATA

PRBRAM

DPR

D1BI

9AM

9AL

EAR

UM

EAR

EAR

EAR

40

4

6

6amp

6amp

D Module pool

D Screen number

D Start of screen

D 9ield name

D 9ield contents

9ield ame T(pe Length Short Tet

AAP Dictionar(

The 2 tae has the same structure as in a standard transfer

copy SAP AG BC420 12-50

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 5188

026

983209 SAP AG 1999

Read Structure

Recording

DATA BEGIN OF record data element BUKRS bukr$amp data element KTOKD ktokd$amp data element NA(EG) name$+amp data element SORT ortl$ampEND OF record-

record

Automaticall( generated

from recording

The structure of the fie is automaticay generated and is a$ays defined $ith the name amp725amp

The generated structure a$ays has the same ayout 7ach fied is defined y t$o generated ro$s

The first ro$ is a$ays a comment ro$ containing the tet J data eement and the data eement of

the screen fied from the recording In the net ro$ the fied itsef is defined $ith the name of the

data eement foo$ed y a three9digit position numer $hich specifies the ocation in the structure

The ength of the fied is set y the ength of the data eement If a fied is not defined through a data

eement the system uses the ength of the screen fied

copy SAP AG BC420 12-51

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 5288

02amp

983209 SAP AG 1999

pening and losing the 9ile

P1ltDATAS1T

LS1ltDATAS1T

FOR( oendataet USING dataet-O)EN DATASET dataet IN TET (ODE-

IF S01SUBR2 34 - 5RITE 6 te7t1e S01SUBR2-STO)-

ENDIF-

ENDFOR(-

FOR( cloedataet USING dataet-2OSE DATASET dataet-

ENDFOR(-

Include

DR16

The suroutine 5P7N3ATAS7T opens the seuentia fie

The suroutine 2+5S73ATAS7T coses the seuentia fie

copy SAP AG BC420 12-52

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 5388

02

983209 SAP AG 1999

9unction Modules for I Program

lient

Session name

Eold date

=eep session

D user name

RecordK

LI1T

BRUP

ELDDAT1

=11P

US1R

R1RD

DltP1ltBRUPDltP1ltBRUP

Transaction code

D table

TD1

DPRTA

DltIS1RTDltIS1RT

DltLS1ltBRUPDltLS1ltBRUP

pen Isessionpen Isession

Insert data for

transactions

Insert data for

transactions

lose I

session

lose I

session

The foo$ing function modues are provided for creating atch input sessions (function group

S2)

235P7N3ltamp54P

2reates a ne$ session and contains genera data for the $hoe session

23INS7ampT

Inserts a the data for a transaction into the session The transferred interna tae $ith the

structure 2ATA must contain a the data reuired for fuy processing the transaction

232+5S73ltamp54P

2oses the session after a the data has een inserted As soon as the session has een cosed it

can e processed

The interna tae $ith the structure 2ATA can ony contain atch input data for one singe

transaction run So the individua transactions are inserted into the atch input session in a oop

using severa 23INS7ampT cas

copy SAP AG BC420 12-53

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 5488

024

983209 SAP AG 2001

9unction Module DltP1ltBRUP

ALL 9UTI DltP1ltBRUPALL 9UTI DltP1ltBRUP

1PRTIB

LI1T client

BRUP session name

ELDDAT1 loc+ date

=11P delete flag

US1R bdc user name

R1RD recording

IMPRTIB

NID internal session +e(

11PTIS

1PRTIB

LI1T client

BRUP session name

ELDDAT1 loc+ date

=11P delete flag

US1R bdc user name

R1RD recording

IMPRTIB NID internal session +e(

11PTIS

-ith the function modue 235P7N3ltamp54P you can open a atch input session

The foo$ing parameters are mandatory

2+I7NT (cient)

ltamp54P (session name)

4S7amp (user name)

Note The 4S7amp must a$ays e specified This user name is reuired for processing the session

in atch mode

The foo$ing parameters are optiona

=5+AT7 specifies the eariest date on $hich the session can e started677P fag specifies $hether session shoud e deeted after it has een successfuy processed The

677P fag is ignored if the session contains errors

677P E K K means deete the session after processing (defaut vaue) H

677P E KGK means do not deete session

amp725amp E KGK ao$s you to create a recording instead of a I session

If gtI is specified the function modue returns the interna session ey This is needed to e ae to

differentiate sessions that have the same name

-ith 7G27PTI5NS you get various return vaues that can e ueried $ith SC9S4amp2

Note In onine mode the onine user is used for the authoriDation checs regardess of the user

name specified

copy SAP AG BC420 12-54

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 5588

022

983209 SAP AG 1999

Subprogram P1ltBRUP

P1ltBRUP

FOR( oen8rou-IF e9on -

2A FUN2TION BD2O)ENGROU) E)ORTING 2IENT lt1mandt GROU) 8rou USER uer KEE) kee

=ODDATE gtolddate-

ENDIF-ENDFOR(-

Include

DR16

The suprogram 5P7N3ltamp54P opens the atch input session

copy SAP AG BC420 12-55

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 5688

028

983209 SAP AG 1999

9unction Module DltIS1RT

ALL 9UTI DltIS1RTALL 9UTI DltIS1RT

IMPRT

TD1 Transaction code

PSTltLAL Update locall(

PRITIB print list

TAL1S DPRTA bdclttable

11PTIS

IMPRT

TD1 Transaction code

PSTltLAL Update locall(

PRITIB print list

TAL1S DPRTA bdclttable

11PTIS

-ith the function modue 23INS7ampT you can add transaction data to the session

Cou need an interna 2 tae to transfer the data

The foo$ing parameters are mandatory

T257 Transaction code

CNPamp5TA 2 tae

The foo$ing parameters are optiona

P5ST3+52A+ E KGK activates oca updating This means that the data to e updated is ept in the

appication server and updated in the ast step of the transaction This does not invove the update

process (For more information see course 28 Programming ataase 4pdates)

PampINTINlt E KGK 9 ists processed in I $i e printed immediatey -ith 7G27PTI5NS you get various return vaues that can e ueried $ith SC9S4amp2

copy SAP AG BC420 12-56

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 5788

023

983209 SAP AG 1999

Subprogram DltTRASATI

DltTRASATI

FOR( BD2TRANSA2TION USING tcode-

IF e9on -2A FUN2TION BD2INSERT

E)ORTING T2ODE tcode TABES D0N)ROTAB bdcdata-

ESE-

ENDIF-ENDFOR(-

T

Include

DR16

The suprogram 23TampANSA2TI5N moves the fied 2 tae either to a atch input session

or uses ca transaction to import the data into the system 5n the seection screen you can specify

$hether you $ant to create a session or you $ant to use ca transaction to process the data directy

The S7SSI5N fied is then set according to your seection

copy SAP AG BC420 12-57

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 5888

025

983209 SAP AG 1999

9unction Module DltLS1ltBRUP

ALL 9UTI DltLS1ltBRUP

11PTIS

TltP1 6

NU1U1lt1RRR amp

-ith the function modue 232+5S73ltamp54P you can cose a atch input session

In 7G27PTI5NS you get various return vaues that can e ueried $ith SC9S4amp2

copy SAP AG BC420 12-58

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 5988

027

983209 SAP AG 1999

Subprogram LS1ltBRUP

FOR( cloe8rou-IF e9on -cloe batcgt 9nut 8rou

2A FUN2TION BD22OSEGROU)-

ESE-IF e8rouoened -

2A FUN2TION BD22OSEGROU)-

ENDIF-ENDIF-

ENDFOR(-

LS1ltBRUPlose session

lose error session

Include

DR16

The suprogram 2+5S73ltamp54P coses the atch input session The suprogram differentiates

et$een a norma I session (S7SSI5N E G) and a session opened $hen ca transaction

encountered an error (73ltamp54P35P7N7 E G)

copy SAP AG BC420 12-59

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 6088

080

983209 SAP AG 1999

Subprograms DltDPRG Dlt9I1LD

DltDPR

Dlt9I1LD

FOR( bdc9eld USING nam al-IF al 34 nodata-2EAR bdcdata- bdcdata1nam nam- bdcdata1al al- A))END bdcdata-ENDIF-

ENDFOR(-

FOR( bdcdltnro USING ro8ram dltnro- 2EAR bdcdata-Bdcdata1ro8ram ro8ram-Bdcdata1dltnro dltnro-Bdcdata1dltnbe89n - A))END bdcdata-ENDFOR(-

Include

DR16

The incude 2amp72GG contains t$o suprograms 23CNPamp5 and 23FI7+

Suprogram 23CNPamp5 fis the 2 tae $ith program names and screen numers

Suprogram 23FI7+ fis the 2 tae $ith fied names and vaues

7ach suprogram creates an entry in the 2 tae

copy SAP AG BC420 12-60

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 6188

086

983209 SAP AG 1999

9illing the D Table

erorm bdcdltnro u9n8 SA)(FD +- erorm bdc9eld u9n8 BD22URSOR RFD1BUKRS- erorm bdc9eld u9n8 BD2OK2ODE 6- erorm bdc9eld u9n8 RFD1BUKRS record1BUKRS- erorm bdc9eld u9n8 RFD1KTOKD record1KTOKD-

erorm bdcdltnro u9n8 SA)(FD -

erorm bdc9eld u9n8 BD22URSOR KNA1S)RAS- erorm bdc9eld u9n8 BD2OK2ODE 6- erorm bdc9eld u9n8 KNA1NA(E record1NA(E-

erorm bdc9eld u9n8 KNA1SORT record1SORT-

Recording Benerated automaticall(

from the recording

)ERFOR( bdcdltnro USING SA)(FD +- )ERFOR( bdc9eld USING BD22URSOR RFD1BUKRS-)ERFOR( bdc9eld USING BD2OK2ODE 6-)ERFOR( bdc9eld USING RFD1BUKRS record1BUKRS-)ERFOR( bdc9eld USING RFD1KTOKD record1KTOKD-

)ERFOR( bdcdltnro USING SA)(FD -

)ERFOR( bdc9eld USING BD22URSOR KNA1S)RAS-)ERFOR( bdc9eld USING BD2OK2ODE 6-)ERFOR( bdc9eld USING KNA1NA(E record1NA(E-

)ERFOR( bdc9eld USING KNA1SORT record1SORT- ---

The 2 tae is fied $ith data from the recording The suroutines 23CNPamp5 and

23FI7+ are used for this

The suroutines are caed in the reuired structure or seuence

copy SAP AG BC420 12-61

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 6288

08amp

983209 SAP AG 1999

erie)

SAPDatabase

SeJuential9ile

SAPDatabase

ALL TRASATIALL TRASATI

SeJuential9ile

ATE IPUTATE IPUT

D TableD TableD TableD Table

I Monitor

T

In contrast to atch input you can use ca transaction to directy pass data to the diaog interface

$ithout using a atch input session Cou use an interna tae (2 tae same structure and ayout

as atch input) to temporariy store your screen data Then you ca the desired transaction in your

program

Note 5n average the 2a Transaction method is 8 to times faster than using atch Input

copy SAP AG BC420 12-62

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 6388

08

983209 SAP AG 1999

all Transaction Program$ 1ample

RE)ORT abcbdcdcdeb9ct-

)ARA(ETERS d9mode DEFAUT A

udmode DEFAUT S-FOR( calltranact9on-2A TRANSA2TION FD

USING bdcdata (ODE d9mode

U)DATE udmode-

IF lt1ubrc NE - 5RITE 6 ---

ENDIF-ENDFOR(-

Screen

00

Screen

100

Screen

An additiona system ro area is added for the caed transaction The system uses this area for

processing the individua screens in the transactionH the data from the tae is added here After the

transaction is processed the second ro area is reeasedH the system continues processing in the first

ro area

Notes

In contrast to atch input there is no error ogging (error sessions) here For processing the caed

transaction the system uses the authoriDations of the user that caed the transaction The 2 tae

can ony hod data for one transaction run at a time efore another transaction is caed and its data

can e added you must eecute a amp7Famp7S= for the 2 tae

copy SAP AG BC420 12-63

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 6488

084

983209 SAP AG 1999

ALL TRASATI C6

RE)ORT 777-

2A TRANSA2TION FD USING bdcdata (ODE E-

Default for MD1 is A

2A TRANSA2TION 3tranact9oncode4 USING 3bdc1table4 C (ODE A E N C-

-ith the parameter 57 you can seect a specific dispay mode for processing the transaction The

foo$ing three modes are avaiae

A (ispay a)

If you eecute the program a the screens and a their data are dispayed This is the defaut vaue

for the 57 in 2A++ TampANSA2TI5N

N (ispay nothing)

The screens are not dispayed at a regardess of $hether any of them contained errors As soon as

the transaction has een fuy processed contro is returned to your program (The vaue of the

parameter 4PAT7 determines $hether dataase updates are eecuted or not)

7 (ispay errors ony)As soon as an error occurs in a screen the transaction is s$itched to dispay mode so that you can

correct the errors

These dispay modes are the same as those in the atch input session processing

copy SAP AG BC420 12-64

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 6588

082

983209 SAP AG 1999

RE)ORT 777-

2A TRANSA2TION FD USING BD2DATA U)DATE -

ALL TRASATI Camp

RE)ORT 777-

2A TRANSA2TION FD USING bdcdata U)DATE -

2A TRANSA2TION 3tranact9oncode4 USING 3bdc1table4 C (ODE A E N C U)DATE A S C -

Default for UPDAT1 is A

-ith the parameter 4PAT7 you can contro ho$ dataase updates arising from a transaction are

carried out There are three options

A (asynchronous updating) The caed transaction does not $ait unti the dataase has een

updated it simpy for$ard the updates to the SAP update service This usuay speeds up the 2T

program This processing mode is N5T recommended for arge data sets as the caed transaction

does not receive a competion message from the update modue

The caing 2T program therefore cannot te if the transaction has een successfuy competed Cou

shoud use the updating administration function (transaction S8) to determine $hether updating

$as terminated eary The error anaysis correction functions for are ess hepfu than $ith

synchronous updating

S (synchronous updating) -ith synchronous updating the caed transaction $aits unti a the

updates have een competed So processing is so$er than $ith synchronous updating The caed

transaction can ho$ever report any updating errors to the program $hich maes error

anaysiscorrection easier

+ (local updating) $ith oca updating the dataase is not updated in a separate process it is

updated in the caers process (see appication hep documentation for the AAP ey$ord S7T

4PAT7 TAS6 +52A+)

copy SAP AG BC420 12-65

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 6688

088

983209 SAP AG 1999

ALL TRASATI C

RE)ORT 777-DATA mtab T0)E TABE OF bdcm8coll-

2A TRANSA2TION FD USING bdcdata (ESSAGES INTO mtab-

2A TRANSA2TION 3tranact9oncode4 USING 3bdc1table4 C (ODE A E N C U)DATE A S C (ESSAGES INTO 3metab4 C -

7SSAlt7S specifies that a system messages that are output during the eecution of a 2A++

TampANSA2TI5N are $ritten to the interna tae L7SSTA The interna tae must have the

structure 2Slt25++

4nie the cassica atch input processing $ith sessions 2A++ TampANSA2TI5N does not offer any

specia processing procedures for transactions containing errors There are no restart functions for

transactions that contain errors or that cause updating terminations

copy SAP AG BC420 12-66

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 6788

083

983209 SAP AG 1999

ALL TRASATI C4

RE)ORT 777-DATA mltot T0)E ctuaram-

2A TRANSA2TION FD USING BD2DATA

O)TIONS FRO( mltot-

2A TRANSA2TION 3tranact9oncode4 USING 3bdc1table4 C (ODE A E N C U)DATE A S C (ESSAGES INTO 3metab4 C O)TIONS FRO( ot C -

RE)ORT 777-DATA mltot T0)E ctuaram-2A TRANSA2TION FD USING bdcdata

O)TIONS FRO( mltot-

The addition 5PTI5NS enaes the ca transaction statement to e controed through a structure

The structure must have the dictionary type 2T43PAampAS

The addition 5PTI5NS Famp5 must not e comined either $ith the addition 57 or $ith

4PAT7 ore information on the net side

copy SAP AG BC420 12-67

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 6888

085

983209 SAP AG 1999

Structure TUltPARAMS

DISMD1 Procen mode anaoo o addon amp

UPDMD1 $pdae mode anaoo o addon $PA

ATTMD1 CA mode CA conro

D19SI1 orce de=a EndoE e drn procen

RAMMIT +o eD a Camp amp(

IPT +o a ac np eonF a F S-B+P SPAC

I1D +o a ac np eon a=er end o= BC daa

The components are defined as foo$s

The components 7FSIM7 ampA25IT N5INPT and N5I7N can have the foo$ing

vaues KGK E Ces or K K E No

If the addition 5PTI5NS Famp5 is not specified the foo$ing settings appy to the contro

parameters

IS57 from addition 57

4P57 from addition 4PAT7

2ATT57 2ATT not active

7FSIM7 o not not use defaut $indo$s siDe

ampA25IT Successfu eit at 25IT -5amp6

N5INPT atch input session active (SC9INPT E G)

N5I7N atch input session sti active after end of 2 data

copy SAP AG BC420 12-68

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 6988

087

983209 SAP AG 1999

SMSBID Message ID

SMSBT Message T(pe C1GIGWGSGA

SMSB Message umber

SMSB6 Message ariable 6

SMSBamp Message ariable amp

SMSB Message ariable

SMSB4 Message ariable 4

SMSBID Message ID

SMSBT Message T(pe C1GIGWGSGA

SMSB Message umber

SMSB6 Message ariable 6

SMSBamp Message ariable amp

SMSB Message ariable

SMSB4 Message ariable 4

Return code$

S(stem fields$

alue Meaning

0 Successful

6000 1rror in transaction

6000 1rror in processing call transaction

see also the s(stem fields specified

alue Meaning

0 Successful

6000 1rror in transaction

6000 1rror in processing call transaction

see also the s(stem fields specified

9ield name Meaning9ield name9ield name MeaningMeaning

Return ode and S(stem 9ields

The return code is used to specify $hether the caed transaction $as processed successfuy In

addition severa system fieds are fied The numer I type and variaes of the diaog message

output y the caed transaction Cou need this information to output the message tet

copy SAP AG BC420 12-69

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 7088

030

983209 SAP AG 1999

Benerated Program of the TA Recorder

REFRES= (ESSTAB-

2A TRANSA2TION tcode USING bdcdata (ODE ctumode U)DATE cudate (ESSAGES INTO metab-OO) AT metab- ENDOO)-IF lubrc 34 AND e8rou 34 S)A2E- IF e8rouoenend - 2A FUN2TION BD2O)ENGROU) E)ORTING ---------

--------- E8rouoened - ENDIF- 2A FUN2TION BD2INSERT E)ORTING T2ODE tcode TABES D0N)ROTAB bdcdata-ENDIF-REFRES= bdcdata-

Message table output

pen error session

Insert data record that

has errors into error

session

If you have seected ca transaction on the seection screen the generated program runs as foo$s

The onine transaction is caed $ith ca transaction and passed to tae 2ATA A the

messages arising during the ca transaction are put in the interna tae 7SSTA

7SSTA is output as a ist

If you have specified an error session ( 73ltamp54P L SPA27) on the seection screen and the

ca transaction comes across an error (+3S4amp2 L 0) the error session is opened The error

session is ho$ever ony opened once Then the data record is paced in the session

A the other data records that have errors $ith ca transaction are paced in the same session

copy SAP AG BC420 12-70

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 7188

036

983209 SAP AG 1999

The Transaction Recorder

PrinciplesPrinciples

Recording )ith the LSMWRecording )ith the LSMW

Principles of atch Input and all TransactionPrinciples of atch Input and all Transaction

Integrating the TA Program into the DWIntegrating the TA Program into the DW

Using the TA Recorder Using the TA Recorder

copy SAP AG BC420 12-71

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 7288

03amp

983209 SAP AG 1999

Integrating into the DW

Transfer program

AAP Dictionar(

Integrate

SDA0

SDA6

SDAamp

SDA

Cou can integrate the generated program into the G9- The structure of the fie must e created

in the AAP ictionary The taes SGA0 SGA8 SGA1 and SGA $i e fied

copy SAP AG BC420 12-72

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 7388

03

983209 SAP AG 1999

DW Release 42

Goo

-B eeae 45

aa ran=er ogtec

Int customer data transfer ob-ect

ecord =ed

Dece daa ran=er

d Goo

The ampunction ampor interatin TA recorder prora$s is

i$ple$ented in the

D+-B in Release

The recorder can e integrated as of ampeease and it is provided in the G9- ampeease

ltot to the G9- ampeease 5n the initia screen you can integrate programs y choosing ampoto

( +nt customer ata transfer o-ect

copy SAP AG BC420 12-73

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 7488

034

983209 SAP AG 1999

reating Program as D b-ect

Comer ran=er ogtec

ampgtec ype

Sor eD =or ogtec

aa ran=er proram

Srcre name

9900

(+A1

Cane comer

ZBCA+G

ZB

ustomer transfer ob-ect

umber bet)een 7000 and 7777

b-ect t(pe

Assignment to R ob-ect

Short tet for D ob-ectShort description

Data transfer program

ame of generated program

Structure name

A structure Cstructure la(out )ith this name is created in

the AAP Dictionar(

For ampeease transfer oects $ere not organiDed y 5amp oects ut y a G numer (00089

OOOO) The numer range O0009OOOO is reserved for customers

To create a connection to the ne$ G 9- you must assign the program to a 5amp oect

2reate a short tet for the G oect This tet $i appear in the method seection ist

Specify the program to e incuded

Specify a name for the structure to e created in the AAP ictionary

Note $he generated program appears under program type +N and not under program type

-

copy SAP AG BC420 12-74

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 7588

032

983209 SAP AG 1999

Adantages

Automatic program registration in the DW in

Release 48

ou can use all the functions defined for

standard ob-ects

1ception$ The (reate ampile ith data

function

If you incuded the oect in the ampeease $orench it is automaticay avaiae in the ampeease

B $orench

A the $orench functions are avaiae for your oect ecept for Create files ith transfer ata

copy SAP AG BC420 12-75

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 7688

038

983209 SAP AG 1999

ou are no) able to$

The Transaction Recorder$ Unit Summar(

Use the recording function in the LSMW to create

a batch input session )ith the data from the

eternal s(stem

Use the TA Recorder to create (our o)n data

transfer program

Anal(e programs that )or+ )ith batch input or

call transaction

Integrate the TA Recorder programs into the

DW

copy SAP AG BC420 12-76

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 7788

ercise 1

nit $ -ecorder

$opic 2reating etors

$ransaction -ecorder ercise 1

bull 2reating detors $ith eterna numer assignment

bull etor numers M9980008 to M9980080

Address data for detors $ith eterna numer assignment is to

e transferred using program ampFI700

ro4ect F5

Supro4ect +5

-un +575

$as)s 85 95 8S25

9oad program -F+00

8 In the foo$ing eercises eisting data is to e changed Therefore these detors $ith

eterna numer assignment have to first e created

898 4nder suproect 79 create run 797G9 $ith the name Detors ith

eternal numers

copy SAP AG BC420 12-77

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 7888

891 2reate the foo$ing three tass The tass map the foo$ing process steps

convert data create + session and process + session

89198 In run 797G9 create the foo$ing tas

9 Tas AP9

9 Name 2onvert data 9 Tas type AP

9 Program type +S-

Seect the foo$ing +S- oect

+S- proect 2109

+S- suproect 7I9

+S- oect I997GT

89191 In run 797G9 create the foo$ing tas 9 Tas +5A9

9 Name 2reate I session

Tas type +5A

9 Program type INP

Seect program ampFI700 $ith the variant

I97G9

8919 In run 797G9 create the foo$ing tas

9 Tas S29

9 Name Process I session Tas type S2

9 Program type amp7P5

Seect program ampS2S4 $ith the variant

S497G9

Note that you have to correct the seuence of the tass 2onvert data

create + session and process + session

4se the uttons

89 Start the run

The detors $i e created $ith eterna numer assignments

89 2hec in transaction F0 that the detors M9980008 to M9980080 have een

created

copy SAP AG BC420 12-78

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 7988

ercise

nit $ransaction -ecorder

$opic -ecording function in the 9S8(

bull 2reate a recording using the +S-

bull ltenerate a atch input session

2hange the detor address data in the amp System

Name of the recording +

Name of the file +2055+F9

8 2reate the recording 7I3 using the +S- ampecord the transaction F01 (2hange

detor)

898 efore you create the recording first test the transaction onineQ

For the recording use detor M9980008 5n the initia screen of the F01

maintain the foo$ing fieds ony

etor etor M9980008

2ompany code 0008

Address data seect

Note $he data record must e saved hile recording

891 aintain the names and the descriptions for the foo$ing fieds

Name city street posta code and teephone numereete a other fieds in screen 880 from the recording (eg S5ampT+ +AN8

SPampAS)

4se the same technica names as sho$n in the tae eo$ (automatic fied

mapping)

copy SAP AG BC420 12-79

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 8088

1 2reate the suproect 7I9 and the ne$ oect TA3 in your proect 2109

aintain the oect attriutes and seect the item atch input recording Seect your

recording 7I3

2reate the source structure address

2reate the source fieds according to the tae eo$ 5r copy them from proect 2109S37N suproect 7I900 oect TA900

198 Fie setup The data from the egacy system are dispayed in the foo$ing tae

Fied name Fied type Fied ength escription

N5 2 8B etor numer

NA7 2 Name

STamp77T 2 Street

2ITC 2 2ityPace of residence

MIP 2 80 Posta code

T7+ 2 8B Teephone numer

191 aintain the fied mapping 4se the automatic fied mapping (via menu item

7tras)

19 Specify the fies 5ny maintain the fie name of the source fie

Name of the fie 21099IFI+7

2odepage 8800

19 Import the data and convert them ispay the data in each caseQ

19 2reate a atch input session

19B ampun the atch input session

copy SAP AG BC420 12-80

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 8188

ercise 3

nit $ransaction -ecorder

$opic -ecording ith the $ -ecorder

bull ltenerate a recording using the TA recorder

bull Test the recording

2hange the address data of detors in the amp system

Name recording $+

Name of the file +2055+F9

8 2reate the recording TA37I3 using the transaction recorder ampecord the

transaction F01 (change detor)

898 4se detor M9980008 for the recording 5n the F01 initia screen ony

maintain the foo$ing fieds

etor etor M9980008

2ompany 2ode 0008

Address data seect

Note $he data record must e saved hen recording

eete a fieds that do not eist in the source fie 21099IFI+7 from screen

880 in the recording (eg 6NA89S5ampT+ 6NA89+AN8 6ANNQ9SPampAS) Note o not deete fieds ampF01946ampS and ampF0190880

Save the recording no$

1 S$itch to the recordings overvie$

198 Process the recording $ith the processing mode A (dispay a)

191 Process the recording $ith the processing mode RN (no dispay)

19 If the recording has een tested and no error has occurred generate a I session

and run it using the I monitor If an error shoud occur generate the recordingagainQ

copy SAP AG BC420 12-81

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 8288

From the recording generate the program M21037I3 in your deveopment cass

2109 Seect the foo$ing

bull ampead fied contents from fie

bull 2reate test data in the fie 2103dei3test3tt

98 Save this program and eecute it ltenerate one I session each and process it

2arry out the same steps again using the ca transaction

The generated program shoud no$ e changed so that fie 21099IFI+7 can e

read and processed

98 2hange the defaut vaue of the fie name (parameter dataset) in 21099

IFI+7

91 2hange the structure definition eete the company code fied and the address

data checo from the structure

9 2hange the su9routine ca perform dc3fied for the company code (KampF019

46ampSK) so that the vaue 0008 is transferred

9 2hange the su9routine ca perform dc3fied for the address data checo

(KampF0190880K) so that the vaue G is transferred

9 Start the program again and read the data from the fie 21099IFI+7 $ith

detor data ltenerate a I session $ith it and run it

copy SAP AG BC420 12-82

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 8388

033 Include DR16INCLUDE BDCRECX1

SELECTION-SCREEN BEGIN OF LINE

PARAMETERS SESSION RADIOBUTTON GROUP CTU create sessi SELECTION-SCREEN COMMENT $amp TEXT-S FOR FIELD SESSION

se(ecti-scree )siti +

PARAMETERS CTU RADIOBUTTON GROUP CTU ca(( trasacti

SELECTION-SCREEN COMMENT $amp TEXT-S FOR FIELD CTU

SELECTION-SCREEN END OF LINE

SELECTION-SCREEN BEGIN OF LINE

SELECTION-SCREEN COMMENT $amp TEXT-S1 FOR FIELD GROUP

se(ecti-scree )siti $+

PARAMETERS GROUP1$amp r) ae 0 sessi

SELECTION-SCREEN COMMENT $amp TEXT-S+ FOR FIELD CTUMODE

se(ecti-scree )siti

PARAMETERS CTUMODE LIE CTU2PARAMS-DISMODE DEFAULT 3N3

A4 s56 a(( 78)rs

E4 s56 78)r errr (8

N4 7 t 7is)(a8 78)r

SELECTION-SCREEN END OF LINE

SELECTION-SCREEN BEGIN OF LINE

SELECTION-SCREEN COMMENT $amp TEXT-S$ FOR FIELD USER

se(ecti-scree )siti $+

PARAMETERS4 USER1$amp DEFAULT S9-UNAME ser 0r sessi i atc5

SELECTION-SCREEN COMMENT $amp TEXT-S FOR FIELD CUPDATE

se(ecti-scree )siti

PARAMETERS CUPDATE LIE CTU2PARAMS-UPDMODE DEFAULT 3L3

S4 s8c5rs(8

A4 as8c5rs(8

L4 (ca(

SELECTION-SCREEN END OF LINE

SELECTION-SCREEN BEGIN OF LINE

SELECTION-SCREEN COMMENT $amp TEXT-S FOR FIELD EEP

se(ecti-scree )siti $+

PARAMETERS4 EEP AS CltECBOX 3 3 = 7e(ete sessi i0 0iis5e7

3X3 = gtee) sessi i0 0iis5e7

SELECTION-SCREEN COMMENT $amp TEXT-S FOR FIELD E2GROUP

copy SAP AG BC420 12-83

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 8488

se(ecti-scree )siti

)araeters E2GROUP1$amp r) ae 0 errr-sessi

SELECTION-SCREEN END OF LINE

SELECTION-SCREEN BEGIN OF LINE

SELECTION-SCREEN COMMENT $amp TEXT-S FOR FIELD ltOLDDATE

se(ecti-scree )siti $+

PARAMETERS4 ltOLDDATE LIE S9-DATUM

SELECTION-SCREEN COMMENT +11amp TEXT-S$ FOR FIELD E2USER

se(ecti-scree )siti

PARAMETERS4 E2USER1$amp DEFAULT S9-UNAME ser 0r errr-sessi

SELECTION-SCREEN END OF LINE

SELECTION-SCREEN BEGIN OF LINE

SELECTION-SCREEN COMMENT +11amp TEXT-S FOR FIELD E2EEP

se(ecti-scree )siti

PARAMETERS4 E2EEP AS CltECBOX 3 3 = 7e(ete sessi i0 0iis5e7

3X3 = gtee) sessi i0 0iis5e7

SELECTION-SCREEN END OF LINE

SELECTION-SCREEN BEGIN OF LINE

SELECTION-SCREEN COMMENT +11amp TEXT-S FOR FIELD E2ltDATE

se(ecti-scree )siti

PARAMETERS4 E2ltDATE LIE S9-DATUM

SELECTION-SCREEN END OF LINE

SELECTION-SCREEN SIP

SELECTION-SCREEN BEGIN OF LINE

SELECTION-SCREEN COMMENT 1amp TEXT-S1 FOR FIELD NODATA

PARAMETERS4 NODATA DEFAULT 33 LOER CASE 7ata

SELECTION-SCREEN END OF LINE

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

Batc5i)t7ata 0 si(e trasacti

DATA4 BDCDATA LIE BDCDATA OCCURS ITlt ltEADER LINE

essaes 0 ca(( trasacti

DATA4 MESSTAB LIE BDCMSGCOLL OCCURS ITlt ltEADER LINE

errr sessi )ee7 3 3 r 3X3amp

DATA4 E2GROUP2OPENED

essae tets

TABLES4 T1

copy SAP AG BC420 12-84

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 8588

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

at se(ecti scree

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

AT SELECTION-SCREEN

r) a7 ser st e 0i((e7 0r create sessi

IF SESSION = 3X3 AND

GROUP = SPACE OR USER = SPACE

MESSAGE E1MSamp

ENDIF

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

)e 7ataset

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

FORM OPEN2DATASET USING P2DATASET

OPEN DATASET P2DATASET IN TEXT MODE

IF S9-SUBRC

RITE4 TEXT-E S9-SUBRC

STOP

ENDIF

ENDFORM

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

c(se 7ataset

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

FORM CLOSE2DATASET USING P2DATASET

CLOSE DATASET P2DATASET

ENDFORM

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

create atc5i)t sessi

t 0r ca(( trasacti siamp

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

FORM OPEN2GROUP

IF SESSION = 3X3

SIP

RITE4 $amp 3Create r)3I1amp GROUP

SIP

)e atc5i)t r)

CALL FUNCTION 3BDC2OPEN2GROUP3

EXPORTING CLIENT = S9-MANDT

copy SAP AG BC420 12-85

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 8688

GROUP = GROUP

USER = USER

EEP = EEP

ltOLDDATE = ltOLDDATE

RITE4 amp 3BDC2OPEN2GROUP3I$amp

1$amp 3retrc7e43I+amp

S9-SUBRC

ENDIF

ENDFORM

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

e7 atc5i)t sessi

ca(( trasacti si4 errr sessiamp

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

FORM CLOSE2GROUP

IF SESSION = 3X3

c(se atc5i)t r)

CALL FUNCTION 3BDC2CLOSE2GROUP3

RITE4 amp 3BDC2CLOSE2GROUP3Iamp

1$amp 3retrc7e43I+amp

S9-SUBRC

ELSE

IF E2GROUP2OPENED = 3X3

CALL FUNCTION 3BDC2CLOSE2GROUP3

RITE4

RITE4 amp 3Fe5(era))e 6r7e eret3Iamp

ENDIF

ENDIF

ENDFORM

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

Start e6 trasacti accr7i t )araeters

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

FORM BDC2TRANSACTION USING TCODE

DATA4 L2MSTRINGamp

DATA4 L2SUBRC LIE S9-SUBRC

atc5 i)t sessi

IF SESSION = 3X3

CALL FUNCTION 3BDC2INSERT3

EXPORTING TCODE = TCODE

TABLES D9NPROTAB = BDCDATA

RITE4 3BDC2INSERT3Iamp

copy SAP AG BC420 12-86

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 8788

TCODE

3retrc7e43I+amp

S9-SUBRC

3RECORD43

S9-INDEX

ca(( trasacti si

ELSE

REFRESlt MESSTAB

CALL TRANSACTION TCODE USING BDCDATA

MODE CTUMODE

UPDATE CUPDATE

MESSAGES INTO MESSTAB

L2SUBRC = S9-SUBRC

RITE4 3CALL2TRANSACTION3

TCODE

3retrc7e43I+amp

L2SUBRC

3RECORD43

S9-INDEX

LOOP AT MESSTAB

SELECT SINGLE FROM T1 ltERE SPRSL = MESSTAB-MSGSPRA

AND ARBGB = MESSTAB-MSGID

AND MSGNR = MESSTAB-MSGNR

IF S9-SUBRC =

L2MSTRING = T1-TEXT

IF L2MSTRING CS 313

REPLACE 313 ITlt MESSTAB-MSGH1 INTO L2MSTRING

REPLACE 3$3 ITlt MESSTAB-MSGH$ INTO L2MSTRING

REPLACE 33 ITlt MESSTAB-MSGH INTO L2MSTRING

REPLACE 33 ITlt MESSTAB-MSGH INTO L2MSTRING

ELSE

REPLACE 33 ITlt MESSTAB-MSGH1 INTO L2MSTRING

REPLACE 33 ITlt MESSTAB-MSGH$ INTO L2MSTRING

REPLACE 33 ITlt MESSTAB-MSGH INTO L2MSTRING

REPLACE 33 ITlt MESSTAB-MSGH INTO L2MSTRING

ENDIF

CONDENSE L2MSTRING

RITE4 MESSTAB-MSGT9P L2MSTRING$+amp

ELSE

RITE4 MESSTAB

ENDIF

ENDLOOP

copy SAP AG BC420 12-87

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 8888

SIP

Eree 0e5(era))e

IF L2SUBRC AND E2GROUP SPACE

IF E2GROUP2OPENED = 3 3

CALL FUNCTION 3BDC2OPEN2GROUP3

EXPORTING CLIENT = S9-MANDT

GROUP = E2GROUP

USER = E2USER

EEP = E2EEP

ltOLDDATE = E2ltDATE

E2GROUP2OPENED = 3X3

ENDIF

CALL FUNCTION 3BDC2INSERT3

EXPORTING TCODE = TCODE

TABLES D9NPROTAB = BDCDATA

ENDIF

ENDIF

REFRESlt BDCDATA

ENDFORM

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

Start e6 scree

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

FORM BDC2D9NPRO USING PROGRAM D9NPRO

CLEAR BDCDATA

BDCDATA-PROGRAM = PROGRAM

BDCDATA-D9NPRO = D9NPRO

BDCDATA-D9NBEGIN = 3X3

APPEND BDCDATA

ENDFORM

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

Isert 0ie(7

Page 25: BC420_46C - 012The Transaction Recorder

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 2588

0amp2

983209 SAP AG 1999

b-ect T(pe and Import Method$ Recording

Standard atch Input gt Direct Input

atch Input Recording

API

IDoc

ampgtec ype ) mpor meod

Bac np recordn

ecordn ec1

The recording is no$ avaiae $ith the oect attriutes

Net you create a proect or su9proect in the +S- and specify process the data transfer

Cou eecute the data transfer as in the standard system

efine the source fieds and structures

efine the fied mapping

ampead and convert the data

2reate and import a atch input session

copy SAP AG BC420 12-25

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 2688

0amp8

983209 SAP AG 1999

The Transaction Recorder

PrinciplesPrinciples

Recording )ith the LSMWRecording )ith the LSMW

Principles of atch Input and all TransactionPrinciples of atch Input and all Transaction

Integrating the TA Program into the DWIntegrating the TA Program into the DW

Using the TA Recorder Using the TA Recorder

copy SAP AG BC420 12-26

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 2788

0amp3

983209 SAP AG 1999

Transaction Recorder

Online

Transaction

RecordingTransfer Program

T

Included in the Batch Input Monitor

Cou use the transaction recorder to record transactions and then use the transaction recording to

generate a transfer program The program ao$s you to transfer data using either atch input or ca

transaction

copy SAP AG BC420 12-27

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 2888

0amp5

983209 SAP AG 1999

hanging ustomer Data$ Initial Screen

9ield ontents

BCC$Samp $SZAV

BCamp(Camp )00

02-($++ Z-88-10000

02-0110

02-0130

$SZAV

9ield ame

Comer

Company code

Z-88-10000

Genera daa

Comer Z-88-10000

+ame

9ield ontents

BCamp(Camp $PA

BCS$BSC SAPSZA1 0300ASS

BCS$BSC SAPSZA1 0301Camp$

BCC$Samp SZA10100-+$B

A1AA-S Garden Sree

A1AA-amp$S+$1 34

A1AA-PampSCamp1 02105

9ield ame

Screen

111

Screen

106

In the aove eampe the transaction Change customer F01 is recorded

copy SAP AG BC420 12-28

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 2988

0amp7

983209 SAP AG 2001

hange Debitor$ Pa(ment Transactions C6

Banlt dea

Screen

10

9ield ontent

BCC$Samp (+B(-BA+(+01

BCamp(Camp BA+((+B(-BA+(S01

(+B(-BA+(01 12345679

(+B(-BA+(+01 22222222

Debitor 5560000

9ield ame

Inde

copy SAP AG BC420 12-29

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 3088

00

983209 SAP AG 1999

hanging ustomer Data$ Pa(ment Transactions Camp

Addre

an+ countr( US

an+ code 6amp42837

Banlt dea

ustomer 5560000

9ield ontents9ield ame

BCC$Samp (+A1-(+ZA

BCamp(Camp $PA

(+B(-Z01

Screen

10

Screen

100

SAPLBA

9ield ontents

BCC$Samp B+(A-BA+(A

BCamp(Camp +

B+(A-BA+(A +aona Banlt

9ield ame

In different transactions the modue poo may change This is the case $ith for eampe customer

master data The TA recorder records modue poo changes automaticay

copy SAP AG BC420 12-30

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 3188

06

983209 SAP AG 1999

Eierarch( Displa( of the Recording

02amp

02

SAP02 0106

BCC$Samp 02-0130

BCamp(Camp )00

02-($++ -88-10000

02-0110

02-0130

SAP02 0111

BCamp(Camp V

BCC$Samp A1AA-amp$S+$1

A1AA-S Garden Sree

Recording

-ith the TA recorder the resuts are aso a ist in a hierarchy dispay =o$ever you cannot assign

your o$n fied names as you can in the +S-

copy SAP AG BC420 12-31

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 3288

0amp

983209 SAP AG 1999

Recording erie)

Recording

Transfer program

9unction module

ontains onl( the data

from the recording

Test data

Test

reate

reate

reate

reate

1dit hange recording

Process recording

Cou can edit the recording as needed

The recording can e tested and eecuted again The screens are run through in the same $ay as in

the recording

The recording can then e used to create

atch input sessions

Test data

ata transfer programs $ith atch input or ca transaction

Function modues

copy SAP AG BC420 12-32

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 3388

0

983209 SAP AG 1999

1 02 BS

2 SAP02 106

3 BCC$Samp $SZAV

4 BCamp(Camp )00 5 02-($++ -88-10000

6 02-0110

7 02-0130

8 $SZAV

9 SAP02 111

10 BCamp(Camp V

11 BCC$Samp A1AA-amp$S+$1

12 A1AA-S Garden Sree

Program Screen St 9ield ame 9ield alue

Recording 1ditor

Recording

Add gt delete lines 9ormat chec+

Import gt eport of recording

In the editor you can add or deete ines Cou can aso change the contents of individua ines

-ith the function Chec) you can specify $hether the edited version of the recording sti has the

correct synta

Cou can aso eport import recordings to from a seuentia fie

After editing save the recording changes

copy SAP AG BC420 12-33

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 3488

04

983209 SAP AG 1999

Recording Seeral Transaction Runs

RecordingF

Directl( after the first recordingG or

In the displa( mode of the recording

In this step you can record additiona transactions and add additiona transaction runs to the

recording

Cou can record the additiona transactions directy after a recording or in the edit screen of a

recording

copy SAP AG BC420 12-34

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 3588

02

983209 SAP AG 1999

1ditor$ Importing and 1porting Recordings

6 T 9D0amp S

amp SAPM90ampD 608

DltURSR

4

2

8 SAPM90ampD 666

60

66

Program Screen St 9ield name 9ield alue

cempA

e name

aa =orma

cemp

A

e name

aa =orma

1port

Import

Presentation Serer

If the editor functions in the systems do not provide a the functions you need you can do$noad the

recording to your presentation server using the Eort function and then edit the recording using a

P2 editor

Cou use the Import function to import the data ac into the amp System ae sure the fie is sti in

the correct format

copy SAP AG BC420 12-35

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 3688

08

983209 SAP AG 1999

Processing the Recording

Recording

Process )ith ALL TRASATI

Parameer

Proce mode$pdae mode

CA mode

e=a e

Con a=er comm

+o a B eon

nd +o a B mode

A

A

T

The recording can e eecuted directy The data from the recording is used and the transaction is

processed $ith ca transaction

2a transaction provides a range of options for caing appication transactions $hich are discussed

on the foo$ing t$o pages

copy SAP AG BC420 12-36

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 3788

03

983209 SAP AG 1999

Process mode

Update mode

ATT mode

Processing Recording )ith T 6

A

1

Displa( all screens

Displa( errors onl(

o displa(

L

S

A

Local

S(nchronous

As(nchronous

A

o ATT

ATT )ithout indiidual screen control

ATT )ith indiidual screen control

Processing mode

=ere you can specify the processing mode 9 it is the same as the processing mode for atch input

4pdate mode

=ere you can specify the update mode For more information see the unit ca transaction

2ATT mode

=ere you can mae specia settings if you $ant to test the recording under 2ATT conditions (ony

necessary for 2ATT runs) Specia functions are caed in the 2ATT too for each screen at the end of

P5 and at the start of PAI

copy SAP AG BC420 12-37

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 3888

05

983209 SAP AG 1999

Default sie

ont after commit

ot a I session

1nd$ ot a I mode

Processing Recording )ith T amp

The screen standard sie is used for the

processing

ommit )or+ does not end the processing

o I mode is actie The transaction )ill run

through as in online

I mode is selected nce the data in the D

table is processedG the I mode is set to inactie

Standard siDe

If you seect this the screens are processed in the standard siDe in the foreground (in foreground or

dispay errors ony) Note the standard siDe is a$ays used for acground processing

Further after commit

The first commit $or in a transaction does not ead to the end of the recording

Note A atch input transaction is ended $ith the first commit $or

No I mode

The system fied SC9INPT is not set (SC9INPT E ) So transactions are run through as in onine

7nd No I mode

5ny use if you choose the processing mode 7 (dispay errors ony) Then the transaction is processed in the acground in atch input mode and if there is an error the screens run through in

the foreground

copy SAP AG BC420 12-38

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 3988

07

983209 SAP AG 1999

I Mode

atch input

mode

nline

Some transactions behae differentl( in batch input mode

than in online Cbatch input capabilit(

atch input mode sets the s(stem field SIPT H

Not every transaction can run the same onine and in atch input mode The transaction must decide

itsef $hether it is caed onine or in atch input mode

The system sets the system fied SC9INPT E G if the atch input mode is active (this aso appies

to ca transaction) From this system fied the transaction can identify $hether to run onine or in

atch input mode

copy SAP AG BC420 12-39

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 4088

040

983209 SAP AG 1999

reating a Session 9rom the Recording

Recordingnl( contains the data

from the recording

Seon name 02amp

Aoraon ampBS(eep eon

oclt dae 10102000

Cou can create a atch input session directy from the recording that you can then process using the

atch input monitor

copy SAP AG BC420 12-40

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 4188

046

983209 SAP AG 1999

reating Test Data

Test Data

Recording

ranranpBC420AAe name

The file onl( contains the data from the recording

Rgt

Application Serer

Structure

Cou can create a fie from the recordingH the fie $i contain a the fieds from the recording The

fieds are added to the fie $ith the ength you specified in the definition

The fied order corresponds to the order in the recording overvie$ Technica fieds

(2356257 2324ampS5amp and so on) are incuded

The data can ony e stored on the appication server If you do not specify a path the fie is stored in

the $or directory of the appication server

If the specified test fie aready eists the ne$ data record is added to this fie

copy SAP AG BC420 12-41

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 4288

04amp

983209 SAP AG 1999

ed conen

reating a Program

Recording

ZBC420ampProram name

Transfer Program

e daa

ead =rom =e

ran=er =rom recordn

reate

9ile nameTest data

ranranpBC420AA

Cou can generate a program from the recording

In the foo$ing diaog o enter a program name In addition you can choose the type and method

for fiing the maintained fied contents from the recorded screens

4se the vaues used for the recording If you reuire feie data transfer you $i have to modify

this program ater

ParameteriDe the input vaues and read these vaues from a fie A data structure is created for

parameteriDationH the data records are read from an eterna fie into this data structure The

program assumes the fie $as taiored to this data structure

If you have decided to parameteriDe the input vaues you shoud aso create a test fie during

generation To do this seect the checo and enter a name for the fie

The attriute maintenance screen of the AAP editor appears aintain the attriutes and save the

program

copy SAP AG BC420 12-42

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 4388

04

983209 SAP AG 1999

Program 9unctions

Online

transaction

Transfer program

To

error

1rror

ption 6ption ampFlat SAP

structure

Monitor

Cou have no$ generated a data transfer program for importing data into the amp System The

program can eecute the data transfer using atch input or ca transaction

If you choose option 1 and there is an error the data record is paced into a atch input session

copy SAP AG BC420 12-43

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 4488

044

983209 SAP AG 1999

Benerating 9unction Modules

Recording

Zcreaedeor ncon mode

ncon rop

Sor eD

ZBC420

Creae comer

9unction module

nl( one data record can be processed at a time

In the net diaog o you can generate a function modue a function group and short tet from the

recording The function modue is automaticay created in the function group

copy SAP AG BC420 12-44

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 4588

042

983209 SAP AG 1999

9unction of 9unction Modules

Online

transaction

To

error

1rror

ption 6 ption amp

9unction module

Import

Parameter 1port

parameter

Tables

M1SSTA

Monitor

S$BC

Import interface

The import interface consists of a technica part and the fieds from the recording (A parameter is

created for each input fied of the recorded transactions)

7port interface

Simpy consists of the parameter S4amp2 The function modue $i return a vaue in the system

fied SC9S4amp2 after caing ca transaction This return vaue is set to Dero if the data record has

een correcty processed (5ny appies to 2T)

If a session is created you $i e notified $hether the data record coud e paced into the session

Tae interfaceThis is used ony if the function modue $ors $ith ca transaction The tae contains a the

system messages

copy SAP AG BC420 12-45

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 4688

048

983209 SAP AG 1999

Import Interface of 9unction Module

$

Technical

fields

Data

fields

BI session or CALL TRANSACTION

Processin $ode

pdate $ode

a$e oamp BI session iamp (T initial)

Bacround user iamp (T initial)

Delete session aampter processin

Loc date oamp session

ODATA indicator

TU

MD1

UPDAT1

BRUP

US1R

=11P

ELDDAT1

DATA

Cou can use parameter 2T4 to specify $hether the function modue creates a atch input session

(2T4 E ) or updates the data record directy using ca transaction (2T4 E G)

The other parameters are fied as for a atch input session header

Note 7very time the function modue is caed a atch input session is created

If the session is to contain severa transactions proceed as foo$s

ltenerate the transaction severa times This can e achieved y recording the transaction again The

function modue interface $i then contain more than one transaction -hen the function modue is

caed severa transactions can e generated for each session

copy SAP AG BC420 12-46

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 4788

043

983209 SAP AG 1999

The Transaction Recorder

PrinciplesPrinciples

Recording )ith the LSMWRecording )ith the LSMW

Principles of atch Input and all TransactionPrinciples of atch Input and all Transaction

Integrating the TA Program into the DWIntegrating the TA Program into the DW

Using the TA Recorder Using the TA Recorder

copy SAP AG BC420 12-47

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 4888

045

983209 SAP AG 1999

Benerated Program

9unction modules DltP1ltBRUP

DltIS1RT

DltLS1ltBRUP

AAP Program

Define structure of

data in seJuential

fileDefine D

table

pen seJuential file

pen I session

Read data recordCseJuential file

9ill D table

9ill I session gtALL TRASATI

Last data record K

lose I session

lose seJuential file

The generated program has the structure dispayed aove It uses the standard function modues for

creating atch input sessions

copy SAP AG BC420 12-48

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 4988

047

983209 SAP AG 1999

Structure of the Benerated Program

Benerated part

Define D

table

pen seJuential file

pen I session

Read data record

9ill D table

9ill I session gtALL TRASATI

Last data recordK

lose I session

lose seJuential file

Include DR16

Define filestructure

P1ltDATAS1T

P1ltBRUP

DltDPR

Dlt9I1LD

DltTRASATI

LS1ltBRUP

LS1ltDATAS1T

The generated program consists of t$o parts 9 a generated part and the incude 2amp72G8 The

incude is provided in the standard system

The incude contains the definition of the reuired 2 tae and a further seven suroutines These

suroutines eecute the foo$ing functions

5pen and cose fie

5pen and cose session

Fi 2 tae

Fi session

The generated part is the main program and cas the reevant suroutines A structure is aso

generated in the generated part to read the eterna data into the fie

See the Appendi for more information on the 2amp72G8 program

copy SAP AG BC420 12-49

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 5088

020

983209 SAP AG 1999

Structure of D Table

PRBRAM DPR D1BI 9AM 9ALPRBRAMPRBRAM DPRDPR D1BID1BI 9AM9AM 9AL9AL

SAPM90ampD 0602

R90ampD=UR 600000

R90ampDU=RS 0006

R90ampD=T=D =UA

SAPM90ampD 0660

=A6AM16 Smith

=A6PSTL 87000

=A6LAD6 US

=A6SPRAS 1

SAPM90ampD 06amp0

=A6ST1B US6amp428357DDATA

PRBRAM

DPR

D1BI

9AM

9AL

EAR

UM

EAR

EAR

EAR

40

4

6

6amp

6amp

D Module pool

D Screen number

D Start of screen

D 9ield name

D 9ield contents

9ield ame T(pe Length Short Tet

AAP Dictionar(

The 2 tae has the same structure as in a standard transfer

copy SAP AG BC420 12-50

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 5188

026

983209 SAP AG 1999

Read Structure

Recording

DATA BEGIN OF record data element BUKRS bukr$amp data element KTOKD ktokd$amp data element NA(EG) name$+amp data element SORT ortl$ampEND OF record-

record

Automaticall( generated

from recording

The structure of the fie is automaticay generated and is a$ays defined $ith the name amp725amp

The generated structure a$ays has the same ayout 7ach fied is defined y t$o generated ro$s

The first ro$ is a$ays a comment ro$ containing the tet J data eement and the data eement of

the screen fied from the recording In the net ro$ the fied itsef is defined $ith the name of the

data eement foo$ed y a three9digit position numer $hich specifies the ocation in the structure

The ength of the fied is set y the ength of the data eement If a fied is not defined through a data

eement the system uses the ength of the screen fied

copy SAP AG BC420 12-51

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 5288

02amp

983209 SAP AG 1999

pening and losing the 9ile

P1ltDATAS1T

LS1ltDATAS1T

FOR( oendataet USING dataet-O)EN DATASET dataet IN TET (ODE-

IF S01SUBR2 34 - 5RITE 6 te7t1e S01SUBR2-STO)-

ENDIF-

ENDFOR(-

FOR( cloedataet USING dataet-2OSE DATASET dataet-

ENDFOR(-

Include

DR16

The suroutine 5P7N3ATAS7T opens the seuentia fie

The suroutine 2+5S73ATAS7T coses the seuentia fie

copy SAP AG BC420 12-52

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 5388

02

983209 SAP AG 1999

9unction Modules for I Program

lient

Session name

Eold date

=eep session

D user name

RecordK

LI1T

BRUP

ELDDAT1

=11P

US1R

R1RD

DltP1ltBRUPDltP1ltBRUP

Transaction code

D table

TD1

DPRTA

DltIS1RTDltIS1RT

DltLS1ltBRUPDltLS1ltBRUP

pen Isessionpen Isession

Insert data for

transactions

Insert data for

transactions

lose I

session

lose I

session

The foo$ing function modues are provided for creating atch input sessions (function group

S2)

235P7N3ltamp54P

2reates a ne$ session and contains genera data for the $hoe session

23INS7ampT

Inserts a the data for a transaction into the session The transferred interna tae $ith the

structure 2ATA must contain a the data reuired for fuy processing the transaction

232+5S73ltamp54P

2oses the session after a the data has een inserted As soon as the session has een cosed it

can e processed

The interna tae $ith the structure 2ATA can ony contain atch input data for one singe

transaction run So the individua transactions are inserted into the atch input session in a oop

using severa 23INS7ampT cas

copy SAP AG BC420 12-53

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 5488

024

983209 SAP AG 2001

9unction Module DltP1ltBRUP

ALL 9UTI DltP1ltBRUPALL 9UTI DltP1ltBRUP

1PRTIB

LI1T client

BRUP session name

ELDDAT1 loc+ date

=11P delete flag

US1R bdc user name

R1RD recording

IMPRTIB

NID internal session +e(

11PTIS

1PRTIB

LI1T client

BRUP session name

ELDDAT1 loc+ date

=11P delete flag

US1R bdc user name

R1RD recording

IMPRTIB NID internal session +e(

11PTIS

-ith the function modue 235P7N3ltamp54P you can open a atch input session

The foo$ing parameters are mandatory

2+I7NT (cient)

ltamp54P (session name)

4S7amp (user name)

Note The 4S7amp must a$ays e specified This user name is reuired for processing the session

in atch mode

The foo$ing parameters are optiona

=5+AT7 specifies the eariest date on $hich the session can e started677P fag specifies $hether session shoud e deeted after it has een successfuy processed The

677P fag is ignored if the session contains errors

677P E K K means deete the session after processing (defaut vaue) H

677P E KGK means do not deete session

amp725amp E KGK ao$s you to create a recording instead of a I session

If gtI is specified the function modue returns the interna session ey This is needed to e ae to

differentiate sessions that have the same name

-ith 7G27PTI5NS you get various return vaues that can e ueried $ith SC9S4amp2

Note In onine mode the onine user is used for the authoriDation checs regardess of the user

name specified

copy SAP AG BC420 12-54

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 5588

022

983209 SAP AG 1999

Subprogram P1ltBRUP

P1ltBRUP

FOR( oen8rou-IF e9on -

2A FUN2TION BD2O)ENGROU) E)ORTING 2IENT lt1mandt GROU) 8rou USER uer KEE) kee

=ODDATE gtolddate-

ENDIF-ENDFOR(-

Include

DR16

The suprogram 5P7N3ltamp54P opens the atch input session

copy SAP AG BC420 12-55

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 5688

028

983209 SAP AG 1999

9unction Module DltIS1RT

ALL 9UTI DltIS1RTALL 9UTI DltIS1RT

IMPRT

TD1 Transaction code

PSTltLAL Update locall(

PRITIB print list

TAL1S DPRTA bdclttable

11PTIS

IMPRT

TD1 Transaction code

PSTltLAL Update locall(

PRITIB print list

TAL1S DPRTA bdclttable

11PTIS

-ith the function modue 23INS7ampT you can add transaction data to the session

Cou need an interna 2 tae to transfer the data

The foo$ing parameters are mandatory

T257 Transaction code

CNPamp5TA 2 tae

The foo$ing parameters are optiona

P5ST3+52A+ E KGK activates oca updating This means that the data to e updated is ept in the

appication server and updated in the ast step of the transaction This does not invove the update

process (For more information see course 28 Programming ataase 4pdates)

PampINTINlt E KGK 9 ists processed in I $i e printed immediatey -ith 7G27PTI5NS you get various return vaues that can e ueried $ith SC9S4amp2

copy SAP AG BC420 12-56

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 5788

023

983209 SAP AG 1999

Subprogram DltTRASATI

DltTRASATI

FOR( BD2TRANSA2TION USING tcode-

IF e9on -2A FUN2TION BD2INSERT

E)ORTING T2ODE tcode TABES D0N)ROTAB bdcdata-

ESE-

ENDIF-ENDFOR(-

T

Include

DR16

The suprogram 23TampANSA2TI5N moves the fied 2 tae either to a atch input session

or uses ca transaction to import the data into the system 5n the seection screen you can specify

$hether you $ant to create a session or you $ant to use ca transaction to process the data directy

The S7SSI5N fied is then set according to your seection

copy SAP AG BC420 12-57

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 5888

025

983209 SAP AG 1999

9unction Module DltLS1ltBRUP

ALL 9UTI DltLS1ltBRUP

11PTIS

TltP1 6

NU1U1lt1RRR amp

-ith the function modue 232+5S73ltamp54P you can cose a atch input session

In 7G27PTI5NS you get various return vaues that can e ueried $ith SC9S4amp2

copy SAP AG BC420 12-58

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 5988

027

983209 SAP AG 1999

Subprogram LS1ltBRUP

FOR( cloe8rou-IF e9on -cloe batcgt 9nut 8rou

2A FUN2TION BD22OSEGROU)-

ESE-IF e8rouoened -

2A FUN2TION BD22OSEGROU)-

ENDIF-ENDIF-

ENDFOR(-

LS1ltBRUPlose session

lose error session

Include

DR16

The suprogram 2+5S73ltamp54P coses the atch input session The suprogram differentiates

et$een a norma I session (S7SSI5N E G) and a session opened $hen ca transaction

encountered an error (73ltamp54P35P7N7 E G)

copy SAP AG BC420 12-59

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 6088

080

983209 SAP AG 1999

Subprograms DltDPRG Dlt9I1LD

DltDPR

Dlt9I1LD

FOR( bdc9eld USING nam al-IF al 34 nodata-2EAR bdcdata- bdcdata1nam nam- bdcdata1al al- A))END bdcdata-ENDIF-

ENDFOR(-

FOR( bdcdltnro USING ro8ram dltnro- 2EAR bdcdata-Bdcdata1ro8ram ro8ram-Bdcdata1dltnro dltnro-Bdcdata1dltnbe89n - A))END bdcdata-ENDFOR(-

Include

DR16

The incude 2amp72GG contains t$o suprograms 23CNPamp5 and 23FI7+

Suprogram 23CNPamp5 fis the 2 tae $ith program names and screen numers

Suprogram 23FI7+ fis the 2 tae $ith fied names and vaues

7ach suprogram creates an entry in the 2 tae

copy SAP AG BC420 12-60

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 6188

086

983209 SAP AG 1999

9illing the D Table

erorm bdcdltnro u9n8 SA)(FD +- erorm bdc9eld u9n8 BD22URSOR RFD1BUKRS- erorm bdc9eld u9n8 BD2OK2ODE 6- erorm bdc9eld u9n8 RFD1BUKRS record1BUKRS- erorm bdc9eld u9n8 RFD1KTOKD record1KTOKD-

erorm bdcdltnro u9n8 SA)(FD -

erorm bdc9eld u9n8 BD22URSOR KNA1S)RAS- erorm bdc9eld u9n8 BD2OK2ODE 6- erorm bdc9eld u9n8 KNA1NA(E record1NA(E-

erorm bdc9eld u9n8 KNA1SORT record1SORT-

Recording Benerated automaticall(

from the recording

)ERFOR( bdcdltnro USING SA)(FD +- )ERFOR( bdc9eld USING BD22URSOR RFD1BUKRS-)ERFOR( bdc9eld USING BD2OK2ODE 6-)ERFOR( bdc9eld USING RFD1BUKRS record1BUKRS-)ERFOR( bdc9eld USING RFD1KTOKD record1KTOKD-

)ERFOR( bdcdltnro USING SA)(FD -

)ERFOR( bdc9eld USING BD22URSOR KNA1S)RAS-)ERFOR( bdc9eld USING BD2OK2ODE 6-)ERFOR( bdc9eld USING KNA1NA(E record1NA(E-

)ERFOR( bdc9eld USING KNA1SORT record1SORT- ---

The 2 tae is fied $ith data from the recording The suroutines 23CNPamp5 and

23FI7+ are used for this

The suroutines are caed in the reuired structure or seuence

copy SAP AG BC420 12-61

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 6288

08amp

983209 SAP AG 1999

erie)

SAPDatabase

SeJuential9ile

SAPDatabase

ALL TRASATIALL TRASATI

SeJuential9ile

ATE IPUTATE IPUT

D TableD TableD TableD Table

I Monitor

T

In contrast to atch input you can use ca transaction to directy pass data to the diaog interface

$ithout using a atch input session Cou use an interna tae (2 tae same structure and ayout

as atch input) to temporariy store your screen data Then you ca the desired transaction in your

program

Note 5n average the 2a Transaction method is 8 to times faster than using atch Input

copy SAP AG BC420 12-62

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 6388

08

983209 SAP AG 1999

all Transaction Program$ 1ample

RE)ORT abcbdcdcdeb9ct-

)ARA(ETERS d9mode DEFAUT A

udmode DEFAUT S-FOR( calltranact9on-2A TRANSA2TION FD

USING bdcdata (ODE d9mode

U)DATE udmode-

IF lt1ubrc NE - 5RITE 6 ---

ENDIF-ENDFOR(-

Screen

00

Screen

100

Screen

An additiona system ro area is added for the caed transaction The system uses this area for

processing the individua screens in the transactionH the data from the tae is added here After the

transaction is processed the second ro area is reeasedH the system continues processing in the first

ro area

Notes

In contrast to atch input there is no error ogging (error sessions) here For processing the caed

transaction the system uses the authoriDations of the user that caed the transaction The 2 tae

can ony hod data for one transaction run at a time efore another transaction is caed and its data

can e added you must eecute a amp7Famp7S= for the 2 tae

copy SAP AG BC420 12-63

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 6488

084

983209 SAP AG 1999

ALL TRASATI C6

RE)ORT 777-

2A TRANSA2TION FD USING bdcdata (ODE E-

Default for MD1 is A

2A TRANSA2TION 3tranact9oncode4 USING 3bdc1table4 C (ODE A E N C-

-ith the parameter 57 you can seect a specific dispay mode for processing the transaction The

foo$ing three modes are avaiae

A (ispay a)

If you eecute the program a the screens and a their data are dispayed This is the defaut vaue

for the 57 in 2A++ TampANSA2TI5N

N (ispay nothing)

The screens are not dispayed at a regardess of $hether any of them contained errors As soon as

the transaction has een fuy processed contro is returned to your program (The vaue of the

parameter 4PAT7 determines $hether dataase updates are eecuted or not)

7 (ispay errors ony)As soon as an error occurs in a screen the transaction is s$itched to dispay mode so that you can

correct the errors

These dispay modes are the same as those in the atch input session processing

copy SAP AG BC420 12-64

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 6588

082

983209 SAP AG 1999

RE)ORT 777-

2A TRANSA2TION FD USING BD2DATA U)DATE -

ALL TRASATI Camp

RE)ORT 777-

2A TRANSA2TION FD USING bdcdata U)DATE -

2A TRANSA2TION 3tranact9oncode4 USING 3bdc1table4 C (ODE A E N C U)DATE A S C -

Default for UPDAT1 is A

-ith the parameter 4PAT7 you can contro ho$ dataase updates arising from a transaction are

carried out There are three options

A (asynchronous updating) The caed transaction does not $ait unti the dataase has een

updated it simpy for$ard the updates to the SAP update service This usuay speeds up the 2T

program This processing mode is N5T recommended for arge data sets as the caed transaction

does not receive a competion message from the update modue

The caing 2T program therefore cannot te if the transaction has een successfuy competed Cou

shoud use the updating administration function (transaction S8) to determine $hether updating

$as terminated eary The error anaysis correction functions for are ess hepfu than $ith

synchronous updating

S (synchronous updating) -ith synchronous updating the caed transaction $aits unti a the

updates have een competed So processing is so$er than $ith synchronous updating The caed

transaction can ho$ever report any updating errors to the program $hich maes error

anaysiscorrection easier

+ (local updating) $ith oca updating the dataase is not updated in a separate process it is

updated in the caers process (see appication hep documentation for the AAP ey$ord S7T

4PAT7 TAS6 +52A+)

copy SAP AG BC420 12-65

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 6688

088

983209 SAP AG 1999

ALL TRASATI C

RE)ORT 777-DATA mtab T0)E TABE OF bdcm8coll-

2A TRANSA2TION FD USING bdcdata (ESSAGES INTO mtab-

2A TRANSA2TION 3tranact9oncode4 USING 3bdc1table4 C (ODE A E N C U)DATE A S C (ESSAGES INTO 3metab4 C -

7SSAlt7S specifies that a system messages that are output during the eecution of a 2A++

TampANSA2TI5N are $ritten to the interna tae L7SSTA The interna tae must have the

structure 2Slt25++

4nie the cassica atch input processing $ith sessions 2A++ TampANSA2TI5N does not offer any

specia processing procedures for transactions containing errors There are no restart functions for

transactions that contain errors or that cause updating terminations

copy SAP AG BC420 12-66

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 6788

083

983209 SAP AG 1999

ALL TRASATI C4

RE)ORT 777-DATA mltot T0)E ctuaram-

2A TRANSA2TION FD USING BD2DATA

O)TIONS FRO( mltot-

2A TRANSA2TION 3tranact9oncode4 USING 3bdc1table4 C (ODE A E N C U)DATE A S C (ESSAGES INTO 3metab4 C O)TIONS FRO( ot C -

RE)ORT 777-DATA mltot T0)E ctuaram-2A TRANSA2TION FD USING bdcdata

O)TIONS FRO( mltot-

The addition 5PTI5NS enaes the ca transaction statement to e controed through a structure

The structure must have the dictionary type 2T43PAampAS

The addition 5PTI5NS Famp5 must not e comined either $ith the addition 57 or $ith

4PAT7 ore information on the net side

copy SAP AG BC420 12-67

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 6888

085

983209 SAP AG 1999

Structure TUltPARAMS

DISMD1 Procen mode anaoo o addon amp

UPDMD1 $pdae mode anaoo o addon $PA

ATTMD1 CA mode CA conro

D19SI1 orce de=a EndoE e drn procen

RAMMIT +o eD a Camp amp(

IPT +o a ac np eonF a F S-B+P SPAC

I1D +o a ac np eon a=er end o= BC daa

The components are defined as foo$s

The components 7FSIM7 ampA25IT N5INPT and N5I7N can have the foo$ing

vaues KGK E Ces or K K E No

If the addition 5PTI5NS Famp5 is not specified the foo$ing settings appy to the contro

parameters

IS57 from addition 57

4P57 from addition 4PAT7

2ATT57 2ATT not active

7FSIM7 o not not use defaut $indo$s siDe

ampA25IT Successfu eit at 25IT -5amp6

N5INPT atch input session active (SC9INPT E G)

N5I7N atch input session sti active after end of 2 data

copy SAP AG BC420 12-68

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 6988

087

983209 SAP AG 1999

SMSBID Message ID

SMSBT Message T(pe C1GIGWGSGA

SMSB Message umber

SMSB6 Message ariable 6

SMSBamp Message ariable amp

SMSB Message ariable

SMSB4 Message ariable 4

SMSBID Message ID

SMSBT Message T(pe C1GIGWGSGA

SMSB Message umber

SMSB6 Message ariable 6

SMSBamp Message ariable amp

SMSB Message ariable

SMSB4 Message ariable 4

Return code$

S(stem fields$

alue Meaning

0 Successful

6000 1rror in transaction

6000 1rror in processing call transaction

see also the s(stem fields specified

alue Meaning

0 Successful

6000 1rror in transaction

6000 1rror in processing call transaction

see also the s(stem fields specified

9ield name Meaning9ield name9ield name MeaningMeaning

Return ode and S(stem 9ields

The return code is used to specify $hether the caed transaction $as processed successfuy In

addition severa system fieds are fied The numer I type and variaes of the diaog message

output y the caed transaction Cou need this information to output the message tet

copy SAP AG BC420 12-69

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 7088

030

983209 SAP AG 1999

Benerated Program of the TA Recorder

REFRES= (ESSTAB-

2A TRANSA2TION tcode USING bdcdata (ODE ctumode U)DATE cudate (ESSAGES INTO metab-OO) AT metab- ENDOO)-IF lubrc 34 AND e8rou 34 S)A2E- IF e8rouoenend - 2A FUN2TION BD2O)ENGROU) E)ORTING ---------

--------- E8rouoened - ENDIF- 2A FUN2TION BD2INSERT E)ORTING T2ODE tcode TABES D0N)ROTAB bdcdata-ENDIF-REFRES= bdcdata-

Message table output

pen error session

Insert data record that

has errors into error

session

If you have seected ca transaction on the seection screen the generated program runs as foo$s

The onine transaction is caed $ith ca transaction and passed to tae 2ATA A the

messages arising during the ca transaction are put in the interna tae 7SSTA

7SSTA is output as a ist

If you have specified an error session ( 73ltamp54P L SPA27) on the seection screen and the

ca transaction comes across an error (+3S4amp2 L 0) the error session is opened The error

session is ho$ever ony opened once Then the data record is paced in the session

A the other data records that have errors $ith ca transaction are paced in the same session

copy SAP AG BC420 12-70

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 7188

036

983209 SAP AG 1999

The Transaction Recorder

PrinciplesPrinciples

Recording )ith the LSMWRecording )ith the LSMW

Principles of atch Input and all TransactionPrinciples of atch Input and all Transaction

Integrating the TA Program into the DWIntegrating the TA Program into the DW

Using the TA Recorder Using the TA Recorder

copy SAP AG BC420 12-71

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 7288

03amp

983209 SAP AG 1999

Integrating into the DW

Transfer program

AAP Dictionar(

Integrate

SDA0

SDA6

SDAamp

SDA

Cou can integrate the generated program into the G9- The structure of the fie must e created

in the AAP ictionary The taes SGA0 SGA8 SGA1 and SGA $i e fied

copy SAP AG BC420 12-72

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 7388

03

983209 SAP AG 1999

DW Release 42

Goo

-B eeae 45

aa ran=er ogtec

Int customer data transfer ob-ect

ecord =ed

Dece daa ran=er

d Goo

The ampunction ampor interatin TA recorder prora$s is

i$ple$ented in the

D+-B in Release

The recorder can e integrated as of ampeease and it is provided in the G9- ampeease

ltot to the G9- ampeease 5n the initia screen you can integrate programs y choosing ampoto

( +nt customer ata transfer o-ect

copy SAP AG BC420 12-73

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 7488

034

983209 SAP AG 1999

reating Program as D b-ect

Comer ran=er ogtec

ampgtec ype

Sor eD =or ogtec

aa ran=er proram

Srcre name

9900

(+A1

Cane comer

ZBCA+G

ZB

ustomer transfer ob-ect

umber bet)een 7000 and 7777

b-ect t(pe

Assignment to R ob-ect

Short tet for D ob-ectShort description

Data transfer program

ame of generated program

Structure name

A structure Cstructure la(out )ith this name is created in

the AAP Dictionar(

For ampeease transfer oects $ere not organiDed y 5amp oects ut y a G numer (00089

OOOO) The numer range O0009OOOO is reserved for customers

To create a connection to the ne$ G 9- you must assign the program to a 5amp oect

2reate a short tet for the G oect This tet $i appear in the method seection ist

Specify the program to e incuded

Specify a name for the structure to e created in the AAP ictionary

Note $he generated program appears under program type +N and not under program type

-

copy SAP AG BC420 12-74

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 7588

032

983209 SAP AG 1999

Adantages

Automatic program registration in the DW in

Release 48

ou can use all the functions defined for

standard ob-ects

1ception$ The (reate ampile ith data

function

If you incuded the oect in the ampeease $orench it is automaticay avaiae in the ampeease

B $orench

A the $orench functions are avaiae for your oect ecept for Create files ith transfer ata

copy SAP AG BC420 12-75

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 7688

038

983209 SAP AG 1999

ou are no) able to$

The Transaction Recorder$ Unit Summar(

Use the recording function in the LSMW to create

a batch input session )ith the data from the

eternal s(stem

Use the TA Recorder to create (our o)n data

transfer program

Anal(e programs that )or+ )ith batch input or

call transaction

Integrate the TA Recorder programs into the

DW

copy SAP AG BC420 12-76

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 7788

ercise 1

nit $ -ecorder

$opic 2reating etors

$ransaction -ecorder ercise 1

bull 2reating detors $ith eterna numer assignment

bull etor numers M9980008 to M9980080

Address data for detors $ith eterna numer assignment is to

e transferred using program ampFI700

ro4ect F5

Supro4ect +5

-un +575

$as)s 85 95 8S25

9oad program -F+00

8 In the foo$ing eercises eisting data is to e changed Therefore these detors $ith

eterna numer assignment have to first e created

898 4nder suproect 79 create run 797G9 $ith the name Detors ith

eternal numers

copy SAP AG BC420 12-77

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 7888

891 2reate the foo$ing three tass The tass map the foo$ing process steps

convert data create + session and process + session

89198 In run 797G9 create the foo$ing tas

9 Tas AP9

9 Name 2onvert data 9 Tas type AP

9 Program type +S-

Seect the foo$ing +S- oect

+S- proect 2109

+S- suproect 7I9

+S- oect I997GT

89191 In run 797G9 create the foo$ing tas 9 Tas +5A9

9 Name 2reate I session

Tas type +5A

9 Program type INP

Seect program ampFI700 $ith the variant

I97G9

8919 In run 797G9 create the foo$ing tas

9 Tas S29

9 Name Process I session Tas type S2

9 Program type amp7P5

Seect program ampS2S4 $ith the variant

S497G9

Note that you have to correct the seuence of the tass 2onvert data

create + session and process + session

4se the uttons

89 Start the run

The detors $i e created $ith eterna numer assignments

89 2hec in transaction F0 that the detors M9980008 to M9980080 have een

created

copy SAP AG BC420 12-78

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 7988

ercise

nit $ransaction -ecorder

$opic -ecording function in the 9S8(

bull 2reate a recording using the +S-

bull ltenerate a atch input session

2hange the detor address data in the amp System

Name of the recording +

Name of the file +2055+F9

8 2reate the recording 7I3 using the +S- ampecord the transaction F01 (2hange

detor)

898 efore you create the recording first test the transaction onineQ

For the recording use detor M9980008 5n the initia screen of the F01

maintain the foo$ing fieds ony

etor etor M9980008

2ompany code 0008

Address data seect

Note $he data record must e saved hile recording

891 aintain the names and the descriptions for the foo$ing fieds

Name city street posta code and teephone numereete a other fieds in screen 880 from the recording (eg S5ampT+ +AN8

SPampAS)

4se the same technica names as sho$n in the tae eo$ (automatic fied

mapping)

copy SAP AG BC420 12-79

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 8088

1 2reate the suproect 7I9 and the ne$ oect TA3 in your proect 2109

aintain the oect attriutes and seect the item atch input recording Seect your

recording 7I3

2reate the source structure address

2reate the source fieds according to the tae eo$ 5r copy them from proect 2109S37N suproect 7I900 oect TA900

198 Fie setup The data from the egacy system are dispayed in the foo$ing tae

Fied name Fied type Fied ength escription

N5 2 8B etor numer

NA7 2 Name

STamp77T 2 Street

2ITC 2 2ityPace of residence

MIP 2 80 Posta code

T7+ 2 8B Teephone numer

191 aintain the fied mapping 4se the automatic fied mapping (via menu item

7tras)

19 Specify the fies 5ny maintain the fie name of the source fie

Name of the fie 21099IFI+7

2odepage 8800

19 Import the data and convert them ispay the data in each caseQ

19 2reate a atch input session

19B ampun the atch input session

copy SAP AG BC420 12-80

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 8188

ercise 3

nit $ransaction -ecorder

$opic -ecording ith the $ -ecorder

bull ltenerate a recording using the TA recorder

bull Test the recording

2hange the address data of detors in the amp system

Name recording $+

Name of the file +2055+F9

8 2reate the recording TA37I3 using the transaction recorder ampecord the

transaction F01 (change detor)

898 4se detor M9980008 for the recording 5n the F01 initia screen ony

maintain the foo$ing fieds

etor etor M9980008

2ompany 2ode 0008

Address data seect

Note $he data record must e saved hen recording

eete a fieds that do not eist in the source fie 21099IFI+7 from screen

880 in the recording (eg 6NA89S5ampT+ 6NA89+AN8 6ANNQ9SPampAS) Note o not deete fieds ampF01946ampS and ampF0190880

Save the recording no$

1 S$itch to the recordings overvie$

198 Process the recording $ith the processing mode A (dispay a)

191 Process the recording $ith the processing mode RN (no dispay)

19 If the recording has een tested and no error has occurred generate a I session

and run it using the I monitor If an error shoud occur generate the recordingagainQ

copy SAP AG BC420 12-81

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 8288

From the recording generate the program M21037I3 in your deveopment cass

2109 Seect the foo$ing

bull ampead fied contents from fie

bull 2reate test data in the fie 2103dei3test3tt

98 Save this program and eecute it ltenerate one I session each and process it

2arry out the same steps again using the ca transaction

The generated program shoud no$ e changed so that fie 21099IFI+7 can e

read and processed

98 2hange the defaut vaue of the fie name (parameter dataset) in 21099

IFI+7

91 2hange the structure definition eete the company code fied and the address

data checo from the structure

9 2hange the su9routine ca perform dc3fied for the company code (KampF019

46ampSK) so that the vaue 0008 is transferred

9 2hange the su9routine ca perform dc3fied for the address data checo

(KampF0190880K) so that the vaue G is transferred

9 Start the program again and read the data from the fie 21099IFI+7 $ith

detor data ltenerate a I session $ith it and run it

copy SAP AG BC420 12-82

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 8388

033 Include DR16INCLUDE BDCRECX1

SELECTION-SCREEN BEGIN OF LINE

PARAMETERS SESSION RADIOBUTTON GROUP CTU create sessi SELECTION-SCREEN COMMENT $amp TEXT-S FOR FIELD SESSION

se(ecti-scree )siti +

PARAMETERS CTU RADIOBUTTON GROUP CTU ca(( trasacti

SELECTION-SCREEN COMMENT $amp TEXT-S FOR FIELD CTU

SELECTION-SCREEN END OF LINE

SELECTION-SCREEN BEGIN OF LINE

SELECTION-SCREEN COMMENT $amp TEXT-S1 FOR FIELD GROUP

se(ecti-scree )siti $+

PARAMETERS GROUP1$amp r) ae 0 sessi

SELECTION-SCREEN COMMENT $amp TEXT-S+ FOR FIELD CTUMODE

se(ecti-scree )siti

PARAMETERS CTUMODE LIE CTU2PARAMS-DISMODE DEFAULT 3N3

A4 s56 a(( 78)rs

E4 s56 78)r errr (8

N4 7 t 7is)(a8 78)r

SELECTION-SCREEN END OF LINE

SELECTION-SCREEN BEGIN OF LINE

SELECTION-SCREEN COMMENT $amp TEXT-S$ FOR FIELD USER

se(ecti-scree )siti $+

PARAMETERS4 USER1$amp DEFAULT S9-UNAME ser 0r sessi i atc5

SELECTION-SCREEN COMMENT $amp TEXT-S FOR FIELD CUPDATE

se(ecti-scree )siti

PARAMETERS CUPDATE LIE CTU2PARAMS-UPDMODE DEFAULT 3L3

S4 s8c5rs(8

A4 as8c5rs(8

L4 (ca(

SELECTION-SCREEN END OF LINE

SELECTION-SCREEN BEGIN OF LINE

SELECTION-SCREEN COMMENT $amp TEXT-S FOR FIELD EEP

se(ecti-scree )siti $+

PARAMETERS4 EEP AS CltECBOX 3 3 = 7e(ete sessi i0 0iis5e7

3X3 = gtee) sessi i0 0iis5e7

SELECTION-SCREEN COMMENT $amp TEXT-S FOR FIELD E2GROUP

copy SAP AG BC420 12-83

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 8488

se(ecti-scree )siti

)araeters E2GROUP1$amp r) ae 0 errr-sessi

SELECTION-SCREEN END OF LINE

SELECTION-SCREEN BEGIN OF LINE

SELECTION-SCREEN COMMENT $amp TEXT-S FOR FIELD ltOLDDATE

se(ecti-scree )siti $+

PARAMETERS4 ltOLDDATE LIE S9-DATUM

SELECTION-SCREEN COMMENT +11amp TEXT-S$ FOR FIELD E2USER

se(ecti-scree )siti

PARAMETERS4 E2USER1$amp DEFAULT S9-UNAME ser 0r errr-sessi

SELECTION-SCREEN END OF LINE

SELECTION-SCREEN BEGIN OF LINE

SELECTION-SCREEN COMMENT +11amp TEXT-S FOR FIELD E2EEP

se(ecti-scree )siti

PARAMETERS4 E2EEP AS CltECBOX 3 3 = 7e(ete sessi i0 0iis5e7

3X3 = gtee) sessi i0 0iis5e7

SELECTION-SCREEN END OF LINE

SELECTION-SCREEN BEGIN OF LINE

SELECTION-SCREEN COMMENT +11amp TEXT-S FOR FIELD E2ltDATE

se(ecti-scree )siti

PARAMETERS4 E2ltDATE LIE S9-DATUM

SELECTION-SCREEN END OF LINE

SELECTION-SCREEN SIP

SELECTION-SCREEN BEGIN OF LINE

SELECTION-SCREEN COMMENT 1amp TEXT-S1 FOR FIELD NODATA

PARAMETERS4 NODATA DEFAULT 33 LOER CASE 7ata

SELECTION-SCREEN END OF LINE

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

Batc5i)t7ata 0 si(e trasacti

DATA4 BDCDATA LIE BDCDATA OCCURS ITlt ltEADER LINE

essaes 0 ca(( trasacti

DATA4 MESSTAB LIE BDCMSGCOLL OCCURS ITlt ltEADER LINE

errr sessi )ee7 3 3 r 3X3amp

DATA4 E2GROUP2OPENED

essae tets

TABLES4 T1

copy SAP AG BC420 12-84

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 8588

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

at se(ecti scree

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

AT SELECTION-SCREEN

r) a7 ser st e 0i((e7 0r create sessi

IF SESSION = 3X3 AND

GROUP = SPACE OR USER = SPACE

MESSAGE E1MSamp

ENDIF

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

)e 7ataset

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

FORM OPEN2DATASET USING P2DATASET

OPEN DATASET P2DATASET IN TEXT MODE

IF S9-SUBRC

RITE4 TEXT-E S9-SUBRC

STOP

ENDIF

ENDFORM

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

c(se 7ataset

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

FORM CLOSE2DATASET USING P2DATASET

CLOSE DATASET P2DATASET

ENDFORM

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

create atc5i)t sessi

t 0r ca(( trasacti siamp

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

FORM OPEN2GROUP

IF SESSION = 3X3

SIP

RITE4 $amp 3Create r)3I1amp GROUP

SIP

)e atc5i)t r)

CALL FUNCTION 3BDC2OPEN2GROUP3

EXPORTING CLIENT = S9-MANDT

copy SAP AG BC420 12-85

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 8688

GROUP = GROUP

USER = USER

EEP = EEP

ltOLDDATE = ltOLDDATE

RITE4 amp 3BDC2OPEN2GROUP3I$amp

1$amp 3retrc7e43I+amp

S9-SUBRC

ENDIF

ENDFORM

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

e7 atc5i)t sessi

ca(( trasacti si4 errr sessiamp

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

FORM CLOSE2GROUP

IF SESSION = 3X3

c(se atc5i)t r)

CALL FUNCTION 3BDC2CLOSE2GROUP3

RITE4 amp 3BDC2CLOSE2GROUP3Iamp

1$amp 3retrc7e43I+amp

S9-SUBRC

ELSE

IF E2GROUP2OPENED = 3X3

CALL FUNCTION 3BDC2CLOSE2GROUP3

RITE4

RITE4 amp 3Fe5(era))e 6r7e eret3Iamp

ENDIF

ENDIF

ENDFORM

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

Start e6 trasacti accr7i t )araeters

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

FORM BDC2TRANSACTION USING TCODE

DATA4 L2MSTRINGamp

DATA4 L2SUBRC LIE S9-SUBRC

atc5 i)t sessi

IF SESSION = 3X3

CALL FUNCTION 3BDC2INSERT3

EXPORTING TCODE = TCODE

TABLES D9NPROTAB = BDCDATA

RITE4 3BDC2INSERT3Iamp

copy SAP AG BC420 12-86

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 8788

TCODE

3retrc7e43I+amp

S9-SUBRC

3RECORD43

S9-INDEX

ca(( trasacti si

ELSE

REFRESlt MESSTAB

CALL TRANSACTION TCODE USING BDCDATA

MODE CTUMODE

UPDATE CUPDATE

MESSAGES INTO MESSTAB

L2SUBRC = S9-SUBRC

RITE4 3CALL2TRANSACTION3

TCODE

3retrc7e43I+amp

L2SUBRC

3RECORD43

S9-INDEX

LOOP AT MESSTAB

SELECT SINGLE FROM T1 ltERE SPRSL = MESSTAB-MSGSPRA

AND ARBGB = MESSTAB-MSGID

AND MSGNR = MESSTAB-MSGNR

IF S9-SUBRC =

L2MSTRING = T1-TEXT

IF L2MSTRING CS 313

REPLACE 313 ITlt MESSTAB-MSGH1 INTO L2MSTRING

REPLACE 3$3 ITlt MESSTAB-MSGH$ INTO L2MSTRING

REPLACE 33 ITlt MESSTAB-MSGH INTO L2MSTRING

REPLACE 33 ITlt MESSTAB-MSGH INTO L2MSTRING

ELSE

REPLACE 33 ITlt MESSTAB-MSGH1 INTO L2MSTRING

REPLACE 33 ITlt MESSTAB-MSGH$ INTO L2MSTRING

REPLACE 33 ITlt MESSTAB-MSGH INTO L2MSTRING

REPLACE 33 ITlt MESSTAB-MSGH INTO L2MSTRING

ENDIF

CONDENSE L2MSTRING

RITE4 MESSTAB-MSGT9P L2MSTRING$+amp

ELSE

RITE4 MESSTAB

ENDIF

ENDLOOP

copy SAP AG BC420 12-87

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 8888

SIP

Eree 0e5(era))e

IF L2SUBRC AND E2GROUP SPACE

IF E2GROUP2OPENED = 3 3

CALL FUNCTION 3BDC2OPEN2GROUP3

EXPORTING CLIENT = S9-MANDT

GROUP = E2GROUP

USER = E2USER

EEP = E2EEP

ltOLDDATE = E2ltDATE

E2GROUP2OPENED = 3X3

ENDIF

CALL FUNCTION 3BDC2INSERT3

EXPORTING TCODE = TCODE

TABLES D9NPROTAB = BDCDATA

ENDIF

ENDIF

REFRESlt BDCDATA

ENDFORM

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

Start e6 scree

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

FORM BDC2D9NPRO USING PROGRAM D9NPRO

CLEAR BDCDATA

BDCDATA-PROGRAM = PROGRAM

BDCDATA-D9NPRO = D9NPRO

BDCDATA-D9NBEGIN = 3X3

APPEND BDCDATA

ENDFORM

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

Isert 0ie(7

Page 26: BC420_46C - 012The Transaction Recorder

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 2688

0amp8

983209 SAP AG 1999

The Transaction Recorder

PrinciplesPrinciples

Recording )ith the LSMWRecording )ith the LSMW

Principles of atch Input and all TransactionPrinciples of atch Input and all Transaction

Integrating the TA Program into the DWIntegrating the TA Program into the DW

Using the TA Recorder Using the TA Recorder

copy SAP AG BC420 12-26

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 2788

0amp3

983209 SAP AG 1999

Transaction Recorder

Online

Transaction

RecordingTransfer Program

T

Included in the Batch Input Monitor

Cou use the transaction recorder to record transactions and then use the transaction recording to

generate a transfer program The program ao$s you to transfer data using either atch input or ca

transaction

copy SAP AG BC420 12-27

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 2888

0amp5

983209 SAP AG 1999

hanging ustomer Data$ Initial Screen

9ield ontents

BCC$Samp $SZAV

BCamp(Camp )00

02-($++ Z-88-10000

02-0110

02-0130

$SZAV

9ield ame

Comer

Company code

Z-88-10000

Genera daa

Comer Z-88-10000

+ame

9ield ontents

BCamp(Camp $PA

BCS$BSC SAPSZA1 0300ASS

BCS$BSC SAPSZA1 0301Camp$

BCC$Samp SZA10100-+$B

A1AA-S Garden Sree

A1AA-amp$S+$1 34

A1AA-PampSCamp1 02105

9ield ame

Screen

111

Screen

106

In the aove eampe the transaction Change customer F01 is recorded

copy SAP AG BC420 12-28

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 2988

0amp7

983209 SAP AG 2001

hange Debitor$ Pa(ment Transactions C6

Banlt dea

Screen

10

9ield ontent

BCC$Samp (+B(-BA+(+01

BCamp(Camp BA+((+B(-BA+(S01

(+B(-BA+(01 12345679

(+B(-BA+(+01 22222222

Debitor 5560000

9ield ame

Inde

copy SAP AG BC420 12-29

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 3088

00

983209 SAP AG 1999

hanging ustomer Data$ Pa(ment Transactions Camp

Addre

an+ countr( US

an+ code 6amp42837

Banlt dea

ustomer 5560000

9ield ontents9ield ame

BCC$Samp (+A1-(+ZA

BCamp(Camp $PA

(+B(-Z01

Screen

10

Screen

100

SAPLBA

9ield ontents

BCC$Samp B+(A-BA+(A

BCamp(Camp +

B+(A-BA+(A +aona Banlt

9ield ame

In different transactions the modue poo may change This is the case $ith for eampe customer

master data The TA recorder records modue poo changes automaticay

copy SAP AG BC420 12-30

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 3188

06

983209 SAP AG 1999

Eierarch( Displa( of the Recording

02amp

02

SAP02 0106

BCC$Samp 02-0130

BCamp(Camp )00

02-($++ -88-10000

02-0110

02-0130

SAP02 0111

BCamp(Camp V

BCC$Samp A1AA-amp$S+$1

A1AA-S Garden Sree

Recording

-ith the TA recorder the resuts are aso a ist in a hierarchy dispay =o$ever you cannot assign

your o$n fied names as you can in the +S-

copy SAP AG BC420 12-31

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 3288

0amp

983209 SAP AG 1999

Recording erie)

Recording

Transfer program

9unction module

ontains onl( the data

from the recording

Test data

Test

reate

reate

reate

reate

1dit hange recording

Process recording

Cou can edit the recording as needed

The recording can e tested and eecuted again The screens are run through in the same $ay as in

the recording

The recording can then e used to create

atch input sessions

Test data

ata transfer programs $ith atch input or ca transaction

Function modues

copy SAP AG BC420 12-32

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 3388

0

983209 SAP AG 1999

1 02 BS

2 SAP02 106

3 BCC$Samp $SZAV

4 BCamp(Camp )00 5 02-($++ -88-10000

6 02-0110

7 02-0130

8 $SZAV

9 SAP02 111

10 BCamp(Camp V

11 BCC$Samp A1AA-amp$S+$1

12 A1AA-S Garden Sree

Program Screen St 9ield ame 9ield alue

Recording 1ditor

Recording

Add gt delete lines 9ormat chec+

Import gt eport of recording

In the editor you can add or deete ines Cou can aso change the contents of individua ines

-ith the function Chec) you can specify $hether the edited version of the recording sti has the

correct synta

Cou can aso eport import recordings to from a seuentia fie

After editing save the recording changes

copy SAP AG BC420 12-33

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 3488

04

983209 SAP AG 1999

Recording Seeral Transaction Runs

RecordingF

Directl( after the first recordingG or

In the displa( mode of the recording

In this step you can record additiona transactions and add additiona transaction runs to the

recording

Cou can record the additiona transactions directy after a recording or in the edit screen of a

recording

copy SAP AG BC420 12-34

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 3588

02

983209 SAP AG 1999

1ditor$ Importing and 1porting Recordings

6 T 9D0amp S

amp SAPM90ampD 608

DltURSR

4

2

8 SAPM90ampD 666

60

66

Program Screen St 9ield name 9ield alue

cempA

e name

aa =orma

cemp

A

e name

aa =orma

1port

Import

Presentation Serer

If the editor functions in the systems do not provide a the functions you need you can do$noad the

recording to your presentation server using the Eort function and then edit the recording using a

P2 editor

Cou use the Import function to import the data ac into the amp System ae sure the fie is sti in

the correct format

copy SAP AG BC420 12-35

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 3688

08

983209 SAP AG 1999

Processing the Recording

Recording

Process )ith ALL TRASATI

Parameer

Proce mode$pdae mode

CA mode

e=a e

Con a=er comm

+o a B eon

nd +o a B mode

A

A

T

The recording can e eecuted directy The data from the recording is used and the transaction is

processed $ith ca transaction

2a transaction provides a range of options for caing appication transactions $hich are discussed

on the foo$ing t$o pages

copy SAP AG BC420 12-36

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 3788

03

983209 SAP AG 1999

Process mode

Update mode

ATT mode

Processing Recording )ith T 6

A

1

Displa( all screens

Displa( errors onl(

o displa(

L

S

A

Local

S(nchronous

As(nchronous

A

o ATT

ATT )ithout indiidual screen control

ATT )ith indiidual screen control

Processing mode

=ere you can specify the processing mode 9 it is the same as the processing mode for atch input

4pdate mode

=ere you can specify the update mode For more information see the unit ca transaction

2ATT mode

=ere you can mae specia settings if you $ant to test the recording under 2ATT conditions (ony

necessary for 2ATT runs) Specia functions are caed in the 2ATT too for each screen at the end of

P5 and at the start of PAI

copy SAP AG BC420 12-37

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 3888

05

983209 SAP AG 1999

Default sie

ont after commit

ot a I session

1nd$ ot a I mode

Processing Recording )ith T amp

The screen standard sie is used for the

processing

ommit )or+ does not end the processing

o I mode is actie The transaction )ill run

through as in online

I mode is selected nce the data in the D

table is processedG the I mode is set to inactie

Standard siDe

If you seect this the screens are processed in the standard siDe in the foreground (in foreground or

dispay errors ony) Note the standard siDe is a$ays used for acground processing

Further after commit

The first commit $or in a transaction does not ead to the end of the recording

Note A atch input transaction is ended $ith the first commit $or

No I mode

The system fied SC9INPT is not set (SC9INPT E ) So transactions are run through as in onine

7nd No I mode

5ny use if you choose the processing mode 7 (dispay errors ony) Then the transaction is processed in the acground in atch input mode and if there is an error the screens run through in

the foreground

copy SAP AG BC420 12-38

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 3988

07

983209 SAP AG 1999

I Mode

atch input

mode

nline

Some transactions behae differentl( in batch input mode

than in online Cbatch input capabilit(

atch input mode sets the s(stem field SIPT H

Not every transaction can run the same onine and in atch input mode The transaction must decide

itsef $hether it is caed onine or in atch input mode

The system sets the system fied SC9INPT E G if the atch input mode is active (this aso appies

to ca transaction) From this system fied the transaction can identify $hether to run onine or in

atch input mode

copy SAP AG BC420 12-39

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 4088

040

983209 SAP AG 1999

reating a Session 9rom the Recording

Recordingnl( contains the data

from the recording

Seon name 02amp

Aoraon ampBS(eep eon

oclt dae 10102000

Cou can create a atch input session directy from the recording that you can then process using the

atch input monitor

copy SAP AG BC420 12-40

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 4188

046

983209 SAP AG 1999

reating Test Data

Test Data

Recording

ranranpBC420AAe name

The file onl( contains the data from the recording

Rgt

Application Serer

Structure

Cou can create a fie from the recordingH the fie $i contain a the fieds from the recording The

fieds are added to the fie $ith the ength you specified in the definition

The fied order corresponds to the order in the recording overvie$ Technica fieds

(2356257 2324ampS5amp and so on) are incuded

The data can ony e stored on the appication server If you do not specify a path the fie is stored in

the $or directory of the appication server

If the specified test fie aready eists the ne$ data record is added to this fie

copy SAP AG BC420 12-41

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 4288

04amp

983209 SAP AG 1999

ed conen

reating a Program

Recording

ZBC420ampProram name

Transfer Program

e daa

ead =rom =e

ran=er =rom recordn

reate

9ile nameTest data

ranranpBC420AA

Cou can generate a program from the recording

In the foo$ing diaog o enter a program name In addition you can choose the type and method

for fiing the maintained fied contents from the recorded screens

4se the vaues used for the recording If you reuire feie data transfer you $i have to modify

this program ater

ParameteriDe the input vaues and read these vaues from a fie A data structure is created for

parameteriDationH the data records are read from an eterna fie into this data structure The

program assumes the fie $as taiored to this data structure

If you have decided to parameteriDe the input vaues you shoud aso create a test fie during

generation To do this seect the checo and enter a name for the fie

The attriute maintenance screen of the AAP editor appears aintain the attriutes and save the

program

copy SAP AG BC420 12-42

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 4388

04

983209 SAP AG 1999

Program 9unctions

Online

transaction

Transfer program

To

error

1rror

ption 6ption ampFlat SAP

structure

Monitor

Cou have no$ generated a data transfer program for importing data into the amp System The

program can eecute the data transfer using atch input or ca transaction

If you choose option 1 and there is an error the data record is paced into a atch input session

copy SAP AG BC420 12-43

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 4488

044

983209 SAP AG 1999

Benerating 9unction Modules

Recording

Zcreaedeor ncon mode

ncon rop

Sor eD

ZBC420

Creae comer

9unction module

nl( one data record can be processed at a time

In the net diaog o you can generate a function modue a function group and short tet from the

recording The function modue is automaticay created in the function group

copy SAP AG BC420 12-44

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 4588

042

983209 SAP AG 1999

9unction of 9unction Modules

Online

transaction

To

error

1rror

ption 6 ption amp

9unction module

Import

Parameter 1port

parameter

Tables

M1SSTA

Monitor

S$BC

Import interface

The import interface consists of a technica part and the fieds from the recording (A parameter is

created for each input fied of the recorded transactions)

7port interface

Simpy consists of the parameter S4amp2 The function modue $i return a vaue in the system

fied SC9S4amp2 after caing ca transaction This return vaue is set to Dero if the data record has

een correcty processed (5ny appies to 2T)

If a session is created you $i e notified $hether the data record coud e paced into the session

Tae interfaceThis is used ony if the function modue $ors $ith ca transaction The tae contains a the

system messages

copy SAP AG BC420 12-45

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 4688

048

983209 SAP AG 1999

Import Interface of 9unction Module

$

Technical

fields

Data

fields

BI session or CALL TRANSACTION

Processin $ode

pdate $ode

a$e oamp BI session iamp (T initial)

Bacround user iamp (T initial)

Delete session aampter processin

Loc date oamp session

ODATA indicator

TU

MD1

UPDAT1

BRUP

US1R

=11P

ELDDAT1

DATA

Cou can use parameter 2T4 to specify $hether the function modue creates a atch input session

(2T4 E ) or updates the data record directy using ca transaction (2T4 E G)

The other parameters are fied as for a atch input session header

Note 7very time the function modue is caed a atch input session is created

If the session is to contain severa transactions proceed as foo$s

ltenerate the transaction severa times This can e achieved y recording the transaction again The

function modue interface $i then contain more than one transaction -hen the function modue is

caed severa transactions can e generated for each session

copy SAP AG BC420 12-46

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 4788

043

983209 SAP AG 1999

The Transaction Recorder

PrinciplesPrinciples

Recording )ith the LSMWRecording )ith the LSMW

Principles of atch Input and all TransactionPrinciples of atch Input and all Transaction

Integrating the TA Program into the DWIntegrating the TA Program into the DW

Using the TA Recorder Using the TA Recorder

copy SAP AG BC420 12-47

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 4888

045

983209 SAP AG 1999

Benerated Program

9unction modules DltP1ltBRUP

DltIS1RT

DltLS1ltBRUP

AAP Program

Define structure of

data in seJuential

fileDefine D

table

pen seJuential file

pen I session

Read data recordCseJuential file

9ill D table

9ill I session gtALL TRASATI

Last data record K

lose I session

lose seJuential file

The generated program has the structure dispayed aove It uses the standard function modues for

creating atch input sessions

copy SAP AG BC420 12-48

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 4988

047

983209 SAP AG 1999

Structure of the Benerated Program

Benerated part

Define D

table

pen seJuential file

pen I session

Read data record

9ill D table

9ill I session gtALL TRASATI

Last data recordK

lose I session

lose seJuential file

Include DR16

Define filestructure

P1ltDATAS1T

P1ltBRUP

DltDPR

Dlt9I1LD

DltTRASATI

LS1ltBRUP

LS1ltDATAS1T

The generated program consists of t$o parts 9 a generated part and the incude 2amp72G8 The

incude is provided in the standard system

The incude contains the definition of the reuired 2 tae and a further seven suroutines These

suroutines eecute the foo$ing functions

5pen and cose fie

5pen and cose session

Fi 2 tae

Fi session

The generated part is the main program and cas the reevant suroutines A structure is aso

generated in the generated part to read the eterna data into the fie

See the Appendi for more information on the 2amp72G8 program

copy SAP AG BC420 12-49

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 5088

020

983209 SAP AG 1999

Structure of D Table

PRBRAM DPR D1BI 9AM 9ALPRBRAMPRBRAM DPRDPR D1BID1BI 9AM9AM 9AL9AL

SAPM90ampD 0602

R90ampD=UR 600000

R90ampDU=RS 0006

R90ampD=T=D =UA

SAPM90ampD 0660

=A6AM16 Smith

=A6PSTL 87000

=A6LAD6 US

=A6SPRAS 1

SAPM90ampD 06amp0

=A6ST1B US6amp428357DDATA

PRBRAM

DPR

D1BI

9AM

9AL

EAR

UM

EAR

EAR

EAR

40

4

6

6amp

6amp

D Module pool

D Screen number

D Start of screen

D 9ield name

D 9ield contents

9ield ame T(pe Length Short Tet

AAP Dictionar(

The 2 tae has the same structure as in a standard transfer

copy SAP AG BC420 12-50

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 5188

026

983209 SAP AG 1999

Read Structure

Recording

DATA BEGIN OF record data element BUKRS bukr$amp data element KTOKD ktokd$amp data element NA(EG) name$+amp data element SORT ortl$ampEND OF record-

record

Automaticall( generated

from recording

The structure of the fie is automaticay generated and is a$ays defined $ith the name amp725amp

The generated structure a$ays has the same ayout 7ach fied is defined y t$o generated ro$s

The first ro$ is a$ays a comment ro$ containing the tet J data eement and the data eement of

the screen fied from the recording In the net ro$ the fied itsef is defined $ith the name of the

data eement foo$ed y a three9digit position numer $hich specifies the ocation in the structure

The ength of the fied is set y the ength of the data eement If a fied is not defined through a data

eement the system uses the ength of the screen fied

copy SAP AG BC420 12-51

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 5288

02amp

983209 SAP AG 1999

pening and losing the 9ile

P1ltDATAS1T

LS1ltDATAS1T

FOR( oendataet USING dataet-O)EN DATASET dataet IN TET (ODE-

IF S01SUBR2 34 - 5RITE 6 te7t1e S01SUBR2-STO)-

ENDIF-

ENDFOR(-

FOR( cloedataet USING dataet-2OSE DATASET dataet-

ENDFOR(-

Include

DR16

The suroutine 5P7N3ATAS7T opens the seuentia fie

The suroutine 2+5S73ATAS7T coses the seuentia fie

copy SAP AG BC420 12-52

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 5388

02

983209 SAP AG 1999

9unction Modules for I Program

lient

Session name

Eold date

=eep session

D user name

RecordK

LI1T

BRUP

ELDDAT1

=11P

US1R

R1RD

DltP1ltBRUPDltP1ltBRUP

Transaction code

D table

TD1

DPRTA

DltIS1RTDltIS1RT

DltLS1ltBRUPDltLS1ltBRUP

pen Isessionpen Isession

Insert data for

transactions

Insert data for

transactions

lose I

session

lose I

session

The foo$ing function modues are provided for creating atch input sessions (function group

S2)

235P7N3ltamp54P

2reates a ne$ session and contains genera data for the $hoe session

23INS7ampT

Inserts a the data for a transaction into the session The transferred interna tae $ith the

structure 2ATA must contain a the data reuired for fuy processing the transaction

232+5S73ltamp54P

2oses the session after a the data has een inserted As soon as the session has een cosed it

can e processed

The interna tae $ith the structure 2ATA can ony contain atch input data for one singe

transaction run So the individua transactions are inserted into the atch input session in a oop

using severa 23INS7ampT cas

copy SAP AG BC420 12-53

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 5488

024

983209 SAP AG 2001

9unction Module DltP1ltBRUP

ALL 9UTI DltP1ltBRUPALL 9UTI DltP1ltBRUP

1PRTIB

LI1T client

BRUP session name

ELDDAT1 loc+ date

=11P delete flag

US1R bdc user name

R1RD recording

IMPRTIB

NID internal session +e(

11PTIS

1PRTIB

LI1T client

BRUP session name

ELDDAT1 loc+ date

=11P delete flag

US1R bdc user name

R1RD recording

IMPRTIB NID internal session +e(

11PTIS

-ith the function modue 235P7N3ltamp54P you can open a atch input session

The foo$ing parameters are mandatory

2+I7NT (cient)

ltamp54P (session name)

4S7amp (user name)

Note The 4S7amp must a$ays e specified This user name is reuired for processing the session

in atch mode

The foo$ing parameters are optiona

=5+AT7 specifies the eariest date on $hich the session can e started677P fag specifies $hether session shoud e deeted after it has een successfuy processed The

677P fag is ignored if the session contains errors

677P E K K means deete the session after processing (defaut vaue) H

677P E KGK means do not deete session

amp725amp E KGK ao$s you to create a recording instead of a I session

If gtI is specified the function modue returns the interna session ey This is needed to e ae to

differentiate sessions that have the same name

-ith 7G27PTI5NS you get various return vaues that can e ueried $ith SC9S4amp2

Note In onine mode the onine user is used for the authoriDation checs regardess of the user

name specified

copy SAP AG BC420 12-54

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 5588

022

983209 SAP AG 1999

Subprogram P1ltBRUP

P1ltBRUP

FOR( oen8rou-IF e9on -

2A FUN2TION BD2O)ENGROU) E)ORTING 2IENT lt1mandt GROU) 8rou USER uer KEE) kee

=ODDATE gtolddate-

ENDIF-ENDFOR(-

Include

DR16

The suprogram 5P7N3ltamp54P opens the atch input session

copy SAP AG BC420 12-55

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 5688

028

983209 SAP AG 1999

9unction Module DltIS1RT

ALL 9UTI DltIS1RTALL 9UTI DltIS1RT

IMPRT

TD1 Transaction code

PSTltLAL Update locall(

PRITIB print list

TAL1S DPRTA bdclttable

11PTIS

IMPRT

TD1 Transaction code

PSTltLAL Update locall(

PRITIB print list

TAL1S DPRTA bdclttable

11PTIS

-ith the function modue 23INS7ampT you can add transaction data to the session

Cou need an interna 2 tae to transfer the data

The foo$ing parameters are mandatory

T257 Transaction code

CNPamp5TA 2 tae

The foo$ing parameters are optiona

P5ST3+52A+ E KGK activates oca updating This means that the data to e updated is ept in the

appication server and updated in the ast step of the transaction This does not invove the update

process (For more information see course 28 Programming ataase 4pdates)

PampINTINlt E KGK 9 ists processed in I $i e printed immediatey -ith 7G27PTI5NS you get various return vaues that can e ueried $ith SC9S4amp2

copy SAP AG BC420 12-56

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 5788

023

983209 SAP AG 1999

Subprogram DltTRASATI

DltTRASATI

FOR( BD2TRANSA2TION USING tcode-

IF e9on -2A FUN2TION BD2INSERT

E)ORTING T2ODE tcode TABES D0N)ROTAB bdcdata-

ESE-

ENDIF-ENDFOR(-

T

Include

DR16

The suprogram 23TampANSA2TI5N moves the fied 2 tae either to a atch input session

or uses ca transaction to import the data into the system 5n the seection screen you can specify

$hether you $ant to create a session or you $ant to use ca transaction to process the data directy

The S7SSI5N fied is then set according to your seection

copy SAP AG BC420 12-57

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 5888

025

983209 SAP AG 1999

9unction Module DltLS1ltBRUP

ALL 9UTI DltLS1ltBRUP

11PTIS

TltP1 6

NU1U1lt1RRR amp

-ith the function modue 232+5S73ltamp54P you can cose a atch input session

In 7G27PTI5NS you get various return vaues that can e ueried $ith SC9S4amp2

copy SAP AG BC420 12-58

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 5988

027

983209 SAP AG 1999

Subprogram LS1ltBRUP

FOR( cloe8rou-IF e9on -cloe batcgt 9nut 8rou

2A FUN2TION BD22OSEGROU)-

ESE-IF e8rouoened -

2A FUN2TION BD22OSEGROU)-

ENDIF-ENDIF-

ENDFOR(-

LS1ltBRUPlose session

lose error session

Include

DR16

The suprogram 2+5S73ltamp54P coses the atch input session The suprogram differentiates

et$een a norma I session (S7SSI5N E G) and a session opened $hen ca transaction

encountered an error (73ltamp54P35P7N7 E G)

copy SAP AG BC420 12-59

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 6088

080

983209 SAP AG 1999

Subprograms DltDPRG Dlt9I1LD

DltDPR

Dlt9I1LD

FOR( bdc9eld USING nam al-IF al 34 nodata-2EAR bdcdata- bdcdata1nam nam- bdcdata1al al- A))END bdcdata-ENDIF-

ENDFOR(-

FOR( bdcdltnro USING ro8ram dltnro- 2EAR bdcdata-Bdcdata1ro8ram ro8ram-Bdcdata1dltnro dltnro-Bdcdata1dltnbe89n - A))END bdcdata-ENDFOR(-

Include

DR16

The incude 2amp72GG contains t$o suprograms 23CNPamp5 and 23FI7+

Suprogram 23CNPamp5 fis the 2 tae $ith program names and screen numers

Suprogram 23FI7+ fis the 2 tae $ith fied names and vaues

7ach suprogram creates an entry in the 2 tae

copy SAP AG BC420 12-60

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 6188

086

983209 SAP AG 1999

9illing the D Table

erorm bdcdltnro u9n8 SA)(FD +- erorm bdc9eld u9n8 BD22URSOR RFD1BUKRS- erorm bdc9eld u9n8 BD2OK2ODE 6- erorm bdc9eld u9n8 RFD1BUKRS record1BUKRS- erorm bdc9eld u9n8 RFD1KTOKD record1KTOKD-

erorm bdcdltnro u9n8 SA)(FD -

erorm bdc9eld u9n8 BD22URSOR KNA1S)RAS- erorm bdc9eld u9n8 BD2OK2ODE 6- erorm bdc9eld u9n8 KNA1NA(E record1NA(E-

erorm bdc9eld u9n8 KNA1SORT record1SORT-

Recording Benerated automaticall(

from the recording

)ERFOR( bdcdltnro USING SA)(FD +- )ERFOR( bdc9eld USING BD22URSOR RFD1BUKRS-)ERFOR( bdc9eld USING BD2OK2ODE 6-)ERFOR( bdc9eld USING RFD1BUKRS record1BUKRS-)ERFOR( bdc9eld USING RFD1KTOKD record1KTOKD-

)ERFOR( bdcdltnro USING SA)(FD -

)ERFOR( bdc9eld USING BD22URSOR KNA1S)RAS-)ERFOR( bdc9eld USING BD2OK2ODE 6-)ERFOR( bdc9eld USING KNA1NA(E record1NA(E-

)ERFOR( bdc9eld USING KNA1SORT record1SORT- ---

The 2 tae is fied $ith data from the recording The suroutines 23CNPamp5 and

23FI7+ are used for this

The suroutines are caed in the reuired structure or seuence

copy SAP AG BC420 12-61

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 6288

08amp

983209 SAP AG 1999

erie)

SAPDatabase

SeJuential9ile

SAPDatabase

ALL TRASATIALL TRASATI

SeJuential9ile

ATE IPUTATE IPUT

D TableD TableD TableD Table

I Monitor

T

In contrast to atch input you can use ca transaction to directy pass data to the diaog interface

$ithout using a atch input session Cou use an interna tae (2 tae same structure and ayout

as atch input) to temporariy store your screen data Then you ca the desired transaction in your

program

Note 5n average the 2a Transaction method is 8 to times faster than using atch Input

copy SAP AG BC420 12-62

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 6388

08

983209 SAP AG 1999

all Transaction Program$ 1ample

RE)ORT abcbdcdcdeb9ct-

)ARA(ETERS d9mode DEFAUT A

udmode DEFAUT S-FOR( calltranact9on-2A TRANSA2TION FD

USING bdcdata (ODE d9mode

U)DATE udmode-

IF lt1ubrc NE - 5RITE 6 ---

ENDIF-ENDFOR(-

Screen

00

Screen

100

Screen

An additiona system ro area is added for the caed transaction The system uses this area for

processing the individua screens in the transactionH the data from the tae is added here After the

transaction is processed the second ro area is reeasedH the system continues processing in the first

ro area

Notes

In contrast to atch input there is no error ogging (error sessions) here For processing the caed

transaction the system uses the authoriDations of the user that caed the transaction The 2 tae

can ony hod data for one transaction run at a time efore another transaction is caed and its data

can e added you must eecute a amp7Famp7S= for the 2 tae

copy SAP AG BC420 12-63

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 6488

084

983209 SAP AG 1999

ALL TRASATI C6

RE)ORT 777-

2A TRANSA2TION FD USING bdcdata (ODE E-

Default for MD1 is A

2A TRANSA2TION 3tranact9oncode4 USING 3bdc1table4 C (ODE A E N C-

-ith the parameter 57 you can seect a specific dispay mode for processing the transaction The

foo$ing three modes are avaiae

A (ispay a)

If you eecute the program a the screens and a their data are dispayed This is the defaut vaue

for the 57 in 2A++ TampANSA2TI5N

N (ispay nothing)

The screens are not dispayed at a regardess of $hether any of them contained errors As soon as

the transaction has een fuy processed contro is returned to your program (The vaue of the

parameter 4PAT7 determines $hether dataase updates are eecuted or not)

7 (ispay errors ony)As soon as an error occurs in a screen the transaction is s$itched to dispay mode so that you can

correct the errors

These dispay modes are the same as those in the atch input session processing

copy SAP AG BC420 12-64

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 6588

082

983209 SAP AG 1999

RE)ORT 777-

2A TRANSA2TION FD USING BD2DATA U)DATE -

ALL TRASATI Camp

RE)ORT 777-

2A TRANSA2TION FD USING bdcdata U)DATE -

2A TRANSA2TION 3tranact9oncode4 USING 3bdc1table4 C (ODE A E N C U)DATE A S C -

Default for UPDAT1 is A

-ith the parameter 4PAT7 you can contro ho$ dataase updates arising from a transaction are

carried out There are three options

A (asynchronous updating) The caed transaction does not $ait unti the dataase has een

updated it simpy for$ard the updates to the SAP update service This usuay speeds up the 2T

program This processing mode is N5T recommended for arge data sets as the caed transaction

does not receive a competion message from the update modue

The caing 2T program therefore cannot te if the transaction has een successfuy competed Cou

shoud use the updating administration function (transaction S8) to determine $hether updating

$as terminated eary The error anaysis correction functions for are ess hepfu than $ith

synchronous updating

S (synchronous updating) -ith synchronous updating the caed transaction $aits unti a the

updates have een competed So processing is so$er than $ith synchronous updating The caed

transaction can ho$ever report any updating errors to the program $hich maes error

anaysiscorrection easier

+ (local updating) $ith oca updating the dataase is not updated in a separate process it is

updated in the caers process (see appication hep documentation for the AAP ey$ord S7T

4PAT7 TAS6 +52A+)

copy SAP AG BC420 12-65

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 6688

088

983209 SAP AG 1999

ALL TRASATI C

RE)ORT 777-DATA mtab T0)E TABE OF bdcm8coll-

2A TRANSA2TION FD USING bdcdata (ESSAGES INTO mtab-

2A TRANSA2TION 3tranact9oncode4 USING 3bdc1table4 C (ODE A E N C U)DATE A S C (ESSAGES INTO 3metab4 C -

7SSAlt7S specifies that a system messages that are output during the eecution of a 2A++

TampANSA2TI5N are $ritten to the interna tae L7SSTA The interna tae must have the

structure 2Slt25++

4nie the cassica atch input processing $ith sessions 2A++ TampANSA2TI5N does not offer any

specia processing procedures for transactions containing errors There are no restart functions for

transactions that contain errors or that cause updating terminations

copy SAP AG BC420 12-66

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 6788

083

983209 SAP AG 1999

ALL TRASATI C4

RE)ORT 777-DATA mltot T0)E ctuaram-

2A TRANSA2TION FD USING BD2DATA

O)TIONS FRO( mltot-

2A TRANSA2TION 3tranact9oncode4 USING 3bdc1table4 C (ODE A E N C U)DATE A S C (ESSAGES INTO 3metab4 C O)TIONS FRO( ot C -

RE)ORT 777-DATA mltot T0)E ctuaram-2A TRANSA2TION FD USING bdcdata

O)TIONS FRO( mltot-

The addition 5PTI5NS enaes the ca transaction statement to e controed through a structure

The structure must have the dictionary type 2T43PAampAS

The addition 5PTI5NS Famp5 must not e comined either $ith the addition 57 or $ith

4PAT7 ore information on the net side

copy SAP AG BC420 12-67

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 6888

085

983209 SAP AG 1999

Structure TUltPARAMS

DISMD1 Procen mode anaoo o addon amp

UPDMD1 $pdae mode anaoo o addon $PA

ATTMD1 CA mode CA conro

D19SI1 orce de=a EndoE e drn procen

RAMMIT +o eD a Camp amp(

IPT +o a ac np eonF a F S-B+P SPAC

I1D +o a ac np eon a=er end o= BC daa

The components are defined as foo$s

The components 7FSIM7 ampA25IT N5INPT and N5I7N can have the foo$ing

vaues KGK E Ces or K K E No

If the addition 5PTI5NS Famp5 is not specified the foo$ing settings appy to the contro

parameters

IS57 from addition 57

4P57 from addition 4PAT7

2ATT57 2ATT not active

7FSIM7 o not not use defaut $indo$s siDe

ampA25IT Successfu eit at 25IT -5amp6

N5INPT atch input session active (SC9INPT E G)

N5I7N atch input session sti active after end of 2 data

copy SAP AG BC420 12-68

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 6988

087

983209 SAP AG 1999

SMSBID Message ID

SMSBT Message T(pe C1GIGWGSGA

SMSB Message umber

SMSB6 Message ariable 6

SMSBamp Message ariable amp

SMSB Message ariable

SMSB4 Message ariable 4

SMSBID Message ID

SMSBT Message T(pe C1GIGWGSGA

SMSB Message umber

SMSB6 Message ariable 6

SMSBamp Message ariable amp

SMSB Message ariable

SMSB4 Message ariable 4

Return code$

S(stem fields$

alue Meaning

0 Successful

6000 1rror in transaction

6000 1rror in processing call transaction

see also the s(stem fields specified

alue Meaning

0 Successful

6000 1rror in transaction

6000 1rror in processing call transaction

see also the s(stem fields specified

9ield name Meaning9ield name9ield name MeaningMeaning

Return ode and S(stem 9ields

The return code is used to specify $hether the caed transaction $as processed successfuy In

addition severa system fieds are fied The numer I type and variaes of the diaog message

output y the caed transaction Cou need this information to output the message tet

copy SAP AG BC420 12-69

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 7088

030

983209 SAP AG 1999

Benerated Program of the TA Recorder

REFRES= (ESSTAB-

2A TRANSA2TION tcode USING bdcdata (ODE ctumode U)DATE cudate (ESSAGES INTO metab-OO) AT metab- ENDOO)-IF lubrc 34 AND e8rou 34 S)A2E- IF e8rouoenend - 2A FUN2TION BD2O)ENGROU) E)ORTING ---------

--------- E8rouoened - ENDIF- 2A FUN2TION BD2INSERT E)ORTING T2ODE tcode TABES D0N)ROTAB bdcdata-ENDIF-REFRES= bdcdata-

Message table output

pen error session

Insert data record that

has errors into error

session

If you have seected ca transaction on the seection screen the generated program runs as foo$s

The onine transaction is caed $ith ca transaction and passed to tae 2ATA A the

messages arising during the ca transaction are put in the interna tae 7SSTA

7SSTA is output as a ist

If you have specified an error session ( 73ltamp54P L SPA27) on the seection screen and the

ca transaction comes across an error (+3S4amp2 L 0) the error session is opened The error

session is ho$ever ony opened once Then the data record is paced in the session

A the other data records that have errors $ith ca transaction are paced in the same session

copy SAP AG BC420 12-70

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 7188

036

983209 SAP AG 1999

The Transaction Recorder

PrinciplesPrinciples

Recording )ith the LSMWRecording )ith the LSMW

Principles of atch Input and all TransactionPrinciples of atch Input and all Transaction

Integrating the TA Program into the DWIntegrating the TA Program into the DW

Using the TA Recorder Using the TA Recorder

copy SAP AG BC420 12-71

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 7288

03amp

983209 SAP AG 1999

Integrating into the DW

Transfer program

AAP Dictionar(

Integrate

SDA0

SDA6

SDAamp

SDA

Cou can integrate the generated program into the G9- The structure of the fie must e created

in the AAP ictionary The taes SGA0 SGA8 SGA1 and SGA $i e fied

copy SAP AG BC420 12-72

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 7388

03

983209 SAP AG 1999

DW Release 42

Goo

-B eeae 45

aa ran=er ogtec

Int customer data transfer ob-ect

ecord =ed

Dece daa ran=er

d Goo

The ampunction ampor interatin TA recorder prora$s is

i$ple$ented in the

D+-B in Release

The recorder can e integrated as of ampeease and it is provided in the G9- ampeease

ltot to the G9- ampeease 5n the initia screen you can integrate programs y choosing ampoto

( +nt customer ata transfer o-ect

copy SAP AG BC420 12-73

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 7488

034

983209 SAP AG 1999

reating Program as D b-ect

Comer ran=er ogtec

ampgtec ype

Sor eD =or ogtec

aa ran=er proram

Srcre name

9900

(+A1

Cane comer

ZBCA+G

ZB

ustomer transfer ob-ect

umber bet)een 7000 and 7777

b-ect t(pe

Assignment to R ob-ect

Short tet for D ob-ectShort description

Data transfer program

ame of generated program

Structure name

A structure Cstructure la(out )ith this name is created in

the AAP Dictionar(

For ampeease transfer oects $ere not organiDed y 5amp oects ut y a G numer (00089

OOOO) The numer range O0009OOOO is reserved for customers

To create a connection to the ne$ G 9- you must assign the program to a 5amp oect

2reate a short tet for the G oect This tet $i appear in the method seection ist

Specify the program to e incuded

Specify a name for the structure to e created in the AAP ictionary

Note $he generated program appears under program type +N and not under program type

-

copy SAP AG BC420 12-74

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 7588

032

983209 SAP AG 1999

Adantages

Automatic program registration in the DW in

Release 48

ou can use all the functions defined for

standard ob-ects

1ception$ The (reate ampile ith data

function

If you incuded the oect in the ampeease $orench it is automaticay avaiae in the ampeease

B $orench

A the $orench functions are avaiae for your oect ecept for Create files ith transfer ata

copy SAP AG BC420 12-75

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 7688

038

983209 SAP AG 1999

ou are no) able to$

The Transaction Recorder$ Unit Summar(

Use the recording function in the LSMW to create

a batch input session )ith the data from the

eternal s(stem

Use the TA Recorder to create (our o)n data

transfer program

Anal(e programs that )or+ )ith batch input or

call transaction

Integrate the TA Recorder programs into the

DW

copy SAP AG BC420 12-76

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 7788

ercise 1

nit $ -ecorder

$opic 2reating etors

$ransaction -ecorder ercise 1

bull 2reating detors $ith eterna numer assignment

bull etor numers M9980008 to M9980080

Address data for detors $ith eterna numer assignment is to

e transferred using program ampFI700

ro4ect F5

Supro4ect +5

-un +575

$as)s 85 95 8S25

9oad program -F+00

8 In the foo$ing eercises eisting data is to e changed Therefore these detors $ith

eterna numer assignment have to first e created

898 4nder suproect 79 create run 797G9 $ith the name Detors ith

eternal numers

copy SAP AG BC420 12-77

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 7888

891 2reate the foo$ing three tass The tass map the foo$ing process steps

convert data create + session and process + session

89198 In run 797G9 create the foo$ing tas

9 Tas AP9

9 Name 2onvert data 9 Tas type AP

9 Program type +S-

Seect the foo$ing +S- oect

+S- proect 2109

+S- suproect 7I9

+S- oect I997GT

89191 In run 797G9 create the foo$ing tas 9 Tas +5A9

9 Name 2reate I session

Tas type +5A

9 Program type INP

Seect program ampFI700 $ith the variant

I97G9

8919 In run 797G9 create the foo$ing tas

9 Tas S29

9 Name Process I session Tas type S2

9 Program type amp7P5

Seect program ampS2S4 $ith the variant

S497G9

Note that you have to correct the seuence of the tass 2onvert data

create + session and process + session

4se the uttons

89 Start the run

The detors $i e created $ith eterna numer assignments

89 2hec in transaction F0 that the detors M9980008 to M9980080 have een

created

copy SAP AG BC420 12-78

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 7988

ercise

nit $ransaction -ecorder

$opic -ecording function in the 9S8(

bull 2reate a recording using the +S-

bull ltenerate a atch input session

2hange the detor address data in the amp System

Name of the recording +

Name of the file +2055+F9

8 2reate the recording 7I3 using the +S- ampecord the transaction F01 (2hange

detor)

898 efore you create the recording first test the transaction onineQ

For the recording use detor M9980008 5n the initia screen of the F01

maintain the foo$ing fieds ony

etor etor M9980008

2ompany code 0008

Address data seect

Note $he data record must e saved hile recording

891 aintain the names and the descriptions for the foo$ing fieds

Name city street posta code and teephone numereete a other fieds in screen 880 from the recording (eg S5ampT+ +AN8

SPampAS)

4se the same technica names as sho$n in the tae eo$ (automatic fied

mapping)

copy SAP AG BC420 12-79

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 8088

1 2reate the suproect 7I9 and the ne$ oect TA3 in your proect 2109

aintain the oect attriutes and seect the item atch input recording Seect your

recording 7I3

2reate the source structure address

2reate the source fieds according to the tae eo$ 5r copy them from proect 2109S37N suproect 7I900 oect TA900

198 Fie setup The data from the egacy system are dispayed in the foo$ing tae

Fied name Fied type Fied ength escription

N5 2 8B etor numer

NA7 2 Name

STamp77T 2 Street

2ITC 2 2ityPace of residence

MIP 2 80 Posta code

T7+ 2 8B Teephone numer

191 aintain the fied mapping 4se the automatic fied mapping (via menu item

7tras)

19 Specify the fies 5ny maintain the fie name of the source fie

Name of the fie 21099IFI+7

2odepage 8800

19 Import the data and convert them ispay the data in each caseQ

19 2reate a atch input session

19B ampun the atch input session

copy SAP AG BC420 12-80

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 8188

ercise 3

nit $ransaction -ecorder

$opic -ecording ith the $ -ecorder

bull ltenerate a recording using the TA recorder

bull Test the recording

2hange the address data of detors in the amp system

Name recording $+

Name of the file +2055+F9

8 2reate the recording TA37I3 using the transaction recorder ampecord the

transaction F01 (change detor)

898 4se detor M9980008 for the recording 5n the F01 initia screen ony

maintain the foo$ing fieds

etor etor M9980008

2ompany 2ode 0008

Address data seect

Note $he data record must e saved hen recording

eete a fieds that do not eist in the source fie 21099IFI+7 from screen

880 in the recording (eg 6NA89S5ampT+ 6NA89+AN8 6ANNQ9SPampAS) Note o not deete fieds ampF01946ampS and ampF0190880

Save the recording no$

1 S$itch to the recordings overvie$

198 Process the recording $ith the processing mode A (dispay a)

191 Process the recording $ith the processing mode RN (no dispay)

19 If the recording has een tested and no error has occurred generate a I session

and run it using the I monitor If an error shoud occur generate the recordingagainQ

copy SAP AG BC420 12-81

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 8288

From the recording generate the program M21037I3 in your deveopment cass

2109 Seect the foo$ing

bull ampead fied contents from fie

bull 2reate test data in the fie 2103dei3test3tt

98 Save this program and eecute it ltenerate one I session each and process it

2arry out the same steps again using the ca transaction

The generated program shoud no$ e changed so that fie 21099IFI+7 can e

read and processed

98 2hange the defaut vaue of the fie name (parameter dataset) in 21099

IFI+7

91 2hange the structure definition eete the company code fied and the address

data checo from the structure

9 2hange the su9routine ca perform dc3fied for the company code (KampF019

46ampSK) so that the vaue 0008 is transferred

9 2hange the su9routine ca perform dc3fied for the address data checo

(KampF0190880K) so that the vaue G is transferred

9 Start the program again and read the data from the fie 21099IFI+7 $ith

detor data ltenerate a I session $ith it and run it

copy SAP AG BC420 12-82

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 8388

033 Include DR16INCLUDE BDCRECX1

SELECTION-SCREEN BEGIN OF LINE

PARAMETERS SESSION RADIOBUTTON GROUP CTU create sessi SELECTION-SCREEN COMMENT $amp TEXT-S FOR FIELD SESSION

se(ecti-scree )siti +

PARAMETERS CTU RADIOBUTTON GROUP CTU ca(( trasacti

SELECTION-SCREEN COMMENT $amp TEXT-S FOR FIELD CTU

SELECTION-SCREEN END OF LINE

SELECTION-SCREEN BEGIN OF LINE

SELECTION-SCREEN COMMENT $amp TEXT-S1 FOR FIELD GROUP

se(ecti-scree )siti $+

PARAMETERS GROUP1$amp r) ae 0 sessi

SELECTION-SCREEN COMMENT $amp TEXT-S+ FOR FIELD CTUMODE

se(ecti-scree )siti

PARAMETERS CTUMODE LIE CTU2PARAMS-DISMODE DEFAULT 3N3

A4 s56 a(( 78)rs

E4 s56 78)r errr (8

N4 7 t 7is)(a8 78)r

SELECTION-SCREEN END OF LINE

SELECTION-SCREEN BEGIN OF LINE

SELECTION-SCREEN COMMENT $amp TEXT-S$ FOR FIELD USER

se(ecti-scree )siti $+

PARAMETERS4 USER1$amp DEFAULT S9-UNAME ser 0r sessi i atc5

SELECTION-SCREEN COMMENT $amp TEXT-S FOR FIELD CUPDATE

se(ecti-scree )siti

PARAMETERS CUPDATE LIE CTU2PARAMS-UPDMODE DEFAULT 3L3

S4 s8c5rs(8

A4 as8c5rs(8

L4 (ca(

SELECTION-SCREEN END OF LINE

SELECTION-SCREEN BEGIN OF LINE

SELECTION-SCREEN COMMENT $amp TEXT-S FOR FIELD EEP

se(ecti-scree )siti $+

PARAMETERS4 EEP AS CltECBOX 3 3 = 7e(ete sessi i0 0iis5e7

3X3 = gtee) sessi i0 0iis5e7

SELECTION-SCREEN COMMENT $amp TEXT-S FOR FIELD E2GROUP

copy SAP AG BC420 12-83

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 8488

se(ecti-scree )siti

)araeters E2GROUP1$amp r) ae 0 errr-sessi

SELECTION-SCREEN END OF LINE

SELECTION-SCREEN BEGIN OF LINE

SELECTION-SCREEN COMMENT $amp TEXT-S FOR FIELD ltOLDDATE

se(ecti-scree )siti $+

PARAMETERS4 ltOLDDATE LIE S9-DATUM

SELECTION-SCREEN COMMENT +11amp TEXT-S$ FOR FIELD E2USER

se(ecti-scree )siti

PARAMETERS4 E2USER1$amp DEFAULT S9-UNAME ser 0r errr-sessi

SELECTION-SCREEN END OF LINE

SELECTION-SCREEN BEGIN OF LINE

SELECTION-SCREEN COMMENT +11amp TEXT-S FOR FIELD E2EEP

se(ecti-scree )siti

PARAMETERS4 E2EEP AS CltECBOX 3 3 = 7e(ete sessi i0 0iis5e7

3X3 = gtee) sessi i0 0iis5e7

SELECTION-SCREEN END OF LINE

SELECTION-SCREEN BEGIN OF LINE

SELECTION-SCREEN COMMENT +11amp TEXT-S FOR FIELD E2ltDATE

se(ecti-scree )siti

PARAMETERS4 E2ltDATE LIE S9-DATUM

SELECTION-SCREEN END OF LINE

SELECTION-SCREEN SIP

SELECTION-SCREEN BEGIN OF LINE

SELECTION-SCREEN COMMENT 1amp TEXT-S1 FOR FIELD NODATA

PARAMETERS4 NODATA DEFAULT 33 LOER CASE 7ata

SELECTION-SCREEN END OF LINE

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

Batc5i)t7ata 0 si(e trasacti

DATA4 BDCDATA LIE BDCDATA OCCURS ITlt ltEADER LINE

essaes 0 ca(( trasacti

DATA4 MESSTAB LIE BDCMSGCOLL OCCURS ITlt ltEADER LINE

errr sessi )ee7 3 3 r 3X3amp

DATA4 E2GROUP2OPENED

essae tets

TABLES4 T1

copy SAP AG BC420 12-84

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 8588

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

at se(ecti scree

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

AT SELECTION-SCREEN

r) a7 ser st e 0i((e7 0r create sessi

IF SESSION = 3X3 AND

GROUP = SPACE OR USER = SPACE

MESSAGE E1MSamp

ENDIF

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

)e 7ataset

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

FORM OPEN2DATASET USING P2DATASET

OPEN DATASET P2DATASET IN TEXT MODE

IF S9-SUBRC

RITE4 TEXT-E S9-SUBRC

STOP

ENDIF

ENDFORM

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

c(se 7ataset

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

FORM CLOSE2DATASET USING P2DATASET

CLOSE DATASET P2DATASET

ENDFORM

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

create atc5i)t sessi

t 0r ca(( trasacti siamp

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

FORM OPEN2GROUP

IF SESSION = 3X3

SIP

RITE4 $amp 3Create r)3I1amp GROUP

SIP

)e atc5i)t r)

CALL FUNCTION 3BDC2OPEN2GROUP3

EXPORTING CLIENT = S9-MANDT

copy SAP AG BC420 12-85

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 8688

GROUP = GROUP

USER = USER

EEP = EEP

ltOLDDATE = ltOLDDATE

RITE4 amp 3BDC2OPEN2GROUP3I$amp

1$amp 3retrc7e43I+amp

S9-SUBRC

ENDIF

ENDFORM

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

e7 atc5i)t sessi

ca(( trasacti si4 errr sessiamp

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

FORM CLOSE2GROUP

IF SESSION = 3X3

c(se atc5i)t r)

CALL FUNCTION 3BDC2CLOSE2GROUP3

RITE4 amp 3BDC2CLOSE2GROUP3Iamp

1$amp 3retrc7e43I+amp

S9-SUBRC

ELSE

IF E2GROUP2OPENED = 3X3

CALL FUNCTION 3BDC2CLOSE2GROUP3

RITE4

RITE4 amp 3Fe5(era))e 6r7e eret3Iamp

ENDIF

ENDIF

ENDFORM

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

Start e6 trasacti accr7i t )araeters

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

FORM BDC2TRANSACTION USING TCODE

DATA4 L2MSTRINGamp

DATA4 L2SUBRC LIE S9-SUBRC

atc5 i)t sessi

IF SESSION = 3X3

CALL FUNCTION 3BDC2INSERT3

EXPORTING TCODE = TCODE

TABLES D9NPROTAB = BDCDATA

RITE4 3BDC2INSERT3Iamp

copy SAP AG BC420 12-86

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 8788

TCODE

3retrc7e43I+amp

S9-SUBRC

3RECORD43

S9-INDEX

ca(( trasacti si

ELSE

REFRESlt MESSTAB

CALL TRANSACTION TCODE USING BDCDATA

MODE CTUMODE

UPDATE CUPDATE

MESSAGES INTO MESSTAB

L2SUBRC = S9-SUBRC

RITE4 3CALL2TRANSACTION3

TCODE

3retrc7e43I+amp

L2SUBRC

3RECORD43

S9-INDEX

LOOP AT MESSTAB

SELECT SINGLE FROM T1 ltERE SPRSL = MESSTAB-MSGSPRA

AND ARBGB = MESSTAB-MSGID

AND MSGNR = MESSTAB-MSGNR

IF S9-SUBRC =

L2MSTRING = T1-TEXT

IF L2MSTRING CS 313

REPLACE 313 ITlt MESSTAB-MSGH1 INTO L2MSTRING

REPLACE 3$3 ITlt MESSTAB-MSGH$ INTO L2MSTRING

REPLACE 33 ITlt MESSTAB-MSGH INTO L2MSTRING

REPLACE 33 ITlt MESSTAB-MSGH INTO L2MSTRING

ELSE

REPLACE 33 ITlt MESSTAB-MSGH1 INTO L2MSTRING

REPLACE 33 ITlt MESSTAB-MSGH$ INTO L2MSTRING

REPLACE 33 ITlt MESSTAB-MSGH INTO L2MSTRING

REPLACE 33 ITlt MESSTAB-MSGH INTO L2MSTRING

ENDIF

CONDENSE L2MSTRING

RITE4 MESSTAB-MSGT9P L2MSTRING$+amp

ELSE

RITE4 MESSTAB

ENDIF

ENDLOOP

copy SAP AG BC420 12-87

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 8888

SIP

Eree 0e5(era))e

IF L2SUBRC AND E2GROUP SPACE

IF E2GROUP2OPENED = 3 3

CALL FUNCTION 3BDC2OPEN2GROUP3

EXPORTING CLIENT = S9-MANDT

GROUP = E2GROUP

USER = E2USER

EEP = E2EEP

ltOLDDATE = E2ltDATE

E2GROUP2OPENED = 3X3

ENDIF

CALL FUNCTION 3BDC2INSERT3

EXPORTING TCODE = TCODE

TABLES D9NPROTAB = BDCDATA

ENDIF

ENDIF

REFRESlt BDCDATA

ENDFORM

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

Start e6 scree

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

FORM BDC2D9NPRO USING PROGRAM D9NPRO

CLEAR BDCDATA

BDCDATA-PROGRAM = PROGRAM

BDCDATA-D9NPRO = D9NPRO

BDCDATA-D9NBEGIN = 3X3

APPEND BDCDATA

ENDFORM

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

Isert 0ie(7

Page 27: BC420_46C - 012The Transaction Recorder

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 2788

0amp3

983209 SAP AG 1999

Transaction Recorder

Online

Transaction

RecordingTransfer Program

T

Included in the Batch Input Monitor

Cou use the transaction recorder to record transactions and then use the transaction recording to

generate a transfer program The program ao$s you to transfer data using either atch input or ca

transaction

copy SAP AG BC420 12-27

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 2888

0amp5

983209 SAP AG 1999

hanging ustomer Data$ Initial Screen

9ield ontents

BCC$Samp $SZAV

BCamp(Camp )00

02-($++ Z-88-10000

02-0110

02-0130

$SZAV

9ield ame

Comer

Company code

Z-88-10000

Genera daa

Comer Z-88-10000

+ame

9ield ontents

BCamp(Camp $PA

BCS$BSC SAPSZA1 0300ASS

BCS$BSC SAPSZA1 0301Camp$

BCC$Samp SZA10100-+$B

A1AA-S Garden Sree

A1AA-amp$S+$1 34

A1AA-PampSCamp1 02105

9ield ame

Screen

111

Screen

106

In the aove eampe the transaction Change customer F01 is recorded

copy SAP AG BC420 12-28

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 2988

0amp7

983209 SAP AG 2001

hange Debitor$ Pa(ment Transactions C6

Banlt dea

Screen

10

9ield ontent

BCC$Samp (+B(-BA+(+01

BCamp(Camp BA+((+B(-BA+(S01

(+B(-BA+(01 12345679

(+B(-BA+(+01 22222222

Debitor 5560000

9ield ame

Inde

copy SAP AG BC420 12-29

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 3088

00

983209 SAP AG 1999

hanging ustomer Data$ Pa(ment Transactions Camp

Addre

an+ countr( US

an+ code 6amp42837

Banlt dea

ustomer 5560000

9ield ontents9ield ame

BCC$Samp (+A1-(+ZA

BCamp(Camp $PA

(+B(-Z01

Screen

10

Screen

100

SAPLBA

9ield ontents

BCC$Samp B+(A-BA+(A

BCamp(Camp +

B+(A-BA+(A +aona Banlt

9ield ame

In different transactions the modue poo may change This is the case $ith for eampe customer

master data The TA recorder records modue poo changes automaticay

copy SAP AG BC420 12-30

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 3188

06

983209 SAP AG 1999

Eierarch( Displa( of the Recording

02amp

02

SAP02 0106

BCC$Samp 02-0130

BCamp(Camp )00

02-($++ -88-10000

02-0110

02-0130

SAP02 0111

BCamp(Camp V

BCC$Samp A1AA-amp$S+$1

A1AA-S Garden Sree

Recording

-ith the TA recorder the resuts are aso a ist in a hierarchy dispay =o$ever you cannot assign

your o$n fied names as you can in the +S-

copy SAP AG BC420 12-31

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 3288

0amp

983209 SAP AG 1999

Recording erie)

Recording

Transfer program

9unction module

ontains onl( the data

from the recording

Test data

Test

reate

reate

reate

reate

1dit hange recording

Process recording

Cou can edit the recording as needed

The recording can e tested and eecuted again The screens are run through in the same $ay as in

the recording

The recording can then e used to create

atch input sessions

Test data

ata transfer programs $ith atch input or ca transaction

Function modues

copy SAP AG BC420 12-32

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 3388

0

983209 SAP AG 1999

1 02 BS

2 SAP02 106

3 BCC$Samp $SZAV

4 BCamp(Camp )00 5 02-($++ -88-10000

6 02-0110

7 02-0130

8 $SZAV

9 SAP02 111

10 BCamp(Camp V

11 BCC$Samp A1AA-amp$S+$1

12 A1AA-S Garden Sree

Program Screen St 9ield ame 9ield alue

Recording 1ditor

Recording

Add gt delete lines 9ormat chec+

Import gt eport of recording

In the editor you can add or deete ines Cou can aso change the contents of individua ines

-ith the function Chec) you can specify $hether the edited version of the recording sti has the

correct synta

Cou can aso eport import recordings to from a seuentia fie

After editing save the recording changes

copy SAP AG BC420 12-33

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 3488

04

983209 SAP AG 1999

Recording Seeral Transaction Runs

RecordingF

Directl( after the first recordingG or

In the displa( mode of the recording

In this step you can record additiona transactions and add additiona transaction runs to the

recording

Cou can record the additiona transactions directy after a recording or in the edit screen of a

recording

copy SAP AG BC420 12-34

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 3588

02

983209 SAP AG 1999

1ditor$ Importing and 1porting Recordings

6 T 9D0amp S

amp SAPM90ampD 608

DltURSR

4

2

8 SAPM90ampD 666

60

66

Program Screen St 9ield name 9ield alue

cempA

e name

aa =orma

cemp

A

e name

aa =orma

1port

Import

Presentation Serer

If the editor functions in the systems do not provide a the functions you need you can do$noad the

recording to your presentation server using the Eort function and then edit the recording using a

P2 editor

Cou use the Import function to import the data ac into the amp System ae sure the fie is sti in

the correct format

copy SAP AG BC420 12-35

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 3688

08

983209 SAP AG 1999

Processing the Recording

Recording

Process )ith ALL TRASATI

Parameer

Proce mode$pdae mode

CA mode

e=a e

Con a=er comm

+o a B eon

nd +o a B mode

A

A

T

The recording can e eecuted directy The data from the recording is used and the transaction is

processed $ith ca transaction

2a transaction provides a range of options for caing appication transactions $hich are discussed

on the foo$ing t$o pages

copy SAP AG BC420 12-36

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 3788

03

983209 SAP AG 1999

Process mode

Update mode

ATT mode

Processing Recording )ith T 6

A

1

Displa( all screens

Displa( errors onl(

o displa(

L

S

A

Local

S(nchronous

As(nchronous

A

o ATT

ATT )ithout indiidual screen control

ATT )ith indiidual screen control

Processing mode

=ere you can specify the processing mode 9 it is the same as the processing mode for atch input

4pdate mode

=ere you can specify the update mode For more information see the unit ca transaction

2ATT mode

=ere you can mae specia settings if you $ant to test the recording under 2ATT conditions (ony

necessary for 2ATT runs) Specia functions are caed in the 2ATT too for each screen at the end of

P5 and at the start of PAI

copy SAP AG BC420 12-37

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 3888

05

983209 SAP AG 1999

Default sie

ont after commit

ot a I session

1nd$ ot a I mode

Processing Recording )ith T amp

The screen standard sie is used for the

processing

ommit )or+ does not end the processing

o I mode is actie The transaction )ill run

through as in online

I mode is selected nce the data in the D

table is processedG the I mode is set to inactie

Standard siDe

If you seect this the screens are processed in the standard siDe in the foreground (in foreground or

dispay errors ony) Note the standard siDe is a$ays used for acground processing

Further after commit

The first commit $or in a transaction does not ead to the end of the recording

Note A atch input transaction is ended $ith the first commit $or

No I mode

The system fied SC9INPT is not set (SC9INPT E ) So transactions are run through as in onine

7nd No I mode

5ny use if you choose the processing mode 7 (dispay errors ony) Then the transaction is processed in the acground in atch input mode and if there is an error the screens run through in

the foreground

copy SAP AG BC420 12-38

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 3988

07

983209 SAP AG 1999

I Mode

atch input

mode

nline

Some transactions behae differentl( in batch input mode

than in online Cbatch input capabilit(

atch input mode sets the s(stem field SIPT H

Not every transaction can run the same onine and in atch input mode The transaction must decide

itsef $hether it is caed onine or in atch input mode

The system sets the system fied SC9INPT E G if the atch input mode is active (this aso appies

to ca transaction) From this system fied the transaction can identify $hether to run onine or in

atch input mode

copy SAP AG BC420 12-39

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 4088

040

983209 SAP AG 1999

reating a Session 9rom the Recording

Recordingnl( contains the data

from the recording

Seon name 02amp

Aoraon ampBS(eep eon

oclt dae 10102000

Cou can create a atch input session directy from the recording that you can then process using the

atch input monitor

copy SAP AG BC420 12-40

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 4188

046

983209 SAP AG 1999

reating Test Data

Test Data

Recording

ranranpBC420AAe name

The file onl( contains the data from the recording

Rgt

Application Serer

Structure

Cou can create a fie from the recordingH the fie $i contain a the fieds from the recording The

fieds are added to the fie $ith the ength you specified in the definition

The fied order corresponds to the order in the recording overvie$ Technica fieds

(2356257 2324ampS5amp and so on) are incuded

The data can ony e stored on the appication server If you do not specify a path the fie is stored in

the $or directory of the appication server

If the specified test fie aready eists the ne$ data record is added to this fie

copy SAP AG BC420 12-41

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 4288

04amp

983209 SAP AG 1999

ed conen

reating a Program

Recording

ZBC420ampProram name

Transfer Program

e daa

ead =rom =e

ran=er =rom recordn

reate

9ile nameTest data

ranranpBC420AA

Cou can generate a program from the recording

In the foo$ing diaog o enter a program name In addition you can choose the type and method

for fiing the maintained fied contents from the recorded screens

4se the vaues used for the recording If you reuire feie data transfer you $i have to modify

this program ater

ParameteriDe the input vaues and read these vaues from a fie A data structure is created for

parameteriDationH the data records are read from an eterna fie into this data structure The

program assumes the fie $as taiored to this data structure

If you have decided to parameteriDe the input vaues you shoud aso create a test fie during

generation To do this seect the checo and enter a name for the fie

The attriute maintenance screen of the AAP editor appears aintain the attriutes and save the

program

copy SAP AG BC420 12-42

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 4388

04

983209 SAP AG 1999

Program 9unctions

Online

transaction

Transfer program

To

error

1rror

ption 6ption ampFlat SAP

structure

Monitor

Cou have no$ generated a data transfer program for importing data into the amp System The

program can eecute the data transfer using atch input or ca transaction

If you choose option 1 and there is an error the data record is paced into a atch input session

copy SAP AG BC420 12-43

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 4488

044

983209 SAP AG 1999

Benerating 9unction Modules

Recording

Zcreaedeor ncon mode

ncon rop

Sor eD

ZBC420

Creae comer

9unction module

nl( one data record can be processed at a time

In the net diaog o you can generate a function modue a function group and short tet from the

recording The function modue is automaticay created in the function group

copy SAP AG BC420 12-44

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 4588

042

983209 SAP AG 1999

9unction of 9unction Modules

Online

transaction

To

error

1rror

ption 6 ption amp

9unction module

Import

Parameter 1port

parameter

Tables

M1SSTA

Monitor

S$BC

Import interface

The import interface consists of a technica part and the fieds from the recording (A parameter is

created for each input fied of the recorded transactions)

7port interface

Simpy consists of the parameter S4amp2 The function modue $i return a vaue in the system

fied SC9S4amp2 after caing ca transaction This return vaue is set to Dero if the data record has

een correcty processed (5ny appies to 2T)

If a session is created you $i e notified $hether the data record coud e paced into the session

Tae interfaceThis is used ony if the function modue $ors $ith ca transaction The tae contains a the

system messages

copy SAP AG BC420 12-45

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 4688

048

983209 SAP AG 1999

Import Interface of 9unction Module

$

Technical

fields

Data

fields

BI session or CALL TRANSACTION

Processin $ode

pdate $ode

a$e oamp BI session iamp (T initial)

Bacround user iamp (T initial)

Delete session aampter processin

Loc date oamp session

ODATA indicator

TU

MD1

UPDAT1

BRUP

US1R

=11P

ELDDAT1

DATA

Cou can use parameter 2T4 to specify $hether the function modue creates a atch input session

(2T4 E ) or updates the data record directy using ca transaction (2T4 E G)

The other parameters are fied as for a atch input session header

Note 7very time the function modue is caed a atch input session is created

If the session is to contain severa transactions proceed as foo$s

ltenerate the transaction severa times This can e achieved y recording the transaction again The

function modue interface $i then contain more than one transaction -hen the function modue is

caed severa transactions can e generated for each session

copy SAP AG BC420 12-46

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 4788

043

983209 SAP AG 1999

The Transaction Recorder

PrinciplesPrinciples

Recording )ith the LSMWRecording )ith the LSMW

Principles of atch Input and all TransactionPrinciples of atch Input and all Transaction

Integrating the TA Program into the DWIntegrating the TA Program into the DW

Using the TA Recorder Using the TA Recorder

copy SAP AG BC420 12-47

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 4888

045

983209 SAP AG 1999

Benerated Program

9unction modules DltP1ltBRUP

DltIS1RT

DltLS1ltBRUP

AAP Program

Define structure of

data in seJuential

fileDefine D

table

pen seJuential file

pen I session

Read data recordCseJuential file

9ill D table

9ill I session gtALL TRASATI

Last data record K

lose I session

lose seJuential file

The generated program has the structure dispayed aove It uses the standard function modues for

creating atch input sessions

copy SAP AG BC420 12-48

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 4988

047

983209 SAP AG 1999

Structure of the Benerated Program

Benerated part

Define D

table

pen seJuential file

pen I session

Read data record

9ill D table

9ill I session gtALL TRASATI

Last data recordK

lose I session

lose seJuential file

Include DR16

Define filestructure

P1ltDATAS1T

P1ltBRUP

DltDPR

Dlt9I1LD

DltTRASATI

LS1ltBRUP

LS1ltDATAS1T

The generated program consists of t$o parts 9 a generated part and the incude 2amp72G8 The

incude is provided in the standard system

The incude contains the definition of the reuired 2 tae and a further seven suroutines These

suroutines eecute the foo$ing functions

5pen and cose fie

5pen and cose session

Fi 2 tae

Fi session

The generated part is the main program and cas the reevant suroutines A structure is aso

generated in the generated part to read the eterna data into the fie

See the Appendi for more information on the 2amp72G8 program

copy SAP AG BC420 12-49

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 5088

020

983209 SAP AG 1999

Structure of D Table

PRBRAM DPR D1BI 9AM 9ALPRBRAMPRBRAM DPRDPR D1BID1BI 9AM9AM 9AL9AL

SAPM90ampD 0602

R90ampD=UR 600000

R90ampDU=RS 0006

R90ampD=T=D =UA

SAPM90ampD 0660

=A6AM16 Smith

=A6PSTL 87000

=A6LAD6 US

=A6SPRAS 1

SAPM90ampD 06amp0

=A6ST1B US6amp428357DDATA

PRBRAM

DPR

D1BI

9AM

9AL

EAR

UM

EAR

EAR

EAR

40

4

6

6amp

6amp

D Module pool

D Screen number

D Start of screen

D 9ield name

D 9ield contents

9ield ame T(pe Length Short Tet

AAP Dictionar(

The 2 tae has the same structure as in a standard transfer

copy SAP AG BC420 12-50

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 5188

026

983209 SAP AG 1999

Read Structure

Recording

DATA BEGIN OF record data element BUKRS bukr$amp data element KTOKD ktokd$amp data element NA(EG) name$+amp data element SORT ortl$ampEND OF record-

record

Automaticall( generated

from recording

The structure of the fie is automaticay generated and is a$ays defined $ith the name amp725amp

The generated structure a$ays has the same ayout 7ach fied is defined y t$o generated ro$s

The first ro$ is a$ays a comment ro$ containing the tet J data eement and the data eement of

the screen fied from the recording In the net ro$ the fied itsef is defined $ith the name of the

data eement foo$ed y a three9digit position numer $hich specifies the ocation in the structure

The ength of the fied is set y the ength of the data eement If a fied is not defined through a data

eement the system uses the ength of the screen fied

copy SAP AG BC420 12-51

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 5288

02amp

983209 SAP AG 1999

pening and losing the 9ile

P1ltDATAS1T

LS1ltDATAS1T

FOR( oendataet USING dataet-O)EN DATASET dataet IN TET (ODE-

IF S01SUBR2 34 - 5RITE 6 te7t1e S01SUBR2-STO)-

ENDIF-

ENDFOR(-

FOR( cloedataet USING dataet-2OSE DATASET dataet-

ENDFOR(-

Include

DR16

The suroutine 5P7N3ATAS7T opens the seuentia fie

The suroutine 2+5S73ATAS7T coses the seuentia fie

copy SAP AG BC420 12-52

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 5388

02

983209 SAP AG 1999

9unction Modules for I Program

lient

Session name

Eold date

=eep session

D user name

RecordK

LI1T

BRUP

ELDDAT1

=11P

US1R

R1RD

DltP1ltBRUPDltP1ltBRUP

Transaction code

D table

TD1

DPRTA

DltIS1RTDltIS1RT

DltLS1ltBRUPDltLS1ltBRUP

pen Isessionpen Isession

Insert data for

transactions

Insert data for

transactions

lose I

session

lose I

session

The foo$ing function modues are provided for creating atch input sessions (function group

S2)

235P7N3ltamp54P

2reates a ne$ session and contains genera data for the $hoe session

23INS7ampT

Inserts a the data for a transaction into the session The transferred interna tae $ith the

structure 2ATA must contain a the data reuired for fuy processing the transaction

232+5S73ltamp54P

2oses the session after a the data has een inserted As soon as the session has een cosed it

can e processed

The interna tae $ith the structure 2ATA can ony contain atch input data for one singe

transaction run So the individua transactions are inserted into the atch input session in a oop

using severa 23INS7ampT cas

copy SAP AG BC420 12-53

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 5488

024

983209 SAP AG 2001

9unction Module DltP1ltBRUP

ALL 9UTI DltP1ltBRUPALL 9UTI DltP1ltBRUP

1PRTIB

LI1T client

BRUP session name

ELDDAT1 loc+ date

=11P delete flag

US1R bdc user name

R1RD recording

IMPRTIB

NID internal session +e(

11PTIS

1PRTIB

LI1T client

BRUP session name

ELDDAT1 loc+ date

=11P delete flag

US1R bdc user name

R1RD recording

IMPRTIB NID internal session +e(

11PTIS

-ith the function modue 235P7N3ltamp54P you can open a atch input session

The foo$ing parameters are mandatory

2+I7NT (cient)

ltamp54P (session name)

4S7amp (user name)

Note The 4S7amp must a$ays e specified This user name is reuired for processing the session

in atch mode

The foo$ing parameters are optiona

=5+AT7 specifies the eariest date on $hich the session can e started677P fag specifies $hether session shoud e deeted after it has een successfuy processed The

677P fag is ignored if the session contains errors

677P E K K means deete the session after processing (defaut vaue) H

677P E KGK means do not deete session

amp725amp E KGK ao$s you to create a recording instead of a I session

If gtI is specified the function modue returns the interna session ey This is needed to e ae to

differentiate sessions that have the same name

-ith 7G27PTI5NS you get various return vaues that can e ueried $ith SC9S4amp2

Note In onine mode the onine user is used for the authoriDation checs regardess of the user

name specified

copy SAP AG BC420 12-54

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 5588

022

983209 SAP AG 1999

Subprogram P1ltBRUP

P1ltBRUP

FOR( oen8rou-IF e9on -

2A FUN2TION BD2O)ENGROU) E)ORTING 2IENT lt1mandt GROU) 8rou USER uer KEE) kee

=ODDATE gtolddate-

ENDIF-ENDFOR(-

Include

DR16

The suprogram 5P7N3ltamp54P opens the atch input session

copy SAP AG BC420 12-55

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 5688

028

983209 SAP AG 1999

9unction Module DltIS1RT

ALL 9UTI DltIS1RTALL 9UTI DltIS1RT

IMPRT

TD1 Transaction code

PSTltLAL Update locall(

PRITIB print list

TAL1S DPRTA bdclttable

11PTIS

IMPRT

TD1 Transaction code

PSTltLAL Update locall(

PRITIB print list

TAL1S DPRTA bdclttable

11PTIS

-ith the function modue 23INS7ampT you can add transaction data to the session

Cou need an interna 2 tae to transfer the data

The foo$ing parameters are mandatory

T257 Transaction code

CNPamp5TA 2 tae

The foo$ing parameters are optiona

P5ST3+52A+ E KGK activates oca updating This means that the data to e updated is ept in the

appication server and updated in the ast step of the transaction This does not invove the update

process (For more information see course 28 Programming ataase 4pdates)

PampINTINlt E KGK 9 ists processed in I $i e printed immediatey -ith 7G27PTI5NS you get various return vaues that can e ueried $ith SC9S4amp2

copy SAP AG BC420 12-56

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 5788

023

983209 SAP AG 1999

Subprogram DltTRASATI

DltTRASATI

FOR( BD2TRANSA2TION USING tcode-

IF e9on -2A FUN2TION BD2INSERT

E)ORTING T2ODE tcode TABES D0N)ROTAB bdcdata-

ESE-

ENDIF-ENDFOR(-

T

Include

DR16

The suprogram 23TampANSA2TI5N moves the fied 2 tae either to a atch input session

or uses ca transaction to import the data into the system 5n the seection screen you can specify

$hether you $ant to create a session or you $ant to use ca transaction to process the data directy

The S7SSI5N fied is then set according to your seection

copy SAP AG BC420 12-57

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 5888

025

983209 SAP AG 1999

9unction Module DltLS1ltBRUP

ALL 9UTI DltLS1ltBRUP

11PTIS

TltP1 6

NU1U1lt1RRR amp

-ith the function modue 232+5S73ltamp54P you can cose a atch input session

In 7G27PTI5NS you get various return vaues that can e ueried $ith SC9S4amp2

copy SAP AG BC420 12-58

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 5988

027

983209 SAP AG 1999

Subprogram LS1ltBRUP

FOR( cloe8rou-IF e9on -cloe batcgt 9nut 8rou

2A FUN2TION BD22OSEGROU)-

ESE-IF e8rouoened -

2A FUN2TION BD22OSEGROU)-

ENDIF-ENDIF-

ENDFOR(-

LS1ltBRUPlose session

lose error session

Include

DR16

The suprogram 2+5S73ltamp54P coses the atch input session The suprogram differentiates

et$een a norma I session (S7SSI5N E G) and a session opened $hen ca transaction

encountered an error (73ltamp54P35P7N7 E G)

copy SAP AG BC420 12-59

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 6088

080

983209 SAP AG 1999

Subprograms DltDPRG Dlt9I1LD

DltDPR

Dlt9I1LD

FOR( bdc9eld USING nam al-IF al 34 nodata-2EAR bdcdata- bdcdata1nam nam- bdcdata1al al- A))END bdcdata-ENDIF-

ENDFOR(-

FOR( bdcdltnro USING ro8ram dltnro- 2EAR bdcdata-Bdcdata1ro8ram ro8ram-Bdcdata1dltnro dltnro-Bdcdata1dltnbe89n - A))END bdcdata-ENDFOR(-

Include

DR16

The incude 2amp72GG contains t$o suprograms 23CNPamp5 and 23FI7+

Suprogram 23CNPamp5 fis the 2 tae $ith program names and screen numers

Suprogram 23FI7+ fis the 2 tae $ith fied names and vaues

7ach suprogram creates an entry in the 2 tae

copy SAP AG BC420 12-60

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 6188

086

983209 SAP AG 1999

9illing the D Table

erorm bdcdltnro u9n8 SA)(FD +- erorm bdc9eld u9n8 BD22URSOR RFD1BUKRS- erorm bdc9eld u9n8 BD2OK2ODE 6- erorm bdc9eld u9n8 RFD1BUKRS record1BUKRS- erorm bdc9eld u9n8 RFD1KTOKD record1KTOKD-

erorm bdcdltnro u9n8 SA)(FD -

erorm bdc9eld u9n8 BD22URSOR KNA1S)RAS- erorm bdc9eld u9n8 BD2OK2ODE 6- erorm bdc9eld u9n8 KNA1NA(E record1NA(E-

erorm bdc9eld u9n8 KNA1SORT record1SORT-

Recording Benerated automaticall(

from the recording

)ERFOR( bdcdltnro USING SA)(FD +- )ERFOR( bdc9eld USING BD22URSOR RFD1BUKRS-)ERFOR( bdc9eld USING BD2OK2ODE 6-)ERFOR( bdc9eld USING RFD1BUKRS record1BUKRS-)ERFOR( bdc9eld USING RFD1KTOKD record1KTOKD-

)ERFOR( bdcdltnro USING SA)(FD -

)ERFOR( bdc9eld USING BD22URSOR KNA1S)RAS-)ERFOR( bdc9eld USING BD2OK2ODE 6-)ERFOR( bdc9eld USING KNA1NA(E record1NA(E-

)ERFOR( bdc9eld USING KNA1SORT record1SORT- ---

The 2 tae is fied $ith data from the recording The suroutines 23CNPamp5 and

23FI7+ are used for this

The suroutines are caed in the reuired structure or seuence

copy SAP AG BC420 12-61

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 6288

08amp

983209 SAP AG 1999

erie)

SAPDatabase

SeJuential9ile

SAPDatabase

ALL TRASATIALL TRASATI

SeJuential9ile

ATE IPUTATE IPUT

D TableD TableD TableD Table

I Monitor

T

In contrast to atch input you can use ca transaction to directy pass data to the diaog interface

$ithout using a atch input session Cou use an interna tae (2 tae same structure and ayout

as atch input) to temporariy store your screen data Then you ca the desired transaction in your

program

Note 5n average the 2a Transaction method is 8 to times faster than using atch Input

copy SAP AG BC420 12-62

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 6388

08

983209 SAP AG 1999

all Transaction Program$ 1ample

RE)ORT abcbdcdcdeb9ct-

)ARA(ETERS d9mode DEFAUT A

udmode DEFAUT S-FOR( calltranact9on-2A TRANSA2TION FD

USING bdcdata (ODE d9mode

U)DATE udmode-

IF lt1ubrc NE - 5RITE 6 ---

ENDIF-ENDFOR(-

Screen

00

Screen

100

Screen

An additiona system ro area is added for the caed transaction The system uses this area for

processing the individua screens in the transactionH the data from the tae is added here After the

transaction is processed the second ro area is reeasedH the system continues processing in the first

ro area

Notes

In contrast to atch input there is no error ogging (error sessions) here For processing the caed

transaction the system uses the authoriDations of the user that caed the transaction The 2 tae

can ony hod data for one transaction run at a time efore another transaction is caed and its data

can e added you must eecute a amp7Famp7S= for the 2 tae

copy SAP AG BC420 12-63

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 6488

084

983209 SAP AG 1999

ALL TRASATI C6

RE)ORT 777-

2A TRANSA2TION FD USING bdcdata (ODE E-

Default for MD1 is A

2A TRANSA2TION 3tranact9oncode4 USING 3bdc1table4 C (ODE A E N C-

-ith the parameter 57 you can seect a specific dispay mode for processing the transaction The

foo$ing three modes are avaiae

A (ispay a)

If you eecute the program a the screens and a their data are dispayed This is the defaut vaue

for the 57 in 2A++ TampANSA2TI5N

N (ispay nothing)

The screens are not dispayed at a regardess of $hether any of them contained errors As soon as

the transaction has een fuy processed contro is returned to your program (The vaue of the

parameter 4PAT7 determines $hether dataase updates are eecuted or not)

7 (ispay errors ony)As soon as an error occurs in a screen the transaction is s$itched to dispay mode so that you can

correct the errors

These dispay modes are the same as those in the atch input session processing

copy SAP AG BC420 12-64

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 6588

082

983209 SAP AG 1999

RE)ORT 777-

2A TRANSA2TION FD USING BD2DATA U)DATE -

ALL TRASATI Camp

RE)ORT 777-

2A TRANSA2TION FD USING bdcdata U)DATE -

2A TRANSA2TION 3tranact9oncode4 USING 3bdc1table4 C (ODE A E N C U)DATE A S C -

Default for UPDAT1 is A

-ith the parameter 4PAT7 you can contro ho$ dataase updates arising from a transaction are

carried out There are three options

A (asynchronous updating) The caed transaction does not $ait unti the dataase has een

updated it simpy for$ard the updates to the SAP update service This usuay speeds up the 2T

program This processing mode is N5T recommended for arge data sets as the caed transaction

does not receive a competion message from the update modue

The caing 2T program therefore cannot te if the transaction has een successfuy competed Cou

shoud use the updating administration function (transaction S8) to determine $hether updating

$as terminated eary The error anaysis correction functions for are ess hepfu than $ith

synchronous updating

S (synchronous updating) -ith synchronous updating the caed transaction $aits unti a the

updates have een competed So processing is so$er than $ith synchronous updating The caed

transaction can ho$ever report any updating errors to the program $hich maes error

anaysiscorrection easier

+ (local updating) $ith oca updating the dataase is not updated in a separate process it is

updated in the caers process (see appication hep documentation for the AAP ey$ord S7T

4PAT7 TAS6 +52A+)

copy SAP AG BC420 12-65

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 6688

088

983209 SAP AG 1999

ALL TRASATI C

RE)ORT 777-DATA mtab T0)E TABE OF bdcm8coll-

2A TRANSA2TION FD USING bdcdata (ESSAGES INTO mtab-

2A TRANSA2TION 3tranact9oncode4 USING 3bdc1table4 C (ODE A E N C U)DATE A S C (ESSAGES INTO 3metab4 C -

7SSAlt7S specifies that a system messages that are output during the eecution of a 2A++

TampANSA2TI5N are $ritten to the interna tae L7SSTA The interna tae must have the

structure 2Slt25++

4nie the cassica atch input processing $ith sessions 2A++ TampANSA2TI5N does not offer any

specia processing procedures for transactions containing errors There are no restart functions for

transactions that contain errors or that cause updating terminations

copy SAP AG BC420 12-66

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 6788

083

983209 SAP AG 1999

ALL TRASATI C4

RE)ORT 777-DATA mltot T0)E ctuaram-

2A TRANSA2TION FD USING BD2DATA

O)TIONS FRO( mltot-

2A TRANSA2TION 3tranact9oncode4 USING 3bdc1table4 C (ODE A E N C U)DATE A S C (ESSAGES INTO 3metab4 C O)TIONS FRO( ot C -

RE)ORT 777-DATA mltot T0)E ctuaram-2A TRANSA2TION FD USING bdcdata

O)TIONS FRO( mltot-

The addition 5PTI5NS enaes the ca transaction statement to e controed through a structure

The structure must have the dictionary type 2T43PAampAS

The addition 5PTI5NS Famp5 must not e comined either $ith the addition 57 or $ith

4PAT7 ore information on the net side

copy SAP AG BC420 12-67

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 6888

085

983209 SAP AG 1999

Structure TUltPARAMS

DISMD1 Procen mode anaoo o addon amp

UPDMD1 $pdae mode anaoo o addon $PA

ATTMD1 CA mode CA conro

D19SI1 orce de=a EndoE e drn procen

RAMMIT +o eD a Camp amp(

IPT +o a ac np eonF a F S-B+P SPAC

I1D +o a ac np eon a=er end o= BC daa

The components are defined as foo$s

The components 7FSIM7 ampA25IT N5INPT and N5I7N can have the foo$ing

vaues KGK E Ces or K K E No

If the addition 5PTI5NS Famp5 is not specified the foo$ing settings appy to the contro

parameters

IS57 from addition 57

4P57 from addition 4PAT7

2ATT57 2ATT not active

7FSIM7 o not not use defaut $indo$s siDe

ampA25IT Successfu eit at 25IT -5amp6

N5INPT atch input session active (SC9INPT E G)

N5I7N atch input session sti active after end of 2 data

copy SAP AG BC420 12-68

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 6988

087

983209 SAP AG 1999

SMSBID Message ID

SMSBT Message T(pe C1GIGWGSGA

SMSB Message umber

SMSB6 Message ariable 6

SMSBamp Message ariable amp

SMSB Message ariable

SMSB4 Message ariable 4

SMSBID Message ID

SMSBT Message T(pe C1GIGWGSGA

SMSB Message umber

SMSB6 Message ariable 6

SMSBamp Message ariable amp

SMSB Message ariable

SMSB4 Message ariable 4

Return code$

S(stem fields$

alue Meaning

0 Successful

6000 1rror in transaction

6000 1rror in processing call transaction

see also the s(stem fields specified

alue Meaning

0 Successful

6000 1rror in transaction

6000 1rror in processing call transaction

see also the s(stem fields specified

9ield name Meaning9ield name9ield name MeaningMeaning

Return ode and S(stem 9ields

The return code is used to specify $hether the caed transaction $as processed successfuy In

addition severa system fieds are fied The numer I type and variaes of the diaog message

output y the caed transaction Cou need this information to output the message tet

copy SAP AG BC420 12-69

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 7088

030

983209 SAP AG 1999

Benerated Program of the TA Recorder

REFRES= (ESSTAB-

2A TRANSA2TION tcode USING bdcdata (ODE ctumode U)DATE cudate (ESSAGES INTO metab-OO) AT metab- ENDOO)-IF lubrc 34 AND e8rou 34 S)A2E- IF e8rouoenend - 2A FUN2TION BD2O)ENGROU) E)ORTING ---------

--------- E8rouoened - ENDIF- 2A FUN2TION BD2INSERT E)ORTING T2ODE tcode TABES D0N)ROTAB bdcdata-ENDIF-REFRES= bdcdata-

Message table output

pen error session

Insert data record that

has errors into error

session

If you have seected ca transaction on the seection screen the generated program runs as foo$s

The onine transaction is caed $ith ca transaction and passed to tae 2ATA A the

messages arising during the ca transaction are put in the interna tae 7SSTA

7SSTA is output as a ist

If you have specified an error session ( 73ltamp54P L SPA27) on the seection screen and the

ca transaction comes across an error (+3S4amp2 L 0) the error session is opened The error

session is ho$ever ony opened once Then the data record is paced in the session

A the other data records that have errors $ith ca transaction are paced in the same session

copy SAP AG BC420 12-70

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 7188

036

983209 SAP AG 1999

The Transaction Recorder

PrinciplesPrinciples

Recording )ith the LSMWRecording )ith the LSMW

Principles of atch Input and all TransactionPrinciples of atch Input and all Transaction

Integrating the TA Program into the DWIntegrating the TA Program into the DW

Using the TA Recorder Using the TA Recorder

copy SAP AG BC420 12-71

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 7288

03amp

983209 SAP AG 1999

Integrating into the DW

Transfer program

AAP Dictionar(

Integrate

SDA0

SDA6

SDAamp

SDA

Cou can integrate the generated program into the G9- The structure of the fie must e created

in the AAP ictionary The taes SGA0 SGA8 SGA1 and SGA $i e fied

copy SAP AG BC420 12-72

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 7388

03

983209 SAP AG 1999

DW Release 42

Goo

-B eeae 45

aa ran=er ogtec

Int customer data transfer ob-ect

ecord =ed

Dece daa ran=er

d Goo

The ampunction ampor interatin TA recorder prora$s is

i$ple$ented in the

D+-B in Release

The recorder can e integrated as of ampeease and it is provided in the G9- ampeease

ltot to the G9- ampeease 5n the initia screen you can integrate programs y choosing ampoto

( +nt customer ata transfer o-ect

copy SAP AG BC420 12-73

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 7488

034

983209 SAP AG 1999

reating Program as D b-ect

Comer ran=er ogtec

ampgtec ype

Sor eD =or ogtec

aa ran=er proram

Srcre name

9900

(+A1

Cane comer

ZBCA+G

ZB

ustomer transfer ob-ect

umber bet)een 7000 and 7777

b-ect t(pe

Assignment to R ob-ect

Short tet for D ob-ectShort description

Data transfer program

ame of generated program

Structure name

A structure Cstructure la(out )ith this name is created in

the AAP Dictionar(

For ampeease transfer oects $ere not organiDed y 5amp oects ut y a G numer (00089

OOOO) The numer range O0009OOOO is reserved for customers

To create a connection to the ne$ G 9- you must assign the program to a 5amp oect

2reate a short tet for the G oect This tet $i appear in the method seection ist

Specify the program to e incuded

Specify a name for the structure to e created in the AAP ictionary

Note $he generated program appears under program type +N and not under program type

-

copy SAP AG BC420 12-74

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 7588

032

983209 SAP AG 1999

Adantages

Automatic program registration in the DW in

Release 48

ou can use all the functions defined for

standard ob-ects

1ception$ The (reate ampile ith data

function

If you incuded the oect in the ampeease $orench it is automaticay avaiae in the ampeease

B $orench

A the $orench functions are avaiae for your oect ecept for Create files ith transfer ata

copy SAP AG BC420 12-75

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 7688

038

983209 SAP AG 1999

ou are no) able to$

The Transaction Recorder$ Unit Summar(

Use the recording function in the LSMW to create

a batch input session )ith the data from the

eternal s(stem

Use the TA Recorder to create (our o)n data

transfer program

Anal(e programs that )or+ )ith batch input or

call transaction

Integrate the TA Recorder programs into the

DW

copy SAP AG BC420 12-76

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 7788

ercise 1

nit $ -ecorder

$opic 2reating etors

$ransaction -ecorder ercise 1

bull 2reating detors $ith eterna numer assignment

bull etor numers M9980008 to M9980080

Address data for detors $ith eterna numer assignment is to

e transferred using program ampFI700

ro4ect F5

Supro4ect +5

-un +575

$as)s 85 95 8S25

9oad program -F+00

8 In the foo$ing eercises eisting data is to e changed Therefore these detors $ith

eterna numer assignment have to first e created

898 4nder suproect 79 create run 797G9 $ith the name Detors ith

eternal numers

copy SAP AG BC420 12-77

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 7888

891 2reate the foo$ing three tass The tass map the foo$ing process steps

convert data create + session and process + session

89198 In run 797G9 create the foo$ing tas

9 Tas AP9

9 Name 2onvert data 9 Tas type AP

9 Program type +S-

Seect the foo$ing +S- oect

+S- proect 2109

+S- suproect 7I9

+S- oect I997GT

89191 In run 797G9 create the foo$ing tas 9 Tas +5A9

9 Name 2reate I session

Tas type +5A

9 Program type INP

Seect program ampFI700 $ith the variant

I97G9

8919 In run 797G9 create the foo$ing tas

9 Tas S29

9 Name Process I session Tas type S2

9 Program type amp7P5

Seect program ampS2S4 $ith the variant

S497G9

Note that you have to correct the seuence of the tass 2onvert data

create + session and process + session

4se the uttons

89 Start the run

The detors $i e created $ith eterna numer assignments

89 2hec in transaction F0 that the detors M9980008 to M9980080 have een

created

copy SAP AG BC420 12-78

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 7988

ercise

nit $ransaction -ecorder

$opic -ecording function in the 9S8(

bull 2reate a recording using the +S-

bull ltenerate a atch input session

2hange the detor address data in the amp System

Name of the recording +

Name of the file +2055+F9

8 2reate the recording 7I3 using the +S- ampecord the transaction F01 (2hange

detor)

898 efore you create the recording first test the transaction onineQ

For the recording use detor M9980008 5n the initia screen of the F01

maintain the foo$ing fieds ony

etor etor M9980008

2ompany code 0008

Address data seect

Note $he data record must e saved hile recording

891 aintain the names and the descriptions for the foo$ing fieds

Name city street posta code and teephone numereete a other fieds in screen 880 from the recording (eg S5ampT+ +AN8

SPampAS)

4se the same technica names as sho$n in the tae eo$ (automatic fied

mapping)

copy SAP AG BC420 12-79

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 8088

1 2reate the suproect 7I9 and the ne$ oect TA3 in your proect 2109

aintain the oect attriutes and seect the item atch input recording Seect your

recording 7I3

2reate the source structure address

2reate the source fieds according to the tae eo$ 5r copy them from proect 2109S37N suproect 7I900 oect TA900

198 Fie setup The data from the egacy system are dispayed in the foo$ing tae

Fied name Fied type Fied ength escription

N5 2 8B etor numer

NA7 2 Name

STamp77T 2 Street

2ITC 2 2ityPace of residence

MIP 2 80 Posta code

T7+ 2 8B Teephone numer

191 aintain the fied mapping 4se the automatic fied mapping (via menu item

7tras)

19 Specify the fies 5ny maintain the fie name of the source fie

Name of the fie 21099IFI+7

2odepage 8800

19 Import the data and convert them ispay the data in each caseQ

19 2reate a atch input session

19B ampun the atch input session

copy SAP AG BC420 12-80

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 8188

ercise 3

nit $ransaction -ecorder

$opic -ecording ith the $ -ecorder

bull ltenerate a recording using the TA recorder

bull Test the recording

2hange the address data of detors in the amp system

Name recording $+

Name of the file +2055+F9

8 2reate the recording TA37I3 using the transaction recorder ampecord the

transaction F01 (change detor)

898 4se detor M9980008 for the recording 5n the F01 initia screen ony

maintain the foo$ing fieds

etor etor M9980008

2ompany 2ode 0008

Address data seect

Note $he data record must e saved hen recording

eete a fieds that do not eist in the source fie 21099IFI+7 from screen

880 in the recording (eg 6NA89S5ampT+ 6NA89+AN8 6ANNQ9SPampAS) Note o not deete fieds ampF01946ampS and ampF0190880

Save the recording no$

1 S$itch to the recordings overvie$

198 Process the recording $ith the processing mode A (dispay a)

191 Process the recording $ith the processing mode RN (no dispay)

19 If the recording has een tested and no error has occurred generate a I session

and run it using the I monitor If an error shoud occur generate the recordingagainQ

copy SAP AG BC420 12-81

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 8288

From the recording generate the program M21037I3 in your deveopment cass

2109 Seect the foo$ing

bull ampead fied contents from fie

bull 2reate test data in the fie 2103dei3test3tt

98 Save this program and eecute it ltenerate one I session each and process it

2arry out the same steps again using the ca transaction

The generated program shoud no$ e changed so that fie 21099IFI+7 can e

read and processed

98 2hange the defaut vaue of the fie name (parameter dataset) in 21099

IFI+7

91 2hange the structure definition eete the company code fied and the address

data checo from the structure

9 2hange the su9routine ca perform dc3fied for the company code (KampF019

46ampSK) so that the vaue 0008 is transferred

9 2hange the su9routine ca perform dc3fied for the address data checo

(KampF0190880K) so that the vaue G is transferred

9 Start the program again and read the data from the fie 21099IFI+7 $ith

detor data ltenerate a I session $ith it and run it

copy SAP AG BC420 12-82

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 8388

033 Include DR16INCLUDE BDCRECX1

SELECTION-SCREEN BEGIN OF LINE

PARAMETERS SESSION RADIOBUTTON GROUP CTU create sessi SELECTION-SCREEN COMMENT $amp TEXT-S FOR FIELD SESSION

se(ecti-scree )siti +

PARAMETERS CTU RADIOBUTTON GROUP CTU ca(( trasacti

SELECTION-SCREEN COMMENT $amp TEXT-S FOR FIELD CTU

SELECTION-SCREEN END OF LINE

SELECTION-SCREEN BEGIN OF LINE

SELECTION-SCREEN COMMENT $amp TEXT-S1 FOR FIELD GROUP

se(ecti-scree )siti $+

PARAMETERS GROUP1$amp r) ae 0 sessi

SELECTION-SCREEN COMMENT $amp TEXT-S+ FOR FIELD CTUMODE

se(ecti-scree )siti

PARAMETERS CTUMODE LIE CTU2PARAMS-DISMODE DEFAULT 3N3

A4 s56 a(( 78)rs

E4 s56 78)r errr (8

N4 7 t 7is)(a8 78)r

SELECTION-SCREEN END OF LINE

SELECTION-SCREEN BEGIN OF LINE

SELECTION-SCREEN COMMENT $amp TEXT-S$ FOR FIELD USER

se(ecti-scree )siti $+

PARAMETERS4 USER1$amp DEFAULT S9-UNAME ser 0r sessi i atc5

SELECTION-SCREEN COMMENT $amp TEXT-S FOR FIELD CUPDATE

se(ecti-scree )siti

PARAMETERS CUPDATE LIE CTU2PARAMS-UPDMODE DEFAULT 3L3

S4 s8c5rs(8

A4 as8c5rs(8

L4 (ca(

SELECTION-SCREEN END OF LINE

SELECTION-SCREEN BEGIN OF LINE

SELECTION-SCREEN COMMENT $amp TEXT-S FOR FIELD EEP

se(ecti-scree )siti $+

PARAMETERS4 EEP AS CltECBOX 3 3 = 7e(ete sessi i0 0iis5e7

3X3 = gtee) sessi i0 0iis5e7

SELECTION-SCREEN COMMENT $amp TEXT-S FOR FIELD E2GROUP

copy SAP AG BC420 12-83

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 8488

se(ecti-scree )siti

)araeters E2GROUP1$amp r) ae 0 errr-sessi

SELECTION-SCREEN END OF LINE

SELECTION-SCREEN BEGIN OF LINE

SELECTION-SCREEN COMMENT $amp TEXT-S FOR FIELD ltOLDDATE

se(ecti-scree )siti $+

PARAMETERS4 ltOLDDATE LIE S9-DATUM

SELECTION-SCREEN COMMENT +11amp TEXT-S$ FOR FIELD E2USER

se(ecti-scree )siti

PARAMETERS4 E2USER1$amp DEFAULT S9-UNAME ser 0r errr-sessi

SELECTION-SCREEN END OF LINE

SELECTION-SCREEN BEGIN OF LINE

SELECTION-SCREEN COMMENT +11amp TEXT-S FOR FIELD E2EEP

se(ecti-scree )siti

PARAMETERS4 E2EEP AS CltECBOX 3 3 = 7e(ete sessi i0 0iis5e7

3X3 = gtee) sessi i0 0iis5e7

SELECTION-SCREEN END OF LINE

SELECTION-SCREEN BEGIN OF LINE

SELECTION-SCREEN COMMENT +11amp TEXT-S FOR FIELD E2ltDATE

se(ecti-scree )siti

PARAMETERS4 E2ltDATE LIE S9-DATUM

SELECTION-SCREEN END OF LINE

SELECTION-SCREEN SIP

SELECTION-SCREEN BEGIN OF LINE

SELECTION-SCREEN COMMENT 1amp TEXT-S1 FOR FIELD NODATA

PARAMETERS4 NODATA DEFAULT 33 LOER CASE 7ata

SELECTION-SCREEN END OF LINE

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

Batc5i)t7ata 0 si(e trasacti

DATA4 BDCDATA LIE BDCDATA OCCURS ITlt ltEADER LINE

essaes 0 ca(( trasacti

DATA4 MESSTAB LIE BDCMSGCOLL OCCURS ITlt ltEADER LINE

errr sessi )ee7 3 3 r 3X3amp

DATA4 E2GROUP2OPENED

essae tets

TABLES4 T1

copy SAP AG BC420 12-84

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 8588

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

at se(ecti scree

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

AT SELECTION-SCREEN

r) a7 ser st e 0i((e7 0r create sessi

IF SESSION = 3X3 AND

GROUP = SPACE OR USER = SPACE

MESSAGE E1MSamp

ENDIF

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

)e 7ataset

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

FORM OPEN2DATASET USING P2DATASET

OPEN DATASET P2DATASET IN TEXT MODE

IF S9-SUBRC

RITE4 TEXT-E S9-SUBRC

STOP

ENDIF

ENDFORM

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

c(se 7ataset

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

FORM CLOSE2DATASET USING P2DATASET

CLOSE DATASET P2DATASET

ENDFORM

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

create atc5i)t sessi

t 0r ca(( trasacti siamp

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

FORM OPEN2GROUP

IF SESSION = 3X3

SIP

RITE4 $amp 3Create r)3I1amp GROUP

SIP

)e atc5i)t r)

CALL FUNCTION 3BDC2OPEN2GROUP3

EXPORTING CLIENT = S9-MANDT

copy SAP AG BC420 12-85

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 8688

GROUP = GROUP

USER = USER

EEP = EEP

ltOLDDATE = ltOLDDATE

RITE4 amp 3BDC2OPEN2GROUP3I$amp

1$amp 3retrc7e43I+amp

S9-SUBRC

ENDIF

ENDFORM

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

e7 atc5i)t sessi

ca(( trasacti si4 errr sessiamp

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

FORM CLOSE2GROUP

IF SESSION = 3X3

c(se atc5i)t r)

CALL FUNCTION 3BDC2CLOSE2GROUP3

RITE4 amp 3BDC2CLOSE2GROUP3Iamp

1$amp 3retrc7e43I+amp

S9-SUBRC

ELSE

IF E2GROUP2OPENED = 3X3

CALL FUNCTION 3BDC2CLOSE2GROUP3

RITE4

RITE4 amp 3Fe5(era))e 6r7e eret3Iamp

ENDIF

ENDIF

ENDFORM

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

Start e6 trasacti accr7i t )araeters

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

FORM BDC2TRANSACTION USING TCODE

DATA4 L2MSTRINGamp

DATA4 L2SUBRC LIE S9-SUBRC

atc5 i)t sessi

IF SESSION = 3X3

CALL FUNCTION 3BDC2INSERT3

EXPORTING TCODE = TCODE

TABLES D9NPROTAB = BDCDATA

RITE4 3BDC2INSERT3Iamp

copy SAP AG BC420 12-86

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 8788

TCODE

3retrc7e43I+amp

S9-SUBRC

3RECORD43

S9-INDEX

ca(( trasacti si

ELSE

REFRESlt MESSTAB

CALL TRANSACTION TCODE USING BDCDATA

MODE CTUMODE

UPDATE CUPDATE

MESSAGES INTO MESSTAB

L2SUBRC = S9-SUBRC

RITE4 3CALL2TRANSACTION3

TCODE

3retrc7e43I+amp

L2SUBRC

3RECORD43

S9-INDEX

LOOP AT MESSTAB

SELECT SINGLE FROM T1 ltERE SPRSL = MESSTAB-MSGSPRA

AND ARBGB = MESSTAB-MSGID

AND MSGNR = MESSTAB-MSGNR

IF S9-SUBRC =

L2MSTRING = T1-TEXT

IF L2MSTRING CS 313

REPLACE 313 ITlt MESSTAB-MSGH1 INTO L2MSTRING

REPLACE 3$3 ITlt MESSTAB-MSGH$ INTO L2MSTRING

REPLACE 33 ITlt MESSTAB-MSGH INTO L2MSTRING

REPLACE 33 ITlt MESSTAB-MSGH INTO L2MSTRING

ELSE

REPLACE 33 ITlt MESSTAB-MSGH1 INTO L2MSTRING

REPLACE 33 ITlt MESSTAB-MSGH$ INTO L2MSTRING

REPLACE 33 ITlt MESSTAB-MSGH INTO L2MSTRING

REPLACE 33 ITlt MESSTAB-MSGH INTO L2MSTRING

ENDIF

CONDENSE L2MSTRING

RITE4 MESSTAB-MSGT9P L2MSTRING$+amp

ELSE

RITE4 MESSTAB

ENDIF

ENDLOOP

copy SAP AG BC420 12-87

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 8888

SIP

Eree 0e5(era))e

IF L2SUBRC AND E2GROUP SPACE

IF E2GROUP2OPENED = 3 3

CALL FUNCTION 3BDC2OPEN2GROUP3

EXPORTING CLIENT = S9-MANDT

GROUP = E2GROUP

USER = E2USER

EEP = E2EEP

ltOLDDATE = E2ltDATE

E2GROUP2OPENED = 3X3

ENDIF

CALL FUNCTION 3BDC2INSERT3

EXPORTING TCODE = TCODE

TABLES D9NPROTAB = BDCDATA

ENDIF

ENDIF

REFRESlt BDCDATA

ENDFORM

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

Start e6 scree

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

FORM BDC2D9NPRO USING PROGRAM D9NPRO

CLEAR BDCDATA

BDCDATA-PROGRAM = PROGRAM

BDCDATA-D9NPRO = D9NPRO

BDCDATA-D9NBEGIN = 3X3

APPEND BDCDATA

ENDFORM

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

Isert 0ie(7

Page 28: BC420_46C - 012The Transaction Recorder

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 2888

0amp5

983209 SAP AG 1999

hanging ustomer Data$ Initial Screen

9ield ontents

BCC$Samp $SZAV

BCamp(Camp )00

02-($++ Z-88-10000

02-0110

02-0130

$SZAV

9ield ame

Comer

Company code

Z-88-10000

Genera daa

Comer Z-88-10000

+ame

9ield ontents

BCamp(Camp $PA

BCS$BSC SAPSZA1 0300ASS

BCS$BSC SAPSZA1 0301Camp$

BCC$Samp SZA10100-+$B

A1AA-S Garden Sree

A1AA-amp$S+$1 34

A1AA-PampSCamp1 02105

9ield ame

Screen

111

Screen

106

In the aove eampe the transaction Change customer F01 is recorded

copy SAP AG BC420 12-28

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 2988

0amp7

983209 SAP AG 2001

hange Debitor$ Pa(ment Transactions C6

Banlt dea

Screen

10

9ield ontent

BCC$Samp (+B(-BA+(+01

BCamp(Camp BA+((+B(-BA+(S01

(+B(-BA+(01 12345679

(+B(-BA+(+01 22222222

Debitor 5560000

9ield ame

Inde

copy SAP AG BC420 12-29

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 3088

00

983209 SAP AG 1999

hanging ustomer Data$ Pa(ment Transactions Camp

Addre

an+ countr( US

an+ code 6amp42837

Banlt dea

ustomer 5560000

9ield ontents9ield ame

BCC$Samp (+A1-(+ZA

BCamp(Camp $PA

(+B(-Z01

Screen

10

Screen

100

SAPLBA

9ield ontents

BCC$Samp B+(A-BA+(A

BCamp(Camp +

B+(A-BA+(A +aona Banlt

9ield ame

In different transactions the modue poo may change This is the case $ith for eampe customer

master data The TA recorder records modue poo changes automaticay

copy SAP AG BC420 12-30

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 3188

06

983209 SAP AG 1999

Eierarch( Displa( of the Recording

02amp

02

SAP02 0106

BCC$Samp 02-0130

BCamp(Camp )00

02-($++ -88-10000

02-0110

02-0130

SAP02 0111

BCamp(Camp V

BCC$Samp A1AA-amp$S+$1

A1AA-S Garden Sree

Recording

-ith the TA recorder the resuts are aso a ist in a hierarchy dispay =o$ever you cannot assign

your o$n fied names as you can in the +S-

copy SAP AG BC420 12-31

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 3288

0amp

983209 SAP AG 1999

Recording erie)

Recording

Transfer program

9unction module

ontains onl( the data

from the recording

Test data

Test

reate

reate

reate

reate

1dit hange recording

Process recording

Cou can edit the recording as needed

The recording can e tested and eecuted again The screens are run through in the same $ay as in

the recording

The recording can then e used to create

atch input sessions

Test data

ata transfer programs $ith atch input or ca transaction

Function modues

copy SAP AG BC420 12-32

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 3388

0

983209 SAP AG 1999

1 02 BS

2 SAP02 106

3 BCC$Samp $SZAV

4 BCamp(Camp )00 5 02-($++ -88-10000

6 02-0110

7 02-0130

8 $SZAV

9 SAP02 111

10 BCamp(Camp V

11 BCC$Samp A1AA-amp$S+$1

12 A1AA-S Garden Sree

Program Screen St 9ield ame 9ield alue

Recording 1ditor

Recording

Add gt delete lines 9ormat chec+

Import gt eport of recording

In the editor you can add or deete ines Cou can aso change the contents of individua ines

-ith the function Chec) you can specify $hether the edited version of the recording sti has the

correct synta

Cou can aso eport import recordings to from a seuentia fie

After editing save the recording changes

copy SAP AG BC420 12-33

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 3488

04

983209 SAP AG 1999

Recording Seeral Transaction Runs

RecordingF

Directl( after the first recordingG or

In the displa( mode of the recording

In this step you can record additiona transactions and add additiona transaction runs to the

recording

Cou can record the additiona transactions directy after a recording or in the edit screen of a

recording

copy SAP AG BC420 12-34

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 3588

02

983209 SAP AG 1999

1ditor$ Importing and 1porting Recordings

6 T 9D0amp S

amp SAPM90ampD 608

DltURSR

4

2

8 SAPM90ampD 666

60

66

Program Screen St 9ield name 9ield alue

cempA

e name

aa =orma

cemp

A

e name

aa =orma

1port

Import

Presentation Serer

If the editor functions in the systems do not provide a the functions you need you can do$noad the

recording to your presentation server using the Eort function and then edit the recording using a

P2 editor

Cou use the Import function to import the data ac into the amp System ae sure the fie is sti in

the correct format

copy SAP AG BC420 12-35

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 3688

08

983209 SAP AG 1999

Processing the Recording

Recording

Process )ith ALL TRASATI

Parameer

Proce mode$pdae mode

CA mode

e=a e

Con a=er comm

+o a B eon

nd +o a B mode

A

A

T

The recording can e eecuted directy The data from the recording is used and the transaction is

processed $ith ca transaction

2a transaction provides a range of options for caing appication transactions $hich are discussed

on the foo$ing t$o pages

copy SAP AG BC420 12-36

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 3788

03

983209 SAP AG 1999

Process mode

Update mode

ATT mode

Processing Recording )ith T 6

A

1

Displa( all screens

Displa( errors onl(

o displa(

L

S

A

Local

S(nchronous

As(nchronous

A

o ATT

ATT )ithout indiidual screen control

ATT )ith indiidual screen control

Processing mode

=ere you can specify the processing mode 9 it is the same as the processing mode for atch input

4pdate mode

=ere you can specify the update mode For more information see the unit ca transaction

2ATT mode

=ere you can mae specia settings if you $ant to test the recording under 2ATT conditions (ony

necessary for 2ATT runs) Specia functions are caed in the 2ATT too for each screen at the end of

P5 and at the start of PAI

copy SAP AG BC420 12-37

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 3888

05

983209 SAP AG 1999

Default sie

ont after commit

ot a I session

1nd$ ot a I mode

Processing Recording )ith T amp

The screen standard sie is used for the

processing

ommit )or+ does not end the processing

o I mode is actie The transaction )ill run

through as in online

I mode is selected nce the data in the D

table is processedG the I mode is set to inactie

Standard siDe

If you seect this the screens are processed in the standard siDe in the foreground (in foreground or

dispay errors ony) Note the standard siDe is a$ays used for acground processing

Further after commit

The first commit $or in a transaction does not ead to the end of the recording

Note A atch input transaction is ended $ith the first commit $or

No I mode

The system fied SC9INPT is not set (SC9INPT E ) So transactions are run through as in onine

7nd No I mode

5ny use if you choose the processing mode 7 (dispay errors ony) Then the transaction is processed in the acground in atch input mode and if there is an error the screens run through in

the foreground

copy SAP AG BC420 12-38

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 3988

07

983209 SAP AG 1999

I Mode

atch input

mode

nline

Some transactions behae differentl( in batch input mode

than in online Cbatch input capabilit(

atch input mode sets the s(stem field SIPT H

Not every transaction can run the same onine and in atch input mode The transaction must decide

itsef $hether it is caed onine or in atch input mode

The system sets the system fied SC9INPT E G if the atch input mode is active (this aso appies

to ca transaction) From this system fied the transaction can identify $hether to run onine or in

atch input mode

copy SAP AG BC420 12-39

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 4088

040

983209 SAP AG 1999

reating a Session 9rom the Recording

Recordingnl( contains the data

from the recording

Seon name 02amp

Aoraon ampBS(eep eon

oclt dae 10102000

Cou can create a atch input session directy from the recording that you can then process using the

atch input monitor

copy SAP AG BC420 12-40

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 4188

046

983209 SAP AG 1999

reating Test Data

Test Data

Recording

ranranpBC420AAe name

The file onl( contains the data from the recording

Rgt

Application Serer

Structure

Cou can create a fie from the recordingH the fie $i contain a the fieds from the recording The

fieds are added to the fie $ith the ength you specified in the definition

The fied order corresponds to the order in the recording overvie$ Technica fieds

(2356257 2324ampS5amp and so on) are incuded

The data can ony e stored on the appication server If you do not specify a path the fie is stored in

the $or directory of the appication server

If the specified test fie aready eists the ne$ data record is added to this fie

copy SAP AG BC420 12-41

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 4288

04amp

983209 SAP AG 1999

ed conen

reating a Program

Recording

ZBC420ampProram name

Transfer Program

e daa

ead =rom =e

ran=er =rom recordn

reate

9ile nameTest data

ranranpBC420AA

Cou can generate a program from the recording

In the foo$ing diaog o enter a program name In addition you can choose the type and method

for fiing the maintained fied contents from the recorded screens

4se the vaues used for the recording If you reuire feie data transfer you $i have to modify

this program ater

ParameteriDe the input vaues and read these vaues from a fie A data structure is created for

parameteriDationH the data records are read from an eterna fie into this data structure The

program assumes the fie $as taiored to this data structure

If you have decided to parameteriDe the input vaues you shoud aso create a test fie during

generation To do this seect the checo and enter a name for the fie

The attriute maintenance screen of the AAP editor appears aintain the attriutes and save the

program

copy SAP AG BC420 12-42

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 4388

04

983209 SAP AG 1999

Program 9unctions

Online

transaction

Transfer program

To

error

1rror

ption 6ption ampFlat SAP

structure

Monitor

Cou have no$ generated a data transfer program for importing data into the amp System The

program can eecute the data transfer using atch input or ca transaction

If you choose option 1 and there is an error the data record is paced into a atch input session

copy SAP AG BC420 12-43

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 4488

044

983209 SAP AG 1999

Benerating 9unction Modules

Recording

Zcreaedeor ncon mode

ncon rop

Sor eD

ZBC420

Creae comer

9unction module

nl( one data record can be processed at a time

In the net diaog o you can generate a function modue a function group and short tet from the

recording The function modue is automaticay created in the function group

copy SAP AG BC420 12-44

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 4588

042

983209 SAP AG 1999

9unction of 9unction Modules

Online

transaction

To

error

1rror

ption 6 ption amp

9unction module

Import

Parameter 1port

parameter

Tables

M1SSTA

Monitor

S$BC

Import interface

The import interface consists of a technica part and the fieds from the recording (A parameter is

created for each input fied of the recorded transactions)

7port interface

Simpy consists of the parameter S4amp2 The function modue $i return a vaue in the system

fied SC9S4amp2 after caing ca transaction This return vaue is set to Dero if the data record has

een correcty processed (5ny appies to 2T)

If a session is created you $i e notified $hether the data record coud e paced into the session

Tae interfaceThis is used ony if the function modue $ors $ith ca transaction The tae contains a the

system messages

copy SAP AG BC420 12-45

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 4688

048

983209 SAP AG 1999

Import Interface of 9unction Module

$

Technical

fields

Data

fields

BI session or CALL TRANSACTION

Processin $ode

pdate $ode

a$e oamp BI session iamp (T initial)

Bacround user iamp (T initial)

Delete session aampter processin

Loc date oamp session

ODATA indicator

TU

MD1

UPDAT1

BRUP

US1R

=11P

ELDDAT1

DATA

Cou can use parameter 2T4 to specify $hether the function modue creates a atch input session

(2T4 E ) or updates the data record directy using ca transaction (2T4 E G)

The other parameters are fied as for a atch input session header

Note 7very time the function modue is caed a atch input session is created

If the session is to contain severa transactions proceed as foo$s

ltenerate the transaction severa times This can e achieved y recording the transaction again The

function modue interface $i then contain more than one transaction -hen the function modue is

caed severa transactions can e generated for each session

copy SAP AG BC420 12-46

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 4788

043

983209 SAP AG 1999

The Transaction Recorder

PrinciplesPrinciples

Recording )ith the LSMWRecording )ith the LSMW

Principles of atch Input and all TransactionPrinciples of atch Input and all Transaction

Integrating the TA Program into the DWIntegrating the TA Program into the DW

Using the TA Recorder Using the TA Recorder

copy SAP AG BC420 12-47

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 4888

045

983209 SAP AG 1999

Benerated Program

9unction modules DltP1ltBRUP

DltIS1RT

DltLS1ltBRUP

AAP Program

Define structure of

data in seJuential

fileDefine D

table

pen seJuential file

pen I session

Read data recordCseJuential file

9ill D table

9ill I session gtALL TRASATI

Last data record K

lose I session

lose seJuential file

The generated program has the structure dispayed aove It uses the standard function modues for

creating atch input sessions

copy SAP AG BC420 12-48

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 4988

047

983209 SAP AG 1999

Structure of the Benerated Program

Benerated part

Define D

table

pen seJuential file

pen I session

Read data record

9ill D table

9ill I session gtALL TRASATI

Last data recordK

lose I session

lose seJuential file

Include DR16

Define filestructure

P1ltDATAS1T

P1ltBRUP

DltDPR

Dlt9I1LD

DltTRASATI

LS1ltBRUP

LS1ltDATAS1T

The generated program consists of t$o parts 9 a generated part and the incude 2amp72G8 The

incude is provided in the standard system

The incude contains the definition of the reuired 2 tae and a further seven suroutines These

suroutines eecute the foo$ing functions

5pen and cose fie

5pen and cose session

Fi 2 tae

Fi session

The generated part is the main program and cas the reevant suroutines A structure is aso

generated in the generated part to read the eterna data into the fie

See the Appendi for more information on the 2amp72G8 program

copy SAP AG BC420 12-49

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 5088

020

983209 SAP AG 1999

Structure of D Table

PRBRAM DPR D1BI 9AM 9ALPRBRAMPRBRAM DPRDPR D1BID1BI 9AM9AM 9AL9AL

SAPM90ampD 0602

R90ampD=UR 600000

R90ampDU=RS 0006

R90ampD=T=D =UA

SAPM90ampD 0660

=A6AM16 Smith

=A6PSTL 87000

=A6LAD6 US

=A6SPRAS 1

SAPM90ampD 06amp0

=A6ST1B US6amp428357DDATA

PRBRAM

DPR

D1BI

9AM

9AL

EAR

UM

EAR

EAR

EAR

40

4

6

6amp

6amp

D Module pool

D Screen number

D Start of screen

D 9ield name

D 9ield contents

9ield ame T(pe Length Short Tet

AAP Dictionar(

The 2 tae has the same structure as in a standard transfer

copy SAP AG BC420 12-50

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 5188

026

983209 SAP AG 1999

Read Structure

Recording

DATA BEGIN OF record data element BUKRS bukr$amp data element KTOKD ktokd$amp data element NA(EG) name$+amp data element SORT ortl$ampEND OF record-

record

Automaticall( generated

from recording

The structure of the fie is automaticay generated and is a$ays defined $ith the name amp725amp

The generated structure a$ays has the same ayout 7ach fied is defined y t$o generated ro$s

The first ro$ is a$ays a comment ro$ containing the tet J data eement and the data eement of

the screen fied from the recording In the net ro$ the fied itsef is defined $ith the name of the

data eement foo$ed y a three9digit position numer $hich specifies the ocation in the structure

The ength of the fied is set y the ength of the data eement If a fied is not defined through a data

eement the system uses the ength of the screen fied

copy SAP AG BC420 12-51

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 5288

02amp

983209 SAP AG 1999

pening and losing the 9ile

P1ltDATAS1T

LS1ltDATAS1T

FOR( oendataet USING dataet-O)EN DATASET dataet IN TET (ODE-

IF S01SUBR2 34 - 5RITE 6 te7t1e S01SUBR2-STO)-

ENDIF-

ENDFOR(-

FOR( cloedataet USING dataet-2OSE DATASET dataet-

ENDFOR(-

Include

DR16

The suroutine 5P7N3ATAS7T opens the seuentia fie

The suroutine 2+5S73ATAS7T coses the seuentia fie

copy SAP AG BC420 12-52

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 5388

02

983209 SAP AG 1999

9unction Modules for I Program

lient

Session name

Eold date

=eep session

D user name

RecordK

LI1T

BRUP

ELDDAT1

=11P

US1R

R1RD

DltP1ltBRUPDltP1ltBRUP

Transaction code

D table

TD1

DPRTA

DltIS1RTDltIS1RT

DltLS1ltBRUPDltLS1ltBRUP

pen Isessionpen Isession

Insert data for

transactions

Insert data for

transactions

lose I

session

lose I

session

The foo$ing function modues are provided for creating atch input sessions (function group

S2)

235P7N3ltamp54P

2reates a ne$ session and contains genera data for the $hoe session

23INS7ampT

Inserts a the data for a transaction into the session The transferred interna tae $ith the

structure 2ATA must contain a the data reuired for fuy processing the transaction

232+5S73ltamp54P

2oses the session after a the data has een inserted As soon as the session has een cosed it

can e processed

The interna tae $ith the structure 2ATA can ony contain atch input data for one singe

transaction run So the individua transactions are inserted into the atch input session in a oop

using severa 23INS7ampT cas

copy SAP AG BC420 12-53

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 5488

024

983209 SAP AG 2001

9unction Module DltP1ltBRUP

ALL 9UTI DltP1ltBRUPALL 9UTI DltP1ltBRUP

1PRTIB

LI1T client

BRUP session name

ELDDAT1 loc+ date

=11P delete flag

US1R bdc user name

R1RD recording

IMPRTIB

NID internal session +e(

11PTIS

1PRTIB

LI1T client

BRUP session name

ELDDAT1 loc+ date

=11P delete flag

US1R bdc user name

R1RD recording

IMPRTIB NID internal session +e(

11PTIS

-ith the function modue 235P7N3ltamp54P you can open a atch input session

The foo$ing parameters are mandatory

2+I7NT (cient)

ltamp54P (session name)

4S7amp (user name)

Note The 4S7amp must a$ays e specified This user name is reuired for processing the session

in atch mode

The foo$ing parameters are optiona

=5+AT7 specifies the eariest date on $hich the session can e started677P fag specifies $hether session shoud e deeted after it has een successfuy processed The

677P fag is ignored if the session contains errors

677P E K K means deete the session after processing (defaut vaue) H

677P E KGK means do not deete session

amp725amp E KGK ao$s you to create a recording instead of a I session

If gtI is specified the function modue returns the interna session ey This is needed to e ae to

differentiate sessions that have the same name

-ith 7G27PTI5NS you get various return vaues that can e ueried $ith SC9S4amp2

Note In onine mode the onine user is used for the authoriDation checs regardess of the user

name specified

copy SAP AG BC420 12-54

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 5588

022

983209 SAP AG 1999

Subprogram P1ltBRUP

P1ltBRUP

FOR( oen8rou-IF e9on -

2A FUN2TION BD2O)ENGROU) E)ORTING 2IENT lt1mandt GROU) 8rou USER uer KEE) kee

=ODDATE gtolddate-

ENDIF-ENDFOR(-

Include

DR16

The suprogram 5P7N3ltamp54P opens the atch input session

copy SAP AG BC420 12-55

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 5688

028

983209 SAP AG 1999

9unction Module DltIS1RT

ALL 9UTI DltIS1RTALL 9UTI DltIS1RT

IMPRT

TD1 Transaction code

PSTltLAL Update locall(

PRITIB print list

TAL1S DPRTA bdclttable

11PTIS

IMPRT

TD1 Transaction code

PSTltLAL Update locall(

PRITIB print list

TAL1S DPRTA bdclttable

11PTIS

-ith the function modue 23INS7ampT you can add transaction data to the session

Cou need an interna 2 tae to transfer the data

The foo$ing parameters are mandatory

T257 Transaction code

CNPamp5TA 2 tae

The foo$ing parameters are optiona

P5ST3+52A+ E KGK activates oca updating This means that the data to e updated is ept in the

appication server and updated in the ast step of the transaction This does not invove the update

process (For more information see course 28 Programming ataase 4pdates)

PampINTINlt E KGK 9 ists processed in I $i e printed immediatey -ith 7G27PTI5NS you get various return vaues that can e ueried $ith SC9S4amp2

copy SAP AG BC420 12-56

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 5788

023

983209 SAP AG 1999

Subprogram DltTRASATI

DltTRASATI

FOR( BD2TRANSA2TION USING tcode-

IF e9on -2A FUN2TION BD2INSERT

E)ORTING T2ODE tcode TABES D0N)ROTAB bdcdata-

ESE-

ENDIF-ENDFOR(-

T

Include

DR16

The suprogram 23TampANSA2TI5N moves the fied 2 tae either to a atch input session

or uses ca transaction to import the data into the system 5n the seection screen you can specify

$hether you $ant to create a session or you $ant to use ca transaction to process the data directy

The S7SSI5N fied is then set according to your seection

copy SAP AG BC420 12-57

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 5888

025

983209 SAP AG 1999

9unction Module DltLS1ltBRUP

ALL 9UTI DltLS1ltBRUP

11PTIS

TltP1 6

NU1U1lt1RRR amp

-ith the function modue 232+5S73ltamp54P you can cose a atch input session

In 7G27PTI5NS you get various return vaues that can e ueried $ith SC9S4amp2

copy SAP AG BC420 12-58

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 5988

027

983209 SAP AG 1999

Subprogram LS1ltBRUP

FOR( cloe8rou-IF e9on -cloe batcgt 9nut 8rou

2A FUN2TION BD22OSEGROU)-

ESE-IF e8rouoened -

2A FUN2TION BD22OSEGROU)-

ENDIF-ENDIF-

ENDFOR(-

LS1ltBRUPlose session

lose error session

Include

DR16

The suprogram 2+5S73ltamp54P coses the atch input session The suprogram differentiates

et$een a norma I session (S7SSI5N E G) and a session opened $hen ca transaction

encountered an error (73ltamp54P35P7N7 E G)

copy SAP AG BC420 12-59

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 6088

080

983209 SAP AG 1999

Subprograms DltDPRG Dlt9I1LD

DltDPR

Dlt9I1LD

FOR( bdc9eld USING nam al-IF al 34 nodata-2EAR bdcdata- bdcdata1nam nam- bdcdata1al al- A))END bdcdata-ENDIF-

ENDFOR(-

FOR( bdcdltnro USING ro8ram dltnro- 2EAR bdcdata-Bdcdata1ro8ram ro8ram-Bdcdata1dltnro dltnro-Bdcdata1dltnbe89n - A))END bdcdata-ENDFOR(-

Include

DR16

The incude 2amp72GG contains t$o suprograms 23CNPamp5 and 23FI7+

Suprogram 23CNPamp5 fis the 2 tae $ith program names and screen numers

Suprogram 23FI7+ fis the 2 tae $ith fied names and vaues

7ach suprogram creates an entry in the 2 tae

copy SAP AG BC420 12-60

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 6188

086

983209 SAP AG 1999

9illing the D Table

erorm bdcdltnro u9n8 SA)(FD +- erorm bdc9eld u9n8 BD22URSOR RFD1BUKRS- erorm bdc9eld u9n8 BD2OK2ODE 6- erorm bdc9eld u9n8 RFD1BUKRS record1BUKRS- erorm bdc9eld u9n8 RFD1KTOKD record1KTOKD-

erorm bdcdltnro u9n8 SA)(FD -

erorm bdc9eld u9n8 BD22URSOR KNA1S)RAS- erorm bdc9eld u9n8 BD2OK2ODE 6- erorm bdc9eld u9n8 KNA1NA(E record1NA(E-

erorm bdc9eld u9n8 KNA1SORT record1SORT-

Recording Benerated automaticall(

from the recording

)ERFOR( bdcdltnro USING SA)(FD +- )ERFOR( bdc9eld USING BD22URSOR RFD1BUKRS-)ERFOR( bdc9eld USING BD2OK2ODE 6-)ERFOR( bdc9eld USING RFD1BUKRS record1BUKRS-)ERFOR( bdc9eld USING RFD1KTOKD record1KTOKD-

)ERFOR( bdcdltnro USING SA)(FD -

)ERFOR( bdc9eld USING BD22URSOR KNA1S)RAS-)ERFOR( bdc9eld USING BD2OK2ODE 6-)ERFOR( bdc9eld USING KNA1NA(E record1NA(E-

)ERFOR( bdc9eld USING KNA1SORT record1SORT- ---

The 2 tae is fied $ith data from the recording The suroutines 23CNPamp5 and

23FI7+ are used for this

The suroutines are caed in the reuired structure or seuence

copy SAP AG BC420 12-61

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 6288

08amp

983209 SAP AG 1999

erie)

SAPDatabase

SeJuential9ile

SAPDatabase

ALL TRASATIALL TRASATI

SeJuential9ile

ATE IPUTATE IPUT

D TableD TableD TableD Table

I Monitor

T

In contrast to atch input you can use ca transaction to directy pass data to the diaog interface

$ithout using a atch input session Cou use an interna tae (2 tae same structure and ayout

as atch input) to temporariy store your screen data Then you ca the desired transaction in your

program

Note 5n average the 2a Transaction method is 8 to times faster than using atch Input

copy SAP AG BC420 12-62

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 6388

08

983209 SAP AG 1999

all Transaction Program$ 1ample

RE)ORT abcbdcdcdeb9ct-

)ARA(ETERS d9mode DEFAUT A

udmode DEFAUT S-FOR( calltranact9on-2A TRANSA2TION FD

USING bdcdata (ODE d9mode

U)DATE udmode-

IF lt1ubrc NE - 5RITE 6 ---

ENDIF-ENDFOR(-

Screen

00

Screen

100

Screen

An additiona system ro area is added for the caed transaction The system uses this area for

processing the individua screens in the transactionH the data from the tae is added here After the

transaction is processed the second ro area is reeasedH the system continues processing in the first

ro area

Notes

In contrast to atch input there is no error ogging (error sessions) here For processing the caed

transaction the system uses the authoriDations of the user that caed the transaction The 2 tae

can ony hod data for one transaction run at a time efore another transaction is caed and its data

can e added you must eecute a amp7Famp7S= for the 2 tae

copy SAP AG BC420 12-63

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 6488

084

983209 SAP AG 1999

ALL TRASATI C6

RE)ORT 777-

2A TRANSA2TION FD USING bdcdata (ODE E-

Default for MD1 is A

2A TRANSA2TION 3tranact9oncode4 USING 3bdc1table4 C (ODE A E N C-

-ith the parameter 57 you can seect a specific dispay mode for processing the transaction The

foo$ing three modes are avaiae

A (ispay a)

If you eecute the program a the screens and a their data are dispayed This is the defaut vaue

for the 57 in 2A++ TampANSA2TI5N

N (ispay nothing)

The screens are not dispayed at a regardess of $hether any of them contained errors As soon as

the transaction has een fuy processed contro is returned to your program (The vaue of the

parameter 4PAT7 determines $hether dataase updates are eecuted or not)

7 (ispay errors ony)As soon as an error occurs in a screen the transaction is s$itched to dispay mode so that you can

correct the errors

These dispay modes are the same as those in the atch input session processing

copy SAP AG BC420 12-64

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 6588

082

983209 SAP AG 1999

RE)ORT 777-

2A TRANSA2TION FD USING BD2DATA U)DATE -

ALL TRASATI Camp

RE)ORT 777-

2A TRANSA2TION FD USING bdcdata U)DATE -

2A TRANSA2TION 3tranact9oncode4 USING 3bdc1table4 C (ODE A E N C U)DATE A S C -

Default for UPDAT1 is A

-ith the parameter 4PAT7 you can contro ho$ dataase updates arising from a transaction are

carried out There are three options

A (asynchronous updating) The caed transaction does not $ait unti the dataase has een

updated it simpy for$ard the updates to the SAP update service This usuay speeds up the 2T

program This processing mode is N5T recommended for arge data sets as the caed transaction

does not receive a competion message from the update modue

The caing 2T program therefore cannot te if the transaction has een successfuy competed Cou

shoud use the updating administration function (transaction S8) to determine $hether updating

$as terminated eary The error anaysis correction functions for are ess hepfu than $ith

synchronous updating

S (synchronous updating) -ith synchronous updating the caed transaction $aits unti a the

updates have een competed So processing is so$er than $ith synchronous updating The caed

transaction can ho$ever report any updating errors to the program $hich maes error

anaysiscorrection easier

+ (local updating) $ith oca updating the dataase is not updated in a separate process it is

updated in the caers process (see appication hep documentation for the AAP ey$ord S7T

4PAT7 TAS6 +52A+)

copy SAP AG BC420 12-65

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 6688

088

983209 SAP AG 1999

ALL TRASATI C

RE)ORT 777-DATA mtab T0)E TABE OF bdcm8coll-

2A TRANSA2TION FD USING bdcdata (ESSAGES INTO mtab-

2A TRANSA2TION 3tranact9oncode4 USING 3bdc1table4 C (ODE A E N C U)DATE A S C (ESSAGES INTO 3metab4 C -

7SSAlt7S specifies that a system messages that are output during the eecution of a 2A++

TampANSA2TI5N are $ritten to the interna tae L7SSTA The interna tae must have the

structure 2Slt25++

4nie the cassica atch input processing $ith sessions 2A++ TampANSA2TI5N does not offer any

specia processing procedures for transactions containing errors There are no restart functions for

transactions that contain errors or that cause updating terminations

copy SAP AG BC420 12-66

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 6788

083

983209 SAP AG 1999

ALL TRASATI C4

RE)ORT 777-DATA mltot T0)E ctuaram-

2A TRANSA2TION FD USING BD2DATA

O)TIONS FRO( mltot-

2A TRANSA2TION 3tranact9oncode4 USING 3bdc1table4 C (ODE A E N C U)DATE A S C (ESSAGES INTO 3metab4 C O)TIONS FRO( ot C -

RE)ORT 777-DATA mltot T0)E ctuaram-2A TRANSA2TION FD USING bdcdata

O)TIONS FRO( mltot-

The addition 5PTI5NS enaes the ca transaction statement to e controed through a structure

The structure must have the dictionary type 2T43PAampAS

The addition 5PTI5NS Famp5 must not e comined either $ith the addition 57 or $ith

4PAT7 ore information on the net side

copy SAP AG BC420 12-67

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 6888

085

983209 SAP AG 1999

Structure TUltPARAMS

DISMD1 Procen mode anaoo o addon amp

UPDMD1 $pdae mode anaoo o addon $PA

ATTMD1 CA mode CA conro

D19SI1 orce de=a EndoE e drn procen

RAMMIT +o eD a Camp amp(

IPT +o a ac np eonF a F S-B+P SPAC

I1D +o a ac np eon a=er end o= BC daa

The components are defined as foo$s

The components 7FSIM7 ampA25IT N5INPT and N5I7N can have the foo$ing

vaues KGK E Ces or K K E No

If the addition 5PTI5NS Famp5 is not specified the foo$ing settings appy to the contro

parameters

IS57 from addition 57

4P57 from addition 4PAT7

2ATT57 2ATT not active

7FSIM7 o not not use defaut $indo$s siDe

ampA25IT Successfu eit at 25IT -5amp6

N5INPT atch input session active (SC9INPT E G)

N5I7N atch input session sti active after end of 2 data

copy SAP AG BC420 12-68

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 6988

087

983209 SAP AG 1999

SMSBID Message ID

SMSBT Message T(pe C1GIGWGSGA

SMSB Message umber

SMSB6 Message ariable 6

SMSBamp Message ariable amp

SMSB Message ariable

SMSB4 Message ariable 4

SMSBID Message ID

SMSBT Message T(pe C1GIGWGSGA

SMSB Message umber

SMSB6 Message ariable 6

SMSBamp Message ariable amp

SMSB Message ariable

SMSB4 Message ariable 4

Return code$

S(stem fields$

alue Meaning

0 Successful

6000 1rror in transaction

6000 1rror in processing call transaction

see also the s(stem fields specified

alue Meaning

0 Successful

6000 1rror in transaction

6000 1rror in processing call transaction

see also the s(stem fields specified

9ield name Meaning9ield name9ield name MeaningMeaning

Return ode and S(stem 9ields

The return code is used to specify $hether the caed transaction $as processed successfuy In

addition severa system fieds are fied The numer I type and variaes of the diaog message

output y the caed transaction Cou need this information to output the message tet

copy SAP AG BC420 12-69

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 7088

030

983209 SAP AG 1999

Benerated Program of the TA Recorder

REFRES= (ESSTAB-

2A TRANSA2TION tcode USING bdcdata (ODE ctumode U)DATE cudate (ESSAGES INTO metab-OO) AT metab- ENDOO)-IF lubrc 34 AND e8rou 34 S)A2E- IF e8rouoenend - 2A FUN2TION BD2O)ENGROU) E)ORTING ---------

--------- E8rouoened - ENDIF- 2A FUN2TION BD2INSERT E)ORTING T2ODE tcode TABES D0N)ROTAB bdcdata-ENDIF-REFRES= bdcdata-

Message table output

pen error session

Insert data record that

has errors into error

session

If you have seected ca transaction on the seection screen the generated program runs as foo$s

The onine transaction is caed $ith ca transaction and passed to tae 2ATA A the

messages arising during the ca transaction are put in the interna tae 7SSTA

7SSTA is output as a ist

If you have specified an error session ( 73ltamp54P L SPA27) on the seection screen and the

ca transaction comes across an error (+3S4amp2 L 0) the error session is opened The error

session is ho$ever ony opened once Then the data record is paced in the session

A the other data records that have errors $ith ca transaction are paced in the same session

copy SAP AG BC420 12-70

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 7188

036

983209 SAP AG 1999

The Transaction Recorder

PrinciplesPrinciples

Recording )ith the LSMWRecording )ith the LSMW

Principles of atch Input and all TransactionPrinciples of atch Input and all Transaction

Integrating the TA Program into the DWIntegrating the TA Program into the DW

Using the TA Recorder Using the TA Recorder

copy SAP AG BC420 12-71

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 7288

03amp

983209 SAP AG 1999

Integrating into the DW

Transfer program

AAP Dictionar(

Integrate

SDA0

SDA6

SDAamp

SDA

Cou can integrate the generated program into the G9- The structure of the fie must e created

in the AAP ictionary The taes SGA0 SGA8 SGA1 and SGA $i e fied

copy SAP AG BC420 12-72

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 7388

03

983209 SAP AG 1999

DW Release 42

Goo

-B eeae 45

aa ran=er ogtec

Int customer data transfer ob-ect

ecord =ed

Dece daa ran=er

d Goo

The ampunction ampor interatin TA recorder prora$s is

i$ple$ented in the

D+-B in Release

The recorder can e integrated as of ampeease and it is provided in the G9- ampeease

ltot to the G9- ampeease 5n the initia screen you can integrate programs y choosing ampoto

( +nt customer ata transfer o-ect

copy SAP AG BC420 12-73

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 7488

034

983209 SAP AG 1999

reating Program as D b-ect

Comer ran=er ogtec

ampgtec ype

Sor eD =or ogtec

aa ran=er proram

Srcre name

9900

(+A1

Cane comer

ZBCA+G

ZB

ustomer transfer ob-ect

umber bet)een 7000 and 7777

b-ect t(pe

Assignment to R ob-ect

Short tet for D ob-ectShort description

Data transfer program

ame of generated program

Structure name

A structure Cstructure la(out )ith this name is created in

the AAP Dictionar(

For ampeease transfer oects $ere not organiDed y 5amp oects ut y a G numer (00089

OOOO) The numer range O0009OOOO is reserved for customers

To create a connection to the ne$ G 9- you must assign the program to a 5amp oect

2reate a short tet for the G oect This tet $i appear in the method seection ist

Specify the program to e incuded

Specify a name for the structure to e created in the AAP ictionary

Note $he generated program appears under program type +N and not under program type

-

copy SAP AG BC420 12-74

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 7588

032

983209 SAP AG 1999

Adantages

Automatic program registration in the DW in

Release 48

ou can use all the functions defined for

standard ob-ects

1ception$ The (reate ampile ith data

function

If you incuded the oect in the ampeease $orench it is automaticay avaiae in the ampeease

B $orench

A the $orench functions are avaiae for your oect ecept for Create files ith transfer ata

copy SAP AG BC420 12-75

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 7688

038

983209 SAP AG 1999

ou are no) able to$

The Transaction Recorder$ Unit Summar(

Use the recording function in the LSMW to create

a batch input session )ith the data from the

eternal s(stem

Use the TA Recorder to create (our o)n data

transfer program

Anal(e programs that )or+ )ith batch input or

call transaction

Integrate the TA Recorder programs into the

DW

copy SAP AG BC420 12-76

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 7788

ercise 1

nit $ -ecorder

$opic 2reating etors

$ransaction -ecorder ercise 1

bull 2reating detors $ith eterna numer assignment

bull etor numers M9980008 to M9980080

Address data for detors $ith eterna numer assignment is to

e transferred using program ampFI700

ro4ect F5

Supro4ect +5

-un +575

$as)s 85 95 8S25

9oad program -F+00

8 In the foo$ing eercises eisting data is to e changed Therefore these detors $ith

eterna numer assignment have to first e created

898 4nder suproect 79 create run 797G9 $ith the name Detors ith

eternal numers

copy SAP AG BC420 12-77

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 7888

891 2reate the foo$ing three tass The tass map the foo$ing process steps

convert data create + session and process + session

89198 In run 797G9 create the foo$ing tas

9 Tas AP9

9 Name 2onvert data 9 Tas type AP

9 Program type +S-

Seect the foo$ing +S- oect

+S- proect 2109

+S- suproect 7I9

+S- oect I997GT

89191 In run 797G9 create the foo$ing tas 9 Tas +5A9

9 Name 2reate I session

Tas type +5A

9 Program type INP

Seect program ampFI700 $ith the variant

I97G9

8919 In run 797G9 create the foo$ing tas

9 Tas S29

9 Name Process I session Tas type S2

9 Program type amp7P5

Seect program ampS2S4 $ith the variant

S497G9

Note that you have to correct the seuence of the tass 2onvert data

create + session and process + session

4se the uttons

89 Start the run

The detors $i e created $ith eterna numer assignments

89 2hec in transaction F0 that the detors M9980008 to M9980080 have een

created

copy SAP AG BC420 12-78

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 7988

ercise

nit $ransaction -ecorder

$opic -ecording function in the 9S8(

bull 2reate a recording using the +S-

bull ltenerate a atch input session

2hange the detor address data in the amp System

Name of the recording +

Name of the file +2055+F9

8 2reate the recording 7I3 using the +S- ampecord the transaction F01 (2hange

detor)

898 efore you create the recording first test the transaction onineQ

For the recording use detor M9980008 5n the initia screen of the F01

maintain the foo$ing fieds ony

etor etor M9980008

2ompany code 0008

Address data seect

Note $he data record must e saved hile recording

891 aintain the names and the descriptions for the foo$ing fieds

Name city street posta code and teephone numereete a other fieds in screen 880 from the recording (eg S5ampT+ +AN8

SPampAS)

4se the same technica names as sho$n in the tae eo$ (automatic fied

mapping)

copy SAP AG BC420 12-79

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 8088

1 2reate the suproect 7I9 and the ne$ oect TA3 in your proect 2109

aintain the oect attriutes and seect the item atch input recording Seect your

recording 7I3

2reate the source structure address

2reate the source fieds according to the tae eo$ 5r copy them from proect 2109S37N suproect 7I900 oect TA900

198 Fie setup The data from the egacy system are dispayed in the foo$ing tae

Fied name Fied type Fied ength escription

N5 2 8B etor numer

NA7 2 Name

STamp77T 2 Street

2ITC 2 2ityPace of residence

MIP 2 80 Posta code

T7+ 2 8B Teephone numer

191 aintain the fied mapping 4se the automatic fied mapping (via menu item

7tras)

19 Specify the fies 5ny maintain the fie name of the source fie

Name of the fie 21099IFI+7

2odepage 8800

19 Import the data and convert them ispay the data in each caseQ

19 2reate a atch input session

19B ampun the atch input session

copy SAP AG BC420 12-80

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 8188

ercise 3

nit $ransaction -ecorder

$opic -ecording ith the $ -ecorder

bull ltenerate a recording using the TA recorder

bull Test the recording

2hange the address data of detors in the amp system

Name recording $+

Name of the file +2055+F9

8 2reate the recording TA37I3 using the transaction recorder ampecord the

transaction F01 (change detor)

898 4se detor M9980008 for the recording 5n the F01 initia screen ony

maintain the foo$ing fieds

etor etor M9980008

2ompany 2ode 0008

Address data seect

Note $he data record must e saved hen recording

eete a fieds that do not eist in the source fie 21099IFI+7 from screen

880 in the recording (eg 6NA89S5ampT+ 6NA89+AN8 6ANNQ9SPampAS) Note o not deete fieds ampF01946ampS and ampF0190880

Save the recording no$

1 S$itch to the recordings overvie$

198 Process the recording $ith the processing mode A (dispay a)

191 Process the recording $ith the processing mode RN (no dispay)

19 If the recording has een tested and no error has occurred generate a I session

and run it using the I monitor If an error shoud occur generate the recordingagainQ

copy SAP AG BC420 12-81

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 8288

From the recording generate the program M21037I3 in your deveopment cass

2109 Seect the foo$ing

bull ampead fied contents from fie

bull 2reate test data in the fie 2103dei3test3tt

98 Save this program and eecute it ltenerate one I session each and process it

2arry out the same steps again using the ca transaction

The generated program shoud no$ e changed so that fie 21099IFI+7 can e

read and processed

98 2hange the defaut vaue of the fie name (parameter dataset) in 21099

IFI+7

91 2hange the structure definition eete the company code fied and the address

data checo from the structure

9 2hange the su9routine ca perform dc3fied for the company code (KampF019

46ampSK) so that the vaue 0008 is transferred

9 2hange the su9routine ca perform dc3fied for the address data checo

(KampF0190880K) so that the vaue G is transferred

9 Start the program again and read the data from the fie 21099IFI+7 $ith

detor data ltenerate a I session $ith it and run it

copy SAP AG BC420 12-82

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 8388

033 Include DR16INCLUDE BDCRECX1

SELECTION-SCREEN BEGIN OF LINE

PARAMETERS SESSION RADIOBUTTON GROUP CTU create sessi SELECTION-SCREEN COMMENT $amp TEXT-S FOR FIELD SESSION

se(ecti-scree )siti +

PARAMETERS CTU RADIOBUTTON GROUP CTU ca(( trasacti

SELECTION-SCREEN COMMENT $amp TEXT-S FOR FIELD CTU

SELECTION-SCREEN END OF LINE

SELECTION-SCREEN BEGIN OF LINE

SELECTION-SCREEN COMMENT $amp TEXT-S1 FOR FIELD GROUP

se(ecti-scree )siti $+

PARAMETERS GROUP1$amp r) ae 0 sessi

SELECTION-SCREEN COMMENT $amp TEXT-S+ FOR FIELD CTUMODE

se(ecti-scree )siti

PARAMETERS CTUMODE LIE CTU2PARAMS-DISMODE DEFAULT 3N3

A4 s56 a(( 78)rs

E4 s56 78)r errr (8

N4 7 t 7is)(a8 78)r

SELECTION-SCREEN END OF LINE

SELECTION-SCREEN BEGIN OF LINE

SELECTION-SCREEN COMMENT $amp TEXT-S$ FOR FIELD USER

se(ecti-scree )siti $+

PARAMETERS4 USER1$amp DEFAULT S9-UNAME ser 0r sessi i atc5

SELECTION-SCREEN COMMENT $amp TEXT-S FOR FIELD CUPDATE

se(ecti-scree )siti

PARAMETERS CUPDATE LIE CTU2PARAMS-UPDMODE DEFAULT 3L3

S4 s8c5rs(8

A4 as8c5rs(8

L4 (ca(

SELECTION-SCREEN END OF LINE

SELECTION-SCREEN BEGIN OF LINE

SELECTION-SCREEN COMMENT $amp TEXT-S FOR FIELD EEP

se(ecti-scree )siti $+

PARAMETERS4 EEP AS CltECBOX 3 3 = 7e(ete sessi i0 0iis5e7

3X3 = gtee) sessi i0 0iis5e7

SELECTION-SCREEN COMMENT $amp TEXT-S FOR FIELD E2GROUP

copy SAP AG BC420 12-83

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 8488

se(ecti-scree )siti

)araeters E2GROUP1$amp r) ae 0 errr-sessi

SELECTION-SCREEN END OF LINE

SELECTION-SCREEN BEGIN OF LINE

SELECTION-SCREEN COMMENT $amp TEXT-S FOR FIELD ltOLDDATE

se(ecti-scree )siti $+

PARAMETERS4 ltOLDDATE LIE S9-DATUM

SELECTION-SCREEN COMMENT +11amp TEXT-S$ FOR FIELD E2USER

se(ecti-scree )siti

PARAMETERS4 E2USER1$amp DEFAULT S9-UNAME ser 0r errr-sessi

SELECTION-SCREEN END OF LINE

SELECTION-SCREEN BEGIN OF LINE

SELECTION-SCREEN COMMENT +11amp TEXT-S FOR FIELD E2EEP

se(ecti-scree )siti

PARAMETERS4 E2EEP AS CltECBOX 3 3 = 7e(ete sessi i0 0iis5e7

3X3 = gtee) sessi i0 0iis5e7

SELECTION-SCREEN END OF LINE

SELECTION-SCREEN BEGIN OF LINE

SELECTION-SCREEN COMMENT +11amp TEXT-S FOR FIELD E2ltDATE

se(ecti-scree )siti

PARAMETERS4 E2ltDATE LIE S9-DATUM

SELECTION-SCREEN END OF LINE

SELECTION-SCREEN SIP

SELECTION-SCREEN BEGIN OF LINE

SELECTION-SCREEN COMMENT 1amp TEXT-S1 FOR FIELD NODATA

PARAMETERS4 NODATA DEFAULT 33 LOER CASE 7ata

SELECTION-SCREEN END OF LINE

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

Batc5i)t7ata 0 si(e trasacti

DATA4 BDCDATA LIE BDCDATA OCCURS ITlt ltEADER LINE

essaes 0 ca(( trasacti

DATA4 MESSTAB LIE BDCMSGCOLL OCCURS ITlt ltEADER LINE

errr sessi )ee7 3 3 r 3X3amp

DATA4 E2GROUP2OPENED

essae tets

TABLES4 T1

copy SAP AG BC420 12-84

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 8588

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

at se(ecti scree

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

AT SELECTION-SCREEN

r) a7 ser st e 0i((e7 0r create sessi

IF SESSION = 3X3 AND

GROUP = SPACE OR USER = SPACE

MESSAGE E1MSamp

ENDIF

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

)e 7ataset

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

FORM OPEN2DATASET USING P2DATASET

OPEN DATASET P2DATASET IN TEXT MODE

IF S9-SUBRC

RITE4 TEXT-E S9-SUBRC

STOP

ENDIF

ENDFORM

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

c(se 7ataset

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

FORM CLOSE2DATASET USING P2DATASET

CLOSE DATASET P2DATASET

ENDFORM

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

create atc5i)t sessi

t 0r ca(( trasacti siamp

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

FORM OPEN2GROUP

IF SESSION = 3X3

SIP

RITE4 $amp 3Create r)3I1amp GROUP

SIP

)e atc5i)t r)

CALL FUNCTION 3BDC2OPEN2GROUP3

EXPORTING CLIENT = S9-MANDT

copy SAP AG BC420 12-85

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 8688

GROUP = GROUP

USER = USER

EEP = EEP

ltOLDDATE = ltOLDDATE

RITE4 amp 3BDC2OPEN2GROUP3I$amp

1$amp 3retrc7e43I+amp

S9-SUBRC

ENDIF

ENDFORM

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

e7 atc5i)t sessi

ca(( trasacti si4 errr sessiamp

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

FORM CLOSE2GROUP

IF SESSION = 3X3

c(se atc5i)t r)

CALL FUNCTION 3BDC2CLOSE2GROUP3

RITE4 amp 3BDC2CLOSE2GROUP3Iamp

1$amp 3retrc7e43I+amp

S9-SUBRC

ELSE

IF E2GROUP2OPENED = 3X3

CALL FUNCTION 3BDC2CLOSE2GROUP3

RITE4

RITE4 amp 3Fe5(era))e 6r7e eret3Iamp

ENDIF

ENDIF

ENDFORM

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

Start e6 trasacti accr7i t )araeters

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

FORM BDC2TRANSACTION USING TCODE

DATA4 L2MSTRINGamp

DATA4 L2SUBRC LIE S9-SUBRC

atc5 i)t sessi

IF SESSION = 3X3

CALL FUNCTION 3BDC2INSERT3

EXPORTING TCODE = TCODE

TABLES D9NPROTAB = BDCDATA

RITE4 3BDC2INSERT3Iamp

copy SAP AG BC420 12-86

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 8788

TCODE

3retrc7e43I+amp

S9-SUBRC

3RECORD43

S9-INDEX

ca(( trasacti si

ELSE

REFRESlt MESSTAB

CALL TRANSACTION TCODE USING BDCDATA

MODE CTUMODE

UPDATE CUPDATE

MESSAGES INTO MESSTAB

L2SUBRC = S9-SUBRC

RITE4 3CALL2TRANSACTION3

TCODE

3retrc7e43I+amp

L2SUBRC

3RECORD43

S9-INDEX

LOOP AT MESSTAB

SELECT SINGLE FROM T1 ltERE SPRSL = MESSTAB-MSGSPRA

AND ARBGB = MESSTAB-MSGID

AND MSGNR = MESSTAB-MSGNR

IF S9-SUBRC =

L2MSTRING = T1-TEXT

IF L2MSTRING CS 313

REPLACE 313 ITlt MESSTAB-MSGH1 INTO L2MSTRING

REPLACE 3$3 ITlt MESSTAB-MSGH$ INTO L2MSTRING

REPLACE 33 ITlt MESSTAB-MSGH INTO L2MSTRING

REPLACE 33 ITlt MESSTAB-MSGH INTO L2MSTRING

ELSE

REPLACE 33 ITlt MESSTAB-MSGH1 INTO L2MSTRING

REPLACE 33 ITlt MESSTAB-MSGH$ INTO L2MSTRING

REPLACE 33 ITlt MESSTAB-MSGH INTO L2MSTRING

REPLACE 33 ITlt MESSTAB-MSGH INTO L2MSTRING

ENDIF

CONDENSE L2MSTRING

RITE4 MESSTAB-MSGT9P L2MSTRING$+amp

ELSE

RITE4 MESSTAB

ENDIF

ENDLOOP

copy SAP AG BC420 12-87

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 8888

SIP

Eree 0e5(era))e

IF L2SUBRC AND E2GROUP SPACE

IF E2GROUP2OPENED = 3 3

CALL FUNCTION 3BDC2OPEN2GROUP3

EXPORTING CLIENT = S9-MANDT

GROUP = E2GROUP

USER = E2USER

EEP = E2EEP

ltOLDDATE = E2ltDATE

E2GROUP2OPENED = 3X3

ENDIF

CALL FUNCTION 3BDC2INSERT3

EXPORTING TCODE = TCODE

TABLES D9NPROTAB = BDCDATA

ENDIF

ENDIF

REFRESlt BDCDATA

ENDFORM

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

Start e6 scree

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

FORM BDC2D9NPRO USING PROGRAM D9NPRO

CLEAR BDCDATA

BDCDATA-PROGRAM = PROGRAM

BDCDATA-D9NPRO = D9NPRO

BDCDATA-D9NBEGIN = 3X3

APPEND BDCDATA

ENDFORM

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

Isert 0ie(7

Page 29: BC420_46C - 012The Transaction Recorder

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 2988

0amp7

983209 SAP AG 2001

hange Debitor$ Pa(ment Transactions C6

Banlt dea

Screen

10

9ield ontent

BCC$Samp (+B(-BA+(+01

BCamp(Camp BA+((+B(-BA+(S01

(+B(-BA+(01 12345679

(+B(-BA+(+01 22222222

Debitor 5560000

9ield ame

Inde

copy SAP AG BC420 12-29

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 3088

00

983209 SAP AG 1999

hanging ustomer Data$ Pa(ment Transactions Camp

Addre

an+ countr( US

an+ code 6amp42837

Banlt dea

ustomer 5560000

9ield ontents9ield ame

BCC$Samp (+A1-(+ZA

BCamp(Camp $PA

(+B(-Z01

Screen

10

Screen

100

SAPLBA

9ield ontents

BCC$Samp B+(A-BA+(A

BCamp(Camp +

B+(A-BA+(A +aona Banlt

9ield ame

In different transactions the modue poo may change This is the case $ith for eampe customer

master data The TA recorder records modue poo changes automaticay

copy SAP AG BC420 12-30

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 3188

06

983209 SAP AG 1999

Eierarch( Displa( of the Recording

02amp

02

SAP02 0106

BCC$Samp 02-0130

BCamp(Camp )00

02-($++ -88-10000

02-0110

02-0130

SAP02 0111

BCamp(Camp V

BCC$Samp A1AA-amp$S+$1

A1AA-S Garden Sree

Recording

-ith the TA recorder the resuts are aso a ist in a hierarchy dispay =o$ever you cannot assign

your o$n fied names as you can in the +S-

copy SAP AG BC420 12-31

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 3288

0amp

983209 SAP AG 1999

Recording erie)

Recording

Transfer program

9unction module

ontains onl( the data

from the recording

Test data

Test

reate

reate

reate

reate

1dit hange recording

Process recording

Cou can edit the recording as needed

The recording can e tested and eecuted again The screens are run through in the same $ay as in

the recording

The recording can then e used to create

atch input sessions

Test data

ata transfer programs $ith atch input or ca transaction

Function modues

copy SAP AG BC420 12-32

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 3388

0

983209 SAP AG 1999

1 02 BS

2 SAP02 106

3 BCC$Samp $SZAV

4 BCamp(Camp )00 5 02-($++ -88-10000

6 02-0110

7 02-0130

8 $SZAV

9 SAP02 111

10 BCamp(Camp V

11 BCC$Samp A1AA-amp$S+$1

12 A1AA-S Garden Sree

Program Screen St 9ield ame 9ield alue

Recording 1ditor

Recording

Add gt delete lines 9ormat chec+

Import gt eport of recording

In the editor you can add or deete ines Cou can aso change the contents of individua ines

-ith the function Chec) you can specify $hether the edited version of the recording sti has the

correct synta

Cou can aso eport import recordings to from a seuentia fie

After editing save the recording changes

copy SAP AG BC420 12-33

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 3488

04

983209 SAP AG 1999

Recording Seeral Transaction Runs

RecordingF

Directl( after the first recordingG or

In the displa( mode of the recording

In this step you can record additiona transactions and add additiona transaction runs to the

recording

Cou can record the additiona transactions directy after a recording or in the edit screen of a

recording

copy SAP AG BC420 12-34

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 3588

02

983209 SAP AG 1999

1ditor$ Importing and 1porting Recordings

6 T 9D0amp S

amp SAPM90ampD 608

DltURSR

4

2

8 SAPM90ampD 666

60

66

Program Screen St 9ield name 9ield alue

cempA

e name

aa =orma

cemp

A

e name

aa =orma

1port

Import

Presentation Serer

If the editor functions in the systems do not provide a the functions you need you can do$noad the

recording to your presentation server using the Eort function and then edit the recording using a

P2 editor

Cou use the Import function to import the data ac into the amp System ae sure the fie is sti in

the correct format

copy SAP AG BC420 12-35

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 3688

08

983209 SAP AG 1999

Processing the Recording

Recording

Process )ith ALL TRASATI

Parameer

Proce mode$pdae mode

CA mode

e=a e

Con a=er comm

+o a B eon

nd +o a B mode

A

A

T

The recording can e eecuted directy The data from the recording is used and the transaction is

processed $ith ca transaction

2a transaction provides a range of options for caing appication transactions $hich are discussed

on the foo$ing t$o pages

copy SAP AG BC420 12-36

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 3788

03

983209 SAP AG 1999

Process mode

Update mode

ATT mode

Processing Recording )ith T 6

A

1

Displa( all screens

Displa( errors onl(

o displa(

L

S

A

Local

S(nchronous

As(nchronous

A

o ATT

ATT )ithout indiidual screen control

ATT )ith indiidual screen control

Processing mode

=ere you can specify the processing mode 9 it is the same as the processing mode for atch input

4pdate mode

=ere you can specify the update mode For more information see the unit ca transaction

2ATT mode

=ere you can mae specia settings if you $ant to test the recording under 2ATT conditions (ony

necessary for 2ATT runs) Specia functions are caed in the 2ATT too for each screen at the end of

P5 and at the start of PAI

copy SAP AG BC420 12-37

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 3888

05

983209 SAP AG 1999

Default sie

ont after commit

ot a I session

1nd$ ot a I mode

Processing Recording )ith T amp

The screen standard sie is used for the

processing

ommit )or+ does not end the processing

o I mode is actie The transaction )ill run

through as in online

I mode is selected nce the data in the D

table is processedG the I mode is set to inactie

Standard siDe

If you seect this the screens are processed in the standard siDe in the foreground (in foreground or

dispay errors ony) Note the standard siDe is a$ays used for acground processing

Further after commit

The first commit $or in a transaction does not ead to the end of the recording

Note A atch input transaction is ended $ith the first commit $or

No I mode

The system fied SC9INPT is not set (SC9INPT E ) So transactions are run through as in onine

7nd No I mode

5ny use if you choose the processing mode 7 (dispay errors ony) Then the transaction is processed in the acground in atch input mode and if there is an error the screens run through in

the foreground

copy SAP AG BC420 12-38

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 3988

07

983209 SAP AG 1999

I Mode

atch input

mode

nline

Some transactions behae differentl( in batch input mode

than in online Cbatch input capabilit(

atch input mode sets the s(stem field SIPT H

Not every transaction can run the same onine and in atch input mode The transaction must decide

itsef $hether it is caed onine or in atch input mode

The system sets the system fied SC9INPT E G if the atch input mode is active (this aso appies

to ca transaction) From this system fied the transaction can identify $hether to run onine or in

atch input mode

copy SAP AG BC420 12-39

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 4088

040

983209 SAP AG 1999

reating a Session 9rom the Recording

Recordingnl( contains the data

from the recording

Seon name 02amp

Aoraon ampBS(eep eon

oclt dae 10102000

Cou can create a atch input session directy from the recording that you can then process using the

atch input monitor

copy SAP AG BC420 12-40

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 4188

046

983209 SAP AG 1999

reating Test Data

Test Data

Recording

ranranpBC420AAe name

The file onl( contains the data from the recording

Rgt

Application Serer

Structure

Cou can create a fie from the recordingH the fie $i contain a the fieds from the recording The

fieds are added to the fie $ith the ength you specified in the definition

The fied order corresponds to the order in the recording overvie$ Technica fieds

(2356257 2324ampS5amp and so on) are incuded

The data can ony e stored on the appication server If you do not specify a path the fie is stored in

the $or directory of the appication server

If the specified test fie aready eists the ne$ data record is added to this fie

copy SAP AG BC420 12-41

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 4288

04amp

983209 SAP AG 1999

ed conen

reating a Program

Recording

ZBC420ampProram name

Transfer Program

e daa

ead =rom =e

ran=er =rom recordn

reate

9ile nameTest data

ranranpBC420AA

Cou can generate a program from the recording

In the foo$ing diaog o enter a program name In addition you can choose the type and method

for fiing the maintained fied contents from the recorded screens

4se the vaues used for the recording If you reuire feie data transfer you $i have to modify

this program ater

ParameteriDe the input vaues and read these vaues from a fie A data structure is created for

parameteriDationH the data records are read from an eterna fie into this data structure The

program assumes the fie $as taiored to this data structure

If you have decided to parameteriDe the input vaues you shoud aso create a test fie during

generation To do this seect the checo and enter a name for the fie

The attriute maintenance screen of the AAP editor appears aintain the attriutes and save the

program

copy SAP AG BC420 12-42

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 4388

04

983209 SAP AG 1999

Program 9unctions

Online

transaction

Transfer program

To

error

1rror

ption 6ption ampFlat SAP

structure

Monitor

Cou have no$ generated a data transfer program for importing data into the amp System The

program can eecute the data transfer using atch input or ca transaction

If you choose option 1 and there is an error the data record is paced into a atch input session

copy SAP AG BC420 12-43

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 4488

044

983209 SAP AG 1999

Benerating 9unction Modules

Recording

Zcreaedeor ncon mode

ncon rop

Sor eD

ZBC420

Creae comer

9unction module

nl( one data record can be processed at a time

In the net diaog o you can generate a function modue a function group and short tet from the

recording The function modue is automaticay created in the function group

copy SAP AG BC420 12-44

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 4588

042

983209 SAP AG 1999

9unction of 9unction Modules

Online

transaction

To

error

1rror

ption 6 ption amp

9unction module

Import

Parameter 1port

parameter

Tables

M1SSTA

Monitor

S$BC

Import interface

The import interface consists of a technica part and the fieds from the recording (A parameter is

created for each input fied of the recorded transactions)

7port interface

Simpy consists of the parameter S4amp2 The function modue $i return a vaue in the system

fied SC9S4amp2 after caing ca transaction This return vaue is set to Dero if the data record has

een correcty processed (5ny appies to 2T)

If a session is created you $i e notified $hether the data record coud e paced into the session

Tae interfaceThis is used ony if the function modue $ors $ith ca transaction The tae contains a the

system messages

copy SAP AG BC420 12-45

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 4688

048

983209 SAP AG 1999

Import Interface of 9unction Module

$

Technical

fields

Data

fields

BI session or CALL TRANSACTION

Processin $ode

pdate $ode

a$e oamp BI session iamp (T initial)

Bacround user iamp (T initial)

Delete session aampter processin

Loc date oamp session

ODATA indicator

TU

MD1

UPDAT1

BRUP

US1R

=11P

ELDDAT1

DATA

Cou can use parameter 2T4 to specify $hether the function modue creates a atch input session

(2T4 E ) or updates the data record directy using ca transaction (2T4 E G)

The other parameters are fied as for a atch input session header

Note 7very time the function modue is caed a atch input session is created

If the session is to contain severa transactions proceed as foo$s

ltenerate the transaction severa times This can e achieved y recording the transaction again The

function modue interface $i then contain more than one transaction -hen the function modue is

caed severa transactions can e generated for each session

copy SAP AG BC420 12-46

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 4788

043

983209 SAP AG 1999

The Transaction Recorder

PrinciplesPrinciples

Recording )ith the LSMWRecording )ith the LSMW

Principles of atch Input and all TransactionPrinciples of atch Input and all Transaction

Integrating the TA Program into the DWIntegrating the TA Program into the DW

Using the TA Recorder Using the TA Recorder

copy SAP AG BC420 12-47

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 4888

045

983209 SAP AG 1999

Benerated Program

9unction modules DltP1ltBRUP

DltIS1RT

DltLS1ltBRUP

AAP Program

Define structure of

data in seJuential

fileDefine D

table

pen seJuential file

pen I session

Read data recordCseJuential file

9ill D table

9ill I session gtALL TRASATI

Last data record K

lose I session

lose seJuential file

The generated program has the structure dispayed aove It uses the standard function modues for

creating atch input sessions

copy SAP AG BC420 12-48

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 4988

047

983209 SAP AG 1999

Structure of the Benerated Program

Benerated part

Define D

table

pen seJuential file

pen I session

Read data record

9ill D table

9ill I session gtALL TRASATI

Last data recordK

lose I session

lose seJuential file

Include DR16

Define filestructure

P1ltDATAS1T

P1ltBRUP

DltDPR

Dlt9I1LD

DltTRASATI

LS1ltBRUP

LS1ltDATAS1T

The generated program consists of t$o parts 9 a generated part and the incude 2amp72G8 The

incude is provided in the standard system

The incude contains the definition of the reuired 2 tae and a further seven suroutines These

suroutines eecute the foo$ing functions

5pen and cose fie

5pen and cose session

Fi 2 tae

Fi session

The generated part is the main program and cas the reevant suroutines A structure is aso

generated in the generated part to read the eterna data into the fie

See the Appendi for more information on the 2amp72G8 program

copy SAP AG BC420 12-49

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 5088

020

983209 SAP AG 1999

Structure of D Table

PRBRAM DPR D1BI 9AM 9ALPRBRAMPRBRAM DPRDPR D1BID1BI 9AM9AM 9AL9AL

SAPM90ampD 0602

R90ampD=UR 600000

R90ampDU=RS 0006

R90ampD=T=D =UA

SAPM90ampD 0660

=A6AM16 Smith

=A6PSTL 87000

=A6LAD6 US

=A6SPRAS 1

SAPM90ampD 06amp0

=A6ST1B US6amp428357DDATA

PRBRAM

DPR

D1BI

9AM

9AL

EAR

UM

EAR

EAR

EAR

40

4

6

6amp

6amp

D Module pool

D Screen number

D Start of screen

D 9ield name

D 9ield contents

9ield ame T(pe Length Short Tet

AAP Dictionar(

The 2 tae has the same structure as in a standard transfer

copy SAP AG BC420 12-50

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 5188

026

983209 SAP AG 1999

Read Structure

Recording

DATA BEGIN OF record data element BUKRS bukr$amp data element KTOKD ktokd$amp data element NA(EG) name$+amp data element SORT ortl$ampEND OF record-

record

Automaticall( generated

from recording

The structure of the fie is automaticay generated and is a$ays defined $ith the name amp725amp

The generated structure a$ays has the same ayout 7ach fied is defined y t$o generated ro$s

The first ro$ is a$ays a comment ro$ containing the tet J data eement and the data eement of

the screen fied from the recording In the net ro$ the fied itsef is defined $ith the name of the

data eement foo$ed y a three9digit position numer $hich specifies the ocation in the structure

The ength of the fied is set y the ength of the data eement If a fied is not defined through a data

eement the system uses the ength of the screen fied

copy SAP AG BC420 12-51

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 5288

02amp

983209 SAP AG 1999

pening and losing the 9ile

P1ltDATAS1T

LS1ltDATAS1T

FOR( oendataet USING dataet-O)EN DATASET dataet IN TET (ODE-

IF S01SUBR2 34 - 5RITE 6 te7t1e S01SUBR2-STO)-

ENDIF-

ENDFOR(-

FOR( cloedataet USING dataet-2OSE DATASET dataet-

ENDFOR(-

Include

DR16

The suroutine 5P7N3ATAS7T opens the seuentia fie

The suroutine 2+5S73ATAS7T coses the seuentia fie

copy SAP AG BC420 12-52

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 5388

02

983209 SAP AG 1999

9unction Modules for I Program

lient

Session name

Eold date

=eep session

D user name

RecordK

LI1T

BRUP

ELDDAT1

=11P

US1R

R1RD

DltP1ltBRUPDltP1ltBRUP

Transaction code

D table

TD1

DPRTA

DltIS1RTDltIS1RT

DltLS1ltBRUPDltLS1ltBRUP

pen Isessionpen Isession

Insert data for

transactions

Insert data for

transactions

lose I

session

lose I

session

The foo$ing function modues are provided for creating atch input sessions (function group

S2)

235P7N3ltamp54P

2reates a ne$ session and contains genera data for the $hoe session

23INS7ampT

Inserts a the data for a transaction into the session The transferred interna tae $ith the

structure 2ATA must contain a the data reuired for fuy processing the transaction

232+5S73ltamp54P

2oses the session after a the data has een inserted As soon as the session has een cosed it

can e processed

The interna tae $ith the structure 2ATA can ony contain atch input data for one singe

transaction run So the individua transactions are inserted into the atch input session in a oop

using severa 23INS7ampT cas

copy SAP AG BC420 12-53

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 5488

024

983209 SAP AG 2001

9unction Module DltP1ltBRUP

ALL 9UTI DltP1ltBRUPALL 9UTI DltP1ltBRUP

1PRTIB

LI1T client

BRUP session name

ELDDAT1 loc+ date

=11P delete flag

US1R bdc user name

R1RD recording

IMPRTIB

NID internal session +e(

11PTIS

1PRTIB

LI1T client

BRUP session name

ELDDAT1 loc+ date

=11P delete flag

US1R bdc user name

R1RD recording

IMPRTIB NID internal session +e(

11PTIS

-ith the function modue 235P7N3ltamp54P you can open a atch input session

The foo$ing parameters are mandatory

2+I7NT (cient)

ltamp54P (session name)

4S7amp (user name)

Note The 4S7amp must a$ays e specified This user name is reuired for processing the session

in atch mode

The foo$ing parameters are optiona

=5+AT7 specifies the eariest date on $hich the session can e started677P fag specifies $hether session shoud e deeted after it has een successfuy processed The

677P fag is ignored if the session contains errors

677P E K K means deete the session after processing (defaut vaue) H

677P E KGK means do not deete session

amp725amp E KGK ao$s you to create a recording instead of a I session

If gtI is specified the function modue returns the interna session ey This is needed to e ae to

differentiate sessions that have the same name

-ith 7G27PTI5NS you get various return vaues that can e ueried $ith SC9S4amp2

Note In onine mode the onine user is used for the authoriDation checs regardess of the user

name specified

copy SAP AG BC420 12-54

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 5588

022

983209 SAP AG 1999

Subprogram P1ltBRUP

P1ltBRUP

FOR( oen8rou-IF e9on -

2A FUN2TION BD2O)ENGROU) E)ORTING 2IENT lt1mandt GROU) 8rou USER uer KEE) kee

=ODDATE gtolddate-

ENDIF-ENDFOR(-

Include

DR16

The suprogram 5P7N3ltamp54P opens the atch input session

copy SAP AG BC420 12-55

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 5688

028

983209 SAP AG 1999

9unction Module DltIS1RT

ALL 9UTI DltIS1RTALL 9UTI DltIS1RT

IMPRT

TD1 Transaction code

PSTltLAL Update locall(

PRITIB print list

TAL1S DPRTA bdclttable

11PTIS

IMPRT

TD1 Transaction code

PSTltLAL Update locall(

PRITIB print list

TAL1S DPRTA bdclttable

11PTIS

-ith the function modue 23INS7ampT you can add transaction data to the session

Cou need an interna 2 tae to transfer the data

The foo$ing parameters are mandatory

T257 Transaction code

CNPamp5TA 2 tae

The foo$ing parameters are optiona

P5ST3+52A+ E KGK activates oca updating This means that the data to e updated is ept in the

appication server and updated in the ast step of the transaction This does not invove the update

process (For more information see course 28 Programming ataase 4pdates)

PampINTINlt E KGK 9 ists processed in I $i e printed immediatey -ith 7G27PTI5NS you get various return vaues that can e ueried $ith SC9S4amp2

copy SAP AG BC420 12-56

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 5788

023

983209 SAP AG 1999

Subprogram DltTRASATI

DltTRASATI

FOR( BD2TRANSA2TION USING tcode-

IF e9on -2A FUN2TION BD2INSERT

E)ORTING T2ODE tcode TABES D0N)ROTAB bdcdata-

ESE-

ENDIF-ENDFOR(-

T

Include

DR16

The suprogram 23TampANSA2TI5N moves the fied 2 tae either to a atch input session

or uses ca transaction to import the data into the system 5n the seection screen you can specify

$hether you $ant to create a session or you $ant to use ca transaction to process the data directy

The S7SSI5N fied is then set according to your seection

copy SAP AG BC420 12-57

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 5888

025

983209 SAP AG 1999

9unction Module DltLS1ltBRUP

ALL 9UTI DltLS1ltBRUP

11PTIS

TltP1 6

NU1U1lt1RRR amp

-ith the function modue 232+5S73ltamp54P you can cose a atch input session

In 7G27PTI5NS you get various return vaues that can e ueried $ith SC9S4amp2

copy SAP AG BC420 12-58

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 5988

027

983209 SAP AG 1999

Subprogram LS1ltBRUP

FOR( cloe8rou-IF e9on -cloe batcgt 9nut 8rou

2A FUN2TION BD22OSEGROU)-

ESE-IF e8rouoened -

2A FUN2TION BD22OSEGROU)-

ENDIF-ENDIF-

ENDFOR(-

LS1ltBRUPlose session

lose error session

Include

DR16

The suprogram 2+5S73ltamp54P coses the atch input session The suprogram differentiates

et$een a norma I session (S7SSI5N E G) and a session opened $hen ca transaction

encountered an error (73ltamp54P35P7N7 E G)

copy SAP AG BC420 12-59

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 6088

080

983209 SAP AG 1999

Subprograms DltDPRG Dlt9I1LD

DltDPR

Dlt9I1LD

FOR( bdc9eld USING nam al-IF al 34 nodata-2EAR bdcdata- bdcdata1nam nam- bdcdata1al al- A))END bdcdata-ENDIF-

ENDFOR(-

FOR( bdcdltnro USING ro8ram dltnro- 2EAR bdcdata-Bdcdata1ro8ram ro8ram-Bdcdata1dltnro dltnro-Bdcdata1dltnbe89n - A))END bdcdata-ENDFOR(-

Include

DR16

The incude 2amp72GG contains t$o suprograms 23CNPamp5 and 23FI7+

Suprogram 23CNPamp5 fis the 2 tae $ith program names and screen numers

Suprogram 23FI7+ fis the 2 tae $ith fied names and vaues

7ach suprogram creates an entry in the 2 tae

copy SAP AG BC420 12-60

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 6188

086

983209 SAP AG 1999

9illing the D Table

erorm bdcdltnro u9n8 SA)(FD +- erorm bdc9eld u9n8 BD22URSOR RFD1BUKRS- erorm bdc9eld u9n8 BD2OK2ODE 6- erorm bdc9eld u9n8 RFD1BUKRS record1BUKRS- erorm bdc9eld u9n8 RFD1KTOKD record1KTOKD-

erorm bdcdltnro u9n8 SA)(FD -

erorm bdc9eld u9n8 BD22URSOR KNA1S)RAS- erorm bdc9eld u9n8 BD2OK2ODE 6- erorm bdc9eld u9n8 KNA1NA(E record1NA(E-

erorm bdc9eld u9n8 KNA1SORT record1SORT-

Recording Benerated automaticall(

from the recording

)ERFOR( bdcdltnro USING SA)(FD +- )ERFOR( bdc9eld USING BD22URSOR RFD1BUKRS-)ERFOR( bdc9eld USING BD2OK2ODE 6-)ERFOR( bdc9eld USING RFD1BUKRS record1BUKRS-)ERFOR( bdc9eld USING RFD1KTOKD record1KTOKD-

)ERFOR( bdcdltnro USING SA)(FD -

)ERFOR( bdc9eld USING BD22URSOR KNA1S)RAS-)ERFOR( bdc9eld USING BD2OK2ODE 6-)ERFOR( bdc9eld USING KNA1NA(E record1NA(E-

)ERFOR( bdc9eld USING KNA1SORT record1SORT- ---

The 2 tae is fied $ith data from the recording The suroutines 23CNPamp5 and

23FI7+ are used for this

The suroutines are caed in the reuired structure or seuence

copy SAP AG BC420 12-61

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 6288

08amp

983209 SAP AG 1999

erie)

SAPDatabase

SeJuential9ile

SAPDatabase

ALL TRASATIALL TRASATI

SeJuential9ile

ATE IPUTATE IPUT

D TableD TableD TableD Table

I Monitor

T

In contrast to atch input you can use ca transaction to directy pass data to the diaog interface

$ithout using a atch input session Cou use an interna tae (2 tae same structure and ayout

as atch input) to temporariy store your screen data Then you ca the desired transaction in your

program

Note 5n average the 2a Transaction method is 8 to times faster than using atch Input

copy SAP AG BC420 12-62

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 6388

08

983209 SAP AG 1999

all Transaction Program$ 1ample

RE)ORT abcbdcdcdeb9ct-

)ARA(ETERS d9mode DEFAUT A

udmode DEFAUT S-FOR( calltranact9on-2A TRANSA2TION FD

USING bdcdata (ODE d9mode

U)DATE udmode-

IF lt1ubrc NE - 5RITE 6 ---

ENDIF-ENDFOR(-

Screen

00

Screen

100

Screen

An additiona system ro area is added for the caed transaction The system uses this area for

processing the individua screens in the transactionH the data from the tae is added here After the

transaction is processed the second ro area is reeasedH the system continues processing in the first

ro area

Notes

In contrast to atch input there is no error ogging (error sessions) here For processing the caed

transaction the system uses the authoriDations of the user that caed the transaction The 2 tae

can ony hod data for one transaction run at a time efore another transaction is caed and its data

can e added you must eecute a amp7Famp7S= for the 2 tae

copy SAP AG BC420 12-63

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 6488

084

983209 SAP AG 1999

ALL TRASATI C6

RE)ORT 777-

2A TRANSA2TION FD USING bdcdata (ODE E-

Default for MD1 is A

2A TRANSA2TION 3tranact9oncode4 USING 3bdc1table4 C (ODE A E N C-

-ith the parameter 57 you can seect a specific dispay mode for processing the transaction The

foo$ing three modes are avaiae

A (ispay a)

If you eecute the program a the screens and a their data are dispayed This is the defaut vaue

for the 57 in 2A++ TampANSA2TI5N

N (ispay nothing)

The screens are not dispayed at a regardess of $hether any of them contained errors As soon as

the transaction has een fuy processed contro is returned to your program (The vaue of the

parameter 4PAT7 determines $hether dataase updates are eecuted or not)

7 (ispay errors ony)As soon as an error occurs in a screen the transaction is s$itched to dispay mode so that you can

correct the errors

These dispay modes are the same as those in the atch input session processing

copy SAP AG BC420 12-64

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 6588

082

983209 SAP AG 1999

RE)ORT 777-

2A TRANSA2TION FD USING BD2DATA U)DATE -

ALL TRASATI Camp

RE)ORT 777-

2A TRANSA2TION FD USING bdcdata U)DATE -

2A TRANSA2TION 3tranact9oncode4 USING 3bdc1table4 C (ODE A E N C U)DATE A S C -

Default for UPDAT1 is A

-ith the parameter 4PAT7 you can contro ho$ dataase updates arising from a transaction are

carried out There are three options

A (asynchronous updating) The caed transaction does not $ait unti the dataase has een

updated it simpy for$ard the updates to the SAP update service This usuay speeds up the 2T

program This processing mode is N5T recommended for arge data sets as the caed transaction

does not receive a competion message from the update modue

The caing 2T program therefore cannot te if the transaction has een successfuy competed Cou

shoud use the updating administration function (transaction S8) to determine $hether updating

$as terminated eary The error anaysis correction functions for are ess hepfu than $ith

synchronous updating

S (synchronous updating) -ith synchronous updating the caed transaction $aits unti a the

updates have een competed So processing is so$er than $ith synchronous updating The caed

transaction can ho$ever report any updating errors to the program $hich maes error

anaysiscorrection easier

+ (local updating) $ith oca updating the dataase is not updated in a separate process it is

updated in the caers process (see appication hep documentation for the AAP ey$ord S7T

4PAT7 TAS6 +52A+)

copy SAP AG BC420 12-65

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 6688

088

983209 SAP AG 1999

ALL TRASATI C

RE)ORT 777-DATA mtab T0)E TABE OF bdcm8coll-

2A TRANSA2TION FD USING bdcdata (ESSAGES INTO mtab-

2A TRANSA2TION 3tranact9oncode4 USING 3bdc1table4 C (ODE A E N C U)DATE A S C (ESSAGES INTO 3metab4 C -

7SSAlt7S specifies that a system messages that are output during the eecution of a 2A++

TampANSA2TI5N are $ritten to the interna tae L7SSTA The interna tae must have the

structure 2Slt25++

4nie the cassica atch input processing $ith sessions 2A++ TampANSA2TI5N does not offer any

specia processing procedures for transactions containing errors There are no restart functions for

transactions that contain errors or that cause updating terminations

copy SAP AG BC420 12-66

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 6788

083

983209 SAP AG 1999

ALL TRASATI C4

RE)ORT 777-DATA mltot T0)E ctuaram-

2A TRANSA2TION FD USING BD2DATA

O)TIONS FRO( mltot-

2A TRANSA2TION 3tranact9oncode4 USING 3bdc1table4 C (ODE A E N C U)DATE A S C (ESSAGES INTO 3metab4 C O)TIONS FRO( ot C -

RE)ORT 777-DATA mltot T0)E ctuaram-2A TRANSA2TION FD USING bdcdata

O)TIONS FRO( mltot-

The addition 5PTI5NS enaes the ca transaction statement to e controed through a structure

The structure must have the dictionary type 2T43PAampAS

The addition 5PTI5NS Famp5 must not e comined either $ith the addition 57 or $ith

4PAT7 ore information on the net side

copy SAP AG BC420 12-67

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 6888

085

983209 SAP AG 1999

Structure TUltPARAMS

DISMD1 Procen mode anaoo o addon amp

UPDMD1 $pdae mode anaoo o addon $PA

ATTMD1 CA mode CA conro

D19SI1 orce de=a EndoE e drn procen

RAMMIT +o eD a Camp amp(

IPT +o a ac np eonF a F S-B+P SPAC

I1D +o a ac np eon a=er end o= BC daa

The components are defined as foo$s

The components 7FSIM7 ampA25IT N5INPT and N5I7N can have the foo$ing

vaues KGK E Ces or K K E No

If the addition 5PTI5NS Famp5 is not specified the foo$ing settings appy to the contro

parameters

IS57 from addition 57

4P57 from addition 4PAT7

2ATT57 2ATT not active

7FSIM7 o not not use defaut $indo$s siDe

ampA25IT Successfu eit at 25IT -5amp6

N5INPT atch input session active (SC9INPT E G)

N5I7N atch input session sti active after end of 2 data

copy SAP AG BC420 12-68

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 6988

087

983209 SAP AG 1999

SMSBID Message ID

SMSBT Message T(pe C1GIGWGSGA

SMSB Message umber

SMSB6 Message ariable 6

SMSBamp Message ariable amp

SMSB Message ariable

SMSB4 Message ariable 4

SMSBID Message ID

SMSBT Message T(pe C1GIGWGSGA

SMSB Message umber

SMSB6 Message ariable 6

SMSBamp Message ariable amp

SMSB Message ariable

SMSB4 Message ariable 4

Return code$

S(stem fields$

alue Meaning

0 Successful

6000 1rror in transaction

6000 1rror in processing call transaction

see also the s(stem fields specified

alue Meaning

0 Successful

6000 1rror in transaction

6000 1rror in processing call transaction

see also the s(stem fields specified

9ield name Meaning9ield name9ield name MeaningMeaning

Return ode and S(stem 9ields

The return code is used to specify $hether the caed transaction $as processed successfuy In

addition severa system fieds are fied The numer I type and variaes of the diaog message

output y the caed transaction Cou need this information to output the message tet

copy SAP AG BC420 12-69

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 7088

030

983209 SAP AG 1999

Benerated Program of the TA Recorder

REFRES= (ESSTAB-

2A TRANSA2TION tcode USING bdcdata (ODE ctumode U)DATE cudate (ESSAGES INTO metab-OO) AT metab- ENDOO)-IF lubrc 34 AND e8rou 34 S)A2E- IF e8rouoenend - 2A FUN2TION BD2O)ENGROU) E)ORTING ---------

--------- E8rouoened - ENDIF- 2A FUN2TION BD2INSERT E)ORTING T2ODE tcode TABES D0N)ROTAB bdcdata-ENDIF-REFRES= bdcdata-

Message table output

pen error session

Insert data record that

has errors into error

session

If you have seected ca transaction on the seection screen the generated program runs as foo$s

The onine transaction is caed $ith ca transaction and passed to tae 2ATA A the

messages arising during the ca transaction are put in the interna tae 7SSTA

7SSTA is output as a ist

If you have specified an error session ( 73ltamp54P L SPA27) on the seection screen and the

ca transaction comes across an error (+3S4amp2 L 0) the error session is opened The error

session is ho$ever ony opened once Then the data record is paced in the session

A the other data records that have errors $ith ca transaction are paced in the same session

copy SAP AG BC420 12-70

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 7188

036

983209 SAP AG 1999

The Transaction Recorder

PrinciplesPrinciples

Recording )ith the LSMWRecording )ith the LSMW

Principles of atch Input and all TransactionPrinciples of atch Input and all Transaction

Integrating the TA Program into the DWIntegrating the TA Program into the DW

Using the TA Recorder Using the TA Recorder

copy SAP AG BC420 12-71

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 7288

03amp

983209 SAP AG 1999

Integrating into the DW

Transfer program

AAP Dictionar(

Integrate

SDA0

SDA6

SDAamp

SDA

Cou can integrate the generated program into the G9- The structure of the fie must e created

in the AAP ictionary The taes SGA0 SGA8 SGA1 and SGA $i e fied

copy SAP AG BC420 12-72

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 7388

03

983209 SAP AG 1999

DW Release 42

Goo

-B eeae 45

aa ran=er ogtec

Int customer data transfer ob-ect

ecord =ed

Dece daa ran=er

d Goo

The ampunction ampor interatin TA recorder prora$s is

i$ple$ented in the

D+-B in Release

The recorder can e integrated as of ampeease and it is provided in the G9- ampeease

ltot to the G9- ampeease 5n the initia screen you can integrate programs y choosing ampoto

( +nt customer ata transfer o-ect

copy SAP AG BC420 12-73

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 7488

034

983209 SAP AG 1999

reating Program as D b-ect

Comer ran=er ogtec

ampgtec ype

Sor eD =or ogtec

aa ran=er proram

Srcre name

9900

(+A1

Cane comer

ZBCA+G

ZB

ustomer transfer ob-ect

umber bet)een 7000 and 7777

b-ect t(pe

Assignment to R ob-ect

Short tet for D ob-ectShort description

Data transfer program

ame of generated program

Structure name

A structure Cstructure la(out )ith this name is created in

the AAP Dictionar(

For ampeease transfer oects $ere not organiDed y 5amp oects ut y a G numer (00089

OOOO) The numer range O0009OOOO is reserved for customers

To create a connection to the ne$ G 9- you must assign the program to a 5amp oect

2reate a short tet for the G oect This tet $i appear in the method seection ist

Specify the program to e incuded

Specify a name for the structure to e created in the AAP ictionary

Note $he generated program appears under program type +N and not under program type

-

copy SAP AG BC420 12-74

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 7588

032

983209 SAP AG 1999

Adantages

Automatic program registration in the DW in

Release 48

ou can use all the functions defined for

standard ob-ects

1ception$ The (reate ampile ith data

function

If you incuded the oect in the ampeease $orench it is automaticay avaiae in the ampeease

B $orench

A the $orench functions are avaiae for your oect ecept for Create files ith transfer ata

copy SAP AG BC420 12-75

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 7688

038

983209 SAP AG 1999

ou are no) able to$

The Transaction Recorder$ Unit Summar(

Use the recording function in the LSMW to create

a batch input session )ith the data from the

eternal s(stem

Use the TA Recorder to create (our o)n data

transfer program

Anal(e programs that )or+ )ith batch input or

call transaction

Integrate the TA Recorder programs into the

DW

copy SAP AG BC420 12-76

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 7788

ercise 1

nit $ -ecorder

$opic 2reating etors

$ransaction -ecorder ercise 1

bull 2reating detors $ith eterna numer assignment

bull etor numers M9980008 to M9980080

Address data for detors $ith eterna numer assignment is to

e transferred using program ampFI700

ro4ect F5

Supro4ect +5

-un +575

$as)s 85 95 8S25

9oad program -F+00

8 In the foo$ing eercises eisting data is to e changed Therefore these detors $ith

eterna numer assignment have to first e created

898 4nder suproect 79 create run 797G9 $ith the name Detors ith

eternal numers

copy SAP AG BC420 12-77

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 7888

891 2reate the foo$ing three tass The tass map the foo$ing process steps

convert data create + session and process + session

89198 In run 797G9 create the foo$ing tas

9 Tas AP9

9 Name 2onvert data 9 Tas type AP

9 Program type +S-

Seect the foo$ing +S- oect

+S- proect 2109

+S- suproect 7I9

+S- oect I997GT

89191 In run 797G9 create the foo$ing tas 9 Tas +5A9

9 Name 2reate I session

Tas type +5A

9 Program type INP

Seect program ampFI700 $ith the variant

I97G9

8919 In run 797G9 create the foo$ing tas

9 Tas S29

9 Name Process I session Tas type S2

9 Program type amp7P5

Seect program ampS2S4 $ith the variant

S497G9

Note that you have to correct the seuence of the tass 2onvert data

create + session and process + session

4se the uttons

89 Start the run

The detors $i e created $ith eterna numer assignments

89 2hec in transaction F0 that the detors M9980008 to M9980080 have een

created

copy SAP AG BC420 12-78

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 7988

ercise

nit $ransaction -ecorder

$opic -ecording function in the 9S8(

bull 2reate a recording using the +S-

bull ltenerate a atch input session

2hange the detor address data in the amp System

Name of the recording +

Name of the file +2055+F9

8 2reate the recording 7I3 using the +S- ampecord the transaction F01 (2hange

detor)

898 efore you create the recording first test the transaction onineQ

For the recording use detor M9980008 5n the initia screen of the F01

maintain the foo$ing fieds ony

etor etor M9980008

2ompany code 0008

Address data seect

Note $he data record must e saved hile recording

891 aintain the names and the descriptions for the foo$ing fieds

Name city street posta code and teephone numereete a other fieds in screen 880 from the recording (eg S5ampT+ +AN8

SPampAS)

4se the same technica names as sho$n in the tae eo$ (automatic fied

mapping)

copy SAP AG BC420 12-79

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 8088

1 2reate the suproect 7I9 and the ne$ oect TA3 in your proect 2109

aintain the oect attriutes and seect the item atch input recording Seect your

recording 7I3

2reate the source structure address

2reate the source fieds according to the tae eo$ 5r copy them from proect 2109S37N suproect 7I900 oect TA900

198 Fie setup The data from the egacy system are dispayed in the foo$ing tae

Fied name Fied type Fied ength escription

N5 2 8B etor numer

NA7 2 Name

STamp77T 2 Street

2ITC 2 2ityPace of residence

MIP 2 80 Posta code

T7+ 2 8B Teephone numer

191 aintain the fied mapping 4se the automatic fied mapping (via menu item

7tras)

19 Specify the fies 5ny maintain the fie name of the source fie

Name of the fie 21099IFI+7

2odepage 8800

19 Import the data and convert them ispay the data in each caseQ

19 2reate a atch input session

19B ampun the atch input session

copy SAP AG BC420 12-80

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 8188

ercise 3

nit $ransaction -ecorder

$opic -ecording ith the $ -ecorder

bull ltenerate a recording using the TA recorder

bull Test the recording

2hange the address data of detors in the amp system

Name recording $+

Name of the file +2055+F9

8 2reate the recording TA37I3 using the transaction recorder ampecord the

transaction F01 (change detor)

898 4se detor M9980008 for the recording 5n the F01 initia screen ony

maintain the foo$ing fieds

etor etor M9980008

2ompany 2ode 0008

Address data seect

Note $he data record must e saved hen recording

eete a fieds that do not eist in the source fie 21099IFI+7 from screen

880 in the recording (eg 6NA89S5ampT+ 6NA89+AN8 6ANNQ9SPampAS) Note o not deete fieds ampF01946ampS and ampF0190880

Save the recording no$

1 S$itch to the recordings overvie$

198 Process the recording $ith the processing mode A (dispay a)

191 Process the recording $ith the processing mode RN (no dispay)

19 If the recording has een tested and no error has occurred generate a I session

and run it using the I monitor If an error shoud occur generate the recordingagainQ

copy SAP AG BC420 12-81

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 8288

From the recording generate the program M21037I3 in your deveopment cass

2109 Seect the foo$ing

bull ampead fied contents from fie

bull 2reate test data in the fie 2103dei3test3tt

98 Save this program and eecute it ltenerate one I session each and process it

2arry out the same steps again using the ca transaction

The generated program shoud no$ e changed so that fie 21099IFI+7 can e

read and processed

98 2hange the defaut vaue of the fie name (parameter dataset) in 21099

IFI+7

91 2hange the structure definition eete the company code fied and the address

data checo from the structure

9 2hange the su9routine ca perform dc3fied for the company code (KampF019

46ampSK) so that the vaue 0008 is transferred

9 2hange the su9routine ca perform dc3fied for the address data checo

(KampF0190880K) so that the vaue G is transferred

9 Start the program again and read the data from the fie 21099IFI+7 $ith

detor data ltenerate a I session $ith it and run it

copy SAP AG BC420 12-82

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 8388

033 Include DR16INCLUDE BDCRECX1

SELECTION-SCREEN BEGIN OF LINE

PARAMETERS SESSION RADIOBUTTON GROUP CTU create sessi SELECTION-SCREEN COMMENT $amp TEXT-S FOR FIELD SESSION

se(ecti-scree )siti +

PARAMETERS CTU RADIOBUTTON GROUP CTU ca(( trasacti

SELECTION-SCREEN COMMENT $amp TEXT-S FOR FIELD CTU

SELECTION-SCREEN END OF LINE

SELECTION-SCREEN BEGIN OF LINE

SELECTION-SCREEN COMMENT $amp TEXT-S1 FOR FIELD GROUP

se(ecti-scree )siti $+

PARAMETERS GROUP1$amp r) ae 0 sessi

SELECTION-SCREEN COMMENT $amp TEXT-S+ FOR FIELD CTUMODE

se(ecti-scree )siti

PARAMETERS CTUMODE LIE CTU2PARAMS-DISMODE DEFAULT 3N3

A4 s56 a(( 78)rs

E4 s56 78)r errr (8

N4 7 t 7is)(a8 78)r

SELECTION-SCREEN END OF LINE

SELECTION-SCREEN BEGIN OF LINE

SELECTION-SCREEN COMMENT $amp TEXT-S$ FOR FIELD USER

se(ecti-scree )siti $+

PARAMETERS4 USER1$amp DEFAULT S9-UNAME ser 0r sessi i atc5

SELECTION-SCREEN COMMENT $amp TEXT-S FOR FIELD CUPDATE

se(ecti-scree )siti

PARAMETERS CUPDATE LIE CTU2PARAMS-UPDMODE DEFAULT 3L3

S4 s8c5rs(8

A4 as8c5rs(8

L4 (ca(

SELECTION-SCREEN END OF LINE

SELECTION-SCREEN BEGIN OF LINE

SELECTION-SCREEN COMMENT $amp TEXT-S FOR FIELD EEP

se(ecti-scree )siti $+

PARAMETERS4 EEP AS CltECBOX 3 3 = 7e(ete sessi i0 0iis5e7

3X3 = gtee) sessi i0 0iis5e7

SELECTION-SCREEN COMMENT $amp TEXT-S FOR FIELD E2GROUP

copy SAP AG BC420 12-83

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 8488

se(ecti-scree )siti

)araeters E2GROUP1$amp r) ae 0 errr-sessi

SELECTION-SCREEN END OF LINE

SELECTION-SCREEN BEGIN OF LINE

SELECTION-SCREEN COMMENT $amp TEXT-S FOR FIELD ltOLDDATE

se(ecti-scree )siti $+

PARAMETERS4 ltOLDDATE LIE S9-DATUM

SELECTION-SCREEN COMMENT +11amp TEXT-S$ FOR FIELD E2USER

se(ecti-scree )siti

PARAMETERS4 E2USER1$amp DEFAULT S9-UNAME ser 0r errr-sessi

SELECTION-SCREEN END OF LINE

SELECTION-SCREEN BEGIN OF LINE

SELECTION-SCREEN COMMENT +11amp TEXT-S FOR FIELD E2EEP

se(ecti-scree )siti

PARAMETERS4 E2EEP AS CltECBOX 3 3 = 7e(ete sessi i0 0iis5e7

3X3 = gtee) sessi i0 0iis5e7

SELECTION-SCREEN END OF LINE

SELECTION-SCREEN BEGIN OF LINE

SELECTION-SCREEN COMMENT +11amp TEXT-S FOR FIELD E2ltDATE

se(ecti-scree )siti

PARAMETERS4 E2ltDATE LIE S9-DATUM

SELECTION-SCREEN END OF LINE

SELECTION-SCREEN SIP

SELECTION-SCREEN BEGIN OF LINE

SELECTION-SCREEN COMMENT 1amp TEXT-S1 FOR FIELD NODATA

PARAMETERS4 NODATA DEFAULT 33 LOER CASE 7ata

SELECTION-SCREEN END OF LINE

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

Batc5i)t7ata 0 si(e trasacti

DATA4 BDCDATA LIE BDCDATA OCCURS ITlt ltEADER LINE

essaes 0 ca(( trasacti

DATA4 MESSTAB LIE BDCMSGCOLL OCCURS ITlt ltEADER LINE

errr sessi )ee7 3 3 r 3X3amp

DATA4 E2GROUP2OPENED

essae tets

TABLES4 T1

copy SAP AG BC420 12-84

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 8588

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

at se(ecti scree

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

AT SELECTION-SCREEN

r) a7 ser st e 0i((e7 0r create sessi

IF SESSION = 3X3 AND

GROUP = SPACE OR USER = SPACE

MESSAGE E1MSamp

ENDIF

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

)e 7ataset

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

FORM OPEN2DATASET USING P2DATASET

OPEN DATASET P2DATASET IN TEXT MODE

IF S9-SUBRC

RITE4 TEXT-E S9-SUBRC

STOP

ENDIF

ENDFORM

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

c(se 7ataset

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

FORM CLOSE2DATASET USING P2DATASET

CLOSE DATASET P2DATASET

ENDFORM

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

create atc5i)t sessi

t 0r ca(( trasacti siamp

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

FORM OPEN2GROUP

IF SESSION = 3X3

SIP

RITE4 $amp 3Create r)3I1amp GROUP

SIP

)e atc5i)t r)

CALL FUNCTION 3BDC2OPEN2GROUP3

EXPORTING CLIENT = S9-MANDT

copy SAP AG BC420 12-85

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 8688

GROUP = GROUP

USER = USER

EEP = EEP

ltOLDDATE = ltOLDDATE

RITE4 amp 3BDC2OPEN2GROUP3I$amp

1$amp 3retrc7e43I+amp

S9-SUBRC

ENDIF

ENDFORM

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

e7 atc5i)t sessi

ca(( trasacti si4 errr sessiamp

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

FORM CLOSE2GROUP

IF SESSION = 3X3

c(se atc5i)t r)

CALL FUNCTION 3BDC2CLOSE2GROUP3

RITE4 amp 3BDC2CLOSE2GROUP3Iamp

1$amp 3retrc7e43I+amp

S9-SUBRC

ELSE

IF E2GROUP2OPENED = 3X3

CALL FUNCTION 3BDC2CLOSE2GROUP3

RITE4

RITE4 amp 3Fe5(era))e 6r7e eret3Iamp

ENDIF

ENDIF

ENDFORM

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

Start e6 trasacti accr7i t )araeters

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

FORM BDC2TRANSACTION USING TCODE

DATA4 L2MSTRINGamp

DATA4 L2SUBRC LIE S9-SUBRC

atc5 i)t sessi

IF SESSION = 3X3

CALL FUNCTION 3BDC2INSERT3

EXPORTING TCODE = TCODE

TABLES D9NPROTAB = BDCDATA

RITE4 3BDC2INSERT3Iamp

copy SAP AG BC420 12-86

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 8788

TCODE

3retrc7e43I+amp

S9-SUBRC

3RECORD43

S9-INDEX

ca(( trasacti si

ELSE

REFRESlt MESSTAB

CALL TRANSACTION TCODE USING BDCDATA

MODE CTUMODE

UPDATE CUPDATE

MESSAGES INTO MESSTAB

L2SUBRC = S9-SUBRC

RITE4 3CALL2TRANSACTION3

TCODE

3retrc7e43I+amp

L2SUBRC

3RECORD43

S9-INDEX

LOOP AT MESSTAB

SELECT SINGLE FROM T1 ltERE SPRSL = MESSTAB-MSGSPRA

AND ARBGB = MESSTAB-MSGID

AND MSGNR = MESSTAB-MSGNR

IF S9-SUBRC =

L2MSTRING = T1-TEXT

IF L2MSTRING CS 313

REPLACE 313 ITlt MESSTAB-MSGH1 INTO L2MSTRING

REPLACE 3$3 ITlt MESSTAB-MSGH$ INTO L2MSTRING

REPLACE 33 ITlt MESSTAB-MSGH INTO L2MSTRING

REPLACE 33 ITlt MESSTAB-MSGH INTO L2MSTRING

ELSE

REPLACE 33 ITlt MESSTAB-MSGH1 INTO L2MSTRING

REPLACE 33 ITlt MESSTAB-MSGH$ INTO L2MSTRING

REPLACE 33 ITlt MESSTAB-MSGH INTO L2MSTRING

REPLACE 33 ITlt MESSTAB-MSGH INTO L2MSTRING

ENDIF

CONDENSE L2MSTRING

RITE4 MESSTAB-MSGT9P L2MSTRING$+amp

ELSE

RITE4 MESSTAB

ENDIF

ENDLOOP

copy SAP AG BC420 12-87

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 8888

SIP

Eree 0e5(era))e

IF L2SUBRC AND E2GROUP SPACE

IF E2GROUP2OPENED = 3 3

CALL FUNCTION 3BDC2OPEN2GROUP3

EXPORTING CLIENT = S9-MANDT

GROUP = E2GROUP

USER = E2USER

EEP = E2EEP

ltOLDDATE = E2ltDATE

E2GROUP2OPENED = 3X3

ENDIF

CALL FUNCTION 3BDC2INSERT3

EXPORTING TCODE = TCODE

TABLES D9NPROTAB = BDCDATA

ENDIF

ENDIF

REFRESlt BDCDATA

ENDFORM

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

Start e6 scree

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

FORM BDC2D9NPRO USING PROGRAM D9NPRO

CLEAR BDCDATA

BDCDATA-PROGRAM = PROGRAM

BDCDATA-D9NPRO = D9NPRO

BDCDATA-D9NBEGIN = 3X3

APPEND BDCDATA

ENDFORM

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

Isert 0ie(7

Page 30: BC420_46C - 012The Transaction Recorder

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 3088

00

983209 SAP AG 1999

hanging ustomer Data$ Pa(ment Transactions Camp

Addre

an+ countr( US

an+ code 6amp42837

Banlt dea

ustomer 5560000

9ield ontents9ield ame

BCC$Samp (+A1-(+ZA

BCamp(Camp $PA

(+B(-Z01

Screen

10

Screen

100

SAPLBA

9ield ontents

BCC$Samp B+(A-BA+(A

BCamp(Camp +

B+(A-BA+(A +aona Banlt

9ield ame

In different transactions the modue poo may change This is the case $ith for eampe customer

master data The TA recorder records modue poo changes automaticay

copy SAP AG BC420 12-30

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 3188

06

983209 SAP AG 1999

Eierarch( Displa( of the Recording

02amp

02

SAP02 0106

BCC$Samp 02-0130

BCamp(Camp )00

02-($++ -88-10000

02-0110

02-0130

SAP02 0111

BCamp(Camp V

BCC$Samp A1AA-amp$S+$1

A1AA-S Garden Sree

Recording

-ith the TA recorder the resuts are aso a ist in a hierarchy dispay =o$ever you cannot assign

your o$n fied names as you can in the +S-

copy SAP AG BC420 12-31

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 3288

0amp

983209 SAP AG 1999

Recording erie)

Recording

Transfer program

9unction module

ontains onl( the data

from the recording

Test data

Test

reate

reate

reate

reate

1dit hange recording

Process recording

Cou can edit the recording as needed

The recording can e tested and eecuted again The screens are run through in the same $ay as in

the recording

The recording can then e used to create

atch input sessions

Test data

ata transfer programs $ith atch input or ca transaction

Function modues

copy SAP AG BC420 12-32

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 3388

0

983209 SAP AG 1999

1 02 BS

2 SAP02 106

3 BCC$Samp $SZAV

4 BCamp(Camp )00 5 02-($++ -88-10000

6 02-0110

7 02-0130

8 $SZAV

9 SAP02 111

10 BCamp(Camp V

11 BCC$Samp A1AA-amp$S+$1

12 A1AA-S Garden Sree

Program Screen St 9ield ame 9ield alue

Recording 1ditor

Recording

Add gt delete lines 9ormat chec+

Import gt eport of recording

In the editor you can add or deete ines Cou can aso change the contents of individua ines

-ith the function Chec) you can specify $hether the edited version of the recording sti has the

correct synta

Cou can aso eport import recordings to from a seuentia fie

After editing save the recording changes

copy SAP AG BC420 12-33

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 3488

04

983209 SAP AG 1999

Recording Seeral Transaction Runs

RecordingF

Directl( after the first recordingG or

In the displa( mode of the recording

In this step you can record additiona transactions and add additiona transaction runs to the

recording

Cou can record the additiona transactions directy after a recording or in the edit screen of a

recording

copy SAP AG BC420 12-34

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 3588

02

983209 SAP AG 1999

1ditor$ Importing and 1porting Recordings

6 T 9D0amp S

amp SAPM90ampD 608

DltURSR

4

2

8 SAPM90ampD 666

60

66

Program Screen St 9ield name 9ield alue

cempA

e name

aa =orma

cemp

A

e name

aa =orma

1port

Import

Presentation Serer

If the editor functions in the systems do not provide a the functions you need you can do$noad the

recording to your presentation server using the Eort function and then edit the recording using a

P2 editor

Cou use the Import function to import the data ac into the amp System ae sure the fie is sti in

the correct format

copy SAP AG BC420 12-35

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 3688

08

983209 SAP AG 1999

Processing the Recording

Recording

Process )ith ALL TRASATI

Parameer

Proce mode$pdae mode

CA mode

e=a e

Con a=er comm

+o a B eon

nd +o a B mode

A

A

T

The recording can e eecuted directy The data from the recording is used and the transaction is

processed $ith ca transaction

2a transaction provides a range of options for caing appication transactions $hich are discussed

on the foo$ing t$o pages

copy SAP AG BC420 12-36

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 3788

03

983209 SAP AG 1999

Process mode

Update mode

ATT mode

Processing Recording )ith T 6

A

1

Displa( all screens

Displa( errors onl(

o displa(

L

S

A

Local

S(nchronous

As(nchronous

A

o ATT

ATT )ithout indiidual screen control

ATT )ith indiidual screen control

Processing mode

=ere you can specify the processing mode 9 it is the same as the processing mode for atch input

4pdate mode

=ere you can specify the update mode For more information see the unit ca transaction

2ATT mode

=ere you can mae specia settings if you $ant to test the recording under 2ATT conditions (ony

necessary for 2ATT runs) Specia functions are caed in the 2ATT too for each screen at the end of

P5 and at the start of PAI

copy SAP AG BC420 12-37

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 3888

05

983209 SAP AG 1999

Default sie

ont after commit

ot a I session

1nd$ ot a I mode

Processing Recording )ith T amp

The screen standard sie is used for the

processing

ommit )or+ does not end the processing

o I mode is actie The transaction )ill run

through as in online

I mode is selected nce the data in the D

table is processedG the I mode is set to inactie

Standard siDe

If you seect this the screens are processed in the standard siDe in the foreground (in foreground or

dispay errors ony) Note the standard siDe is a$ays used for acground processing

Further after commit

The first commit $or in a transaction does not ead to the end of the recording

Note A atch input transaction is ended $ith the first commit $or

No I mode

The system fied SC9INPT is not set (SC9INPT E ) So transactions are run through as in onine

7nd No I mode

5ny use if you choose the processing mode 7 (dispay errors ony) Then the transaction is processed in the acground in atch input mode and if there is an error the screens run through in

the foreground

copy SAP AG BC420 12-38

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 3988

07

983209 SAP AG 1999

I Mode

atch input

mode

nline

Some transactions behae differentl( in batch input mode

than in online Cbatch input capabilit(

atch input mode sets the s(stem field SIPT H

Not every transaction can run the same onine and in atch input mode The transaction must decide

itsef $hether it is caed onine or in atch input mode

The system sets the system fied SC9INPT E G if the atch input mode is active (this aso appies

to ca transaction) From this system fied the transaction can identify $hether to run onine or in

atch input mode

copy SAP AG BC420 12-39

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 4088

040

983209 SAP AG 1999

reating a Session 9rom the Recording

Recordingnl( contains the data

from the recording

Seon name 02amp

Aoraon ampBS(eep eon

oclt dae 10102000

Cou can create a atch input session directy from the recording that you can then process using the

atch input monitor

copy SAP AG BC420 12-40

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 4188

046

983209 SAP AG 1999

reating Test Data

Test Data

Recording

ranranpBC420AAe name

The file onl( contains the data from the recording

Rgt

Application Serer

Structure

Cou can create a fie from the recordingH the fie $i contain a the fieds from the recording The

fieds are added to the fie $ith the ength you specified in the definition

The fied order corresponds to the order in the recording overvie$ Technica fieds

(2356257 2324ampS5amp and so on) are incuded

The data can ony e stored on the appication server If you do not specify a path the fie is stored in

the $or directory of the appication server

If the specified test fie aready eists the ne$ data record is added to this fie

copy SAP AG BC420 12-41

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 4288

04amp

983209 SAP AG 1999

ed conen

reating a Program

Recording

ZBC420ampProram name

Transfer Program

e daa

ead =rom =e

ran=er =rom recordn

reate

9ile nameTest data

ranranpBC420AA

Cou can generate a program from the recording

In the foo$ing diaog o enter a program name In addition you can choose the type and method

for fiing the maintained fied contents from the recorded screens

4se the vaues used for the recording If you reuire feie data transfer you $i have to modify

this program ater

ParameteriDe the input vaues and read these vaues from a fie A data structure is created for

parameteriDationH the data records are read from an eterna fie into this data structure The

program assumes the fie $as taiored to this data structure

If you have decided to parameteriDe the input vaues you shoud aso create a test fie during

generation To do this seect the checo and enter a name for the fie

The attriute maintenance screen of the AAP editor appears aintain the attriutes and save the

program

copy SAP AG BC420 12-42

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 4388

04

983209 SAP AG 1999

Program 9unctions

Online

transaction

Transfer program

To

error

1rror

ption 6ption ampFlat SAP

structure

Monitor

Cou have no$ generated a data transfer program for importing data into the amp System The

program can eecute the data transfer using atch input or ca transaction

If you choose option 1 and there is an error the data record is paced into a atch input session

copy SAP AG BC420 12-43

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 4488

044

983209 SAP AG 1999

Benerating 9unction Modules

Recording

Zcreaedeor ncon mode

ncon rop

Sor eD

ZBC420

Creae comer

9unction module

nl( one data record can be processed at a time

In the net diaog o you can generate a function modue a function group and short tet from the

recording The function modue is automaticay created in the function group

copy SAP AG BC420 12-44

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 4588

042

983209 SAP AG 1999

9unction of 9unction Modules

Online

transaction

To

error

1rror

ption 6 ption amp

9unction module

Import

Parameter 1port

parameter

Tables

M1SSTA

Monitor

S$BC

Import interface

The import interface consists of a technica part and the fieds from the recording (A parameter is

created for each input fied of the recorded transactions)

7port interface

Simpy consists of the parameter S4amp2 The function modue $i return a vaue in the system

fied SC9S4amp2 after caing ca transaction This return vaue is set to Dero if the data record has

een correcty processed (5ny appies to 2T)

If a session is created you $i e notified $hether the data record coud e paced into the session

Tae interfaceThis is used ony if the function modue $ors $ith ca transaction The tae contains a the

system messages

copy SAP AG BC420 12-45

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 4688

048

983209 SAP AG 1999

Import Interface of 9unction Module

$

Technical

fields

Data

fields

BI session or CALL TRANSACTION

Processin $ode

pdate $ode

a$e oamp BI session iamp (T initial)

Bacround user iamp (T initial)

Delete session aampter processin

Loc date oamp session

ODATA indicator

TU

MD1

UPDAT1

BRUP

US1R

=11P

ELDDAT1

DATA

Cou can use parameter 2T4 to specify $hether the function modue creates a atch input session

(2T4 E ) or updates the data record directy using ca transaction (2T4 E G)

The other parameters are fied as for a atch input session header

Note 7very time the function modue is caed a atch input session is created

If the session is to contain severa transactions proceed as foo$s

ltenerate the transaction severa times This can e achieved y recording the transaction again The

function modue interface $i then contain more than one transaction -hen the function modue is

caed severa transactions can e generated for each session

copy SAP AG BC420 12-46

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 4788

043

983209 SAP AG 1999

The Transaction Recorder

PrinciplesPrinciples

Recording )ith the LSMWRecording )ith the LSMW

Principles of atch Input and all TransactionPrinciples of atch Input and all Transaction

Integrating the TA Program into the DWIntegrating the TA Program into the DW

Using the TA Recorder Using the TA Recorder

copy SAP AG BC420 12-47

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 4888

045

983209 SAP AG 1999

Benerated Program

9unction modules DltP1ltBRUP

DltIS1RT

DltLS1ltBRUP

AAP Program

Define structure of

data in seJuential

fileDefine D

table

pen seJuential file

pen I session

Read data recordCseJuential file

9ill D table

9ill I session gtALL TRASATI

Last data record K

lose I session

lose seJuential file

The generated program has the structure dispayed aove It uses the standard function modues for

creating atch input sessions

copy SAP AG BC420 12-48

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 4988

047

983209 SAP AG 1999

Structure of the Benerated Program

Benerated part

Define D

table

pen seJuential file

pen I session

Read data record

9ill D table

9ill I session gtALL TRASATI

Last data recordK

lose I session

lose seJuential file

Include DR16

Define filestructure

P1ltDATAS1T

P1ltBRUP

DltDPR

Dlt9I1LD

DltTRASATI

LS1ltBRUP

LS1ltDATAS1T

The generated program consists of t$o parts 9 a generated part and the incude 2amp72G8 The

incude is provided in the standard system

The incude contains the definition of the reuired 2 tae and a further seven suroutines These

suroutines eecute the foo$ing functions

5pen and cose fie

5pen and cose session

Fi 2 tae

Fi session

The generated part is the main program and cas the reevant suroutines A structure is aso

generated in the generated part to read the eterna data into the fie

See the Appendi for more information on the 2amp72G8 program

copy SAP AG BC420 12-49

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 5088

020

983209 SAP AG 1999

Structure of D Table

PRBRAM DPR D1BI 9AM 9ALPRBRAMPRBRAM DPRDPR D1BID1BI 9AM9AM 9AL9AL

SAPM90ampD 0602

R90ampD=UR 600000

R90ampDU=RS 0006

R90ampD=T=D =UA

SAPM90ampD 0660

=A6AM16 Smith

=A6PSTL 87000

=A6LAD6 US

=A6SPRAS 1

SAPM90ampD 06amp0

=A6ST1B US6amp428357DDATA

PRBRAM

DPR

D1BI

9AM

9AL

EAR

UM

EAR

EAR

EAR

40

4

6

6amp

6amp

D Module pool

D Screen number

D Start of screen

D 9ield name

D 9ield contents

9ield ame T(pe Length Short Tet

AAP Dictionar(

The 2 tae has the same structure as in a standard transfer

copy SAP AG BC420 12-50

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 5188

026

983209 SAP AG 1999

Read Structure

Recording

DATA BEGIN OF record data element BUKRS bukr$amp data element KTOKD ktokd$amp data element NA(EG) name$+amp data element SORT ortl$ampEND OF record-

record

Automaticall( generated

from recording

The structure of the fie is automaticay generated and is a$ays defined $ith the name amp725amp

The generated structure a$ays has the same ayout 7ach fied is defined y t$o generated ro$s

The first ro$ is a$ays a comment ro$ containing the tet J data eement and the data eement of

the screen fied from the recording In the net ro$ the fied itsef is defined $ith the name of the

data eement foo$ed y a three9digit position numer $hich specifies the ocation in the structure

The ength of the fied is set y the ength of the data eement If a fied is not defined through a data

eement the system uses the ength of the screen fied

copy SAP AG BC420 12-51

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 5288

02amp

983209 SAP AG 1999

pening and losing the 9ile

P1ltDATAS1T

LS1ltDATAS1T

FOR( oendataet USING dataet-O)EN DATASET dataet IN TET (ODE-

IF S01SUBR2 34 - 5RITE 6 te7t1e S01SUBR2-STO)-

ENDIF-

ENDFOR(-

FOR( cloedataet USING dataet-2OSE DATASET dataet-

ENDFOR(-

Include

DR16

The suroutine 5P7N3ATAS7T opens the seuentia fie

The suroutine 2+5S73ATAS7T coses the seuentia fie

copy SAP AG BC420 12-52

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 5388

02

983209 SAP AG 1999

9unction Modules for I Program

lient

Session name

Eold date

=eep session

D user name

RecordK

LI1T

BRUP

ELDDAT1

=11P

US1R

R1RD

DltP1ltBRUPDltP1ltBRUP

Transaction code

D table

TD1

DPRTA

DltIS1RTDltIS1RT

DltLS1ltBRUPDltLS1ltBRUP

pen Isessionpen Isession

Insert data for

transactions

Insert data for

transactions

lose I

session

lose I

session

The foo$ing function modues are provided for creating atch input sessions (function group

S2)

235P7N3ltamp54P

2reates a ne$ session and contains genera data for the $hoe session

23INS7ampT

Inserts a the data for a transaction into the session The transferred interna tae $ith the

structure 2ATA must contain a the data reuired for fuy processing the transaction

232+5S73ltamp54P

2oses the session after a the data has een inserted As soon as the session has een cosed it

can e processed

The interna tae $ith the structure 2ATA can ony contain atch input data for one singe

transaction run So the individua transactions are inserted into the atch input session in a oop

using severa 23INS7ampT cas

copy SAP AG BC420 12-53

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 5488

024

983209 SAP AG 2001

9unction Module DltP1ltBRUP

ALL 9UTI DltP1ltBRUPALL 9UTI DltP1ltBRUP

1PRTIB

LI1T client

BRUP session name

ELDDAT1 loc+ date

=11P delete flag

US1R bdc user name

R1RD recording

IMPRTIB

NID internal session +e(

11PTIS

1PRTIB

LI1T client

BRUP session name

ELDDAT1 loc+ date

=11P delete flag

US1R bdc user name

R1RD recording

IMPRTIB NID internal session +e(

11PTIS

-ith the function modue 235P7N3ltamp54P you can open a atch input session

The foo$ing parameters are mandatory

2+I7NT (cient)

ltamp54P (session name)

4S7amp (user name)

Note The 4S7amp must a$ays e specified This user name is reuired for processing the session

in atch mode

The foo$ing parameters are optiona

=5+AT7 specifies the eariest date on $hich the session can e started677P fag specifies $hether session shoud e deeted after it has een successfuy processed The

677P fag is ignored if the session contains errors

677P E K K means deete the session after processing (defaut vaue) H

677P E KGK means do not deete session

amp725amp E KGK ao$s you to create a recording instead of a I session

If gtI is specified the function modue returns the interna session ey This is needed to e ae to

differentiate sessions that have the same name

-ith 7G27PTI5NS you get various return vaues that can e ueried $ith SC9S4amp2

Note In onine mode the onine user is used for the authoriDation checs regardess of the user

name specified

copy SAP AG BC420 12-54

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 5588

022

983209 SAP AG 1999

Subprogram P1ltBRUP

P1ltBRUP

FOR( oen8rou-IF e9on -

2A FUN2TION BD2O)ENGROU) E)ORTING 2IENT lt1mandt GROU) 8rou USER uer KEE) kee

=ODDATE gtolddate-

ENDIF-ENDFOR(-

Include

DR16

The suprogram 5P7N3ltamp54P opens the atch input session

copy SAP AG BC420 12-55

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 5688

028

983209 SAP AG 1999

9unction Module DltIS1RT

ALL 9UTI DltIS1RTALL 9UTI DltIS1RT

IMPRT

TD1 Transaction code

PSTltLAL Update locall(

PRITIB print list

TAL1S DPRTA bdclttable

11PTIS

IMPRT

TD1 Transaction code

PSTltLAL Update locall(

PRITIB print list

TAL1S DPRTA bdclttable

11PTIS

-ith the function modue 23INS7ampT you can add transaction data to the session

Cou need an interna 2 tae to transfer the data

The foo$ing parameters are mandatory

T257 Transaction code

CNPamp5TA 2 tae

The foo$ing parameters are optiona

P5ST3+52A+ E KGK activates oca updating This means that the data to e updated is ept in the

appication server and updated in the ast step of the transaction This does not invove the update

process (For more information see course 28 Programming ataase 4pdates)

PampINTINlt E KGK 9 ists processed in I $i e printed immediatey -ith 7G27PTI5NS you get various return vaues that can e ueried $ith SC9S4amp2

copy SAP AG BC420 12-56

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 5788

023

983209 SAP AG 1999

Subprogram DltTRASATI

DltTRASATI

FOR( BD2TRANSA2TION USING tcode-

IF e9on -2A FUN2TION BD2INSERT

E)ORTING T2ODE tcode TABES D0N)ROTAB bdcdata-

ESE-

ENDIF-ENDFOR(-

T

Include

DR16

The suprogram 23TampANSA2TI5N moves the fied 2 tae either to a atch input session

or uses ca transaction to import the data into the system 5n the seection screen you can specify

$hether you $ant to create a session or you $ant to use ca transaction to process the data directy

The S7SSI5N fied is then set according to your seection

copy SAP AG BC420 12-57

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 5888

025

983209 SAP AG 1999

9unction Module DltLS1ltBRUP

ALL 9UTI DltLS1ltBRUP

11PTIS

TltP1 6

NU1U1lt1RRR amp

-ith the function modue 232+5S73ltamp54P you can cose a atch input session

In 7G27PTI5NS you get various return vaues that can e ueried $ith SC9S4amp2

copy SAP AG BC420 12-58

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 5988

027

983209 SAP AG 1999

Subprogram LS1ltBRUP

FOR( cloe8rou-IF e9on -cloe batcgt 9nut 8rou

2A FUN2TION BD22OSEGROU)-

ESE-IF e8rouoened -

2A FUN2TION BD22OSEGROU)-

ENDIF-ENDIF-

ENDFOR(-

LS1ltBRUPlose session

lose error session

Include

DR16

The suprogram 2+5S73ltamp54P coses the atch input session The suprogram differentiates

et$een a norma I session (S7SSI5N E G) and a session opened $hen ca transaction

encountered an error (73ltamp54P35P7N7 E G)

copy SAP AG BC420 12-59

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 6088

080

983209 SAP AG 1999

Subprograms DltDPRG Dlt9I1LD

DltDPR

Dlt9I1LD

FOR( bdc9eld USING nam al-IF al 34 nodata-2EAR bdcdata- bdcdata1nam nam- bdcdata1al al- A))END bdcdata-ENDIF-

ENDFOR(-

FOR( bdcdltnro USING ro8ram dltnro- 2EAR bdcdata-Bdcdata1ro8ram ro8ram-Bdcdata1dltnro dltnro-Bdcdata1dltnbe89n - A))END bdcdata-ENDFOR(-

Include

DR16

The incude 2amp72GG contains t$o suprograms 23CNPamp5 and 23FI7+

Suprogram 23CNPamp5 fis the 2 tae $ith program names and screen numers

Suprogram 23FI7+ fis the 2 tae $ith fied names and vaues

7ach suprogram creates an entry in the 2 tae

copy SAP AG BC420 12-60

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 6188

086

983209 SAP AG 1999

9illing the D Table

erorm bdcdltnro u9n8 SA)(FD +- erorm bdc9eld u9n8 BD22URSOR RFD1BUKRS- erorm bdc9eld u9n8 BD2OK2ODE 6- erorm bdc9eld u9n8 RFD1BUKRS record1BUKRS- erorm bdc9eld u9n8 RFD1KTOKD record1KTOKD-

erorm bdcdltnro u9n8 SA)(FD -

erorm bdc9eld u9n8 BD22URSOR KNA1S)RAS- erorm bdc9eld u9n8 BD2OK2ODE 6- erorm bdc9eld u9n8 KNA1NA(E record1NA(E-

erorm bdc9eld u9n8 KNA1SORT record1SORT-

Recording Benerated automaticall(

from the recording

)ERFOR( bdcdltnro USING SA)(FD +- )ERFOR( bdc9eld USING BD22URSOR RFD1BUKRS-)ERFOR( bdc9eld USING BD2OK2ODE 6-)ERFOR( bdc9eld USING RFD1BUKRS record1BUKRS-)ERFOR( bdc9eld USING RFD1KTOKD record1KTOKD-

)ERFOR( bdcdltnro USING SA)(FD -

)ERFOR( bdc9eld USING BD22URSOR KNA1S)RAS-)ERFOR( bdc9eld USING BD2OK2ODE 6-)ERFOR( bdc9eld USING KNA1NA(E record1NA(E-

)ERFOR( bdc9eld USING KNA1SORT record1SORT- ---

The 2 tae is fied $ith data from the recording The suroutines 23CNPamp5 and

23FI7+ are used for this

The suroutines are caed in the reuired structure or seuence

copy SAP AG BC420 12-61

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 6288

08amp

983209 SAP AG 1999

erie)

SAPDatabase

SeJuential9ile

SAPDatabase

ALL TRASATIALL TRASATI

SeJuential9ile

ATE IPUTATE IPUT

D TableD TableD TableD Table

I Monitor

T

In contrast to atch input you can use ca transaction to directy pass data to the diaog interface

$ithout using a atch input session Cou use an interna tae (2 tae same structure and ayout

as atch input) to temporariy store your screen data Then you ca the desired transaction in your

program

Note 5n average the 2a Transaction method is 8 to times faster than using atch Input

copy SAP AG BC420 12-62

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 6388

08

983209 SAP AG 1999

all Transaction Program$ 1ample

RE)ORT abcbdcdcdeb9ct-

)ARA(ETERS d9mode DEFAUT A

udmode DEFAUT S-FOR( calltranact9on-2A TRANSA2TION FD

USING bdcdata (ODE d9mode

U)DATE udmode-

IF lt1ubrc NE - 5RITE 6 ---

ENDIF-ENDFOR(-

Screen

00

Screen

100

Screen

An additiona system ro area is added for the caed transaction The system uses this area for

processing the individua screens in the transactionH the data from the tae is added here After the

transaction is processed the second ro area is reeasedH the system continues processing in the first

ro area

Notes

In contrast to atch input there is no error ogging (error sessions) here For processing the caed

transaction the system uses the authoriDations of the user that caed the transaction The 2 tae

can ony hod data for one transaction run at a time efore another transaction is caed and its data

can e added you must eecute a amp7Famp7S= for the 2 tae

copy SAP AG BC420 12-63

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 6488

084

983209 SAP AG 1999

ALL TRASATI C6

RE)ORT 777-

2A TRANSA2TION FD USING bdcdata (ODE E-

Default for MD1 is A

2A TRANSA2TION 3tranact9oncode4 USING 3bdc1table4 C (ODE A E N C-

-ith the parameter 57 you can seect a specific dispay mode for processing the transaction The

foo$ing three modes are avaiae

A (ispay a)

If you eecute the program a the screens and a their data are dispayed This is the defaut vaue

for the 57 in 2A++ TampANSA2TI5N

N (ispay nothing)

The screens are not dispayed at a regardess of $hether any of them contained errors As soon as

the transaction has een fuy processed contro is returned to your program (The vaue of the

parameter 4PAT7 determines $hether dataase updates are eecuted or not)

7 (ispay errors ony)As soon as an error occurs in a screen the transaction is s$itched to dispay mode so that you can

correct the errors

These dispay modes are the same as those in the atch input session processing

copy SAP AG BC420 12-64

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 6588

082

983209 SAP AG 1999

RE)ORT 777-

2A TRANSA2TION FD USING BD2DATA U)DATE -

ALL TRASATI Camp

RE)ORT 777-

2A TRANSA2TION FD USING bdcdata U)DATE -

2A TRANSA2TION 3tranact9oncode4 USING 3bdc1table4 C (ODE A E N C U)DATE A S C -

Default for UPDAT1 is A

-ith the parameter 4PAT7 you can contro ho$ dataase updates arising from a transaction are

carried out There are three options

A (asynchronous updating) The caed transaction does not $ait unti the dataase has een

updated it simpy for$ard the updates to the SAP update service This usuay speeds up the 2T

program This processing mode is N5T recommended for arge data sets as the caed transaction

does not receive a competion message from the update modue

The caing 2T program therefore cannot te if the transaction has een successfuy competed Cou

shoud use the updating administration function (transaction S8) to determine $hether updating

$as terminated eary The error anaysis correction functions for are ess hepfu than $ith

synchronous updating

S (synchronous updating) -ith synchronous updating the caed transaction $aits unti a the

updates have een competed So processing is so$er than $ith synchronous updating The caed

transaction can ho$ever report any updating errors to the program $hich maes error

anaysiscorrection easier

+ (local updating) $ith oca updating the dataase is not updated in a separate process it is

updated in the caers process (see appication hep documentation for the AAP ey$ord S7T

4PAT7 TAS6 +52A+)

copy SAP AG BC420 12-65

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 6688

088

983209 SAP AG 1999

ALL TRASATI C

RE)ORT 777-DATA mtab T0)E TABE OF bdcm8coll-

2A TRANSA2TION FD USING bdcdata (ESSAGES INTO mtab-

2A TRANSA2TION 3tranact9oncode4 USING 3bdc1table4 C (ODE A E N C U)DATE A S C (ESSAGES INTO 3metab4 C -

7SSAlt7S specifies that a system messages that are output during the eecution of a 2A++

TampANSA2TI5N are $ritten to the interna tae L7SSTA The interna tae must have the

structure 2Slt25++

4nie the cassica atch input processing $ith sessions 2A++ TampANSA2TI5N does not offer any

specia processing procedures for transactions containing errors There are no restart functions for

transactions that contain errors or that cause updating terminations

copy SAP AG BC420 12-66

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 6788

083

983209 SAP AG 1999

ALL TRASATI C4

RE)ORT 777-DATA mltot T0)E ctuaram-

2A TRANSA2TION FD USING BD2DATA

O)TIONS FRO( mltot-

2A TRANSA2TION 3tranact9oncode4 USING 3bdc1table4 C (ODE A E N C U)DATE A S C (ESSAGES INTO 3metab4 C O)TIONS FRO( ot C -

RE)ORT 777-DATA mltot T0)E ctuaram-2A TRANSA2TION FD USING bdcdata

O)TIONS FRO( mltot-

The addition 5PTI5NS enaes the ca transaction statement to e controed through a structure

The structure must have the dictionary type 2T43PAampAS

The addition 5PTI5NS Famp5 must not e comined either $ith the addition 57 or $ith

4PAT7 ore information on the net side

copy SAP AG BC420 12-67

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 6888

085

983209 SAP AG 1999

Structure TUltPARAMS

DISMD1 Procen mode anaoo o addon amp

UPDMD1 $pdae mode anaoo o addon $PA

ATTMD1 CA mode CA conro

D19SI1 orce de=a EndoE e drn procen

RAMMIT +o eD a Camp amp(

IPT +o a ac np eonF a F S-B+P SPAC

I1D +o a ac np eon a=er end o= BC daa

The components are defined as foo$s

The components 7FSIM7 ampA25IT N5INPT and N5I7N can have the foo$ing

vaues KGK E Ces or K K E No

If the addition 5PTI5NS Famp5 is not specified the foo$ing settings appy to the contro

parameters

IS57 from addition 57

4P57 from addition 4PAT7

2ATT57 2ATT not active

7FSIM7 o not not use defaut $indo$s siDe

ampA25IT Successfu eit at 25IT -5amp6

N5INPT atch input session active (SC9INPT E G)

N5I7N atch input session sti active after end of 2 data

copy SAP AG BC420 12-68

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 6988

087

983209 SAP AG 1999

SMSBID Message ID

SMSBT Message T(pe C1GIGWGSGA

SMSB Message umber

SMSB6 Message ariable 6

SMSBamp Message ariable amp

SMSB Message ariable

SMSB4 Message ariable 4

SMSBID Message ID

SMSBT Message T(pe C1GIGWGSGA

SMSB Message umber

SMSB6 Message ariable 6

SMSBamp Message ariable amp

SMSB Message ariable

SMSB4 Message ariable 4

Return code$

S(stem fields$

alue Meaning

0 Successful

6000 1rror in transaction

6000 1rror in processing call transaction

see also the s(stem fields specified

alue Meaning

0 Successful

6000 1rror in transaction

6000 1rror in processing call transaction

see also the s(stem fields specified

9ield name Meaning9ield name9ield name MeaningMeaning

Return ode and S(stem 9ields

The return code is used to specify $hether the caed transaction $as processed successfuy In

addition severa system fieds are fied The numer I type and variaes of the diaog message

output y the caed transaction Cou need this information to output the message tet

copy SAP AG BC420 12-69

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 7088

030

983209 SAP AG 1999

Benerated Program of the TA Recorder

REFRES= (ESSTAB-

2A TRANSA2TION tcode USING bdcdata (ODE ctumode U)DATE cudate (ESSAGES INTO metab-OO) AT metab- ENDOO)-IF lubrc 34 AND e8rou 34 S)A2E- IF e8rouoenend - 2A FUN2TION BD2O)ENGROU) E)ORTING ---------

--------- E8rouoened - ENDIF- 2A FUN2TION BD2INSERT E)ORTING T2ODE tcode TABES D0N)ROTAB bdcdata-ENDIF-REFRES= bdcdata-

Message table output

pen error session

Insert data record that

has errors into error

session

If you have seected ca transaction on the seection screen the generated program runs as foo$s

The onine transaction is caed $ith ca transaction and passed to tae 2ATA A the

messages arising during the ca transaction are put in the interna tae 7SSTA

7SSTA is output as a ist

If you have specified an error session ( 73ltamp54P L SPA27) on the seection screen and the

ca transaction comes across an error (+3S4amp2 L 0) the error session is opened The error

session is ho$ever ony opened once Then the data record is paced in the session

A the other data records that have errors $ith ca transaction are paced in the same session

copy SAP AG BC420 12-70

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 7188

036

983209 SAP AG 1999

The Transaction Recorder

PrinciplesPrinciples

Recording )ith the LSMWRecording )ith the LSMW

Principles of atch Input and all TransactionPrinciples of atch Input and all Transaction

Integrating the TA Program into the DWIntegrating the TA Program into the DW

Using the TA Recorder Using the TA Recorder

copy SAP AG BC420 12-71

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 7288

03amp

983209 SAP AG 1999

Integrating into the DW

Transfer program

AAP Dictionar(

Integrate

SDA0

SDA6

SDAamp

SDA

Cou can integrate the generated program into the G9- The structure of the fie must e created

in the AAP ictionary The taes SGA0 SGA8 SGA1 and SGA $i e fied

copy SAP AG BC420 12-72

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 7388

03

983209 SAP AG 1999

DW Release 42

Goo

-B eeae 45

aa ran=er ogtec

Int customer data transfer ob-ect

ecord =ed

Dece daa ran=er

d Goo

The ampunction ampor interatin TA recorder prora$s is

i$ple$ented in the

D+-B in Release

The recorder can e integrated as of ampeease and it is provided in the G9- ampeease

ltot to the G9- ampeease 5n the initia screen you can integrate programs y choosing ampoto

( +nt customer ata transfer o-ect

copy SAP AG BC420 12-73

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 7488

034

983209 SAP AG 1999

reating Program as D b-ect

Comer ran=er ogtec

ampgtec ype

Sor eD =or ogtec

aa ran=er proram

Srcre name

9900

(+A1

Cane comer

ZBCA+G

ZB

ustomer transfer ob-ect

umber bet)een 7000 and 7777

b-ect t(pe

Assignment to R ob-ect

Short tet for D ob-ectShort description

Data transfer program

ame of generated program

Structure name

A structure Cstructure la(out )ith this name is created in

the AAP Dictionar(

For ampeease transfer oects $ere not organiDed y 5amp oects ut y a G numer (00089

OOOO) The numer range O0009OOOO is reserved for customers

To create a connection to the ne$ G 9- you must assign the program to a 5amp oect

2reate a short tet for the G oect This tet $i appear in the method seection ist

Specify the program to e incuded

Specify a name for the structure to e created in the AAP ictionary

Note $he generated program appears under program type +N and not under program type

-

copy SAP AG BC420 12-74

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 7588

032

983209 SAP AG 1999

Adantages

Automatic program registration in the DW in

Release 48

ou can use all the functions defined for

standard ob-ects

1ception$ The (reate ampile ith data

function

If you incuded the oect in the ampeease $orench it is automaticay avaiae in the ampeease

B $orench

A the $orench functions are avaiae for your oect ecept for Create files ith transfer ata

copy SAP AG BC420 12-75

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 7688

038

983209 SAP AG 1999

ou are no) able to$

The Transaction Recorder$ Unit Summar(

Use the recording function in the LSMW to create

a batch input session )ith the data from the

eternal s(stem

Use the TA Recorder to create (our o)n data

transfer program

Anal(e programs that )or+ )ith batch input or

call transaction

Integrate the TA Recorder programs into the

DW

copy SAP AG BC420 12-76

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 7788

ercise 1

nit $ -ecorder

$opic 2reating etors

$ransaction -ecorder ercise 1

bull 2reating detors $ith eterna numer assignment

bull etor numers M9980008 to M9980080

Address data for detors $ith eterna numer assignment is to

e transferred using program ampFI700

ro4ect F5

Supro4ect +5

-un +575

$as)s 85 95 8S25

9oad program -F+00

8 In the foo$ing eercises eisting data is to e changed Therefore these detors $ith

eterna numer assignment have to first e created

898 4nder suproect 79 create run 797G9 $ith the name Detors ith

eternal numers

copy SAP AG BC420 12-77

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 7888

891 2reate the foo$ing three tass The tass map the foo$ing process steps

convert data create + session and process + session

89198 In run 797G9 create the foo$ing tas

9 Tas AP9

9 Name 2onvert data 9 Tas type AP

9 Program type +S-

Seect the foo$ing +S- oect

+S- proect 2109

+S- suproect 7I9

+S- oect I997GT

89191 In run 797G9 create the foo$ing tas 9 Tas +5A9

9 Name 2reate I session

Tas type +5A

9 Program type INP

Seect program ampFI700 $ith the variant

I97G9

8919 In run 797G9 create the foo$ing tas

9 Tas S29

9 Name Process I session Tas type S2

9 Program type amp7P5

Seect program ampS2S4 $ith the variant

S497G9

Note that you have to correct the seuence of the tass 2onvert data

create + session and process + session

4se the uttons

89 Start the run

The detors $i e created $ith eterna numer assignments

89 2hec in transaction F0 that the detors M9980008 to M9980080 have een

created

copy SAP AG BC420 12-78

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 7988

ercise

nit $ransaction -ecorder

$opic -ecording function in the 9S8(

bull 2reate a recording using the +S-

bull ltenerate a atch input session

2hange the detor address data in the amp System

Name of the recording +

Name of the file +2055+F9

8 2reate the recording 7I3 using the +S- ampecord the transaction F01 (2hange

detor)

898 efore you create the recording first test the transaction onineQ

For the recording use detor M9980008 5n the initia screen of the F01

maintain the foo$ing fieds ony

etor etor M9980008

2ompany code 0008

Address data seect

Note $he data record must e saved hile recording

891 aintain the names and the descriptions for the foo$ing fieds

Name city street posta code and teephone numereete a other fieds in screen 880 from the recording (eg S5ampT+ +AN8

SPampAS)

4se the same technica names as sho$n in the tae eo$ (automatic fied

mapping)

copy SAP AG BC420 12-79

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 8088

1 2reate the suproect 7I9 and the ne$ oect TA3 in your proect 2109

aintain the oect attriutes and seect the item atch input recording Seect your

recording 7I3

2reate the source structure address

2reate the source fieds according to the tae eo$ 5r copy them from proect 2109S37N suproect 7I900 oect TA900

198 Fie setup The data from the egacy system are dispayed in the foo$ing tae

Fied name Fied type Fied ength escription

N5 2 8B etor numer

NA7 2 Name

STamp77T 2 Street

2ITC 2 2ityPace of residence

MIP 2 80 Posta code

T7+ 2 8B Teephone numer

191 aintain the fied mapping 4se the automatic fied mapping (via menu item

7tras)

19 Specify the fies 5ny maintain the fie name of the source fie

Name of the fie 21099IFI+7

2odepage 8800

19 Import the data and convert them ispay the data in each caseQ

19 2reate a atch input session

19B ampun the atch input session

copy SAP AG BC420 12-80

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 8188

ercise 3

nit $ransaction -ecorder

$opic -ecording ith the $ -ecorder

bull ltenerate a recording using the TA recorder

bull Test the recording

2hange the address data of detors in the amp system

Name recording $+

Name of the file +2055+F9

8 2reate the recording TA37I3 using the transaction recorder ampecord the

transaction F01 (change detor)

898 4se detor M9980008 for the recording 5n the F01 initia screen ony

maintain the foo$ing fieds

etor etor M9980008

2ompany 2ode 0008

Address data seect

Note $he data record must e saved hen recording

eete a fieds that do not eist in the source fie 21099IFI+7 from screen

880 in the recording (eg 6NA89S5ampT+ 6NA89+AN8 6ANNQ9SPampAS) Note o not deete fieds ampF01946ampS and ampF0190880

Save the recording no$

1 S$itch to the recordings overvie$

198 Process the recording $ith the processing mode A (dispay a)

191 Process the recording $ith the processing mode RN (no dispay)

19 If the recording has een tested and no error has occurred generate a I session

and run it using the I monitor If an error shoud occur generate the recordingagainQ

copy SAP AG BC420 12-81

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 8288

From the recording generate the program M21037I3 in your deveopment cass

2109 Seect the foo$ing

bull ampead fied contents from fie

bull 2reate test data in the fie 2103dei3test3tt

98 Save this program and eecute it ltenerate one I session each and process it

2arry out the same steps again using the ca transaction

The generated program shoud no$ e changed so that fie 21099IFI+7 can e

read and processed

98 2hange the defaut vaue of the fie name (parameter dataset) in 21099

IFI+7

91 2hange the structure definition eete the company code fied and the address

data checo from the structure

9 2hange the su9routine ca perform dc3fied for the company code (KampF019

46ampSK) so that the vaue 0008 is transferred

9 2hange the su9routine ca perform dc3fied for the address data checo

(KampF0190880K) so that the vaue G is transferred

9 Start the program again and read the data from the fie 21099IFI+7 $ith

detor data ltenerate a I session $ith it and run it

copy SAP AG BC420 12-82

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 8388

033 Include DR16INCLUDE BDCRECX1

SELECTION-SCREEN BEGIN OF LINE

PARAMETERS SESSION RADIOBUTTON GROUP CTU create sessi SELECTION-SCREEN COMMENT $amp TEXT-S FOR FIELD SESSION

se(ecti-scree )siti +

PARAMETERS CTU RADIOBUTTON GROUP CTU ca(( trasacti

SELECTION-SCREEN COMMENT $amp TEXT-S FOR FIELD CTU

SELECTION-SCREEN END OF LINE

SELECTION-SCREEN BEGIN OF LINE

SELECTION-SCREEN COMMENT $amp TEXT-S1 FOR FIELD GROUP

se(ecti-scree )siti $+

PARAMETERS GROUP1$amp r) ae 0 sessi

SELECTION-SCREEN COMMENT $amp TEXT-S+ FOR FIELD CTUMODE

se(ecti-scree )siti

PARAMETERS CTUMODE LIE CTU2PARAMS-DISMODE DEFAULT 3N3

A4 s56 a(( 78)rs

E4 s56 78)r errr (8

N4 7 t 7is)(a8 78)r

SELECTION-SCREEN END OF LINE

SELECTION-SCREEN BEGIN OF LINE

SELECTION-SCREEN COMMENT $amp TEXT-S$ FOR FIELD USER

se(ecti-scree )siti $+

PARAMETERS4 USER1$amp DEFAULT S9-UNAME ser 0r sessi i atc5

SELECTION-SCREEN COMMENT $amp TEXT-S FOR FIELD CUPDATE

se(ecti-scree )siti

PARAMETERS CUPDATE LIE CTU2PARAMS-UPDMODE DEFAULT 3L3

S4 s8c5rs(8

A4 as8c5rs(8

L4 (ca(

SELECTION-SCREEN END OF LINE

SELECTION-SCREEN BEGIN OF LINE

SELECTION-SCREEN COMMENT $amp TEXT-S FOR FIELD EEP

se(ecti-scree )siti $+

PARAMETERS4 EEP AS CltECBOX 3 3 = 7e(ete sessi i0 0iis5e7

3X3 = gtee) sessi i0 0iis5e7

SELECTION-SCREEN COMMENT $amp TEXT-S FOR FIELD E2GROUP

copy SAP AG BC420 12-83

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 8488

se(ecti-scree )siti

)araeters E2GROUP1$amp r) ae 0 errr-sessi

SELECTION-SCREEN END OF LINE

SELECTION-SCREEN BEGIN OF LINE

SELECTION-SCREEN COMMENT $amp TEXT-S FOR FIELD ltOLDDATE

se(ecti-scree )siti $+

PARAMETERS4 ltOLDDATE LIE S9-DATUM

SELECTION-SCREEN COMMENT +11amp TEXT-S$ FOR FIELD E2USER

se(ecti-scree )siti

PARAMETERS4 E2USER1$amp DEFAULT S9-UNAME ser 0r errr-sessi

SELECTION-SCREEN END OF LINE

SELECTION-SCREEN BEGIN OF LINE

SELECTION-SCREEN COMMENT +11amp TEXT-S FOR FIELD E2EEP

se(ecti-scree )siti

PARAMETERS4 E2EEP AS CltECBOX 3 3 = 7e(ete sessi i0 0iis5e7

3X3 = gtee) sessi i0 0iis5e7

SELECTION-SCREEN END OF LINE

SELECTION-SCREEN BEGIN OF LINE

SELECTION-SCREEN COMMENT +11amp TEXT-S FOR FIELD E2ltDATE

se(ecti-scree )siti

PARAMETERS4 E2ltDATE LIE S9-DATUM

SELECTION-SCREEN END OF LINE

SELECTION-SCREEN SIP

SELECTION-SCREEN BEGIN OF LINE

SELECTION-SCREEN COMMENT 1amp TEXT-S1 FOR FIELD NODATA

PARAMETERS4 NODATA DEFAULT 33 LOER CASE 7ata

SELECTION-SCREEN END OF LINE

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

Batc5i)t7ata 0 si(e trasacti

DATA4 BDCDATA LIE BDCDATA OCCURS ITlt ltEADER LINE

essaes 0 ca(( trasacti

DATA4 MESSTAB LIE BDCMSGCOLL OCCURS ITlt ltEADER LINE

errr sessi )ee7 3 3 r 3X3amp

DATA4 E2GROUP2OPENED

essae tets

TABLES4 T1

copy SAP AG BC420 12-84

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 8588

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

at se(ecti scree

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

AT SELECTION-SCREEN

r) a7 ser st e 0i((e7 0r create sessi

IF SESSION = 3X3 AND

GROUP = SPACE OR USER = SPACE

MESSAGE E1MSamp

ENDIF

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

)e 7ataset

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

FORM OPEN2DATASET USING P2DATASET

OPEN DATASET P2DATASET IN TEXT MODE

IF S9-SUBRC

RITE4 TEXT-E S9-SUBRC

STOP

ENDIF

ENDFORM

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

c(se 7ataset

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

FORM CLOSE2DATASET USING P2DATASET

CLOSE DATASET P2DATASET

ENDFORM

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

create atc5i)t sessi

t 0r ca(( trasacti siamp

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

FORM OPEN2GROUP

IF SESSION = 3X3

SIP

RITE4 $amp 3Create r)3I1amp GROUP

SIP

)e atc5i)t r)

CALL FUNCTION 3BDC2OPEN2GROUP3

EXPORTING CLIENT = S9-MANDT

copy SAP AG BC420 12-85

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 8688

GROUP = GROUP

USER = USER

EEP = EEP

ltOLDDATE = ltOLDDATE

RITE4 amp 3BDC2OPEN2GROUP3I$amp

1$amp 3retrc7e43I+amp

S9-SUBRC

ENDIF

ENDFORM

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

e7 atc5i)t sessi

ca(( trasacti si4 errr sessiamp

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

FORM CLOSE2GROUP

IF SESSION = 3X3

c(se atc5i)t r)

CALL FUNCTION 3BDC2CLOSE2GROUP3

RITE4 amp 3BDC2CLOSE2GROUP3Iamp

1$amp 3retrc7e43I+amp

S9-SUBRC

ELSE

IF E2GROUP2OPENED = 3X3

CALL FUNCTION 3BDC2CLOSE2GROUP3

RITE4

RITE4 amp 3Fe5(era))e 6r7e eret3Iamp

ENDIF

ENDIF

ENDFORM

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

Start e6 trasacti accr7i t )araeters

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

FORM BDC2TRANSACTION USING TCODE

DATA4 L2MSTRINGamp

DATA4 L2SUBRC LIE S9-SUBRC

atc5 i)t sessi

IF SESSION = 3X3

CALL FUNCTION 3BDC2INSERT3

EXPORTING TCODE = TCODE

TABLES D9NPROTAB = BDCDATA

RITE4 3BDC2INSERT3Iamp

copy SAP AG BC420 12-86

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 8788

TCODE

3retrc7e43I+amp

S9-SUBRC

3RECORD43

S9-INDEX

ca(( trasacti si

ELSE

REFRESlt MESSTAB

CALL TRANSACTION TCODE USING BDCDATA

MODE CTUMODE

UPDATE CUPDATE

MESSAGES INTO MESSTAB

L2SUBRC = S9-SUBRC

RITE4 3CALL2TRANSACTION3

TCODE

3retrc7e43I+amp

L2SUBRC

3RECORD43

S9-INDEX

LOOP AT MESSTAB

SELECT SINGLE FROM T1 ltERE SPRSL = MESSTAB-MSGSPRA

AND ARBGB = MESSTAB-MSGID

AND MSGNR = MESSTAB-MSGNR

IF S9-SUBRC =

L2MSTRING = T1-TEXT

IF L2MSTRING CS 313

REPLACE 313 ITlt MESSTAB-MSGH1 INTO L2MSTRING

REPLACE 3$3 ITlt MESSTAB-MSGH$ INTO L2MSTRING

REPLACE 33 ITlt MESSTAB-MSGH INTO L2MSTRING

REPLACE 33 ITlt MESSTAB-MSGH INTO L2MSTRING

ELSE

REPLACE 33 ITlt MESSTAB-MSGH1 INTO L2MSTRING

REPLACE 33 ITlt MESSTAB-MSGH$ INTO L2MSTRING

REPLACE 33 ITlt MESSTAB-MSGH INTO L2MSTRING

REPLACE 33 ITlt MESSTAB-MSGH INTO L2MSTRING

ENDIF

CONDENSE L2MSTRING

RITE4 MESSTAB-MSGT9P L2MSTRING$+amp

ELSE

RITE4 MESSTAB

ENDIF

ENDLOOP

copy SAP AG BC420 12-87

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 8888

SIP

Eree 0e5(era))e

IF L2SUBRC AND E2GROUP SPACE

IF E2GROUP2OPENED = 3 3

CALL FUNCTION 3BDC2OPEN2GROUP3

EXPORTING CLIENT = S9-MANDT

GROUP = E2GROUP

USER = E2USER

EEP = E2EEP

ltOLDDATE = E2ltDATE

E2GROUP2OPENED = 3X3

ENDIF

CALL FUNCTION 3BDC2INSERT3

EXPORTING TCODE = TCODE

TABLES D9NPROTAB = BDCDATA

ENDIF

ENDIF

REFRESlt BDCDATA

ENDFORM

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

Start e6 scree

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

FORM BDC2D9NPRO USING PROGRAM D9NPRO

CLEAR BDCDATA

BDCDATA-PROGRAM = PROGRAM

BDCDATA-D9NPRO = D9NPRO

BDCDATA-D9NBEGIN = 3X3

APPEND BDCDATA

ENDFORM

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

Isert 0ie(7

Page 31: BC420_46C - 012The Transaction Recorder

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 3188

06

983209 SAP AG 1999

Eierarch( Displa( of the Recording

02amp

02

SAP02 0106

BCC$Samp 02-0130

BCamp(Camp )00

02-($++ -88-10000

02-0110

02-0130

SAP02 0111

BCamp(Camp V

BCC$Samp A1AA-amp$S+$1

A1AA-S Garden Sree

Recording

-ith the TA recorder the resuts are aso a ist in a hierarchy dispay =o$ever you cannot assign

your o$n fied names as you can in the +S-

copy SAP AG BC420 12-31

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 3288

0amp

983209 SAP AG 1999

Recording erie)

Recording

Transfer program

9unction module

ontains onl( the data

from the recording

Test data

Test

reate

reate

reate

reate

1dit hange recording

Process recording

Cou can edit the recording as needed

The recording can e tested and eecuted again The screens are run through in the same $ay as in

the recording

The recording can then e used to create

atch input sessions

Test data

ata transfer programs $ith atch input or ca transaction

Function modues

copy SAP AG BC420 12-32

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 3388

0

983209 SAP AG 1999

1 02 BS

2 SAP02 106

3 BCC$Samp $SZAV

4 BCamp(Camp )00 5 02-($++ -88-10000

6 02-0110

7 02-0130

8 $SZAV

9 SAP02 111

10 BCamp(Camp V

11 BCC$Samp A1AA-amp$S+$1

12 A1AA-S Garden Sree

Program Screen St 9ield ame 9ield alue

Recording 1ditor

Recording

Add gt delete lines 9ormat chec+

Import gt eport of recording

In the editor you can add or deete ines Cou can aso change the contents of individua ines

-ith the function Chec) you can specify $hether the edited version of the recording sti has the

correct synta

Cou can aso eport import recordings to from a seuentia fie

After editing save the recording changes

copy SAP AG BC420 12-33

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 3488

04

983209 SAP AG 1999

Recording Seeral Transaction Runs

RecordingF

Directl( after the first recordingG or

In the displa( mode of the recording

In this step you can record additiona transactions and add additiona transaction runs to the

recording

Cou can record the additiona transactions directy after a recording or in the edit screen of a

recording

copy SAP AG BC420 12-34

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 3588

02

983209 SAP AG 1999

1ditor$ Importing and 1porting Recordings

6 T 9D0amp S

amp SAPM90ampD 608

DltURSR

4

2

8 SAPM90ampD 666

60

66

Program Screen St 9ield name 9ield alue

cempA

e name

aa =orma

cemp

A

e name

aa =orma

1port

Import

Presentation Serer

If the editor functions in the systems do not provide a the functions you need you can do$noad the

recording to your presentation server using the Eort function and then edit the recording using a

P2 editor

Cou use the Import function to import the data ac into the amp System ae sure the fie is sti in

the correct format

copy SAP AG BC420 12-35

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 3688

08

983209 SAP AG 1999

Processing the Recording

Recording

Process )ith ALL TRASATI

Parameer

Proce mode$pdae mode

CA mode

e=a e

Con a=er comm

+o a B eon

nd +o a B mode

A

A

T

The recording can e eecuted directy The data from the recording is used and the transaction is

processed $ith ca transaction

2a transaction provides a range of options for caing appication transactions $hich are discussed

on the foo$ing t$o pages

copy SAP AG BC420 12-36

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 3788

03

983209 SAP AG 1999

Process mode

Update mode

ATT mode

Processing Recording )ith T 6

A

1

Displa( all screens

Displa( errors onl(

o displa(

L

S

A

Local

S(nchronous

As(nchronous

A

o ATT

ATT )ithout indiidual screen control

ATT )ith indiidual screen control

Processing mode

=ere you can specify the processing mode 9 it is the same as the processing mode for atch input

4pdate mode

=ere you can specify the update mode For more information see the unit ca transaction

2ATT mode

=ere you can mae specia settings if you $ant to test the recording under 2ATT conditions (ony

necessary for 2ATT runs) Specia functions are caed in the 2ATT too for each screen at the end of

P5 and at the start of PAI

copy SAP AG BC420 12-37

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 3888

05

983209 SAP AG 1999

Default sie

ont after commit

ot a I session

1nd$ ot a I mode

Processing Recording )ith T amp

The screen standard sie is used for the

processing

ommit )or+ does not end the processing

o I mode is actie The transaction )ill run

through as in online

I mode is selected nce the data in the D

table is processedG the I mode is set to inactie

Standard siDe

If you seect this the screens are processed in the standard siDe in the foreground (in foreground or

dispay errors ony) Note the standard siDe is a$ays used for acground processing

Further after commit

The first commit $or in a transaction does not ead to the end of the recording

Note A atch input transaction is ended $ith the first commit $or

No I mode

The system fied SC9INPT is not set (SC9INPT E ) So transactions are run through as in onine

7nd No I mode

5ny use if you choose the processing mode 7 (dispay errors ony) Then the transaction is processed in the acground in atch input mode and if there is an error the screens run through in

the foreground

copy SAP AG BC420 12-38

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 3988

07

983209 SAP AG 1999

I Mode

atch input

mode

nline

Some transactions behae differentl( in batch input mode

than in online Cbatch input capabilit(

atch input mode sets the s(stem field SIPT H

Not every transaction can run the same onine and in atch input mode The transaction must decide

itsef $hether it is caed onine or in atch input mode

The system sets the system fied SC9INPT E G if the atch input mode is active (this aso appies

to ca transaction) From this system fied the transaction can identify $hether to run onine or in

atch input mode

copy SAP AG BC420 12-39

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 4088

040

983209 SAP AG 1999

reating a Session 9rom the Recording

Recordingnl( contains the data

from the recording

Seon name 02amp

Aoraon ampBS(eep eon

oclt dae 10102000

Cou can create a atch input session directy from the recording that you can then process using the

atch input monitor

copy SAP AG BC420 12-40

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 4188

046

983209 SAP AG 1999

reating Test Data

Test Data

Recording

ranranpBC420AAe name

The file onl( contains the data from the recording

Rgt

Application Serer

Structure

Cou can create a fie from the recordingH the fie $i contain a the fieds from the recording The

fieds are added to the fie $ith the ength you specified in the definition

The fied order corresponds to the order in the recording overvie$ Technica fieds

(2356257 2324ampS5amp and so on) are incuded

The data can ony e stored on the appication server If you do not specify a path the fie is stored in

the $or directory of the appication server

If the specified test fie aready eists the ne$ data record is added to this fie

copy SAP AG BC420 12-41

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 4288

04amp

983209 SAP AG 1999

ed conen

reating a Program

Recording

ZBC420ampProram name

Transfer Program

e daa

ead =rom =e

ran=er =rom recordn

reate

9ile nameTest data

ranranpBC420AA

Cou can generate a program from the recording

In the foo$ing diaog o enter a program name In addition you can choose the type and method

for fiing the maintained fied contents from the recorded screens

4se the vaues used for the recording If you reuire feie data transfer you $i have to modify

this program ater

ParameteriDe the input vaues and read these vaues from a fie A data structure is created for

parameteriDationH the data records are read from an eterna fie into this data structure The

program assumes the fie $as taiored to this data structure

If you have decided to parameteriDe the input vaues you shoud aso create a test fie during

generation To do this seect the checo and enter a name for the fie

The attriute maintenance screen of the AAP editor appears aintain the attriutes and save the

program

copy SAP AG BC420 12-42

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 4388

04

983209 SAP AG 1999

Program 9unctions

Online

transaction

Transfer program

To

error

1rror

ption 6ption ampFlat SAP

structure

Monitor

Cou have no$ generated a data transfer program for importing data into the amp System The

program can eecute the data transfer using atch input or ca transaction

If you choose option 1 and there is an error the data record is paced into a atch input session

copy SAP AG BC420 12-43

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 4488

044

983209 SAP AG 1999

Benerating 9unction Modules

Recording

Zcreaedeor ncon mode

ncon rop

Sor eD

ZBC420

Creae comer

9unction module

nl( one data record can be processed at a time

In the net diaog o you can generate a function modue a function group and short tet from the

recording The function modue is automaticay created in the function group

copy SAP AG BC420 12-44

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 4588

042

983209 SAP AG 1999

9unction of 9unction Modules

Online

transaction

To

error

1rror

ption 6 ption amp

9unction module

Import

Parameter 1port

parameter

Tables

M1SSTA

Monitor

S$BC

Import interface

The import interface consists of a technica part and the fieds from the recording (A parameter is

created for each input fied of the recorded transactions)

7port interface

Simpy consists of the parameter S4amp2 The function modue $i return a vaue in the system

fied SC9S4amp2 after caing ca transaction This return vaue is set to Dero if the data record has

een correcty processed (5ny appies to 2T)

If a session is created you $i e notified $hether the data record coud e paced into the session

Tae interfaceThis is used ony if the function modue $ors $ith ca transaction The tae contains a the

system messages

copy SAP AG BC420 12-45

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 4688

048

983209 SAP AG 1999

Import Interface of 9unction Module

$

Technical

fields

Data

fields

BI session or CALL TRANSACTION

Processin $ode

pdate $ode

a$e oamp BI session iamp (T initial)

Bacround user iamp (T initial)

Delete session aampter processin

Loc date oamp session

ODATA indicator

TU

MD1

UPDAT1

BRUP

US1R

=11P

ELDDAT1

DATA

Cou can use parameter 2T4 to specify $hether the function modue creates a atch input session

(2T4 E ) or updates the data record directy using ca transaction (2T4 E G)

The other parameters are fied as for a atch input session header

Note 7very time the function modue is caed a atch input session is created

If the session is to contain severa transactions proceed as foo$s

ltenerate the transaction severa times This can e achieved y recording the transaction again The

function modue interface $i then contain more than one transaction -hen the function modue is

caed severa transactions can e generated for each session

copy SAP AG BC420 12-46

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 4788

043

983209 SAP AG 1999

The Transaction Recorder

PrinciplesPrinciples

Recording )ith the LSMWRecording )ith the LSMW

Principles of atch Input and all TransactionPrinciples of atch Input and all Transaction

Integrating the TA Program into the DWIntegrating the TA Program into the DW

Using the TA Recorder Using the TA Recorder

copy SAP AG BC420 12-47

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 4888

045

983209 SAP AG 1999

Benerated Program

9unction modules DltP1ltBRUP

DltIS1RT

DltLS1ltBRUP

AAP Program

Define structure of

data in seJuential

fileDefine D

table

pen seJuential file

pen I session

Read data recordCseJuential file

9ill D table

9ill I session gtALL TRASATI

Last data record K

lose I session

lose seJuential file

The generated program has the structure dispayed aove It uses the standard function modues for

creating atch input sessions

copy SAP AG BC420 12-48

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 4988

047

983209 SAP AG 1999

Structure of the Benerated Program

Benerated part

Define D

table

pen seJuential file

pen I session

Read data record

9ill D table

9ill I session gtALL TRASATI

Last data recordK

lose I session

lose seJuential file

Include DR16

Define filestructure

P1ltDATAS1T

P1ltBRUP

DltDPR

Dlt9I1LD

DltTRASATI

LS1ltBRUP

LS1ltDATAS1T

The generated program consists of t$o parts 9 a generated part and the incude 2amp72G8 The

incude is provided in the standard system

The incude contains the definition of the reuired 2 tae and a further seven suroutines These

suroutines eecute the foo$ing functions

5pen and cose fie

5pen and cose session

Fi 2 tae

Fi session

The generated part is the main program and cas the reevant suroutines A structure is aso

generated in the generated part to read the eterna data into the fie

See the Appendi for more information on the 2amp72G8 program

copy SAP AG BC420 12-49

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 5088

020

983209 SAP AG 1999

Structure of D Table

PRBRAM DPR D1BI 9AM 9ALPRBRAMPRBRAM DPRDPR D1BID1BI 9AM9AM 9AL9AL

SAPM90ampD 0602

R90ampD=UR 600000

R90ampDU=RS 0006

R90ampD=T=D =UA

SAPM90ampD 0660

=A6AM16 Smith

=A6PSTL 87000

=A6LAD6 US

=A6SPRAS 1

SAPM90ampD 06amp0

=A6ST1B US6amp428357DDATA

PRBRAM

DPR

D1BI

9AM

9AL

EAR

UM

EAR

EAR

EAR

40

4

6

6amp

6amp

D Module pool

D Screen number

D Start of screen

D 9ield name

D 9ield contents

9ield ame T(pe Length Short Tet

AAP Dictionar(

The 2 tae has the same structure as in a standard transfer

copy SAP AG BC420 12-50

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 5188

026

983209 SAP AG 1999

Read Structure

Recording

DATA BEGIN OF record data element BUKRS bukr$amp data element KTOKD ktokd$amp data element NA(EG) name$+amp data element SORT ortl$ampEND OF record-

record

Automaticall( generated

from recording

The structure of the fie is automaticay generated and is a$ays defined $ith the name amp725amp

The generated structure a$ays has the same ayout 7ach fied is defined y t$o generated ro$s

The first ro$ is a$ays a comment ro$ containing the tet J data eement and the data eement of

the screen fied from the recording In the net ro$ the fied itsef is defined $ith the name of the

data eement foo$ed y a three9digit position numer $hich specifies the ocation in the structure

The ength of the fied is set y the ength of the data eement If a fied is not defined through a data

eement the system uses the ength of the screen fied

copy SAP AG BC420 12-51

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 5288

02amp

983209 SAP AG 1999

pening and losing the 9ile

P1ltDATAS1T

LS1ltDATAS1T

FOR( oendataet USING dataet-O)EN DATASET dataet IN TET (ODE-

IF S01SUBR2 34 - 5RITE 6 te7t1e S01SUBR2-STO)-

ENDIF-

ENDFOR(-

FOR( cloedataet USING dataet-2OSE DATASET dataet-

ENDFOR(-

Include

DR16

The suroutine 5P7N3ATAS7T opens the seuentia fie

The suroutine 2+5S73ATAS7T coses the seuentia fie

copy SAP AG BC420 12-52

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 5388

02

983209 SAP AG 1999

9unction Modules for I Program

lient

Session name

Eold date

=eep session

D user name

RecordK

LI1T

BRUP

ELDDAT1

=11P

US1R

R1RD

DltP1ltBRUPDltP1ltBRUP

Transaction code

D table

TD1

DPRTA

DltIS1RTDltIS1RT

DltLS1ltBRUPDltLS1ltBRUP

pen Isessionpen Isession

Insert data for

transactions

Insert data for

transactions

lose I

session

lose I

session

The foo$ing function modues are provided for creating atch input sessions (function group

S2)

235P7N3ltamp54P

2reates a ne$ session and contains genera data for the $hoe session

23INS7ampT

Inserts a the data for a transaction into the session The transferred interna tae $ith the

structure 2ATA must contain a the data reuired for fuy processing the transaction

232+5S73ltamp54P

2oses the session after a the data has een inserted As soon as the session has een cosed it

can e processed

The interna tae $ith the structure 2ATA can ony contain atch input data for one singe

transaction run So the individua transactions are inserted into the atch input session in a oop

using severa 23INS7ampT cas

copy SAP AG BC420 12-53

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 5488

024

983209 SAP AG 2001

9unction Module DltP1ltBRUP

ALL 9UTI DltP1ltBRUPALL 9UTI DltP1ltBRUP

1PRTIB

LI1T client

BRUP session name

ELDDAT1 loc+ date

=11P delete flag

US1R bdc user name

R1RD recording

IMPRTIB

NID internal session +e(

11PTIS

1PRTIB

LI1T client

BRUP session name

ELDDAT1 loc+ date

=11P delete flag

US1R bdc user name

R1RD recording

IMPRTIB NID internal session +e(

11PTIS

-ith the function modue 235P7N3ltamp54P you can open a atch input session

The foo$ing parameters are mandatory

2+I7NT (cient)

ltamp54P (session name)

4S7amp (user name)

Note The 4S7amp must a$ays e specified This user name is reuired for processing the session

in atch mode

The foo$ing parameters are optiona

=5+AT7 specifies the eariest date on $hich the session can e started677P fag specifies $hether session shoud e deeted after it has een successfuy processed The

677P fag is ignored if the session contains errors

677P E K K means deete the session after processing (defaut vaue) H

677P E KGK means do not deete session

amp725amp E KGK ao$s you to create a recording instead of a I session

If gtI is specified the function modue returns the interna session ey This is needed to e ae to

differentiate sessions that have the same name

-ith 7G27PTI5NS you get various return vaues that can e ueried $ith SC9S4amp2

Note In onine mode the onine user is used for the authoriDation checs regardess of the user

name specified

copy SAP AG BC420 12-54

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 5588

022

983209 SAP AG 1999

Subprogram P1ltBRUP

P1ltBRUP

FOR( oen8rou-IF e9on -

2A FUN2TION BD2O)ENGROU) E)ORTING 2IENT lt1mandt GROU) 8rou USER uer KEE) kee

=ODDATE gtolddate-

ENDIF-ENDFOR(-

Include

DR16

The suprogram 5P7N3ltamp54P opens the atch input session

copy SAP AG BC420 12-55

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 5688

028

983209 SAP AG 1999

9unction Module DltIS1RT

ALL 9UTI DltIS1RTALL 9UTI DltIS1RT

IMPRT

TD1 Transaction code

PSTltLAL Update locall(

PRITIB print list

TAL1S DPRTA bdclttable

11PTIS

IMPRT

TD1 Transaction code

PSTltLAL Update locall(

PRITIB print list

TAL1S DPRTA bdclttable

11PTIS

-ith the function modue 23INS7ampT you can add transaction data to the session

Cou need an interna 2 tae to transfer the data

The foo$ing parameters are mandatory

T257 Transaction code

CNPamp5TA 2 tae

The foo$ing parameters are optiona

P5ST3+52A+ E KGK activates oca updating This means that the data to e updated is ept in the

appication server and updated in the ast step of the transaction This does not invove the update

process (For more information see course 28 Programming ataase 4pdates)

PampINTINlt E KGK 9 ists processed in I $i e printed immediatey -ith 7G27PTI5NS you get various return vaues that can e ueried $ith SC9S4amp2

copy SAP AG BC420 12-56

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 5788

023

983209 SAP AG 1999

Subprogram DltTRASATI

DltTRASATI

FOR( BD2TRANSA2TION USING tcode-

IF e9on -2A FUN2TION BD2INSERT

E)ORTING T2ODE tcode TABES D0N)ROTAB bdcdata-

ESE-

ENDIF-ENDFOR(-

T

Include

DR16

The suprogram 23TampANSA2TI5N moves the fied 2 tae either to a atch input session

or uses ca transaction to import the data into the system 5n the seection screen you can specify

$hether you $ant to create a session or you $ant to use ca transaction to process the data directy

The S7SSI5N fied is then set according to your seection

copy SAP AG BC420 12-57

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 5888

025

983209 SAP AG 1999

9unction Module DltLS1ltBRUP

ALL 9UTI DltLS1ltBRUP

11PTIS

TltP1 6

NU1U1lt1RRR amp

-ith the function modue 232+5S73ltamp54P you can cose a atch input session

In 7G27PTI5NS you get various return vaues that can e ueried $ith SC9S4amp2

copy SAP AG BC420 12-58

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 5988

027

983209 SAP AG 1999

Subprogram LS1ltBRUP

FOR( cloe8rou-IF e9on -cloe batcgt 9nut 8rou

2A FUN2TION BD22OSEGROU)-

ESE-IF e8rouoened -

2A FUN2TION BD22OSEGROU)-

ENDIF-ENDIF-

ENDFOR(-

LS1ltBRUPlose session

lose error session

Include

DR16

The suprogram 2+5S73ltamp54P coses the atch input session The suprogram differentiates

et$een a norma I session (S7SSI5N E G) and a session opened $hen ca transaction

encountered an error (73ltamp54P35P7N7 E G)

copy SAP AG BC420 12-59

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 6088

080

983209 SAP AG 1999

Subprograms DltDPRG Dlt9I1LD

DltDPR

Dlt9I1LD

FOR( bdc9eld USING nam al-IF al 34 nodata-2EAR bdcdata- bdcdata1nam nam- bdcdata1al al- A))END bdcdata-ENDIF-

ENDFOR(-

FOR( bdcdltnro USING ro8ram dltnro- 2EAR bdcdata-Bdcdata1ro8ram ro8ram-Bdcdata1dltnro dltnro-Bdcdata1dltnbe89n - A))END bdcdata-ENDFOR(-

Include

DR16

The incude 2amp72GG contains t$o suprograms 23CNPamp5 and 23FI7+

Suprogram 23CNPamp5 fis the 2 tae $ith program names and screen numers

Suprogram 23FI7+ fis the 2 tae $ith fied names and vaues

7ach suprogram creates an entry in the 2 tae

copy SAP AG BC420 12-60

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 6188

086

983209 SAP AG 1999

9illing the D Table

erorm bdcdltnro u9n8 SA)(FD +- erorm bdc9eld u9n8 BD22URSOR RFD1BUKRS- erorm bdc9eld u9n8 BD2OK2ODE 6- erorm bdc9eld u9n8 RFD1BUKRS record1BUKRS- erorm bdc9eld u9n8 RFD1KTOKD record1KTOKD-

erorm bdcdltnro u9n8 SA)(FD -

erorm bdc9eld u9n8 BD22URSOR KNA1S)RAS- erorm bdc9eld u9n8 BD2OK2ODE 6- erorm bdc9eld u9n8 KNA1NA(E record1NA(E-

erorm bdc9eld u9n8 KNA1SORT record1SORT-

Recording Benerated automaticall(

from the recording

)ERFOR( bdcdltnro USING SA)(FD +- )ERFOR( bdc9eld USING BD22URSOR RFD1BUKRS-)ERFOR( bdc9eld USING BD2OK2ODE 6-)ERFOR( bdc9eld USING RFD1BUKRS record1BUKRS-)ERFOR( bdc9eld USING RFD1KTOKD record1KTOKD-

)ERFOR( bdcdltnro USING SA)(FD -

)ERFOR( bdc9eld USING BD22URSOR KNA1S)RAS-)ERFOR( bdc9eld USING BD2OK2ODE 6-)ERFOR( bdc9eld USING KNA1NA(E record1NA(E-

)ERFOR( bdc9eld USING KNA1SORT record1SORT- ---

The 2 tae is fied $ith data from the recording The suroutines 23CNPamp5 and

23FI7+ are used for this

The suroutines are caed in the reuired structure or seuence

copy SAP AG BC420 12-61

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 6288

08amp

983209 SAP AG 1999

erie)

SAPDatabase

SeJuential9ile

SAPDatabase

ALL TRASATIALL TRASATI

SeJuential9ile

ATE IPUTATE IPUT

D TableD TableD TableD Table

I Monitor

T

In contrast to atch input you can use ca transaction to directy pass data to the diaog interface

$ithout using a atch input session Cou use an interna tae (2 tae same structure and ayout

as atch input) to temporariy store your screen data Then you ca the desired transaction in your

program

Note 5n average the 2a Transaction method is 8 to times faster than using atch Input

copy SAP AG BC420 12-62

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 6388

08

983209 SAP AG 1999

all Transaction Program$ 1ample

RE)ORT abcbdcdcdeb9ct-

)ARA(ETERS d9mode DEFAUT A

udmode DEFAUT S-FOR( calltranact9on-2A TRANSA2TION FD

USING bdcdata (ODE d9mode

U)DATE udmode-

IF lt1ubrc NE - 5RITE 6 ---

ENDIF-ENDFOR(-

Screen

00

Screen

100

Screen

An additiona system ro area is added for the caed transaction The system uses this area for

processing the individua screens in the transactionH the data from the tae is added here After the

transaction is processed the second ro area is reeasedH the system continues processing in the first

ro area

Notes

In contrast to atch input there is no error ogging (error sessions) here For processing the caed

transaction the system uses the authoriDations of the user that caed the transaction The 2 tae

can ony hod data for one transaction run at a time efore another transaction is caed and its data

can e added you must eecute a amp7Famp7S= for the 2 tae

copy SAP AG BC420 12-63

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 6488

084

983209 SAP AG 1999

ALL TRASATI C6

RE)ORT 777-

2A TRANSA2TION FD USING bdcdata (ODE E-

Default for MD1 is A

2A TRANSA2TION 3tranact9oncode4 USING 3bdc1table4 C (ODE A E N C-

-ith the parameter 57 you can seect a specific dispay mode for processing the transaction The

foo$ing three modes are avaiae

A (ispay a)

If you eecute the program a the screens and a their data are dispayed This is the defaut vaue

for the 57 in 2A++ TampANSA2TI5N

N (ispay nothing)

The screens are not dispayed at a regardess of $hether any of them contained errors As soon as

the transaction has een fuy processed contro is returned to your program (The vaue of the

parameter 4PAT7 determines $hether dataase updates are eecuted or not)

7 (ispay errors ony)As soon as an error occurs in a screen the transaction is s$itched to dispay mode so that you can

correct the errors

These dispay modes are the same as those in the atch input session processing

copy SAP AG BC420 12-64

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 6588

082

983209 SAP AG 1999

RE)ORT 777-

2A TRANSA2TION FD USING BD2DATA U)DATE -

ALL TRASATI Camp

RE)ORT 777-

2A TRANSA2TION FD USING bdcdata U)DATE -

2A TRANSA2TION 3tranact9oncode4 USING 3bdc1table4 C (ODE A E N C U)DATE A S C -

Default for UPDAT1 is A

-ith the parameter 4PAT7 you can contro ho$ dataase updates arising from a transaction are

carried out There are three options

A (asynchronous updating) The caed transaction does not $ait unti the dataase has een

updated it simpy for$ard the updates to the SAP update service This usuay speeds up the 2T

program This processing mode is N5T recommended for arge data sets as the caed transaction

does not receive a competion message from the update modue

The caing 2T program therefore cannot te if the transaction has een successfuy competed Cou

shoud use the updating administration function (transaction S8) to determine $hether updating

$as terminated eary The error anaysis correction functions for are ess hepfu than $ith

synchronous updating

S (synchronous updating) -ith synchronous updating the caed transaction $aits unti a the

updates have een competed So processing is so$er than $ith synchronous updating The caed

transaction can ho$ever report any updating errors to the program $hich maes error

anaysiscorrection easier

+ (local updating) $ith oca updating the dataase is not updated in a separate process it is

updated in the caers process (see appication hep documentation for the AAP ey$ord S7T

4PAT7 TAS6 +52A+)

copy SAP AG BC420 12-65

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 6688

088

983209 SAP AG 1999

ALL TRASATI C

RE)ORT 777-DATA mtab T0)E TABE OF bdcm8coll-

2A TRANSA2TION FD USING bdcdata (ESSAGES INTO mtab-

2A TRANSA2TION 3tranact9oncode4 USING 3bdc1table4 C (ODE A E N C U)DATE A S C (ESSAGES INTO 3metab4 C -

7SSAlt7S specifies that a system messages that are output during the eecution of a 2A++

TampANSA2TI5N are $ritten to the interna tae L7SSTA The interna tae must have the

structure 2Slt25++

4nie the cassica atch input processing $ith sessions 2A++ TampANSA2TI5N does not offer any

specia processing procedures for transactions containing errors There are no restart functions for

transactions that contain errors or that cause updating terminations

copy SAP AG BC420 12-66

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 6788

083

983209 SAP AG 1999

ALL TRASATI C4

RE)ORT 777-DATA mltot T0)E ctuaram-

2A TRANSA2TION FD USING BD2DATA

O)TIONS FRO( mltot-

2A TRANSA2TION 3tranact9oncode4 USING 3bdc1table4 C (ODE A E N C U)DATE A S C (ESSAGES INTO 3metab4 C O)TIONS FRO( ot C -

RE)ORT 777-DATA mltot T0)E ctuaram-2A TRANSA2TION FD USING bdcdata

O)TIONS FRO( mltot-

The addition 5PTI5NS enaes the ca transaction statement to e controed through a structure

The structure must have the dictionary type 2T43PAampAS

The addition 5PTI5NS Famp5 must not e comined either $ith the addition 57 or $ith

4PAT7 ore information on the net side

copy SAP AG BC420 12-67

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 6888

085

983209 SAP AG 1999

Structure TUltPARAMS

DISMD1 Procen mode anaoo o addon amp

UPDMD1 $pdae mode anaoo o addon $PA

ATTMD1 CA mode CA conro

D19SI1 orce de=a EndoE e drn procen

RAMMIT +o eD a Camp amp(

IPT +o a ac np eonF a F S-B+P SPAC

I1D +o a ac np eon a=er end o= BC daa

The components are defined as foo$s

The components 7FSIM7 ampA25IT N5INPT and N5I7N can have the foo$ing

vaues KGK E Ces or K K E No

If the addition 5PTI5NS Famp5 is not specified the foo$ing settings appy to the contro

parameters

IS57 from addition 57

4P57 from addition 4PAT7

2ATT57 2ATT not active

7FSIM7 o not not use defaut $indo$s siDe

ampA25IT Successfu eit at 25IT -5amp6

N5INPT atch input session active (SC9INPT E G)

N5I7N atch input session sti active after end of 2 data

copy SAP AG BC420 12-68

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 6988

087

983209 SAP AG 1999

SMSBID Message ID

SMSBT Message T(pe C1GIGWGSGA

SMSB Message umber

SMSB6 Message ariable 6

SMSBamp Message ariable amp

SMSB Message ariable

SMSB4 Message ariable 4

SMSBID Message ID

SMSBT Message T(pe C1GIGWGSGA

SMSB Message umber

SMSB6 Message ariable 6

SMSBamp Message ariable amp

SMSB Message ariable

SMSB4 Message ariable 4

Return code$

S(stem fields$

alue Meaning

0 Successful

6000 1rror in transaction

6000 1rror in processing call transaction

see also the s(stem fields specified

alue Meaning

0 Successful

6000 1rror in transaction

6000 1rror in processing call transaction

see also the s(stem fields specified

9ield name Meaning9ield name9ield name MeaningMeaning

Return ode and S(stem 9ields

The return code is used to specify $hether the caed transaction $as processed successfuy In

addition severa system fieds are fied The numer I type and variaes of the diaog message

output y the caed transaction Cou need this information to output the message tet

copy SAP AG BC420 12-69

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 7088

030

983209 SAP AG 1999

Benerated Program of the TA Recorder

REFRES= (ESSTAB-

2A TRANSA2TION tcode USING bdcdata (ODE ctumode U)DATE cudate (ESSAGES INTO metab-OO) AT metab- ENDOO)-IF lubrc 34 AND e8rou 34 S)A2E- IF e8rouoenend - 2A FUN2TION BD2O)ENGROU) E)ORTING ---------

--------- E8rouoened - ENDIF- 2A FUN2TION BD2INSERT E)ORTING T2ODE tcode TABES D0N)ROTAB bdcdata-ENDIF-REFRES= bdcdata-

Message table output

pen error session

Insert data record that

has errors into error

session

If you have seected ca transaction on the seection screen the generated program runs as foo$s

The onine transaction is caed $ith ca transaction and passed to tae 2ATA A the

messages arising during the ca transaction are put in the interna tae 7SSTA

7SSTA is output as a ist

If you have specified an error session ( 73ltamp54P L SPA27) on the seection screen and the

ca transaction comes across an error (+3S4amp2 L 0) the error session is opened The error

session is ho$ever ony opened once Then the data record is paced in the session

A the other data records that have errors $ith ca transaction are paced in the same session

copy SAP AG BC420 12-70

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 7188

036

983209 SAP AG 1999

The Transaction Recorder

PrinciplesPrinciples

Recording )ith the LSMWRecording )ith the LSMW

Principles of atch Input and all TransactionPrinciples of atch Input and all Transaction

Integrating the TA Program into the DWIntegrating the TA Program into the DW

Using the TA Recorder Using the TA Recorder

copy SAP AG BC420 12-71

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 7288

03amp

983209 SAP AG 1999

Integrating into the DW

Transfer program

AAP Dictionar(

Integrate

SDA0

SDA6

SDAamp

SDA

Cou can integrate the generated program into the G9- The structure of the fie must e created

in the AAP ictionary The taes SGA0 SGA8 SGA1 and SGA $i e fied

copy SAP AG BC420 12-72

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 7388

03

983209 SAP AG 1999

DW Release 42

Goo

-B eeae 45

aa ran=er ogtec

Int customer data transfer ob-ect

ecord =ed

Dece daa ran=er

d Goo

The ampunction ampor interatin TA recorder prora$s is

i$ple$ented in the

D+-B in Release

The recorder can e integrated as of ampeease and it is provided in the G9- ampeease

ltot to the G9- ampeease 5n the initia screen you can integrate programs y choosing ampoto

( +nt customer ata transfer o-ect

copy SAP AG BC420 12-73

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 7488

034

983209 SAP AG 1999

reating Program as D b-ect

Comer ran=er ogtec

ampgtec ype

Sor eD =or ogtec

aa ran=er proram

Srcre name

9900

(+A1

Cane comer

ZBCA+G

ZB

ustomer transfer ob-ect

umber bet)een 7000 and 7777

b-ect t(pe

Assignment to R ob-ect

Short tet for D ob-ectShort description

Data transfer program

ame of generated program

Structure name

A structure Cstructure la(out )ith this name is created in

the AAP Dictionar(

For ampeease transfer oects $ere not organiDed y 5amp oects ut y a G numer (00089

OOOO) The numer range O0009OOOO is reserved for customers

To create a connection to the ne$ G 9- you must assign the program to a 5amp oect

2reate a short tet for the G oect This tet $i appear in the method seection ist

Specify the program to e incuded

Specify a name for the structure to e created in the AAP ictionary

Note $he generated program appears under program type +N and not under program type

-

copy SAP AG BC420 12-74

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 7588

032

983209 SAP AG 1999

Adantages

Automatic program registration in the DW in

Release 48

ou can use all the functions defined for

standard ob-ects

1ception$ The (reate ampile ith data

function

If you incuded the oect in the ampeease $orench it is automaticay avaiae in the ampeease

B $orench

A the $orench functions are avaiae for your oect ecept for Create files ith transfer ata

copy SAP AG BC420 12-75

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 7688

038

983209 SAP AG 1999

ou are no) able to$

The Transaction Recorder$ Unit Summar(

Use the recording function in the LSMW to create

a batch input session )ith the data from the

eternal s(stem

Use the TA Recorder to create (our o)n data

transfer program

Anal(e programs that )or+ )ith batch input or

call transaction

Integrate the TA Recorder programs into the

DW

copy SAP AG BC420 12-76

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 7788

ercise 1

nit $ -ecorder

$opic 2reating etors

$ransaction -ecorder ercise 1

bull 2reating detors $ith eterna numer assignment

bull etor numers M9980008 to M9980080

Address data for detors $ith eterna numer assignment is to

e transferred using program ampFI700

ro4ect F5

Supro4ect +5

-un +575

$as)s 85 95 8S25

9oad program -F+00

8 In the foo$ing eercises eisting data is to e changed Therefore these detors $ith

eterna numer assignment have to first e created

898 4nder suproect 79 create run 797G9 $ith the name Detors ith

eternal numers

copy SAP AG BC420 12-77

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 7888

891 2reate the foo$ing three tass The tass map the foo$ing process steps

convert data create + session and process + session

89198 In run 797G9 create the foo$ing tas

9 Tas AP9

9 Name 2onvert data 9 Tas type AP

9 Program type +S-

Seect the foo$ing +S- oect

+S- proect 2109

+S- suproect 7I9

+S- oect I997GT

89191 In run 797G9 create the foo$ing tas 9 Tas +5A9

9 Name 2reate I session

Tas type +5A

9 Program type INP

Seect program ampFI700 $ith the variant

I97G9

8919 In run 797G9 create the foo$ing tas

9 Tas S29

9 Name Process I session Tas type S2

9 Program type amp7P5

Seect program ampS2S4 $ith the variant

S497G9

Note that you have to correct the seuence of the tass 2onvert data

create + session and process + session

4se the uttons

89 Start the run

The detors $i e created $ith eterna numer assignments

89 2hec in transaction F0 that the detors M9980008 to M9980080 have een

created

copy SAP AG BC420 12-78

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 7988

ercise

nit $ransaction -ecorder

$opic -ecording function in the 9S8(

bull 2reate a recording using the +S-

bull ltenerate a atch input session

2hange the detor address data in the amp System

Name of the recording +

Name of the file +2055+F9

8 2reate the recording 7I3 using the +S- ampecord the transaction F01 (2hange

detor)

898 efore you create the recording first test the transaction onineQ

For the recording use detor M9980008 5n the initia screen of the F01

maintain the foo$ing fieds ony

etor etor M9980008

2ompany code 0008

Address data seect

Note $he data record must e saved hile recording

891 aintain the names and the descriptions for the foo$ing fieds

Name city street posta code and teephone numereete a other fieds in screen 880 from the recording (eg S5ampT+ +AN8

SPampAS)

4se the same technica names as sho$n in the tae eo$ (automatic fied

mapping)

copy SAP AG BC420 12-79

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 8088

1 2reate the suproect 7I9 and the ne$ oect TA3 in your proect 2109

aintain the oect attriutes and seect the item atch input recording Seect your

recording 7I3

2reate the source structure address

2reate the source fieds according to the tae eo$ 5r copy them from proect 2109S37N suproect 7I900 oect TA900

198 Fie setup The data from the egacy system are dispayed in the foo$ing tae

Fied name Fied type Fied ength escription

N5 2 8B etor numer

NA7 2 Name

STamp77T 2 Street

2ITC 2 2ityPace of residence

MIP 2 80 Posta code

T7+ 2 8B Teephone numer

191 aintain the fied mapping 4se the automatic fied mapping (via menu item

7tras)

19 Specify the fies 5ny maintain the fie name of the source fie

Name of the fie 21099IFI+7

2odepage 8800

19 Import the data and convert them ispay the data in each caseQ

19 2reate a atch input session

19B ampun the atch input session

copy SAP AG BC420 12-80

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 8188

ercise 3

nit $ransaction -ecorder

$opic -ecording ith the $ -ecorder

bull ltenerate a recording using the TA recorder

bull Test the recording

2hange the address data of detors in the amp system

Name recording $+

Name of the file +2055+F9

8 2reate the recording TA37I3 using the transaction recorder ampecord the

transaction F01 (change detor)

898 4se detor M9980008 for the recording 5n the F01 initia screen ony

maintain the foo$ing fieds

etor etor M9980008

2ompany 2ode 0008

Address data seect

Note $he data record must e saved hen recording

eete a fieds that do not eist in the source fie 21099IFI+7 from screen

880 in the recording (eg 6NA89S5ampT+ 6NA89+AN8 6ANNQ9SPampAS) Note o not deete fieds ampF01946ampS and ampF0190880

Save the recording no$

1 S$itch to the recordings overvie$

198 Process the recording $ith the processing mode A (dispay a)

191 Process the recording $ith the processing mode RN (no dispay)

19 If the recording has een tested and no error has occurred generate a I session

and run it using the I monitor If an error shoud occur generate the recordingagainQ

copy SAP AG BC420 12-81

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 8288

From the recording generate the program M21037I3 in your deveopment cass

2109 Seect the foo$ing

bull ampead fied contents from fie

bull 2reate test data in the fie 2103dei3test3tt

98 Save this program and eecute it ltenerate one I session each and process it

2arry out the same steps again using the ca transaction

The generated program shoud no$ e changed so that fie 21099IFI+7 can e

read and processed

98 2hange the defaut vaue of the fie name (parameter dataset) in 21099

IFI+7

91 2hange the structure definition eete the company code fied and the address

data checo from the structure

9 2hange the su9routine ca perform dc3fied for the company code (KampF019

46ampSK) so that the vaue 0008 is transferred

9 2hange the su9routine ca perform dc3fied for the address data checo

(KampF0190880K) so that the vaue G is transferred

9 Start the program again and read the data from the fie 21099IFI+7 $ith

detor data ltenerate a I session $ith it and run it

copy SAP AG BC420 12-82

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 8388

033 Include DR16INCLUDE BDCRECX1

SELECTION-SCREEN BEGIN OF LINE

PARAMETERS SESSION RADIOBUTTON GROUP CTU create sessi SELECTION-SCREEN COMMENT $amp TEXT-S FOR FIELD SESSION

se(ecti-scree )siti +

PARAMETERS CTU RADIOBUTTON GROUP CTU ca(( trasacti

SELECTION-SCREEN COMMENT $amp TEXT-S FOR FIELD CTU

SELECTION-SCREEN END OF LINE

SELECTION-SCREEN BEGIN OF LINE

SELECTION-SCREEN COMMENT $amp TEXT-S1 FOR FIELD GROUP

se(ecti-scree )siti $+

PARAMETERS GROUP1$amp r) ae 0 sessi

SELECTION-SCREEN COMMENT $amp TEXT-S+ FOR FIELD CTUMODE

se(ecti-scree )siti

PARAMETERS CTUMODE LIE CTU2PARAMS-DISMODE DEFAULT 3N3

A4 s56 a(( 78)rs

E4 s56 78)r errr (8

N4 7 t 7is)(a8 78)r

SELECTION-SCREEN END OF LINE

SELECTION-SCREEN BEGIN OF LINE

SELECTION-SCREEN COMMENT $amp TEXT-S$ FOR FIELD USER

se(ecti-scree )siti $+

PARAMETERS4 USER1$amp DEFAULT S9-UNAME ser 0r sessi i atc5

SELECTION-SCREEN COMMENT $amp TEXT-S FOR FIELD CUPDATE

se(ecti-scree )siti

PARAMETERS CUPDATE LIE CTU2PARAMS-UPDMODE DEFAULT 3L3

S4 s8c5rs(8

A4 as8c5rs(8

L4 (ca(

SELECTION-SCREEN END OF LINE

SELECTION-SCREEN BEGIN OF LINE

SELECTION-SCREEN COMMENT $amp TEXT-S FOR FIELD EEP

se(ecti-scree )siti $+

PARAMETERS4 EEP AS CltECBOX 3 3 = 7e(ete sessi i0 0iis5e7

3X3 = gtee) sessi i0 0iis5e7

SELECTION-SCREEN COMMENT $amp TEXT-S FOR FIELD E2GROUP

copy SAP AG BC420 12-83

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 8488

se(ecti-scree )siti

)araeters E2GROUP1$amp r) ae 0 errr-sessi

SELECTION-SCREEN END OF LINE

SELECTION-SCREEN BEGIN OF LINE

SELECTION-SCREEN COMMENT $amp TEXT-S FOR FIELD ltOLDDATE

se(ecti-scree )siti $+

PARAMETERS4 ltOLDDATE LIE S9-DATUM

SELECTION-SCREEN COMMENT +11amp TEXT-S$ FOR FIELD E2USER

se(ecti-scree )siti

PARAMETERS4 E2USER1$amp DEFAULT S9-UNAME ser 0r errr-sessi

SELECTION-SCREEN END OF LINE

SELECTION-SCREEN BEGIN OF LINE

SELECTION-SCREEN COMMENT +11amp TEXT-S FOR FIELD E2EEP

se(ecti-scree )siti

PARAMETERS4 E2EEP AS CltECBOX 3 3 = 7e(ete sessi i0 0iis5e7

3X3 = gtee) sessi i0 0iis5e7

SELECTION-SCREEN END OF LINE

SELECTION-SCREEN BEGIN OF LINE

SELECTION-SCREEN COMMENT +11amp TEXT-S FOR FIELD E2ltDATE

se(ecti-scree )siti

PARAMETERS4 E2ltDATE LIE S9-DATUM

SELECTION-SCREEN END OF LINE

SELECTION-SCREEN SIP

SELECTION-SCREEN BEGIN OF LINE

SELECTION-SCREEN COMMENT 1amp TEXT-S1 FOR FIELD NODATA

PARAMETERS4 NODATA DEFAULT 33 LOER CASE 7ata

SELECTION-SCREEN END OF LINE

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

Batc5i)t7ata 0 si(e trasacti

DATA4 BDCDATA LIE BDCDATA OCCURS ITlt ltEADER LINE

essaes 0 ca(( trasacti

DATA4 MESSTAB LIE BDCMSGCOLL OCCURS ITlt ltEADER LINE

errr sessi )ee7 3 3 r 3X3amp

DATA4 E2GROUP2OPENED

essae tets

TABLES4 T1

copy SAP AG BC420 12-84

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 8588

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

at se(ecti scree

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

AT SELECTION-SCREEN

r) a7 ser st e 0i((e7 0r create sessi

IF SESSION = 3X3 AND

GROUP = SPACE OR USER = SPACE

MESSAGE E1MSamp

ENDIF

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

)e 7ataset

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

FORM OPEN2DATASET USING P2DATASET

OPEN DATASET P2DATASET IN TEXT MODE

IF S9-SUBRC

RITE4 TEXT-E S9-SUBRC

STOP

ENDIF

ENDFORM

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

c(se 7ataset

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

FORM CLOSE2DATASET USING P2DATASET

CLOSE DATASET P2DATASET

ENDFORM

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

create atc5i)t sessi

t 0r ca(( trasacti siamp

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

FORM OPEN2GROUP

IF SESSION = 3X3

SIP

RITE4 $amp 3Create r)3I1amp GROUP

SIP

)e atc5i)t r)

CALL FUNCTION 3BDC2OPEN2GROUP3

EXPORTING CLIENT = S9-MANDT

copy SAP AG BC420 12-85

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 8688

GROUP = GROUP

USER = USER

EEP = EEP

ltOLDDATE = ltOLDDATE

RITE4 amp 3BDC2OPEN2GROUP3I$amp

1$amp 3retrc7e43I+amp

S9-SUBRC

ENDIF

ENDFORM

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

e7 atc5i)t sessi

ca(( trasacti si4 errr sessiamp

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

FORM CLOSE2GROUP

IF SESSION = 3X3

c(se atc5i)t r)

CALL FUNCTION 3BDC2CLOSE2GROUP3

RITE4 amp 3BDC2CLOSE2GROUP3Iamp

1$amp 3retrc7e43I+amp

S9-SUBRC

ELSE

IF E2GROUP2OPENED = 3X3

CALL FUNCTION 3BDC2CLOSE2GROUP3

RITE4

RITE4 amp 3Fe5(era))e 6r7e eret3Iamp

ENDIF

ENDIF

ENDFORM

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

Start e6 trasacti accr7i t )araeters

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

FORM BDC2TRANSACTION USING TCODE

DATA4 L2MSTRINGamp

DATA4 L2SUBRC LIE S9-SUBRC

atc5 i)t sessi

IF SESSION = 3X3

CALL FUNCTION 3BDC2INSERT3

EXPORTING TCODE = TCODE

TABLES D9NPROTAB = BDCDATA

RITE4 3BDC2INSERT3Iamp

copy SAP AG BC420 12-86

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 8788

TCODE

3retrc7e43I+amp

S9-SUBRC

3RECORD43

S9-INDEX

ca(( trasacti si

ELSE

REFRESlt MESSTAB

CALL TRANSACTION TCODE USING BDCDATA

MODE CTUMODE

UPDATE CUPDATE

MESSAGES INTO MESSTAB

L2SUBRC = S9-SUBRC

RITE4 3CALL2TRANSACTION3

TCODE

3retrc7e43I+amp

L2SUBRC

3RECORD43

S9-INDEX

LOOP AT MESSTAB

SELECT SINGLE FROM T1 ltERE SPRSL = MESSTAB-MSGSPRA

AND ARBGB = MESSTAB-MSGID

AND MSGNR = MESSTAB-MSGNR

IF S9-SUBRC =

L2MSTRING = T1-TEXT

IF L2MSTRING CS 313

REPLACE 313 ITlt MESSTAB-MSGH1 INTO L2MSTRING

REPLACE 3$3 ITlt MESSTAB-MSGH$ INTO L2MSTRING

REPLACE 33 ITlt MESSTAB-MSGH INTO L2MSTRING

REPLACE 33 ITlt MESSTAB-MSGH INTO L2MSTRING

ELSE

REPLACE 33 ITlt MESSTAB-MSGH1 INTO L2MSTRING

REPLACE 33 ITlt MESSTAB-MSGH$ INTO L2MSTRING

REPLACE 33 ITlt MESSTAB-MSGH INTO L2MSTRING

REPLACE 33 ITlt MESSTAB-MSGH INTO L2MSTRING

ENDIF

CONDENSE L2MSTRING

RITE4 MESSTAB-MSGT9P L2MSTRING$+amp

ELSE

RITE4 MESSTAB

ENDIF

ENDLOOP

copy SAP AG BC420 12-87

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 8888

SIP

Eree 0e5(era))e

IF L2SUBRC AND E2GROUP SPACE

IF E2GROUP2OPENED = 3 3

CALL FUNCTION 3BDC2OPEN2GROUP3

EXPORTING CLIENT = S9-MANDT

GROUP = E2GROUP

USER = E2USER

EEP = E2EEP

ltOLDDATE = E2ltDATE

E2GROUP2OPENED = 3X3

ENDIF

CALL FUNCTION 3BDC2INSERT3

EXPORTING TCODE = TCODE

TABLES D9NPROTAB = BDCDATA

ENDIF

ENDIF

REFRESlt BDCDATA

ENDFORM

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

Start e6 scree

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

FORM BDC2D9NPRO USING PROGRAM D9NPRO

CLEAR BDCDATA

BDCDATA-PROGRAM = PROGRAM

BDCDATA-D9NPRO = D9NPRO

BDCDATA-D9NBEGIN = 3X3

APPEND BDCDATA

ENDFORM

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

Isert 0ie(7

Page 32: BC420_46C - 012The Transaction Recorder

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 3288

0amp

983209 SAP AG 1999

Recording erie)

Recording

Transfer program

9unction module

ontains onl( the data

from the recording

Test data

Test

reate

reate

reate

reate

1dit hange recording

Process recording

Cou can edit the recording as needed

The recording can e tested and eecuted again The screens are run through in the same $ay as in

the recording

The recording can then e used to create

atch input sessions

Test data

ata transfer programs $ith atch input or ca transaction

Function modues

copy SAP AG BC420 12-32

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 3388

0

983209 SAP AG 1999

1 02 BS

2 SAP02 106

3 BCC$Samp $SZAV

4 BCamp(Camp )00 5 02-($++ -88-10000

6 02-0110

7 02-0130

8 $SZAV

9 SAP02 111

10 BCamp(Camp V

11 BCC$Samp A1AA-amp$S+$1

12 A1AA-S Garden Sree

Program Screen St 9ield ame 9ield alue

Recording 1ditor

Recording

Add gt delete lines 9ormat chec+

Import gt eport of recording

In the editor you can add or deete ines Cou can aso change the contents of individua ines

-ith the function Chec) you can specify $hether the edited version of the recording sti has the

correct synta

Cou can aso eport import recordings to from a seuentia fie

After editing save the recording changes

copy SAP AG BC420 12-33

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 3488

04

983209 SAP AG 1999

Recording Seeral Transaction Runs

RecordingF

Directl( after the first recordingG or

In the displa( mode of the recording

In this step you can record additiona transactions and add additiona transaction runs to the

recording

Cou can record the additiona transactions directy after a recording or in the edit screen of a

recording

copy SAP AG BC420 12-34

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 3588

02

983209 SAP AG 1999

1ditor$ Importing and 1porting Recordings

6 T 9D0amp S

amp SAPM90ampD 608

DltURSR

4

2

8 SAPM90ampD 666

60

66

Program Screen St 9ield name 9ield alue

cempA

e name

aa =orma

cemp

A

e name

aa =orma

1port

Import

Presentation Serer

If the editor functions in the systems do not provide a the functions you need you can do$noad the

recording to your presentation server using the Eort function and then edit the recording using a

P2 editor

Cou use the Import function to import the data ac into the amp System ae sure the fie is sti in

the correct format

copy SAP AG BC420 12-35

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 3688

08

983209 SAP AG 1999

Processing the Recording

Recording

Process )ith ALL TRASATI

Parameer

Proce mode$pdae mode

CA mode

e=a e

Con a=er comm

+o a B eon

nd +o a B mode

A

A

T

The recording can e eecuted directy The data from the recording is used and the transaction is

processed $ith ca transaction

2a transaction provides a range of options for caing appication transactions $hich are discussed

on the foo$ing t$o pages

copy SAP AG BC420 12-36

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 3788

03

983209 SAP AG 1999

Process mode

Update mode

ATT mode

Processing Recording )ith T 6

A

1

Displa( all screens

Displa( errors onl(

o displa(

L

S

A

Local

S(nchronous

As(nchronous

A

o ATT

ATT )ithout indiidual screen control

ATT )ith indiidual screen control

Processing mode

=ere you can specify the processing mode 9 it is the same as the processing mode for atch input

4pdate mode

=ere you can specify the update mode For more information see the unit ca transaction

2ATT mode

=ere you can mae specia settings if you $ant to test the recording under 2ATT conditions (ony

necessary for 2ATT runs) Specia functions are caed in the 2ATT too for each screen at the end of

P5 and at the start of PAI

copy SAP AG BC420 12-37

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 3888

05

983209 SAP AG 1999

Default sie

ont after commit

ot a I session

1nd$ ot a I mode

Processing Recording )ith T amp

The screen standard sie is used for the

processing

ommit )or+ does not end the processing

o I mode is actie The transaction )ill run

through as in online

I mode is selected nce the data in the D

table is processedG the I mode is set to inactie

Standard siDe

If you seect this the screens are processed in the standard siDe in the foreground (in foreground or

dispay errors ony) Note the standard siDe is a$ays used for acground processing

Further after commit

The first commit $or in a transaction does not ead to the end of the recording

Note A atch input transaction is ended $ith the first commit $or

No I mode

The system fied SC9INPT is not set (SC9INPT E ) So transactions are run through as in onine

7nd No I mode

5ny use if you choose the processing mode 7 (dispay errors ony) Then the transaction is processed in the acground in atch input mode and if there is an error the screens run through in

the foreground

copy SAP AG BC420 12-38

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 3988

07

983209 SAP AG 1999

I Mode

atch input

mode

nline

Some transactions behae differentl( in batch input mode

than in online Cbatch input capabilit(

atch input mode sets the s(stem field SIPT H

Not every transaction can run the same onine and in atch input mode The transaction must decide

itsef $hether it is caed onine or in atch input mode

The system sets the system fied SC9INPT E G if the atch input mode is active (this aso appies

to ca transaction) From this system fied the transaction can identify $hether to run onine or in

atch input mode

copy SAP AG BC420 12-39

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 4088

040

983209 SAP AG 1999

reating a Session 9rom the Recording

Recordingnl( contains the data

from the recording

Seon name 02amp

Aoraon ampBS(eep eon

oclt dae 10102000

Cou can create a atch input session directy from the recording that you can then process using the

atch input monitor

copy SAP AG BC420 12-40

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 4188

046

983209 SAP AG 1999

reating Test Data

Test Data

Recording

ranranpBC420AAe name

The file onl( contains the data from the recording

Rgt

Application Serer

Structure

Cou can create a fie from the recordingH the fie $i contain a the fieds from the recording The

fieds are added to the fie $ith the ength you specified in the definition

The fied order corresponds to the order in the recording overvie$ Technica fieds

(2356257 2324ampS5amp and so on) are incuded

The data can ony e stored on the appication server If you do not specify a path the fie is stored in

the $or directory of the appication server

If the specified test fie aready eists the ne$ data record is added to this fie

copy SAP AG BC420 12-41

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 4288

04amp

983209 SAP AG 1999

ed conen

reating a Program

Recording

ZBC420ampProram name

Transfer Program

e daa

ead =rom =e

ran=er =rom recordn

reate

9ile nameTest data

ranranpBC420AA

Cou can generate a program from the recording

In the foo$ing diaog o enter a program name In addition you can choose the type and method

for fiing the maintained fied contents from the recorded screens

4se the vaues used for the recording If you reuire feie data transfer you $i have to modify

this program ater

ParameteriDe the input vaues and read these vaues from a fie A data structure is created for

parameteriDationH the data records are read from an eterna fie into this data structure The

program assumes the fie $as taiored to this data structure

If you have decided to parameteriDe the input vaues you shoud aso create a test fie during

generation To do this seect the checo and enter a name for the fie

The attriute maintenance screen of the AAP editor appears aintain the attriutes and save the

program

copy SAP AG BC420 12-42

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 4388

04

983209 SAP AG 1999

Program 9unctions

Online

transaction

Transfer program

To

error

1rror

ption 6ption ampFlat SAP

structure

Monitor

Cou have no$ generated a data transfer program for importing data into the amp System The

program can eecute the data transfer using atch input or ca transaction

If you choose option 1 and there is an error the data record is paced into a atch input session

copy SAP AG BC420 12-43

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 4488

044

983209 SAP AG 1999

Benerating 9unction Modules

Recording

Zcreaedeor ncon mode

ncon rop

Sor eD

ZBC420

Creae comer

9unction module

nl( one data record can be processed at a time

In the net diaog o you can generate a function modue a function group and short tet from the

recording The function modue is automaticay created in the function group

copy SAP AG BC420 12-44

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 4588

042

983209 SAP AG 1999

9unction of 9unction Modules

Online

transaction

To

error

1rror

ption 6 ption amp

9unction module

Import

Parameter 1port

parameter

Tables

M1SSTA

Monitor

S$BC

Import interface

The import interface consists of a technica part and the fieds from the recording (A parameter is

created for each input fied of the recorded transactions)

7port interface

Simpy consists of the parameter S4amp2 The function modue $i return a vaue in the system

fied SC9S4amp2 after caing ca transaction This return vaue is set to Dero if the data record has

een correcty processed (5ny appies to 2T)

If a session is created you $i e notified $hether the data record coud e paced into the session

Tae interfaceThis is used ony if the function modue $ors $ith ca transaction The tae contains a the

system messages

copy SAP AG BC420 12-45

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 4688

048

983209 SAP AG 1999

Import Interface of 9unction Module

$

Technical

fields

Data

fields

BI session or CALL TRANSACTION

Processin $ode

pdate $ode

a$e oamp BI session iamp (T initial)

Bacround user iamp (T initial)

Delete session aampter processin

Loc date oamp session

ODATA indicator

TU

MD1

UPDAT1

BRUP

US1R

=11P

ELDDAT1

DATA

Cou can use parameter 2T4 to specify $hether the function modue creates a atch input session

(2T4 E ) or updates the data record directy using ca transaction (2T4 E G)

The other parameters are fied as for a atch input session header

Note 7very time the function modue is caed a atch input session is created

If the session is to contain severa transactions proceed as foo$s

ltenerate the transaction severa times This can e achieved y recording the transaction again The

function modue interface $i then contain more than one transaction -hen the function modue is

caed severa transactions can e generated for each session

copy SAP AG BC420 12-46

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 4788

043

983209 SAP AG 1999

The Transaction Recorder

PrinciplesPrinciples

Recording )ith the LSMWRecording )ith the LSMW

Principles of atch Input and all TransactionPrinciples of atch Input and all Transaction

Integrating the TA Program into the DWIntegrating the TA Program into the DW

Using the TA Recorder Using the TA Recorder

copy SAP AG BC420 12-47

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 4888

045

983209 SAP AG 1999

Benerated Program

9unction modules DltP1ltBRUP

DltIS1RT

DltLS1ltBRUP

AAP Program

Define structure of

data in seJuential

fileDefine D

table

pen seJuential file

pen I session

Read data recordCseJuential file

9ill D table

9ill I session gtALL TRASATI

Last data record K

lose I session

lose seJuential file

The generated program has the structure dispayed aove It uses the standard function modues for

creating atch input sessions

copy SAP AG BC420 12-48

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 4988

047

983209 SAP AG 1999

Structure of the Benerated Program

Benerated part

Define D

table

pen seJuential file

pen I session

Read data record

9ill D table

9ill I session gtALL TRASATI

Last data recordK

lose I session

lose seJuential file

Include DR16

Define filestructure

P1ltDATAS1T

P1ltBRUP

DltDPR

Dlt9I1LD

DltTRASATI

LS1ltBRUP

LS1ltDATAS1T

The generated program consists of t$o parts 9 a generated part and the incude 2amp72G8 The

incude is provided in the standard system

The incude contains the definition of the reuired 2 tae and a further seven suroutines These

suroutines eecute the foo$ing functions

5pen and cose fie

5pen and cose session

Fi 2 tae

Fi session

The generated part is the main program and cas the reevant suroutines A structure is aso

generated in the generated part to read the eterna data into the fie

See the Appendi for more information on the 2amp72G8 program

copy SAP AG BC420 12-49

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 5088

020

983209 SAP AG 1999

Structure of D Table

PRBRAM DPR D1BI 9AM 9ALPRBRAMPRBRAM DPRDPR D1BID1BI 9AM9AM 9AL9AL

SAPM90ampD 0602

R90ampD=UR 600000

R90ampDU=RS 0006

R90ampD=T=D =UA

SAPM90ampD 0660

=A6AM16 Smith

=A6PSTL 87000

=A6LAD6 US

=A6SPRAS 1

SAPM90ampD 06amp0

=A6ST1B US6amp428357DDATA

PRBRAM

DPR

D1BI

9AM

9AL

EAR

UM

EAR

EAR

EAR

40

4

6

6amp

6amp

D Module pool

D Screen number

D Start of screen

D 9ield name

D 9ield contents

9ield ame T(pe Length Short Tet

AAP Dictionar(

The 2 tae has the same structure as in a standard transfer

copy SAP AG BC420 12-50

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 5188

026

983209 SAP AG 1999

Read Structure

Recording

DATA BEGIN OF record data element BUKRS bukr$amp data element KTOKD ktokd$amp data element NA(EG) name$+amp data element SORT ortl$ampEND OF record-

record

Automaticall( generated

from recording

The structure of the fie is automaticay generated and is a$ays defined $ith the name amp725amp

The generated structure a$ays has the same ayout 7ach fied is defined y t$o generated ro$s

The first ro$ is a$ays a comment ro$ containing the tet J data eement and the data eement of

the screen fied from the recording In the net ro$ the fied itsef is defined $ith the name of the

data eement foo$ed y a three9digit position numer $hich specifies the ocation in the structure

The ength of the fied is set y the ength of the data eement If a fied is not defined through a data

eement the system uses the ength of the screen fied

copy SAP AG BC420 12-51

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 5288

02amp

983209 SAP AG 1999

pening and losing the 9ile

P1ltDATAS1T

LS1ltDATAS1T

FOR( oendataet USING dataet-O)EN DATASET dataet IN TET (ODE-

IF S01SUBR2 34 - 5RITE 6 te7t1e S01SUBR2-STO)-

ENDIF-

ENDFOR(-

FOR( cloedataet USING dataet-2OSE DATASET dataet-

ENDFOR(-

Include

DR16

The suroutine 5P7N3ATAS7T opens the seuentia fie

The suroutine 2+5S73ATAS7T coses the seuentia fie

copy SAP AG BC420 12-52

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 5388

02

983209 SAP AG 1999

9unction Modules for I Program

lient

Session name

Eold date

=eep session

D user name

RecordK

LI1T

BRUP

ELDDAT1

=11P

US1R

R1RD

DltP1ltBRUPDltP1ltBRUP

Transaction code

D table

TD1

DPRTA

DltIS1RTDltIS1RT

DltLS1ltBRUPDltLS1ltBRUP

pen Isessionpen Isession

Insert data for

transactions

Insert data for

transactions

lose I

session

lose I

session

The foo$ing function modues are provided for creating atch input sessions (function group

S2)

235P7N3ltamp54P

2reates a ne$ session and contains genera data for the $hoe session

23INS7ampT

Inserts a the data for a transaction into the session The transferred interna tae $ith the

structure 2ATA must contain a the data reuired for fuy processing the transaction

232+5S73ltamp54P

2oses the session after a the data has een inserted As soon as the session has een cosed it

can e processed

The interna tae $ith the structure 2ATA can ony contain atch input data for one singe

transaction run So the individua transactions are inserted into the atch input session in a oop

using severa 23INS7ampT cas

copy SAP AG BC420 12-53

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 5488

024

983209 SAP AG 2001

9unction Module DltP1ltBRUP

ALL 9UTI DltP1ltBRUPALL 9UTI DltP1ltBRUP

1PRTIB

LI1T client

BRUP session name

ELDDAT1 loc+ date

=11P delete flag

US1R bdc user name

R1RD recording

IMPRTIB

NID internal session +e(

11PTIS

1PRTIB

LI1T client

BRUP session name

ELDDAT1 loc+ date

=11P delete flag

US1R bdc user name

R1RD recording

IMPRTIB NID internal session +e(

11PTIS

-ith the function modue 235P7N3ltamp54P you can open a atch input session

The foo$ing parameters are mandatory

2+I7NT (cient)

ltamp54P (session name)

4S7amp (user name)

Note The 4S7amp must a$ays e specified This user name is reuired for processing the session

in atch mode

The foo$ing parameters are optiona

=5+AT7 specifies the eariest date on $hich the session can e started677P fag specifies $hether session shoud e deeted after it has een successfuy processed The

677P fag is ignored if the session contains errors

677P E K K means deete the session after processing (defaut vaue) H

677P E KGK means do not deete session

amp725amp E KGK ao$s you to create a recording instead of a I session

If gtI is specified the function modue returns the interna session ey This is needed to e ae to

differentiate sessions that have the same name

-ith 7G27PTI5NS you get various return vaues that can e ueried $ith SC9S4amp2

Note In onine mode the onine user is used for the authoriDation checs regardess of the user

name specified

copy SAP AG BC420 12-54

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 5588

022

983209 SAP AG 1999

Subprogram P1ltBRUP

P1ltBRUP

FOR( oen8rou-IF e9on -

2A FUN2TION BD2O)ENGROU) E)ORTING 2IENT lt1mandt GROU) 8rou USER uer KEE) kee

=ODDATE gtolddate-

ENDIF-ENDFOR(-

Include

DR16

The suprogram 5P7N3ltamp54P opens the atch input session

copy SAP AG BC420 12-55

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 5688

028

983209 SAP AG 1999

9unction Module DltIS1RT

ALL 9UTI DltIS1RTALL 9UTI DltIS1RT

IMPRT

TD1 Transaction code

PSTltLAL Update locall(

PRITIB print list

TAL1S DPRTA bdclttable

11PTIS

IMPRT

TD1 Transaction code

PSTltLAL Update locall(

PRITIB print list

TAL1S DPRTA bdclttable

11PTIS

-ith the function modue 23INS7ampT you can add transaction data to the session

Cou need an interna 2 tae to transfer the data

The foo$ing parameters are mandatory

T257 Transaction code

CNPamp5TA 2 tae

The foo$ing parameters are optiona

P5ST3+52A+ E KGK activates oca updating This means that the data to e updated is ept in the

appication server and updated in the ast step of the transaction This does not invove the update

process (For more information see course 28 Programming ataase 4pdates)

PampINTINlt E KGK 9 ists processed in I $i e printed immediatey -ith 7G27PTI5NS you get various return vaues that can e ueried $ith SC9S4amp2

copy SAP AG BC420 12-56

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 5788

023

983209 SAP AG 1999

Subprogram DltTRASATI

DltTRASATI

FOR( BD2TRANSA2TION USING tcode-

IF e9on -2A FUN2TION BD2INSERT

E)ORTING T2ODE tcode TABES D0N)ROTAB bdcdata-

ESE-

ENDIF-ENDFOR(-

T

Include

DR16

The suprogram 23TampANSA2TI5N moves the fied 2 tae either to a atch input session

or uses ca transaction to import the data into the system 5n the seection screen you can specify

$hether you $ant to create a session or you $ant to use ca transaction to process the data directy

The S7SSI5N fied is then set according to your seection

copy SAP AG BC420 12-57

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 5888

025

983209 SAP AG 1999

9unction Module DltLS1ltBRUP

ALL 9UTI DltLS1ltBRUP

11PTIS

TltP1 6

NU1U1lt1RRR amp

-ith the function modue 232+5S73ltamp54P you can cose a atch input session

In 7G27PTI5NS you get various return vaues that can e ueried $ith SC9S4amp2

copy SAP AG BC420 12-58

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 5988

027

983209 SAP AG 1999

Subprogram LS1ltBRUP

FOR( cloe8rou-IF e9on -cloe batcgt 9nut 8rou

2A FUN2TION BD22OSEGROU)-

ESE-IF e8rouoened -

2A FUN2TION BD22OSEGROU)-

ENDIF-ENDIF-

ENDFOR(-

LS1ltBRUPlose session

lose error session

Include

DR16

The suprogram 2+5S73ltamp54P coses the atch input session The suprogram differentiates

et$een a norma I session (S7SSI5N E G) and a session opened $hen ca transaction

encountered an error (73ltamp54P35P7N7 E G)

copy SAP AG BC420 12-59

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 6088

080

983209 SAP AG 1999

Subprograms DltDPRG Dlt9I1LD

DltDPR

Dlt9I1LD

FOR( bdc9eld USING nam al-IF al 34 nodata-2EAR bdcdata- bdcdata1nam nam- bdcdata1al al- A))END bdcdata-ENDIF-

ENDFOR(-

FOR( bdcdltnro USING ro8ram dltnro- 2EAR bdcdata-Bdcdata1ro8ram ro8ram-Bdcdata1dltnro dltnro-Bdcdata1dltnbe89n - A))END bdcdata-ENDFOR(-

Include

DR16

The incude 2amp72GG contains t$o suprograms 23CNPamp5 and 23FI7+

Suprogram 23CNPamp5 fis the 2 tae $ith program names and screen numers

Suprogram 23FI7+ fis the 2 tae $ith fied names and vaues

7ach suprogram creates an entry in the 2 tae

copy SAP AG BC420 12-60

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 6188

086

983209 SAP AG 1999

9illing the D Table

erorm bdcdltnro u9n8 SA)(FD +- erorm bdc9eld u9n8 BD22URSOR RFD1BUKRS- erorm bdc9eld u9n8 BD2OK2ODE 6- erorm bdc9eld u9n8 RFD1BUKRS record1BUKRS- erorm bdc9eld u9n8 RFD1KTOKD record1KTOKD-

erorm bdcdltnro u9n8 SA)(FD -

erorm bdc9eld u9n8 BD22URSOR KNA1S)RAS- erorm bdc9eld u9n8 BD2OK2ODE 6- erorm bdc9eld u9n8 KNA1NA(E record1NA(E-

erorm bdc9eld u9n8 KNA1SORT record1SORT-

Recording Benerated automaticall(

from the recording

)ERFOR( bdcdltnro USING SA)(FD +- )ERFOR( bdc9eld USING BD22URSOR RFD1BUKRS-)ERFOR( bdc9eld USING BD2OK2ODE 6-)ERFOR( bdc9eld USING RFD1BUKRS record1BUKRS-)ERFOR( bdc9eld USING RFD1KTOKD record1KTOKD-

)ERFOR( bdcdltnro USING SA)(FD -

)ERFOR( bdc9eld USING BD22URSOR KNA1S)RAS-)ERFOR( bdc9eld USING BD2OK2ODE 6-)ERFOR( bdc9eld USING KNA1NA(E record1NA(E-

)ERFOR( bdc9eld USING KNA1SORT record1SORT- ---

The 2 tae is fied $ith data from the recording The suroutines 23CNPamp5 and

23FI7+ are used for this

The suroutines are caed in the reuired structure or seuence

copy SAP AG BC420 12-61

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 6288

08amp

983209 SAP AG 1999

erie)

SAPDatabase

SeJuential9ile

SAPDatabase

ALL TRASATIALL TRASATI

SeJuential9ile

ATE IPUTATE IPUT

D TableD TableD TableD Table

I Monitor

T

In contrast to atch input you can use ca transaction to directy pass data to the diaog interface

$ithout using a atch input session Cou use an interna tae (2 tae same structure and ayout

as atch input) to temporariy store your screen data Then you ca the desired transaction in your

program

Note 5n average the 2a Transaction method is 8 to times faster than using atch Input

copy SAP AG BC420 12-62

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 6388

08

983209 SAP AG 1999

all Transaction Program$ 1ample

RE)ORT abcbdcdcdeb9ct-

)ARA(ETERS d9mode DEFAUT A

udmode DEFAUT S-FOR( calltranact9on-2A TRANSA2TION FD

USING bdcdata (ODE d9mode

U)DATE udmode-

IF lt1ubrc NE - 5RITE 6 ---

ENDIF-ENDFOR(-

Screen

00

Screen

100

Screen

An additiona system ro area is added for the caed transaction The system uses this area for

processing the individua screens in the transactionH the data from the tae is added here After the

transaction is processed the second ro area is reeasedH the system continues processing in the first

ro area

Notes

In contrast to atch input there is no error ogging (error sessions) here For processing the caed

transaction the system uses the authoriDations of the user that caed the transaction The 2 tae

can ony hod data for one transaction run at a time efore another transaction is caed and its data

can e added you must eecute a amp7Famp7S= for the 2 tae

copy SAP AG BC420 12-63

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 6488

084

983209 SAP AG 1999

ALL TRASATI C6

RE)ORT 777-

2A TRANSA2TION FD USING bdcdata (ODE E-

Default for MD1 is A

2A TRANSA2TION 3tranact9oncode4 USING 3bdc1table4 C (ODE A E N C-

-ith the parameter 57 you can seect a specific dispay mode for processing the transaction The

foo$ing three modes are avaiae

A (ispay a)

If you eecute the program a the screens and a their data are dispayed This is the defaut vaue

for the 57 in 2A++ TampANSA2TI5N

N (ispay nothing)

The screens are not dispayed at a regardess of $hether any of them contained errors As soon as

the transaction has een fuy processed contro is returned to your program (The vaue of the

parameter 4PAT7 determines $hether dataase updates are eecuted or not)

7 (ispay errors ony)As soon as an error occurs in a screen the transaction is s$itched to dispay mode so that you can

correct the errors

These dispay modes are the same as those in the atch input session processing

copy SAP AG BC420 12-64

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 6588

082

983209 SAP AG 1999

RE)ORT 777-

2A TRANSA2TION FD USING BD2DATA U)DATE -

ALL TRASATI Camp

RE)ORT 777-

2A TRANSA2TION FD USING bdcdata U)DATE -

2A TRANSA2TION 3tranact9oncode4 USING 3bdc1table4 C (ODE A E N C U)DATE A S C -

Default for UPDAT1 is A

-ith the parameter 4PAT7 you can contro ho$ dataase updates arising from a transaction are

carried out There are three options

A (asynchronous updating) The caed transaction does not $ait unti the dataase has een

updated it simpy for$ard the updates to the SAP update service This usuay speeds up the 2T

program This processing mode is N5T recommended for arge data sets as the caed transaction

does not receive a competion message from the update modue

The caing 2T program therefore cannot te if the transaction has een successfuy competed Cou

shoud use the updating administration function (transaction S8) to determine $hether updating

$as terminated eary The error anaysis correction functions for are ess hepfu than $ith

synchronous updating

S (synchronous updating) -ith synchronous updating the caed transaction $aits unti a the

updates have een competed So processing is so$er than $ith synchronous updating The caed

transaction can ho$ever report any updating errors to the program $hich maes error

anaysiscorrection easier

+ (local updating) $ith oca updating the dataase is not updated in a separate process it is

updated in the caers process (see appication hep documentation for the AAP ey$ord S7T

4PAT7 TAS6 +52A+)

copy SAP AG BC420 12-65

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 6688

088

983209 SAP AG 1999

ALL TRASATI C

RE)ORT 777-DATA mtab T0)E TABE OF bdcm8coll-

2A TRANSA2TION FD USING bdcdata (ESSAGES INTO mtab-

2A TRANSA2TION 3tranact9oncode4 USING 3bdc1table4 C (ODE A E N C U)DATE A S C (ESSAGES INTO 3metab4 C -

7SSAlt7S specifies that a system messages that are output during the eecution of a 2A++

TampANSA2TI5N are $ritten to the interna tae L7SSTA The interna tae must have the

structure 2Slt25++

4nie the cassica atch input processing $ith sessions 2A++ TampANSA2TI5N does not offer any

specia processing procedures for transactions containing errors There are no restart functions for

transactions that contain errors or that cause updating terminations

copy SAP AG BC420 12-66

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 6788

083

983209 SAP AG 1999

ALL TRASATI C4

RE)ORT 777-DATA mltot T0)E ctuaram-

2A TRANSA2TION FD USING BD2DATA

O)TIONS FRO( mltot-

2A TRANSA2TION 3tranact9oncode4 USING 3bdc1table4 C (ODE A E N C U)DATE A S C (ESSAGES INTO 3metab4 C O)TIONS FRO( ot C -

RE)ORT 777-DATA mltot T0)E ctuaram-2A TRANSA2TION FD USING bdcdata

O)TIONS FRO( mltot-

The addition 5PTI5NS enaes the ca transaction statement to e controed through a structure

The structure must have the dictionary type 2T43PAampAS

The addition 5PTI5NS Famp5 must not e comined either $ith the addition 57 or $ith

4PAT7 ore information on the net side

copy SAP AG BC420 12-67

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 6888

085

983209 SAP AG 1999

Structure TUltPARAMS

DISMD1 Procen mode anaoo o addon amp

UPDMD1 $pdae mode anaoo o addon $PA

ATTMD1 CA mode CA conro

D19SI1 orce de=a EndoE e drn procen

RAMMIT +o eD a Camp amp(

IPT +o a ac np eonF a F S-B+P SPAC

I1D +o a ac np eon a=er end o= BC daa

The components are defined as foo$s

The components 7FSIM7 ampA25IT N5INPT and N5I7N can have the foo$ing

vaues KGK E Ces or K K E No

If the addition 5PTI5NS Famp5 is not specified the foo$ing settings appy to the contro

parameters

IS57 from addition 57

4P57 from addition 4PAT7

2ATT57 2ATT not active

7FSIM7 o not not use defaut $indo$s siDe

ampA25IT Successfu eit at 25IT -5amp6

N5INPT atch input session active (SC9INPT E G)

N5I7N atch input session sti active after end of 2 data

copy SAP AG BC420 12-68

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 6988

087

983209 SAP AG 1999

SMSBID Message ID

SMSBT Message T(pe C1GIGWGSGA

SMSB Message umber

SMSB6 Message ariable 6

SMSBamp Message ariable amp

SMSB Message ariable

SMSB4 Message ariable 4

SMSBID Message ID

SMSBT Message T(pe C1GIGWGSGA

SMSB Message umber

SMSB6 Message ariable 6

SMSBamp Message ariable amp

SMSB Message ariable

SMSB4 Message ariable 4

Return code$

S(stem fields$

alue Meaning

0 Successful

6000 1rror in transaction

6000 1rror in processing call transaction

see also the s(stem fields specified

alue Meaning

0 Successful

6000 1rror in transaction

6000 1rror in processing call transaction

see also the s(stem fields specified

9ield name Meaning9ield name9ield name MeaningMeaning

Return ode and S(stem 9ields

The return code is used to specify $hether the caed transaction $as processed successfuy In

addition severa system fieds are fied The numer I type and variaes of the diaog message

output y the caed transaction Cou need this information to output the message tet

copy SAP AG BC420 12-69

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 7088

030

983209 SAP AG 1999

Benerated Program of the TA Recorder

REFRES= (ESSTAB-

2A TRANSA2TION tcode USING bdcdata (ODE ctumode U)DATE cudate (ESSAGES INTO metab-OO) AT metab- ENDOO)-IF lubrc 34 AND e8rou 34 S)A2E- IF e8rouoenend - 2A FUN2TION BD2O)ENGROU) E)ORTING ---------

--------- E8rouoened - ENDIF- 2A FUN2TION BD2INSERT E)ORTING T2ODE tcode TABES D0N)ROTAB bdcdata-ENDIF-REFRES= bdcdata-

Message table output

pen error session

Insert data record that

has errors into error

session

If you have seected ca transaction on the seection screen the generated program runs as foo$s

The onine transaction is caed $ith ca transaction and passed to tae 2ATA A the

messages arising during the ca transaction are put in the interna tae 7SSTA

7SSTA is output as a ist

If you have specified an error session ( 73ltamp54P L SPA27) on the seection screen and the

ca transaction comes across an error (+3S4amp2 L 0) the error session is opened The error

session is ho$ever ony opened once Then the data record is paced in the session

A the other data records that have errors $ith ca transaction are paced in the same session

copy SAP AG BC420 12-70

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 7188

036

983209 SAP AG 1999

The Transaction Recorder

PrinciplesPrinciples

Recording )ith the LSMWRecording )ith the LSMW

Principles of atch Input and all TransactionPrinciples of atch Input and all Transaction

Integrating the TA Program into the DWIntegrating the TA Program into the DW

Using the TA Recorder Using the TA Recorder

copy SAP AG BC420 12-71

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 7288

03amp

983209 SAP AG 1999

Integrating into the DW

Transfer program

AAP Dictionar(

Integrate

SDA0

SDA6

SDAamp

SDA

Cou can integrate the generated program into the G9- The structure of the fie must e created

in the AAP ictionary The taes SGA0 SGA8 SGA1 and SGA $i e fied

copy SAP AG BC420 12-72

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 7388

03

983209 SAP AG 1999

DW Release 42

Goo

-B eeae 45

aa ran=er ogtec

Int customer data transfer ob-ect

ecord =ed

Dece daa ran=er

d Goo

The ampunction ampor interatin TA recorder prora$s is

i$ple$ented in the

D+-B in Release

The recorder can e integrated as of ampeease and it is provided in the G9- ampeease

ltot to the G9- ampeease 5n the initia screen you can integrate programs y choosing ampoto

( +nt customer ata transfer o-ect

copy SAP AG BC420 12-73

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 7488

034

983209 SAP AG 1999

reating Program as D b-ect

Comer ran=er ogtec

ampgtec ype

Sor eD =or ogtec

aa ran=er proram

Srcre name

9900

(+A1

Cane comer

ZBCA+G

ZB

ustomer transfer ob-ect

umber bet)een 7000 and 7777

b-ect t(pe

Assignment to R ob-ect

Short tet for D ob-ectShort description

Data transfer program

ame of generated program

Structure name

A structure Cstructure la(out )ith this name is created in

the AAP Dictionar(

For ampeease transfer oects $ere not organiDed y 5amp oects ut y a G numer (00089

OOOO) The numer range O0009OOOO is reserved for customers

To create a connection to the ne$ G 9- you must assign the program to a 5amp oect

2reate a short tet for the G oect This tet $i appear in the method seection ist

Specify the program to e incuded

Specify a name for the structure to e created in the AAP ictionary

Note $he generated program appears under program type +N and not under program type

-

copy SAP AG BC420 12-74

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 7588

032

983209 SAP AG 1999

Adantages

Automatic program registration in the DW in

Release 48

ou can use all the functions defined for

standard ob-ects

1ception$ The (reate ampile ith data

function

If you incuded the oect in the ampeease $orench it is automaticay avaiae in the ampeease

B $orench

A the $orench functions are avaiae for your oect ecept for Create files ith transfer ata

copy SAP AG BC420 12-75

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 7688

038

983209 SAP AG 1999

ou are no) able to$

The Transaction Recorder$ Unit Summar(

Use the recording function in the LSMW to create

a batch input session )ith the data from the

eternal s(stem

Use the TA Recorder to create (our o)n data

transfer program

Anal(e programs that )or+ )ith batch input or

call transaction

Integrate the TA Recorder programs into the

DW

copy SAP AG BC420 12-76

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 7788

ercise 1

nit $ -ecorder

$opic 2reating etors

$ransaction -ecorder ercise 1

bull 2reating detors $ith eterna numer assignment

bull etor numers M9980008 to M9980080

Address data for detors $ith eterna numer assignment is to

e transferred using program ampFI700

ro4ect F5

Supro4ect +5

-un +575

$as)s 85 95 8S25

9oad program -F+00

8 In the foo$ing eercises eisting data is to e changed Therefore these detors $ith

eterna numer assignment have to first e created

898 4nder suproect 79 create run 797G9 $ith the name Detors ith

eternal numers

copy SAP AG BC420 12-77

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 7888

891 2reate the foo$ing three tass The tass map the foo$ing process steps

convert data create + session and process + session

89198 In run 797G9 create the foo$ing tas

9 Tas AP9

9 Name 2onvert data 9 Tas type AP

9 Program type +S-

Seect the foo$ing +S- oect

+S- proect 2109

+S- suproect 7I9

+S- oect I997GT

89191 In run 797G9 create the foo$ing tas 9 Tas +5A9

9 Name 2reate I session

Tas type +5A

9 Program type INP

Seect program ampFI700 $ith the variant

I97G9

8919 In run 797G9 create the foo$ing tas

9 Tas S29

9 Name Process I session Tas type S2

9 Program type amp7P5

Seect program ampS2S4 $ith the variant

S497G9

Note that you have to correct the seuence of the tass 2onvert data

create + session and process + session

4se the uttons

89 Start the run

The detors $i e created $ith eterna numer assignments

89 2hec in transaction F0 that the detors M9980008 to M9980080 have een

created

copy SAP AG BC420 12-78

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 7988

ercise

nit $ransaction -ecorder

$opic -ecording function in the 9S8(

bull 2reate a recording using the +S-

bull ltenerate a atch input session

2hange the detor address data in the amp System

Name of the recording +

Name of the file +2055+F9

8 2reate the recording 7I3 using the +S- ampecord the transaction F01 (2hange

detor)

898 efore you create the recording first test the transaction onineQ

For the recording use detor M9980008 5n the initia screen of the F01

maintain the foo$ing fieds ony

etor etor M9980008

2ompany code 0008

Address data seect

Note $he data record must e saved hile recording

891 aintain the names and the descriptions for the foo$ing fieds

Name city street posta code and teephone numereete a other fieds in screen 880 from the recording (eg S5ampT+ +AN8

SPampAS)

4se the same technica names as sho$n in the tae eo$ (automatic fied

mapping)

copy SAP AG BC420 12-79

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 8088

1 2reate the suproect 7I9 and the ne$ oect TA3 in your proect 2109

aintain the oect attriutes and seect the item atch input recording Seect your

recording 7I3

2reate the source structure address

2reate the source fieds according to the tae eo$ 5r copy them from proect 2109S37N suproect 7I900 oect TA900

198 Fie setup The data from the egacy system are dispayed in the foo$ing tae

Fied name Fied type Fied ength escription

N5 2 8B etor numer

NA7 2 Name

STamp77T 2 Street

2ITC 2 2ityPace of residence

MIP 2 80 Posta code

T7+ 2 8B Teephone numer

191 aintain the fied mapping 4se the automatic fied mapping (via menu item

7tras)

19 Specify the fies 5ny maintain the fie name of the source fie

Name of the fie 21099IFI+7

2odepage 8800

19 Import the data and convert them ispay the data in each caseQ

19 2reate a atch input session

19B ampun the atch input session

copy SAP AG BC420 12-80

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 8188

ercise 3

nit $ransaction -ecorder

$opic -ecording ith the $ -ecorder

bull ltenerate a recording using the TA recorder

bull Test the recording

2hange the address data of detors in the amp system

Name recording $+

Name of the file +2055+F9

8 2reate the recording TA37I3 using the transaction recorder ampecord the

transaction F01 (change detor)

898 4se detor M9980008 for the recording 5n the F01 initia screen ony

maintain the foo$ing fieds

etor etor M9980008

2ompany 2ode 0008

Address data seect

Note $he data record must e saved hen recording

eete a fieds that do not eist in the source fie 21099IFI+7 from screen

880 in the recording (eg 6NA89S5ampT+ 6NA89+AN8 6ANNQ9SPampAS) Note o not deete fieds ampF01946ampS and ampF0190880

Save the recording no$

1 S$itch to the recordings overvie$

198 Process the recording $ith the processing mode A (dispay a)

191 Process the recording $ith the processing mode RN (no dispay)

19 If the recording has een tested and no error has occurred generate a I session

and run it using the I monitor If an error shoud occur generate the recordingagainQ

copy SAP AG BC420 12-81

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 8288

From the recording generate the program M21037I3 in your deveopment cass

2109 Seect the foo$ing

bull ampead fied contents from fie

bull 2reate test data in the fie 2103dei3test3tt

98 Save this program and eecute it ltenerate one I session each and process it

2arry out the same steps again using the ca transaction

The generated program shoud no$ e changed so that fie 21099IFI+7 can e

read and processed

98 2hange the defaut vaue of the fie name (parameter dataset) in 21099

IFI+7

91 2hange the structure definition eete the company code fied and the address

data checo from the structure

9 2hange the su9routine ca perform dc3fied for the company code (KampF019

46ampSK) so that the vaue 0008 is transferred

9 2hange the su9routine ca perform dc3fied for the address data checo

(KampF0190880K) so that the vaue G is transferred

9 Start the program again and read the data from the fie 21099IFI+7 $ith

detor data ltenerate a I session $ith it and run it

copy SAP AG BC420 12-82

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 8388

033 Include DR16INCLUDE BDCRECX1

SELECTION-SCREEN BEGIN OF LINE

PARAMETERS SESSION RADIOBUTTON GROUP CTU create sessi SELECTION-SCREEN COMMENT $amp TEXT-S FOR FIELD SESSION

se(ecti-scree )siti +

PARAMETERS CTU RADIOBUTTON GROUP CTU ca(( trasacti

SELECTION-SCREEN COMMENT $amp TEXT-S FOR FIELD CTU

SELECTION-SCREEN END OF LINE

SELECTION-SCREEN BEGIN OF LINE

SELECTION-SCREEN COMMENT $amp TEXT-S1 FOR FIELD GROUP

se(ecti-scree )siti $+

PARAMETERS GROUP1$amp r) ae 0 sessi

SELECTION-SCREEN COMMENT $amp TEXT-S+ FOR FIELD CTUMODE

se(ecti-scree )siti

PARAMETERS CTUMODE LIE CTU2PARAMS-DISMODE DEFAULT 3N3

A4 s56 a(( 78)rs

E4 s56 78)r errr (8

N4 7 t 7is)(a8 78)r

SELECTION-SCREEN END OF LINE

SELECTION-SCREEN BEGIN OF LINE

SELECTION-SCREEN COMMENT $amp TEXT-S$ FOR FIELD USER

se(ecti-scree )siti $+

PARAMETERS4 USER1$amp DEFAULT S9-UNAME ser 0r sessi i atc5

SELECTION-SCREEN COMMENT $amp TEXT-S FOR FIELD CUPDATE

se(ecti-scree )siti

PARAMETERS CUPDATE LIE CTU2PARAMS-UPDMODE DEFAULT 3L3

S4 s8c5rs(8

A4 as8c5rs(8

L4 (ca(

SELECTION-SCREEN END OF LINE

SELECTION-SCREEN BEGIN OF LINE

SELECTION-SCREEN COMMENT $amp TEXT-S FOR FIELD EEP

se(ecti-scree )siti $+

PARAMETERS4 EEP AS CltECBOX 3 3 = 7e(ete sessi i0 0iis5e7

3X3 = gtee) sessi i0 0iis5e7

SELECTION-SCREEN COMMENT $amp TEXT-S FOR FIELD E2GROUP

copy SAP AG BC420 12-83

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 8488

se(ecti-scree )siti

)araeters E2GROUP1$amp r) ae 0 errr-sessi

SELECTION-SCREEN END OF LINE

SELECTION-SCREEN BEGIN OF LINE

SELECTION-SCREEN COMMENT $amp TEXT-S FOR FIELD ltOLDDATE

se(ecti-scree )siti $+

PARAMETERS4 ltOLDDATE LIE S9-DATUM

SELECTION-SCREEN COMMENT +11amp TEXT-S$ FOR FIELD E2USER

se(ecti-scree )siti

PARAMETERS4 E2USER1$amp DEFAULT S9-UNAME ser 0r errr-sessi

SELECTION-SCREEN END OF LINE

SELECTION-SCREEN BEGIN OF LINE

SELECTION-SCREEN COMMENT +11amp TEXT-S FOR FIELD E2EEP

se(ecti-scree )siti

PARAMETERS4 E2EEP AS CltECBOX 3 3 = 7e(ete sessi i0 0iis5e7

3X3 = gtee) sessi i0 0iis5e7

SELECTION-SCREEN END OF LINE

SELECTION-SCREEN BEGIN OF LINE

SELECTION-SCREEN COMMENT +11amp TEXT-S FOR FIELD E2ltDATE

se(ecti-scree )siti

PARAMETERS4 E2ltDATE LIE S9-DATUM

SELECTION-SCREEN END OF LINE

SELECTION-SCREEN SIP

SELECTION-SCREEN BEGIN OF LINE

SELECTION-SCREEN COMMENT 1amp TEXT-S1 FOR FIELD NODATA

PARAMETERS4 NODATA DEFAULT 33 LOER CASE 7ata

SELECTION-SCREEN END OF LINE

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

Batc5i)t7ata 0 si(e trasacti

DATA4 BDCDATA LIE BDCDATA OCCURS ITlt ltEADER LINE

essaes 0 ca(( trasacti

DATA4 MESSTAB LIE BDCMSGCOLL OCCURS ITlt ltEADER LINE

errr sessi )ee7 3 3 r 3X3amp

DATA4 E2GROUP2OPENED

essae tets

TABLES4 T1

copy SAP AG BC420 12-84

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 8588

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

at se(ecti scree

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

AT SELECTION-SCREEN

r) a7 ser st e 0i((e7 0r create sessi

IF SESSION = 3X3 AND

GROUP = SPACE OR USER = SPACE

MESSAGE E1MSamp

ENDIF

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

)e 7ataset

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

FORM OPEN2DATASET USING P2DATASET

OPEN DATASET P2DATASET IN TEXT MODE

IF S9-SUBRC

RITE4 TEXT-E S9-SUBRC

STOP

ENDIF

ENDFORM

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

c(se 7ataset

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

FORM CLOSE2DATASET USING P2DATASET

CLOSE DATASET P2DATASET

ENDFORM

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

create atc5i)t sessi

t 0r ca(( trasacti siamp

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

FORM OPEN2GROUP

IF SESSION = 3X3

SIP

RITE4 $amp 3Create r)3I1amp GROUP

SIP

)e atc5i)t r)

CALL FUNCTION 3BDC2OPEN2GROUP3

EXPORTING CLIENT = S9-MANDT

copy SAP AG BC420 12-85

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 8688

GROUP = GROUP

USER = USER

EEP = EEP

ltOLDDATE = ltOLDDATE

RITE4 amp 3BDC2OPEN2GROUP3I$amp

1$amp 3retrc7e43I+amp

S9-SUBRC

ENDIF

ENDFORM

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

e7 atc5i)t sessi

ca(( trasacti si4 errr sessiamp

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

FORM CLOSE2GROUP

IF SESSION = 3X3

c(se atc5i)t r)

CALL FUNCTION 3BDC2CLOSE2GROUP3

RITE4 amp 3BDC2CLOSE2GROUP3Iamp

1$amp 3retrc7e43I+amp

S9-SUBRC

ELSE

IF E2GROUP2OPENED = 3X3

CALL FUNCTION 3BDC2CLOSE2GROUP3

RITE4

RITE4 amp 3Fe5(era))e 6r7e eret3Iamp

ENDIF

ENDIF

ENDFORM

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

Start e6 trasacti accr7i t )araeters

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

FORM BDC2TRANSACTION USING TCODE

DATA4 L2MSTRINGamp

DATA4 L2SUBRC LIE S9-SUBRC

atc5 i)t sessi

IF SESSION = 3X3

CALL FUNCTION 3BDC2INSERT3

EXPORTING TCODE = TCODE

TABLES D9NPROTAB = BDCDATA

RITE4 3BDC2INSERT3Iamp

copy SAP AG BC420 12-86

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 8788

TCODE

3retrc7e43I+amp

S9-SUBRC

3RECORD43

S9-INDEX

ca(( trasacti si

ELSE

REFRESlt MESSTAB

CALL TRANSACTION TCODE USING BDCDATA

MODE CTUMODE

UPDATE CUPDATE

MESSAGES INTO MESSTAB

L2SUBRC = S9-SUBRC

RITE4 3CALL2TRANSACTION3

TCODE

3retrc7e43I+amp

L2SUBRC

3RECORD43

S9-INDEX

LOOP AT MESSTAB

SELECT SINGLE FROM T1 ltERE SPRSL = MESSTAB-MSGSPRA

AND ARBGB = MESSTAB-MSGID

AND MSGNR = MESSTAB-MSGNR

IF S9-SUBRC =

L2MSTRING = T1-TEXT

IF L2MSTRING CS 313

REPLACE 313 ITlt MESSTAB-MSGH1 INTO L2MSTRING

REPLACE 3$3 ITlt MESSTAB-MSGH$ INTO L2MSTRING

REPLACE 33 ITlt MESSTAB-MSGH INTO L2MSTRING

REPLACE 33 ITlt MESSTAB-MSGH INTO L2MSTRING

ELSE

REPLACE 33 ITlt MESSTAB-MSGH1 INTO L2MSTRING

REPLACE 33 ITlt MESSTAB-MSGH$ INTO L2MSTRING

REPLACE 33 ITlt MESSTAB-MSGH INTO L2MSTRING

REPLACE 33 ITlt MESSTAB-MSGH INTO L2MSTRING

ENDIF

CONDENSE L2MSTRING

RITE4 MESSTAB-MSGT9P L2MSTRING$+amp

ELSE

RITE4 MESSTAB

ENDIF

ENDLOOP

copy SAP AG BC420 12-87

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 8888

SIP

Eree 0e5(era))e

IF L2SUBRC AND E2GROUP SPACE

IF E2GROUP2OPENED = 3 3

CALL FUNCTION 3BDC2OPEN2GROUP3

EXPORTING CLIENT = S9-MANDT

GROUP = E2GROUP

USER = E2USER

EEP = E2EEP

ltOLDDATE = E2ltDATE

E2GROUP2OPENED = 3X3

ENDIF

CALL FUNCTION 3BDC2INSERT3

EXPORTING TCODE = TCODE

TABLES D9NPROTAB = BDCDATA

ENDIF

ENDIF

REFRESlt BDCDATA

ENDFORM

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

Start e6 scree

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

FORM BDC2D9NPRO USING PROGRAM D9NPRO

CLEAR BDCDATA

BDCDATA-PROGRAM = PROGRAM

BDCDATA-D9NPRO = D9NPRO

BDCDATA-D9NBEGIN = 3X3

APPEND BDCDATA

ENDFORM

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

Isert 0ie(7

Page 33: BC420_46C - 012The Transaction Recorder

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 3388

0

983209 SAP AG 1999

1 02 BS

2 SAP02 106

3 BCC$Samp $SZAV

4 BCamp(Camp )00 5 02-($++ -88-10000

6 02-0110

7 02-0130

8 $SZAV

9 SAP02 111

10 BCamp(Camp V

11 BCC$Samp A1AA-amp$S+$1

12 A1AA-S Garden Sree

Program Screen St 9ield ame 9ield alue

Recording 1ditor

Recording

Add gt delete lines 9ormat chec+

Import gt eport of recording

In the editor you can add or deete ines Cou can aso change the contents of individua ines

-ith the function Chec) you can specify $hether the edited version of the recording sti has the

correct synta

Cou can aso eport import recordings to from a seuentia fie

After editing save the recording changes

copy SAP AG BC420 12-33

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 3488

04

983209 SAP AG 1999

Recording Seeral Transaction Runs

RecordingF

Directl( after the first recordingG or

In the displa( mode of the recording

In this step you can record additiona transactions and add additiona transaction runs to the

recording

Cou can record the additiona transactions directy after a recording or in the edit screen of a

recording

copy SAP AG BC420 12-34

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 3588

02

983209 SAP AG 1999

1ditor$ Importing and 1porting Recordings

6 T 9D0amp S

amp SAPM90ampD 608

DltURSR

4

2

8 SAPM90ampD 666

60

66

Program Screen St 9ield name 9ield alue

cempA

e name

aa =orma

cemp

A

e name

aa =orma

1port

Import

Presentation Serer

If the editor functions in the systems do not provide a the functions you need you can do$noad the

recording to your presentation server using the Eort function and then edit the recording using a

P2 editor

Cou use the Import function to import the data ac into the amp System ae sure the fie is sti in

the correct format

copy SAP AG BC420 12-35

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 3688

08

983209 SAP AG 1999

Processing the Recording

Recording

Process )ith ALL TRASATI

Parameer

Proce mode$pdae mode

CA mode

e=a e

Con a=er comm

+o a B eon

nd +o a B mode

A

A

T

The recording can e eecuted directy The data from the recording is used and the transaction is

processed $ith ca transaction

2a transaction provides a range of options for caing appication transactions $hich are discussed

on the foo$ing t$o pages

copy SAP AG BC420 12-36

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 3788

03

983209 SAP AG 1999

Process mode

Update mode

ATT mode

Processing Recording )ith T 6

A

1

Displa( all screens

Displa( errors onl(

o displa(

L

S

A

Local

S(nchronous

As(nchronous

A

o ATT

ATT )ithout indiidual screen control

ATT )ith indiidual screen control

Processing mode

=ere you can specify the processing mode 9 it is the same as the processing mode for atch input

4pdate mode

=ere you can specify the update mode For more information see the unit ca transaction

2ATT mode

=ere you can mae specia settings if you $ant to test the recording under 2ATT conditions (ony

necessary for 2ATT runs) Specia functions are caed in the 2ATT too for each screen at the end of

P5 and at the start of PAI

copy SAP AG BC420 12-37

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 3888

05

983209 SAP AG 1999

Default sie

ont after commit

ot a I session

1nd$ ot a I mode

Processing Recording )ith T amp

The screen standard sie is used for the

processing

ommit )or+ does not end the processing

o I mode is actie The transaction )ill run

through as in online

I mode is selected nce the data in the D

table is processedG the I mode is set to inactie

Standard siDe

If you seect this the screens are processed in the standard siDe in the foreground (in foreground or

dispay errors ony) Note the standard siDe is a$ays used for acground processing

Further after commit

The first commit $or in a transaction does not ead to the end of the recording

Note A atch input transaction is ended $ith the first commit $or

No I mode

The system fied SC9INPT is not set (SC9INPT E ) So transactions are run through as in onine

7nd No I mode

5ny use if you choose the processing mode 7 (dispay errors ony) Then the transaction is processed in the acground in atch input mode and if there is an error the screens run through in

the foreground

copy SAP AG BC420 12-38

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 3988

07

983209 SAP AG 1999

I Mode

atch input

mode

nline

Some transactions behae differentl( in batch input mode

than in online Cbatch input capabilit(

atch input mode sets the s(stem field SIPT H

Not every transaction can run the same onine and in atch input mode The transaction must decide

itsef $hether it is caed onine or in atch input mode

The system sets the system fied SC9INPT E G if the atch input mode is active (this aso appies

to ca transaction) From this system fied the transaction can identify $hether to run onine or in

atch input mode

copy SAP AG BC420 12-39

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 4088

040

983209 SAP AG 1999

reating a Session 9rom the Recording

Recordingnl( contains the data

from the recording

Seon name 02amp

Aoraon ampBS(eep eon

oclt dae 10102000

Cou can create a atch input session directy from the recording that you can then process using the

atch input monitor

copy SAP AG BC420 12-40

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 4188

046

983209 SAP AG 1999

reating Test Data

Test Data

Recording

ranranpBC420AAe name

The file onl( contains the data from the recording

Rgt

Application Serer

Structure

Cou can create a fie from the recordingH the fie $i contain a the fieds from the recording The

fieds are added to the fie $ith the ength you specified in the definition

The fied order corresponds to the order in the recording overvie$ Technica fieds

(2356257 2324ampS5amp and so on) are incuded

The data can ony e stored on the appication server If you do not specify a path the fie is stored in

the $or directory of the appication server

If the specified test fie aready eists the ne$ data record is added to this fie

copy SAP AG BC420 12-41

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 4288

04amp

983209 SAP AG 1999

ed conen

reating a Program

Recording

ZBC420ampProram name

Transfer Program

e daa

ead =rom =e

ran=er =rom recordn

reate

9ile nameTest data

ranranpBC420AA

Cou can generate a program from the recording

In the foo$ing diaog o enter a program name In addition you can choose the type and method

for fiing the maintained fied contents from the recorded screens

4se the vaues used for the recording If you reuire feie data transfer you $i have to modify

this program ater

ParameteriDe the input vaues and read these vaues from a fie A data structure is created for

parameteriDationH the data records are read from an eterna fie into this data structure The

program assumes the fie $as taiored to this data structure

If you have decided to parameteriDe the input vaues you shoud aso create a test fie during

generation To do this seect the checo and enter a name for the fie

The attriute maintenance screen of the AAP editor appears aintain the attriutes and save the

program

copy SAP AG BC420 12-42

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 4388

04

983209 SAP AG 1999

Program 9unctions

Online

transaction

Transfer program

To

error

1rror

ption 6ption ampFlat SAP

structure

Monitor

Cou have no$ generated a data transfer program for importing data into the amp System The

program can eecute the data transfer using atch input or ca transaction

If you choose option 1 and there is an error the data record is paced into a atch input session

copy SAP AG BC420 12-43

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 4488

044

983209 SAP AG 1999

Benerating 9unction Modules

Recording

Zcreaedeor ncon mode

ncon rop

Sor eD

ZBC420

Creae comer

9unction module

nl( one data record can be processed at a time

In the net diaog o you can generate a function modue a function group and short tet from the

recording The function modue is automaticay created in the function group

copy SAP AG BC420 12-44

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 4588

042

983209 SAP AG 1999

9unction of 9unction Modules

Online

transaction

To

error

1rror

ption 6 ption amp

9unction module

Import

Parameter 1port

parameter

Tables

M1SSTA

Monitor

S$BC

Import interface

The import interface consists of a technica part and the fieds from the recording (A parameter is

created for each input fied of the recorded transactions)

7port interface

Simpy consists of the parameter S4amp2 The function modue $i return a vaue in the system

fied SC9S4amp2 after caing ca transaction This return vaue is set to Dero if the data record has

een correcty processed (5ny appies to 2T)

If a session is created you $i e notified $hether the data record coud e paced into the session

Tae interfaceThis is used ony if the function modue $ors $ith ca transaction The tae contains a the

system messages

copy SAP AG BC420 12-45

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 4688

048

983209 SAP AG 1999

Import Interface of 9unction Module

$

Technical

fields

Data

fields

BI session or CALL TRANSACTION

Processin $ode

pdate $ode

a$e oamp BI session iamp (T initial)

Bacround user iamp (T initial)

Delete session aampter processin

Loc date oamp session

ODATA indicator

TU

MD1

UPDAT1

BRUP

US1R

=11P

ELDDAT1

DATA

Cou can use parameter 2T4 to specify $hether the function modue creates a atch input session

(2T4 E ) or updates the data record directy using ca transaction (2T4 E G)

The other parameters are fied as for a atch input session header

Note 7very time the function modue is caed a atch input session is created

If the session is to contain severa transactions proceed as foo$s

ltenerate the transaction severa times This can e achieved y recording the transaction again The

function modue interface $i then contain more than one transaction -hen the function modue is

caed severa transactions can e generated for each session

copy SAP AG BC420 12-46

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 4788

043

983209 SAP AG 1999

The Transaction Recorder

PrinciplesPrinciples

Recording )ith the LSMWRecording )ith the LSMW

Principles of atch Input and all TransactionPrinciples of atch Input and all Transaction

Integrating the TA Program into the DWIntegrating the TA Program into the DW

Using the TA Recorder Using the TA Recorder

copy SAP AG BC420 12-47

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 4888

045

983209 SAP AG 1999

Benerated Program

9unction modules DltP1ltBRUP

DltIS1RT

DltLS1ltBRUP

AAP Program

Define structure of

data in seJuential

fileDefine D

table

pen seJuential file

pen I session

Read data recordCseJuential file

9ill D table

9ill I session gtALL TRASATI

Last data record K

lose I session

lose seJuential file

The generated program has the structure dispayed aove It uses the standard function modues for

creating atch input sessions

copy SAP AG BC420 12-48

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 4988

047

983209 SAP AG 1999

Structure of the Benerated Program

Benerated part

Define D

table

pen seJuential file

pen I session

Read data record

9ill D table

9ill I session gtALL TRASATI

Last data recordK

lose I session

lose seJuential file

Include DR16

Define filestructure

P1ltDATAS1T

P1ltBRUP

DltDPR

Dlt9I1LD

DltTRASATI

LS1ltBRUP

LS1ltDATAS1T

The generated program consists of t$o parts 9 a generated part and the incude 2amp72G8 The

incude is provided in the standard system

The incude contains the definition of the reuired 2 tae and a further seven suroutines These

suroutines eecute the foo$ing functions

5pen and cose fie

5pen and cose session

Fi 2 tae

Fi session

The generated part is the main program and cas the reevant suroutines A structure is aso

generated in the generated part to read the eterna data into the fie

See the Appendi for more information on the 2amp72G8 program

copy SAP AG BC420 12-49

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 5088

020

983209 SAP AG 1999

Structure of D Table

PRBRAM DPR D1BI 9AM 9ALPRBRAMPRBRAM DPRDPR D1BID1BI 9AM9AM 9AL9AL

SAPM90ampD 0602

R90ampD=UR 600000

R90ampDU=RS 0006

R90ampD=T=D =UA

SAPM90ampD 0660

=A6AM16 Smith

=A6PSTL 87000

=A6LAD6 US

=A6SPRAS 1

SAPM90ampD 06amp0

=A6ST1B US6amp428357DDATA

PRBRAM

DPR

D1BI

9AM

9AL

EAR

UM

EAR

EAR

EAR

40

4

6

6amp

6amp

D Module pool

D Screen number

D Start of screen

D 9ield name

D 9ield contents

9ield ame T(pe Length Short Tet

AAP Dictionar(

The 2 tae has the same structure as in a standard transfer

copy SAP AG BC420 12-50

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 5188

026

983209 SAP AG 1999

Read Structure

Recording

DATA BEGIN OF record data element BUKRS bukr$amp data element KTOKD ktokd$amp data element NA(EG) name$+amp data element SORT ortl$ampEND OF record-

record

Automaticall( generated

from recording

The structure of the fie is automaticay generated and is a$ays defined $ith the name amp725amp

The generated structure a$ays has the same ayout 7ach fied is defined y t$o generated ro$s

The first ro$ is a$ays a comment ro$ containing the tet J data eement and the data eement of

the screen fied from the recording In the net ro$ the fied itsef is defined $ith the name of the

data eement foo$ed y a three9digit position numer $hich specifies the ocation in the structure

The ength of the fied is set y the ength of the data eement If a fied is not defined through a data

eement the system uses the ength of the screen fied

copy SAP AG BC420 12-51

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 5288

02amp

983209 SAP AG 1999

pening and losing the 9ile

P1ltDATAS1T

LS1ltDATAS1T

FOR( oendataet USING dataet-O)EN DATASET dataet IN TET (ODE-

IF S01SUBR2 34 - 5RITE 6 te7t1e S01SUBR2-STO)-

ENDIF-

ENDFOR(-

FOR( cloedataet USING dataet-2OSE DATASET dataet-

ENDFOR(-

Include

DR16

The suroutine 5P7N3ATAS7T opens the seuentia fie

The suroutine 2+5S73ATAS7T coses the seuentia fie

copy SAP AG BC420 12-52

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 5388

02

983209 SAP AG 1999

9unction Modules for I Program

lient

Session name

Eold date

=eep session

D user name

RecordK

LI1T

BRUP

ELDDAT1

=11P

US1R

R1RD

DltP1ltBRUPDltP1ltBRUP

Transaction code

D table

TD1

DPRTA

DltIS1RTDltIS1RT

DltLS1ltBRUPDltLS1ltBRUP

pen Isessionpen Isession

Insert data for

transactions

Insert data for

transactions

lose I

session

lose I

session

The foo$ing function modues are provided for creating atch input sessions (function group

S2)

235P7N3ltamp54P

2reates a ne$ session and contains genera data for the $hoe session

23INS7ampT

Inserts a the data for a transaction into the session The transferred interna tae $ith the

structure 2ATA must contain a the data reuired for fuy processing the transaction

232+5S73ltamp54P

2oses the session after a the data has een inserted As soon as the session has een cosed it

can e processed

The interna tae $ith the structure 2ATA can ony contain atch input data for one singe

transaction run So the individua transactions are inserted into the atch input session in a oop

using severa 23INS7ampT cas

copy SAP AG BC420 12-53

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 5488

024

983209 SAP AG 2001

9unction Module DltP1ltBRUP

ALL 9UTI DltP1ltBRUPALL 9UTI DltP1ltBRUP

1PRTIB

LI1T client

BRUP session name

ELDDAT1 loc+ date

=11P delete flag

US1R bdc user name

R1RD recording

IMPRTIB

NID internal session +e(

11PTIS

1PRTIB

LI1T client

BRUP session name

ELDDAT1 loc+ date

=11P delete flag

US1R bdc user name

R1RD recording

IMPRTIB NID internal session +e(

11PTIS

-ith the function modue 235P7N3ltamp54P you can open a atch input session

The foo$ing parameters are mandatory

2+I7NT (cient)

ltamp54P (session name)

4S7amp (user name)

Note The 4S7amp must a$ays e specified This user name is reuired for processing the session

in atch mode

The foo$ing parameters are optiona

=5+AT7 specifies the eariest date on $hich the session can e started677P fag specifies $hether session shoud e deeted after it has een successfuy processed The

677P fag is ignored if the session contains errors

677P E K K means deete the session after processing (defaut vaue) H

677P E KGK means do not deete session

amp725amp E KGK ao$s you to create a recording instead of a I session

If gtI is specified the function modue returns the interna session ey This is needed to e ae to

differentiate sessions that have the same name

-ith 7G27PTI5NS you get various return vaues that can e ueried $ith SC9S4amp2

Note In onine mode the onine user is used for the authoriDation checs regardess of the user

name specified

copy SAP AG BC420 12-54

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 5588

022

983209 SAP AG 1999

Subprogram P1ltBRUP

P1ltBRUP

FOR( oen8rou-IF e9on -

2A FUN2TION BD2O)ENGROU) E)ORTING 2IENT lt1mandt GROU) 8rou USER uer KEE) kee

=ODDATE gtolddate-

ENDIF-ENDFOR(-

Include

DR16

The suprogram 5P7N3ltamp54P opens the atch input session

copy SAP AG BC420 12-55

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 5688

028

983209 SAP AG 1999

9unction Module DltIS1RT

ALL 9UTI DltIS1RTALL 9UTI DltIS1RT

IMPRT

TD1 Transaction code

PSTltLAL Update locall(

PRITIB print list

TAL1S DPRTA bdclttable

11PTIS

IMPRT

TD1 Transaction code

PSTltLAL Update locall(

PRITIB print list

TAL1S DPRTA bdclttable

11PTIS

-ith the function modue 23INS7ampT you can add transaction data to the session

Cou need an interna 2 tae to transfer the data

The foo$ing parameters are mandatory

T257 Transaction code

CNPamp5TA 2 tae

The foo$ing parameters are optiona

P5ST3+52A+ E KGK activates oca updating This means that the data to e updated is ept in the

appication server and updated in the ast step of the transaction This does not invove the update

process (For more information see course 28 Programming ataase 4pdates)

PampINTINlt E KGK 9 ists processed in I $i e printed immediatey -ith 7G27PTI5NS you get various return vaues that can e ueried $ith SC9S4amp2

copy SAP AG BC420 12-56

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 5788

023

983209 SAP AG 1999

Subprogram DltTRASATI

DltTRASATI

FOR( BD2TRANSA2TION USING tcode-

IF e9on -2A FUN2TION BD2INSERT

E)ORTING T2ODE tcode TABES D0N)ROTAB bdcdata-

ESE-

ENDIF-ENDFOR(-

T

Include

DR16

The suprogram 23TampANSA2TI5N moves the fied 2 tae either to a atch input session

or uses ca transaction to import the data into the system 5n the seection screen you can specify

$hether you $ant to create a session or you $ant to use ca transaction to process the data directy

The S7SSI5N fied is then set according to your seection

copy SAP AG BC420 12-57

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 5888

025

983209 SAP AG 1999

9unction Module DltLS1ltBRUP

ALL 9UTI DltLS1ltBRUP

11PTIS

TltP1 6

NU1U1lt1RRR amp

-ith the function modue 232+5S73ltamp54P you can cose a atch input session

In 7G27PTI5NS you get various return vaues that can e ueried $ith SC9S4amp2

copy SAP AG BC420 12-58

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 5988

027

983209 SAP AG 1999

Subprogram LS1ltBRUP

FOR( cloe8rou-IF e9on -cloe batcgt 9nut 8rou

2A FUN2TION BD22OSEGROU)-

ESE-IF e8rouoened -

2A FUN2TION BD22OSEGROU)-

ENDIF-ENDIF-

ENDFOR(-

LS1ltBRUPlose session

lose error session

Include

DR16

The suprogram 2+5S73ltamp54P coses the atch input session The suprogram differentiates

et$een a norma I session (S7SSI5N E G) and a session opened $hen ca transaction

encountered an error (73ltamp54P35P7N7 E G)

copy SAP AG BC420 12-59

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 6088

080

983209 SAP AG 1999

Subprograms DltDPRG Dlt9I1LD

DltDPR

Dlt9I1LD

FOR( bdc9eld USING nam al-IF al 34 nodata-2EAR bdcdata- bdcdata1nam nam- bdcdata1al al- A))END bdcdata-ENDIF-

ENDFOR(-

FOR( bdcdltnro USING ro8ram dltnro- 2EAR bdcdata-Bdcdata1ro8ram ro8ram-Bdcdata1dltnro dltnro-Bdcdata1dltnbe89n - A))END bdcdata-ENDFOR(-

Include

DR16

The incude 2amp72GG contains t$o suprograms 23CNPamp5 and 23FI7+

Suprogram 23CNPamp5 fis the 2 tae $ith program names and screen numers

Suprogram 23FI7+ fis the 2 tae $ith fied names and vaues

7ach suprogram creates an entry in the 2 tae

copy SAP AG BC420 12-60

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 6188

086

983209 SAP AG 1999

9illing the D Table

erorm bdcdltnro u9n8 SA)(FD +- erorm bdc9eld u9n8 BD22URSOR RFD1BUKRS- erorm bdc9eld u9n8 BD2OK2ODE 6- erorm bdc9eld u9n8 RFD1BUKRS record1BUKRS- erorm bdc9eld u9n8 RFD1KTOKD record1KTOKD-

erorm bdcdltnro u9n8 SA)(FD -

erorm bdc9eld u9n8 BD22URSOR KNA1S)RAS- erorm bdc9eld u9n8 BD2OK2ODE 6- erorm bdc9eld u9n8 KNA1NA(E record1NA(E-

erorm bdc9eld u9n8 KNA1SORT record1SORT-

Recording Benerated automaticall(

from the recording

)ERFOR( bdcdltnro USING SA)(FD +- )ERFOR( bdc9eld USING BD22URSOR RFD1BUKRS-)ERFOR( bdc9eld USING BD2OK2ODE 6-)ERFOR( bdc9eld USING RFD1BUKRS record1BUKRS-)ERFOR( bdc9eld USING RFD1KTOKD record1KTOKD-

)ERFOR( bdcdltnro USING SA)(FD -

)ERFOR( bdc9eld USING BD22URSOR KNA1S)RAS-)ERFOR( bdc9eld USING BD2OK2ODE 6-)ERFOR( bdc9eld USING KNA1NA(E record1NA(E-

)ERFOR( bdc9eld USING KNA1SORT record1SORT- ---

The 2 tae is fied $ith data from the recording The suroutines 23CNPamp5 and

23FI7+ are used for this

The suroutines are caed in the reuired structure or seuence

copy SAP AG BC420 12-61

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 6288

08amp

983209 SAP AG 1999

erie)

SAPDatabase

SeJuential9ile

SAPDatabase

ALL TRASATIALL TRASATI

SeJuential9ile

ATE IPUTATE IPUT

D TableD TableD TableD Table

I Monitor

T

In contrast to atch input you can use ca transaction to directy pass data to the diaog interface

$ithout using a atch input session Cou use an interna tae (2 tae same structure and ayout

as atch input) to temporariy store your screen data Then you ca the desired transaction in your

program

Note 5n average the 2a Transaction method is 8 to times faster than using atch Input

copy SAP AG BC420 12-62

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 6388

08

983209 SAP AG 1999

all Transaction Program$ 1ample

RE)ORT abcbdcdcdeb9ct-

)ARA(ETERS d9mode DEFAUT A

udmode DEFAUT S-FOR( calltranact9on-2A TRANSA2TION FD

USING bdcdata (ODE d9mode

U)DATE udmode-

IF lt1ubrc NE - 5RITE 6 ---

ENDIF-ENDFOR(-

Screen

00

Screen

100

Screen

An additiona system ro area is added for the caed transaction The system uses this area for

processing the individua screens in the transactionH the data from the tae is added here After the

transaction is processed the second ro area is reeasedH the system continues processing in the first

ro area

Notes

In contrast to atch input there is no error ogging (error sessions) here For processing the caed

transaction the system uses the authoriDations of the user that caed the transaction The 2 tae

can ony hod data for one transaction run at a time efore another transaction is caed and its data

can e added you must eecute a amp7Famp7S= for the 2 tae

copy SAP AG BC420 12-63

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 6488

084

983209 SAP AG 1999

ALL TRASATI C6

RE)ORT 777-

2A TRANSA2TION FD USING bdcdata (ODE E-

Default for MD1 is A

2A TRANSA2TION 3tranact9oncode4 USING 3bdc1table4 C (ODE A E N C-

-ith the parameter 57 you can seect a specific dispay mode for processing the transaction The

foo$ing three modes are avaiae

A (ispay a)

If you eecute the program a the screens and a their data are dispayed This is the defaut vaue

for the 57 in 2A++ TampANSA2TI5N

N (ispay nothing)

The screens are not dispayed at a regardess of $hether any of them contained errors As soon as

the transaction has een fuy processed contro is returned to your program (The vaue of the

parameter 4PAT7 determines $hether dataase updates are eecuted or not)

7 (ispay errors ony)As soon as an error occurs in a screen the transaction is s$itched to dispay mode so that you can

correct the errors

These dispay modes are the same as those in the atch input session processing

copy SAP AG BC420 12-64

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 6588

082

983209 SAP AG 1999

RE)ORT 777-

2A TRANSA2TION FD USING BD2DATA U)DATE -

ALL TRASATI Camp

RE)ORT 777-

2A TRANSA2TION FD USING bdcdata U)DATE -

2A TRANSA2TION 3tranact9oncode4 USING 3bdc1table4 C (ODE A E N C U)DATE A S C -

Default for UPDAT1 is A

-ith the parameter 4PAT7 you can contro ho$ dataase updates arising from a transaction are

carried out There are three options

A (asynchronous updating) The caed transaction does not $ait unti the dataase has een

updated it simpy for$ard the updates to the SAP update service This usuay speeds up the 2T

program This processing mode is N5T recommended for arge data sets as the caed transaction

does not receive a competion message from the update modue

The caing 2T program therefore cannot te if the transaction has een successfuy competed Cou

shoud use the updating administration function (transaction S8) to determine $hether updating

$as terminated eary The error anaysis correction functions for are ess hepfu than $ith

synchronous updating

S (synchronous updating) -ith synchronous updating the caed transaction $aits unti a the

updates have een competed So processing is so$er than $ith synchronous updating The caed

transaction can ho$ever report any updating errors to the program $hich maes error

anaysiscorrection easier

+ (local updating) $ith oca updating the dataase is not updated in a separate process it is

updated in the caers process (see appication hep documentation for the AAP ey$ord S7T

4PAT7 TAS6 +52A+)

copy SAP AG BC420 12-65

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 6688

088

983209 SAP AG 1999

ALL TRASATI C

RE)ORT 777-DATA mtab T0)E TABE OF bdcm8coll-

2A TRANSA2TION FD USING bdcdata (ESSAGES INTO mtab-

2A TRANSA2TION 3tranact9oncode4 USING 3bdc1table4 C (ODE A E N C U)DATE A S C (ESSAGES INTO 3metab4 C -

7SSAlt7S specifies that a system messages that are output during the eecution of a 2A++

TampANSA2TI5N are $ritten to the interna tae L7SSTA The interna tae must have the

structure 2Slt25++

4nie the cassica atch input processing $ith sessions 2A++ TampANSA2TI5N does not offer any

specia processing procedures for transactions containing errors There are no restart functions for

transactions that contain errors or that cause updating terminations

copy SAP AG BC420 12-66

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 6788

083

983209 SAP AG 1999

ALL TRASATI C4

RE)ORT 777-DATA mltot T0)E ctuaram-

2A TRANSA2TION FD USING BD2DATA

O)TIONS FRO( mltot-

2A TRANSA2TION 3tranact9oncode4 USING 3bdc1table4 C (ODE A E N C U)DATE A S C (ESSAGES INTO 3metab4 C O)TIONS FRO( ot C -

RE)ORT 777-DATA mltot T0)E ctuaram-2A TRANSA2TION FD USING bdcdata

O)TIONS FRO( mltot-

The addition 5PTI5NS enaes the ca transaction statement to e controed through a structure

The structure must have the dictionary type 2T43PAampAS

The addition 5PTI5NS Famp5 must not e comined either $ith the addition 57 or $ith

4PAT7 ore information on the net side

copy SAP AG BC420 12-67

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 6888

085

983209 SAP AG 1999

Structure TUltPARAMS

DISMD1 Procen mode anaoo o addon amp

UPDMD1 $pdae mode anaoo o addon $PA

ATTMD1 CA mode CA conro

D19SI1 orce de=a EndoE e drn procen

RAMMIT +o eD a Camp amp(

IPT +o a ac np eonF a F S-B+P SPAC

I1D +o a ac np eon a=er end o= BC daa

The components are defined as foo$s

The components 7FSIM7 ampA25IT N5INPT and N5I7N can have the foo$ing

vaues KGK E Ces or K K E No

If the addition 5PTI5NS Famp5 is not specified the foo$ing settings appy to the contro

parameters

IS57 from addition 57

4P57 from addition 4PAT7

2ATT57 2ATT not active

7FSIM7 o not not use defaut $indo$s siDe

ampA25IT Successfu eit at 25IT -5amp6

N5INPT atch input session active (SC9INPT E G)

N5I7N atch input session sti active after end of 2 data

copy SAP AG BC420 12-68

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 6988

087

983209 SAP AG 1999

SMSBID Message ID

SMSBT Message T(pe C1GIGWGSGA

SMSB Message umber

SMSB6 Message ariable 6

SMSBamp Message ariable amp

SMSB Message ariable

SMSB4 Message ariable 4

SMSBID Message ID

SMSBT Message T(pe C1GIGWGSGA

SMSB Message umber

SMSB6 Message ariable 6

SMSBamp Message ariable amp

SMSB Message ariable

SMSB4 Message ariable 4

Return code$

S(stem fields$

alue Meaning

0 Successful

6000 1rror in transaction

6000 1rror in processing call transaction

see also the s(stem fields specified

alue Meaning

0 Successful

6000 1rror in transaction

6000 1rror in processing call transaction

see also the s(stem fields specified

9ield name Meaning9ield name9ield name MeaningMeaning

Return ode and S(stem 9ields

The return code is used to specify $hether the caed transaction $as processed successfuy In

addition severa system fieds are fied The numer I type and variaes of the diaog message

output y the caed transaction Cou need this information to output the message tet

copy SAP AG BC420 12-69

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 7088

030

983209 SAP AG 1999

Benerated Program of the TA Recorder

REFRES= (ESSTAB-

2A TRANSA2TION tcode USING bdcdata (ODE ctumode U)DATE cudate (ESSAGES INTO metab-OO) AT metab- ENDOO)-IF lubrc 34 AND e8rou 34 S)A2E- IF e8rouoenend - 2A FUN2TION BD2O)ENGROU) E)ORTING ---------

--------- E8rouoened - ENDIF- 2A FUN2TION BD2INSERT E)ORTING T2ODE tcode TABES D0N)ROTAB bdcdata-ENDIF-REFRES= bdcdata-

Message table output

pen error session

Insert data record that

has errors into error

session

If you have seected ca transaction on the seection screen the generated program runs as foo$s

The onine transaction is caed $ith ca transaction and passed to tae 2ATA A the

messages arising during the ca transaction are put in the interna tae 7SSTA

7SSTA is output as a ist

If you have specified an error session ( 73ltamp54P L SPA27) on the seection screen and the

ca transaction comes across an error (+3S4amp2 L 0) the error session is opened The error

session is ho$ever ony opened once Then the data record is paced in the session

A the other data records that have errors $ith ca transaction are paced in the same session

copy SAP AG BC420 12-70

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 7188

036

983209 SAP AG 1999

The Transaction Recorder

PrinciplesPrinciples

Recording )ith the LSMWRecording )ith the LSMW

Principles of atch Input and all TransactionPrinciples of atch Input and all Transaction

Integrating the TA Program into the DWIntegrating the TA Program into the DW

Using the TA Recorder Using the TA Recorder

copy SAP AG BC420 12-71

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 7288

03amp

983209 SAP AG 1999

Integrating into the DW

Transfer program

AAP Dictionar(

Integrate

SDA0

SDA6

SDAamp

SDA

Cou can integrate the generated program into the G9- The structure of the fie must e created

in the AAP ictionary The taes SGA0 SGA8 SGA1 and SGA $i e fied

copy SAP AG BC420 12-72

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 7388

03

983209 SAP AG 1999

DW Release 42

Goo

-B eeae 45

aa ran=er ogtec

Int customer data transfer ob-ect

ecord =ed

Dece daa ran=er

d Goo

The ampunction ampor interatin TA recorder prora$s is

i$ple$ented in the

D+-B in Release

The recorder can e integrated as of ampeease and it is provided in the G9- ampeease

ltot to the G9- ampeease 5n the initia screen you can integrate programs y choosing ampoto

( +nt customer ata transfer o-ect

copy SAP AG BC420 12-73

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 7488

034

983209 SAP AG 1999

reating Program as D b-ect

Comer ran=er ogtec

ampgtec ype

Sor eD =or ogtec

aa ran=er proram

Srcre name

9900

(+A1

Cane comer

ZBCA+G

ZB

ustomer transfer ob-ect

umber bet)een 7000 and 7777

b-ect t(pe

Assignment to R ob-ect

Short tet for D ob-ectShort description

Data transfer program

ame of generated program

Structure name

A structure Cstructure la(out )ith this name is created in

the AAP Dictionar(

For ampeease transfer oects $ere not organiDed y 5amp oects ut y a G numer (00089

OOOO) The numer range O0009OOOO is reserved for customers

To create a connection to the ne$ G 9- you must assign the program to a 5amp oect

2reate a short tet for the G oect This tet $i appear in the method seection ist

Specify the program to e incuded

Specify a name for the structure to e created in the AAP ictionary

Note $he generated program appears under program type +N and not under program type

-

copy SAP AG BC420 12-74

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 7588

032

983209 SAP AG 1999

Adantages

Automatic program registration in the DW in

Release 48

ou can use all the functions defined for

standard ob-ects

1ception$ The (reate ampile ith data

function

If you incuded the oect in the ampeease $orench it is automaticay avaiae in the ampeease

B $orench

A the $orench functions are avaiae for your oect ecept for Create files ith transfer ata

copy SAP AG BC420 12-75

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 7688

038

983209 SAP AG 1999

ou are no) able to$

The Transaction Recorder$ Unit Summar(

Use the recording function in the LSMW to create

a batch input session )ith the data from the

eternal s(stem

Use the TA Recorder to create (our o)n data

transfer program

Anal(e programs that )or+ )ith batch input or

call transaction

Integrate the TA Recorder programs into the

DW

copy SAP AG BC420 12-76

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 7788

ercise 1

nit $ -ecorder

$opic 2reating etors

$ransaction -ecorder ercise 1

bull 2reating detors $ith eterna numer assignment

bull etor numers M9980008 to M9980080

Address data for detors $ith eterna numer assignment is to

e transferred using program ampFI700

ro4ect F5

Supro4ect +5

-un +575

$as)s 85 95 8S25

9oad program -F+00

8 In the foo$ing eercises eisting data is to e changed Therefore these detors $ith

eterna numer assignment have to first e created

898 4nder suproect 79 create run 797G9 $ith the name Detors ith

eternal numers

copy SAP AG BC420 12-77

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 7888

891 2reate the foo$ing three tass The tass map the foo$ing process steps

convert data create + session and process + session

89198 In run 797G9 create the foo$ing tas

9 Tas AP9

9 Name 2onvert data 9 Tas type AP

9 Program type +S-

Seect the foo$ing +S- oect

+S- proect 2109

+S- suproect 7I9

+S- oect I997GT

89191 In run 797G9 create the foo$ing tas 9 Tas +5A9

9 Name 2reate I session

Tas type +5A

9 Program type INP

Seect program ampFI700 $ith the variant

I97G9

8919 In run 797G9 create the foo$ing tas

9 Tas S29

9 Name Process I session Tas type S2

9 Program type amp7P5

Seect program ampS2S4 $ith the variant

S497G9

Note that you have to correct the seuence of the tass 2onvert data

create + session and process + session

4se the uttons

89 Start the run

The detors $i e created $ith eterna numer assignments

89 2hec in transaction F0 that the detors M9980008 to M9980080 have een

created

copy SAP AG BC420 12-78

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 7988

ercise

nit $ransaction -ecorder

$opic -ecording function in the 9S8(

bull 2reate a recording using the +S-

bull ltenerate a atch input session

2hange the detor address data in the amp System

Name of the recording +

Name of the file +2055+F9

8 2reate the recording 7I3 using the +S- ampecord the transaction F01 (2hange

detor)

898 efore you create the recording first test the transaction onineQ

For the recording use detor M9980008 5n the initia screen of the F01

maintain the foo$ing fieds ony

etor etor M9980008

2ompany code 0008

Address data seect

Note $he data record must e saved hile recording

891 aintain the names and the descriptions for the foo$ing fieds

Name city street posta code and teephone numereete a other fieds in screen 880 from the recording (eg S5ampT+ +AN8

SPampAS)

4se the same technica names as sho$n in the tae eo$ (automatic fied

mapping)

copy SAP AG BC420 12-79

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 8088

1 2reate the suproect 7I9 and the ne$ oect TA3 in your proect 2109

aintain the oect attriutes and seect the item atch input recording Seect your

recording 7I3

2reate the source structure address

2reate the source fieds according to the tae eo$ 5r copy them from proect 2109S37N suproect 7I900 oect TA900

198 Fie setup The data from the egacy system are dispayed in the foo$ing tae

Fied name Fied type Fied ength escription

N5 2 8B etor numer

NA7 2 Name

STamp77T 2 Street

2ITC 2 2ityPace of residence

MIP 2 80 Posta code

T7+ 2 8B Teephone numer

191 aintain the fied mapping 4se the automatic fied mapping (via menu item

7tras)

19 Specify the fies 5ny maintain the fie name of the source fie

Name of the fie 21099IFI+7

2odepage 8800

19 Import the data and convert them ispay the data in each caseQ

19 2reate a atch input session

19B ampun the atch input session

copy SAP AG BC420 12-80

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 8188

ercise 3

nit $ransaction -ecorder

$opic -ecording ith the $ -ecorder

bull ltenerate a recording using the TA recorder

bull Test the recording

2hange the address data of detors in the amp system

Name recording $+

Name of the file +2055+F9

8 2reate the recording TA37I3 using the transaction recorder ampecord the

transaction F01 (change detor)

898 4se detor M9980008 for the recording 5n the F01 initia screen ony

maintain the foo$ing fieds

etor etor M9980008

2ompany 2ode 0008

Address data seect

Note $he data record must e saved hen recording

eete a fieds that do not eist in the source fie 21099IFI+7 from screen

880 in the recording (eg 6NA89S5ampT+ 6NA89+AN8 6ANNQ9SPampAS) Note o not deete fieds ampF01946ampS and ampF0190880

Save the recording no$

1 S$itch to the recordings overvie$

198 Process the recording $ith the processing mode A (dispay a)

191 Process the recording $ith the processing mode RN (no dispay)

19 If the recording has een tested and no error has occurred generate a I session

and run it using the I monitor If an error shoud occur generate the recordingagainQ

copy SAP AG BC420 12-81

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 8288

From the recording generate the program M21037I3 in your deveopment cass

2109 Seect the foo$ing

bull ampead fied contents from fie

bull 2reate test data in the fie 2103dei3test3tt

98 Save this program and eecute it ltenerate one I session each and process it

2arry out the same steps again using the ca transaction

The generated program shoud no$ e changed so that fie 21099IFI+7 can e

read and processed

98 2hange the defaut vaue of the fie name (parameter dataset) in 21099

IFI+7

91 2hange the structure definition eete the company code fied and the address

data checo from the structure

9 2hange the su9routine ca perform dc3fied for the company code (KampF019

46ampSK) so that the vaue 0008 is transferred

9 2hange the su9routine ca perform dc3fied for the address data checo

(KampF0190880K) so that the vaue G is transferred

9 Start the program again and read the data from the fie 21099IFI+7 $ith

detor data ltenerate a I session $ith it and run it

copy SAP AG BC420 12-82

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 8388

033 Include DR16INCLUDE BDCRECX1

SELECTION-SCREEN BEGIN OF LINE

PARAMETERS SESSION RADIOBUTTON GROUP CTU create sessi SELECTION-SCREEN COMMENT $amp TEXT-S FOR FIELD SESSION

se(ecti-scree )siti +

PARAMETERS CTU RADIOBUTTON GROUP CTU ca(( trasacti

SELECTION-SCREEN COMMENT $amp TEXT-S FOR FIELD CTU

SELECTION-SCREEN END OF LINE

SELECTION-SCREEN BEGIN OF LINE

SELECTION-SCREEN COMMENT $amp TEXT-S1 FOR FIELD GROUP

se(ecti-scree )siti $+

PARAMETERS GROUP1$amp r) ae 0 sessi

SELECTION-SCREEN COMMENT $amp TEXT-S+ FOR FIELD CTUMODE

se(ecti-scree )siti

PARAMETERS CTUMODE LIE CTU2PARAMS-DISMODE DEFAULT 3N3

A4 s56 a(( 78)rs

E4 s56 78)r errr (8

N4 7 t 7is)(a8 78)r

SELECTION-SCREEN END OF LINE

SELECTION-SCREEN BEGIN OF LINE

SELECTION-SCREEN COMMENT $amp TEXT-S$ FOR FIELD USER

se(ecti-scree )siti $+

PARAMETERS4 USER1$amp DEFAULT S9-UNAME ser 0r sessi i atc5

SELECTION-SCREEN COMMENT $amp TEXT-S FOR FIELD CUPDATE

se(ecti-scree )siti

PARAMETERS CUPDATE LIE CTU2PARAMS-UPDMODE DEFAULT 3L3

S4 s8c5rs(8

A4 as8c5rs(8

L4 (ca(

SELECTION-SCREEN END OF LINE

SELECTION-SCREEN BEGIN OF LINE

SELECTION-SCREEN COMMENT $amp TEXT-S FOR FIELD EEP

se(ecti-scree )siti $+

PARAMETERS4 EEP AS CltECBOX 3 3 = 7e(ete sessi i0 0iis5e7

3X3 = gtee) sessi i0 0iis5e7

SELECTION-SCREEN COMMENT $amp TEXT-S FOR FIELD E2GROUP

copy SAP AG BC420 12-83

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 8488

se(ecti-scree )siti

)araeters E2GROUP1$amp r) ae 0 errr-sessi

SELECTION-SCREEN END OF LINE

SELECTION-SCREEN BEGIN OF LINE

SELECTION-SCREEN COMMENT $amp TEXT-S FOR FIELD ltOLDDATE

se(ecti-scree )siti $+

PARAMETERS4 ltOLDDATE LIE S9-DATUM

SELECTION-SCREEN COMMENT +11amp TEXT-S$ FOR FIELD E2USER

se(ecti-scree )siti

PARAMETERS4 E2USER1$amp DEFAULT S9-UNAME ser 0r errr-sessi

SELECTION-SCREEN END OF LINE

SELECTION-SCREEN BEGIN OF LINE

SELECTION-SCREEN COMMENT +11amp TEXT-S FOR FIELD E2EEP

se(ecti-scree )siti

PARAMETERS4 E2EEP AS CltECBOX 3 3 = 7e(ete sessi i0 0iis5e7

3X3 = gtee) sessi i0 0iis5e7

SELECTION-SCREEN END OF LINE

SELECTION-SCREEN BEGIN OF LINE

SELECTION-SCREEN COMMENT +11amp TEXT-S FOR FIELD E2ltDATE

se(ecti-scree )siti

PARAMETERS4 E2ltDATE LIE S9-DATUM

SELECTION-SCREEN END OF LINE

SELECTION-SCREEN SIP

SELECTION-SCREEN BEGIN OF LINE

SELECTION-SCREEN COMMENT 1amp TEXT-S1 FOR FIELD NODATA

PARAMETERS4 NODATA DEFAULT 33 LOER CASE 7ata

SELECTION-SCREEN END OF LINE

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

Batc5i)t7ata 0 si(e trasacti

DATA4 BDCDATA LIE BDCDATA OCCURS ITlt ltEADER LINE

essaes 0 ca(( trasacti

DATA4 MESSTAB LIE BDCMSGCOLL OCCURS ITlt ltEADER LINE

errr sessi )ee7 3 3 r 3X3amp

DATA4 E2GROUP2OPENED

essae tets

TABLES4 T1

copy SAP AG BC420 12-84

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 8588

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

at se(ecti scree

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

AT SELECTION-SCREEN

r) a7 ser st e 0i((e7 0r create sessi

IF SESSION = 3X3 AND

GROUP = SPACE OR USER = SPACE

MESSAGE E1MSamp

ENDIF

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

)e 7ataset

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

FORM OPEN2DATASET USING P2DATASET

OPEN DATASET P2DATASET IN TEXT MODE

IF S9-SUBRC

RITE4 TEXT-E S9-SUBRC

STOP

ENDIF

ENDFORM

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

c(se 7ataset

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

FORM CLOSE2DATASET USING P2DATASET

CLOSE DATASET P2DATASET

ENDFORM

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

create atc5i)t sessi

t 0r ca(( trasacti siamp

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

FORM OPEN2GROUP

IF SESSION = 3X3

SIP

RITE4 $amp 3Create r)3I1amp GROUP

SIP

)e atc5i)t r)

CALL FUNCTION 3BDC2OPEN2GROUP3

EXPORTING CLIENT = S9-MANDT

copy SAP AG BC420 12-85

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 8688

GROUP = GROUP

USER = USER

EEP = EEP

ltOLDDATE = ltOLDDATE

RITE4 amp 3BDC2OPEN2GROUP3I$amp

1$amp 3retrc7e43I+amp

S9-SUBRC

ENDIF

ENDFORM

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

e7 atc5i)t sessi

ca(( trasacti si4 errr sessiamp

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

FORM CLOSE2GROUP

IF SESSION = 3X3

c(se atc5i)t r)

CALL FUNCTION 3BDC2CLOSE2GROUP3

RITE4 amp 3BDC2CLOSE2GROUP3Iamp

1$amp 3retrc7e43I+amp

S9-SUBRC

ELSE

IF E2GROUP2OPENED = 3X3

CALL FUNCTION 3BDC2CLOSE2GROUP3

RITE4

RITE4 amp 3Fe5(era))e 6r7e eret3Iamp

ENDIF

ENDIF

ENDFORM

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

Start e6 trasacti accr7i t )araeters

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

FORM BDC2TRANSACTION USING TCODE

DATA4 L2MSTRINGamp

DATA4 L2SUBRC LIE S9-SUBRC

atc5 i)t sessi

IF SESSION = 3X3

CALL FUNCTION 3BDC2INSERT3

EXPORTING TCODE = TCODE

TABLES D9NPROTAB = BDCDATA

RITE4 3BDC2INSERT3Iamp

copy SAP AG BC420 12-86

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 8788

TCODE

3retrc7e43I+amp

S9-SUBRC

3RECORD43

S9-INDEX

ca(( trasacti si

ELSE

REFRESlt MESSTAB

CALL TRANSACTION TCODE USING BDCDATA

MODE CTUMODE

UPDATE CUPDATE

MESSAGES INTO MESSTAB

L2SUBRC = S9-SUBRC

RITE4 3CALL2TRANSACTION3

TCODE

3retrc7e43I+amp

L2SUBRC

3RECORD43

S9-INDEX

LOOP AT MESSTAB

SELECT SINGLE FROM T1 ltERE SPRSL = MESSTAB-MSGSPRA

AND ARBGB = MESSTAB-MSGID

AND MSGNR = MESSTAB-MSGNR

IF S9-SUBRC =

L2MSTRING = T1-TEXT

IF L2MSTRING CS 313

REPLACE 313 ITlt MESSTAB-MSGH1 INTO L2MSTRING

REPLACE 3$3 ITlt MESSTAB-MSGH$ INTO L2MSTRING

REPLACE 33 ITlt MESSTAB-MSGH INTO L2MSTRING

REPLACE 33 ITlt MESSTAB-MSGH INTO L2MSTRING

ELSE

REPLACE 33 ITlt MESSTAB-MSGH1 INTO L2MSTRING

REPLACE 33 ITlt MESSTAB-MSGH$ INTO L2MSTRING

REPLACE 33 ITlt MESSTAB-MSGH INTO L2MSTRING

REPLACE 33 ITlt MESSTAB-MSGH INTO L2MSTRING

ENDIF

CONDENSE L2MSTRING

RITE4 MESSTAB-MSGT9P L2MSTRING$+amp

ELSE

RITE4 MESSTAB

ENDIF

ENDLOOP

copy SAP AG BC420 12-87

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 8888

SIP

Eree 0e5(era))e

IF L2SUBRC AND E2GROUP SPACE

IF E2GROUP2OPENED = 3 3

CALL FUNCTION 3BDC2OPEN2GROUP3

EXPORTING CLIENT = S9-MANDT

GROUP = E2GROUP

USER = E2USER

EEP = E2EEP

ltOLDDATE = E2ltDATE

E2GROUP2OPENED = 3X3

ENDIF

CALL FUNCTION 3BDC2INSERT3

EXPORTING TCODE = TCODE

TABLES D9NPROTAB = BDCDATA

ENDIF

ENDIF

REFRESlt BDCDATA

ENDFORM

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

Start e6 scree

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

FORM BDC2D9NPRO USING PROGRAM D9NPRO

CLEAR BDCDATA

BDCDATA-PROGRAM = PROGRAM

BDCDATA-D9NPRO = D9NPRO

BDCDATA-D9NBEGIN = 3X3

APPEND BDCDATA

ENDFORM

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

Isert 0ie(7

Page 34: BC420_46C - 012The Transaction Recorder

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 3488

04

983209 SAP AG 1999

Recording Seeral Transaction Runs

RecordingF

Directl( after the first recordingG or

In the displa( mode of the recording

In this step you can record additiona transactions and add additiona transaction runs to the

recording

Cou can record the additiona transactions directy after a recording or in the edit screen of a

recording

copy SAP AG BC420 12-34

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 3588

02

983209 SAP AG 1999

1ditor$ Importing and 1porting Recordings

6 T 9D0amp S

amp SAPM90ampD 608

DltURSR

4

2

8 SAPM90ampD 666

60

66

Program Screen St 9ield name 9ield alue

cempA

e name

aa =orma

cemp

A

e name

aa =orma

1port

Import

Presentation Serer

If the editor functions in the systems do not provide a the functions you need you can do$noad the

recording to your presentation server using the Eort function and then edit the recording using a

P2 editor

Cou use the Import function to import the data ac into the amp System ae sure the fie is sti in

the correct format

copy SAP AG BC420 12-35

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 3688

08

983209 SAP AG 1999

Processing the Recording

Recording

Process )ith ALL TRASATI

Parameer

Proce mode$pdae mode

CA mode

e=a e

Con a=er comm

+o a B eon

nd +o a B mode

A

A

T

The recording can e eecuted directy The data from the recording is used and the transaction is

processed $ith ca transaction

2a transaction provides a range of options for caing appication transactions $hich are discussed

on the foo$ing t$o pages

copy SAP AG BC420 12-36

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 3788

03

983209 SAP AG 1999

Process mode

Update mode

ATT mode

Processing Recording )ith T 6

A

1

Displa( all screens

Displa( errors onl(

o displa(

L

S

A

Local

S(nchronous

As(nchronous

A

o ATT

ATT )ithout indiidual screen control

ATT )ith indiidual screen control

Processing mode

=ere you can specify the processing mode 9 it is the same as the processing mode for atch input

4pdate mode

=ere you can specify the update mode For more information see the unit ca transaction

2ATT mode

=ere you can mae specia settings if you $ant to test the recording under 2ATT conditions (ony

necessary for 2ATT runs) Specia functions are caed in the 2ATT too for each screen at the end of

P5 and at the start of PAI

copy SAP AG BC420 12-37

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 3888

05

983209 SAP AG 1999

Default sie

ont after commit

ot a I session

1nd$ ot a I mode

Processing Recording )ith T amp

The screen standard sie is used for the

processing

ommit )or+ does not end the processing

o I mode is actie The transaction )ill run

through as in online

I mode is selected nce the data in the D

table is processedG the I mode is set to inactie

Standard siDe

If you seect this the screens are processed in the standard siDe in the foreground (in foreground or

dispay errors ony) Note the standard siDe is a$ays used for acground processing

Further after commit

The first commit $or in a transaction does not ead to the end of the recording

Note A atch input transaction is ended $ith the first commit $or

No I mode

The system fied SC9INPT is not set (SC9INPT E ) So transactions are run through as in onine

7nd No I mode

5ny use if you choose the processing mode 7 (dispay errors ony) Then the transaction is processed in the acground in atch input mode and if there is an error the screens run through in

the foreground

copy SAP AG BC420 12-38

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 3988

07

983209 SAP AG 1999

I Mode

atch input

mode

nline

Some transactions behae differentl( in batch input mode

than in online Cbatch input capabilit(

atch input mode sets the s(stem field SIPT H

Not every transaction can run the same onine and in atch input mode The transaction must decide

itsef $hether it is caed onine or in atch input mode

The system sets the system fied SC9INPT E G if the atch input mode is active (this aso appies

to ca transaction) From this system fied the transaction can identify $hether to run onine or in

atch input mode

copy SAP AG BC420 12-39

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 4088

040

983209 SAP AG 1999

reating a Session 9rom the Recording

Recordingnl( contains the data

from the recording

Seon name 02amp

Aoraon ampBS(eep eon

oclt dae 10102000

Cou can create a atch input session directy from the recording that you can then process using the

atch input monitor

copy SAP AG BC420 12-40

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 4188

046

983209 SAP AG 1999

reating Test Data

Test Data

Recording

ranranpBC420AAe name

The file onl( contains the data from the recording

Rgt

Application Serer

Structure

Cou can create a fie from the recordingH the fie $i contain a the fieds from the recording The

fieds are added to the fie $ith the ength you specified in the definition

The fied order corresponds to the order in the recording overvie$ Technica fieds

(2356257 2324ampS5amp and so on) are incuded

The data can ony e stored on the appication server If you do not specify a path the fie is stored in

the $or directory of the appication server

If the specified test fie aready eists the ne$ data record is added to this fie

copy SAP AG BC420 12-41

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 4288

04amp

983209 SAP AG 1999

ed conen

reating a Program

Recording

ZBC420ampProram name

Transfer Program

e daa

ead =rom =e

ran=er =rom recordn

reate

9ile nameTest data

ranranpBC420AA

Cou can generate a program from the recording

In the foo$ing diaog o enter a program name In addition you can choose the type and method

for fiing the maintained fied contents from the recorded screens

4se the vaues used for the recording If you reuire feie data transfer you $i have to modify

this program ater

ParameteriDe the input vaues and read these vaues from a fie A data structure is created for

parameteriDationH the data records are read from an eterna fie into this data structure The

program assumes the fie $as taiored to this data structure

If you have decided to parameteriDe the input vaues you shoud aso create a test fie during

generation To do this seect the checo and enter a name for the fie

The attriute maintenance screen of the AAP editor appears aintain the attriutes and save the

program

copy SAP AG BC420 12-42

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 4388

04

983209 SAP AG 1999

Program 9unctions

Online

transaction

Transfer program

To

error

1rror

ption 6ption ampFlat SAP

structure

Monitor

Cou have no$ generated a data transfer program for importing data into the amp System The

program can eecute the data transfer using atch input or ca transaction

If you choose option 1 and there is an error the data record is paced into a atch input session

copy SAP AG BC420 12-43

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 4488

044

983209 SAP AG 1999

Benerating 9unction Modules

Recording

Zcreaedeor ncon mode

ncon rop

Sor eD

ZBC420

Creae comer

9unction module

nl( one data record can be processed at a time

In the net diaog o you can generate a function modue a function group and short tet from the

recording The function modue is automaticay created in the function group

copy SAP AG BC420 12-44

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 4588

042

983209 SAP AG 1999

9unction of 9unction Modules

Online

transaction

To

error

1rror

ption 6 ption amp

9unction module

Import

Parameter 1port

parameter

Tables

M1SSTA

Monitor

S$BC

Import interface

The import interface consists of a technica part and the fieds from the recording (A parameter is

created for each input fied of the recorded transactions)

7port interface

Simpy consists of the parameter S4amp2 The function modue $i return a vaue in the system

fied SC9S4amp2 after caing ca transaction This return vaue is set to Dero if the data record has

een correcty processed (5ny appies to 2T)

If a session is created you $i e notified $hether the data record coud e paced into the session

Tae interfaceThis is used ony if the function modue $ors $ith ca transaction The tae contains a the

system messages

copy SAP AG BC420 12-45

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 4688

048

983209 SAP AG 1999

Import Interface of 9unction Module

$

Technical

fields

Data

fields

BI session or CALL TRANSACTION

Processin $ode

pdate $ode

a$e oamp BI session iamp (T initial)

Bacround user iamp (T initial)

Delete session aampter processin

Loc date oamp session

ODATA indicator

TU

MD1

UPDAT1

BRUP

US1R

=11P

ELDDAT1

DATA

Cou can use parameter 2T4 to specify $hether the function modue creates a atch input session

(2T4 E ) or updates the data record directy using ca transaction (2T4 E G)

The other parameters are fied as for a atch input session header

Note 7very time the function modue is caed a atch input session is created

If the session is to contain severa transactions proceed as foo$s

ltenerate the transaction severa times This can e achieved y recording the transaction again The

function modue interface $i then contain more than one transaction -hen the function modue is

caed severa transactions can e generated for each session

copy SAP AG BC420 12-46

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 4788

043

983209 SAP AG 1999

The Transaction Recorder

PrinciplesPrinciples

Recording )ith the LSMWRecording )ith the LSMW

Principles of atch Input and all TransactionPrinciples of atch Input and all Transaction

Integrating the TA Program into the DWIntegrating the TA Program into the DW

Using the TA Recorder Using the TA Recorder

copy SAP AG BC420 12-47

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 4888

045

983209 SAP AG 1999

Benerated Program

9unction modules DltP1ltBRUP

DltIS1RT

DltLS1ltBRUP

AAP Program

Define structure of

data in seJuential

fileDefine D

table

pen seJuential file

pen I session

Read data recordCseJuential file

9ill D table

9ill I session gtALL TRASATI

Last data record K

lose I session

lose seJuential file

The generated program has the structure dispayed aove It uses the standard function modues for

creating atch input sessions

copy SAP AG BC420 12-48

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 4988

047

983209 SAP AG 1999

Structure of the Benerated Program

Benerated part

Define D

table

pen seJuential file

pen I session

Read data record

9ill D table

9ill I session gtALL TRASATI

Last data recordK

lose I session

lose seJuential file

Include DR16

Define filestructure

P1ltDATAS1T

P1ltBRUP

DltDPR

Dlt9I1LD

DltTRASATI

LS1ltBRUP

LS1ltDATAS1T

The generated program consists of t$o parts 9 a generated part and the incude 2amp72G8 The

incude is provided in the standard system

The incude contains the definition of the reuired 2 tae and a further seven suroutines These

suroutines eecute the foo$ing functions

5pen and cose fie

5pen and cose session

Fi 2 tae

Fi session

The generated part is the main program and cas the reevant suroutines A structure is aso

generated in the generated part to read the eterna data into the fie

See the Appendi for more information on the 2amp72G8 program

copy SAP AG BC420 12-49

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 5088

020

983209 SAP AG 1999

Structure of D Table

PRBRAM DPR D1BI 9AM 9ALPRBRAMPRBRAM DPRDPR D1BID1BI 9AM9AM 9AL9AL

SAPM90ampD 0602

R90ampD=UR 600000

R90ampDU=RS 0006

R90ampD=T=D =UA

SAPM90ampD 0660

=A6AM16 Smith

=A6PSTL 87000

=A6LAD6 US

=A6SPRAS 1

SAPM90ampD 06amp0

=A6ST1B US6amp428357DDATA

PRBRAM

DPR

D1BI

9AM

9AL

EAR

UM

EAR

EAR

EAR

40

4

6

6amp

6amp

D Module pool

D Screen number

D Start of screen

D 9ield name

D 9ield contents

9ield ame T(pe Length Short Tet

AAP Dictionar(

The 2 tae has the same structure as in a standard transfer

copy SAP AG BC420 12-50

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 5188

026

983209 SAP AG 1999

Read Structure

Recording

DATA BEGIN OF record data element BUKRS bukr$amp data element KTOKD ktokd$amp data element NA(EG) name$+amp data element SORT ortl$ampEND OF record-

record

Automaticall( generated

from recording

The structure of the fie is automaticay generated and is a$ays defined $ith the name amp725amp

The generated structure a$ays has the same ayout 7ach fied is defined y t$o generated ro$s

The first ro$ is a$ays a comment ro$ containing the tet J data eement and the data eement of

the screen fied from the recording In the net ro$ the fied itsef is defined $ith the name of the

data eement foo$ed y a three9digit position numer $hich specifies the ocation in the structure

The ength of the fied is set y the ength of the data eement If a fied is not defined through a data

eement the system uses the ength of the screen fied

copy SAP AG BC420 12-51

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 5288

02amp

983209 SAP AG 1999

pening and losing the 9ile

P1ltDATAS1T

LS1ltDATAS1T

FOR( oendataet USING dataet-O)EN DATASET dataet IN TET (ODE-

IF S01SUBR2 34 - 5RITE 6 te7t1e S01SUBR2-STO)-

ENDIF-

ENDFOR(-

FOR( cloedataet USING dataet-2OSE DATASET dataet-

ENDFOR(-

Include

DR16

The suroutine 5P7N3ATAS7T opens the seuentia fie

The suroutine 2+5S73ATAS7T coses the seuentia fie

copy SAP AG BC420 12-52

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 5388

02

983209 SAP AG 1999

9unction Modules for I Program

lient

Session name

Eold date

=eep session

D user name

RecordK

LI1T

BRUP

ELDDAT1

=11P

US1R

R1RD

DltP1ltBRUPDltP1ltBRUP

Transaction code

D table

TD1

DPRTA

DltIS1RTDltIS1RT

DltLS1ltBRUPDltLS1ltBRUP

pen Isessionpen Isession

Insert data for

transactions

Insert data for

transactions

lose I

session

lose I

session

The foo$ing function modues are provided for creating atch input sessions (function group

S2)

235P7N3ltamp54P

2reates a ne$ session and contains genera data for the $hoe session

23INS7ampT

Inserts a the data for a transaction into the session The transferred interna tae $ith the

structure 2ATA must contain a the data reuired for fuy processing the transaction

232+5S73ltamp54P

2oses the session after a the data has een inserted As soon as the session has een cosed it

can e processed

The interna tae $ith the structure 2ATA can ony contain atch input data for one singe

transaction run So the individua transactions are inserted into the atch input session in a oop

using severa 23INS7ampT cas

copy SAP AG BC420 12-53

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 5488

024

983209 SAP AG 2001

9unction Module DltP1ltBRUP

ALL 9UTI DltP1ltBRUPALL 9UTI DltP1ltBRUP

1PRTIB

LI1T client

BRUP session name

ELDDAT1 loc+ date

=11P delete flag

US1R bdc user name

R1RD recording

IMPRTIB

NID internal session +e(

11PTIS

1PRTIB

LI1T client

BRUP session name

ELDDAT1 loc+ date

=11P delete flag

US1R bdc user name

R1RD recording

IMPRTIB NID internal session +e(

11PTIS

-ith the function modue 235P7N3ltamp54P you can open a atch input session

The foo$ing parameters are mandatory

2+I7NT (cient)

ltamp54P (session name)

4S7amp (user name)

Note The 4S7amp must a$ays e specified This user name is reuired for processing the session

in atch mode

The foo$ing parameters are optiona

=5+AT7 specifies the eariest date on $hich the session can e started677P fag specifies $hether session shoud e deeted after it has een successfuy processed The

677P fag is ignored if the session contains errors

677P E K K means deete the session after processing (defaut vaue) H

677P E KGK means do not deete session

amp725amp E KGK ao$s you to create a recording instead of a I session

If gtI is specified the function modue returns the interna session ey This is needed to e ae to

differentiate sessions that have the same name

-ith 7G27PTI5NS you get various return vaues that can e ueried $ith SC9S4amp2

Note In onine mode the onine user is used for the authoriDation checs regardess of the user

name specified

copy SAP AG BC420 12-54

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 5588

022

983209 SAP AG 1999

Subprogram P1ltBRUP

P1ltBRUP

FOR( oen8rou-IF e9on -

2A FUN2TION BD2O)ENGROU) E)ORTING 2IENT lt1mandt GROU) 8rou USER uer KEE) kee

=ODDATE gtolddate-

ENDIF-ENDFOR(-

Include

DR16

The suprogram 5P7N3ltamp54P opens the atch input session

copy SAP AG BC420 12-55

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 5688

028

983209 SAP AG 1999

9unction Module DltIS1RT

ALL 9UTI DltIS1RTALL 9UTI DltIS1RT

IMPRT

TD1 Transaction code

PSTltLAL Update locall(

PRITIB print list

TAL1S DPRTA bdclttable

11PTIS

IMPRT

TD1 Transaction code

PSTltLAL Update locall(

PRITIB print list

TAL1S DPRTA bdclttable

11PTIS

-ith the function modue 23INS7ampT you can add transaction data to the session

Cou need an interna 2 tae to transfer the data

The foo$ing parameters are mandatory

T257 Transaction code

CNPamp5TA 2 tae

The foo$ing parameters are optiona

P5ST3+52A+ E KGK activates oca updating This means that the data to e updated is ept in the

appication server and updated in the ast step of the transaction This does not invove the update

process (For more information see course 28 Programming ataase 4pdates)

PampINTINlt E KGK 9 ists processed in I $i e printed immediatey -ith 7G27PTI5NS you get various return vaues that can e ueried $ith SC9S4amp2

copy SAP AG BC420 12-56

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 5788

023

983209 SAP AG 1999

Subprogram DltTRASATI

DltTRASATI

FOR( BD2TRANSA2TION USING tcode-

IF e9on -2A FUN2TION BD2INSERT

E)ORTING T2ODE tcode TABES D0N)ROTAB bdcdata-

ESE-

ENDIF-ENDFOR(-

T

Include

DR16

The suprogram 23TampANSA2TI5N moves the fied 2 tae either to a atch input session

or uses ca transaction to import the data into the system 5n the seection screen you can specify

$hether you $ant to create a session or you $ant to use ca transaction to process the data directy

The S7SSI5N fied is then set according to your seection

copy SAP AG BC420 12-57

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 5888

025

983209 SAP AG 1999

9unction Module DltLS1ltBRUP

ALL 9UTI DltLS1ltBRUP

11PTIS

TltP1 6

NU1U1lt1RRR amp

-ith the function modue 232+5S73ltamp54P you can cose a atch input session

In 7G27PTI5NS you get various return vaues that can e ueried $ith SC9S4amp2

copy SAP AG BC420 12-58

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 5988

027

983209 SAP AG 1999

Subprogram LS1ltBRUP

FOR( cloe8rou-IF e9on -cloe batcgt 9nut 8rou

2A FUN2TION BD22OSEGROU)-

ESE-IF e8rouoened -

2A FUN2TION BD22OSEGROU)-

ENDIF-ENDIF-

ENDFOR(-

LS1ltBRUPlose session

lose error session

Include

DR16

The suprogram 2+5S73ltamp54P coses the atch input session The suprogram differentiates

et$een a norma I session (S7SSI5N E G) and a session opened $hen ca transaction

encountered an error (73ltamp54P35P7N7 E G)

copy SAP AG BC420 12-59

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 6088

080

983209 SAP AG 1999

Subprograms DltDPRG Dlt9I1LD

DltDPR

Dlt9I1LD

FOR( bdc9eld USING nam al-IF al 34 nodata-2EAR bdcdata- bdcdata1nam nam- bdcdata1al al- A))END bdcdata-ENDIF-

ENDFOR(-

FOR( bdcdltnro USING ro8ram dltnro- 2EAR bdcdata-Bdcdata1ro8ram ro8ram-Bdcdata1dltnro dltnro-Bdcdata1dltnbe89n - A))END bdcdata-ENDFOR(-

Include

DR16

The incude 2amp72GG contains t$o suprograms 23CNPamp5 and 23FI7+

Suprogram 23CNPamp5 fis the 2 tae $ith program names and screen numers

Suprogram 23FI7+ fis the 2 tae $ith fied names and vaues

7ach suprogram creates an entry in the 2 tae

copy SAP AG BC420 12-60

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 6188

086

983209 SAP AG 1999

9illing the D Table

erorm bdcdltnro u9n8 SA)(FD +- erorm bdc9eld u9n8 BD22URSOR RFD1BUKRS- erorm bdc9eld u9n8 BD2OK2ODE 6- erorm bdc9eld u9n8 RFD1BUKRS record1BUKRS- erorm bdc9eld u9n8 RFD1KTOKD record1KTOKD-

erorm bdcdltnro u9n8 SA)(FD -

erorm bdc9eld u9n8 BD22URSOR KNA1S)RAS- erorm bdc9eld u9n8 BD2OK2ODE 6- erorm bdc9eld u9n8 KNA1NA(E record1NA(E-

erorm bdc9eld u9n8 KNA1SORT record1SORT-

Recording Benerated automaticall(

from the recording

)ERFOR( bdcdltnro USING SA)(FD +- )ERFOR( bdc9eld USING BD22URSOR RFD1BUKRS-)ERFOR( bdc9eld USING BD2OK2ODE 6-)ERFOR( bdc9eld USING RFD1BUKRS record1BUKRS-)ERFOR( bdc9eld USING RFD1KTOKD record1KTOKD-

)ERFOR( bdcdltnro USING SA)(FD -

)ERFOR( bdc9eld USING BD22URSOR KNA1S)RAS-)ERFOR( bdc9eld USING BD2OK2ODE 6-)ERFOR( bdc9eld USING KNA1NA(E record1NA(E-

)ERFOR( bdc9eld USING KNA1SORT record1SORT- ---

The 2 tae is fied $ith data from the recording The suroutines 23CNPamp5 and

23FI7+ are used for this

The suroutines are caed in the reuired structure or seuence

copy SAP AG BC420 12-61

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 6288

08amp

983209 SAP AG 1999

erie)

SAPDatabase

SeJuential9ile

SAPDatabase

ALL TRASATIALL TRASATI

SeJuential9ile

ATE IPUTATE IPUT

D TableD TableD TableD Table

I Monitor

T

In contrast to atch input you can use ca transaction to directy pass data to the diaog interface

$ithout using a atch input session Cou use an interna tae (2 tae same structure and ayout

as atch input) to temporariy store your screen data Then you ca the desired transaction in your

program

Note 5n average the 2a Transaction method is 8 to times faster than using atch Input

copy SAP AG BC420 12-62

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 6388

08

983209 SAP AG 1999

all Transaction Program$ 1ample

RE)ORT abcbdcdcdeb9ct-

)ARA(ETERS d9mode DEFAUT A

udmode DEFAUT S-FOR( calltranact9on-2A TRANSA2TION FD

USING bdcdata (ODE d9mode

U)DATE udmode-

IF lt1ubrc NE - 5RITE 6 ---

ENDIF-ENDFOR(-

Screen

00

Screen

100

Screen

An additiona system ro area is added for the caed transaction The system uses this area for

processing the individua screens in the transactionH the data from the tae is added here After the

transaction is processed the second ro area is reeasedH the system continues processing in the first

ro area

Notes

In contrast to atch input there is no error ogging (error sessions) here For processing the caed

transaction the system uses the authoriDations of the user that caed the transaction The 2 tae

can ony hod data for one transaction run at a time efore another transaction is caed and its data

can e added you must eecute a amp7Famp7S= for the 2 tae

copy SAP AG BC420 12-63

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 6488

084

983209 SAP AG 1999

ALL TRASATI C6

RE)ORT 777-

2A TRANSA2TION FD USING bdcdata (ODE E-

Default for MD1 is A

2A TRANSA2TION 3tranact9oncode4 USING 3bdc1table4 C (ODE A E N C-

-ith the parameter 57 you can seect a specific dispay mode for processing the transaction The

foo$ing three modes are avaiae

A (ispay a)

If you eecute the program a the screens and a their data are dispayed This is the defaut vaue

for the 57 in 2A++ TampANSA2TI5N

N (ispay nothing)

The screens are not dispayed at a regardess of $hether any of them contained errors As soon as

the transaction has een fuy processed contro is returned to your program (The vaue of the

parameter 4PAT7 determines $hether dataase updates are eecuted or not)

7 (ispay errors ony)As soon as an error occurs in a screen the transaction is s$itched to dispay mode so that you can

correct the errors

These dispay modes are the same as those in the atch input session processing

copy SAP AG BC420 12-64

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 6588

082

983209 SAP AG 1999

RE)ORT 777-

2A TRANSA2TION FD USING BD2DATA U)DATE -

ALL TRASATI Camp

RE)ORT 777-

2A TRANSA2TION FD USING bdcdata U)DATE -

2A TRANSA2TION 3tranact9oncode4 USING 3bdc1table4 C (ODE A E N C U)DATE A S C -

Default for UPDAT1 is A

-ith the parameter 4PAT7 you can contro ho$ dataase updates arising from a transaction are

carried out There are three options

A (asynchronous updating) The caed transaction does not $ait unti the dataase has een

updated it simpy for$ard the updates to the SAP update service This usuay speeds up the 2T

program This processing mode is N5T recommended for arge data sets as the caed transaction

does not receive a competion message from the update modue

The caing 2T program therefore cannot te if the transaction has een successfuy competed Cou

shoud use the updating administration function (transaction S8) to determine $hether updating

$as terminated eary The error anaysis correction functions for are ess hepfu than $ith

synchronous updating

S (synchronous updating) -ith synchronous updating the caed transaction $aits unti a the

updates have een competed So processing is so$er than $ith synchronous updating The caed

transaction can ho$ever report any updating errors to the program $hich maes error

anaysiscorrection easier

+ (local updating) $ith oca updating the dataase is not updated in a separate process it is

updated in the caers process (see appication hep documentation for the AAP ey$ord S7T

4PAT7 TAS6 +52A+)

copy SAP AG BC420 12-65

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 6688

088

983209 SAP AG 1999

ALL TRASATI C

RE)ORT 777-DATA mtab T0)E TABE OF bdcm8coll-

2A TRANSA2TION FD USING bdcdata (ESSAGES INTO mtab-

2A TRANSA2TION 3tranact9oncode4 USING 3bdc1table4 C (ODE A E N C U)DATE A S C (ESSAGES INTO 3metab4 C -

7SSAlt7S specifies that a system messages that are output during the eecution of a 2A++

TampANSA2TI5N are $ritten to the interna tae L7SSTA The interna tae must have the

structure 2Slt25++

4nie the cassica atch input processing $ith sessions 2A++ TampANSA2TI5N does not offer any

specia processing procedures for transactions containing errors There are no restart functions for

transactions that contain errors or that cause updating terminations

copy SAP AG BC420 12-66

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 6788

083

983209 SAP AG 1999

ALL TRASATI C4

RE)ORT 777-DATA mltot T0)E ctuaram-

2A TRANSA2TION FD USING BD2DATA

O)TIONS FRO( mltot-

2A TRANSA2TION 3tranact9oncode4 USING 3bdc1table4 C (ODE A E N C U)DATE A S C (ESSAGES INTO 3metab4 C O)TIONS FRO( ot C -

RE)ORT 777-DATA mltot T0)E ctuaram-2A TRANSA2TION FD USING bdcdata

O)TIONS FRO( mltot-

The addition 5PTI5NS enaes the ca transaction statement to e controed through a structure

The structure must have the dictionary type 2T43PAampAS

The addition 5PTI5NS Famp5 must not e comined either $ith the addition 57 or $ith

4PAT7 ore information on the net side

copy SAP AG BC420 12-67

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 6888

085

983209 SAP AG 1999

Structure TUltPARAMS

DISMD1 Procen mode anaoo o addon amp

UPDMD1 $pdae mode anaoo o addon $PA

ATTMD1 CA mode CA conro

D19SI1 orce de=a EndoE e drn procen

RAMMIT +o eD a Camp amp(

IPT +o a ac np eonF a F S-B+P SPAC

I1D +o a ac np eon a=er end o= BC daa

The components are defined as foo$s

The components 7FSIM7 ampA25IT N5INPT and N5I7N can have the foo$ing

vaues KGK E Ces or K K E No

If the addition 5PTI5NS Famp5 is not specified the foo$ing settings appy to the contro

parameters

IS57 from addition 57

4P57 from addition 4PAT7

2ATT57 2ATT not active

7FSIM7 o not not use defaut $indo$s siDe

ampA25IT Successfu eit at 25IT -5amp6

N5INPT atch input session active (SC9INPT E G)

N5I7N atch input session sti active after end of 2 data

copy SAP AG BC420 12-68

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 6988

087

983209 SAP AG 1999

SMSBID Message ID

SMSBT Message T(pe C1GIGWGSGA

SMSB Message umber

SMSB6 Message ariable 6

SMSBamp Message ariable amp

SMSB Message ariable

SMSB4 Message ariable 4

SMSBID Message ID

SMSBT Message T(pe C1GIGWGSGA

SMSB Message umber

SMSB6 Message ariable 6

SMSBamp Message ariable amp

SMSB Message ariable

SMSB4 Message ariable 4

Return code$

S(stem fields$

alue Meaning

0 Successful

6000 1rror in transaction

6000 1rror in processing call transaction

see also the s(stem fields specified

alue Meaning

0 Successful

6000 1rror in transaction

6000 1rror in processing call transaction

see also the s(stem fields specified

9ield name Meaning9ield name9ield name MeaningMeaning

Return ode and S(stem 9ields

The return code is used to specify $hether the caed transaction $as processed successfuy In

addition severa system fieds are fied The numer I type and variaes of the diaog message

output y the caed transaction Cou need this information to output the message tet

copy SAP AG BC420 12-69

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 7088

030

983209 SAP AG 1999

Benerated Program of the TA Recorder

REFRES= (ESSTAB-

2A TRANSA2TION tcode USING bdcdata (ODE ctumode U)DATE cudate (ESSAGES INTO metab-OO) AT metab- ENDOO)-IF lubrc 34 AND e8rou 34 S)A2E- IF e8rouoenend - 2A FUN2TION BD2O)ENGROU) E)ORTING ---------

--------- E8rouoened - ENDIF- 2A FUN2TION BD2INSERT E)ORTING T2ODE tcode TABES D0N)ROTAB bdcdata-ENDIF-REFRES= bdcdata-

Message table output

pen error session

Insert data record that

has errors into error

session

If you have seected ca transaction on the seection screen the generated program runs as foo$s

The onine transaction is caed $ith ca transaction and passed to tae 2ATA A the

messages arising during the ca transaction are put in the interna tae 7SSTA

7SSTA is output as a ist

If you have specified an error session ( 73ltamp54P L SPA27) on the seection screen and the

ca transaction comes across an error (+3S4amp2 L 0) the error session is opened The error

session is ho$ever ony opened once Then the data record is paced in the session

A the other data records that have errors $ith ca transaction are paced in the same session

copy SAP AG BC420 12-70

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 7188

036

983209 SAP AG 1999

The Transaction Recorder

PrinciplesPrinciples

Recording )ith the LSMWRecording )ith the LSMW

Principles of atch Input and all TransactionPrinciples of atch Input and all Transaction

Integrating the TA Program into the DWIntegrating the TA Program into the DW

Using the TA Recorder Using the TA Recorder

copy SAP AG BC420 12-71

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 7288

03amp

983209 SAP AG 1999

Integrating into the DW

Transfer program

AAP Dictionar(

Integrate

SDA0

SDA6

SDAamp

SDA

Cou can integrate the generated program into the G9- The structure of the fie must e created

in the AAP ictionary The taes SGA0 SGA8 SGA1 and SGA $i e fied

copy SAP AG BC420 12-72

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 7388

03

983209 SAP AG 1999

DW Release 42

Goo

-B eeae 45

aa ran=er ogtec

Int customer data transfer ob-ect

ecord =ed

Dece daa ran=er

d Goo

The ampunction ampor interatin TA recorder prora$s is

i$ple$ented in the

D+-B in Release

The recorder can e integrated as of ampeease and it is provided in the G9- ampeease

ltot to the G9- ampeease 5n the initia screen you can integrate programs y choosing ampoto

( +nt customer ata transfer o-ect

copy SAP AG BC420 12-73

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 7488

034

983209 SAP AG 1999

reating Program as D b-ect

Comer ran=er ogtec

ampgtec ype

Sor eD =or ogtec

aa ran=er proram

Srcre name

9900

(+A1

Cane comer

ZBCA+G

ZB

ustomer transfer ob-ect

umber bet)een 7000 and 7777

b-ect t(pe

Assignment to R ob-ect

Short tet for D ob-ectShort description

Data transfer program

ame of generated program

Structure name

A structure Cstructure la(out )ith this name is created in

the AAP Dictionar(

For ampeease transfer oects $ere not organiDed y 5amp oects ut y a G numer (00089

OOOO) The numer range O0009OOOO is reserved for customers

To create a connection to the ne$ G 9- you must assign the program to a 5amp oect

2reate a short tet for the G oect This tet $i appear in the method seection ist

Specify the program to e incuded

Specify a name for the structure to e created in the AAP ictionary

Note $he generated program appears under program type +N and not under program type

-

copy SAP AG BC420 12-74

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 7588

032

983209 SAP AG 1999

Adantages

Automatic program registration in the DW in

Release 48

ou can use all the functions defined for

standard ob-ects

1ception$ The (reate ampile ith data

function

If you incuded the oect in the ampeease $orench it is automaticay avaiae in the ampeease

B $orench

A the $orench functions are avaiae for your oect ecept for Create files ith transfer ata

copy SAP AG BC420 12-75

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 7688

038

983209 SAP AG 1999

ou are no) able to$

The Transaction Recorder$ Unit Summar(

Use the recording function in the LSMW to create

a batch input session )ith the data from the

eternal s(stem

Use the TA Recorder to create (our o)n data

transfer program

Anal(e programs that )or+ )ith batch input or

call transaction

Integrate the TA Recorder programs into the

DW

copy SAP AG BC420 12-76

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 7788

ercise 1

nit $ -ecorder

$opic 2reating etors

$ransaction -ecorder ercise 1

bull 2reating detors $ith eterna numer assignment

bull etor numers M9980008 to M9980080

Address data for detors $ith eterna numer assignment is to

e transferred using program ampFI700

ro4ect F5

Supro4ect +5

-un +575

$as)s 85 95 8S25

9oad program -F+00

8 In the foo$ing eercises eisting data is to e changed Therefore these detors $ith

eterna numer assignment have to first e created

898 4nder suproect 79 create run 797G9 $ith the name Detors ith

eternal numers

copy SAP AG BC420 12-77

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 7888

891 2reate the foo$ing three tass The tass map the foo$ing process steps

convert data create + session and process + session

89198 In run 797G9 create the foo$ing tas

9 Tas AP9

9 Name 2onvert data 9 Tas type AP

9 Program type +S-

Seect the foo$ing +S- oect

+S- proect 2109

+S- suproect 7I9

+S- oect I997GT

89191 In run 797G9 create the foo$ing tas 9 Tas +5A9

9 Name 2reate I session

Tas type +5A

9 Program type INP

Seect program ampFI700 $ith the variant

I97G9

8919 In run 797G9 create the foo$ing tas

9 Tas S29

9 Name Process I session Tas type S2

9 Program type amp7P5

Seect program ampS2S4 $ith the variant

S497G9

Note that you have to correct the seuence of the tass 2onvert data

create + session and process + session

4se the uttons

89 Start the run

The detors $i e created $ith eterna numer assignments

89 2hec in transaction F0 that the detors M9980008 to M9980080 have een

created

copy SAP AG BC420 12-78

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 7988

ercise

nit $ransaction -ecorder

$opic -ecording function in the 9S8(

bull 2reate a recording using the +S-

bull ltenerate a atch input session

2hange the detor address data in the amp System

Name of the recording +

Name of the file +2055+F9

8 2reate the recording 7I3 using the +S- ampecord the transaction F01 (2hange

detor)

898 efore you create the recording first test the transaction onineQ

For the recording use detor M9980008 5n the initia screen of the F01

maintain the foo$ing fieds ony

etor etor M9980008

2ompany code 0008

Address data seect

Note $he data record must e saved hile recording

891 aintain the names and the descriptions for the foo$ing fieds

Name city street posta code and teephone numereete a other fieds in screen 880 from the recording (eg S5ampT+ +AN8

SPampAS)

4se the same technica names as sho$n in the tae eo$ (automatic fied

mapping)

copy SAP AG BC420 12-79

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 8088

1 2reate the suproect 7I9 and the ne$ oect TA3 in your proect 2109

aintain the oect attriutes and seect the item atch input recording Seect your

recording 7I3

2reate the source structure address

2reate the source fieds according to the tae eo$ 5r copy them from proect 2109S37N suproect 7I900 oect TA900

198 Fie setup The data from the egacy system are dispayed in the foo$ing tae

Fied name Fied type Fied ength escription

N5 2 8B etor numer

NA7 2 Name

STamp77T 2 Street

2ITC 2 2ityPace of residence

MIP 2 80 Posta code

T7+ 2 8B Teephone numer

191 aintain the fied mapping 4se the automatic fied mapping (via menu item

7tras)

19 Specify the fies 5ny maintain the fie name of the source fie

Name of the fie 21099IFI+7

2odepage 8800

19 Import the data and convert them ispay the data in each caseQ

19 2reate a atch input session

19B ampun the atch input session

copy SAP AG BC420 12-80

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 8188

ercise 3

nit $ransaction -ecorder

$opic -ecording ith the $ -ecorder

bull ltenerate a recording using the TA recorder

bull Test the recording

2hange the address data of detors in the amp system

Name recording $+

Name of the file +2055+F9

8 2reate the recording TA37I3 using the transaction recorder ampecord the

transaction F01 (change detor)

898 4se detor M9980008 for the recording 5n the F01 initia screen ony

maintain the foo$ing fieds

etor etor M9980008

2ompany 2ode 0008

Address data seect

Note $he data record must e saved hen recording

eete a fieds that do not eist in the source fie 21099IFI+7 from screen

880 in the recording (eg 6NA89S5ampT+ 6NA89+AN8 6ANNQ9SPampAS) Note o not deete fieds ampF01946ampS and ampF0190880

Save the recording no$

1 S$itch to the recordings overvie$

198 Process the recording $ith the processing mode A (dispay a)

191 Process the recording $ith the processing mode RN (no dispay)

19 If the recording has een tested and no error has occurred generate a I session

and run it using the I monitor If an error shoud occur generate the recordingagainQ

copy SAP AG BC420 12-81

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 8288

From the recording generate the program M21037I3 in your deveopment cass

2109 Seect the foo$ing

bull ampead fied contents from fie

bull 2reate test data in the fie 2103dei3test3tt

98 Save this program and eecute it ltenerate one I session each and process it

2arry out the same steps again using the ca transaction

The generated program shoud no$ e changed so that fie 21099IFI+7 can e

read and processed

98 2hange the defaut vaue of the fie name (parameter dataset) in 21099

IFI+7

91 2hange the structure definition eete the company code fied and the address

data checo from the structure

9 2hange the su9routine ca perform dc3fied for the company code (KampF019

46ampSK) so that the vaue 0008 is transferred

9 2hange the su9routine ca perform dc3fied for the address data checo

(KampF0190880K) so that the vaue G is transferred

9 Start the program again and read the data from the fie 21099IFI+7 $ith

detor data ltenerate a I session $ith it and run it

copy SAP AG BC420 12-82

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 8388

033 Include DR16INCLUDE BDCRECX1

SELECTION-SCREEN BEGIN OF LINE

PARAMETERS SESSION RADIOBUTTON GROUP CTU create sessi SELECTION-SCREEN COMMENT $amp TEXT-S FOR FIELD SESSION

se(ecti-scree )siti +

PARAMETERS CTU RADIOBUTTON GROUP CTU ca(( trasacti

SELECTION-SCREEN COMMENT $amp TEXT-S FOR FIELD CTU

SELECTION-SCREEN END OF LINE

SELECTION-SCREEN BEGIN OF LINE

SELECTION-SCREEN COMMENT $amp TEXT-S1 FOR FIELD GROUP

se(ecti-scree )siti $+

PARAMETERS GROUP1$amp r) ae 0 sessi

SELECTION-SCREEN COMMENT $amp TEXT-S+ FOR FIELD CTUMODE

se(ecti-scree )siti

PARAMETERS CTUMODE LIE CTU2PARAMS-DISMODE DEFAULT 3N3

A4 s56 a(( 78)rs

E4 s56 78)r errr (8

N4 7 t 7is)(a8 78)r

SELECTION-SCREEN END OF LINE

SELECTION-SCREEN BEGIN OF LINE

SELECTION-SCREEN COMMENT $amp TEXT-S$ FOR FIELD USER

se(ecti-scree )siti $+

PARAMETERS4 USER1$amp DEFAULT S9-UNAME ser 0r sessi i atc5

SELECTION-SCREEN COMMENT $amp TEXT-S FOR FIELD CUPDATE

se(ecti-scree )siti

PARAMETERS CUPDATE LIE CTU2PARAMS-UPDMODE DEFAULT 3L3

S4 s8c5rs(8

A4 as8c5rs(8

L4 (ca(

SELECTION-SCREEN END OF LINE

SELECTION-SCREEN BEGIN OF LINE

SELECTION-SCREEN COMMENT $amp TEXT-S FOR FIELD EEP

se(ecti-scree )siti $+

PARAMETERS4 EEP AS CltECBOX 3 3 = 7e(ete sessi i0 0iis5e7

3X3 = gtee) sessi i0 0iis5e7

SELECTION-SCREEN COMMENT $amp TEXT-S FOR FIELD E2GROUP

copy SAP AG BC420 12-83

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 8488

se(ecti-scree )siti

)araeters E2GROUP1$amp r) ae 0 errr-sessi

SELECTION-SCREEN END OF LINE

SELECTION-SCREEN BEGIN OF LINE

SELECTION-SCREEN COMMENT $amp TEXT-S FOR FIELD ltOLDDATE

se(ecti-scree )siti $+

PARAMETERS4 ltOLDDATE LIE S9-DATUM

SELECTION-SCREEN COMMENT +11amp TEXT-S$ FOR FIELD E2USER

se(ecti-scree )siti

PARAMETERS4 E2USER1$amp DEFAULT S9-UNAME ser 0r errr-sessi

SELECTION-SCREEN END OF LINE

SELECTION-SCREEN BEGIN OF LINE

SELECTION-SCREEN COMMENT +11amp TEXT-S FOR FIELD E2EEP

se(ecti-scree )siti

PARAMETERS4 E2EEP AS CltECBOX 3 3 = 7e(ete sessi i0 0iis5e7

3X3 = gtee) sessi i0 0iis5e7

SELECTION-SCREEN END OF LINE

SELECTION-SCREEN BEGIN OF LINE

SELECTION-SCREEN COMMENT +11amp TEXT-S FOR FIELD E2ltDATE

se(ecti-scree )siti

PARAMETERS4 E2ltDATE LIE S9-DATUM

SELECTION-SCREEN END OF LINE

SELECTION-SCREEN SIP

SELECTION-SCREEN BEGIN OF LINE

SELECTION-SCREEN COMMENT 1amp TEXT-S1 FOR FIELD NODATA

PARAMETERS4 NODATA DEFAULT 33 LOER CASE 7ata

SELECTION-SCREEN END OF LINE

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

Batc5i)t7ata 0 si(e trasacti

DATA4 BDCDATA LIE BDCDATA OCCURS ITlt ltEADER LINE

essaes 0 ca(( trasacti

DATA4 MESSTAB LIE BDCMSGCOLL OCCURS ITlt ltEADER LINE

errr sessi )ee7 3 3 r 3X3amp

DATA4 E2GROUP2OPENED

essae tets

TABLES4 T1

copy SAP AG BC420 12-84

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 8588

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

at se(ecti scree

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

AT SELECTION-SCREEN

r) a7 ser st e 0i((e7 0r create sessi

IF SESSION = 3X3 AND

GROUP = SPACE OR USER = SPACE

MESSAGE E1MSamp

ENDIF

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

)e 7ataset

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

FORM OPEN2DATASET USING P2DATASET

OPEN DATASET P2DATASET IN TEXT MODE

IF S9-SUBRC

RITE4 TEXT-E S9-SUBRC

STOP

ENDIF

ENDFORM

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

c(se 7ataset

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

FORM CLOSE2DATASET USING P2DATASET

CLOSE DATASET P2DATASET

ENDFORM

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

create atc5i)t sessi

t 0r ca(( trasacti siamp

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

FORM OPEN2GROUP

IF SESSION = 3X3

SIP

RITE4 $amp 3Create r)3I1amp GROUP

SIP

)e atc5i)t r)

CALL FUNCTION 3BDC2OPEN2GROUP3

EXPORTING CLIENT = S9-MANDT

copy SAP AG BC420 12-85

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 8688

GROUP = GROUP

USER = USER

EEP = EEP

ltOLDDATE = ltOLDDATE

RITE4 amp 3BDC2OPEN2GROUP3I$amp

1$amp 3retrc7e43I+amp

S9-SUBRC

ENDIF

ENDFORM

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

e7 atc5i)t sessi

ca(( trasacti si4 errr sessiamp

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

FORM CLOSE2GROUP

IF SESSION = 3X3

c(se atc5i)t r)

CALL FUNCTION 3BDC2CLOSE2GROUP3

RITE4 amp 3BDC2CLOSE2GROUP3Iamp

1$amp 3retrc7e43I+amp

S9-SUBRC

ELSE

IF E2GROUP2OPENED = 3X3

CALL FUNCTION 3BDC2CLOSE2GROUP3

RITE4

RITE4 amp 3Fe5(era))e 6r7e eret3Iamp

ENDIF

ENDIF

ENDFORM

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

Start e6 trasacti accr7i t )araeters

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

FORM BDC2TRANSACTION USING TCODE

DATA4 L2MSTRINGamp

DATA4 L2SUBRC LIE S9-SUBRC

atc5 i)t sessi

IF SESSION = 3X3

CALL FUNCTION 3BDC2INSERT3

EXPORTING TCODE = TCODE

TABLES D9NPROTAB = BDCDATA

RITE4 3BDC2INSERT3Iamp

copy SAP AG BC420 12-86

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 8788

TCODE

3retrc7e43I+amp

S9-SUBRC

3RECORD43

S9-INDEX

ca(( trasacti si

ELSE

REFRESlt MESSTAB

CALL TRANSACTION TCODE USING BDCDATA

MODE CTUMODE

UPDATE CUPDATE

MESSAGES INTO MESSTAB

L2SUBRC = S9-SUBRC

RITE4 3CALL2TRANSACTION3

TCODE

3retrc7e43I+amp

L2SUBRC

3RECORD43

S9-INDEX

LOOP AT MESSTAB

SELECT SINGLE FROM T1 ltERE SPRSL = MESSTAB-MSGSPRA

AND ARBGB = MESSTAB-MSGID

AND MSGNR = MESSTAB-MSGNR

IF S9-SUBRC =

L2MSTRING = T1-TEXT

IF L2MSTRING CS 313

REPLACE 313 ITlt MESSTAB-MSGH1 INTO L2MSTRING

REPLACE 3$3 ITlt MESSTAB-MSGH$ INTO L2MSTRING

REPLACE 33 ITlt MESSTAB-MSGH INTO L2MSTRING

REPLACE 33 ITlt MESSTAB-MSGH INTO L2MSTRING

ELSE

REPLACE 33 ITlt MESSTAB-MSGH1 INTO L2MSTRING

REPLACE 33 ITlt MESSTAB-MSGH$ INTO L2MSTRING

REPLACE 33 ITlt MESSTAB-MSGH INTO L2MSTRING

REPLACE 33 ITlt MESSTAB-MSGH INTO L2MSTRING

ENDIF

CONDENSE L2MSTRING

RITE4 MESSTAB-MSGT9P L2MSTRING$+amp

ELSE

RITE4 MESSTAB

ENDIF

ENDLOOP

copy SAP AG BC420 12-87

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 8888

SIP

Eree 0e5(era))e

IF L2SUBRC AND E2GROUP SPACE

IF E2GROUP2OPENED = 3 3

CALL FUNCTION 3BDC2OPEN2GROUP3

EXPORTING CLIENT = S9-MANDT

GROUP = E2GROUP

USER = E2USER

EEP = E2EEP

ltOLDDATE = E2ltDATE

E2GROUP2OPENED = 3X3

ENDIF

CALL FUNCTION 3BDC2INSERT3

EXPORTING TCODE = TCODE

TABLES D9NPROTAB = BDCDATA

ENDIF

ENDIF

REFRESlt BDCDATA

ENDFORM

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

Start e6 scree

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

FORM BDC2D9NPRO USING PROGRAM D9NPRO

CLEAR BDCDATA

BDCDATA-PROGRAM = PROGRAM

BDCDATA-D9NPRO = D9NPRO

BDCDATA-D9NBEGIN = 3X3

APPEND BDCDATA

ENDFORM

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

Isert 0ie(7

Page 35: BC420_46C - 012The Transaction Recorder

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 3588

02

983209 SAP AG 1999

1ditor$ Importing and 1porting Recordings

6 T 9D0amp S

amp SAPM90ampD 608

DltURSR

4

2

8 SAPM90ampD 666

60

66

Program Screen St 9ield name 9ield alue

cempA

e name

aa =orma

cemp

A

e name

aa =orma

1port

Import

Presentation Serer

If the editor functions in the systems do not provide a the functions you need you can do$noad the

recording to your presentation server using the Eort function and then edit the recording using a

P2 editor

Cou use the Import function to import the data ac into the amp System ae sure the fie is sti in

the correct format

copy SAP AG BC420 12-35

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 3688

08

983209 SAP AG 1999

Processing the Recording

Recording

Process )ith ALL TRASATI

Parameer

Proce mode$pdae mode

CA mode

e=a e

Con a=er comm

+o a B eon

nd +o a B mode

A

A

T

The recording can e eecuted directy The data from the recording is used and the transaction is

processed $ith ca transaction

2a transaction provides a range of options for caing appication transactions $hich are discussed

on the foo$ing t$o pages

copy SAP AG BC420 12-36

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 3788

03

983209 SAP AG 1999

Process mode

Update mode

ATT mode

Processing Recording )ith T 6

A

1

Displa( all screens

Displa( errors onl(

o displa(

L

S

A

Local

S(nchronous

As(nchronous

A

o ATT

ATT )ithout indiidual screen control

ATT )ith indiidual screen control

Processing mode

=ere you can specify the processing mode 9 it is the same as the processing mode for atch input

4pdate mode

=ere you can specify the update mode For more information see the unit ca transaction

2ATT mode

=ere you can mae specia settings if you $ant to test the recording under 2ATT conditions (ony

necessary for 2ATT runs) Specia functions are caed in the 2ATT too for each screen at the end of

P5 and at the start of PAI

copy SAP AG BC420 12-37

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 3888

05

983209 SAP AG 1999

Default sie

ont after commit

ot a I session

1nd$ ot a I mode

Processing Recording )ith T amp

The screen standard sie is used for the

processing

ommit )or+ does not end the processing

o I mode is actie The transaction )ill run

through as in online

I mode is selected nce the data in the D

table is processedG the I mode is set to inactie

Standard siDe

If you seect this the screens are processed in the standard siDe in the foreground (in foreground or

dispay errors ony) Note the standard siDe is a$ays used for acground processing

Further after commit

The first commit $or in a transaction does not ead to the end of the recording

Note A atch input transaction is ended $ith the first commit $or

No I mode

The system fied SC9INPT is not set (SC9INPT E ) So transactions are run through as in onine

7nd No I mode

5ny use if you choose the processing mode 7 (dispay errors ony) Then the transaction is processed in the acground in atch input mode and if there is an error the screens run through in

the foreground

copy SAP AG BC420 12-38

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 3988

07

983209 SAP AG 1999

I Mode

atch input

mode

nline

Some transactions behae differentl( in batch input mode

than in online Cbatch input capabilit(

atch input mode sets the s(stem field SIPT H

Not every transaction can run the same onine and in atch input mode The transaction must decide

itsef $hether it is caed onine or in atch input mode

The system sets the system fied SC9INPT E G if the atch input mode is active (this aso appies

to ca transaction) From this system fied the transaction can identify $hether to run onine or in

atch input mode

copy SAP AG BC420 12-39

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 4088

040

983209 SAP AG 1999

reating a Session 9rom the Recording

Recordingnl( contains the data

from the recording

Seon name 02amp

Aoraon ampBS(eep eon

oclt dae 10102000

Cou can create a atch input session directy from the recording that you can then process using the

atch input monitor

copy SAP AG BC420 12-40

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 4188

046

983209 SAP AG 1999

reating Test Data

Test Data

Recording

ranranpBC420AAe name

The file onl( contains the data from the recording

Rgt

Application Serer

Structure

Cou can create a fie from the recordingH the fie $i contain a the fieds from the recording The

fieds are added to the fie $ith the ength you specified in the definition

The fied order corresponds to the order in the recording overvie$ Technica fieds

(2356257 2324ampS5amp and so on) are incuded

The data can ony e stored on the appication server If you do not specify a path the fie is stored in

the $or directory of the appication server

If the specified test fie aready eists the ne$ data record is added to this fie

copy SAP AG BC420 12-41

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 4288

04amp

983209 SAP AG 1999

ed conen

reating a Program

Recording

ZBC420ampProram name

Transfer Program

e daa

ead =rom =e

ran=er =rom recordn

reate

9ile nameTest data

ranranpBC420AA

Cou can generate a program from the recording

In the foo$ing diaog o enter a program name In addition you can choose the type and method

for fiing the maintained fied contents from the recorded screens

4se the vaues used for the recording If you reuire feie data transfer you $i have to modify

this program ater

ParameteriDe the input vaues and read these vaues from a fie A data structure is created for

parameteriDationH the data records are read from an eterna fie into this data structure The

program assumes the fie $as taiored to this data structure

If you have decided to parameteriDe the input vaues you shoud aso create a test fie during

generation To do this seect the checo and enter a name for the fie

The attriute maintenance screen of the AAP editor appears aintain the attriutes and save the

program

copy SAP AG BC420 12-42

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 4388

04

983209 SAP AG 1999

Program 9unctions

Online

transaction

Transfer program

To

error

1rror

ption 6ption ampFlat SAP

structure

Monitor

Cou have no$ generated a data transfer program for importing data into the amp System The

program can eecute the data transfer using atch input or ca transaction

If you choose option 1 and there is an error the data record is paced into a atch input session

copy SAP AG BC420 12-43

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 4488

044

983209 SAP AG 1999

Benerating 9unction Modules

Recording

Zcreaedeor ncon mode

ncon rop

Sor eD

ZBC420

Creae comer

9unction module

nl( one data record can be processed at a time

In the net diaog o you can generate a function modue a function group and short tet from the

recording The function modue is automaticay created in the function group

copy SAP AG BC420 12-44

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 4588

042

983209 SAP AG 1999

9unction of 9unction Modules

Online

transaction

To

error

1rror

ption 6 ption amp

9unction module

Import

Parameter 1port

parameter

Tables

M1SSTA

Monitor

S$BC

Import interface

The import interface consists of a technica part and the fieds from the recording (A parameter is

created for each input fied of the recorded transactions)

7port interface

Simpy consists of the parameter S4amp2 The function modue $i return a vaue in the system

fied SC9S4amp2 after caing ca transaction This return vaue is set to Dero if the data record has

een correcty processed (5ny appies to 2T)

If a session is created you $i e notified $hether the data record coud e paced into the session

Tae interfaceThis is used ony if the function modue $ors $ith ca transaction The tae contains a the

system messages

copy SAP AG BC420 12-45

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 4688

048

983209 SAP AG 1999

Import Interface of 9unction Module

$

Technical

fields

Data

fields

BI session or CALL TRANSACTION

Processin $ode

pdate $ode

a$e oamp BI session iamp (T initial)

Bacround user iamp (T initial)

Delete session aampter processin

Loc date oamp session

ODATA indicator

TU

MD1

UPDAT1

BRUP

US1R

=11P

ELDDAT1

DATA

Cou can use parameter 2T4 to specify $hether the function modue creates a atch input session

(2T4 E ) or updates the data record directy using ca transaction (2T4 E G)

The other parameters are fied as for a atch input session header

Note 7very time the function modue is caed a atch input session is created

If the session is to contain severa transactions proceed as foo$s

ltenerate the transaction severa times This can e achieved y recording the transaction again The

function modue interface $i then contain more than one transaction -hen the function modue is

caed severa transactions can e generated for each session

copy SAP AG BC420 12-46

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 4788

043

983209 SAP AG 1999

The Transaction Recorder

PrinciplesPrinciples

Recording )ith the LSMWRecording )ith the LSMW

Principles of atch Input and all TransactionPrinciples of atch Input and all Transaction

Integrating the TA Program into the DWIntegrating the TA Program into the DW

Using the TA Recorder Using the TA Recorder

copy SAP AG BC420 12-47

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 4888

045

983209 SAP AG 1999

Benerated Program

9unction modules DltP1ltBRUP

DltIS1RT

DltLS1ltBRUP

AAP Program

Define structure of

data in seJuential

fileDefine D

table

pen seJuential file

pen I session

Read data recordCseJuential file

9ill D table

9ill I session gtALL TRASATI

Last data record K

lose I session

lose seJuential file

The generated program has the structure dispayed aove It uses the standard function modues for

creating atch input sessions

copy SAP AG BC420 12-48

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 4988

047

983209 SAP AG 1999

Structure of the Benerated Program

Benerated part

Define D

table

pen seJuential file

pen I session

Read data record

9ill D table

9ill I session gtALL TRASATI

Last data recordK

lose I session

lose seJuential file

Include DR16

Define filestructure

P1ltDATAS1T

P1ltBRUP

DltDPR

Dlt9I1LD

DltTRASATI

LS1ltBRUP

LS1ltDATAS1T

The generated program consists of t$o parts 9 a generated part and the incude 2amp72G8 The

incude is provided in the standard system

The incude contains the definition of the reuired 2 tae and a further seven suroutines These

suroutines eecute the foo$ing functions

5pen and cose fie

5pen and cose session

Fi 2 tae

Fi session

The generated part is the main program and cas the reevant suroutines A structure is aso

generated in the generated part to read the eterna data into the fie

See the Appendi for more information on the 2amp72G8 program

copy SAP AG BC420 12-49

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 5088

020

983209 SAP AG 1999

Structure of D Table

PRBRAM DPR D1BI 9AM 9ALPRBRAMPRBRAM DPRDPR D1BID1BI 9AM9AM 9AL9AL

SAPM90ampD 0602

R90ampD=UR 600000

R90ampDU=RS 0006

R90ampD=T=D =UA

SAPM90ampD 0660

=A6AM16 Smith

=A6PSTL 87000

=A6LAD6 US

=A6SPRAS 1

SAPM90ampD 06amp0

=A6ST1B US6amp428357DDATA

PRBRAM

DPR

D1BI

9AM

9AL

EAR

UM

EAR

EAR

EAR

40

4

6

6amp

6amp

D Module pool

D Screen number

D Start of screen

D 9ield name

D 9ield contents

9ield ame T(pe Length Short Tet

AAP Dictionar(

The 2 tae has the same structure as in a standard transfer

copy SAP AG BC420 12-50

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 5188

026

983209 SAP AG 1999

Read Structure

Recording

DATA BEGIN OF record data element BUKRS bukr$amp data element KTOKD ktokd$amp data element NA(EG) name$+amp data element SORT ortl$ampEND OF record-

record

Automaticall( generated

from recording

The structure of the fie is automaticay generated and is a$ays defined $ith the name amp725amp

The generated structure a$ays has the same ayout 7ach fied is defined y t$o generated ro$s

The first ro$ is a$ays a comment ro$ containing the tet J data eement and the data eement of

the screen fied from the recording In the net ro$ the fied itsef is defined $ith the name of the

data eement foo$ed y a three9digit position numer $hich specifies the ocation in the structure

The ength of the fied is set y the ength of the data eement If a fied is not defined through a data

eement the system uses the ength of the screen fied

copy SAP AG BC420 12-51

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 5288

02amp

983209 SAP AG 1999

pening and losing the 9ile

P1ltDATAS1T

LS1ltDATAS1T

FOR( oendataet USING dataet-O)EN DATASET dataet IN TET (ODE-

IF S01SUBR2 34 - 5RITE 6 te7t1e S01SUBR2-STO)-

ENDIF-

ENDFOR(-

FOR( cloedataet USING dataet-2OSE DATASET dataet-

ENDFOR(-

Include

DR16

The suroutine 5P7N3ATAS7T opens the seuentia fie

The suroutine 2+5S73ATAS7T coses the seuentia fie

copy SAP AG BC420 12-52

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 5388

02

983209 SAP AG 1999

9unction Modules for I Program

lient

Session name

Eold date

=eep session

D user name

RecordK

LI1T

BRUP

ELDDAT1

=11P

US1R

R1RD

DltP1ltBRUPDltP1ltBRUP

Transaction code

D table

TD1

DPRTA

DltIS1RTDltIS1RT

DltLS1ltBRUPDltLS1ltBRUP

pen Isessionpen Isession

Insert data for

transactions

Insert data for

transactions

lose I

session

lose I

session

The foo$ing function modues are provided for creating atch input sessions (function group

S2)

235P7N3ltamp54P

2reates a ne$ session and contains genera data for the $hoe session

23INS7ampT

Inserts a the data for a transaction into the session The transferred interna tae $ith the

structure 2ATA must contain a the data reuired for fuy processing the transaction

232+5S73ltamp54P

2oses the session after a the data has een inserted As soon as the session has een cosed it

can e processed

The interna tae $ith the structure 2ATA can ony contain atch input data for one singe

transaction run So the individua transactions are inserted into the atch input session in a oop

using severa 23INS7ampT cas

copy SAP AG BC420 12-53

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 5488

024

983209 SAP AG 2001

9unction Module DltP1ltBRUP

ALL 9UTI DltP1ltBRUPALL 9UTI DltP1ltBRUP

1PRTIB

LI1T client

BRUP session name

ELDDAT1 loc+ date

=11P delete flag

US1R bdc user name

R1RD recording

IMPRTIB

NID internal session +e(

11PTIS

1PRTIB

LI1T client

BRUP session name

ELDDAT1 loc+ date

=11P delete flag

US1R bdc user name

R1RD recording

IMPRTIB NID internal session +e(

11PTIS

-ith the function modue 235P7N3ltamp54P you can open a atch input session

The foo$ing parameters are mandatory

2+I7NT (cient)

ltamp54P (session name)

4S7amp (user name)

Note The 4S7amp must a$ays e specified This user name is reuired for processing the session

in atch mode

The foo$ing parameters are optiona

=5+AT7 specifies the eariest date on $hich the session can e started677P fag specifies $hether session shoud e deeted after it has een successfuy processed The

677P fag is ignored if the session contains errors

677P E K K means deete the session after processing (defaut vaue) H

677P E KGK means do not deete session

amp725amp E KGK ao$s you to create a recording instead of a I session

If gtI is specified the function modue returns the interna session ey This is needed to e ae to

differentiate sessions that have the same name

-ith 7G27PTI5NS you get various return vaues that can e ueried $ith SC9S4amp2

Note In onine mode the onine user is used for the authoriDation checs regardess of the user

name specified

copy SAP AG BC420 12-54

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 5588

022

983209 SAP AG 1999

Subprogram P1ltBRUP

P1ltBRUP

FOR( oen8rou-IF e9on -

2A FUN2TION BD2O)ENGROU) E)ORTING 2IENT lt1mandt GROU) 8rou USER uer KEE) kee

=ODDATE gtolddate-

ENDIF-ENDFOR(-

Include

DR16

The suprogram 5P7N3ltamp54P opens the atch input session

copy SAP AG BC420 12-55

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 5688

028

983209 SAP AG 1999

9unction Module DltIS1RT

ALL 9UTI DltIS1RTALL 9UTI DltIS1RT

IMPRT

TD1 Transaction code

PSTltLAL Update locall(

PRITIB print list

TAL1S DPRTA bdclttable

11PTIS

IMPRT

TD1 Transaction code

PSTltLAL Update locall(

PRITIB print list

TAL1S DPRTA bdclttable

11PTIS

-ith the function modue 23INS7ampT you can add transaction data to the session

Cou need an interna 2 tae to transfer the data

The foo$ing parameters are mandatory

T257 Transaction code

CNPamp5TA 2 tae

The foo$ing parameters are optiona

P5ST3+52A+ E KGK activates oca updating This means that the data to e updated is ept in the

appication server and updated in the ast step of the transaction This does not invove the update

process (For more information see course 28 Programming ataase 4pdates)

PampINTINlt E KGK 9 ists processed in I $i e printed immediatey -ith 7G27PTI5NS you get various return vaues that can e ueried $ith SC9S4amp2

copy SAP AG BC420 12-56

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 5788

023

983209 SAP AG 1999

Subprogram DltTRASATI

DltTRASATI

FOR( BD2TRANSA2TION USING tcode-

IF e9on -2A FUN2TION BD2INSERT

E)ORTING T2ODE tcode TABES D0N)ROTAB bdcdata-

ESE-

ENDIF-ENDFOR(-

T

Include

DR16

The suprogram 23TampANSA2TI5N moves the fied 2 tae either to a atch input session

or uses ca transaction to import the data into the system 5n the seection screen you can specify

$hether you $ant to create a session or you $ant to use ca transaction to process the data directy

The S7SSI5N fied is then set according to your seection

copy SAP AG BC420 12-57

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 5888

025

983209 SAP AG 1999

9unction Module DltLS1ltBRUP

ALL 9UTI DltLS1ltBRUP

11PTIS

TltP1 6

NU1U1lt1RRR amp

-ith the function modue 232+5S73ltamp54P you can cose a atch input session

In 7G27PTI5NS you get various return vaues that can e ueried $ith SC9S4amp2

copy SAP AG BC420 12-58

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 5988

027

983209 SAP AG 1999

Subprogram LS1ltBRUP

FOR( cloe8rou-IF e9on -cloe batcgt 9nut 8rou

2A FUN2TION BD22OSEGROU)-

ESE-IF e8rouoened -

2A FUN2TION BD22OSEGROU)-

ENDIF-ENDIF-

ENDFOR(-

LS1ltBRUPlose session

lose error session

Include

DR16

The suprogram 2+5S73ltamp54P coses the atch input session The suprogram differentiates

et$een a norma I session (S7SSI5N E G) and a session opened $hen ca transaction

encountered an error (73ltamp54P35P7N7 E G)

copy SAP AG BC420 12-59

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 6088

080

983209 SAP AG 1999

Subprograms DltDPRG Dlt9I1LD

DltDPR

Dlt9I1LD

FOR( bdc9eld USING nam al-IF al 34 nodata-2EAR bdcdata- bdcdata1nam nam- bdcdata1al al- A))END bdcdata-ENDIF-

ENDFOR(-

FOR( bdcdltnro USING ro8ram dltnro- 2EAR bdcdata-Bdcdata1ro8ram ro8ram-Bdcdata1dltnro dltnro-Bdcdata1dltnbe89n - A))END bdcdata-ENDFOR(-

Include

DR16

The incude 2amp72GG contains t$o suprograms 23CNPamp5 and 23FI7+

Suprogram 23CNPamp5 fis the 2 tae $ith program names and screen numers

Suprogram 23FI7+ fis the 2 tae $ith fied names and vaues

7ach suprogram creates an entry in the 2 tae

copy SAP AG BC420 12-60

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 6188

086

983209 SAP AG 1999

9illing the D Table

erorm bdcdltnro u9n8 SA)(FD +- erorm bdc9eld u9n8 BD22URSOR RFD1BUKRS- erorm bdc9eld u9n8 BD2OK2ODE 6- erorm bdc9eld u9n8 RFD1BUKRS record1BUKRS- erorm bdc9eld u9n8 RFD1KTOKD record1KTOKD-

erorm bdcdltnro u9n8 SA)(FD -

erorm bdc9eld u9n8 BD22URSOR KNA1S)RAS- erorm bdc9eld u9n8 BD2OK2ODE 6- erorm bdc9eld u9n8 KNA1NA(E record1NA(E-

erorm bdc9eld u9n8 KNA1SORT record1SORT-

Recording Benerated automaticall(

from the recording

)ERFOR( bdcdltnro USING SA)(FD +- )ERFOR( bdc9eld USING BD22URSOR RFD1BUKRS-)ERFOR( bdc9eld USING BD2OK2ODE 6-)ERFOR( bdc9eld USING RFD1BUKRS record1BUKRS-)ERFOR( bdc9eld USING RFD1KTOKD record1KTOKD-

)ERFOR( bdcdltnro USING SA)(FD -

)ERFOR( bdc9eld USING BD22URSOR KNA1S)RAS-)ERFOR( bdc9eld USING BD2OK2ODE 6-)ERFOR( bdc9eld USING KNA1NA(E record1NA(E-

)ERFOR( bdc9eld USING KNA1SORT record1SORT- ---

The 2 tae is fied $ith data from the recording The suroutines 23CNPamp5 and

23FI7+ are used for this

The suroutines are caed in the reuired structure or seuence

copy SAP AG BC420 12-61

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 6288

08amp

983209 SAP AG 1999

erie)

SAPDatabase

SeJuential9ile

SAPDatabase

ALL TRASATIALL TRASATI

SeJuential9ile

ATE IPUTATE IPUT

D TableD TableD TableD Table

I Monitor

T

In contrast to atch input you can use ca transaction to directy pass data to the diaog interface

$ithout using a atch input session Cou use an interna tae (2 tae same structure and ayout

as atch input) to temporariy store your screen data Then you ca the desired transaction in your

program

Note 5n average the 2a Transaction method is 8 to times faster than using atch Input

copy SAP AG BC420 12-62

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 6388

08

983209 SAP AG 1999

all Transaction Program$ 1ample

RE)ORT abcbdcdcdeb9ct-

)ARA(ETERS d9mode DEFAUT A

udmode DEFAUT S-FOR( calltranact9on-2A TRANSA2TION FD

USING bdcdata (ODE d9mode

U)DATE udmode-

IF lt1ubrc NE - 5RITE 6 ---

ENDIF-ENDFOR(-

Screen

00

Screen

100

Screen

An additiona system ro area is added for the caed transaction The system uses this area for

processing the individua screens in the transactionH the data from the tae is added here After the

transaction is processed the second ro area is reeasedH the system continues processing in the first

ro area

Notes

In contrast to atch input there is no error ogging (error sessions) here For processing the caed

transaction the system uses the authoriDations of the user that caed the transaction The 2 tae

can ony hod data for one transaction run at a time efore another transaction is caed and its data

can e added you must eecute a amp7Famp7S= for the 2 tae

copy SAP AG BC420 12-63

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 6488

084

983209 SAP AG 1999

ALL TRASATI C6

RE)ORT 777-

2A TRANSA2TION FD USING bdcdata (ODE E-

Default for MD1 is A

2A TRANSA2TION 3tranact9oncode4 USING 3bdc1table4 C (ODE A E N C-

-ith the parameter 57 you can seect a specific dispay mode for processing the transaction The

foo$ing three modes are avaiae

A (ispay a)

If you eecute the program a the screens and a their data are dispayed This is the defaut vaue

for the 57 in 2A++ TampANSA2TI5N

N (ispay nothing)

The screens are not dispayed at a regardess of $hether any of them contained errors As soon as

the transaction has een fuy processed contro is returned to your program (The vaue of the

parameter 4PAT7 determines $hether dataase updates are eecuted or not)

7 (ispay errors ony)As soon as an error occurs in a screen the transaction is s$itched to dispay mode so that you can

correct the errors

These dispay modes are the same as those in the atch input session processing

copy SAP AG BC420 12-64

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 6588

082

983209 SAP AG 1999

RE)ORT 777-

2A TRANSA2TION FD USING BD2DATA U)DATE -

ALL TRASATI Camp

RE)ORT 777-

2A TRANSA2TION FD USING bdcdata U)DATE -

2A TRANSA2TION 3tranact9oncode4 USING 3bdc1table4 C (ODE A E N C U)DATE A S C -

Default for UPDAT1 is A

-ith the parameter 4PAT7 you can contro ho$ dataase updates arising from a transaction are

carried out There are three options

A (asynchronous updating) The caed transaction does not $ait unti the dataase has een

updated it simpy for$ard the updates to the SAP update service This usuay speeds up the 2T

program This processing mode is N5T recommended for arge data sets as the caed transaction

does not receive a competion message from the update modue

The caing 2T program therefore cannot te if the transaction has een successfuy competed Cou

shoud use the updating administration function (transaction S8) to determine $hether updating

$as terminated eary The error anaysis correction functions for are ess hepfu than $ith

synchronous updating

S (synchronous updating) -ith synchronous updating the caed transaction $aits unti a the

updates have een competed So processing is so$er than $ith synchronous updating The caed

transaction can ho$ever report any updating errors to the program $hich maes error

anaysiscorrection easier

+ (local updating) $ith oca updating the dataase is not updated in a separate process it is

updated in the caers process (see appication hep documentation for the AAP ey$ord S7T

4PAT7 TAS6 +52A+)

copy SAP AG BC420 12-65

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 6688

088

983209 SAP AG 1999

ALL TRASATI C

RE)ORT 777-DATA mtab T0)E TABE OF bdcm8coll-

2A TRANSA2TION FD USING bdcdata (ESSAGES INTO mtab-

2A TRANSA2TION 3tranact9oncode4 USING 3bdc1table4 C (ODE A E N C U)DATE A S C (ESSAGES INTO 3metab4 C -

7SSAlt7S specifies that a system messages that are output during the eecution of a 2A++

TampANSA2TI5N are $ritten to the interna tae L7SSTA The interna tae must have the

structure 2Slt25++

4nie the cassica atch input processing $ith sessions 2A++ TampANSA2TI5N does not offer any

specia processing procedures for transactions containing errors There are no restart functions for

transactions that contain errors or that cause updating terminations

copy SAP AG BC420 12-66

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 6788

083

983209 SAP AG 1999

ALL TRASATI C4

RE)ORT 777-DATA mltot T0)E ctuaram-

2A TRANSA2TION FD USING BD2DATA

O)TIONS FRO( mltot-

2A TRANSA2TION 3tranact9oncode4 USING 3bdc1table4 C (ODE A E N C U)DATE A S C (ESSAGES INTO 3metab4 C O)TIONS FRO( ot C -

RE)ORT 777-DATA mltot T0)E ctuaram-2A TRANSA2TION FD USING bdcdata

O)TIONS FRO( mltot-

The addition 5PTI5NS enaes the ca transaction statement to e controed through a structure

The structure must have the dictionary type 2T43PAampAS

The addition 5PTI5NS Famp5 must not e comined either $ith the addition 57 or $ith

4PAT7 ore information on the net side

copy SAP AG BC420 12-67

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 6888

085

983209 SAP AG 1999

Structure TUltPARAMS

DISMD1 Procen mode anaoo o addon amp

UPDMD1 $pdae mode anaoo o addon $PA

ATTMD1 CA mode CA conro

D19SI1 orce de=a EndoE e drn procen

RAMMIT +o eD a Camp amp(

IPT +o a ac np eonF a F S-B+P SPAC

I1D +o a ac np eon a=er end o= BC daa

The components are defined as foo$s

The components 7FSIM7 ampA25IT N5INPT and N5I7N can have the foo$ing

vaues KGK E Ces or K K E No

If the addition 5PTI5NS Famp5 is not specified the foo$ing settings appy to the contro

parameters

IS57 from addition 57

4P57 from addition 4PAT7

2ATT57 2ATT not active

7FSIM7 o not not use defaut $indo$s siDe

ampA25IT Successfu eit at 25IT -5amp6

N5INPT atch input session active (SC9INPT E G)

N5I7N atch input session sti active after end of 2 data

copy SAP AG BC420 12-68

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 6988

087

983209 SAP AG 1999

SMSBID Message ID

SMSBT Message T(pe C1GIGWGSGA

SMSB Message umber

SMSB6 Message ariable 6

SMSBamp Message ariable amp

SMSB Message ariable

SMSB4 Message ariable 4

SMSBID Message ID

SMSBT Message T(pe C1GIGWGSGA

SMSB Message umber

SMSB6 Message ariable 6

SMSBamp Message ariable amp

SMSB Message ariable

SMSB4 Message ariable 4

Return code$

S(stem fields$

alue Meaning

0 Successful

6000 1rror in transaction

6000 1rror in processing call transaction

see also the s(stem fields specified

alue Meaning

0 Successful

6000 1rror in transaction

6000 1rror in processing call transaction

see also the s(stem fields specified

9ield name Meaning9ield name9ield name MeaningMeaning

Return ode and S(stem 9ields

The return code is used to specify $hether the caed transaction $as processed successfuy In

addition severa system fieds are fied The numer I type and variaes of the diaog message

output y the caed transaction Cou need this information to output the message tet

copy SAP AG BC420 12-69

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 7088

030

983209 SAP AG 1999

Benerated Program of the TA Recorder

REFRES= (ESSTAB-

2A TRANSA2TION tcode USING bdcdata (ODE ctumode U)DATE cudate (ESSAGES INTO metab-OO) AT metab- ENDOO)-IF lubrc 34 AND e8rou 34 S)A2E- IF e8rouoenend - 2A FUN2TION BD2O)ENGROU) E)ORTING ---------

--------- E8rouoened - ENDIF- 2A FUN2TION BD2INSERT E)ORTING T2ODE tcode TABES D0N)ROTAB bdcdata-ENDIF-REFRES= bdcdata-

Message table output

pen error session

Insert data record that

has errors into error

session

If you have seected ca transaction on the seection screen the generated program runs as foo$s

The onine transaction is caed $ith ca transaction and passed to tae 2ATA A the

messages arising during the ca transaction are put in the interna tae 7SSTA

7SSTA is output as a ist

If you have specified an error session ( 73ltamp54P L SPA27) on the seection screen and the

ca transaction comes across an error (+3S4amp2 L 0) the error session is opened The error

session is ho$ever ony opened once Then the data record is paced in the session

A the other data records that have errors $ith ca transaction are paced in the same session

copy SAP AG BC420 12-70

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 7188

036

983209 SAP AG 1999

The Transaction Recorder

PrinciplesPrinciples

Recording )ith the LSMWRecording )ith the LSMW

Principles of atch Input and all TransactionPrinciples of atch Input and all Transaction

Integrating the TA Program into the DWIntegrating the TA Program into the DW

Using the TA Recorder Using the TA Recorder

copy SAP AG BC420 12-71

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 7288

03amp

983209 SAP AG 1999

Integrating into the DW

Transfer program

AAP Dictionar(

Integrate

SDA0

SDA6

SDAamp

SDA

Cou can integrate the generated program into the G9- The structure of the fie must e created

in the AAP ictionary The taes SGA0 SGA8 SGA1 and SGA $i e fied

copy SAP AG BC420 12-72

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 7388

03

983209 SAP AG 1999

DW Release 42

Goo

-B eeae 45

aa ran=er ogtec

Int customer data transfer ob-ect

ecord =ed

Dece daa ran=er

d Goo

The ampunction ampor interatin TA recorder prora$s is

i$ple$ented in the

D+-B in Release

The recorder can e integrated as of ampeease and it is provided in the G9- ampeease

ltot to the G9- ampeease 5n the initia screen you can integrate programs y choosing ampoto

( +nt customer ata transfer o-ect

copy SAP AG BC420 12-73

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 7488

034

983209 SAP AG 1999

reating Program as D b-ect

Comer ran=er ogtec

ampgtec ype

Sor eD =or ogtec

aa ran=er proram

Srcre name

9900

(+A1

Cane comer

ZBCA+G

ZB

ustomer transfer ob-ect

umber bet)een 7000 and 7777

b-ect t(pe

Assignment to R ob-ect

Short tet for D ob-ectShort description

Data transfer program

ame of generated program

Structure name

A structure Cstructure la(out )ith this name is created in

the AAP Dictionar(

For ampeease transfer oects $ere not organiDed y 5amp oects ut y a G numer (00089

OOOO) The numer range O0009OOOO is reserved for customers

To create a connection to the ne$ G 9- you must assign the program to a 5amp oect

2reate a short tet for the G oect This tet $i appear in the method seection ist

Specify the program to e incuded

Specify a name for the structure to e created in the AAP ictionary

Note $he generated program appears under program type +N and not under program type

-

copy SAP AG BC420 12-74

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 7588

032

983209 SAP AG 1999

Adantages

Automatic program registration in the DW in

Release 48

ou can use all the functions defined for

standard ob-ects

1ception$ The (reate ampile ith data

function

If you incuded the oect in the ampeease $orench it is automaticay avaiae in the ampeease

B $orench

A the $orench functions are avaiae for your oect ecept for Create files ith transfer ata

copy SAP AG BC420 12-75

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 7688

038

983209 SAP AG 1999

ou are no) able to$

The Transaction Recorder$ Unit Summar(

Use the recording function in the LSMW to create

a batch input session )ith the data from the

eternal s(stem

Use the TA Recorder to create (our o)n data

transfer program

Anal(e programs that )or+ )ith batch input or

call transaction

Integrate the TA Recorder programs into the

DW

copy SAP AG BC420 12-76

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 7788

ercise 1

nit $ -ecorder

$opic 2reating etors

$ransaction -ecorder ercise 1

bull 2reating detors $ith eterna numer assignment

bull etor numers M9980008 to M9980080

Address data for detors $ith eterna numer assignment is to

e transferred using program ampFI700

ro4ect F5

Supro4ect +5

-un +575

$as)s 85 95 8S25

9oad program -F+00

8 In the foo$ing eercises eisting data is to e changed Therefore these detors $ith

eterna numer assignment have to first e created

898 4nder suproect 79 create run 797G9 $ith the name Detors ith

eternal numers

copy SAP AG BC420 12-77

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 7888

891 2reate the foo$ing three tass The tass map the foo$ing process steps

convert data create + session and process + session

89198 In run 797G9 create the foo$ing tas

9 Tas AP9

9 Name 2onvert data 9 Tas type AP

9 Program type +S-

Seect the foo$ing +S- oect

+S- proect 2109

+S- suproect 7I9

+S- oect I997GT

89191 In run 797G9 create the foo$ing tas 9 Tas +5A9

9 Name 2reate I session

Tas type +5A

9 Program type INP

Seect program ampFI700 $ith the variant

I97G9

8919 In run 797G9 create the foo$ing tas

9 Tas S29

9 Name Process I session Tas type S2

9 Program type amp7P5

Seect program ampS2S4 $ith the variant

S497G9

Note that you have to correct the seuence of the tass 2onvert data

create + session and process + session

4se the uttons

89 Start the run

The detors $i e created $ith eterna numer assignments

89 2hec in transaction F0 that the detors M9980008 to M9980080 have een

created

copy SAP AG BC420 12-78

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 7988

ercise

nit $ransaction -ecorder

$opic -ecording function in the 9S8(

bull 2reate a recording using the +S-

bull ltenerate a atch input session

2hange the detor address data in the amp System

Name of the recording +

Name of the file +2055+F9

8 2reate the recording 7I3 using the +S- ampecord the transaction F01 (2hange

detor)

898 efore you create the recording first test the transaction onineQ

For the recording use detor M9980008 5n the initia screen of the F01

maintain the foo$ing fieds ony

etor etor M9980008

2ompany code 0008

Address data seect

Note $he data record must e saved hile recording

891 aintain the names and the descriptions for the foo$ing fieds

Name city street posta code and teephone numereete a other fieds in screen 880 from the recording (eg S5ampT+ +AN8

SPampAS)

4se the same technica names as sho$n in the tae eo$ (automatic fied

mapping)

copy SAP AG BC420 12-79

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 8088

1 2reate the suproect 7I9 and the ne$ oect TA3 in your proect 2109

aintain the oect attriutes and seect the item atch input recording Seect your

recording 7I3

2reate the source structure address

2reate the source fieds according to the tae eo$ 5r copy them from proect 2109S37N suproect 7I900 oect TA900

198 Fie setup The data from the egacy system are dispayed in the foo$ing tae

Fied name Fied type Fied ength escription

N5 2 8B etor numer

NA7 2 Name

STamp77T 2 Street

2ITC 2 2ityPace of residence

MIP 2 80 Posta code

T7+ 2 8B Teephone numer

191 aintain the fied mapping 4se the automatic fied mapping (via menu item

7tras)

19 Specify the fies 5ny maintain the fie name of the source fie

Name of the fie 21099IFI+7

2odepage 8800

19 Import the data and convert them ispay the data in each caseQ

19 2reate a atch input session

19B ampun the atch input session

copy SAP AG BC420 12-80

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 8188

ercise 3

nit $ransaction -ecorder

$opic -ecording ith the $ -ecorder

bull ltenerate a recording using the TA recorder

bull Test the recording

2hange the address data of detors in the amp system

Name recording $+

Name of the file +2055+F9

8 2reate the recording TA37I3 using the transaction recorder ampecord the

transaction F01 (change detor)

898 4se detor M9980008 for the recording 5n the F01 initia screen ony

maintain the foo$ing fieds

etor etor M9980008

2ompany 2ode 0008

Address data seect

Note $he data record must e saved hen recording

eete a fieds that do not eist in the source fie 21099IFI+7 from screen

880 in the recording (eg 6NA89S5ampT+ 6NA89+AN8 6ANNQ9SPampAS) Note o not deete fieds ampF01946ampS and ampF0190880

Save the recording no$

1 S$itch to the recordings overvie$

198 Process the recording $ith the processing mode A (dispay a)

191 Process the recording $ith the processing mode RN (no dispay)

19 If the recording has een tested and no error has occurred generate a I session

and run it using the I monitor If an error shoud occur generate the recordingagainQ

copy SAP AG BC420 12-81

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 8288

From the recording generate the program M21037I3 in your deveopment cass

2109 Seect the foo$ing

bull ampead fied contents from fie

bull 2reate test data in the fie 2103dei3test3tt

98 Save this program and eecute it ltenerate one I session each and process it

2arry out the same steps again using the ca transaction

The generated program shoud no$ e changed so that fie 21099IFI+7 can e

read and processed

98 2hange the defaut vaue of the fie name (parameter dataset) in 21099

IFI+7

91 2hange the structure definition eete the company code fied and the address

data checo from the structure

9 2hange the su9routine ca perform dc3fied for the company code (KampF019

46ampSK) so that the vaue 0008 is transferred

9 2hange the su9routine ca perform dc3fied for the address data checo

(KampF0190880K) so that the vaue G is transferred

9 Start the program again and read the data from the fie 21099IFI+7 $ith

detor data ltenerate a I session $ith it and run it

copy SAP AG BC420 12-82

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 8388

033 Include DR16INCLUDE BDCRECX1

SELECTION-SCREEN BEGIN OF LINE

PARAMETERS SESSION RADIOBUTTON GROUP CTU create sessi SELECTION-SCREEN COMMENT $amp TEXT-S FOR FIELD SESSION

se(ecti-scree )siti +

PARAMETERS CTU RADIOBUTTON GROUP CTU ca(( trasacti

SELECTION-SCREEN COMMENT $amp TEXT-S FOR FIELD CTU

SELECTION-SCREEN END OF LINE

SELECTION-SCREEN BEGIN OF LINE

SELECTION-SCREEN COMMENT $amp TEXT-S1 FOR FIELD GROUP

se(ecti-scree )siti $+

PARAMETERS GROUP1$amp r) ae 0 sessi

SELECTION-SCREEN COMMENT $amp TEXT-S+ FOR FIELD CTUMODE

se(ecti-scree )siti

PARAMETERS CTUMODE LIE CTU2PARAMS-DISMODE DEFAULT 3N3

A4 s56 a(( 78)rs

E4 s56 78)r errr (8

N4 7 t 7is)(a8 78)r

SELECTION-SCREEN END OF LINE

SELECTION-SCREEN BEGIN OF LINE

SELECTION-SCREEN COMMENT $amp TEXT-S$ FOR FIELD USER

se(ecti-scree )siti $+

PARAMETERS4 USER1$amp DEFAULT S9-UNAME ser 0r sessi i atc5

SELECTION-SCREEN COMMENT $amp TEXT-S FOR FIELD CUPDATE

se(ecti-scree )siti

PARAMETERS CUPDATE LIE CTU2PARAMS-UPDMODE DEFAULT 3L3

S4 s8c5rs(8

A4 as8c5rs(8

L4 (ca(

SELECTION-SCREEN END OF LINE

SELECTION-SCREEN BEGIN OF LINE

SELECTION-SCREEN COMMENT $amp TEXT-S FOR FIELD EEP

se(ecti-scree )siti $+

PARAMETERS4 EEP AS CltECBOX 3 3 = 7e(ete sessi i0 0iis5e7

3X3 = gtee) sessi i0 0iis5e7

SELECTION-SCREEN COMMENT $amp TEXT-S FOR FIELD E2GROUP

copy SAP AG BC420 12-83

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 8488

se(ecti-scree )siti

)araeters E2GROUP1$amp r) ae 0 errr-sessi

SELECTION-SCREEN END OF LINE

SELECTION-SCREEN BEGIN OF LINE

SELECTION-SCREEN COMMENT $amp TEXT-S FOR FIELD ltOLDDATE

se(ecti-scree )siti $+

PARAMETERS4 ltOLDDATE LIE S9-DATUM

SELECTION-SCREEN COMMENT +11amp TEXT-S$ FOR FIELD E2USER

se(ecti-scree )siti

PARAMETERS4 E2USER1$amp DEFAULT S9-UNAME ser 0r errr-sessi

SELECTION-SCREEN END OF LINE

SELECTION-SCREEN BEGIN OF LINE

SELECTION-SCREEN COMMENT +11amp TEXT-S FOR FIELD E2EEP

se(ecti-scree )siti

PARAMETERS4 E2EEP AS CltECBOX 3 3 = 7e(ete sessi i0 0iis5e7

3X3 = gtee) sessi i0 0iis5e7

SELECTION-SCREEN END OF LINE

SELECTION-SCREEN BEGIN OF LINE

SELECTION-SCREEN COMMENT +11amp TEXT-S FOR FIELD E2ltDATE

se(ecti-scree )siti

PARAMETERS4 E2ltDATE LIE S9-DATUM

SELECTION-SCREEN END OF LINE

SELECTION-SCREEN SIP

SELECTION-SCREEN BEGIN OF LINE

SELECTION-SCREEN COMMENT 1amp TEXT-S1 FOR FIELD NODATA

PARAMETERS4 NODATA DEFAULT 33 LOER CASE 7ata

SELECTION-SCREEN END OF LINE

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

Batc5i)t7ata 0 si(e trasacti

DATA4 BDCDATA LIE BDCDATA OCCURS ITlt ltEADER LINE

essaes 0 ca(( trasacti

DATA4 MESSTAB LIE BDCMSGCOLL OCCURS ITlt ltEADER LINE

errr sessi )ee7 3 3 r 3X3amp

DATA4 E2GROUP2OPENED

essae tets

TABLES4 T1

copy SAP AG BC420 12-84

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 8588

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

at se(ecti scree

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

AT SELECTION-SCREEN

r) a7 ser st e 0i((e7 0r create sessi

IF SESSION = 3X3 AND

GROUP = SPACE OR USER = SPACE

MESSAGE E1MSamp

ENDIF

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

)e 7ataset

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

FORM OPEN2DATASET USING P2DATASET

OPEN DATASET P2DATASET IN TEXT MODE

IF S9-SUBRC

RITE4 TEXT-E S9-SUBRC

STOP

ENDIF

ENDFORM

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

c(se 7ataset

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

FORM CLOSE2DATASET USING P2DATASET

CLOSE DATASET P2DATASET

ENDFORM

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

create atc5i)t sessi

t 0r ca(( trasacti siamp

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

FORM OPEN2GROUP

IF SESSION = 3X3

SIP

RITE4 $amp 3Create r)3I1amp GROUP

SIP

)e atc5i)t r)

CALL FUNCTION 3BDC2OPEN2GROUP3

EXPORTING CLIENT = S9-MANDT

copy SAP AG BC420 12-85

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 8688

GROUP = GROUP

USER = USER

EEP = EEP

ltOLDDATE = ltOLDDATE

RITE4 amp 3BDC2OPEN2GROUP3I$amp

1$amp 3retrc7e43I+amp

S9-SUBRC

ENDIF

ENDFORM

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

e7 atc5i)t sessi

ca(( trasacti si4 errr sessiamp

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

FORM CLOSE2GROUP

IF SESSION = 3X3

c(se atc5i)t r)

CALL FUNCTION 3BDC2CLOSE2GROUP3

RITE4 amp 3BDC2CLOSE2GROUP3Iamp

1$amp 3retrc7e43I+amp

S9-SUBRC

ELSE

IF E2GROUP2OPENED = 3X3

CALL FUNCTION 3BDC2CLOSE2GROUP3

RITE4

RITE4 amp 3Fe5(era))e 6r7e eret3Iamp

ENDIF

ENDIF

ENDFORM

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

Start e6 trasacti accr7i t )araeters

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

FORM BDC2TRANSACTION USING TCODE

DATA4 L2MSTRINGamp

DATA4 L2SUBRC LIE S9-SUBRC

atc5 i)t sessi

IF SESSION = 3X3

CALL FUNCTION 3BDC2INSERT3

EXPORTING TCODE = TCODE

TABLES D9NPROTAB = BDCDATA

RITE4 3BDC2INSERT3Iamp

copy SAP AG BC420 12-86

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 8788

TCODE

3retrc7e43I+amp

S9-SUBRC

3RECORD43

S9-INDEX

ca(( trasacti si

ELSE

REFRESlt MESSTAB

CALL TRANSACTION TCODE USING BDCDATA

MODE CTUMODE

UPDATE CUPDATE

MESSAGES INTO MESSTAB

L2SUBRC = S9-SUBRC

RITE4 3CALL2TRANSACTION3

TCODE

3retrc7e43I+amp

L2SUBRC

3RECORD43

S9-INDEX

LOOP AT MESSTAB

SELECT SINGLE FROM T1 ltERE SPRSL = MESSTAB-MSGSPRA

AND ARBGB = MESSTAB-MSGID

AND MSGNR = MESSTAB-MSGNR

IF S9-SUBRC =

L2MSTRING = T1-TEXT

IF L2MSTRING CS 313

REPLACE 313 ITlt MESSTAB-MSGH1 INTO L2MSTRING

REPLACE 3$3 ITlt MESSTAB-MSGH$ INTO L2MSTRING

REPLACE 33 ITlt MESSTAB-MSGH INTO L2MSTRING

REPLACE 33 ITlt MESSTAB-MSGH INTO L2MSTRING

ELSE

REPLACE 33 ITlt MESSTAB-MSGH1 INTO L2MSTRING

REPLACE 33 ITlt MESSTAB-MSGH$ INTO L2MSTRING

REPLACE 33 ITlt MESSTAB-MSGH INTO L2MSTRING

REPLACE 33 ITlt MESSTAB-MSGH INTO L2MSTRING

ENDIF

CONDENSE L2MSTRING

RITE4 MESSTAB-MSGT9P L2MSTRING$+amp

ELSE

RITE4 MESSTAB

ENDIF

ENDLOOP

copy SAP AG BC420 12-87

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 8888

SIP

Eree 0e5(era))e

IF L2SUBRC AND E2GROUP SPACE

IF E2GROUP2OPENED = 3 3

CALL FUNCTION 3BDC2OPEN2GROUP3

EXPORTING CLIENT = S9-MANDT

GROUP = E2GROUP

USER = E2USER

EEP = E2EEP

ltOLDDATE = E2ltDATE

E2GROUP2OPENED = 3X3

ENDIF

CALL FUNCTION 3BDC2INSERT3

EXPORTING TCODE = TCODE

TABLES D9NPROTAB = BDCDATA

ENDIF

ENDIF

REFRESlt BDCDATA

ENDFORM

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

Start e6 scree

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

FORM BDC2D9NPRO USING PROGRAM D9NPRO

CLEAR BDCDATA

BDCDATA-PROGRAM = PROGRAM

BDCDATA-D9NPRO = D9NPRO

BDCDATA-D9NBEGIN = 3X3

APPEND BDCDATA

ENDFORM

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

Isert 0ie(7

Page 36: BC420_46C - 012The Transaction Recorder

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 3688

08

983209 SAP AG 1999

Processing the Recording

Recording

Process )ith ALL TRASATI

Parameer

Proce mode$pdae mode

CA mode

e=a e

Con a=er comm

+o a B eon

nd +o a B mode

A

A

T

The recording can e eecuted directy The data from the recording is used and the transaction is

processed $ith ca transaction

2a transaction provides a range of options for caing appication transactions $hich are discussed

on the foo$ing t$o pages

copy SAP AG BC420 12-36

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 3788

03

983209 SAP AG 1999

Process mode

Update mode

ATT mode

Processing Recording )ith T 6

A

1

Displa( all screens

Displa( errors onl(

o displa(

L

S

A

Local

S(nchronous

As(nchronous

A

o ATT

ATT )ithout indiidual screen control

ATT )ith indiidual screen control

Processing mode

=ere you can specify the processing mode 9 it is the same as the processing mode for atch input

4pdate mode

=ere you can specify the update mode For more information see the unit ca transaction

2ATT mode

=ere you can mae specia settings if you $ant to test the recording under 2ATT conditions (ony

necessary for 2ATT runs) Specia functions are caed in the 2ATT too for each screen at the end of

P5 and at the start of PAI

copy SAP AG BC420 12-37

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 3888

05

983209 SAP AG 1999

Default sie

ont after commit

ot a I session

1nd$ ot a I mode

Processing Recording )ith T amp

The screen standard sie is used for the

processing

ommit )or+ does not end the processing

o I mode is actie The transaction )ill run

through as in online

I mode is selected nce the data in the D

table is processedG the I mode is set to inactie

Standard siDe

If you seect this the screens are processed in the standard siDe in the foreground (in foreground or

dispay errors ony) Note the standard siDe is a$ays used for acground processing

Further after commit

The first commit $or in a transaction does not ead to the end of the recording

Note A atch input transaction is ended $ith the first commit $or

No I mode

The system fied SC9INPT is not set (SC9INPT E ) So transactions are run through as in onine

7nd No I mode

5ny use if you choose the processing mode 7 (dispay errors ony) Then the transaction is processed in the acground in atch input mode and if there is an error the screens run through in

the foreground

copy SAP AG BC420 12-38

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 3988

07

983209 SAP AG 1999

I Mode

atch input

mode

nline

Some transactions behae differentl( in batch input mode

than in online Cbatch input capabilit(

atch input mode sets the s(stem field SIPT H

Not every transaction can run the same onine and in atch input mode The transaction must decide

itsef $hether it is caed onine or in atch input mode

The system sets the system fied SC9INPT E G if the atch input mode is active (this aso appies

to ca transaction) From this system fied the transaction can identify $hether to run onine or in

atch input mode

copy SAP AG BC420 12-39

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 4088

040

983209 SAP AG 1999

reating a Session 9rom the Recording

Recordingnl( contains the data

from the recording

Seon name 02amp

Aoraon ampBS(eep eon

oclt dae 10102000

Cou can create a atch input session directy from the recording that you can then process using the

atch input monitor

copy SAP AG BC420 12-40

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 4188

046

983209 SAP AG 1999

reating Test Data

Test Data

Recording

ranranpBC420AAe name

The file onl( contains the data from the recording

Rgt

Application Serer

Structure

Cou can create a fie from the recordingH the fie $i contain a the fieds from the recording The

fieds are added to the fie $ith the ength you specified in the definition

The fied order corresponds to the order in the recording overvie$ Technica fieds

(2356257 2324ampS5amp and so on) are incuded

The data can ony e stored on the appication server If you do not specify a path the fie is stored in

the $or directory of the appication server

If the specified test fie aready eists the ne$ data record is added to this fie

copy SAP AG BC420 12-41

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 4288

04amp

983209 SAP AG 1999

ed conen

reating a Program

Recording

ZBC420ampProram name

Transfer Program

e daa

ead =rom =e

ran=er =rom recordn

reate

9ile nameTest data

ranranpBC420AA

Cou can generate a program from the recording

In the foo$ing diaog o enter a program name In addition you can choose the type and method

for fiing the maintained fied contents from the recorded screens

4se the vaues used for the recording If you reuire feie data transfer you $i have to modify

this program ater

ParameteriDe the input vaues and read these vaues from a fie A data structure is created for

parameteriDationH the data records are read from an eterna fie into this data structure The

program assumes the fie $as taiored to this data structure

If you have decided to parameteriDe the input vaues you shoud aso create a test fie during

generation To do this seect the checo and enter a name for the fie

The attriute maintenance screen of the AAP editor appears aintain the attriutes and save the

program

copy SAP AG BC420 12-42

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 4388

04

983209 SAP AG 1999

Program 9unctions

Online

transaction

Transfer program

To

error

1rror

ption 6ption ampFlat SAP

structure

Monitor

Cou have no$ generated a data transfer program for importing data into the amp System The

program can eecute the data transfer using atch input or ca transaction

If you choose option 1 and there is an error the data record is paced into a atch input session

copy SAP AG BC420 12-43

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 4488

044

983209 SAP AG 1999

Benerating 9unction Modules

Recording

Zcreaedeor ncon mode

ncon rop

Sor eD

ZBC420

Creae comer

9unction module

nl( one data record can be processed at a time

In the net diaog o you can generate a function modue a function group and short tet from the

recording The function modue is automaticay created in the function group

copy SAP AG BC420 12-44

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 4588

042

983209 SAP AG 1999

9unction of 9unction Modules

Online

transaction

To

error

1rror

ption 6 ption amp

9unction module

Import

Parameter 1port

parameter

Tables

M1SSTA

Monitor

S$BC

Import interface

The import interface consists of a technica part and the fieds from the recording (A parameter is

created for each input fied of the recorded transactions)

7port interface

Simpy consists of the parameter S4amp2 The function modue $i return a vaue in the system

fied SC9S4amp2 after caing ca transaction This return vaue is set to Dero if the data record has

een correcty processed (5ny appies to 2T)

If a session is created you $i e notified $hether the data record coud e paced into the session

Tae interfaceThis is used ony if the function modue $ors $ith ca transaction The tae contains a the

system messages

copy SAP AG BC420 12-45

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 4688

048

983209 SAP AG 1999

Import Interface of 9unction Module

$

Technical

fields

Data

fields

BI session or CALL TRANSACTION

Processin $ode

pdate $ode

a$e oamp BI session iamp (T initial)

Bacround user iamp (T initial)

Delete session aampter processin

Loc date oamp session

ODATA indicator

TU

MD1

UPDAT1

BRUP

US1R

=11P

ELDDAT1

DATA

Cou can use parameter 2T4 to specify $hether the function modue creates a atch input session

(2T4 E ) or updates the data record directy using ca transaction (2T4 E G)

The other parameters are fied as for a atch input session header

Note 7very time the function modue is caed a atch input session is created

If the session is to contain severa transactions proceed as foo$s

ltenerate the transaction severa times This can e achieved y recording the transaction again The

function modue interface $i then contain more than one transaction -hen the function modue is

caed severa transactions can e generated for each session

copy SAP AG BC420 12-46

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 4788

043

983209 SAP AG 1999

The Transaction Recorder

PrinciplesPrinciples

Recording )ith the LSMWRecording )ith the LSMW

Principles of atch Input and all TransactionPrinciples of atch Input and all Transaction

Integrating the TA Program into the DWIntegrating the TA Program into the DW

Using the TA Recorder Using the TA Recorder

copy SAP AG BC420 12-47

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 4888

045

983209 SAP AG 1999

Benerated Program

9unction modules DltP1ltBRUP

DltIS1RT

DltLS1ltBRUP

AAP Program

Define structure of

data in seJuential

fileDefine D

table

pen seJuential file

pen I session

Read data recordCseJuential file

9ill D table

9ill I session gtALL TRASATI

Last data record K

lose I session

lose seJuential file

The generated program has the structure dispayed aove It uses the standard function modues for

creating atch input sessions

copy SAP AG BC420 12-48

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 4988

047

983209 SAP AG 1999

Structure of the Benerated Program

Benerated part

Define D

table

pen seJuential file

pen I session

Read data record

9ill D table

9ill I session gtALL TRASATI

Last data recordK

lose I session

lose seJuential file

Include DR16

Define filestructure

P1ltDATAS1T

P1ltBRUP

DltDPR

Dlt9I1LD

DltTRASATI

LS1ltBRUP

LS1ltDATAS1T

The generated program consists of t$o parts 9 a generated part and the incude 2amp72G8 The

incude is provided in the standard system

The incude contains the definition of the reuired 2 tae and a further seven suroutines These

suroutines eecute the foo$ing functions

5pen and cose fie

5pen and cose session

Fi 2 tae

Fi session

The generated part is the main program and cas the reevant suroutines A structure is aso

generated in the generated part to read the eterna data into the fie

See the Appendi for more information on the 2amp72G8 program

copy SAP AG BC420 12-49

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 5088

020

983209 SAP AG 1999

Structure of D Table

PRBRAM DPR D1BI 9AM 9ALPRBRAMPRBRAM DPRDPR D1BID1BI 9AM9AM 9AL9AL

SAPM90ampD 0602

R90ampD=UR 600000

R90ampDU=RS 0006

R90ampD=T=D =UA

SAPM90ampD 0660

=A6AM16 Smith

=A6PSTL 87000

=A6LAD6 US

=A6SPRAS 1

SAPM90ampD 06amp0

=A6ST1B US6amp428357DDATA

PRBRAM

DPR

D1BI

9AM

9AL

EAR

UM

EAR

EAR

EAR

40

4

6

6amp

6amp

D Module pool

D Screen number

D Start of screen

D 9ield name

D 9ield contents

9ield ame T(pe Length Short Tet

AAP Dictionar(

The 2 tae has the same structure as in a standard transfer

copy SAP AG BC420 12-50

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 5188

026

983209 SAP AG 1999

Read Structure

Recording

DATA BEGIN OF record data element BUKRS bukr$amp data element KTOKD ktokd$amp data element NA(EG) name$+amp data element SORT ortl$ampEND OF record-

record

Automaticall( generated

from recording

The structure of the fie is automaticay generated and is a$ays defined $ith the name amp725amp

The generated structure a$ays has the same ayout 7ach fied is defined y t$o generated ro$s

The first ro$ is a$ays a comment ro$ containing the tet J data eement and the data eement of

the screen fied from the recording In the net ro$ the fied itsef is defined $ith the name of the

data eement foo$ed y a three9digit position numer $hich specifies the ocation in the structure

The ength of the fied is set y the ength of the data eement If a fied is not defined through a data

eement the system uses the ength of the screen fied

copy SAP AG BC420 12-51

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 5288

02amp

983209 SAP AG 1999

pening and losing the 9ile

P1ltDATAS1T

LS1ltDATAS1T

FOR( oendataet USING dataet-O)EN DATASET dataet IN TET (ODE-

IF S01SUBR2 34 - 5RITE 6 te7t1e S01SUBR2-STO)-

ENDIF-

ENDFOR(-

FOR( cloedataet USING dataet-2OSE DATASET dataet-

ENDFOR(-

Include

DR16

The suroutine 5P7N3ATAS7T opens the seuentia fie

The suroutine 2+5S73ATAS7T coses the seuentia fie

copy SAP AG BC420 12-52

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 5388

02

983209 SAP AG 1999

9unction Modules for I Program

lient

Session name

Eold date

=eep session

D user name

RecordK

LI1T

BRUP

ELDDAT1

=11P

US1R

R1RD

DltP1ltBRUPDltP1ltBRUP

Transaction code

D table

TD1

DPRTA

DltIS1RTDltIS1RT

DltLS1ltBRUPDltLS1ltBRUP

pen Isessionpen Isession

Insert data for

transactions

Insert data for

transactions

lose I

session

lose I

session

The foo$ing function modues are provided for creating atch input sessions (function group

S2)

235P7N3ltamp54P

2reates a ne$ session and contains genera data for the $hoe session

23INS7ampT

Inserts a the data for a transaction into the session The transferred interna tae $ith the

structure 2ATA must contain a the data reuired for fuy processing the transaction

232+5S73ltamp54P

2oses the session after a the data has een inserted As soon as the session has een cosed it

can e processed

The interna tae $ith the structure 2ATA can ony contain atch input data for one singe

transaction run So the individua transactions are inserted into the atch input session in a oop

using severa 23INS7ampT cas

copy SAP AG BC420 12-53

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 5488

024

983209 SAP AG 2001

9unction Module DltP1ltBRUP

ALL 9UTI DltP1ltBRUPALL 9UTI DltP1ltBRUP

1PRTIB

LI1T client

BRUP session name

ELDDAT1 loc+ date

=11P delete flag

US1R bdc user name

R1RD recording

IMPRTIB

NID internal session +e(

11PTIS

1PRTIB

LI1T client

BRUP session name

ELDDAT1 loc+ date

=11P delete flag

US1R bdc user name

R1RD recording

IMPRTIB NID internal session +e(

11PTIS

-ith the function modue 235P7N3ltamp54P you can open a atch input session

The foo$ing parameters are mandatory

2+I7NT (cient)

ltamp54P (session name)

4S7amp (user name)

Note The 4S7amp must a$ays e specified This user name is reuired for processing the session

in atch mode

The foo$ing parameters are optiona

=5+AT7 specifies the eariest date on $hich the session can e started677P fag specifies $hether session shoud e deeted after it has een successfuy processed The

677P fag is ignored if the session contains errors

677P E K K means deete the session after processing (defaut vaue) H

677P E KGK means do not deete session

amp725amp E KGK ao$s you to create a recording instead of a I session

If gtI is specified the function modue returns the interna session ey This is needed to e ae to

differentiate sessions that have the same name

-ith 7G27PTI5NS you get various return vaues that can e ueried $ith SC9S4amp2

Note In onine mode the onine user is used for the authoriDation checs regardess of the user

name specified

copy SAP AG BC420 12-54

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 5588

022

983209 SAP AG 1999

Subprogram P1ltBRUP

P1ltBRUP

FOR( oen8rou-IF e9on -

2A FUN2TION BD2O)ENGROU) E)ORTING 2IENT lt1mandt GROU) 8rou USER uer KEE) kee

=ODDATE gtolddate-

ENDIF-ENDFOR(-

Include

DR16

The suprogram 5P7N3ltamp54P opens the atch input session

copy SAP AG BC420 12-55

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 5688

028

983209 SAP AG 1999

9unction Module DltIS1RT

ALL 9UTI DltIS1RTALL 9UTI DltIS1RT

IMPRT

TD1 Transaction code

PSTltLAL Update locall(

PRITIB print list

TAL1S DPRTA bdclttable

11PTIS

IMPRT

TD1 Transaction code

PSTltLAL Update locall(

PRITIB print list

TAL1S DPRTA bdclttable

11PTIS

-ith the function modue 23INS7ampT you can add transaction data to the session

Cou need an interna 2 tae to transfer the data

The foo$ing parameters are mandatory

T257 Transaction code

CNPamp5TA 2 tae

The foo$ing parameters are optiona

P5ST3+52A+ E KGK activates oca updating This means that the data to e updated is ept in the

appication server and updated in the ast step of the transaction This does not invove the update

process (For more information see course 28 Programming ataase 4pdates)

PampINTINlt E KGK 9 ists processed in I $i e printed immediatey -ith 7G27PTI5NS you get various return vaues that can e ueried $ith SC9S4amp2

copy SAP AG BC420 12-56

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 5788

023

983209 SAP AG 1999

Subprogram DltTRASATI

DltTRASATI

FOR( BD2TRANSA2TION USING tcode-

IF e9on -2A FUN2TION BD2INSERT

E)ORTING T2ODE tcode TABES D0N)ROTAB bdcdata-

ESE-

ENDIF-ENDFOR(-

T

Include

DR16

The suprogram 23TampANSA2TI5N moves the fied 2 tae either to a atch input session

or uses ca transaction to import the data into the system 5n the seection screen you can specify

$hether you $ant to create a session or you $ant to use ca transaction to process the data directy

The S7SSI5N fied is then set according to your seection

copy SAP AG BC420 12-57

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 5888

025

983209 SAP AG 1999

9unction Module DltLS1ltBRUP

ALL 9UTI DltLS1ltBRUP

11PTIS

TltP1 6

NU1U1lt1RRR amp

-ith the function modue 232+5S73ltamp54P you can cose a atch input session

In 7G27PTI5NS you get various return vaues that can e ueried $ith SC9S4amp2

copy SAP AG BC420 12-58

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 5988

027

983209 SAP AG 1999

Subprogram LS1ltBRUP

FOR( cloe8rou-IF e9on -cloe batcgt 9nut 8rou

2A FUN2TION BD22OSEGROU)-

ESE-IF e8rouoened -

2A FUN2TION BD22OSEGROU)-

ENDIF-ENDIF-

ENDFOR(-

LS1ltBRUPlose session

lose error session

Include

DR16

The suprogram 2+5S73ltamp54P coses the atch input session The suprogram differentiates

et$een a norma I session (S7SSI5N E G) and a session opened $hen ca transaction

encountered an error (73ltamp54P35P7N7 E G)

copy SAP AG BC420 12-59

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 6088

080

983209 SAP AG 1999

Subprograms DltDPRG Dlt9I1LD

DltDPR

Dlt9I1LD

FOR( bdc9eld USING nam al-IF al 34 nodata-2EAR bdcdata- bdcdata1nam nam- bdcdata1al al- A))END bdcdata-ENDIF-

ENDFOR(-

FOR( bdcdltnro USING ro8ram dltnro- 2EAR bdcdata-Bdcdata1ro8ram ro8ram-Bdcdata1dltnro dltnro-Bdcdata1dltnbe89n - A))END bdcdata-ENDFOR(-

Include

DR16

The incude 2amp72GG contains t$o suprograms 23CNPamp5 and 23FI7+

Suprogram 23CNPamp5 fis the 2 tae $ith program names and screen numers

Suprogram 23FI7+ fis the 2 tae $ith fied names and vaues

7ach suprogram creates an entry in the 2 tae

copy SAP AG BC420 12-60

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 6188

086

983209 SAP AG 1999

9illing the D Table

erorm bdcdltnro u9n8 SA)(FD +- erorm bdc9eld u9n8 BD22URSOR RFD1BUKRS- erorm bdc9eld u9n8 BD2OK2ODE 6- erorm bdc9eld u9n8 RFD1BUKRS record1BUKRS- erorm bdc9eld u9n8 RFD1KTOKD record1KTOKD-

erorm bdcdltnro u9n8 SA)(FD -

erorm bdc9eld u9n8 BD22URSOR KNA1S)RAS- erorm bdc9eld u9n8 BD2OK2ODE 6- erorm bdc9eld u9n8 KNA1NA(E record1NA(E-

erorm bdc9eld u9n8 KNA1SORT record1SORT-

Recording Benerated automaticall(

from the recording

)ERFOR( bdcdltnro USING SA)(FD +- )ERFOR( bdc9eld USING BD22URSOR RFD1BUKRS-)ERFOR( bdc9eld USING BD2OK2ODE 6-)ERFOR( bdc9eld USING RFD1BUKRS record1BUKRS-)ERFOR( bdc9eld USING RFD1KTOKD record1KTOKD-

)ERFOR( bdcdltnro USING SA)(FD -

)ERFOR( bdc9eld USING BD22URSOR KNA1S)RAS-)ERFOR( bdc9eld USING BD2OK2ODE 6-)ERFOR( bdc9eld USING KNA1NA(E record1NA(E-

)ERFOR( bdc9eld USING KNA1SORT record1SORT- ---

The 2 tae is fied $ith data from the recording The suroutines 23CNPamp5 and

23FI7+ are used for this

The suroutines are caed in the reuired structure or seuence

copy SAP AG BC420 12-61

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 6288

08amp

983209 SAP AG 1999

erie)

SAPDatabase

SeJuential9ile

SAPDatabase

ALL TRASATIALL TRASATI

SeJuential9ile

ATE IPUTATE IPUT

D TableD TableD TableD Table

I Monitor

T

In contrast to atch input you can use ca transaction to directy pass data to the diaog interface

$ithout using a atch input session Cou use an interna tae (2 tae same structure and ayout

as atch input) to temporariy store your screen data Then you ca the desired transaction in your

program

Note 5n average the 2a Transaction method is 8 to times faster than using atch Input

copy SAP AG BC420 12-62

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 6388

08

983209 SAP AG 1999

all Transaction Program$ 1ample

RE)ORT abcbdcdcdeb9ct-

)ARA(ETERS d9mode DEFAUT A

udmode DEFAUT S-FOR( calltranact9on-2A TRANSA2TION FD

USING bdcdata (ODE d9mode

U)DATE udmode-

IF lt1ubrc NE - 5RITE 6 ---

ENDIF-ENDFOR(-

Screen

00

Screen

100

Screen

An additiona system ro area is added for the caed transaction The system uses this area for

processing the individua screens in the transactionH the data from the tae is added here After the

transaction is processed the second ro area is reeasedH the system continues processing in the first

ro area

Notes

In contrast to atch input there is no error ogging (error sessions) here For processing the caed

transaction the system uses the authoriDations of the user that caed the transaction The 2 tae

can ony hod data for one transaction run at a time efore another transaction is caed and its data

can e added you must eecute a amp7Famp7S= for the 2 tae

copy SAP AG BC420 12-63

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 6488

084

983209 SAP AG 1999

ALL TRASATI C6

RE)ORT 777-

2A TRANSA2TION FD USING bdcdata (ODE E-

Default for MD1 is A

2A TRANSA2TION 3tranact9oncode4 USING 3bdc1table4 C (ODE A E N C-

-ith the parameter 57 you can seect a specific dispay mode for processing the transaction The

foo$ing three modes are avaiae

A (ispay a)

If you eecute the program a the screens and a their data are dispayed This is the defaut vaue

for the 57 in 2A++ TampANSA2TI5N

N (ispay nothing)

The screens are not dispayed at a regardess of $hether any of them contained errors As soon as

the transaction has een fuy processed contro is returned to your program (The vaue of the

parameter 4PAT7 determines $hether dataase updates are eecuted or not)

7 (ispay errors ony)As soon as an error occurs in a screen the transaction is s$itched to dispay mode so that you can

correct the errors

These dispay modes are the same as those in the atch input session processing

copy SAP AG BC420 12-64

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 6588

082

983209 SAP AG 1999

RE)ORT 777-

2A TRANSA2TION FD USING BD2DATA U)DATE -

ALL TRASATI Camp

RE)ORT 777-

2A TRANSA2TION FD USING bdcdata U)DATE -

2A TRANSA2TION 3tranact9oncode4 USING 3bdc1table4 C (ODE A E N C U)DATE A S C -

Default for UPDAT1 is A

-ith the parameter 4PAT7 you can contro ho$ dataase updates arising from a transaction are

carried out There are three options

A (asynchronous updating) The caed transaction does not $ait unti the dataase has een

updated it simpy for$ard the updates to the SAP update service This usuay speeds up the 2T

program This processing mode is N5T recommended for arge data sets as the caed transaction

does not receive a competion message from the update modue

The caing 2T program therefore cannot te if the transaction has een successfuy competed Cou

shoud use the updating administration function (transaction S8) to determine $hether updating

$as terminated eary The error anaysis correction functions for are ess hepfu than $ith

synchronous updating

S (synchronous updating) -ith synchronous updating the caed transaction $aits unti a the

updates have een competed So processing is so$er than $ith synchronous updating The caed

transaction can ho$ever report any updating errors to the program $hich maes error

anaysiscorrection easier

+ (local updating) $ith oca updating the dataase is not updated in a separate process it is

updated in the caers process (see appication hep documentation for the AAP ey$ord S7T

4PAT7 TAS6 +52A+)

copy SAP AG BC420 12-65

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 6688

088

983209 SAP AG 1999

ALL TRASATI C

RE)ORT 777-DATA mtab T0)E TABE OF bdcm8coll-

2A TRANSA2TION FD USING bdcdata (ESSAGES INTO mtab-

2A TRANSA2TION 3tranact9oncode4 USING 3bdc1table4 C (ODE A E N C U)DATE A S C (ESSAGES INTO 3metab4 C -

7SSAlt7S specifies that a system messages that are output during the eecution of a 2A++

TampANSA2TI5N are $ritten to the interna tae L7SSTA The interna tae must have the

structure 2Slt25++

4nie the cassica atch input processing $ith sessions 2A++ TampANSA2TI5N does not offer any

specia processing procedures for transactions containing errors There are no restart functions for

transactions that contain errors or that cause updating terminations

copy SAP AG BC420 12-66

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 6788

083

983209 SAP AG 1999

ALL TRASATI C4

RE)ORT 777-DATA mltot T0)E ctuaram-

2A TRANSA2TION FD USING BD2DATA

O)TIONS FRO( mltot-

2A TRANSA2TION 3tranact9oncode4 USING 3bdc1table4 C (ODE A E N C U)DATE A S C (ESSAGES INTO 3metab4 C O)TIONS FRO( ot C -

RE)ORT 777-DATA mltot T0)E ctuaram-2A TRANSA2TION FD USING bdcdata

O)TIONS FRO( mltot-

The addition 5PTI5NS enaes the ca transaction statement to e controed through a structure

The structure must have the dictionary type 2T43PAampAS

The addition 5PTI5NS Famp5 must not e comined either $ith the addition 57 or $ith

4PAT7 ore information on the net side

copy SAP AG BC420 12-67

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 6888

085

983209 SAP AG 1999

Structure TUltPARAMS

DISMD1 Procen mode anaoo o addon amp

UPDMD1 $pdae mode anaoo o addon $PA

ATTMD1 CA mode CA conro

D19SI1 orce de=a EndoE e drn procen

RAMMIT +o eD a Camp amp(

IPT +o a ac np eonF a F S-B+P SPAC

I1D +o a ac np eon a=er end o= BC daa

The components are defined as foo$s

The components 7FSIM7 ampA25IT N5INPT and N5I7N can have the foo$ing

vaues KGK E Ces or K K E No

If the addition 5PTI5NS Famp5 is not specified the foo$ing settings appy to the contro

parameters

IS57 from addition 57

4P57 from addition 4PAT7

2ATT57 2ATT not active

7FSIM7 o not not use defaut $indo$s siDe

ampA25IT Successfu eit at 25IT -5amp6

N5INPT atch input session active (SC9INPT E G)

N5I7N atch input session sti active after end of 2 data

copy SAP AG BC420 12-68

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 6988

087

983209 SAP AG 1999

SMSBID Message ID

SMSBT Message T(pe C1GIGWGSGA

SMSB Message umber

SMSB6 Message ariable 6

SMSBamp Message ariable amp

SMSB Message ariable

SMSB4 Message ariable 4

SMSBID Message ID

SMSBT Message T(pe C1GIGWGSGA

SMSB Message umber

SMSB6 Message ariable 6

SMSBamp Message ariable amp

SMSB Message ariable

SMSB4 Message ariable 4

Return code$

S(stem fields$

alue Meaning

0 Successful

6000 1rror in transaction

6000 1rror in processing call transaction

see also the s(stem fields specified

alue Meaning

0 Successful

6000 1rror in transaction

6000 1rror in processing call transaction

see also the s(stem fields specified

9ield name Meaning9ield name9ield name MeaningMeaning

Return ode and S(stem 9ields

The return code is used to specify $hether the caed transaction $as processed successfuy In

addition severa system fieds are fied The numer I type and variaes of the diaog message

output y the caed transaction Cou need this information to output the message tet

copy SAP AG BC420 12-69

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 7088

030

983209 SAP AG 1999

Benerated Program of the TA Recorder

REFRES= (ESSTAB-

2A TRANSA2TION tcode USING bdcdata (ODE ctumode U)DATE cudate (ESSAGES INTO metab-OO) AT metab- ENDOO)-IF lubrc 34 AND e8rou 34 S)A2E- IF e8rouoenend - 2A FUN2TION BD2O)ENGROU) E)ORTING ---------

--------- E8rouoened - ENDIF- 2A FUN2TION BD2INSERT E)ORTING T2ODE tcode TABES D0N)ROTAB bdcdata-ENDIF-REFRES= bdcdata-

Message table output

pen error session

Insert data record that

has errors into error

session

If you have seected ca transaction on the seection screen the generated program runs as foo$s

The onine transaction is caed $ith ca transaction and passed to tae 2ATA A the

messages arising during the ca transaction are put in the interna tae 7SSTA

7SSTA is output as a ist

If you have specified an error session ( 73ltamp54P L SPA27) on the seection screen and the

ca transaction comes across an error (+3S4amp2 L 0) the error session is opened The error

session is ho$ever ony opened once Then the data record is paced in the session

A the other data records that have errors $ith ca transaction are paced in the same session

copy SAP AG BC420 12-70

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 7188

036

983209 SAP AG 1999

The Transaction Recorder

PrinciplesPrinciples

Recording )ith the LSMWRecording )ith the LSMW

Principles of atch Input and all TransactionPrinciples of atch Input and all Transaction

Integrating the TA Program into the DWIntegrating the TA Program into the DW

Using the TA Recorder Using the TA Recorder

copy SAP AG BC420 12-71

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 7288

03amp

983209 SAP AG 1999

Integrating into the DW

Transfer program

AAP Dictionar(

Integrate

SDA0

SDA6

SDAamp

SDA

Cou can integrate the generated program into the G9- The structure of the fie must e created

in the AAP ictionary The taes SGA0 SGA8 SGA1 and SGA $i e fied

copy SAP AG BC420 12-72

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 7388

03

983209 SAP AG 1999

DW Release 42

Goo

-B eeae 45

aa ran=er ogtec

Int customer data transfer ob-ect

ecord =ed

Dece daa ran=er

d Goo

The ampunction ampor interatin TA recorder prora$s is

i$ple$ented in the

D+-B in Release

The recorder can e integrated as of ampeease and it is provided in the G9- ampeease

ltot to the G9- ampeease 5n the initia screen you can integrate programs y choosing ampoto

( +nt customer ata transfer o-ect

copy SAP AG BC420 12-73

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 7488

034

983209 SAP AG 1999

reating Program as D b-ect

Comer ran=er ogtec

ampgtec ype

Sor eD =or ogtec

aa ran=er proram

Srcre name

9900

(+A1

Cane comer

ZBCA+G

ZB

ustomer transfer ob-ect

umber bet)een 7000 and 7777

b-ect t(pe

Assignment to R ob-ect

Short tet for D ob-ectShort description

Data transfer program

ame of generated program

Structure name

A structure Cstructure la(out )ith this name is created in

the AAP Dictionar(

For ampeease transfer oects $ere not organiDed y 5amp oects ut y a G numer (00089

OOOO) The numer range O0009OOOO is reserved for customers

To create a connection to the ne$ G 9- you must assign the program to a 5amp oect

2reate a short tet for the G oect This tet $i appear in the method seection ist

Specify the program to e incuded

Specify a name for the structure to e created in the AAP ictionary

Note $he generated program appears under program type +N and not under program type

-

copy SAP AG BC420 12-74

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 7588

032

983209 SAP AG 1999

Adantages

Automatic program registration in the DW in

Release 48

ou can use all the functions defined for

standard ob-ects

1ception$ The (reate ampile ith data

function

If you incuded the oect in the ampeease $orench it is automaticay avaiae in the ampeease

B $orench

A the $orench functions are avaiae for your oect ecept for Create files ith transfer ata

copy SAP AG BC420 12-75

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 7688

038

983209 SAP AG 1999

ou are no) able to$

The Transaction Recorder$ Unit Summar(

Use the recording function in the LSMW to create

a batch input session )ith the data from the

eternal s(stem

Use the TA Recorder to create (our o)n data

transfer program

Anal(e programs that )or+ )ith batch input or

call transaction

Integrate the TA Recorder programs into the

DW

copy SAP AG BC420 12-76

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 7788

ercise 1

nit $ -ecorder

$opic 2reating etors

$ransaction -ecorder ercise 1

bull 2reating detors $ith eterna numer assignment

bull etor numers M9980008 to M9980080

Address data for detors $ith eterna numer assignment is to

e transferred using program ampFI700

ro4ect F5

Supro4ect +5

-un +575

$as)s 85 95 8S25

9oad program -F+00

8 In the foo$ing eercises eisting data is to e changed Therefore these detors $ith

eterna numer assignment have to first e created

898 4nder suproect 79 create run 797G9 $ith the name Detors ith

eternal numers

copy SAP AG BC420 12-77

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 7888

891 2reate the foo$ing three tass The tass map the foo$ing process steps

convert data create + session and process + session

89198 In run 797G9 create the foo$ing tas

9 Tas AP9

9 Name 2onvert data 9 Tas type AP

9 Program type +S-

Seect the foo$ing +S- oect

+S- proect 2109

+S- suproect 7I9

+S- oect I997GT

89191 In run 797G9 create the foo$ing tas 9 Tas +5A9

9 Name 2reate I session

Tas type +5A

9 Program type INP

Seect program ampFI700 $ith the variant

I97G9

8919 In run 797G9 create the foo$ing tas

9 Tas S29

9 Name Process I session Tas type S2

9 Program type amp7P5

Seect program ampS2S4 $ith the variant

S497G9

Note that you have to correct the seuence of the tass 2onvert data

create + session and process + session

4se the uttons

89 Start the run

The detors $i e created $ith eterna numer assignments

89 2hec in transaction F0 that the detors M9980008 to M9980080 have een

created

copy SAP AG BC420 12-78

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 7988

ercise

nit $ransaction -ecorder

$opic -ecording function in the 9S8(

bull 2reate a recording using the +S-

bull ltenerate a atch input session

2hange the detor address data in the amp System

Name of the recording +

Name of the file +2055+F9

8 2reate the recording 7I3 using the +S- ampecord the transaction F01 (2hange

detor)

898 efore you create the recording first test the transaction onineQ

For the recording use detor M9980008 5n the initia screen of the F01

maintain the foo$ing fieds ony

etor etor M9980008

2ompany code 0008

Address data seect

Note $he data record must e saved hile recording

891 aintain the names and the descriptions for the foo$ing fieds

Name city street posta code and teephone numereete a other fieds in screen 880 from the recording (eg S5ampT+ +AN8

SPampAS)

4se the same technica names as sho$n in the tae eo$ (automatic fied

mapping)

copy SAP AG BC420 12-79

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 8088

1 2reate the suproect 7I9 and the ne$ oect TA3 in your proect 2109

aintain the oect attriutes and seect the item atch input recording Seect your

recording 7I3

2reate the source structure address

2reate the source fieds according to the tae eo$ 5r copy them from proect 2109S37N suproect 7I900 oect TA900

198 Fie setup The data from the egacy system are dispayed in the foo$ing tae

Fied name Fied type Fied ength escription

N5 2 8B etor numer

NA7 2 Name

STamp77T 2 Street

2ITC 2 2ityPace of residence

MIP 2 80 Posta code

T7+ 2 8B Teephone numer

191 aintain the fied mapping 4se the automatic fied mapping (via menu item

7tras)

19 Specify the fies 5ny maintain the fie name of the source fie

Name of the fie 21099IFI+7

2odepage 8800

19 Import the data and convert them ispay the data in each caseQ

19 2reate a atch input session

19B ampun the atch input session

copy SAP AG BC420 12-80

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 8188

ercise 3

nit $ransaction -ecorder

$opic -ecording ith the $ -ecorder

bull ltenerate a recording using the TA recorder

bull Test the recording

2hange the address data of detors in the amp system

Name recording $+

Name of the file +2055+F9

8 2reate the recording TA37I3 using the transaction recorder ampecord the

transaction F01 (change detor)

898 4se detor M9980008 for the recording 5n the F01 initia screen ony

maintain the foo$ing fieds

etor etor M9980008

2ompany 2ode 0008

Address data seect

Note $he data record must e saved hen recording

eete a fieds that do not eist in the source fie 21099IFI+7 from screen

880 in the recording (eg 6NA89S5ampT+ 6NA89+AN8 6ANNQ9SPampAS) Note o not deete fieds ampF01946ampS and ampF0190880

Save the recording no$

1 S$itch to the recordings overvie$

198 Process the recording $ith the processing mode A (dispay a)

191 Process the recording $ith the processing mode RN (no dispay)

19 If the recording has een tested and no error has occurred generate a I session

and run it using the I monitor If an error shoud occur generate the recordingagainQ

copy SAP AG BC420 12-81

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 8288

From the recording generate the program M21037I3 in your deveopment cass

2109 Seect the foo$ing

bull ampead fied contents from fie

bull 2reate test data in the fie 2103dei3test3tt

98 Save this program and eecute it ltenerate one I session each and process it

2arry out the same steps again using the ca transaction

The generated program shoud no$ e changed so that fie 21099IFI+7 can e

read and processed

98 2hange the defaut vaue of the fie name (parameter dataset) in 21099

IFI+7

91 2hange the structure definition eete the company code fied and the address

data checo from the structure

9 2hange the su9routine ca perform dc3fied for the company code (KampF019

46ampSK) so that the vaue 0008 is transferred

9 2hange the su9routine ca perform dc3fied for the address data checo

(KampF0190880K) so that the vaue G is transferred

9 Start the program again and read the data from the fie 21099IFI+7 $ith

detor data ltenerate a I session $ith it and run it

copy SAP AG BC420 12-82

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 8388

033 Include DR16INCLUDE BDCRECX1

SELECTION-SCREEN BEGIN OF LINE

PARAMETERS SESSION RADIOBUTTON GROUP CTU create sessi SELECTION-SCREEN COMMENT $amp TEXT-S FOR FIELD SESSION

se(ecti-scree )siti +

PARAMETERS CTU RADIOBUTTON GROUP CTU ca(( trasacti

SELECTION-SCREEN COMMENT $amp TEXT-S FOR FIELD CTU

SELECTION-SCREEN END OF LINE

SELECTION-SCREEN BEGIN OF LINE

SELECTION-SCREEN COMMENT $amp TEXT-S1 FOR FIELD GROUP

se(ecti-scree )siti $+

PARAMETERS GROUP1$amp r) ae 0 sessi

SELECTION-SCREEN COMMENT $amp TEXT-S+ FOR FIELD CTUMODE

se(ecti-scree )siti

PARAMETERS CTUMODE LIE CTU2PARAMS-DISMODE DEFAULT 3N3

A4 s56 a(( 78)rs

E4 s56 78)r errr (8

N4 7 t 7is)(a8 78)r

SELECTION-SCREEN END OF LINE

SELECTION-SCREEN BEGIN OF LINE

SELECTION-SCREEN COMMENT $amp TEXT-S$ FOR FIELD USER

se(ecti-scree )siti $+

PARAMETERS4 USER1$amp DEFAULT S9-UNAME ser 0r sessi i atc5

SELECTION-SCREEN COMMENT $amp TEXT-S FOR FIELD CUPDATE

se(ecti-scree )siti

PARAMETERS CUPDATE LIE CTU2PARAMS-UPDMODE DEFAULT 3L3

S4 s8c5rs(8

A4 as8c5rs(8

L4 (ca(

SELECTION-SCREEN END OF LINE

SELECTION-SCREEN BEGIN OF LINE

SELECTION-SCREEN COMMENT $amp TEXT-S FOR FIELD EEP

se(ecti-scree )siti $+

PARAMETERS4 EEP AS CltECBOX 3 3 = 7e(ete sessi i0 0iis5e7

3X3 = gtee) sessi i0 0iis5e7

SELECTION-SCREEN COMMENT $amp TEXT-S FOR FIELD E2GROUP

copy SAP AG BC420 12-83

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 8488

se(ecti-scree )siti

)araeters E2GROUP1$amp r) ae 0 errr-sessi

SELECTION-SCREEN END OF LINE

SELECTION-SCREEN BEGIN OF LINE

SELECTION-SCREEN COMMENT $amp TEXT-S FOR FIELD ltOLDDATE

se(ecti-scree )siti $+

PARAMETERS4 ltOLDDATE LIE S9-DATUM

SELECTION-SCREEN COMMENT +11amp TEXT-S$ FOR FIELD E2USER

se(ecti-scree )siti

PARAMETERS4 E2USER1$amp DEFAULT S9-UNAME ser 0r errr-sessi

SELECTION-SCREEN END OF LINE

SELECTION-SCREEN BEGIN OF LINE

SELECTION-SCREEN COMMENT +11amp TEXT-S FOR FIELD E2EEP

se(ecti-scree )siti

PARAMETERS4 E2EEP AS CltECBOX 3 3 = 7e(ete sessi i0 0iis5e7

3X3 = gtee) sessi i0 0iis5e7

SELECTION-SCREEN END OF LINE

SELECTION-SCREEN BEGIN OF LINE

SELECTION-SCREEN COMMENT +11amp TEXT-S FOR FIELD E2ltDATE

se(ecti-scree )siti

PARAMETERS4 E2ltDATE LIE S9-DATUM

SELECTION-SCREEN END OF LINE

SELECTION-SCREEN SIP

SELECTION-SCREEN BEGIN OF LINE

SELECTION-SCREEN COMMENT 1amp TEXT-S1 FOR FIELD NODATA

PARAMETERS4 NODATA DEFAULT 33 LOER CASE 7ata

SELECTION-SCREEN END OF LINE

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

Batc5i)t7ata 0 si(e trasacti

DATA4 BDCDATA LIE BDCDATA OCCURS ITlt ltEADER LINE

essaes 0 ca(( trasacti

DATA4 MESSTAB LIE BDCMSGCOLL OCCURS ITlt ltEADER LINE

errr sessi )ee7 3 3 r 3X3amp

DATA4 E2GROUP2OPENED

essae tets

TABLES4 T1

copy SAP AG BC420 12-84

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 8588

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

at se(ecti scree

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

AT SELECTION-SCREEN

r) a7 ser st e 0i((e7 0r create sessi

IF SESSION = 3X3 AND

GROUP = SPACE OR USER = SPACE

MESSAGE E1MSamp

ENDIF

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

)e 7ataset

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

FORM OPEN2DATASET USING P2DATASET

OPEN DATASET P2DATASET IN TEXT MODE

IF S9-SUBRC

RITE4 TEXT-E S9-SUBRC

STOP

ENDIF

ENDFORM

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

c(se 7ataset

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

FORM CLOSE2DATASET USING P2DATASET

CLOSE DATASET P2DATASET

ENDFORM

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

create atc5i)t sessi

t 0r ca(( trasacti siamp

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

FORM OPEN2GROUP

IF SESSION = 3X3

SIP

RITE4 $amp 3Create r)3I1amp GROUP

SIP

)e atc5i)t r)

CALL FUNCTION 3BDC2OPEN2GROUP3

EXPORTING CLIENT = S9-MANDT

copy SAP AG BC420 12-85

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 8688

GROUP = GROUP

USER = USER

EEP = EEP

ltOLDDATE = ltOLDDATE

RITE4 amp 3BDC2OPEN2GROUP3I$amp

1$amp 3retrc7e43I+amp

S9-SUBRC

ENDIF

ENDFORM

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

e7 atc5i)t sessi

ca(( trasacti si4 errr sessiamp

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

FORM CLOSE2GROUP

IF SESSION = 3X3

c(se atc5i)t r)

CALL FUNCTION 3BDC2CLOSE2GROUP3

RITE4 amp 3BDC2CLOSE2GROUP3Iamp

1$amp 3retrc7e43I+amp

S9-SUBRC

ELSE

IF E2GROUP2OPENED = 3X3

CALL FUNCTION 3BDC2CLOSE2GROUP3

RITE4

RITE4 amp 3Fe5(era))e 6r7e eret3Iamp

ENDIF

ENDIF

ENDFORM

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

Start e6 trasacti accr7i t )araeters

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

FORM BDC2TRANSACTION USING TCODE

DATA4 L2MSTRINGamp

DATA4 L2SUBRC LIE S9-SUBRC

atc5 i)t sessi

IF SESSION = 3X3

CALL FUNCTION 3BDC2INSERT3

EXPORTING TCODE = TCODE

TABLES D9NPROTAB = BDCDATA

RITE4 3BDC2INSERT3Iamp

copy SAP AG BC420 12-86

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 8788

TCODE

3retrc7e43I+amp

S9-SUBRC

3RECORD43

S9-INDEX

ca(( trasacti si

ELSE

REFRESlt MESSTAB

CALL TRANSACTION TCODE USING BDCDATA

MODE CTUMODE

UPDATE CUPDATE

MESSAGES INTO MESSTAB

L2SUBRC = S9-SUBRC

RITE4 3CALL2TRANSACTION3

TCODE

3retrc7e43I+amp

L2SUBRC

3RECORD43

S9-INDEX

LOOP AT MESSTAB

SELECT SINGLE FROM T1 ltERE SPRSL = MESSTAB-MSGSPRA

AND ARBGB = MESSTAB-MSGID

AND MSGNR = MESSTAB-MSGNR

IF S9-SUBRC =

L2MSTRING = T1-TEXT

IF L2MSTRING CS 313

REPLACE 313 ITlt MESSTAB-MSGH1 INTO L2MSTRING

REPLACE 3$3 ITlt MESSTAB-MSGH$ INTO L2MSTRING

REPLACE 33 ITlt MESSTAB-MSGH INTO L2MSTRING

REPLACE 33 ITlt MESSTAB-MSGH INTO L2MSTRING

ELSE

REPLACE 33 ITlt MESSTAB-MSGH1 INTO L2MSTRING

REPLACE 33 ITlt MESSTAB-MSGH$ INTO L2MSTRING

REPLACE 33 ITlt MESSTAB-MSGH INTO L2MSTRING

REPLACE 33 ITlt MESSTAB-MSGH INTO L2MSTRING

ENDIF

CONDENSE L2MSTRING

RITE4 MESSTAB-MSGT9P L2MSTRING$+amp

ELSE

RITE4 MESSTAB

ENDIF

ENDLOOP

copy SAP AG BC420 12-87

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 8888

SIP

Eree 0e5(era))e

IF L2SUBRC AND E2GROUP SPACE

IF E2GROUP2OPENED = 3 3

CALL FUNCTION 3BDC2OPEN2GROUP3

EXPORTING CLIENT = S9-MANDT

GROUP = E2GROUP

USER = E2USER

EEP = E2EEP

ltOLDDATE = E2ltDATE

E2GROUP2OPENED = 3X3

ENDIF

CALL FUNCTION 3BDC2INSERT3

EXPORTING TCODE = TCODE

TABLES D9NPROTAB = BDCDATA

ENDIF

ENDIF

REFRESlt BDCDATA

ENDFORM

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

Start e6 scree

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

FORM BDC2D9NPRO USING PROGRAM D9NPRO

CLEAR BDCDATA

BDCDATA-PROGRAM = PROGRAM

BDCDATA-D9NPRO = D9NPRO

BDCDATA-D9NBEGIN = 3X3

APPEND BDCDATA

ENDFORM

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

Isert 0ie(7

Page 37: BC420_46C - 012The Transaction Recorder

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 3788

03

983209 SAP AG 1999

Process mode

Update mode

ATT mode

Processing Recording )ith T 6

A

1

Displa( all screens

Displa( errors onl(

o displa(

L

S

A

Local

S(nchronous

As(nchronous

A

o ATT

ATT )ithout indiidual screen control

ATT )ith indiidual screen control

Processing mode

=ere you can specify the processing mode 9 it is the same as the processing mode for atch input

4pdate mode

=ere you can specify the update mode For more information see the unit ca transaction

2ATT mode

=ere you can mae specia settings if you $ant to test the recording under 2ATT conditions (ony

necessary for 2ATT runs) Specia functions are caed in the 2ATT too for each screen at the end of

P5 and at the start of PAI

copy SAP AG BC420 12-37

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 3888

05

983209 SAP AG 1999

Default sie

ont after commit

ot a I session

1nd$ ot a I mode

Processing Recording )ith T amp

The screen standard sie is used for the

processing

ommit )or+ does not end the processing

o I mode is actie The transaction )ill run

through as in online

I mode is selected nce the data in the D

table is processedG the I mode is set to inactie

Standard siDe

If you seect this the screens are processed in the standard siDe in the foreground (in foreground or

dispay errors ony) Note the standard siDe is a$ays used for acground processing

Further after commit

The first commit $or in a transaction does not ead to the end of the recording

Note A atch input transaction is ended $ith the first commit $or

No I mode

The system fied SC9INPT is not set (SC9INPT E ) So transactions are run through as in onine

7nd No I mode

5ny use if you choose the processing mode 7 (dispay errors ony) Then the transaction is processed in the acground in atch input mode and if there is an error the screens run through in

the foreground

copy SAP AG BC420 12-38

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 3988

07

983209 SAP AG 1999

I Mode

atch input

mode

nline

Some transactions behae differentl( in batch input mode

than in online Cbatch input capabilit(

atch input mode sets the s(stem field SIPT H

Not every transaction can run the same onine and in atch input mode The transaction must decide

itsef $hether it is caed onine or in atch input mode

The system sets the system fied SC9INPT E G if the atch input mode is active (this aso appies

to ca transaction) From this system fied the transaction can identify $hether to run onine or in

atch input mode

copy SAP AG BC420 12-39

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 4088

040

983209 SAP AG 1999

reating a Session 9rom the Recording

Recordingnl( contains the data

from the recording

Seon name 02amp

Aoraon ampBS(eep eon

oclt dae 10102000

Cou can create a atch input session directy from the recording that you can then process using the

atch input monitor

copy SAP AG BC420 12-40

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 4188

046

983209 SAP AG 1999

reating Test Data

Test Data

Recording

ranranpBC420AAe name

The file onl( contains the data from the recording

Rgt

Application Serer

Structure

Cou can create a fie from the recordingH the fie $i contain a the fieds from the recording The

fieds are added to the fie $ith the ength you specified in the definition

The fied order corresponds to the order in the recording overvie$ Technica fieds

(2356257 2324ampS5amp and so on) are incuded

The data can ony e stored on the appication server If you do not specify a path the fie is stored in

the $or directory of the appication server

If the specified test fie aready eists the ne$ data record is added to this fie

copy SAP AG BC420 12-41

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 4288

04amp

983209 SAP AG 1999

ed conen

reating a Program

Recording

ZBC420ampProram name

Transfer Program

e daa

ead =rom =e

ran=er =rom recordn

reate

9ile nameTest data

ranranpBC420AA

Cou can generate a program from the recording

In the foo$ing diaog o enter a program name In addition you can choose the type and method

for fiing the maintained fied contents from the recorded screens

4se the vaues used for the recording If you reuire feie data transfer you $i have to modify

this program ater

ParameteriDe the input vaues and read these vaues from a fie A data structure is created for

parameteriDationH the data records are read from an eterna fie into this data structure The

program assumes the fie $as taiored to this data structure

If you have decided to parameteriDe the input vaues you shoud aso create a test fie during

generation To do this seect the checo and enter a name for the fie

The attriute maintenance screen of the AAP editor appears aintain the attriutes and save the

program

copy SAP AG BC420 12-42

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 4388

04

983209 SAP AG 1999

Program 9unctions

Online

transaction

Transfer program

To

error

1rror

ption 6ption ampFlat SAP

structure

Monitor

Cou have no$ generated a data transfer program for importing data into the amp System The

program can eecute the data transfer using atch input or ca transaction

If you choose option 1 and there is an error the data record is paced into a atch input session

copy SAP AG BC420 12-43

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 4488

044

983209 SAP AG 1999

Benerating 9unction Modules

Recording

Zcreaedeor ncon mode

ncon rop

Sor eD

ZBC420

Creae comer

9unction module

nl( one data record can be processed at a time

In the net diaog o you can generate a function modue a function group and short tet from the

recording The function modue is automaticay created in the function group

copy SAP AG BC420 12-44

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 4588

042

983209 SAP AG 1999

9unction of 9unction Modules

Online

transaction

To

error

1rror

ption 6 ption amp

9unction module

Import

Parameter 1port

parameter

Tables

M1SSTA

Monitor

S$BC

Import interface

The import interface consists of a technica part and the fieds from the recording (A parameter is

created for each input fied of the recorded transactions)

7port interface

Simpy consists of the parameter S4amp2 The function modue $i return a vaue in the system

fied SC9S4amp2 after caing ca transaction This return vaue is set to Dero if the data record has

een correcty processed (5ny appies to 2T)

If a session is created you $i e notified $hether the data record coud e paced into the session

Tae interfaceThis is used ony if the function modue $ors $ith ca transaction The tae contains a the

system messages

copy SAP AG BC420 12-45

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 4688

048

983209 SAP AG 1999

Import Interface of 9unction Module

$

Technical

fields

Data

fields

BI session or CALL TRANSACTION

Processin $ode

pdate $ode

a$e oamp BI session iamp (T initial)

Bacround user iamp (T initial)

Delete session aampter processin

Loc date oamp session

ODATA indicator

TU

MD1

UPDAT1

BRUP

US1R

=11P

ELDDAT1

DATA

Cou can use parameter 2T4 to specify $hether the function modue creates a atch input session

(2T4 E ) or updates the data record directy using ca transaction (2T4 E G)

The other parameters are fied as for a atch input session header

Note 7very time the function modue is caed a atch input session is created

If the session is to contain severa transactions proceed as foo$s

ltenerate the transaction severa times This can e achieved y recording the transaction again The

function modue interface $i then contain more than one transaction -hen the function modue is

caed severa transactions can e generated for each session

copy SAP AG BC420 12-46

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 4788

043

983209 SAP AG 1999

The Transaction Recorder

PrinciplesPrinciples

Recording )ith the LSMWRecording )ith the LSMW

Principles of atch Input and all TransactionPrinciples of atch Input and all Transaction

Integrating the TA Program into the DWIntegrating the TA Program into the DW

Using the TA Recorder Using the TA Recorder

copy SAP AG BC420 12-47

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 4888

045

983209 SAP AG 1999

Benerated Program

9unction modules DltP1ltBRUP

DltIS1RT

DltLS1ltBRUP

AAP Program

Define structure of

data in seJuential

fileDefine D

table

pen seJuential file

pen I session

Read data recordCseJuential file

9ill D table

9ill I session gtALL TRASATI

Last data record K

lose I session

lose seJuential file

The generated program has the structure dispayed aove It uses the standard function modues for

creating atch input sessions

copy SAP AG BC420 12-48

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 4988

047

983209 SAP AG 1999

Structure of the Benerated Program

Benerated part

Define D

table

pen seJuential file

pen I session

Read data record

9ill D table

9ill I session gtALL TRASATI

Last data recordK

lose I session

lose seJuential file

Include DR16

Define filestructure

P1ltDATAS1T

P1ltBRUP

DltDPR

Dlt9I1LD

DltTRASATI

LS1ltBRUP

LS1ltDATAS1T

The generated program consists of t$o parts 9 a generated part and the incude 2amp72G8 The

incude is provided in the standard system

The incude contains the definition of the reuired 2 tae and a further seven suroutines These

suroutines eecute the foo$ing functions

5pen and cose fie

5pen and cose session

Fi 2 tae

Fi session

The generated part is the main program and cas the reevant suroutines A structure is aso

generated in the generated part to read the eterna data into the fie

See the Appendi for more information on the 2amp72G8 program

copy SAP AG BC420 12-49

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 5088

020

983209 SAP AG 1999

Structure of D Table

PRBRAM DPR D1BI 9AM 9ALPRBRAMPRBRAM DPRDPR D1BID1BI 9AM9AM 9AL9AL

SAPM90ampD 0602

R90ampD=UR 600000

R90ampDU=RS 0006

R90ampD=T=D =UA

SAPM90ampD 0660

=A6AM16 Smith

=A6PSTL 87000

=A6LAD6 US

=A6SPRAS 1

SAPM90ampD 06amp0

=A6ST1B US6amp428357DDATA

PRBRAM

DPR

D1BI

9AM

9AL

EAR

UM

EAR

EAR

EAR

40

4

6

6amp

6amp

D Module pool

D Screen number

D Start of screen

D 9ield name

D 9ield contents

9ield ame T(pe Length Short Tet

AAP Dictionar(

The 2 tae has the same structure as in a standard transfer

copy SAP AG BC420 12-50

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 5188

026

983209 SAP AG 1999

Read Structure

Recording

DATA BEGIN OF record data element BUKRS bukr$amp data element KTOKD ktokd$amp data element NA(EG) name$+amp data element SORT ortl$ampEND OF record-

record

Automaticall( generated

from recording

The structure of the fie is automaticay generated and is a$ays defined $ith the name amp725amp

The generated structure a$ays has the same ayout 7ach fied is defined y t$o generated ro$s

The first ro$ is a$ays a comment ro$ containing the tet J data eement and the data eement of

the screen fied from the recording In the net ro$ the fied itsef is defined $ith the name of the

data eement foo$ed y a three9digit position numer $hich specifies the ocation in the structure

The ength of the fied is set y the ength of the data eement If a fied is not defined through a data

eement the system uses the ength of the screen fied

copy SAP AG BC420 12-51

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 5288

02amp

983209 SAP AG 1999

pening and losing the 9ile

P1ltDATAS1T

LS1ltDATAS1T

FOR( oendataet USING dataet-O)EN DATASET dataet IN TET (ODE-

IF S01SUBR2 34 - 5RITE 6 te7t1e S01SUBR2-STO)-

ENDIF-

ENDFOR(-

FOR( cloedataet USING dataet-2OSE DATASET dataet-

ENDFOR(-

Include

DR16

The suroutine 5P7N3ATAS7T opens the seuentia fie

The suroutine 2+5S73ATAS7T coses the seuentia fie

copy SAP AG BC420 12-52

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 5388

02

983209 SAP AG 1999

9unction Modules for I Program

lient

Session name

Eold date

=eep session

D user name

RecordK

LI1T

BRUP

ELDDAT1

=11P

US1R

R1RD

DltP1ltBRUPDltP1ltBRUP

Transaction code

D table

TD1

DPRTA

DltIS1RTDltIS1RT

DltLS1ltBRUPDltLS1ltBRUP

pen Isessionpen Isession

Insert data for

transactions

Insert data for

transactions

lose I

session

lose I

session

The foo$ing function modues are provided for creating atch input sessions (function group

S2)

235P7N3ltamp54P

2reates a ne$ session and contains genera data for the $hoe session

23INS7ampT

Inserts a the data for a transaction into the session The transferred interna tae $ith the

structure 2ATA must contain a the data reuired for fuy processing the transaction

232+5S73ltamp54P

2oses the session after a the data has een inserted As soon as the session has een cosed it

can e processed

The interna tae $ith the structure 2ATA can ony contain atch input data for one singe

transaction run So the individua transactions are inserted into the atch input session in a oop

using severa 23INS7ampT cas

copy SAP AG BC420 12-53

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 5488

024

983209 SAP AG 2001

9unction Module DltP1ltBRUP

ALL 9UTI DltP1ltBRUPALL 9UTI DltP1ltBRUP

1PRTIB

LI1T client

BRUP session name

ELDDAT1 loc+ date

=11P delete flag

US1R bdc user name

R1RD recording

IMPRTIB

NID internal session +e(

11PTIS

1PRTIB

LI1T client

BRUP session name

ELDDAT1 loc+ date

=11P delete flag

US1R bdc user name

R1RD recording

IMPRTIB NID internal session +e(

11PTIS

-ith the function modue 235P7N3ltamp54P you can open a atch input session

The foo$ing parameters are mandatory

2+I7NT (cient)

ltamp54P (session name)

4S7amp (user name)

Note The 4S7amp must a$ays e specified This user name is reuired for processing the session

in atch mode

The foo$ing parameters are optiona

=5+AT7 specifies the eariest date on $hich the session can e started677P fag specifies $hether session shoud e deeted after it has een successfuy processed The

677P fag is ignored if the session contains errors

677P E K K means deete the session after processing (defaut vaue) H

677P E KGK means do not deete session

amp725amp E KGK ao$s you to create a recording instead of a I session

If gtI is specified the function modue returns the interna session ey This is needed to e ae to

differentiate sessions that have the same name

-ith 7G27PTI5NS you get various return vaues that can e ueried $ith SC9S4amp2

Note In onine mode the onine user is used for the authoriDation checs regardess of the user

name specified

copy SAP AG BC420 12-54

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 5588

022

983209 SAP AG 1999

Subprogram P1ltBRUP

P1ltBRUP

FOR( oen8rou-IF e9on -

2A FUN2TION BD2O)ENGROU) E)ORTING 2IENT lt1mandt GROU) 8rou USER uer KEE) kee

=ODDATE gtolddate-

ENDIF-ENDFOR(-

Include

DR16

The suprogram 5P7N3ltamp54P opens the atch input session

copy SAP AG BC420 12-55

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 5688

028

983209 SAP AG 1999

9unction Module DltIS1RT

ALL 9UTI DltIS1RTALL 9UTI DltIS1RT

IMPRT

TD1 Transaction code

PSTltLAL Update locall(

PRITIB print list

TAL1S DPRTA bdclttable

11PTIS

IMPRT

TD1 Transaction code

PSTltLAL Update locall(

PRITIB print list

TAL1S DPRTA bdclttable

11PTIS

-ith the function modue 23INS7ampT you can add transaction data to the session

Cou need an interna 2 tae to transfer the data

The foo$ing parameters are mandatory

T257 Transaction code

CNPamp5TA 2 tae

The foo$ing parameters are optiona

P5ST3+52A+ E KGK activates oca updating This means that the data to e updated is ept in the

appication server and updated in the ast step of the transaction This does not invove the update

process (For more information see course 28 Programming ataase 4pdates)

PampINTINlt E KGK 9 ists processed in I $i e printed immediatey -ith 7G27PTI5NS you get various return vaues that can e ueried $ith SC9S4amp2

copy SAP AG BC420 12-56

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 5788

023

983209 SAP AG 1999

Subprogram DltTRASATI

DltTRASATI

FOR( BD2TRANSA2TION USING tcode-

IF e9on -2A FUN2TION BD2INSERT

E)ORTING T2ODE tcode TABES D0N)ROTAB bdcdata-

ESE-

ENDIF-ENDFOR(-

T

Include

DR16

The suprogram 23TampANSA2TI5N moves the fied 2 tae either to a atch input session

or uses ca transaction to import the data into the system 5n the seection screen you can specify

$hether you $ant to create a session or you $ant to use ca transaction to process the data directy

The S7SSI5N fied is then set according to your seection

copy SAP AG BC420 12-57

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 5888

025

983209 SAP AG 1999

9unction Module DltLS1ltBRUP

ALL 9UTI DltLS1ltBRUP

11PTIS

TltP1 6

NU1U1lt1RRR amp

-ith the function modue 232+5S73ltamp54P you can cose a atch input session

In 7G27PTI5NS you get various return vaues that can e ueried $ith SC9S4amp2

copy SAP AG BC420 12-58

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 5988

027

983209 SAP AG 1999

Subprogram LS1ltBRUP

FOR( cloe8rou-IF e9on -cloe batcgt 9nut 8rou

2A FUN2TION BD22OSEGROU)-

ESE-IF e8rouoened -

2A FUN2TION BD22OSEGROU)-

ENDIF-ENDIF-

ENDFOR(-

LS1ltBRUPlose session

lose error session

Include

DR16

The suprogram 2+5S73ltamp54P coses the atch input session The suprogram differentiates

et$een a norma I session (S7SSI5N E G) and a session opened $hen ca transaction

encountered an error (73ltamp54P35P7N7 E G)

copy SAP AG BC420 12-59

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 6088

080

983209 SAP AG 1999

Subprograms DltDPRG Dlt9I1LD

DltDPR

Dlt9I1LD

FOR( bdc9eld USING nam al-IF al 34 nodata-2EAR bdcdata- bdcdata1nam nam- bdcdata1al al- A))END bdcdata-ENDIF-

ENDFOR(-

FOR( bdcdltnro USING ro8ram dltnro- 2EAR bdcdata-Bdcdata1ro8ram ro8ram-Bdcdata1dltnro dltnro-Bdcdata1dltnbe89n - A))END bdcdata-ENDFOR(-

Include

DR16

The incude 2amp72GG contains t$o suprograms 23CNPamp5 and 23FI7+

Suprogram 23CNPamp5 fis the 2 tae $ith program names and screen numers

Suprogram 23FI7+ fis the 2 tae $ith fied names and vaues

7ach suprogram creates an entry in the 2 tae

copy SAP AG BC420 12-60

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 6188

086

983209 SAP AG 1999

9illing the D Table

erorm bdcdltnro u9n8 SA)(FD +- erorm bdc9eld u9n8 BD22URSOR RFD1BUKRS- erorm bdc9eld u9n8 BD2OK2ODE 6- erorm bdc9eld u9n8 RFD1BUKRS record1BUKRS- erorm bdc9eld u9n8 RFD1KTOKD record1KTOKD-

erorm bdcdltnro u9n8 SA)(FD -

erorm bdc9eld u9n8 BD22URSOR KNA1S)RAS- erorm bdc9eld u9n8 BD2OK2ODE 6- erorm bdc9eld u9n8 KNA1NA(E record1NA(E-

erorm bdc9eld u9n8 KNA1SORT record1SORT-

Recording Benerated automaticall(

from the recording

)ERFOR( bdcdltnro USING SA)(FD +- )ERFOR( bdc9eld USING BD22URSOR RFD1BUKRS-)ERFOR( bdc9eld USING BD2OK2ODE 6-)ERFOR( bdc9eld USING RFD1BUKRS record1BUKRS-)ERFOR( bdc9eld USING RFD1KTOKD record1KTOKD-

)ERFOR( bdcdltnro USING SA)(FD -

)ERFOR( bdc9eld USING BD22URSOR KNA1S)RAS-)ERFOR( bdc9eld USING BD2OK2ODE 6-)ERFOR( bdc9eld USING KNA1NA(E record1NA(E-

)ERFOR( bdc9eld USING KNA1SORT record1SORT- ---

The 2 tae is fied $ith data from the recording The suroutines 23CNPamp5 and

23FI7+ are used for this

The suroutines are caed in the reuired structure or seuence

copy SAP AG BC420 12-61

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 6288

08amp

983209 SAP AG 1999

erie)

SAPDatabase

SeJuential9ile

SAPDatabase

ALL TRASATIALL TRASATI

SeJuential9ile

ATE IPUTATE IPUT

D TableD TableD TableD Table

I Monitor

T

In contrast to atch input you can use ca transaction to directy pass data to the diaog interface

$ithout using a atch input session Cou use an interna tae (2 tae same structure and ayout

as atch input) to temporariy store your screen data Then you ca the desired transaction in your

program

Note 5n average the 2a Transaction method is 8 to times faster than using atch Input

copy SAP AG BC420 12-62

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 6388

08

983209 SAP AG 1999

all Transaction Program$ 1ample

RE)ORT abcbdcdcdeb9ct-

)ARA(ETERS d9mode DEFAUT A

udmode DEFAUT S-FOR( calltranact9on-2A TRANSA2TION FD

USING bdcdata (ODE d9mode

U)DATE udmode-

IF lt1ubrc NE - 5RITE 6 ---

ENDIF-ENDFOR(-

Screen

00

Screen

100

Screen

An additiona system ro area is added for the caed transaction The system uses this area for

processing the individua screens in the transactionH the data from the tae is added here After the

transaction is processed the second ro area is reeasedH the system continues processing in the first

ro area

Notes

In contrast to atch input there is no error ogging (error sessions) here For processing the caed

transaction the system uses the authoriDations of the user that caed the transaction The 2 tae

can ony hod data for one transaction run at a time efore another transaction is caed and its data

can e added you must eecute a amp7Famp7S= for the 2 tae

copy SAP AG BC420 12-63

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 6488

084

983209 SAP AG 1999

ALL TRASATI C6

RE)ORT 777-

2A TRANSA2TION FD USING bdcdata (ODE E-

Default for MD1 is A

2A TRANSA2TION 3tranact9oncode4 USING 3bdc1table4 C (ODE A E N C-

-ith the parameter 57 you can seect a specific dispay mode for processing the transaction The

foo$ing three modes are avaiae

A (ispay a)

If you eecute the program a the screens and a their data are dispayed This is the defaut vaue

for the 57 in 2A++ TampANSA2TI5N

N (ispay nothing)

The screens are not dispayed at a regardess of $hether any of them contained errors As soon as

the transaction has een fuy processed contro is returned to your program (The vaue of the

parameter 4PAT7 determines $hether dataase updates are eecuted or not)

7 (ispay errors ony)As soon as an error occurs in a screen the transaction is s$itched to dispay mode so that you can

correct the errors

These dispay modes are the same as those in the atch input session processing

copy SAP AG BC420 12-64

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 6588

082

983209 SAP AG 1999

RE)ORT 777-

2A TRANSA2TION FD USING BD2DATA U)DATE -

ALL TRASATI Camp

RE)ORT 777-

2A TRANSA2TION FD USING bdcdata U)DATE -

2A TRANSA2TION 3tranact9oncode4 USING 3bdc1table4 C (ODE A E N C U)DATE A S C -

Default for UPDAT1 is A

-ith the parameter 4PAT7 you can contro ho$ dataase updates arising from a transaction are

carried out There are three options

A (asynchronous updating) The caed transaction does not $ait unti the dataase has een

updated it simpy for$ard the updates to the SAP update service This usuay speeds up the 2T

program This processing mode is N5T recommended for arge data sets as the caed transaction

does not receive a competion message from the update modue

The caing 2T program therefore cannot te if the transaction has een successfuy competed Cou

shoud use the updating administration function (transaction S8) to determine $hether updating

$as terminated eary The error anaysis correction functions for are ess hepfu than $ith

synchronous updating

S (synchronous updating) -ith synchronous updating the caed transaction $aits unti a the

updates have een competed So processing is so$er than $ith synchronous updating The caed

transaction can ho$ever report any updating errors to the program $hich maes error

anaysiscorrection easier

+ (local updating) $ith oca updating the dataase is not updated in a separate process it is

updated in the caers process (see appication hep documentation for the AAP ey$ord S7T

4PAT7 TAS6 +52A+)

copy SAP AG BC420 12-65

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 6688

088

983209 SAP AG 1999

ALL TRASATI C

RE)ORT 777-DATA mtab T0)E TABE OF bdcm8coll-

2A TRANSA2TION FD USING bdcdata (ESSAGES INTO mtab-

2A TRANSA2TION 3tranact9oncode4 USING 3bdc1table4 C (ODE A E N C U)DATE A S C (ESSAGES INTO 3metab4 C -

7SSAlt7S specifies that a system messages that are output during the eecution of a 2A++

TampANSA2TI5N are $ritten to the interna tae L7SSTA The interna tae must have the

structure 2Slt25++

4nie the cassica atch input processing $ith sessions 2A++ TampANSA2TI5N does not offer any

specia processing procedures for transactions containing errors There are no restart functions for

transactions that contain errors or that cause updating terminations

copy SAP AG BC420 12-66

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 6788

083

983209 SAP AG 1999

ALL TRASATI C4

RE)ORT 777-DATA mltot T0)E ctuaram-

2A TRANSA2TION FD USING BD2DATA

O)TIONS FRO( mltot-

2A TRANSA2TION 3tranact9oncode4 USING 3bdc1table4 C (ODE A E N C U)DATE A S C (ESSAGES INTO 3metab4 C O)TIONS FRO( ot C -

RE)ORT 777-DATA mltot T0)E ctuaram-2A TRANSA2TION FD USING bdcdata

O)TIONS FRO( mltot-

The addition 5PTI5NS enaes the ca transaction statement to e controed through a structure

The structure must have the dictionary type 2T43PAampAS

The addition 5PTI5NS Famp5 must not e comined either $ith the addition 57 or $ith

4PAT7 ore information on the net side

copy SAP AG BC420 12-67

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 6888

085

983209 SAP AG 1999

Structure TUltPARAMS

DISMD1 Procen mode anaoo o addon amp

UPDMD1 $pdae mode anaoo o addon $PA

ATTMD1 CA mode CA conro

D19SI1 orce de=a EndoE e drn procen

RAMMIT +o eD a Camp amp(

IPT +o a ac np eonF a F S-B+P SPAC

I1D +o a ac np eon a=er end o= BC daa

The components are defined as foo$s

The components 7FSIM7 ampA25IT N5INPT and N5I7N can have the foo$ing

vaues KGK E Ces or K K E No

If the addition 5PTI5NS Famp5 is not specified the foo$ing settings appy to the contro

parameters

IS57 from addition 57

4P57 from addition 4PAT7

2ATT57 2ATT not active

7FSIM7 o not not use defaut $indo$s siDe

ampA25IT Successfu eit at 25IT -5amp6

N5INPT atch input session active (SC9INPT E G)

N5I7N atch input session sti active after end of 2 data

copy SAP AG BC420 12-68

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 6988

087

983209 SAP AG 1999

SMSBID Message ID

SMSBT Message T(pe C1GIGWGSGA

SMSB Message umber

SMSB6 Message ariable 6

SMSBamp Message ariable amp

SMSB Message ariable

SMSB4 Message ariable 4

SMSBID Message ID

SMSBT Message T(pe C1GIGWGSGA

SMSB Message umber

SMSB6 Message ariable 6

SMSBamp Message ariable amp

SMSB Message ariable

SMSB4 Message ariable 4

Return code$

S(stem fields$

alue Meaning

0 Successful

6000 1rror in transaction

6000 1rror in processing call transaction

see also the s(stem fields specified

alue Meaning

0 Successful

6000 1rror in transaction

6000 1rror in processing call transaction

see also the s(stem fields specified

9ield name Meaning9ield name9ield name MeaningMeaning

Return ode and S(stem 9ields

The return code is used to specify $hether the caed transaction $as processed successfuy In

addition severa system fieds are fied The numer I type and variaes of the diaog message

output y the caed transaction Cou need this information to output the message tet

copy SAP AG BC420 12-69

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 7088

030

983209 SAP AG 1999

Benerated Program of the TA Recorder

REFRES= (ESSTAB-

2A TRANSA2TION tcode USING bdcdata (ODE ctumode U)DATE cudate (ESSAGES INTO metab-OO) AT metab- ENDOO)-IF lubrc 34 AND e8rou 34 S)A2E- IF e8rouoenend - 2A FUN2TION BD2O)ENGROU) E)ORTING ---------

--------- E8rouoened - ENDIF- 2A FUN2TION BD2INSERT E)ORTING T2ODE tcode TABES D0N)ROTAB bdcdata-ENDIF-REFRES= bdcdata-

Message table output

pen error session

Insert data record that

has errors into error

session

If you have seected ca transaction on the seection screen the generated program runs as foo$s

The onine transaction is caed $ith ca transaction and passed to tae 2ATA A the

messages arising during the ca transaction are put in the interna tae 7SSTA

7SSTA is output as a ist

If you have specified an error session ( 73ltamp54P L SPA27) on the seection screen and the

ca transaction comes across an error (+3S4amp2 L 0) the error session is opened The error

session is ho$ever ony opened once Then the data record is paced in the session

A the other data records that have errors $ith ca transaction are paced in the same session

copy SAP AG BC420 12-70

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 7188

036

983209 SAP AG 1999

The Transaction Recorder

PrinciplesPrinciples

Recording )ith the LSMWRecording )ith the LSMW

Principles of atch Input and all TransactionPrinciples of atch Input and all Transaction

Integrating the TA Program into the DWIntegrating the TA Program into the DW

Using the TA Recorder Using the TA Recorder

copy SAP AG BC420 12-71

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 7288

03amp

983209 SAP AG 1999

Integrating into the DW

Transfer program

AAP Dictionar(

Integrate

SDA0

SDA6

SDAamp

SDA

Cou can integrate the generated program into the G9- The structure of the fie must e created

in the AAP ictionary The taes SGA0 SGA8 SGA1 and SGA $i e fied

copy SAP AG BC420 12-72

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 7388

03

983209 SAP AG 1999

DW Release 42

Goo

-B eeae 45

aa ran=er ogtec

Int customer data transfer ob-ect

ecord =ed

Dece daa ran=er

d Goo

The ampunction ampor interatin TA recorder prora$s is

i$ple$ented in the

D+-B in Release

The recorder can e integrated as of ampeease and it is provided in the G9- ampeease

ltot to the G9- ampeease 5n the initia screen you can integrate programs y choosing ampoto

( +nt customer ata transfer o-ect

copy SAP AG BC420 12-73

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 7488

034

983209 SAP AG 1999

reating Program as D b-ect

Comer ran=er ogtec

ampgtec ype

Sor eD =or ogtec

aa ran=er proram

Srcre name

9900

(+A1

Cane comer

ZBCA+G

ZB

ustomer transfer ob-ect

umber bet)een 7000 and 7777

b-ect t(pe

Assignment to R ob-ect

Short tet for D ob-ectShort description

Data transfer program

ame of generated program

Structure name

A structure Cstructure la(out )ith this name is created in

the AAP Dictionar(

For ampeease transfer oects $ere not organiDed y 5amp oects ut y a G numer (00089

OOOO) The numer range O0009OOOO is reserved for customers

To create a connection to the ne$ G 9- you must assign the program to a 5amp oect

2reate a short tet for the G oect This tet $i appear in the method seection ist

Specify the program to e incuded

Specify a name for the structure to e created in the AAP ictionary

Note $he generated program appears under program type +N and not under program type

-

copy SAP AG BC420 12-74

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 7588

032

983209 SAP AG 1999

Adantages

Automatic program registration in the DW in

Release 48

ou can use all the functions defined for

standard ob-ects

1ception$ The (reate ampile ith data

function

If you incuded the oect in the ampeease $orench it is automaticay avaiae in the ampeease

B $orench

A the $orench functions are avaiae for your oect ecept for Create files ith transfer ata

copy SAP AG BC420 12-75

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 7688

038

983209 SAP AG 1999

ou are no) able to$

The Transaction Recorder$ Unit Summar(

Use the recording function in the LSMW to create

a batch input session )ith the data from the

eternal s(stem

Use the TA Recorder to create (our o)n data

transfer program

Anal(e programs that )or+ )ith batch input or

call transaction

Integrate the TA Recorder programs into the

DW

copy SAP AG BC420 12-76

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 7788

ercise 1

nit $ -ecorder

$opic 2reating etors

$ransaction -ecorder ercise 1

bull 2reating detors $ith eterna numer assignment

bull etor numers M9980008 to M9980080

Address data for detors $ith eterna numer assignment is to

e transferred using program ampFI700

ro4ect F5

Supro4ect +5

-un +575

$as)s 85 95 8S25

9oad program -F+00

8 In the foo$ing eercises eisting data is to e changed Therefore these detors $ith

eterna numer assignment have to first e created

898 4nder suproect 79 create run 797G9 $ith the name Detors ith

eternal numers

copy SAP AG BC420 12-77

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 7888

891 2reate the foo$ing three tass The tass map the foo$ing process steps

convert data create + session and process + session

89198 In run 797G9 create the foo$ing tas

9 Tas AP9

9 Name 2onvert data 9 Tas type AP

9 Program type +S-

Seect the foo$ing +S- oect

+S- proect 2109

+S- suproect 7I9

+S- oect I997GT

89191 In run 797G9 create the foo$ing tas 9 Tas +5A9

9 Name 2reate I session

Tas type +5A

9 Program type INP

Seect program ampFI700 $ith the variant

I97G9

8919 In run 797G9 create the foo$ing tas

9 Tas S29

9 Name Process I session Tas type S2

9 Program type amp7P5

Seect program ampS2S4 $ith the variant

S497G9

Note that you have to correct the seuence of the tass 2onvert data

create + session and process + session

4se the uttons

89 Start the run

The detors $i e created $ith eterna numer assignments

89 2hec in transaction F0 that the detors M9980008 to M9980080 have een

created

copy SAP AG BC420 12-78

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 7988

ercise

nit $ransaction -ecorder

$opic -ecording function in the 9S8(

bull 2reate a recording using the +S-

bull ltenerate a atch input session

2hange the detor address data in the amp System

Name of the recording +

Name of the file +2055+F9

8 2reate the recording 7I3 using the +S- ampecord the transaction F01 (2hange

detor)

898 efore you create the recording first test the transaction onineQ

For the recording use detor M9980008 5n the initia screen of the F01

maintain the foo$ing fieds ony

etor etor M9980008

2ompany code 0008

Address data seect

Note $he data record must e saved hile recording

891 aintain the names and the descriptions for the foo$ing fieds

Name city street posta code and teephone numereete a other fieds in screen 880 from the recording (eg S5ampT+ +AN8

SPampAS)

4se the same technica names as sho$n in the tae eo$ (automatic fied

mapping)

copy SAP AG BC420 12-79

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 8088

1 2reate the suproect 7I9 and the ne$ oect TA3 in your proect 2109

aintain the oect attriutes and seect the item atch input recording Seect your

recording 7I3

2reate the source structure address

2reate the source fieds according to the tae eo$ 5r copy them from proect 2109S37N suproect 7I900 oect TA900

198 Fie setup The data from the egacy system are dispayed in the foo$ing tae

Fied name Fied type Fied ength escription

N5 2 8B etor numer

NA7 2 Name

STamp77T 2 Street

2ITC 2 2ityPace of residence

MIP 2 80 Posta code

T7+ 2 8B Teephone numer

191 aintain the fied mapping 4se the automatic fied mapping (via menu item

7tras)

19 Specify the fies 5ny maintain the fie name of the source fie

Name of the fie 21099IFI+7

2odepage 8800

19 Import the data and convert them ispay the data in each caseQ

19 2reate a atch input session

19B ampun the atch input session

copy SAP AG BC420 12-80

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 8188

ercise 3

nit $ransaction -ecorder

$opic -ecording ith the $ -ecorder

bull ltenerate a recording using the TA recorder

bull Test the recording

2hange the address data of detors in the amp system

Name recording $+

Name of the file +2055+F9

8 2reate the recording TA37I3 using the transaction recorder ampecord the

transaction F01 (change detor)

898 4se detor M9980008 for the recording 5n the F01 initia screen ony

maintain the foo$ing fieds

etor etor M9980008

2ompany 2ode 0008

Address data seect

Note $he data record must e saved hen recording

eete a fieds that do not eist in the source fie 21099IFI+7 from screen

880 in the recording (eg 6NA89S5ampT+ 6NA89+AN8 6ANNQ9SPampAS) Note o not deete fieds ampF01946ampS and ampF0190880

Save the recording no$

1 S$itch to the recordings overvie$

198 Process the recording $ith the processing mode A (dispay a)

191 Process the recording $ith the processing mode RN (no dispay)

19 If the recording has een tested and no error has occurred generate a I session

and run it using the I monitor If an error shoud occur generate the recordingagainQ

copy SAP AG BC420 12-81

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 8288

From the recording generate the program M21037I3 in your deveopment cass

2109 Seect the foo$ing

bull ampead fied contents from fie

bull 2reate test data in the fie 2103dei3test3tt

98 Save this program and eecute it ltenerate one I session each and process it

2arry out the same steps again using the ca transaction

The generated program shoud no$ e changed so that fie 21099IFI+7 can e

read and processed

98 2hange the defaut vaue of the fie name (parameter dataset) in 21099

IFI+7

91 2hange the structure definition eete the company code fied and the address

data checo from the structure

9 2hange the su9routine ca perform dc3fied for the company code (KampF019

46ampSK) so that the vaue 0008 is transferred

9 2hange the su9routine ca perform dc3fied for the address data checo

(KampF0190880K) so that the vaue G is transferred

9 Start the program again and read the data from the fie 21099IFI+7 $ith

detor data ltenerate a I session $ith it and run it

copy SAP AG BC420 12-82

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 8388

033 Include DR16INCLUDE BDCRECX1

SELECTION-SCREEN BEGIN OF LINE

PARAMETERS SESSION RADIOBUTTON GROUP CTU create sessi SELECTION-SCREEN COMMENT $amp TEXT-S FOR FIELD SESSION

se(ecti-scree )siti +

PARAMETERS CTU RADIOBUTTON GROUP CTU ca(( trasacti

SELECTION-SCREEN COMMENT $amp TEXT-S FOR FIELD CTU

SELECTION-SCREEN END OF LINE

SELECTION-SCREEN BEGIN OF LINE

SELECTION-SCREEN COMMENT $amp TEXT-S1 FOR FIELD GROUP

se(ecti-scree )siti $+

PARAMETERS GROUP1$amp r) ae 0 sessi

SELECTION-SCREEN COMMENT $amp TEXT-S+ FOR FIELD CTUMODE

se(ecti-scree )siti

PARAMETERS CTUMODE LIE CTU2PARAMS-DISMODE DEFAULT 3N3

A4 s56 a(( 78)rs

E4 s56 78)r errr (8

N4 7 t 7is)(a8 78)r

SELECTION-SCREEN END OF LINE

SELECTION-SCREEN BEGIN OF LINE

SELECTION-SCREEN COMMENT $amp TEXT-S$ FOR FIELD USER

se(ecti-scree )siti $+

PARAMETERS4 USER1$amp DEFAULT S9-UNAME ser 0r sessi i atc5

SELECTION-SCREEN COMMENT $amp TEXT-S FOR FIELD CUPDATE

se(ecti-scree )siti

PARAMETERS CUPDATE LIE CTU2PARAMS-UPDMODE DEFAULT 3L3

S4 s8c5rs(8

A4 as8c5rs(8

L4 (ca(

SELECTION-SCREEN END OF LINE

SELECTION-SCREEN BEGIN OF LINE

SELECTION-SCREEN COMMENT $amp TEXT-S FOR FIELD EEP

se(ecti-scree )siti $+

PARAMETERS4 EEP AS CltECBOX 3 3 = 7e(ete sessi i0 0iis5e7

3X3 = gtee) sessi i0 0iis5e7

SELECTION-SCREEN COMMENT $amp TEXT-S FOR FIELD E2GROUP

copy SAP AG BC420 12-83

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 8488

se(ecti-scree )siti

)araeters E2GROUP1$amp r) ae 0 errr-sessi

SELECTION-SCREEN END OF LINE

SELECTION-SCREEN BEGIN OF LINE

SELECTION-SCREEN COMMENT $amp TEXT-S FOR FIELD ltOLDDATE

se(ecti-scree )siti $+

PARAMETERS4 ltOLDDATE LIE S9-DATUM

SELECTION-SCREEN COMMENT +11amp TEXT-S$ FOR FIELD E2USER

se(ecti-scree )siti

PARAMETERS4 E2USER1$amp DEFAULT S9-UNAME ser 0r errr-sessi

SELECTION-SCREEN END OF LINE

SELECTION-SCREEN BEGIN OF LINE

SELECTION-SCREEN COMMENT +11amp TEXT-S FOR FIELD E2EEP

se(ecti-scree )siti

PARAMETERS4 E2EEP AS CltECBOX 3 3 = 7e(ete sessi i0 0iis5e7

3X3 = gtee) sessi i0 0iis5e7

SELECTION-SCREEN END OF LINE

SELECTION-SCREEN BEGIN OF LINE

SELECTION-SCREEN COMMENT +11amp TEXT-S FOR FIELD E2ltDATE

se(ecti-scree )siti

PARAMETERS4 E2ltDATE LIE S9-DATUM

SELECTION-SCREEN END OF LINE

SELECTION-SCREEN SIP

SELECTION-SCREEN BEGIN OF LINE

SELECTION-SCREEN COMMENT 1amp TEXT-S1 FOR FIELD NODATA

PARAMETERS4 NODATA DEFAULT 33 LOER CASE 7ata

SELECTION-SCREEN END OF LINE

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

Batc5i)t7ata 0 si(e trasacti

DATA4 BDCDATA LIE BDCDATA OCCURS ITlt ltEADER LINE

essaes 0 ca(( trasacti

DATA4 MESSTAB LIE BDCMSGCOLL OCCURS ITlt ltEADER LINE

errr sessi )ee7 3 3 r 3X3amp

DATA4 E2GROUP2OPENED

essae tets

TABLES4 T1

copy SAP AG BC420 12-84

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 8588

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

at se(ecti scree

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

AT SELECTION-SCREEN

r) a7 ser st e 0i((e7 0r create sessi

IF SESSION = 3X3 AND

GROUP = SPACE OR USER = SPACE

MESSAGE E1MSamp

ENDIF

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

)e 7ataset

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

FORM OPEN2DATASET USING P2DATASET

OPEN DATASET P2DATASET IN TEXT MODE

IF S9-SUBRC

RITE4 TEXT-E S9-SUBRC

STOP

ENDIF

ENDFORM

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

c(se 7ataset

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

FORM CLOSE2DATASET USING P2DATASET

CLOSE DATASET P2DATASET

ENDFORM

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

create atc5i)t sessi

t 0r ca(( trasacti siamp

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

FORM OPEN2GROUP

IF SESSION = 3X3

SIP

RITE4 $amp 3Create r)3I1amp GROUP

SIP

)e atc5i)t r)

CALL FUNCTION 3BDC2OPEN2GROUP3

EXPORTING CLIENT = S9-MANDT

copy SAP AG BC420 12-85

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 8688

GROUP = GROUP

USER = USER

EEP = EEP

ltOLDDATE = ltOLDDATE

RITE4 amp 3BDC2OPEN2GROUP3I$amp

1$amp 3retrc7e43I+amp

S9-SUBRC

ENDIF

ENDFORM

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

e7 atc5i)t sessi

ca(( trasacti si4 errr sessiamp

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

FORM CLOSE2GROUP

IF SESSION = 3X3

c(se atc5i)t r)

CALL FUNCTION 3BDC2CLOSE2GROUP3

RITE4 amp 3BDC2CLOSE2GROUP3Iamp

1$amp 3retrc7e43I+amp

S9-SUBRC

ELSE

IF E2GROUP2OPENED = 3X3

CALL FUNCTION 3BDC2CLOSE2GROUP3

RITE4

RITE4 amp 3Fe5(era))e 6r7e eret3Iamp

ENDIF

ENDIF

ENDFORM

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

Start e6 trasacti accr7i t )araeters

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

FORM BDC2TRANSACTION USING TCODE

DATA4 L2MSTRINGamp

DATA4 L2SUBRC LIE S9-SUBRC

atc5 i)t sessi

IF SESSION = 3X3

CALL FUNCTION 3BDC2INSERT3

EXPORTING TCODE = TCODE

TABLES D9NPROTAB = BDCDATA

RITE4 3BDC2INSERT3Iamp

copy SAP AG BC420 12-86

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 8788

TCODE

3retrc7e43I+amp

S9-SUBRC

3RECORD43

S9-INDEX

ca(( trasacti si

ELSE

REFRESlt MESSTAB

CALL TRANSACTION TCODE USING BDCDATA

MODE CTUMODE

UPDATE CUPDATE

MESSAGES INTO MESSTAB

L2SUBRC = S9-SUBRC

RITE4 3CALL2TRANSACTION3

TCODE

3retrc7e43I+amp

L2SUBRC

3RECORD43

S9-INDEX

LOOP AT MESSTAB

SELECT SINGLE FROM T1 ltERE SPRSL = MESSTAB-MSGSPRA

AND ARBGB = MESSTAB-MSGID

AND MSGNR = MESSTAB-MSGNR

IF S9-SUBRC =

L2MSTRING = T1-TEXT

IF L2MSTRING CS 313

REPLACE 313 ITlt MESSTAB-MSGH1 INTO L2MSTRING

REPLACE 3$3 ITlt MESSTAB-MSGH$ INTO L2MSTRING

REPLACE 33 ITlt MESSTAB-MSGH INTO L2MSTRING

REPLACE 33 ITlt MESSTAB-MSGH INTO L2MSTRING

ELSE

REPLACE 33 ITlt MESSTAB-MSGH1 INTO L2MSTRING

REPLACE 33 ITlt MESSTAB-MSGH$ INTO L2MSTRING

REPLACE 33 ITlt MESSTAB-MSGH INTO L2MSTRING

REPLACE 33 ITlt MESSTAB-MSGH INTO L2MSTRING

ENDIF

CONDENSE L2MSTRING

RITE4 MESSTAB-MSGT9P L2MSTRING$+amp

ELSE

RITE4 MESSTAB

ENDIF

ENDLOOP

copy SAP AG BC420 12-87

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 8888

SIP

Eree 0e5(era))e

IF L2SUBRC AND E2GROUP SPACE

IF E2GROUP2OPENED = 3 3

CALL FUNCTION 3BDC2OPEN2GROUP3

EXPORTING CLIENT = S9-MANDT

GROUP = E2GROUP

USER = E2USER

EEP = E2EEP

ltOLDDATE = E2ltDATE

E2GROUP2OPENED = 3X3

ENDIF

CALL FUNCTION 3BDC2INSERT3

EXPORTING TCODE = TCODE

TABLES D9NPROTAB = BDCDATA

ENDIF

ENDIF

REFRESlt BDCDATA

ENDFORM

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

Start e6 scree

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

FORM BDC2D9NPRO USING PROGRAM D9NPRO

CLEAR BDCDATA

BDCDATA-PROGRAM = PROGRAM

BDCDATA-D9NPRO = D9NPRO

BDCDATA-D9NBEGIN = 3X3

APPEND BDCDATA

ENDFORM

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

Isert 0ie(7

Page 38: BC420_46C - 012The Transaction Recorder

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 3888

05

983209 SAP AG 1999

Default sie

ont after commit

ot a I session

1nd$ ot a I mode

Processing Recording )ith T amp

The screen standard sie is used for the

processing

ommit )or+ does not end the processing

o I mode is actie The transaction )ill run

through as in online

I mode is selected nce the data in the D

table is processedG the I mode is set to inactie

Standard siDe

If you seect this the screens are processed in the standard siDe in the foreground (in foreground or

dispay errors ony) Note the standard siDe is a$ays used for acground processing

Further after commit

The first commit $or in a transaction does not ead to the end of the recording

Note A atch input transaction is ended $ith the first commit $or

No I mode

The system fied SC9INPT is not set (SC9INPT E ) So transactions are run through as in onine

7nd No I mode

5ny use if you choose the processing mode 7 (dispay errors ony) Then the transaction is processed in the acground in atch input mode and if there is an error the screens run through in

the foreground

copy SAP AG BC420 12-38

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 3988

07

983209 SAP AG 1999

I Mode

atch input

mode

nline

Some transactions behae differentl( in batch input mode

than in online Cbatch input capabilit(

atch input mode sets the s(stem field SIPT H

Not every transaction can run the same onine and in atch input mode The transaction must decide

itsef $hether it is caed onine or in atch input mode

The system sets the system fied SC9INPT E G if the atch input mode is active (this aso appies

to ca transaction) From this system fied the transaction can identify $hether to run onine or in

atch input mode

copy SAP AG BC420 12-39

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 4088

040

983209 SAP AG 1999

reating a Session 9rom the Recording

Recordingnl( contains the data

from the recording

Seon name 02amp

Aoraon ampBS(eep eon

oclt dae 10102000

Cou can create a atch input session directy from the recording that you can then process using the

atch input monitor

copy SAP AG BC420 12-40

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 4188

046

983209 SAP AG 1999

reating Test Data

Test Data

Recording

ranranpBC420AAe name

The file onl( contains the data from the recording

Rgt

Application Serer

Structure

Cou can create a fie from the recordingH the fie $i contain a the fieds from the recording The

fieds are added to the fie $ith the ength you specified in the definition

The fied order corresponds to the order in the recording overvie$ Technica fieds

(2356257 2324ampS5amp and so on) are incuded

The data can ony e stored on the appication server If you do not specify a path the fie is stored in

the $or directory of the appication server

If the specified test fie aready eists the ne$ data record is added to this fie

copy SAP AG BC420 12-41

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 4288

04amp

983209 SAP AG 1999

ed conen

reating a Program

Recording

ZBC420ampProram name

Transfer Program

e daa

ead =rom =e

ran=er =rom recordn

reate

9ile nameTest data

ranranpBC420AA

Cou can generate a program from the recording

In the foo$ing diaog o enter a program name In addition you can choose the type and method

for fiing the maintained fied contents from the recorded screens

4se the vaues used for the recording If you reuire feie data transfer you $i have to modify

this program ater

ParameteriDe the input vaues and read these vaues from a fie A data structure is created for

parameteriDationH the data records are read from an eterna fie into this data structure The

program assumes the fie $as taiored to this data structure

If you have decided to parameteriDe the input vaues you shoud aso create a test fie during

generation To do this seect the checo and enter a name for the fie

The attriute maintenance screen of the AAP editor appears aintain the attriutes and save the

program

copy SAP AG BC420 12-42

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 4388

04

983209 SAP AG 1999

Program 9unctions

Online

transaction

Transfer program

To

error

1rror

ption 6ption ampFlat SAP

structure

Monitor

Cou have no$ generated a data transfer program for importing data into the amp System The

program can eecute the data transfer using atch input or ca transaction

If you choose option 1 and there is an error the data record is paced into a atch input session

copy SAP AG BC420 12-43

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 4488

044

983209 SAP AG 1999

Benerating 9unction Modules

Recording

Zcreaedeor ncon mode

ncon rop

Sor eD

ZBC420

Creae comer

9unction module

nl( one data record can be processed at a time

In the net diaog o you can generate a function modue a function group and short tet from the

recording The function modue is automaticay created in the function group

copy SAP AG BC420 12-44

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 4588

042

983209 SAP AG 1999

9unction of 9unction Modules

Online

transaction

To

error

1rror

ption 6 ption amp

9unction module

Import

Parameter 1port

parameter

Tables

M1SSTA

Monitor

S$BC

Import interface

The import interface consists of a technica part and the fieds from the recording (A parameter is

created for each input fied of the recorded transactions)

7port interface

Simpy consists of the parameter S4amp2 The function modue $i return a vaue in the system

fied SC9S4amp2 after caing ca transaction This return vaue is set to Dero if the data record has

een correcty processed (5ny appies to 2T)

If a session is created you $i e notified $hether the data record coud e paced into the session

Tae interfaceThis is used ony if the function modue $ors $ith ca transaction The tae contains a the

system messages

copy SAP AG BC420 12-45

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 4688

048

983209 SAP AG 1999

Import Interface of 9unction Module

$

Technical

fields

Data

fields

BI session or CALL TRANSACTION

Processin $ode

pdate $ode

a$e oamp BI session iamp (T initial)

Bacround user iamp (T initial)

Delete session aampter processin

Loc date oamp session

ODATA indicator

TU

MD1

UPDAT1

BRUP

US1R

=11P

ELDDAT1

DATA

Cou can use parameter 2T4 to specify $hether the function modue creates a atch input session

(2T4 E ) or updates the data record directy using ca transaction (2T4 E G)

The other parameters are fied as for a atch input session header

Note 7very time the function modue is caed a atch input session is created

If the session is to contain severa transactions proceed as foo$s

ltenerate the transaction severa times This can e achieved y recording the transaction again The

function modue interface $i then contain more than one transaction -hen the function modue is

caed severa transactions can e generated for each session

copy SAP AG BC420 12-46

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 4788

043

983209 SAP AG 1999

The Transaction Recorder

PrinciplesPrinciples

Recording )ith the LSMWRecording )ith the LSMW

Principles of atch Input and all TransactionPrinciples of atch Input and all Transaction

Integrating the TA Program into the DWIntegrating the TA Program into the DW

Using the TA Recorder Using the TA Recorder

copy SAP AG BC420 12-47

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 4888

045

983209 SAP AG 1999

Benerated Program

9unction modules DltP1ltBRUP

DltIS1RT

DltLS1ltBRUP

AAP Program

Define structure of

data in seJuential

fileDefine D

table

pen seJuential file

pen I session

Read data recordCseJuential file

9ill D table

9ill I session gtALL TRASATI

Last data record K

lose I session

lose seJuential file

The generated program has the structure dispayed aove It uses the standard function modues for

creating atch input sessions

copy SAP AG BC420 12-48

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 4988

047

983209 SAP AG 1999

Structure of the Benerated Program

Benerated part

Define D

table

pen seJuential file

pen I session

Read data record

9ill D table

9ill I session gtALL TRASATI

Last data recordK

lose I session

lose seJuential file

Include DR16

Define filestructure

P1ltDATAS1T

P1ltBRUP

DltDPR

Dlt9I1LD

DltTRASATI

LS1ltBRUP

LS1ltDATAS1T

The generated program consists of t$o parts 9 a generated part and the incude 2amp72G8 The

incude is provided in the standard system

The incude contains the definition of the reuired 2 tae and a further seven suroutines These

suroutines eecute the foo$ing functions

5pen and cose fie

5pen and cose session

Fi 2 tae

Fi session

The generated part is the main program and cas the reevant suroutines A structure is aso

generated in the generated part to read the eterna data into the fie

See the Appendi for more information on the 2amp72G8 program

copy SAP AG BC420 12-49

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 5088

020

983209 SAP AG 1999

Structure of D Table

PRBRAM DPR D1BI 9AM 9ALPRBRAMPRBRAM DPRDPR D1BID1BI 9AM9AM 9AL9AL

SAPM90ampD 0602

R90ampD=UR 600000

R90ampDU=RS 0006

R90ampD=T=D =UA

SAPM90ampD 0660

=A6AM16 Smith

=A6PSTL 87000

=A6LAD6 US

=A6SPRAS 1

SAPM90ampD 06amp0

=A6ST1B US6amp428357DDATA

PRBRAM

DPR

D1BI

9AM

9AL

EAR

UM

EAR

EAR

EAR

40

4

6

6amp

6amp

D Module pool

D Screen number

D Start of screen

D 9ield name

D 9ield contents

9ield ame T(pe Length Short Tet

AAP Dictionar(

The 2 tae has the same structure as in a standard transfer

copy SAP AG BC420 12-50

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 5188

026

983209 SAP AG 1999

Read Structure

Recording

DATA BEGIN OF record data element BUKRS bukr$amp data element KTOKD ktokd$amp data element NA(EG) name$+amp data element SORT ortl$ampEND OF record-

record

Automaticall( generated

from recording

The structure of the fie is automaticay generated and is a$ays defined $ith the name amp725amp

The generated structure a$ays has the same ayout 7ach fied is defined y t$o generated ro$s

The first ro$ is a$ays a comment ro$ containing the tet J data eement and the data eement of

the screen fied from the recording In the net ro$ the fied itsef is defined $ith the name of the

data eement foo$ed y a three9digit position numer $hich specifies the ocation in the structure

The ength of the fied is set y the ength of the data eement If a fied is not defined through a data

eement the system uses the ength of the screen fied

copy SAP AG BC420 12-51

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 5288

02amp

983209 SAP AG 1999

pening and losing the 9ile

P1ltDATAS1T

LS1ltDATAS1T

FOR( oendataet USING dataet-O)EN DATASET dataet IN TET (ODE-

IF S01SUBR2 34 - 5RITE 6 te7t1e S01SUBR2-STO)-

ENDIF-

ENDFOR(-

FOR( cloedataet USING dataet-2OSE DATASET dataet-

ENDFOR(-

Include

DR16

The suroutine 5P7N3ATAS7T opens the seuentia fie

The suroutine 2+5S73ATAS7T coses the seuentia fie

copy SAP AG BC420 12-52

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 5388

02

983209 SAP AG 1999

9unction Modules for I Program

lient

Session name

Eold date

=eep session

D user name

RecordK

LI1T

BRUP

ELDDAT1

=11P

US1R

R1RD

DltP1ltBRUPDltP1ltBRUP

Transaction code

D table

TD1

DPRTA

DltIS1RTDltIS1RT

DltLS1ltBRUPDltLS1ltBRUP

pen Isessionpen Isession

Insert data for

transactions

Insert data for

transactions

lose I

session

lose I

session

The foo$ing function modues are provided for creating atch input sessions (function group

S2)

235P7N3ltamp54P

2reates a ne$ session and contains genera data for the $hoe session

23INS7ampT

Inserts a the data for a transaction into the session The transferred interna tae $ith the

structure 2ATA must contain a the data reuired for fuy processing the transaction

232+5S73ltamp54P

2oses the session after a the data has een inserted As soon as the session has een cosed it

can e processed

The interna tae $ith the structure 2ATA can ony contain atch input data for one singe

transaction run So the individua transactions are inserted into the atch input session in a oop

using severa 23INS7ampT cas

copy SAP AG BC420 12-53

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 5488

024

983209 SAP AG 2001

9unction Module DltP1ltBRUP

ALL 9UTI DltP1ltBRUPALL 9UTI DltP1ltBRUP

1PRTIB

LI1T client

BRUP session name

ELDDAT1 loc+ date

=11P delete flag

US1R bdc user name

R1RD recording

IMPRTIB

NID internal session +e(

11PTIS

1PRTIB

LI1T client

BRUP session name

ELDDAT1 loc+ date

=11P delete flag

US1R bdc user name

R1RD recording

IMPRTIB NID internal session +e(

11PTIS

-ith the function modue 235P7N3ltamp54P you can open a atch input session

The foo$ing parameters are mandatory

2+I7NT (cient)

ltamp54P (session name)

4S7amp (user name)

Note The 4S7amp must a$ays e specified This user name is reuired for processing the session

in atch mode

The foo$ing parameters are optiona

=5+AT7 specifies the eariest date on $hich the session can e started677P fag specifies $hether session shoud e deeted after it has een successfuy processed The

677P fag is ignored if the session contains errors

677P E K K means deete the session after processing (defaut vaue) H

677P E KGK means do not deete session

amp725amp E KGK ao$s you to create a recording instead of a I session

If gtI is specified the function modue returns the interna session ey This is needed to e ae to

differentiate sessions that have the same name

-ith 7G27PTI5NS you get various return vaues that can e ueried $ith SC9S4amp2

Note In onine mode the onine user is used for the authoriDation checs regardess of the user

name specified

copy SAP AG BC420 12-54

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 5588

022

983209 SAP AG 1999

Subprogram P1ltBRUP

P1ltBRUP

FOR( oen8rou-IF e9on -

2A FUN2TION BD2O)ENGROU) E)ORTING 2IENT lt1mandt GROU) 8rou USER uer KEE) kee

=ODDATE gtolddate-

ENDIF-ENDFOR(-

Include

DR16

The suprogram 5P7N3ltamp54P opens the atch input session

copy SAP AG BC420 12-55

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 5688

028

983209 SAP AG 1999

9unction Module DltIS1RT

ALL 9UTI DltIS1RTALL 9UTI DltIS1RT

IMPRT

TD1 Transaction code

PSTltLAL Update locall(

PRITIB print list

TAL1S DPRTA bdclttable

11PTIS

IMPRT

TD1 Transaction code

PSTltLAL Update locall(

PRITIB print list

TAL1S DPRTA bdclttable

11PTIS

-ith the function modue 23INS7ampT you can add transaction data to the session

Cou need an interna 2 tae to transfer the data

The foo$ing parameters are mandatory

T257 Transaction code

CNPamp5TA 2 tae

The foo$ing parameters are optiona

P5ST3+52A+ E KGK activates oca updating This means that the data to e updated is ept in the

appication server and updated in the ast step of the transaction This does not invove the update

process (For more information see course 28 Programming ataase 4pdates)

PampINTINlt E KGK 9 ists processed in I $i e printed immediatey -ith 7G27PTI5NS you get various return vaues that can e ueried $ith SC9S4amp2

copy SAP AG BC420 12-56

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 5788

023

983209 SAP AG 1999

Subprogram DltTRASATI

DltTRASATI

FOR( BD2TRANSA2TION USING tcode-

IF e9on -2A FUN2TION BD2INSERT

E)ORTING T2ODE tcode TABES D0N)ROTAB bdcdata-

ESE-

ENDIF-ENDFOR(-

T

Include

DR16

The suprogram 23TampANSA2TI5N moves the fied 2 tae either to a atch input session

or uses ca transaction to import the data into the system 5n the seection screen you can specify

$hether you $ant to create a session or you $ant to use ca transaction to process the data directy

The S7SSI5N fied is then set according to your seection

copy SAP AG BC420 12-57

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 5888

025

983209 SAP AG 1999

9unction Module DltLS1ltBRUP

ALL 9UTI DltLS1ltBRUP

11PTIS

TltP1 6

NU1U1lt1RRR amp

-ith the function modue 232+5S73ltamp54P you can cose a atch input session

In 7G27PTI5NS you get various return vaues that can e ueried $ith SC9S4amp2

copy SAP AG BC420 12-58

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 5988

027

983209 SAP AG 1999

Subprogram LS1ltBRUP

FOR( cloe8rou-IF e9on -cloe batcgt 9nut 8rou

2A FUN2TION BD22OSEGROU)-

ESE-IF e8rouoened -

2A FUN2TION BD22OSEGROU)-

ENDIF-ENDIF-

ENDFOR(-

LS1ltBRUPlose session

lose error session

Include

DR16

The suprogram 2+5S73ltamp54P coses the atch input session The suprogram differentiates

et$een a norma I session (S7SSI5N E G) and a session opened $hen ca transaction

encountered an error (73ltamp54P35P7N7 E G)

copy SAP AG BC420 12-59

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 6088

080

983209 SAP AG 1999

Subprograms DltDPRG Dlt9I1LD

DltDPR

Dlt9I1LD

FOR( bdc9eld USING nam al-IF al 34 nodata-2EAR bdcdata- bdcdata1nam nam- bdcdata1al al- A))END bdcdata-ENDIF-

ENDFOR(-

FOR( bdcdltnro USING ro8ram dltnro- 2EAR bdcdata-Bdcdata1ro8ram ro8ram-Bdcdata1dltnro dltnro-Bdcdata1dltnbe89n - A))END bdcdata-ENDFOR(-

Include

DR16

The incude 2amp72GG contains t$o suprograms 23CNPamp5 and 23FI7+

Suprogram 23CNPamp5 fis the 2 tae $ith program names and screen numers

Suprogram 23FI7+ fis the 2 tae $ith fied names and vaues

7ach suprogram creates an entry in the 2 tae

copy SAP AG BC420 12-60

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 6188

086

983209 SAP AG 1999

9illing the D Table

erorm bdcdltnro u9n8 SA)(FD +- erorm bdc9eld u9n8 BD22URSOR RFD1BUKRS- erorm bdc9eld u9n8 BD2OK2ODE 6- erorm bdc9eld u9n8 RFD1BUKRS record1BUKRS- erorm bdc9eld u9n8 RFD1KTOKD record1KTOKD-

erorm bdcdltnro u9n8 SA)(FD -

erorm bdc9eld u9n8 BD22URSOR KNA1S)RAS- erorm bdc9eld u9n8 BD2OK2ODE 6- erorm bdc9eld u9n8 KNA1NA(E record1NA(E-

erorm bdc9eld u9n8 KNA1SORT record1SORT-

Recording Benerated automaticall(

from the recording

)ERFOR( bdcdltnro USING SA)(FD +- )ERFOR( bdc9eld USING BD22URSOR RFD1BUKRS-)ERFOR( bdc9eld USING BD2OK2ODE 6-)ERFOR( bdc9eld USING RFD1BUKRS record1BUKRS-)ERFOR( bdc9eld USING RFD1KTOKD record1KTOKD-

)ERFOR( bdcdltnro USING SA)(FD -

)ERFOR( bdc9eld USING BD22URSOR KNA1S)RAS-)ERFOR( bdc9eld USING BD2OK2ODE 6-)ERFOR( bdc9eld USING KNA1NA(E record1NA(E-

)ERFOR( bdc9eld USING KNA1SORT record1SORT- ---

The 2 tae is fied $ith data from the recording The suroutines 23CNPamp5 and

23FI7+ are used for this

The suroutines are caed in the reuired structure or seuence

copy SAP AG BC420 12-61

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 6288

08amp

983209 SAP AG 1999

erie)

SAPDatabase

SeJuential9ile

SAPDatabase

ALL TRASATIALL TRASATI

SeJuential9ile

ATE IPUTATE IPUT

D TableD TableD TableD Table

I Monitor

T

In contrast to atch input you can use ca transaction to directy pass data to the diaog interface

$ithout using a atch input session Cou use an interna tae (2 tae same structure and ayout

as atch input) to temporariy store your screen data Then you ca the desired transaction in your

program

Note 5n average the 2a Transaction method is 8 to times faster than using atch Input

copy SAP AG BC420 12-62

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 6388

08

983209 SAP AG 1999

all Transaction Program$ 1ample

RE)ORT abcbdcdcdeb9ct-

)ARA(ETERS d9mode DEFAUT A

udmode DEFAUT S-FOR( calltranact9on-2A TRANSA2TION FD

USING bdcdata (ODE d9mode

U)DATE udmode-

IF lt1ubrc NE - 5RITE 6 ---

ENDIF-ENDFOR(-

Screen

00

Screen

100

Screen

An additiona system ro area is added for the caed transaction The system uses this area for

processing the individua screens in the transactionH the data from the tae is added here After the

transaction is processed the second ro area is reeasedH the system continues processing in the first

ro area

Notes

In contrast to atch input there is no error ogging (error sessions) here For processing the caed

transaction the system uses the authoriDations of the user that caed the transaction The 2 tae

can ony hod data for one transaction run at a time efore another transaction is caed and its data

can e added you must eecute a amp7Famp7S= for the 2 tae

copy SAP AG BC420 12-63

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 6488

084

983209 SAP AG 1999

ALL TRASATI C6

RE)ORT 777-

2A TRANSA2TION FD USING bdcdata (ODE E-

Default for MD1 is A

2A TRANSA2TION 3tranact9oncode4 USING 3bdc1table4 C (ODE A E N C-

-ith the parameter 57 you can seect a specific dispay mode for processing the transaction The

foo$ing three modes are avaiae

A (ispay a)

If you eecute the program a the screens and a their data are dispayed This is the defaut vaue

for the 57 in 2A++ TampANSA2TI5N

N (ispay nothing)

The screens are not dispayed at a regardess of $hether any of them contained errors As soon as

the transaction has een fuy processed contro is returned to your program (The vaue of the

parameter 4PAT7 determines $hether dataase updates are eecuted or not)

7 (ispay errors ony)As soon as an error occurs in a screen the transaction is s$itched to dispay mode so that you can

correct the errors

These dispay modes are the same as those in the atch input session processing

copy SAP AG BC420 12-64

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 6588

082

983209 SAP AG 1999

RE)ORT 777-

2A TRANSA2TION FD USING BD2DATA U)DATE -

ALL TRASATI Camp

RE)ORT 777-

2A TRANSA2TION FD USING bdcdata U)DATE -

2A TRANSA2TION 3tranact9oncode4 USING 3bdc1table4 C (ODE A E N C U)DATE A S C -

Default for UPDAT1 is A

-ith the parameter 4PAT7 you can contro ho$ dataase updates arising from a transaction are

carried out There are three options

A (asynchronous updating) The caed transaction does not $ait unti the dataase has een

updated it simpy for$ard the updates to the SAP update service This usuay speeds up the 2T

program This processing mode is N5T recommended for arge data sets as the caed transaction

does not receive a competion message from the update modue

The caing 2T program therefore cannot te if the transaction has een successfuy competed Cou

shoud use the updating administration function (transaction S8) to determine $hether updating

$as terminated eary The error anaysis correction functions for are ess hepfu than $ith

synchronous updating

S (synchronous updating) -ith synchronous updating the caed transaction $aits unti a the

updates have een competed So processing is so$er than $ith synchronous updating The caed

transaction can ho$ever report any updating errors to the program $hich maes error

anaysiscorrection easier

+ (local updating) $ith oca updating the dataase is not updated in a separate process it is

updated in the caers process (see appication hep documentation for the AAP ey$ord S7T

4PAT7 TAS6 +52A+)

copy SAP AG BC420 12-65

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 6688

088

983209 SAP AG 1999

ALL TRASATI C

RE)ORT 777-DATA mtab T0)E TABE OF bdcm8coll-

2A TRANSA2TION FD USING bdcdata (ESSAGES INTO mtab-

2A TRANSA2TION 3tranact9oncode4 USING 3bdc1table4 C (ODE A E N C U)DATE A S C (ESSAGES INTO 3metab4 C -

7SSAlt7S specifies that a system messages that are output during the eecution of a 2A++

TampANSA2TI5N are $ritten to the interna tae L7SSTA The interna tae must have the

structure 2Slt25++

4nie the cassica atch input processing $ith sessions 2A++ TampANSA2TI5N does not offer any

specia processing procedures for transactions containing errors There are no restart functions for

transactions that contain errors or that cause updating terminations

copy SAP AG BC420 12-66

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 6788

083

983209 SAP AG 1999

ALL TRASATI C4

RE)ORT 777-DATA mltot T0)E ctuaram-

2A TRANSA2TION FD USING BD2DATA

O)TIONS FRO( mltot-

2A TRANSA2TION 3tranact9oncode4 USING 3bdc1table4 C (ODE A E N C U)DATE A S C (ESSAGES INTO 3metab4 C O)TIONS FRO( ot C -

RE)ORT 777-DATA mltot T0)E ctuaram-2A TRANSA2TION FD USING bdcdata

O)TIONS FRO( mltot-

The addition 5PTI5NS enaes the ca transaction statement to e controed through a structure

The structure must have the dictionary type 2T43PAampAS

The addition 5PTI5NS Famp5 must not e comined either $ith the addition 57 or $ith

4PAT7 ore information on the net side

copy SAP AG BC420 12-67

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 6888

085

983209 SAP AG 1999

Structure TUltPARAMS

DISMD1 Procen mode anaoo o addon amp

UPDMD1 $pdae mode anaoo o addon $PA

ATTMD1 CA mode CA conro

D19SI1 orce de=a EndoE e drn procen

RAMMIT +o eD a Camp amp(

IPT +o a ac np eonF a F S-B+P SPAC

I1D +o a ac np eon a=er end o= BC daa

The components are defined as foo$s

The components 7FSIM7 ampA25IT N5INPT and N5I7N can have the foo$ing

vaues KGK E Ces or K K E No

If the addition 5PTI5NS Famp5 is not specified the foo$ing settings appy to the contro

parameters

IS57 from addition 57

4P57 from addition 4PAT7

2ATT57 2ATT not active

7FSIM7 o not not use defaut $indo$s siDe

ampA25IT Successfu eit at 25IT -5amp6

N5INPT atch input session active (SC9INPT E G)

N5I7N atch input session sti active after end of 2 data

copy SAP AG BC420 12-68

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 6988

087

983209 SAP AG 1999

SMSBID Message ID

SMSBT Message T(pe C1GIGWGSGA

SMSB Message umber

SMSB6 Message ariable 6

SMSBamp Message ariable amp

SMSB Message ariable

SMSB4 Message ariable 4

SMSBID Message ID

SMSBT Message T(pe C1GIGWGSGA

SMSB Message umber

SMSB6 Message ariable 6

SMSBamp Message ariable amp

SMSB Message ariable

SMSB4 Message ariable 4

Return code$

S(stem fields$

alue Meaning

0 Successful

6000 1rror in transaction

6000 1rror in processing call transaction

see also the s(stem fields specified

alue Meaning

0 Successful

6000 1rror in transaction

6000 1rror in processing call transaction

see also the s(stem fields specified

9ield name Meaning9ield name9ield name MeaningMeaning

Return ode and S(stem 9ields

The return code is used to specify $hether the caed transaction $as processed successfuy In

addition severa system fieds are fied The numer I type and variaes of the diaog message

output y the caed transaction Cou need this information to output the message tet

copy SAP AG BC420 12-69

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 7088

030

983209 SAP AG 1999

Benerated Program of the TA Recorder

REFRES= (ESSTAB-

2A TRANSA2TION tcode USING bdcdata (ODE ctumode U)DATE cudate (ESSAGES INTO metab-OO) AT metab- ENDOO)-IF lubrc 34 AND e8rou 34 S)A2E- IF e8rouoenend - 2A FUN2TION BD2O)ENGROU) E)ORTING ---------

--------- E8rouoened - ENDIF- 2A FUN2TION BD2INSERT E)ORTING T2ODE tcode TABES D0N)ROTAB bdcdata-ENDIF-REFRES= bdcdata-

Message table output

pen error session

Insert data record that

has errors into error

session

If you have seected ca transaction on the seection screen the generated program runs as foo$s

The onine transaction is caed $ith ca transaction and passed to tae 2ATA A the

messages arising during the ca transaction are put in the interna tae 7SSTA

7SSTA is output as a ist

If you have specified an error session ( 73ltamp54P L SPA27) on the seection screen and the

ca transaction comes across an error (+3S4amp2 L 0) the error session is opened The error

session is ho$ever ony opened once Then the data record is paced in the session

A the other data records that have errors $ith ca transaction are paced in the same session

copy SAP AG BC420 12-70

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 7188

036

983209 SAP AG 1999

The Transaction Recorder

PrinciplesPrinciples

Recording )ith the LSMWRecording )ith the LSMW

Principles of atch Input and all TransactionPrinciples of atch Input and all Transaction

Integrating the TA Program into the DWIntegrating the TA Program into the DW

Using the TA Recorder Using the TA Recorder

copy SAP AG BC420 12-71

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 7288

03amp

983209 SAP AG 1999

Integrating into the DW

Transfer program

AAP Dictionar(

Integrate

SDA0

SDA6

SDAamp

SDA

Cou can integrate the generated program into the G9- The structure of the fie must e created

in the AAP ictionary The taes SGA0 SGA8 SGA1 and SGA $i e fied

copy SAP AG BC420 12-72

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 7388

03

983209 SAP AG 1999

DW Release 42

Goo

-B eeae 45

aa ran=er ogtec

Int customer data transfer ob-ect

ecord =ed

Dece daa ran=er

d Goo

The ampunction ampor interatin TA recorder prora$s is

i$ple$ented in the

D+-B in Release

The recorder can e integrated as of ampeease and it is provided in the G9- ampeease

ltot to the G9- ampeease 5n the initia screen you can integrate programs y choosing ampoto

( +nt customer ata transfer o-ect

copy SAP AG BC420 12-73

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 7488

034

983209 SAP AG 1999

reating Program as D b-ect

Comer ran=er ogtec

ampgtec ype

Sor eD =or ogtec

aa ran=er proram

Srcre name

9900

(+A1

Cane comer

ZBCA+G

ZB

ustomer transfer ob-ect

umber bet)een 7000 and 7777

b-ect t(pe

Assignment to R ob-ect

Short tet for D ob-ectShort description

Data transfer program

ame of generated program

Structure name

A structure Cstructure la(out )ith this name is created in

the AAP Dictionar(

For ampeease transfer oects $ere not organiDed y 5amp oects ut y a G numer (00089

OOOO) The numer range O0009OOOO is reserved for customers

To create a connection to the ne$ G 9- you must assign the program to a 5amp oect

2reate a short tet for the G oect This tet $i appear in the method seection ist

Specify the program to e incuded

Specify a name for the structure to e created in the AAP ictionary

Note $he generated program appears under program type +N and not under program type

-

copy SAP AG BC420 12-74

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 7588

032

983209 SAP AG 1999

Adantages

Automatic program registration in the DW in

Release 48

ou can use all the functions defined for

standard ob-ects

1ception$ The (reate ampile ith data

function

If you incuded the oect in the ampeease $orench it is automaticay avaiae in the ampeease

B $orench

A the $orench functions are avaiae for your oect ecept for Create files ith transfer ata

copy SAP AG BC420 12-75

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 7688

038

983209 SAP AG 1999

ou are no) able to$

The Transaction Recorder$ Unit Summar(

Use the recording function in the LSMW to create

a batch input session )ith the data from the

eternal s(stem

Use the TA Recorder to create (our o)n data

transfer program

Anal(e programs that )or+ )ith batch input or

call transaction

Integrate the TA Recorder programs into the

DW

copy SAP AG BC420 12-76

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 7788

ercise 1

nit $ -ecorder

$opic 2reating etors

$ransaction -ecorder ercise 1

bull 2reating detors $ith eterna numer assignment

bull etor numers M9980008 to M9980080

Address data for detors $ith eterna numer assignment is to

e transferred using program ampFI700

ro4ect F5

Supro4ect +5

-un +575

$as)s 85 95 8S25

9oad program -F+00

8 In the foo$ing eercises eisting data is to e changed Therefore these detors $ith

eterna numer assignment have to first e created

898 4nder suproect 79 create run 797G9 $ith the name Detors ith

eternal numers

copy SAP AG BC420 12-77

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 7888

891 2reate the foo$ing three tass The tass map the foo$ing process steps

convert data create + session and process + session

89198 In run 797G9 create the foo$ing tas

9 Tas AP9

9 Name 2onvert data 9 Tas type AP

9 Program type +S-

Seect the foo$ing +S- oect

+S- proect 2109

+S- suproect 7I9

+S- oect I997GT

89191 In run 797G9 create the foo$ing tas 9 Tas +5A9

9 Name 2reate I session

Tas type +5A

9 Program type INP

Seect program ampFI700 $ith the variant

I97G9

8919 In run 797G9 create the foo$ing tas

9 Tas S29

9 Name Process I session Tas type S2

9 Program type amp7P5

Seect program ampS2S4 $ith the variant

S497G9

Note that you have to correct the seuence of the tass 2onvert data

create + session and process + session

4se the uttons

89 Start the run

The detors $i e created $ith eterna numer assignments

89 2hec in transaction F0 that the detors M9980008 to M9980080 have een

created

copy SAP AG BC420 12-78

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 7988

ercise

nit $ransaction -ecorder

$opic -ecording function in the 9S8(

bull 2reate a recording using the +S-

bull ltenerate a atch input session

2hange the detor address data in the amp System

Name of the recording +

Name of the file +2055+F9

8 2reate the recording 7I3 using the +S- ampecord the transaction F01 (2hange

detor)

898 efore you create the recording first test the transaction onineQ

For the recording use detor M9980008 5n the initia screen of the F01

maintain the foo$ing fieds ony

etor etor M9980008

2ompany code 0008

Address data seect

Note $he data record must e saved hile recording

891 aintain the names and the descriptions for the foo$ing fieds

Name city street posta code and teephone numereete a other fieds in screen 880 from the recording (eg S5ampT+ +AN8

SPampAS)

4se the same technica names as sho$n in the tae eo$ (automatic fied

mapping)

copy SAP AG BC420 12-79

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 8088

1 2reate the suproect 7I9 and the ne$ oect TA3 in your proect 2109

aintain the oect attriutes and seect the item atch input recording Seect your

recording 7I3

2reate the source structure address

2reate the source fieds according to the tae eo$ 5r copy them from proect 2109S37N suproect 7I900 oect TA900

198 Fie setup The data from the egacy system are dispayed in the foo$ing tae

Fied name Fied type Fied ength escription

N5 2 8B etor numer

NA7 2 Name

STamp77T 2 Street

2ITC 2 2ityPace of residence

MIP 2 80 Posta code

T7+ 2 8B Teephone numer

191 aintain the fied mapping 4se the automatic fied mapping (via menu item

7tras)

19 Specify the fies 5ny maintain the fie name of the source fie

Name of the fie 21099IFI+7

2odepage 8800

19 Import the data and convert them ispay the data in each caseQ

19 2reate a atch input session

19B ampun the atch input session

copy SAP AG BC420 12-80

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 8188

ercise 3

nit $ransaction -ecorder

$opic -ecording ith the $ -ecorder

bull ltenerate a recording using the TA recorder

bull Test the recording

2hange the address data of detors in the amp system

Name recording $+

Name of the file +2055+F9

8 2reate the recording TA37I3 using the transaction recorder ampecord the

transaction F01 (change detor)

898 4se detor M9980008 for the recording 5n the F01 initia screen ony

maintain the foo$ing fieds

etor etor M9980008

2ompany 2ode 0008

Address data seect

Note $he data record must e saved hen recording

eete a fieds that do not eist in the source fie 21099IFI+7 from screen

880 in the recording (eg 6NA89S5ampT+ 6NA89+AN8 6ANNQ9SPampAS) Note o not deete fieds ampF01946ampS and ampF0190880

Save the recording no$

1 S$itch to the recordings overvie$

198 Process the recording $ith the processing mode A (dispay a)

191 Process the recording $ith the processing mode RN (no dispay)

19 If the recording has een tested and no error has occurred generate a I session

and run it using the I monitor If an error shoud occur generate the recordingagainQ

copy SAP AG BC420 12-81

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 8288

From the recording generate the program M21037I3 in your deveopment cass

2109 Seect the foo$ing

bull ampead fied contents from fie

bull 2reate test data in the fie 2103dei3test3tt

98 Save this program and eecute it ltenerate one I session each and process it

2arry out the same steps again using the ca transaction

The generated program shoud no$ e changed so that fie 21099IFI+7 can e

read and processed

98 2hange the defaut vaue of the fie name (parameter dataset) in 21099

IFI+7

91 2hange the structure definition eete the company code fied and the address

data checo from the structure

9 2hange the su9routine ca perform dc3fied for the company code (KampF019

46ampSK) so that the vaue 0008 is transferred

9 2hange the su9routine ca perform dc3fied for the address data checo

(KampF0190880K) so that the vaue G is transferred

9 Start the program again and read the data from the fie 21099IFI+7 $ith

detor data ltenerate a I session $ith it and run it

copy SAP AG BC420 12-82

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 8388

033 Include DR16INCLUDE BDCRECX1

SELECTION-SCREEN BEGIN OF LINE

PARAMETERS SESSION RADIOBUTTON GROUP CTU create sessi SELECTION-SCREEN COMMENT $amp TEXT-S FOR FIELD SESSION

se(ecti-scree )siti +

PARAMETERS CTU RADIOBUTTON GROUP CTU ca(( trasacti

SELECTION-SCREEN COMMENT $amp TEXT-S FOR FIELD CTU

SELECTION-SCREEN END OF LINE

SELECTION-SCREEN BEGIN OF LINE

SELECTION-SCREEN COMMENT $amp TEXT-S1 FOR FIELD GROUP

se(ecti-scree )siti $+

PARAMETERS GROUP1$amp r) ae 0 sessi

SELECTION-SCREEN COMMENT $amp TEXT-S+ FOR FIELD CTUMODE

se(ecti-scree )siti

PARAMETERS CTUMODE LIE CTU2PARAMS-DISMODE DEFAULT 3N3

A4 s56 a(( 78)rs

E4 s56 78)r errr (8

N4 7 t 7is)(a8 78)r

SELECTION-SCREEN END OF LINE

SELECTION-SCREEN BEGIN OF LINE

SELECTION-SCREEN COMMENT $amp TEXT-S$ FOR FIELD USER

se(ecti-scree )siti $+

PARAMETERS4 USER1$amp DEFAULT S9-UNAME ser 0r sessi i atc5

SELECTION-SCREEN COMMENT $amp TEXT-S FOR FIELD CUPDATE

se(ecti-scree )siti

PARAMETERS CUPDATE LIE CTU2PARAMS-UPDMODE DEFAULT 3L3

S4 s8c5rs(8

A4 as8c5rs(8

L4 (ca(

SELECTION-SCREEN END OF LINE

SELECTION-SCREEN BEGIN OF LINE

SELECTION-SCREEN COMMENT $amp TEXT-S FOR FIELD EEP

se(ecti-scree )siti $+

PARAMETERS4 EEP AS CltECBOX 3 3 = 7e(ete sessi i0 0iis5e7

3X3 = gtee) sessi i0 0iis5e7

SELECTION-SCREEN COMMENT $amp TEXT-S FOR FIELD E2GROUP

copy SAP AG BC420 12-83

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 8488

se(ecti-scree )siti

)araeters E2GROUP1$amp r) ae 0 errr-sessi

SELECTION-SCREEN END OF LINE

SELECTION-SCREEN BEGIN OF LINE

SELECTION-SCREEN COMMENT $amp TEXT-S FOR FIELD ltOLDDATE

se(ecti-scree )siti $+

PARAMETERS4 ltOLDDATE LIE S9-DATUM

SELECTION-SCREEN COMMENT +11amp TEXT-S$ FOR FIELD E2USER

se(ecti-scree )siti

PARAMETERS4 E2USER1$amp DEFAULT S9-UNAME ser 0r errr-sessi

SELECTION-SCREEN END OF LINE

SELECTION-SCREEN BEGIN OF LINE

SELECTION-SCREEN COMMENT +11amp TEXT-S FOR FIELD E2EEP

se(ecti-scree )siti

PARAMETERS4 E2EEP AS CltECBOX 3 3 = 7e(ete sessi i0 0iis5e7

3X3 = gtee) sessi i0 0iis5e7

SELECTION-SCREEN END OF LINE

SELECTION-SCREEN BEGIN OF LINE

SELECTION-SCREEN COMMENT +11amp TEXT-S FOR FIELD E2ltDATE

se(ecti-scree )siti

PARAMETERS4 E2ltDATE LIE S9-DATUM

SELECTION-SCREEN END OF LINE

SELECTION-SCREEN SIP

SELECTION-SCREEN BEGIN OF LINE

SELECTION-SCREEN COMMENT 1amp TEXT-S1 FOR FIELD NODATA

PARAMETERS4 NODATA DEFAULT 33 LOER CASE 7ata

SELECTION-SCREEN END OF LINE

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

Batc5i)t7ata 0 si(e trasacti

DATA4 BDCDATA LIE BDCDATA OCCURS ITlt ltEADER LINE

essaes 0 ca(( trasacti

DATA4 MESSTAB LIE BDCMSGCOLL OCCURS ITlt ltEADER LINE

errr sessi )ee7 3 3 r 3X3amp

DATA4 E2GROUP2OPENED

essae tets

TABLES4 T1

copy SAP AG BC420 12-84

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 8588

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

at se(ecti scree

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

AT SELECTION-SCREEN

r) a7 ser st e 0i((e7 0r create sessi

IF SESSION = 3X3 AND

GROUP = SPACE OR USER = SPACE

MESSAGE E1MSamp

ENDIF

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

)e 7ataset

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

FORM OPEN2DATASET USING P2DATASET

OPEN DATASET P2DATASET IN TEXT MODE

IF S9-SUBRC

RITE4 TEXT-E S9-SUBRC

STOP

ENDIF

ENDFORM

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

c(se 7ataset

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

FORM CLOSE2DATASET USING P2DATASET

CLOSE DATASET P2DATASET

ENDFORM

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

create atc5i)t sessi

t 0r ca(( trasacti siamp

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

FORM OPEN2GROUP

IF SESSION = 3X3

SIP

RITE4 $amp 3Create r)3I1amp GROUP

SIP

)e atc5i)t r)

CALL FUNCTION 3BDC2OPEN2GROUP3

EXPORTING CLIENT = S9-MANDT

copy SAP AG BC420 12-85

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 8688

GROUP = GROUP

USER = USER

EEP = EEP

ltOLDDATE = ltOLDDATE

RITE4 amp 3BDC2OPEN2GROUP3I$amp

1$amp 3retrc7e43I+amp

S9-SUBRC

ENDIF

ENDFORM

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

e7 atc5i)t sessi

ca(( trasacti si4 errr sessiamp

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

FORM CLOSE2GROUP

IF SESSION = 3X3

c(se atc5i)t r)

CALL FUNCTION 3BDC2CLOSE2GROUP3

RITE4 amp 3BDC2CLOSE2GROUP3Iamp

1$amp 3retrc7e43I+amp

S9-SUBRC

ELSE

IF E2GROUP2OPENED = 3X3

CALL FUNCTION 3BDC2CLOSE2GROUP3

RITE4

RITE4 amp 3Fe5(era))e 6r7e eret3Iamp

ENDIF

ENDIF

ENDFORM

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

Start e6 trasacti accr7i t )araeters

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

FORM BDC2TRANSACTION USING TCODE

DATA4 L2MSTRINGamp

DATA4 L2SUBRC LIE S9-SUBRC

atc5 i)t sessi

IF SESSION = 3X3

CALL FUNCTION 3BDC2INSERT3

EXPORTING TCODE = TCODE

TABLES D9NPROTAB = BDCDATA

RITE4 3BDC2INSERT3Iamp

copy SAP AG BC420 12-86

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 8788

TCODE

3retrc7e43I+amp

S9-SUBRC

3RECORD43

S9-INDEX

ca(( trasacti si

ELSE

REFRESlt MESSTAB

CALL TRANSACTION TCODE USING BDCDATA

MODE CTUMODE

UPDATE CUPDATE

MESSAGES INTO MESSTAB

L2SUBRC = S9-SUBRC

RITE4 3CALL2TRANSACTION3

TCODE

3retrc7e43I+amp

L2SUBRC

3RECORD43

S9-INDEX

LOOP AT MESSTAB

SELECT SINGLE FROM T1 ltERE SPRSL = MESSTAB-MSGSPRA

AND ARBGB = MESSTAB-MSGID

AND MSGNR = MESSTAB-MSGNR

IF S9-SUBRC =

L2MSTRING = T1-TEXT

IF L2MSTRING CS 313

REPLACE 313 ITlt MESSTAB-MSGH1 INTO L2MSTRING

REPLACE 3$3 ITlt MESSTAB-MSGH$ INTO L2MSTRING

REPLACE 33 ITlt MESSTAB-MSGH INTO L2MSTRING

REPLACE 33 ITlt MESSTAB-MSGH INTO L2MSTRING

ELSE

REPLACE 33 ITlt MESSTAB-MSGH1 INTO L2MSTRING

REPLACE 33 ITlt MESSTAB-MSGH$ INTO L2MSTRING

REPLACE 33 ITlt MESSTAB-MSGH INTO L2MSTRING

REPLACE 33 ITlt MESSTAB-MSGH INTO L2MSTRING

ENDIF

CONDENSE L2MSTRING

RITE4 MESSTAB-MSGT9P L2MSTRING$+amp

ELSE

RITE4 MESSTAB

ENDIF

ENDLOOP

copy SAP AG BC420 12-87

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 8888

SIP

Eree 0e5(era))e

IF L2SUBRC AND E2GROUP SPACE

IF E2GROUP2OPENED = 3 3

CALL FUNCTION 3BDC2OPEN2GROUP3

EXPORTING CLIENT = S9-MANDT

GROUP = E2GROUP

USER = E2USER

EEP = E2EEP

ltOLDDATE = E2ltDATE

E2GROUP2OPENED = 3X3

ENDIF

CALL FUNCTION 3BDC2INSERT3

EXPORTING TCODE = TCODE

TABLES D9NPROTAB = BDCDATA

ENDIF

ENDIF

REFRESlt BDCDATA

ENDFORM

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

Start e6 scree

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

FORM BDC2D9NPRO USING PROGRAM D9NPRO

CLEAR BDCDATA

BDCDATA-PROGRAM = PROGRAM

BDCDATA-D9NPRO = D9NPRO

BDCDATA-D9NBEGIN = 3X3

APPEND BDCDATA

ENDFORM

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

Isert 0ie(7

Page 39: BC420_46C - 012The Transaction Recorder

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 3988

07

983209 SAP AG 1999

I Mode

atch input

mode

nline

Some transactions behae differentl( in batch input mode

than in online Cbatch input capabilit(

atch input mode sets the s(stem field SIPT H

Not every transaction can run the same onine and in atch input mode The transaction must decide

itsef $hether it is caed onine or in atch input mode

The system sets the system fied SC9INPT E G if the atch input mode is active (this aso appies

to ca transaction) From this system fied the transaction can identify $hether to run onine or in

atch input mode

copy SAP AG BC420 12-39

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 4088

040

983209 SAP AG 1999

reating a Session 9rom the Recording

Recordingnl( contains the data

from the recording

Seon name 02amp

Aoraon ampBS(eep eon

oclt dae 10102000

Cou can create a atch input session directy from the recording that you can then process using the

atch input monitor

copy SAP AG BC420 12-40

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 4188

046

983209 SAP AG 1999

reating Test Data

Test Data

Recording

ranranpBC420AAe name

The file onl( contains the data from the recording

Rgt

Application Serer

Structure

Cou can create a fie from the recordingH the fie $i contain a the fieds from the recording The

fieds are added to the fie $ith the ength you specified in the definition

The fied order corresponds to the order in the recording overvie$ Technica fieds

(2356257 2324ampS5amp and so on) are incuded

The data can ony e stored on the appication server If you do not specify a path the fie is stored in

the $or directory of the appication server

If the specified test fie aready eists the ne$ data record is added to this fie

copy SAP AG BC420 12-41

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 4288

04amp

983209 SAP AG 1999

ed conen

reating a Program

Recording

ZBC420ampProram name

Transfer Program

e daa

ead =rom =e

ran=er =rom recordn

reate

9ile nameTest data

ranranpBC420AA

Cou can generate a program from the recording

In the foo$ing diaog o enter a program name In addition you can choose the type and method

for fiing the maintained fied contents from the recorded screens

4se the vaues used for the recording If you reuire feie data transfer you $i have to modify

this program ater

ParameteriDe the input vaues and read these vaues from a fie A data structure is created for

parameteriDationH the data records are read from an eterna fie into this data structure The

program assumes the fie $as taiored to this data structure

If you have decided to parameteriDe the input vaues you shoud aso create a test fie during

generation To do this seect the checo and enter a name for the fie

The attriute maintenance screen of the AAP editor appears aintain the attriutes and save the

program

copy SAP AG BC420 12-42

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 4388

04

983209 SAP AG 1999

Program 9unctions

Online

transaction

Transfer program

To

error

1rror

ption 6ption ampFlat SAP

structure

Monitor

Cou have no$ generated a data transfer program for importing data into the amp System The

program can eecute the data transfer using atch input or ca transaction

If you choose option 1 and there is an error the data record is paced into a atch input session

copy SAP AG BC420 12-43

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 4488

044

983209 SAP AG 1999

Benerating 9unction Modules

Recording

Zcreaedeor ncon mode

ncon rop

Sor eD

ZBC420

Creae comer

9unction module

nl( one data record can be processed at a time

In the net diaog o you can generate a function modue a function group and short tet from the

recording The function modue is automaticay created in the function group

copy SAP AG BC420 12-44

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 4588

042

983209 SAP AG 1999

9unction of 9unction Modules

Online

transaction

To

error

1rror

ption 6 ption amp

9unction module

Import

Parameter 1port

parameter

Tables

M1SSTA

Monitor

S$BC

Import interface

The import interface consists of a technica part and the fieds from the recording (A parameter is

created for each input fied of the recorded transactions)

7port interface

Simpy consists of the parameter S4amp2 The function modue $i return a vaue in the system

fied SC9S4amp2 after caing ca transaction This return vaue is set to Dero if the data record has

een correcty processed (5ny appies to 2T)

If a session is created you $i e notified $hether the data record coud e paced into the session

Tae interfaceThis is used ony if the function modue $ors $ith ca transaction The tae contains a the

system messages

copy SAP AG BC420 12-45

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 4688

048

983209 SAP AG 1999

Import Interface of 9unction Module

$

Technical

fields

Data

fields

BI session or CALL TRANSACTION

Processin $ode

pdate $ode

a$e oamp BI session iamp (T initial)

Bacround user iamp (T initial)

Delete session aampter processin

Loc date oamp session

ODATA indicator

TU

MD1

UPDAT1

BRUP

US1R

=11P

ELDDAT1

DATA

Cou can use parameter 2T4 to specify $hether the function modue creates a atch input session

(2T4 E ) or updates the data record directy using ca transaction (2T4 E G)

The other parameters are fied as for a atch input session header

Note 7very time the function modue is caed a atch input session is created

If the session is to contain severa transactions proceed as foo$s

ltenerate the transaction severa times This can e achieved y recording the transaction again The

function modue interface $i then contain more than one transaction -hen the function modue is

caed severa transactions can e generated for each session

copy SAP AG BC420 12-46

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 4788

043

983209 SAP AG 1999

The Transaction Recorder

PrinciplesPrinciples

Recording )ith the LSMWRecording )ith the LSMW

Principles of atch Input and all TransactionPrinciples of atch Input and all Transaction

Integrating the TA Program into the DWIntegrating the TA Program into the DW

Using the TA Recorder Using the TA Recorder

copy SAP AG BC420 12-47

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 4888

045

983209 SAP AG 1999

Benerated Program

9unction modules DltP1ltBRUP

DltIS1RT

DltLS1ltBRUP

AAP Program

Define structure of

data in seJuential

fileDefine D

table

pen seJuential file

pen I session

Read data recordCseJuential file

9ill D table

9ill I session gtALL TRASATI

Last data record K

lose I session

lose seJuential file

The generated program has the structure dispayed aove It uses the standard function modues for

creating atch input sessions

copy SAP AG BC420 12-48

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 4988

047

983209 SAP AG 1999

Structure of the Benerated Program

Benerated part

Define D

table

pen seJuential file

pen I session

Read data record

9ill D table

9ill I session gtALL TRASATI

Last data recordK

lose I session

lose seJuential file

Include DR16

Define filestructure

P1ltDATAS1T

P1ltBRUP

DltDPR

Dlt9I1LD

DltTRASATI

LS1ltBRUP

LS1ltDATAS1T

The generated program consists of t$o parts 9 a generated part and the incude 2amp72G8 The

incude is provided in the standard system

The incude contains the definition of the reuired 2 tae and a further seven suroutines These

suroutines eecute the foo$ing functions

5pen and cose fie

5pen and cose session

Fi 2 tae

Fi session

The generated part is the main program and cas the reevant suroutines A structure is aso

generated in the generated part to read the eterna data into the fie

See the Appendi for more information on the 2amp72G8 program

copy SAP AG BC420 12-49

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 5088

020

983209 SAP AG 1999

Structure of D Table

PRBRAM DPR D1BI 9AM 9ALPRBRAMPRBRAM DPRDPR D1BID1BI 9AM9AM 9AL9AL

SAPM90ampD 0602

R90ampD=UR 600000

R90ampDU=RS 0006

R90ampD=T=D =UA

SAPM90ampD 0660

=A6AM16 Smith

=A6PSTL 87000

=A6LAD6 US

=A6SPRAS 1

SAPM90ampD 06amp0

=A6ST1B US6amp428357DDATA

PRBRAM

DPR

D1BI

9AM

9AL

EAR

UM

EAR

EAR

EAR

40

4

6

6amp

6amp

D Module pool

D Screen number

D Start of screen

D 9ield name

D 9ield contents

9ield ame T(pe Length Short Tet

AAP Dictionar(

The 2 tae has the same structure as in a standard transfer

copy SAP AG BC420 12-50

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 5188

026

983209 SAP AG 1999

Read Structure

Recording

DATA BEGIN OF record data element BUKRS bukr$amp data element KTOKD ktokd$amp data element NA(EG) name$+amp data element SORT ortl$ampEND OF record-

record

Automaticall( generated

from recording

The structure of the fie is automaticay generated and is a$ays defined $ith the name amp725amp

The generated structure a$ays has the same ayout 7ach fied is defined y t$o generated ro$s

The first ro$ is a$ays a comment ro$ containing the tet J data eement and the data eement of

the screen fied from the recording In the net ro$ the fied itsef is defined $ith the name of the

data eement foo$ed y a three9digit position numer $hich specifies the ocation in the structure

The ength of the fied is set y the ength of the data eement If a fied is not defined through a data

eement the system uses the ength of the screen fied

copy SAP AG BC420 12-51

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 5288

02amp

983209 SAP AG 1999

pening and losing the 9ile

P1ltDATAS1T

LS1ltDATAS1T

FOR( oendataet USING dataet-O)EN DATASET dataet IN TET (ODE-

IF S01SUBR2 34 - 5RITE 6 te7t1e S01SUBR2-STO)-

ENDIF-

ENDFOR(-

FOR( cloedataet USING dataet-2OSE DATASET dataet-

ENDFOR(-

Include

DR16

The suroutine 5P7N3ATAS7T opens the seuentia fie

The suroutine 2+5S73ATAS7T coses the seuentia fie

copy SAP AG BC420 12-52

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 5388

02

983209 SAP AG 1999

9unction Modules for I Program

lient

Session name

Eold date

=eep session

D user name

RecordK

LI1T

BRUP

ELDDAT1

=11P

US1R

R1RD

DltP1ltBRUPDltP1ltBRUP

Transaction code

D table

TD1

DPRTA

DltIS1RTDltIS1RT

DltLS1ltBRUPDltLS1ltBRUP

pen Isessionpen Isession

Insert data for

transactions

Insert data for

transactions

lose I

session

lose I

session

The foo$ing function modues are provided for creating atch input sessions (function group

S2)

235P7N3ltamp54P

2reates a ne$ session and contains genera data for the $hoe session

23INS7ampT

Inserts a the data for a transaction into the session The transferred interna tae $ith the

structure 2ATA must contain a the data reuired for fuy processing the transaction

232+5S73ltamp54P

2oses the session after a the data has een inserted As soon as the session has een cosed it

can e processed

The interna tae $ith the structure 2ATA can ony contain atch input data for one singe

transaction run So the individua transactions are inserted into the atch input session in a oop

using severa 23INS7ampT cas

copy SAP AG BC420 12-53

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 5488

024

983209 SAP AG 2001

9unction Module DltP1ltBRUP

ALL 9UTI DltP1ltBRUPALL 9UTI DltP1ltBRUP

1PRTIB

LI1T client

BRUP session name

ELDDAT1 loc+ date

=11P delete flag

US1R bdc user name

R1RD recording

IMPRTIB

NID internal session +e(

11PTIS

1PRTIB

LI1T client

BRUP session name

ELDDAT1 loc+ date

=11P delete flag

US1R bdc user name

R1RD recording

IMPRTIB NID internal session +e(

11PTIS

-ith the function modue 235P7N3ltamp54P you can open a atch input session

The foo$ing parameters are mandatory

2+I7NT (cient)

ltamp54P (session name)

4S7amp (user name)

Note The 4S7amp must a$ays e specified This user name is reuired for processing the session

in atch mode

The foo$ing parameters are optiona

=5+AT7 specifies the eariest date on $hich the session can e started677P fag specifies $hether session shoud e deeted after it has een successfuy processed The

677P fag is ignored if the session contains errors

677P E K K means deete the session after processing (defaut vaue) H

677P E KGK means do not deete session

amp725amp E KGK ao$s you to create a recording instead of a I session

If gtI is specified the function modue returns the interna session ey This is needed to e ae to

differentiate sessions that have the same name

-ith 7G27PTI5NS you get various return vaues that can e ueried $ith SC9S4amp2

Note In onine mode the onine user is used for the authoriDation checs regardess of the user

name specified

copy SAP AG BC420 12-54

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 5588

022

983209 SAP AG 1999

Subprogram P1ltBRUP

P1ltBRUP

FOR( oen8rou-IF e9on -

2A FUN2TION BD2O)ENGROU) E)ORTING 2IENT lt1mandt GROU) 8rou USER uer KEE) kee

=ODDATE gtolddate-

ENDIF-ENDFOR(-

Include

DR16

The suprogram 5P7N3ltamp54P opens the atch input session

copy SAP AG BC420 12-55

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 5688

028

983209 SAP AG 1999

9unction Module DltIS1RT

ALL 9UTI DltIS1RTALL 9UTI DltIS1RT

IMPRT

TD1 Transaction code

PSTltLAL Update locall(

PRITIB print list

TAL1S DPRTA bdclttable

11PTIS

IMPRT

TD1 Transaction code

PSTltLAL Update locall(

PRITIB print list

TAL1S DPRTA bdclttable

11PTIS

-ith the function modue 23INS7ampT you can add transaction data to the session

Cou need an interna 2 tae to transfer the data

The foo$ing parameters are mandatory

T257 Transaction code

CNPamp5TA 2 tae

The foo$ing parameters are optiona

P5ST3+52A+ E KGK activates oca updating This means that the data to e updated is ept in the

appication server and updated in the ast step of the transaction This does not invove the update

process (For more information see course 28 Programming ataase 4pdates)

PampINTINlt E KGK 9 ists processed in I $i e printed immediatey -ith 7G27PTI5NS you get various return vaues that can e ueried $ith SC9S4amp2

copy SAP AG BC420 12-56

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 5788

023

983209 SAP AG 1999

Subprogram DltTRASATI

DltTRASATI

FOR( BD2TRANSA2TION USING tcode-

IF e9on -2A FUN2TION BD2INSERT

E)ORTING T2ODE tcode TABES D0N)ROTAB bdcdata-

ESE-

ENDIF-ENDFOR(-

T

Include

DR16

The suprogram 23TampANSA2TI5N moves the fied 2 tae either to a atch input session

or uses ca transaction to import the data into the system 5n the seection screen you can specify

$hether you $ant to create a session or you $ant to use ca transaction to process the data directy

The S7SSI5N fied is then set according to your seection

copy SAP AG BC420 12-57

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 5888

025

983209 SAP AG 1999

9unction Module DltLS1ltBRUP

ALL 9UTI DltLS1ltBRUP

11PTIS

TltP1 6

NU1U1lt1RRR amp

-ith the function modue 232+5S73ltamp54P you can cose a atch input session

In 7G27PTI5NS you get various return vaues that can e ueried $ith SC9S4amp2

copy SAP AG BC420 12-58

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 5988

027

983209 SAP AG 1999

Subprogram LS1ltBRUP

FOR( cloe8rou-IF e9on -cloe batcgt 9nut 8rou

2A FUN2TION BD22OSEGROU)-

ESE-IF e8rouoened -

2A FUN2TION BD22OSEGROU)-

ENDIF-ENDIF-

ENDFOR(-

LS1ltBRUPlose session

lose error session

Include

DR16

The suprogram 2+5S73ltamp54P coses the atch input session The suprogram differentiates

et$een a norma I session (S7SSI5N E G) and a session opened $hen ca transaction

encountered an error (73ltamp54P35P7N7 E G)

copy SAP AG BC420 12-59

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 6088

080

983209 SAP AG 1999

Subprograms DltDPRG Dlt9I1LD

DltDPR

Dlt9I1LD

FOR( bdc9eld USING nam al-IF al 34 nodata-2EAR bdcdata- bdcdata1nam nam- bdcdata1al al- A))END bdcdata-ENDIF-

ENDFOR(-

FOR( bdcdltnro USING ro8ram dltnro- 2EAR bdcdata-Bdcdata1ro8ram ro8ram-Bdcdata1dltnro dltnro-Bdcdata1dltnbe89n - A))END bdcdata-ENDFOR(-

Include

DR16

The incude 2amp72GG contains t$o suprograms 23CNPamp5 and 23FI7+

Suprogram 23CNPamp5 fis the 2 tae $ith program names and screen numers

Suprogram 23FI7+ fis the 2 tae $ith fied names and vaues

7ach suprogram creates an entry in the 2 tae

copy SAP AG BC420 12-60

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 6188

086

983209 SAP AG 1999

9illing the D Table

erorm bdcdltnro u9n8 SA)(FD +- erorm bdc9eld u9n8 BD22URSOR RFD1BUKRS- erorm bdc9eld u9n8 BD2OK2ODE 6- erorm bdc9eld u9n8 RFD1BUKRS record1BUKRS- erorm bdc9eld u9n8 RFD1KTOKD record1KTOKD-

erorm bdcdltnro u9n8 SA)(FD -

erorm bdc9eld u9n8 BD22URSOR KNA1S)RAS- erorm bdc9eld u9n8 BD2OK2ODE 6- erorm bdc9eld u9n8 KNA1NA(E record1NA(E-

erorm bdc9eld u9n8 KNA1SORT record1SORT-

Recording Benerated automaticall(

from the recording

)ERFOR( bdcdltnro USING SA)(FD +- )ERFOR( bdc9eld USING BD22URSOR RFD1BUKRS-)ERFOR( bdc9eld USING BD2OK2ODE 6-)ERFOR( bdc9eld USING RFD1BUKRS record1BUKRS-)ERFOR( bdc9eld USING RFD1KTOKD record1KTOKD-

)ERFOR( bdcdltnro USING SA)(FD -

)ERFOR( bdc9eld USING BD22URSOR KNA1S)RAS-)ERFOR( bdc9eld USING BD2OK2ODE 6-)ERFOR( bdc9eld USING KNA1NA(E record1NA(E-

)ERFOR( bdc9eld USING KNA1SORT record1SORT- ---

The 2 tae is fied $ith data from the recording The suroutines 23CNPamp5 and

23FI7+ are used for this

The suroutines are caed in the reuired structure or seuence

copy SAP AG BC420 12-61

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 6288

08amp

983209 SAP AG 1999

erie)

SAPDatabase

SeJuential9ile

SAPDatabase

ALL TRASATIALL TRASATI

SeJuential9ile

ATE IPUTATE IPUT

D TableD TableD TableD Table

I Monitor

T

In contrast to atch input you can use ca transaction to directy pass data to the diaog interface

$ithout using a atch input session Cou use an interna tae (2 tae same structure and ayout

as atch input) to temporariy store your screen data Then you ca the desired transaction in your

program

Note 5n average the 2a Transaction method is 8 to times faster than using atch Input

copy SAP AG BC420 12-62

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 6388

08

983209 SAP AG 1999

all Transaction Program$ 1ample

RE)ORT abcbdcdcdeb9ct-

)ARA(ETERS d9mode DEFAUT A

udmode DEFAUT S-FOR( calltranact9on-2A TRANSA2TION FD

USING bdcdata (ODE d9mode

U)DATE udmode-

IF lt1ubrc NE - 5RITE 6 ---

ENDIF-ENDFOR(-

Screen

00

Screen

100

Screen

An additiona system ro area is added for the caed transaction The system uses this area for

processing the individua screens in the transactionH the data from the tae is added here After the

transaction is processed the second ro area is reeasedH the system continues processing in the first

ro area

Notes

In contrast to atch input there is no error ogging (error sessions) here For processing the caed

transaction the system uses the authoriDations of the user that caed the transaction The 2 tae

can ony hod data for one transaction run at a time efore another transaction is caed and its data

can e added you must eecute a amp7Famp7S= for the 2 tae

copy SAP AG BC420 12-63

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 6488

084

983209 SAP AG 1999

ALL TRASATI C6

RE)ORT 777-

2A TRANSA2TION FD USING bdcdata (ODE E-

Default for MD1 is A

2A TRANSA2TION 3tranact9oncode4 USING 3bdc1table4 C (ODE A E N C-

-ith the parameter 57 you can seect a specific dispay mode for processing the transaction The

foo$ing three modes are avaiae

A (ispay a)

If you eecute the program a the screens and a their data are dispayed This is the defaut vaue

for the 57 in 2A++ TampANSA2TI5N

N (ispay nothing)

The screens are not dispayed at a regardess of $hether any of them contained errors As soon as

the transaction has een fuy processed contro is returned to your program (The vaue of the

parameter 4PAT7 determines $hether dataase updates are eecuted or not)

7 (ispay errors ony)As soon as an error occurs in a screen the transaction is s$itched to dispay mode so that you can

correct the errors

These dispay modes are the same as those in the atch input session processing

copy SAP AG BC420 12-64

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 6588

082

983209 SAP AG 1999

RE)ORT 777-

2A TRANSA2TION FD USING BD2DATA U)DATE -

ALL TRASATI Camp

RE)ORT 777-

2A TRANSA2TION FD USING bdcdata U)DATE -

2A TRANSA2TION 3tranact9oncode4 USING 3bdc1table4 C (ODE A E N C U)DATE A S C -

Default for UPDAT1 is A

-ith the parameter 4PAT7 you can contro ho$ dataase updates arising from a transaction are

carried out There are three options

A (asynchronous updating) The caed transaction does not $ait unti the dataase has een

updated it simpy for$ard the updates to the SAP update service This usuay speeds up the 2T

program This processing mode is N5T recommended for arge data sets as the caed transaction

does not receive a competion message from the update modue

The caing 2T program therefore cannot te if the transaction has een successfuy competed Cou

shoud use the updating administration function (transaction S8) to determine $hether updating

$as terminated eary The error anaysis correction functions for are ess hepfu than $ith

synchronous updating

S (synchronous updating) -ith synchronous updating the caed transaction $aits unti a the

updates have een competed So processing is so$er than $ith synchronous updating The caed

transaction can ho$ever report any updating errors to the program $hich maes error

anaysiscorrection easier

+ (local updating) $ith oca updating the dataase is not updated in a separate process it is

updated in the caers process (see appication hep documentation for the AAP ey$ord S7T

4PAT7 TAS6 +52A+)

copy SAP AG BC420 12-65

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 6688

088

983209 SAP AG 1999

ALL TRASATI C

RE)ORT 777-DATA mtab T0)E TABE OF bdcm8coll-

2A TRANSA2TION FD USING bdcdata (ESSAGES INTO mtab-

2A TRANSA2TION 3tranact9oncode4 USING 3bdc1table4 C (ODE A E N C U)DATE A S C (ESSAGES INTO 3metab4 C -

7SSAlt7S specifies that a system messages that are output during the eecution of a 2A++

TampANSA2TI5N are $ritten to the interna tae L7SSTA The interna tae must have the

structure 2Slt25++

4nie the cassica atch input processing $ith sessions 2A++ TampANSA2TI5N does not offer any

specia processing procedures for transactions containing errors There are no restart functions for

transactions that contain errors or that cause updating terminations

copy SAP AG BC420 12-66

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 6788

083

983209 SAP AG 1999

ALL TRASATI C4

RE)ORT 777-DATA mltot T0)E ctuaram-

2A TRANSA2TION FD USING BD2DATA

O)TIONS FRO( mltot-

2A TRANSA2TION 3tranact9oncode4 USING 3bdc1table4 C (ODE A E N C U)DATE A S C (ESSAGES INTO 3metab4 C O)TIONS FRO( ot C -

RE)ORT 777-DATA mltot T0)E ctuaram-2A TRANSA2TION FD USING bdcdata

O)TIONS FRO( mltot-

The addition 5PTI5NS enaes the ca transaction statement to e controed through a structure

The structure must have the dictionary type 2T43PAampAS

The addition 5PTI5NS Famp5 must not e comined either $ith the addition 57 or $ith

4PAT7 ore information on the net side

copy SAP AG BC420 12-67

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 6888

085

983209 SAP AG 1999

Structure TUltPARAMS

DISMD1 Procen mode anaoo o addon amp

UPDMD1 $pdae mode anaoo o addon $PA

ATTMD1 CA mode CA conro

D19SI1 orce de=a EndoE e drn procen

RAMMIT +o eD a Camp amp(

IPT +o a ac np eonF a F S-B+P SPAC

I1D +o a ac np eon a=er end o= BC daa

The components are defined as foo$s

The components 7FSIM7 ampA25IT N5INPT and N5I7N can have the foo$ing

vaues KGK E Ces or K K E No

If the addition 5PTI5NS Famp5 is not specified the foo$ing settings appy to the contro

parameters

IS57 from addition 57

4P57 from addition 4PAT7

2ATT57 2ATT not active

7FSIM7 o not not use defaut $indo$s siDe

ampA25IT Successfu eit at 25IT -5amp6

N5INPT atch input session active (SC9INPT E G)

N5I7N atch input session sti active after end of 2 data

copy SAP AG BC420 12-68

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 6988

087

983209 SAP AG 1999

SMSBID Message ID

SMSBT Message T(pe C1GIGWGSGA

SMSB Message umber

SMSB6 Message ariable 6

SMSBamp Message ariable amp

SMSB Message ariable

SMSB4 Message ariable 4

SMSBID Message ID

SMSBT Message T(pe C1GIGWGSGA

SMSB Message umber

SMSB6 Message ariable 6

SMSBamp Message ariable amp

SMSB Message ariable

SMSB4 Message ariable 4

Return code$

S(stem fields$

alue Meaning

0 Successful

6000 1rror in transaction

6000 1rror in processing call transaction

see also the s(stem fields specified

alue Meaning

0 Successful

6000 1rror in transaction

6000 1rror in processing call transaction

see also the s(stem fields specified

9ield name Meaning9ield name9ield name MeaningMeaning

Return ode and S(stem 9ields

The return code is used to specify $hether the caed transaction $as processed successfuy In

addition severa system fieds are fied The numer I type and variaes of the diaog message

output y the caed transaction Cou need this information to output the message tet

copy SAP AG BC420 12-69

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 7088

030

983209 SAP AG 1999

Benerated Program of the TA Recorder

REFRES= (ESSTAB-

2A TRANSA2TION tcode USING bdcdata (ODE ctumode U)DATE cudate (ESSAGES INTO metab-OO) AT metab- ENDOO)-IF lubrc 34 AND e8rou 34 S)A2E- IF e8rouoenend - 2A FUN2TION BD2O)ENGROU) E)ORTING ---------

--------- E8rouoened - ENDIF- 2A FUN2TION BD2INSERT E)ORTING T2ODE tcode TABES D0N)ROTAB bdcdata-ENDIF-REFRES= bdcdata-

Message table output

pen error session

Insert data record that

has errors into error

session

If you have seected ca transaction on the seection screen the generated program runs as foo$s

The onine transaction is caed $ith ca transaction and passed to tae 2ATA A the

messages arising during the ca transaction are put in the interna tae 7SSTA

7SSTA is output as a ist

If you have specified an error session ( 73ltamp54P L SPA27) on the seection screen and the

ca transaction comes across an error (+3S4amp2 L 0) the error session is opened The error

session is ho$ever ony opened once Then the data record is paced in the session

A the other data records that have errors $ith ca transaction are paced in the same session

copy SAP AG BC420 12-70

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 7188

036

983209 SAP AG 1999

The Transaction Recorder

PrinciplesPrinciples

Recording )ith the LSMWRecording )ith the LSMW

Principles of atch Input and all TransactionPrinciples of atch Input and all Transaction

Integrating the TA Program into the DWIntegrating the TA Program into the DW

Using the TA Recorder Using the TA Recorder

copy SAP AG BC420 12-71

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 7288

03amp

983209 SAP AG 1999

Integrating into the DW

Transfer program

AAP Dictionar(

Integrate

SDA0

SDA6

SDAamp

SDA

Cou can integrate the generated program into the G9- The structure of the fie must e created

in the AAP ictionary The taes SGA0 SGA8 SGA1 and SGA $i e fied

copy SAP AG BC420 12-72

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 7388

03

983209 SAP AG 1999

DW Release 42

Goo

-B eeae 45

aa ran=er ogtec

Int customer data transfer ob-ect

ecord =ed

Dece daa ran=er

d Goo

The ampunction ampor interatin TA recorder prora$s is

i$ple$ented in the

D+-B in Release

The recorder can e integrated as of ampeease and it is provided in the G9- ampeease

ltot to the G9- ampeease 5n the initia screen you can integrate programs y choosing ampoto

( +nt customer ata transfer o-ect

copy SAP AG BC420 12-73

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 7488

034

983209 SAP AG 1999

reating Program as D b-ect

Comer ran=er ogtec

ampgtec ype

Sor eD =or ogtec

aa ran=er proram

Srcre name

9900

(+A1

Cane comer

ZBCA+G

ZB

ustomer transfer ob-ect

umber bet)een 7000 and 7777

b-ect t(pe

Assignment to R ob-ect

Short tet for D ob-ectShort description

Data transfer program

ame of generated program

Structure name

A structure Cstructure la(out )ith this name is created in

the AAP Dictionar(

For ampeease transfer oects $ere not organiDed y 5amp oects ut y a G numer (00089

OOOO) The numer range O0009OOOO is reserved for customers

To create a connection to the ne$ G 9- you must assign the program to a 5amp oect

2reate a short tet for the G oect This tet $i appear in the method seection ist

Specify the program to e incuded

Specify a name for the structure to e created in the AAP ictionary

Note $he generated program appears under program type +N and not under program type

-

copy SAP AG BC420 12-74

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 7588

032

983209 SAP AG 1999

Adantages

Automatic program registration in the DW in

Release 48

ou can use all the functions defined for

standard ob-ects

1ception$ The (reate ampile ith data

function

If you incuded the oect in the ampeease $orench it is automaticay avaiae in the ampeease

B $orench

A the $orench functions are avaiae for your oect ecept for Create files ith transfer ata

copy SAP AG BC420 12-75

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 7688

038

983209 SAP AG 1999

ou are no) able to$

The Transaction Recorder$ Unit Summar(

Use the recording function in the LSMW to create

a batch input session )ith the data from the

eternal s(stem

Use the TA Recorder to create (our o)n data

transfer program

Anal(e programs that )or+ )ith batch input or

call transaction

Integrate the TA Recorder programs into the

DW

copy SAP AG BC420 12-76

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 7788

ercise 1

nit $ -ecorder

$opic 2reating etors

$ransaction -ecorder ercise 1

bull 2reating detors $ith eterna numer assignment

bull etor numers M9980008 to M9980080

Address data for detors $ith eterna numer assignment is to

e transferred using program ampFI700

ro4ect F5

Supro4ect +5

-un +575

$as)s 85 95 8S25

9oad program -F+00

8 In the foo$ing eercises eisting data is to e changed Therefore these detors $ith

eterna numer assignment have to first e created

898 4nder suproect 79 create run 797G9 $ith the name Detors ith

eternal numers

copy SAP AG BC420 12-77

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 7888

891 2reate the foo$ing three tass The tass map the foo$ing process steps

convert data create + session and process + session

89198 In run 797G9 create the foo$ing tas

9 Tas AP9

9 Name 2onvert data 9 Tas type AP

9 Program type +S-

Seect the foo$ing +S- oect

+S- proect 2109

+S- suproect 7I9

+S- oect I997GT

89191 In run 797G9 create the foo$ing tas 9 Tas +5A9

9 Name 2reate I session

Tas type +5A

9 Program type INP

Seect program ampFI700 $ith the variant

I97G9

8919 In run 797G9 create the foo$ing tas

9 Tas S29

9 Name Process I session Tas type S2

9 Program type amp7P5

Seect program ampS2S4 $ith the variant

S497G9

Note that you have to correct the seuence of the tass 2onvert data

create + session and process + session

4se the uttons

89 Start the run

The detors $i e created $ith eterna numer assignments

89 2hec in transaction F0 that the detors M9980008 to M9980080 have een

created

copy SAP AG BC420 12-78

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 7988

ercise

nit $ransaction -ecorder

$opic -ecording function in the 9S8(

bull 2reate a recording using the +S-

bull ltenerate a atch input session

2hange the detor address data in the amp System

Name of the recording +

Name of the file +2055+F9

8 2reate the recording 7I3 using the +S- ampecord the transaction F01 (2hange

detor)

898 efore you create the recording first test the transaction onineQ

For the recording use detor M9980008 5n the initia screen of the F01

maintain the foo$ing fieds ony

etor etor M9980008

2ompany code 0008

Address data seect

Note $he data record must e saved hile recording

891 aintain the names and the descriptions for the foo$ing fieds

Name city street posta code and teephone numereete a other fieds in screen 880 from the recording (eg S5ampT+ +AN8

SPampAS)

4se the same technica names as sho$n in the tae eo$ (automatic fied

mapping)

copy SAP AG BC420 12-79

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 8088

1 2reate the suproect 7I9 and the ne$ oect TA3 in your proect 2109

aintain the oect attriutes and seect the item atch input recording Seect your

recording 7I3

2reate the source structure address

2reate the source fieds according to the tae eo$ 5r copy them from proect 2109S37N suproect 7I900 oect TA900

198 Fie setup The data from the egacy system are dispayed in the foo$ing tae

Fied name Fied type Fied ength escription

N5 2 8B etor numer

NA7 2 Name

STamp77T 2 Street

2ITC 2 2ityPace of residence

MIP 2 80 Posta code

T7+ 2 8B Teephone numer

191 aintain the fied mapping 4se the automatic fied mapping (via menu item

7tras)

19 Specify the fies 5ny maintain the fie name of the source fie

Name of the fie 21099IFI+7

2odepage 8800

19 Import the data and convert them ispay the data in each caseQ

19 2reate a atch input session

19B ampun the atch input session

copy SAP AG BC420 12-80

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 8188

ercise 3

nit $ransaction -ecorder

$opic -ecording ith the $ -ecorder

bull ltenerate a recording using the TA recorder

bull Test the recording

2hange the address data of detors in the amp system

Name recording $+

Name of the file +2055+F9

8 2reate the recording TA37I3 using the transaction recorder ampecord the

transaction F01 (change detor)

898 4se detor M9980008 for the recording 5n the F01 initia screen ony

maintain the foo$ing fieds

etor etor M9980008

2ompany 2ode 0008

Address data seect

Note $he data record must e saved hen recording

eete a fieds that do not eist in the source fie 21099IFI+7 from screen

880 in the recording (eg 6NA89S5ampT+ 6NA89+AN8 6ANNQ9SPampAS) Note o not deete fieds ampF01946ampS and ampF0190880

Save the recording no$

1 S$itch to the recordings overvie$

198 Process the recording $ith the processing mode A (dispay a)

191 Process the recording $ith the processing mode RN (no dispay)

19 If the recording has een tested and no error has occurred generate a I session

and run it using the I monitor If an error shoud occur generate the recordingagainQ

copy SAP AG BC420 12-81

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 8288

From the recording generate the program M21037I3 in your deveopment cass

2109 Seect the foo$ing

bull ampead fied contents from fie

bull 2reate test data in the fie 2103dei3test3tt

98 Save this program and eecute it ltenerate one I session each and process it

2arry out the same steps again using the ca transaction

The generated program shoud no$ e changed so that fie 21099IFI+7 can e

read and processed

98 2hange the defaut vaue of the fie name (parameter dataset) in 21099

IFI+7

91 2hange the structure definition eete the company code fied and the address

data checo from the structure

9 2hange the su9routine ca perform dc3fied for the company code (KampF019

46ampSK) so that the vaue 0008 is transferred

9 2hange the su9routine ca perform dc3fied for the address data checo

(KampF0190880K) so that the vaue G is transferred

9 Start the program again and read the data from the fie 21099IFI+7 $ith

detor data ltenerate a I session $ith it and run it

copy SAP AG BC420 12-82

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 8388

033 Include DR16INCLUDE BDCRECX1

SELECTION-SCREEN BEGIN OF LINE

PARAMETERS SESSION RADIOBUTTON GROUP CTU create sessi SELECTION-SCREEN COMMENT $amp TEXT-S FOR FIELD SESSION

se(ecti-scree )siti +

PARAMETERS CTU RADIOBUTTON GROUP CTU ca(( trasacti

SELECTION-SCREEN COMMENT $amp TEXT-S FOR FIELD CTU

SELECTION-SCREEN END OF LINE

SELECTION-SCREEN BEGIN OF LINE

SELECTION-SCREEN COMMENT $amp TEXT-S1 FOR FIELD GROUP

se(ecti-scree )siti $+

PARAMETERS GROUP1$amp r) ae 0 sessi

SELECTION-SCREEN COMMENT $amp TEXT-S+ FOR FIELD CTUMODE

se(ecti-scree )siti

PARAMETERS CTUMODE LIE CTU2PARAMS-DISMODE DEFAULT 3N3

A4 s56 a(( 78)rs

E4 s56 78)r errr (8

N4 7 t 7is)(a8 78)r

SELECTION-SCREEN END OF LINE

SELECTION-SCREEN BEGIN OF LINE

SELECTION-SCREEN COMMENT $amp TEXT-S$ FOR FIELD USER

se(ecti-scree )siti $+

PARAMETERS4 USER1$amp DEFAULT S9-UNAME ser 0r sessi i atc5

SELECTION-SCREEN COMMENT $amp TEXT-S FOR FIELD CUPDATE

se(ecti-scree )siti

PARAMETERS CUPDATE LIE CTU2PARAMS-UPDMODE DEFAULT 3L3

S4 s8c5rs(8

A4 as8c5rs(8

L4 (ca(

SELECTION-SCREEN END OF LINE

SELECTION-SCREEN BEGIN OF LINE

SELECTION-SCREEN COMMENT $amp TEXT-S FOR FIELD EEP

se(ecti-scree )siti $+

PARAMETERS4 EEP AS CltECBOX 3 3 = 7e(ete sessi i0 0iis5e7

3X3 = gtee) sessi i0 0iis5e7

SELECTION-SCREEN COMMENT $amp TEXT-S FOR FIELD E2GROUP

copy SAP AG BC420 12-83

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 8488

se(ecti-scree )siti

)araeters E2GROUP1$amp r) ae 0 errr-sessi

SELECTION-SCREEN END OF LINE

SELECTION-SCREEN BEGIN OF LINE

SELECTION-SCREEN COMMENT $amp TEXT-S FOR FIELD ltOLDDATE

se(ecti-scree )siti $+

PARAMETERS4 ltOLDDATE LIE S9-DATUM

SELECTION-SCREEN COMMENT +11amp TEXT-S$ FOR FIELD E2USER

se(ecti-scree )siti

PARAMETERS4 E2USER1$amp DEFAULT S9-UNAME ser 0r errr-sessi

SELECTION-SCREEN END OF LINE

SELECTION-SCREEN BEGIN OF LINE

SELECTION-SCREEN COMMENT +11amp TEXT-S FOR FIELD E2EEP

se(ecti-scree )siti

PARAMETERS4 E2EEP AS CltECBOX 3 3 = 7e(ete sessi i0 0iis5e7

3X3 = gtee) sessi i0 0iis5e7

SELECTION-SCREEN END OF LINE

SELECTION-SCREEN BEGIN OF LINE

SELECTION-SCREEN COMMENT +11amp TEXT-S FOR FIELD E2ltDATE

se(ecti-scree )siti

PARAMETERS4 E2ltDATE LIE S9-DATUM

SELECTION-SCREEN END OF LINE

SELECTION-SCREEN SIP

SELECTION-SCREEN BEGIN OF LINE

SELECTION-SCREEN COMMENT 1amp TEXT-S1 FOR FIELD NODATA

PARAMETERS4 NODATA DEFAULT 33 LOER CASE 7ata

SELECTION-SCREEN END OF LINE

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

Batc5i)t7ata 0 si(e trasacti

DATA4 BDCDATA LIE BDCDATA OCCURS ITlt ltEADER LINE

essaes 0 ca(( trasacti

DATA4 MESSTAB LIE BDCMSGCOLL OCCURS ITlt ltEADER LINE

errr sessi )ee7 3 3 r 3X3amp

DATA4 E2GROUP2OPENED

essae tets

TABLES4 T1

copy SAP AG BC420 12-84

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 8588

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

at se(ecti scree

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

AT SELECTION-SCREEN

r) a7 ser st e 0i((e7 0r create sessi

IF SESSION = 3X3 AND

GROUP = SPACE OR USER = SPACE

MESSAGE E1MSamp

ENDIF

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

)e 7ataset

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

FORM OPEN2DATASET USING P2DATASET

OPEN DATASET P2DATASET IN TEXT MODE

IF S9-SUBRC

RITE4 TEXT-E S9-SUBRC

STOP

ENDIF

ENDFORM

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

c(se 7ataset

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

FORM CLOSE2DATASET USING P2DATASET

CLOSE DATASET P2DATASET

ENDFORM

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

create atc5i)t sessi

t 0r ca(( trasacti siamp

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

FORM OPEN2GROUP

IF SESSION = 3X3

SIP

RITE4 $amp 3Create r)3I1amp GROUP

SIP

)e atc5i)t r)

CALL FUNCTION 3BDC2OPEN2GROUP3

EXPORTING CLIENT = S9-MANDT

copy SAP AG BC420 12-85

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 8688

GROUP = GROUP

USER = USER

EEP = EEP

ltOLDDATE = ltOLDDATE

RITE4 amp 3BDC2OPEN2GROUP3I$amp

1$amp 3retrc7e43I+amp

S9-SUBRC

ENDIF

ENDFORM

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

e7 atc5i)t sessi

ca(( trasacti si4 errr sessiamp

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

FORM CLOSE2GROUP

IF SESSION = 3X3

c(se atc5i)t r)

CALL FUNCTION 3BDC2CLOSE2GROUP3

RITE4 amp 3BDC2CLOSE2GROUP3Iamp

1$amp 3retrc7e43I+amp

S9-SUBRC

ELSE

IF E2GROUP2OPENED = 3X3

CALL FUNCTION 3BDC2CLOSE2GROUP3

RITE4

RITE4 amp 3Fe5(era))e 6r7e eret3Iamp

ENDIF

ENDIF

ENDFORM

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

Start e6 trasacti accr7i t )araeters

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

FORM BDC2TRANSACTION USING TCODE

DATA4 L2MSTRINGamp

DATA4 L2SUBRC LIE S9-SUBRC

atc5 i)t sessi

IF SESSION = 3X3

CALL FUNCTION 3BDC2INSERT3

EXPORTING TCODE = TCODE

TABLES D9NPROTAB = BDCDATA

RITE4 3BDC2INSERT3Iamp

copy SAP AG BC420 12-86

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 8788

TCODE

3retrc7e43I+amp

S9-SUBRC

3RECORD43

S9-INDEX

ca(( trasacti si

ELSE

REFRESlt MESSTAB

CALL TRANSACTION TCODE USING BDCDATA

MODE CTUMODE

UPDATE CUPDATE

MESSAGES INTO MESSTAB

L2SUBRC = S9-SUBRC

RITE4 3CALL2TRANSACTION3

TCODE

3retrc7e43I+amp

L2SUBRC

3RECORD43

S9-INDEX

LOOP AT MESSTAB

SELECT SINGLE FROM T1 ltERE SPRSL = MESSTAB-MSGSPRA

AND ARBGB = MESSTAB-MSGID

AND MSGNR = MESSTAB-MSGNR

IF S9-SUBRC =

L2MSTRING = T1-TEXT

IF L2MSTRING CS 313

REPLACE 313 ITlt MESSTAB-MSGH1 INTO L2MSTRING

REPLACE 3$3 ITlt MESSTAB-MSGH$ INTO L2MSTRING

REPLACE 33 ITlt MESSTAB-MSGH INTO L2MSTRING

REPLACE 33 ITlt MESSTAB-MSGH INTO L2MSTRING

ELSE

REPLACE 33 ITlt MESSTAB-MSGH1 INTO L2MSTRING

REPLACE 33 ITlt MESSTAB-MSGH$ INTO L2MSTRING

REPLACE 33 ITlt MESSTAB-MSGH INTO L2MSTRING

REPLACE 33 ITlt MESSTAB-MSGH INTO L2MSTRING

ENDIF

CONDENSE L2MSTRING

RITE4 MESSTAB-MSGT9P L2MSTRING$+amp

ELSE

RITE4 MESSTAB

ENDIF

ENDLOOP

copy SAP AG BC420 12-87

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 8888

SIP

Eree 0e5(era))e

IF L2SUBRC AND E2GROUP SPACE

IF E2GROUP2OPENED = 3 3

CALL FUNCTION 3BDC2OPEN2GROUP3

EXPORTING CLIENT = S9-MANDT

GROUP = E2GROUP

USER = E2USER

EEP = E2EEP

ltOLDDATE = E2ltDATE

E2GROUP2OPENED = 3X3

ENDIF

CALL FUNCTION 3BDC2INSERT3

EXPORTING TCODE = TCODE

TABLES D9NPROTAB = BDCDATA

ENDIF

ENDIF

REFRESlt BDCDATA

ENDFORM

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

Start e6 scree

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

FORM BDC2D9NPRO USING PROGRAM D9NPRO

CLEAR BDCDATA

BDCDATA-PROGRAM = PROGRAM

BDCDATA-D9NPRO = D9NPRO

BDCDATA-D9NBEGIN = 3X3

APPEND BDCDATA

ENDFORM

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

Isert 0ie(7

Page 40: BC420_46C - 012The Transaction Recorder

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 4088

040

983209 SAP AG 1999

reating a Session 9rom the Recording

Recordingnl( contains the data

from the recording

Seon name 02amp

Aoraon ampBS(eep eon

oclt dae 10102000

Cou can create a atch input session directy from the recording that you can then process using the

atch input monitor

copy SAP AG BC420 12-40

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 4188

046

983209 SAP AG 1999

reating Test Data

Test Data

Recording

ranranpBC420AAe name

The file onl( contains the data from the recording

Rgt

Application Serer

Structure

Cou can create a fie from the recordingH the fie $i contain a the fieds from the recording The

fieds are added to the fie $ith the ength you specified in the definition

The fied order corresponds to the order in the recording overvie$ Technica fieds

(2356257 2324ampS5amp and so on) are incuded

The data can ony e stored on the appication server If you do not specify a path the fie is stored in

the $or directory of the appication server

If the specified test fie aready eists the ne$ data record is added to this fie

copy SAP AG BC420 12-41

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 4288

04amp

983209 SAP AG 1999

ed conen

reating a Program

Recording

ZBC420ampProram name

Transfer Program

e daa

ead =rom =e

ran=er =rom recordn

reate

9ile nameTest data

ranranpBC420AA

Cou can generate a program from the recording

In the foo$ing diaog o enter a program name In addition you can choose the type and method

for fiing the maintained fied contents from the recorded screens

4se the vaues used for the recording If you reuire feie data transfer you $i have to modify

this program ater

ParameteriDe the input vaues and read these vaues from a fie A data structure is created for

parameteriDationH the data records are read from an eterna fie into this data structure The

program assumes the fie $as taiored to this data structure

If you have decided to parameteriDe the input vaues you shoud aso create a test fie during

generation To do this seect the checo and enter a name for the fie

The attriute maintenance screen of the AAP editor appears aintain the attriutes and save the

program

copy SAP AG BC420 12-42

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 4388

04

983209 SAP AG 1999

Program 9unctions

Online

transaction

Transfer program

To

error

1rror

ption 6ption ampFlat SAP

structure

Monitor

Cou have no$ generated a data transfer program for importing data into the amp System The

program can eecute the data transfer using atch input or ca transaction

If you choose option 1 and there is an error the data record is paced into a atch input session

copy SAP AG BC420 12-43

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 4488

044

983209 SAP AG 1999

Benerating 9unction Modules

Recording

Zcreaedeor ncon mode

ncon rop

Sor eD

ZBC420

Creae comer

9unction module

nl( one data record can be processed at a time

In the net diaog o you can generate a function modue a function group and short tet from the

recording The function modue is automaticay created in the function group

copy SAP AG BC420 12-44

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 4588

042

983209 SAP AG 1999

9unction of 9unction Modules

Online

transaction

To

error

1rror

ption 6 ption amp

9unction module

Import

Parameter 1port

parameter

Tables

M1SSTA

Monitor

S$BC

Import interface

The import interface consists of a technica part and the fieds from the recording (A parameter is

created for each input fied of the recorded transactions)

7port interface

Simpy consists of the parameter S4amp2 The function modue $i return a vaue in the system

fied SC9S4amp2 after caing ca transaction This return vaue is set to Dero if the data record has

een correcty processed (5ny appies to 2T)

If a session is created you $i e notified $hether the data record coud e paced into the session

Tae interfaceThis is used ony if the function modue $ors $ith ca transaction The tae contains a the

system messages

copy SAP AG BC420 12-45

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 4688

048

983209 SAP AG 1999

Import Interface of 9unction Module

$

Technical

fields

Data

fields

BI session or CALL TRANSACTION

Processin $ode

pdate $ode

a$e oamp BI session iamp (T initial)

Bacround user iamp (T initial)

Delete session aampter processin

Loc date oamp session

ODATA indicator

TU

MD1

UPDAT1

BRUP

US1R

=11P

ELDDAT1

DATA

Cou can use parameter 2T4 to specify $hether the function modue creates a atch input session

(2T4 E ) or updates the data record directy using ca transaction (2T4 E G)

The other parameters are fied as for a atch input session header

Note 7very time the function modue is caed a atch input session is created

If the session is to contain severa transactions proceed as foo$s

ltenerate the transaction severa times This can e achieved y recording the transaction again The

function modue interface $i then contain more than one transaction -hen the function modue is

caed severa transactions can e generated for each session

copy SAP AG BC420 12-46

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 4788

043

983209 SAP AG 1999

The Transaction Recorder

PrinciplesPrinciples

Recording )ith the LSMWRecording )ith the LSMW

Principles of atch Input and all TransactionPrinciples of atch Input and all Transaction

Integrating the TA Program into the DWIntegrating the TA Program into the DW

Using the TA Recorder Using the TA Recorder

copy SAP AG BC420 12-47

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 4888

045

983209 SAP AG 1999

Benerated Program

9unction modules DltP1ltBRUP

DltIS1RT

DltLS1ltBRUP

AAP Program

Define structure of

data in seJuential

fileDefine D

table

pen seJuential file

pen I session

Read data recordCseJuential file

9ill D table

9ill I session gtALL TRASATI

Last data record K

lose I session

lose seJuential file

The generated program has the structure dispayed aove It uses the standard function modues for

creating atch input sessions

copy SAP AG BC420 12-48

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 4988

047

983209 SAP AG 1999

Structure of the Benerated Program

Benerated part

Define D

table

pen seJuential file

pen I session

Read data record

9ill D table

9ill I session gtALL TRASATI

Last data recordK

lose I session

lose seJuential file

Include DR16

Define filestructure

P1ltDATAS1T

P1ltBRUP

DltDPR

Dlt9I1LD

DltTRASATI

LS1ltBRUP

LS1ltDATAS1T

The generated program consists of t$o parts 9 a generated part and the incude 2amp72G8 The

incude is provided in the standard system

The incude contains the definition of the reuired 2 tae and a further seven suroutines These

suroutines eecute the foo$ing functions

5pen and cose fie

5pen and cose session

Fi 2 tae

Fi session

The generated part is the main program and cas the reevant suroutines A structure is aso

generated in the generated part to read the eterna data into the fie

See the Appendi for more information on the 2amp72G8 program

copy SAP AG BC420 12-49

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 5088

020

983209 SAP AG 1999

Structure of D Table

PRBRAM DPR D1BI 9AM 9ALPRBRAMPRBRAM DPRDPR D1BID1BI 9AM9AM 9AL9AL

SAPM90ampD 0602

R90ampD=UR 600000

R90ampDU=RS 0006

R90ampD=T=D =UA

SAPM90ampD 0660

=A6AM16 Smith

=A6PSTL 87000

=A6LAD6 US

=A6SPRAS 1

SAPM90ampD 06amp0

=A6ST1B US6amp428357DDATA

PRBRAM

DPR

D1BI

9AM

9AL

EAR

UM

EAR

EAR

EAR

40

4

6

6amp

6amp

D Module pool

D Screen number

D Start of screen

D 9ield name

D 9ield contents

9ield ame T(pe Length Short Tet

AAP Dictionar(

The 2 tae has the same structure as in a standard transfer

copy SAP AG BC420 12-50

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 5188

026

983209 SAP AG 1999

Read Structure

Recording

DATA BEGIN OF record data element BUKRS bukr$amp data element KTOKD ktokd$amp data element NA(EG) name$+amp data element SORT ortl$ampEND OF record-

record

Automaticall( generated

from recording

The structure of the fie is automaticay generated and is a$ays defined $ith the name amp725amp

The generated structure a$ays has the same ayout 7ach fied is defined y t$o generated ro$s

The first ro$ is a$ays a comment ro$ containing the tet J data eement and the data eement of

the screen fied from the recording In the net ro$ the fied itsef is defined $ith the name of the

data eement foo$ed y a three9digit position numer $hich specifies the ocation in the structure

The ength of the fied is set y the ength of the data eement If a fied is not defined through a data

eement the system uses the ength of the screen fied

copy SAP AG BC420 12-51

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 5288

02amp

983209 SAP AG 1999

pening and losing the 9ile

P1ltDATAS1T

LS1ltDATAS1T

FOR( oendataet USING dataet-O)EN DATASET dataet IN TET (ODE-

IF S01SUBR2 34 - 5RITE 6 te7t1e S01SUBR2-STO)-

ENDIF-

ENDFOR(-

FOR( cloedataet USING dataet-2OSE DATASET dataet-

ENDFOR(-

Include

DR16

The suroutine 5P7N3ATAS7T opens the seuentia fie

The suroutine 2+5S73ATAS7T coses the seuentia fie

copy SAP AG BC420 12-52

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 5388

02

983209 SAP AG 1999

9unction Modules for I Program

lient

Session name

Eold date

=eep session

D user name

RecordK

LI1T

BRUP

ELDDAT1

=11P

US1R

R1RD

DltP1ltBRUPDltP1ltBRUP

Transaction code

D table

TD1

DPRTA

DltIS1RTDltIS1RT

DltLS1ltBRUPDltLS1ltBRUP

pen Isessionpen Isession

Insert data for

transactions

Insert data for

transactions

lose I

session

lose I

session

The foo$ing function modues are provided for creating atch input sessions (function group

S2)

235P7N3ltamp54P

2reates a ne$ session and contains genera data for the $hoe session

23INS7ampT

Inserts a the data for a transaction into the session The transferred interna tae $ith the

structure 2ATA must contain a the data reuired for fuy processing the transaction

232+5S73ltamp54P

2oses the session after a the data has een inserted As soon as the session has een cosed it

can e processed

The interna tae $ith the structure 2ATA can ony contain atch input data for one singe

transaction run So the individua transactions are inserted into the atch input session in a oop

using severa 23INS7ampT cas

copy SAP AG BC420 12-53

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 5488

024

983209 SAP AG 2001

9unction Module DltP1ltBRUP

ALL 9UTI DltP1ltBRUPALL 9UTI DltP1ltBRUP

1PRTIB

LI1T client

BRUP session name

ELDDAT1 loc+ date

=11P delete flag

US1R bdc user name

R1RD recording

IMPRTIB

NID internal session +e(

11PTIS

1PRTIB

LI1T client

BRUP session name

ELDDAT1 loc+ date

=11P delete flag

US1R bdc user name

R1RD recording

IMPRTIB NID internal session +e(

11PTIS

-ith the function modue 235P7N3ltamp54P you can open a atch input session

The foo$ing parameters are mandatory

2+I7NT (cient)

ltamp54P (session name)

4S7amp (user name)

Note The 4S7amp must a$ays e specified This user name is reuired for processing the session

in atch mode

The foo$ing parameters are optiona

=5+AT7 specifies the eariest date on $hich the session can e started677P fag specifies $hether session shoud e deeted after it has een successfuy processed The

677P fag is ignored if the session contains errors

677P E K K means deete the session after processing (defaut vaue) H

677P E KGK means do not deete session

amp725amp E KGK ao$s you to create a recording instead of a I session

If gtI is specified the function modue returns the interna session ey This is needed to e ae to

differentiate sessions that have the same name

-ith 7G27PTI5NS you get various return vaues that can e ueried $ith SC9S4amp2

Note In onine mode the onine user is used for the authoriDation checs regardess of the user

name specified

copy SAP AG BC420 12-54

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 5588

022

983209 SAP AG 1999

Subprogram P1ltBRUP

P1ltBRUP

FOR( oen8rou-IF e9on -

2A FUN2TION BD2O)ENGROU) E)ORTING 2IENT lt1mandt GROU) 8rou USER uer KEE) kee

=ODDATE gtolddate-

ENDIF-ENDFOR(-

Include

DR16

The suprogram 5P7N3ltamp54P opens the atch input session

copy SAP AG BC420 12-55

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 5688

028

983209 SAP AG 1999

9unction Module DltIS1RT

ALL 9UTI DltIS1RTALL 9UTI DltIS1RT

IMPRT

TD1 Transaction code

PSTltLAL Update locall(

PRITIB print list

TAL1S DPRTA bdclttable

11PTIS

IMPRT

TD1 Transaction code

PSTltLAL Update locall(

PRITIB print list

TAL1S DPRTA bdclttable

11PTIS

-ith the function modue 23INS7ampT you can add transaction data to the session

Cou need an interna 2 tae to transfer the data

The foo$ing parameters are mandatory

T257 Transaction code

CNPamp5TA 2 tae

The foo$ing parameters are optiona

P5ST3+52A+ E KGK activates oca updating This means that the data to e updated is ept in the

appication server and updated in the ast step of the transaction This does not invove the update

process (For more information see course 28 Programming ataase 4pdates)

PampINTINlt E KGK 9 ists processed in I $i e printed immediatey -ith 7G27PTI5NS you get various return vaues that can e ueried $ith SC9S4amp2

copy SAP AG BC420 12-56

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 5788

023

983209 SAP AG 1999

Subprogram DltTRASATI

DltTRASATI

FOR( BD2TRANSA2TION USING tcode-

IF e9on -2A FUN2TION BD2INSERT

E)ORTING T2ODE tcode TABES D0N)ROTAB bdcdata-

ESE-

ENDIF-ENDFOR(-

T

Include

DR16

The suprogram 23TampANSA2TI5N moves the fied 2 tae either to a atch input session

or uses ca transaction to import the data into the system 5n the seection screen you can specify

$hether you $ant to create a session or you $ant to use ca transaction to process the data directy

The S7SSI5N fied is then set according to your seection

copy SAP AG BC420 12-57

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 5888

025

983209 SAP AG 1999

9unction Module DltLS1ltBRUP

ALL 9UTI DltLS1ltBRUP

11PTIS

TltP1 6

NU1U1lt1RRR amp

-ith the function modue 232+5S73ltamp54P you can cose a atch input session

In 7G27PTI5NS you get various return vaues that can e ueried $ith SC9S4amp2

copy SAP AG BC420 12-58

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 5988

027

983209 SAP AG 1999

Subprogram LS1ltBRUP

FOR( cloe8rou-IF e9on -cloe batcgt 9nut 8rou

2A FUN2TION BD22OSEGROU)-

ESE-IF e8rouoened -

2A FUN2TION BD22OSEGROU)-

ENDIF-ENDIF-

ENDFOR(-

LS1ltBRUPlose session

lose error session

Include

DR16

The suprogram 2+5S73ltamp54P coses the atch input session The suprogram differentiates

et$een a norma I session (S7SSI5N E G) and a session opened $hen ca transaction

encountered an error (73ltamp54P35P7N7 E G)

copy SAP AG BC420 12-59

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 6088

080

983209 SAP AG 1999

Subprograms DltDPRG Dlt9I1LD

DltDPR

Dlt9I1LD

FOR( bdc9eld USING nam al-IF al 34 nodata-2EAR bdcdata- bdcdata1nam nam- bdcdata1al al- A))END bdcdata-ENDIF-

ENDFOR(-

FOR( bdcdltnro USING ro8ram dltnro- 2EAR bdcdata-Bdcdata1ro8ram ro8ram-Bdcdata1dltnro dltnro-Bdcdata1dltnbe89n - A))END bdcdata-ENDFOR(-

Include

DR16

The incude 2amp72GG contains t$o suprograms 23CNPamp5 and 23FI7+

Suprogram 23CNPamp5 fis the 2 tae $ith program names and screen numers

Suprogram 23FI7+ fis the 2 tae $ith fied names and vaues

7ach suprogram creates an entry in the 2 tae

copy SAP AG BC420 12-60

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 6188

086

983209 SAP AG 1999

9illing the D Table

erorm bdcdltnro u9n8 SA)(FD +- erorm bdc9eld u9n8 BD22URSOR RFD1BUKRS- erorm bdc9eld u9n8 BD2OK2ODE 6- erorm bdc9eld u9n8 RFD1BUKRS record1BUKRS- erorm bdc9eld u9n8 RFD1KTOKD record1KTOKD-

erorm bdcdltnro u9n8 SA)(FD -

erorm bdc9eld u9n8 BD22URSOR KNA1S)RAS- erorm bdc9eld u9n8 BD2OK2ODE 6- erorm bdc9eld u9n8 KNA1NA(E record1NA(E-

erorm bdc9eld u9n8 KNA1SORT record1SORT-

Recording Benerated automaticall(

from the recording

)ERFOR( bdcdltnro USING SA)(FD +- )ERFOR( bdc9eld USING BD22URSOR RFD1BUKRS-)ERFOR( bdc9eld USING BD2OK2ODE 6-)ERFOR( bdc9eld USING RFD1BUKRS record1BUKRS-)ERFOR( bdc9eld USING RFD1KTOKD record1KTOKD-

)ERFOR( bdcdltnro USING SA)(FD -

)ERFOR( bdc9eld USING BD22URSOR KNA1S)RAS-)ERFOR( bdc9eld USING BD2OK2ODE 6-)ERFOR( bdc9eld USING KNA1NA(E record1NA(E-

)ERFOR( bdc9eld USING KNA1SORT record1SORT- ---

The 2 tae is fied $ith data from the recording The suroutines 23CNPamp5 and

23FI7+ are used for this

The suroutines are caed in the reuired structure or seuence

copy SAP AG BC420 12-61

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 6288

08amp

983209 SAP AG 1999

erie)

SAPDatabase

SeJuential9ile

SAPDatabase

ALL TRASATIALL TRASATI

SeJuential9ile

ATE IPUTATE IPUT

D TableD TableD TableD Table

I Monitor

T

In contrast to atch input you can use ca transaction to directy pass data to the diaog interface

$ithout using a atch input session Cou use an interna tae (2 tae same structure and ayout

as atch input) to temporariy store your screen data Then you ca the desired transaction in your

program

Note 5n average the 2a Transaction method is 8 to times faster than using atch Input

copy SAP AG BC420 12-62

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 6388

08

983209 SAP AG 1999

all Transaction Program$ 1ample

RE)ORT abcbdcdcdeb9ct-

)ARA(ETERS d9mode DEFAUT A

udmode DEFAUT S-FOR( calltranact9on-2A TRANSA2TION FD

USING bdcdata (ODE d9mode

U)DATE udmode-

IF lt1ubrc NE - 5RITE 6 ---

ENDIF-ENDFOR(-

Screen

00

Screen

100

Screen

An additiona system ro area is added for the caed transaction The system uses this area for

processing the individua screens in the transactionH the data from the tae is added here After the

transaction is processed the second ro area is reeasedH the system continues processing in the first

ro area

Notes

In contrast to atch input there is no error ogging (error sessions) here For processing the caed

transaction the system uses the authoriDations of the user that caed the transaction The 2 tae

can ony hod data for one transaction run at a time efore another transaction is caed and its data

can e added you must eecute a amp7Famp7S= for the 2 tae

copy SAP AG BC420 12-63

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 6488

084

983209 SAP AG 1999

ALL TRASATI C6

RE)ORT 777-

2A TRANSA2TION FD USING bdcdata (ODE E-

Default for MD1 is A

2A TRANSA2TION 3tranact9oncode4 USING 3bdc1table4 C (ODE A E N C-

-ith the parameter 57 you can seect a specific dispay mode for processing the transaction The

foo$ing three modes are avaiae

A (ispay a)

If you eecute the program a the screens and a their data are dispayed This is the defaut vaue

for the 57 in 2A++ TampANSA2TI5N

N (ispay nothing)

The screens are not dispayed at a regardess of $hether any of them contained errors As soon as

the transaction has een fuy processed contro is returned to your program (The vaue of the

parameter 4PAT7 determines $hether dataase updates are eecuted or not)

7 (ispay errors ony)As soon as an error occurs in a screen the transaction is s$itched to dispay mode so that you can

correct the errors

These dispay modes are the same as those in the atch input session processing

copy SAP AG BC420 12-64

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 6588

082

983209 SAP AG 1999

RE)ORT 777-

2A TRANSA2TION FD USING BD2DATA U)DATE -

ALL TRASATI Camp

RE)ORT 777-

2A TRANSA2TION FD USING bdcdata U)DATE -

2A TRANSA2TION 3tranact9oncode4 USING 3bdc1table4 C (ODE A E N C U)DATE A S C -

Default for UPDAT1 is A

-ith the parameter 4PAT7 you can contro ho$ dataase updates arising from a transaction are

carried out There are three options

A (asynchronous updating) The caed transaction does not $ait unti the dataase has een

updated it simpy for$ard the updates to the SAP update service This usuay speeds up the 2T

program This processing mode is N5T recommended for arge data sets as the caed transaction

does not receive a competion message from the update modue

The caing 2T program therefore cannot te if the transaction has een successfuy competed Cou

shoud use the updating administration function (transaction S8) to determine $hether updating

$as terminated eary The error anaysis correction functions for are ess hepfu than $ith

synchronous updating

S (synchronous updating) -ith synchronous updating the caed transaction $aits unti a the

updates have een competed So processing is so$er than $ith synchronous updating The caed

transaction can ho$ever report any updating errors to the program $hich maes error

anaysiscorrection easier

+ (local updating) $ith oca updating the dataase is not updated in a separate process it is

updated in the caers process (see appication hep documentation for the AAP ey$ord S7T

4PAT7 TAS6 +52A+)

copy SAP AG BC420 12-65

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 6688

088

983209 SAP AG 1999

ALL TRASATI C

RE)ORT 777-DATA mtab T0)E TABE OF bdcm8coll-

2A TRANSA2TION FD USING bdcdata (ESSAGES INTO mtab-

2A TRANSA2TION 3tranact9oncode4 USING 3bdc1table4 C (ODE A E N C U)DATE A S C (ESSAGES INTO 3metab4 C -

7SSAlt7S specifies that a system messages that are output during the eecution of a 2A++

TampANSA2TI5N are $ritten to the interna tae L7SSTA The interna tae must have the

structure 2Slt25++

4nie the cassica atch input processing $ith sessions 2A++ TampANSA2TI5N does not offer any

specia processing procedures for transactions containing errors There are no restart functions for

transactions that contain errors or that cause updating terminations

copy SAP AG BC420 12-66

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 6788

083

983209 SAP AG 1999

ALL TRASATI C4

RE)ORT 777-DATA mltot T0)E ctuaram-

2A TRANSA2TION FD USING BD2DATA

O)TIONS FRO( mltot-

2A TRANSA2TION 3tranact9oncode4 USING 3bdc1table4 C (ODE A E N C U)DATE A S C (ESSAGES INTO 3metab4 C O)TIONS FRO( ot C -

RE)ORT 777-DATA mltot T0)E ctuaram-2A TRANSA2TION FD USING bdcdata

O)TIONS FRO( mltot-

The addition 5PTI5NS enaes the ca transaction statement to e controed through a structure

The structure must have the dictionary type 2T43PAampAS

The addition 5PTI5NS Famp5 must not e comined either $ith the addition 57 or $ith

4PAT7 ore information on the net side

copy SAP AG BC420 12-67

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 6888

085

983209 SAP AG 1999

Structure TUltPARAMS

DISMD1 Procen mode anaoo o addon amp

UPDMD1 $pdae mode anaoo o addon $PA

ATTMD1 CA mode CA conro

D19SI1 orce de=a EndoE e drn procen

RAMMIT +o eD a Camp amp(

IPT +o a ac np eonF a F S-B+P SPAC

I1D +o a ac np eon a=er end o= BC daa

The components are defined as foo$s

The components 7FSIM7 ampA25IT N5INPT and N5I7N can have the foo$ing

vaues KGK E Ces or K K E No

If the addition 5PTI5NS Famp5 is not specified the foo$ing settings appy to the contro

parameters

IS57 from addition 57

4P57 from addition 4PAT7

2ATT57 2ATT not active

7FSIM7 o not not use defaut $indo$s siDe

ampA25IT Successfu eit at 25IT -5amp6

N5INPT atch input session active (SC9INPT E G)

N5I7N atch input session sti active after end of 2 data

copy SAP AG BC420 12-68

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 6988

087

983209 SAP AG 1999

SMSBID Message ID

SMSBT Message T(pe C1GIGWGSGA

SMSB Message umber

SMSB6 Message ariable 6

SMSBamp Message ariable amp

SMSB Message ariable

SMSB4 Message ariable 4

SMSBID Message ID

SMSBT Message T(pe C1GIGWGSGA

SMSB Message umber

SMSB6 Message ariable 6

SMSBamp Message ariable amp

SMSB Message ariable

SMSB4 Message ariable 4

Return code$

S(stem fields$

alue Meaning

0 Successful

6000 1rror in transaction

6000 1rror in processing call transaction

see also the s(stem fields specified

alue Meaning

0 Successful

6000 1rror in transaction

6000 1rror in processing call transaction

see also the s(stem fields specified

9ield name Meaning9ield name9ield name MeaningMeaning

Return ode and S(stem 9ields

The return code is used to specify $hether the caed transaction $as processed successfuy In

addition severa system fieds are fied The numer I type and variaes of the diaog message

output y the caed transaction Cou need this information to output the message tet

copy SAP AG BC420 12-69

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 7088

030

983209 SAP AG 1999

Benerated Program of the TA Recorder

REFRES= (ESSTAB-

2A TRANSA2TION tcode USING bdcdata (ODE ctumode U)DATE cudate (ESSAGES INTO metab-OO) AT metab- ENDOO)-IF lubrc 34 AND e8rou 34 S)A2E- IF e8rouoenend - 2A FUN2TION BD2O)ENGROU) E)ORTING ---------

--------- E8rouoened - ENDIF- 2A FUN2TION BD2INSERT E)ORTING T2ODE tcode TABES D0N)ROTAB bdcdata-ENDIF-REFRES= bdcdata-

Message table output

pen error session

Insert data record that

has errors into error

session

If you have seected ca transaction on the seection screen the generated program runs as foo$s

The onine transaction is caed $ith ca transaction and passed to tae 2ATA A the

messages arising during the ca transaction are put in the interna tae 7SSTA

7SSTA is output as a ist

If you have specified an error session ( 73ltamp54P L SPA27) on the seection screen and the

ca transaction comes across an error (+3S4amp2 L 0) the error session is opened The error

session is ho$ever ony opened once Then the data record is paced in the session

A the other data records that have errors $ith ca transaction are paced in the same session

copy SAP AG BC420 12-70

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 7188

036

983209 SAP AG 1999

The Transaction Recorder

PrinciplesPrinciples

Recording )ith the LSMWRecording )ith the LSMW

Principles of atch Input and all TransactionPrinciples of atch Input and all Transaction

Integrating the TA Program into the DWIntegrating the TA Program into the DW

Using the TA Recorder Using the TA Recorder

copy SAP AG BC420 12-71

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 7288

03amp

983209 SAP AG 1999

Integrating into the DW

Transfer program

AAP Dictionar(

Integrate

SDA0

SDA6

SDAamp

SDA

Cou can integrate the generated program into the G9- The structure of the fie must e created

in the AAP ictionary The taes SGA0 SGA8 SGA1 and SGA $i e fied

copy SAP AG BC420 12-72

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 7388

03

983209 SAP AG 1999

DW Release 42

Goo

-B eeae 45

aa ran=er ogtec

Int customer data transfer ob-ect

ecord =ed

Dece daa ran=er

d Goo

The ampunction ampor interatin TA recorder prora$s is

i$ple$ented in the

D+-B in Release

The recorder can e integrated as of ampeease and it is provided in the G9- ampeease

ltot to the G9- ampeease 5n the initia screen you can integrate programs y choosing ampoto

( +nt customer ata transfer o-ect

copy SAP AG BC420 12-73

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 7488

034

983209 SAP AG 1999

reating Program as D b-ect

Comer ran=er ogtec

ampgtec ype

Sor eD =or ogtec

aa ran=er proram

Srcre name

9900

(+A1

Cane comer

ZBCA+G

ZB

ustomer transfer ob-ect

umber bet)een 7000 and 7777

b-ect t(pe

Assignment to R ob-ect

Short tet for D ob-ectShort description

Data transfer program

ame of generated program

Structure name

A structure Cstructure la(out )ith this name is created in

the AAP Dictionar(

For ampeease transfer oects $ere not organiDed y 5amp oects ut y a G numer (00089

OOOO) The numer range O0009OOOO is reserved for customers

To create a connection to the ne$ G 9- you must assign the program to a 5amp oect

2reate a short tet for the G oect This tet $i appear in the method seection ist

Specify the program to e incuded

Specify a name for the structure to e created in the AAP ictionary

Note $he generated program appears under program type +N and not under program type

-

copy SAP AG BC420 12-74

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 7588

032

983209 SAP AG 1999

Adantages

Automatic program registration in the DW in

Release 48

ou can use all the functions defined for

standard ob-ects

1ception$ The (reate ampile ith data

function

If you incuded the oect in the ampeease $orench it is automaticay avaiae in the ampeease

B $orench

A the $orench functions are avaiae for your oect ecept for Create files ith transfer ata

copy SAP AG BC420 12-75

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 7688

038

983209 SAP AG 1999

ou are no) able to$

The Transaction Recorder$ Unit Summar(

Use the recording function in the LSMW to create

a batch input session )ith the data from the

eternal s(stem

Use the TA Recorder to create (our o)n data

transfer program

Anal(e programs that )or+ )ith batch input or

call transaction

Integrate the TA Recorder programs into the

DW

copy SAP AG BC420 12-76

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 7788

ercise 1

nit $ -ecorder

$opic 2reating etors

$ransaction -ecorder ercise 1

bull 2reating detors $ith eterna numer assignment

bull etor numers M9980008 to M9980080

Address data for detors $ith eterna numer assignment is to

e transferred using program ampFI700

ro4ect F5

Supro4ect +5

-un +575

$as)s 85 95 8S25

9oad program -F+00

8 In the foo$ing eercises eisting data is to e changed Therefore these detors $ith

eterna numer assignment have to first e created

898 4nder suproect 79 create run 797G9 $ith the name Detors ith

eternal numers

copy SAP AG BC420 12-77

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 7888

891 2reate the foo$ing three tass The tass map the foo$ing process steps

convert data create + session and process + session

89198 In run 797G9 create the foo$ing tas

9 Tas AP9

9 Name 2onvert data 9 Tas type AP

9 Program type +S-

Seect the foo$ing +S- oect

+S- proect 2109

+S- suproect 7I9

+S- oect I997GT

89191 In run 797G9 create the foo$ing tas 9 Tas +5A9

9 Name 2reate I session

Tas type +5A

9 Program type INP

Seect program ampFI700 $ith the variant

I97G9

8919 In run 797G9 create the foo$ing tas

9 Tas S29

9 Name Process I session Tas type S2

9 Program type amp7P5

Seect program ampS2S4 $ith the variant

S497G9

Note that you have to correct the seuence of the tass 2onvert data

create + session and process + session

4se the uttons

89 Start the run

The detors $i e created $ith eterna numer assignments

89 2hec in transaction F0 that the detors M9980008 to M9980080 have een

created

copy SAP AG BC420 12-78

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 7988

ercise

nit $ransaction -ecorder

$opic -ecording function in the 9S8(

bull 2reate a recording using the +S-

bull ltenerate a atch input session

2hange the detor address data in the amp System

Name of the recording +

Name of the file +2055+F9

8 2reate the recording 7I3 using the +S- ampecord the transaction F01 (2hange

detor)

898 efore you create the recording first test the transaction onineQ

For the recording use detor M9980008 5n the initia screen of the F01

maintain the foo$ing fieds ony

etor etor M9980008

2ompany code 0008

Address data seect

Note $he data record must e saved hile recording

891 aintain the names and the descriptions for the foo$ing fieds

Name city street posta code and teephone numereete a other fieds in screen 880 from the recording (eg S5ampT+ +AN8

SPampAS)

4se the same technica names as sho$n in the tae eo$ (automatic fied

mapping)

copy SAP AG BC420 12-79

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 8088

1 2reate the suproect 7I9 and the ne$ oect TA3 in your proect 2109

aintain the oect attriutes and seect the item atch input recording Seect your

recording 7I3

2reate the source structure address

2reate the source fieds according to the tae eo$ 5r copy them from proect 2109S37N suproect 7I900 oect TA900

198 Fie setup The data from the egacy system are dispayed in the foo$ing tae

Fied name Fied type Fied ength escription

N5 2 8B etor numer

NA7 2 Name

STamp77T 2 Street

2ITC 2 2ityPace of residence

MIP 2 80 Posta code

T7+ 2 8B Teephone numer

191 aintain the fied mapping 4se the automatic fied mapping (via menu item

7tras)

19 Specify the fies 5ny maintain the fie name of the source fie

Name of the fie 21099IFI+7

2odepage 8800

19 Import the data and convert them ispay the data in each caseQ

19 2reate a atch input session

19B ampun the atch input session

copy SAP AG BC420 12-80

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 8188

ercise 3

nit $ransaction -ecorder

$opic -ecording ith the $ -ecorder

bull ltenerate a recording using the TA recorder

bull Test the recording

2hange the address data of detors in the amp system

Name recording $+

Name of the file +2055+F9

8 2reate the recording TA37I3 using the transaction recorder ampecord the

transaction F01 (change detor)

898 4se detor M9980008 for the recording 5n the F01 initia screen ony

maintain the foo$ing fieds

etor etor M9980008

2ompany 2ode 0008

Address data seect

Note $he data record must e saved hen recording

eete a fieds that do not eist in the source fie 21099IFI+7 from screen

880 in the recording (eg 6NA89S5ampT+ 6NA89+AN8 6ANNQ9SPampAS) Note o not deete fieds ampF01946ampS and ampF0190880

Save the recording no$

1 S$itch to the recordings overvie$

198 Process the recording $ith the processing mode A (dispay a)

191 Process the recording $ith the processing mode RN (no dispay)

19 If the recording has een tested and no error has occurred generate a I session

and run it using the I monitor If an error shoud occur generate the recordingagainQ

copy SAP AG BC420 12-81

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 8288

From the recording generate the program M21037I3 in your deveopment cass

2109 Seect the foo$ing

bull ampead fied contents from fie

bull 2reate test data in the fie 2103dei3test3tt

98 Save this program and eecute it ltenerate one I session each and process it

2arry out the same steps again using the ca transaction

The generated program shoud no$ e changed so that fie 21099IFI+7 can e

read and processed

98 2hange the defaut vaue of the fie name (parameter dataset) in 21099

IFI+7

91 2hange the structure definition eete the company code fied and the address

data checo from the structure

9 2hange the su9routine ca perform dc3fied for the company code (KampF019

46ampSK) so that the vaue 0008 is transferred

9 2hange the su9routine ca perform dc3fied for the address data checo

(KampF0190880K) so that the vaue G is transferred

9 Start the program again and read the data from the fie 21099IFI+7 $ith

detor data ltenerate a I session $ith it and run it

copy SAP AG BC420 12-82

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 8388

033 Include DR16INCLUDE BDCRECX1

SELECTION-SCREEN BEGIN OF LINE

PARAMETERS SESSION RADIOBUTTON GROUP CTU create sessi SELECTION-SCREEN COMMENT $amp TEXT-S FOR FIELD SESSION

se(ecti-scree )siti +

PARAMETERS CTU RADIOBUTTON GROUP CTU ca(( trasacti

SELECTION-SCREEN COMMENT $amp TEXT-S FOR FIELD CTU

SELECTION-SCREEN END OF LINE

SELECTION-SCREEN BEGIN OF LINE

SELECTION-SCREEN COMMENT $amp TEXT-S1 FOR FIELD GROUP

se(ecti-scree )siti $+

PARAMETERS GROUP1$amp r) ae 0 sessi

SELECTION-SCREEN COMMENT $amp TEXT-S+ FOR FIELD CTUMODE

se(ecti-scree )siti

PARAMETERS CTUMODE LIE CTU2PARAMS-DISMODE DEFAULT 3N3

A4 s56 a(( 78)rs

E4 s56 78)r errr (8

N4 7 t 7is)(a8 78)r

SELECTION-SCREEN END OF LINE

SELECTION-SCREEN BEGIN OF LINE

SELECTION-SCREEN COMMENT $amp TEXT-S$ FOR FIELD USER

se(ecti-scree )siti $+

PARAMETERS4 USER1$amp DEFAULT S9-UNAME ser 0r sessi i atc5

SELECTION-SCREEN COMMENT $amp TEXT-S FOR FIELD CUPDATE

se(ecti-scree )siti

PARAMETERS CUPDATE LIE CTU2PARAMS-UPDMODE DEFAULT 3L3

S4 s8c5rs(8

A4 as8c5rs(8

L4 (ca(

SELECTION-SCREEN END OF LINE

SELECTION-SCREEN BEGIN OF LINE

SELECTION-SCREEN COMMENT $amp TEXT-S FOR FIELD EEP

se(ecti-scree )siti $+

PARAMETERS4 EEP AS CltECBOX 3 3 = 7e(ete sessi i0 0iis5e7

3X3 = gtee) sessi i0 0iis5e7

SELECTION-SCREEN COMMENT $amp TEXT-S FOR FIELD E2GROUP

copy SAP AG BC420 12-83

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 8488

se(ecti-scree )siti

)araeters E2GROUP1$amp r) ae 0 errr-sessi

SELECTION-SCREEN END OF LINE

SELECTION-SCREEN BEGIN OF LINE

SELECTION-SCREEN COMMENT $amp TEXT-S FOR FIELD ltOLDDATE

se(ecti-scree )siti $+

PARAMETERS4 ltOLDDATE LIE S9-DATUM

SELECTION-SCREEN COMMENT +11amp TEXT-S$ FOR FIELD E2USER

se(ecti-scree )siti

PARAMETERS4 E2USER1$amp DEFAULT S9-UNAME ser 0r errr-sessi

SELECTION-SCREEN END OF LINE

SELECTION-SCREEN BEGIN OF LINE

SELECTION-SCREEN COMMENT +11amp TEXT-S FOR FIELD E2EEP

se(ecti-scree )siti

PARAMETERS4 E2EEP AS CltECBOX 3 3 = 7e(ete sessi i0 0iis5e7

3X3 = gtee) sessi i0 0iis5e7

SELECTION-SCREEN END OF LINE

SELECTION-SCREEN BEGIN OF LINE

SELECTION-SCREEN COMMENT +11amp TEXT-S FOR FIELD E2ltDATE

se(ecti-scree )siti

PARAMETERS4 E2ltDATE LIE S9-DATUM

SELECTION-SCREEN END OF LINE

SELECTION-SCREEN SIP

SELECTION-SCREEN BEGIN OF LINE

SELECTION-SCREEN COMMENT 1amp TEXT-S1 FOR FIELD NODATA

PARAMETERS4 NODATA DEFAULT 33 LOER CASE 7ata

SELECTION-SCREEN END OF LINE

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

Batc5i)t7ata 0 si(e trasacti

DATA4 BDCDATA LIE BDCDATA OCCURS ITlt ltEADER LINE

essaes 0 ca(( trasacti

DATA4 MESSTAB LIE BDCMSGCOLL OCCURS ITlt ltEADER LINE

errr sessi )ee7 3 3 r 3X3amp

DATA4 E2GROUP2OPENED

essae tets

TABLES4 T1

copy SAP AG BC420 12-84

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 8588

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

at se(ecti scree

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

AT SELECTION-SCREEN

r) a7 ser st e 0i((e7 0r create sessi

IF SESSION = 3X3 AND

GROUP = SPACE OR USER = SPACE

MESSAGE E1MSamp

ENDIF

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

)e 7ataset

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

FORM OPEN2DATASET USING P2DATASET

OPEN DATASET P2DATASET IN TEXT MODE

IF S9-SUBRC

RITE4 TEXT-E S9-SUBRC

STOP

ENDIF

ENDFORM

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

c(se 7ataset

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

FORM CLOSE2DATASET USING P2DATASET

CLOSE DATASET P2DATASET

ENDFORM

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

create atc5i)t sessi

t 0r ca(( trasacti siamp

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

FORM OPEN2GROUP

IF SESSION = 3X3

SIP

RITE4 $amp 3Create r)3I1amp GROUP

SIP

)e atc5i)t r)

CALL FUNCTION 3BDC2OPEN2GROUP3

EXPORTING CLIENT = S9-MANDT

copy SAP AG BC420 12-85

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 8688

GROUP = GROUP

USER = USER

EEP = EEP

ltOLDDATE = ltOLDDATE

RITE4 amp 3BDC2OPEN2GROUP3I$amp

1$amp 3retrc7e43I+amp

S9-SUBRC

ENDIF

ENDFORM

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

e7 atc5i)t sessi

ca(( trasacti si4 errr sessiamp

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

FORM CLOSE2GROUP

IF SESSION = 3X3

c(se atc5i)t r)

CALL FUNCTION 3BDC2CLOSE2GROUP3

RITE4 amp 3BDC2CLOSE2GROUP3Iamp

1$amp 3retrc7e43I+amp

S9-SUBRC

ELSE

IF E2GROUP2OPENED = 3X3

CALL FUNCTION 3BDC2CLOSE2GROUP3

RITE4

RITE4 amp 3Fe5(era))e 6r7e eret3Iamp

ENDIF

ENDIF

ENDFORM

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

Start e6 trasacti accr7i t )araeters

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

FORM BDC2TRANSACTION USING TCODE

DATA4 L2MSTRINGamp

DATA4 L2SUBRC LIE S9-SUBRC

atc5 i)t sessi

IF SESSION = 3X3

CALL FUNCTION 3BDC2INSERT3

EXPORTING TCODE = TCODE

TABLES D9NPROTAB = BDCDATA

RITE4 3BDC2INSERT3Iamp

copy SAP AG BC420 12-86

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 8788

TCODE

3retrc7e43I+amp

S9-SUBRC

3RECORD43

S9-INDEX

ca(( trasacti si

ELSE

REFRESlt MESSTAB

CALL TRANSACTION TCODE USING BDCDATA

MODE CTUMODE

UPDATE CUPDATE

MESSAGES INTO MESSTAB

L2SUBRC = S9-SUBRC

RITE4 3CALL2TRANSACTION3

TCODE

3retrc7e43I+amp

L2SUBRC

3RECORD43

S9-INDEX

LOOP AT MESSTAB

SELECT SINGLE FROM T1 ltERE SPRSL = MESSTAB-MSGSPRA

AND ARBGB = MESSTAB-MSGID

AND MSGNR = MESSTAB-MSGNR

IF S9-SUBRC =

L2MSTRING = T1-TEXT

IF L2MSTRING CS 313

REPLACE 313 ITlt MESSTAB-MSGH1 INTO L2MSTRING

REPLACE 3$3 ITlt MESSTAB-MSGH$ INTO L2MSTRING

REPLACE 33 ITlt MESSTAB-MSGH INTO L2MSTRING

REPLACE 33 ITlt MESSTAB-MSGH INTO L2MSTRING

ELSE

REPLACE 33 ITlt MESSTAB-MSGH1 INTO L2MSTRING

REPLACE 33 ITlt MESSTAB-MSGH$ INTO L2MSTRING

REPLACE 33 ITlt MESSTAB-MSGH INTO L2MSTRING

REPLACE 33 ITlt MESSTAB-MSGH INTO L2MSTRING

ENDIF

CONDENSE L2MSTRING

RITE4 MESSTAB-MSGT9P L2MSTRING$+amp

ELSE

RITE4 MESSTAB

ENDIF

ENDLOOP

copy SAP AG BC420 12-87

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 8888

SIP

Eree 0e5(era))e

IF L2SUBRC AND E2GROUP SPACE

IF E2GROUP2OPENED = 3 3

CALL FUNCTION 3BDC2OPEN2GROUP3

EXPORTING CLIENT = S9-MANDT

GROUP = E2GROUP

USER = E2USER

EEP = E2EEP

ltOLDDATE = E2ltDATE

E2GROUP2OPENED = 3X3

ENDIF

CALL FUNCTION 3BDC2INSERT3

EXPORTING TCODE = TCODE

TABLES D9NPROTAB = BDCDATA

ENDIF

ENDIF

REFRESlt BDCDATA

ENDFORM

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

Start e6 scree

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

FORM BDC2D9NPRO USING PROGRAM D9NPRO

CLEAR BDCDATA

BDCDATA-PROGRAM = PROGRAM

BDCDATA-D9NPRO = D9NPRO

BDCDATA-D9NBEGIN = 3X3

APPEND BDCDATA

ENDFORM

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

Isert 0ie(7

Page 41: BC420_46C - 012The Transaction Recorder

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 4188

046

983209 SAP AG 1999

reating Test Data

Test Data

Recording

ranranpBC420AAe name

The file onl( contains the data from the recording

Rgt

Application Serer

Structure

Cou can create a fie from the recordingH the fie $i contain a the fieds from the recording The

fieds are added to the fie $ith the ength you specified in the definition

The fied order corresponds to the order in the recording overvie$ Technica fieds

(2356257 2324ampS5amp and so on) are incuded

The data can ony e stored on the appication server If you do not specify a path the fie is stored in

the $or directory of the appication server

If the specified test fie aready eists the ne$ data record is added to this fie

copy SAP AG BC420 12-41

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 4288

04amp

983209 SAP AG 1999

ed conen

reating a Program

Recording

ZBC420ampProram name

Transfer Program

e daa

ead =rom =e

ran=er =rom recordn

reate

9ile nameTest data

ranranpBC420AA

Cou can generate a program from the recording

In the foo$ing diaog o enter a program name In addition you can choose the type and method

for fiing the maintained fied contents from the recorded screens

4se the vaues used for the recording If you reuire feie data transfer you $i have to modify

this program ater

ParameteriDe the input vaues and read these vaues from a fie A data structure is created for

parameteriDationH the data records are read from an eterna fie into this data structure The

program assumes the fie $as taiored to this data structure

If you have decided to parameteriDe the input vaues you shoud aso create a test fie during

generation To do this seect the checo and enter a name for the fie

The attriute maintenance screen of the AAP editor appears aintain the attriutes and save the

program

copy SAP AG BC420 12-42

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 4388

04

983209 SAP AG 1999

Program 9unctions

Online

transaction

Transfer program

To

error

1rror

ption 6ption ampFlat SAP

structure

Monitor

Cou have no$ generated a data transfer program for importing data into the amp System The

program can eecute the data transfer using atch input or ca transaction

If you choose option 1 and there is an error the data record is paced into a atch input session

copy SAP AG BC420 12-43

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 4488

044

983209 SAP AG 1999

Benerating 9unction Modules

Recording

Zcreaedeor ncon mode

ncon rop

Sor eD

ZBC420

Creae comer

9unction module

nl( one data record can be processed at a time

In the net diaog o you can generate a function modue a function group and short tet from the

recording The function modue is automaticay created in the function group

copy SAP AG BC420 12-44

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 4588

042

983209 SAP AG 1999

9unction of 9unction Modules

Online

transaction

To

error

1rror

ption 6 ption amp

9unction module

Import

Parameter 1port

parameter

Tables

M1SSTA

Monitor

S$BC

Import interface

The import interface consists of a technica part and the fieds from the recording (A parameter is

created for each input fied of the recorded transactions)

7port interface

Simpy consists of the parameter S4amp2 The function modue $i return a vaue in the system

fied SC9S4amp2 after caing ca transaction This return vaue is set to Dero if the data record has

een correcty processed (5ny appies to 2T)

If a session is created you $i e notified $hether the data record coud e paced into the session

Tae interfaceThis is used ony if the function modue $ors $ith ca transaction The tae contains a the

system messages

copy SAP AG BC420 12-45

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 4688

048

983209 SAP AG 1999

Import Interface of 9unction Module

$

Technical

fields

Data

fields

BI session or CALL TRANSACTION

Processin $ode

pdate $ode

a$e oamp BI session iamp (T initial)

Bacround user iamp (T initial)

Delete session aampter processin

Loc date oamp session

ODATA indicator

TU

MD1

UPDAT1

BRUP

US1R

=11P

ELDDAT1

DATA

Cou can use parameter 2T4 to specify $hether the function modue creates a atch input session

(2T4 E ) or updates the data record directy using ca transaction (2T4 E G)

The other parameters are fied as for a atch input session header

Note 7very time the function modue is caed a atch input session is created

If the session is to contain severa transactions proceed as foo$s

ltenerate the transaction severa times This can e achieved y recording the transaction again The

function modue interface $i then contain more than one transaction -hen the function modue is

caed severa transactions can e generated for each session

copy SAP AG BC420 12-46

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 4788

043

983209 SAP AG 1999

The Transaction Recorder

PrinciplesPrinciples

Recording )ith the LSMWRecording )ith the LSMW

Principles of atch Input and all TransactionPrinciples of atch Input and all Transaction

Integrating the TA Program into the DWIntegrating the TA Program into the DW

Using the TA Recorder Using the TA Recorder

copy SAP AG BC420 12-47

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 4888

045

983209 SAP AG 1999

Benerated Program

9unction modules DltP1ltBRUP

DltIS1RT

DltLS1ltBRUP

AAP Program

Define structure of

data in seJuential

fileDefine D

table

pen seJuential file

pen I session

Read data recordCseJuential file

9ill D table

9ill I session gtALL TRASATI

Last data record K

lose I session

lose seJuential file

The generated program has the structure dispayed aove It uses the standard function modues for

creating atch input sessions

copy SAP AG BC420 12-48

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 4988

047

983209 SAP AG 1999

Structure of the Benerated Program

Benerated part

Define D

table

pen seJuential file

pen I session

Read data record

9ill D table

9ill I session gtALL TRASATI

Last data recordK

lose I session

lose seJuential file

Include DR16

Define filestructure

P1ltDATAS1T

P1ltBRUP

DltDPR

Dlt9I1LD

DltTRASATI

LS1ltBRUP

LS1ltDATAS1T

The generated program consists of t$o parts 9 a generated part and the incude 2amp72G8 The

incude is provided in the standard system

The incude contains the definition of the reuired 2 tae and a further seven suroutines These

suroutines eecute the foo$ing functions

5pen and cose fie

5pen and cose session

Fi 2 tae

Fi session

The generated part is the main program and cas the reevant suroutines A structure is aso

generated in the generated part to read the eterna data into the fie

See the Appendi for more information on the 2amp72G8 program

copy SAP AG BC420 12-49

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 5088

020

983209 SAP AG 1999

Structure of D Table

PRBRAM DPR D1BI 9AM 9ALPRBRAMPRBRAM DPRDPR D1BID1BI 9AM9AM 9AL9AL

SAPM90ampD 0602

R90ampD=UR 600000

R90ampDU=RS 0006

R90ampD=T=D =UA

SAPM90ampD 0660

=A6AM16 Smith

=A6PSTL 87000

=A6LAD6 US

=A6SPRAS 1

SAPM90ampD 06amp0

=A6ST1B US6amp428357DDATA

PRBRAM

DPR

D1BI

9AM

9AL

EAR

UM

EAR

EAR

EAR

40

4

6

6amp

6amp

D Module pool

D Screen number

D Start of screen

D 9ield name

D 9ield contents

9ield ame T(pe Length Short Tet

AAP Dictionar(

The 2 tae has the same structure as in a standard transfer

copy SAP AG BC420 12-50

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 5188

026

983209 SAP AG 1999

Read Structure

Recording

DATA BEGIN OF record data element BUKRS bukr$amp data element KTOKD ktokd$amp data element NA(EG) name$+amp data element SORT ortl$ampEND OF record-

record

Automaticall( generated

from recording

The structure of the fie is automaticay generated and is a$ays defined $ith the name amp725amp

The generated structure a$ays has the same ayout 7ach fied is defined y t$o generated ro$s

The first ro$ is a$ays a comment ro$ containing the tet J data eement and the data eement of

the screen fied from the recording In the net ro$ the fied itsef is defined $ith the name of the

data eement foo$ed y a three9digit position numer $hich specifies the ocation in the structure

The ength of the fied is set y the ength of the data eement If a fied is not defined through a data

eement the system uses the ength of the screen fied

copy SAP AG BC420 12-51

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 5288

02amp

983209 SAP AG 1999

pening and losing the 9ile

P1ltDATAS1T

LS1ltDATAS1T

FOR( oendataet USING dataet-O)EN DATASET dataet IN TET (ODE-

IF S01SUBR2 34 - 5RITE 6 te7t1e S01SUBR2-STO)-

ENDIF-

ENDFOR(-

FOR( cloedataet USING dataet-2OSE DATASET dataet-

ENDFOR(-

Include

DR16

The suroutine 5P7N3ATAS7T opens the seuentia fie

The suroutine 2+5S73ATAS7T coses the seuentia fie

copy SAP AG BC420 12-52

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 5388

02

983209 SAP AG 1999

9unction Modules for I Program

lient

Session name

Eold date

=eep session

D user name

RecordK

LI1T

BRUP

ELDDAT1

=11P

US1R

R1RD

DltP1ltBRUPDltP1ltBRUP

Transaction code

D table

TD1

DPRTA

DltIS1RTDltIS1RT

DltLS1ltBRUPDltLS1ltBRUP

pen Isessionpen Isession

Insert data for

transactions

Insert data for

transactions

lose I

session

lose I

session

The foo$ing function modues are provided for creating atch input sessions (function group

S2)

235P7N3ltamp54P

2reates a ne$ session and contains genera data for the $hoe session

23INS7ampT

Inserts a the data for a transaction into the session The transferred interna tae $ith the

structure 2ATA must contain a the data reuired for fuy processing the transaction

232+5S73ltamp54P

2oses the session after a the data has een inserted As soon as the session has een cosed it

can e processed

The interna tae $ith the structure 2ATA can ony contain atch input data for one singe

transaction run So the individua transactions are inserted into the atch input session in a oop

using severa 23INS7ampT cas

copy SAP AG BC420 12-53

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 5488

024

983209 SAP AG 2001

9unction Module DltP1ltBRUP

ALL 9UTI DltP1ltBRUPALL 9UTI DltP1ltBRUP

1PRTIB

LI1T client

BRUP session name

ELDDAT1 loc+ date

=11P delete flag

US1R bdc user name

R1RD recording

IMPRTIB

NID internal session +e(

11PTIS

1PRTIB

LI1T client

BRUP session name

ELDDAT1 loc+ date

=11P delete flag

US1R bdc user name

R1RD recording

IMPRTIB NID internal session +e(

11PTIS

-ith the function modue 235P7N3ltamp54P you can open a atch input session

The foo$ing parameters are mandatory

2+I7NT (cient)

ltamp54P (session name)

4S7amp (user name)

Note The 4S7amp must a$ays e specified This user name is reuired for processing the session

in atch mode

The foo$ing parameters are optiona

=5+AT7 specifies the eariest date on $hich the session can e started677P fag specifies $hether session shoud e deeted after it has een successfuy processed The

677P fag is ignored if the session contains errors

677P E K K means deete the session after processing (defaut vaue) H

677P E KGK means do not deete session

amp725amp E KGK ao$s you to create a recording instead of a I session

If gtI is specified the function modue returns the interna session ey This is needed to e ae to

differentiate sessions that have the same name

-ith 7G27PTI5NS you get various return vaues that can e ueried $ith SC9S4amp2

Note In onine mode the onine user is used for the authoriDation checs regardess of the user

name specified

copy SAP AG BC420 12-54

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 5588

022

983209 SAP AG 1999

Subprogram P1ltBRUP

P1ltBRUP

FOR( oen8rou-IF e9on -

2A FUN2TION BD2O)ENGROU) E)ORTING 2IENT lt1mandt GROU) 8rou USER uer KEE) kee

=ODDATE gtolddate-

ENDIF-ENDFOR(-

Include

DR16

The suprogram 5P7N3ltamp54P opens the atch input session

copy SAP AG BC420 12-55

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 5688

028

983209 SAP AG 1999

9unction Module DltIS1RT

ALL 9UTI DltIS1RTALL 9UTI DltIS1RT

IMPRT

TD1 Transaction code

PSTltLAL Update locall(

PRITIB print list

TAL1S DPRTA bdclttable

11PTIS

IMPRT

TD1 Transaction code

PSTltLAL Update locall(

PRITIB print list

TAL1S DPRTA bdclttable

11PTIS

-ith the function modue 23INS7ampT you can add transaction data to the session

Cou need an interna 2 tae to transfer the data

The foo$ing parameters are mandatory

T257 Transaction code

CNPamp5TA 2 tae

The foo$ing parameters are optiona

P5ST3+52A+ E KGK activates oca updating This means that the data to e updated is ept in the

appication server and updated in the ast step of the transaction This does not invove the update

process (For more information see course 28 Programming ataase 4pdates)

PampINTINlt E KGK 9 ists processed in I $i e printed immediatey -ith 7G27PTI5NS you get various return vaues that can e ueried $ith SC9S4amp2

copy SAP AG BC420 12-56

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 5788

023

983209 SAP AG 1999

Subprogram DltTRASATI

DltTRASATI

FOR( BD2TRANSA2TION USING tcode-

IF e9on -2A FUN2TION BD2INSERT

E)ORTING T2ODE tcode TABES D0N)ROTAB bdcdata-

ESE-

ENDIF-ENDFOR(-

T

Include

DR16

The suprogram 23TampANSA2TI5N moves the fied 2 tae either to a atch input session

or uses ca transaction to import the data into the system 5n the seection screen you can specify

$hether you $ant to create a session or you $ant to use ca transaction to process the data directy

The S7SSI5N fied is then set according to your seection

copy SAP AG BC420 12-57

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 5888

025

983209 SAP AG 1999

9unction Module DltLS1ltBRUP

ALL 9UTI DltLS1ltBRUP

11PTIS

TltP1 6

NU1U1lt1RRR amp

-ith the function modue 232+5S73ltamp54P you can cose a atch input session

In 7G27PTI5NS you get various return vaues that can e ueried $ith SC9S4amp2

copy SAP AG BC420 12-58

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 5988

027

983209 SAP AG 1999

Subprogram LS1ltBRUP

FOR( cloe8rou-IF e9on -cloe batcgt 9nut 8rou

2A FUN2TION BD22OSEGROU)-

ESE-IF e8rouoened -

2A FUN2TION BD22OSEGROU)-

ENDIF-ENDIF-

ENDFOR(-

LS1ltBRUPlose session

lose error session

Include

DR16

The suprogram 2+5S73ltamp54P coses the atch input session The suprogram differentiates

et$een a norma I session (S7SSI5N E G) and a session opened $hen ca transaction

encountered an error (73ltamp54P35P7N7 E G)

copy SAP AG BC420 12-59

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 6088

080

983209 SAP AG 1999

Subprograms DltDPRG Dlt9I1LD

DltDPR

Dlt9I1LD

FOR( bdc9eld USING nam al-IF al 34 nodata-2EAR bdcdata- bdcdata1nam nam- bdcdata1al al- A))END bdcdata-ENDIF-

ENDFOR(-

FOR( bdcdltnro USING ro8ram dltnro- 2EAR bdcdata-Bdcdata1ro8ram ro8ram-Bdcdata1dltnro dltnro-Bdcdata1dltnbe89n - A))END bdcdata-ENDFOR(-

Include

DR16

The incude 2amp72GG contains t$o suprograms 23CNPamp5 and 23FI7+

Suprogram 23CNPamp5 fis the 2 tae $ith program names and screen numers

Suprogram 23FI7+ fis the 2 tae $ith fied names and vaues

7ach suprogram creates an entry in the 2 tae

copy SAP AG BC420 12-60

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 6188

086

983209 SAP AG 1999

9illing the D Table

erorm bdcdltnro u9n8 SA)(FD +- erorm bdc9eld u9n8 BD22URSOR RFD1BUKRS- erorm bdc9eld u9n8 BD2OK2ODE 6- erorm bdc9eld u9n8 RFD1BUKRS record1BUKRS- erorm bdc9eld u9n8 RFD1KTOKD record1KTOKD-

erorm bdcdltnro u9n8 SA)(FD -

erorm bdc9eld u9n8 BD22URSOR KNA1S)RAS- erorm bdc9eld u9n8 BD2OK2ODE 6- erorm bdc9eld u9n8 KNA1NA(E record1NA(E-

erorm bdc9eld u9n8 KNA1SORT record1SORT-

Recording Benerated automaticall(

from the recording

)ERFOR( bdcdltnro USING SA)(FD +- )ERFOR( bdc9eld USING BD22URSOR RFD1BUKRS-)ERFOR( bdc9eld USING BD2OK2ODE 6-)ERFOR( bdc9eld USING RFD1BUKRS record1BUKRS-)ERFOR( bdc9eld USING RFD1KTOKD record1KTOKD-

)ERFOR( bdcdltnro USING SA)(FD -

)ERFOR( bdc9eld USING BD22URSOR KNA1S)RAS-)ERFOR( bdc9eld USING BD2OK2ODE 6-)ERFOR( bdc9eld USING KNA1NA(E record1NA(E-

)ERFOR( bdc9eld USING KNA1SORT record1SORT- ---

The 2 tae is fied $ith data from the recording The suroutines 23CNPamp5 and

23FI7+ are used for this

The suroutines are caed in the reuired structure or seuence

copy SAP AG BC420 12-61

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 6288

08amp

983209 SAP AG 1999

erie)

SAPDatabase

SeJuential9ile

SAPDatabase

ALL TRASATIALL TRASATI

SeJuential9ile

ATE IPUTATE IPUT

D TableD TableD TableD Table

I Monitor

T

In contrast to atch input you can use ca transaction to directy pass data to the diaog interface

$ithout using a atch input session Cou use an interna tae (2 tae same structure and ayout

as atch input) to temporariy store your screen data Then you ca the desired transaction in your

program

Note 5n average the 2a Transaction method is 8 to times faster than using atch Input

copy SAP AG BC420 12-62

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 6388

08

983209 SAP AG 1999

all Transaction Program$ 1ample

RE)ORT abcbdcdcdeb9ct-

)ARA(ETERS d9mode DEFAUT A

udmode DEFAUT S-FOR( calltranact9on-2A TRANSA2TION FD

USING bdcdata (ODE d9mode

U)DATE udmode-

IF lt1ubrc NE - 5RITE 6 ---

ENDIF-ENDFOR(-

Screen

00

Screen

100

Screen

An additiona system ro area is added for the caed transaction The system uses this area for

processing the individua screens in the transactionH the data from the tae is added here After the

transaction is processed the second ro area is reeasedH the system continues processing in the first

ro area

Notes

In contrast to atch input there is no error ogging (error sessions) here For processing the caed

transaction the system uses the authoriDations of the user that caed the transaction The 2 tae

can ony hod data for one transaction run at a time efore another transaction is caed and its data

can e added you must eecute a amp7Famp7S= for the 2 tae

copy SAP AG BC420 12-63

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 6488

084

983209 SAP AG 1999

ALL TRASATI C6

RE)ORT 777-

2A TRANSA2TION FD USING bdcdata (ODE E-

Default for MD1 is A

2A TRANSA2TION 3tranact9oncode4 USING 3bdc1table4 C (ODE A E N C-

-ith the parameter 57 you can seect a specific dispay mode for processing the transaction The

foo$ing three modes are avaiae

A (ispay a)

If you eecute the program a the screens and a their data are dispayed This is the defaut vaue

for the 57 in 2A++ TampANSA2TI5N

N (ispay nothing)

The screens are not dispayed at a regardess of $hether any of them contained errors As soon as

the transaction has een fuy processed contro is returned to your program (The vaue of the

parameter 4PAT7 determines $hether dataase updates are eecuted or not)

7 (ispay errors ony)As soon as an error occurs in a screen the transaction is s$itched to dispay mode so that you can

correct the errors

These dispay modes are the same as those in the atch input session processing

copy SAP AG BC420 12-64

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 6588

082

983209 SAP AG 1999

RE)ORT 777-

2A TRANSA2TION FD USING BD2DATA U)DATE -

ALL TRASATI Camp

RE)ORT 777-

2A TRANSA2TION FD USING bdcdata U)DATE -

2A TRANSA2TION 3tranact9oncode4 USING 3bdc1table4 C (ODE A E N C U)DATE A S C -

Default for UPDAT1 is A

-ith the parameter 4PAT7 you can contro ho$ dataase updates arising from a transaction are

carried out There are three options

A (asynchronous updating) The caed transaction does not $ait unti the dataase has een

updated it simpy for$ard the updates to the SAP update service This usuay speeds up the 2T

program This processing mode is N5T recommended for arge data sets as the caed transaction

does not receive a competion message from the update modue

The caing 2T program therefore cannot te if the transaction has een successfuy competed Cou

shoud use the updating administration function (transaction S8) to determine $hether updating

$as terminated eary The error anaysis correction functions for are ess hepfu than $ith

synchronous updating

S (synchronous updating) -ith synchronous updating the caed transaction $aits unti a the

updates have een competed So processing is so$er than $ith synchronous updating The caed

transaction can ho$ever report any updating errors to the program $hich maes error

anaysiscorrection easier

+ (local updating) $ith oca updating the dataase is not updated in a separate process it is

updated in the caers process (see appication hep documentation for the AAP ey$ord S7T

4PAT7 TAS6 +52A+)

copy SAP AG BC420 12-65

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 6688

088

983209 SAP AG 1999

ALL TRASATI C

RE)ORT 777-DATA mtab T0)E TABE OF bdcm8coll-

2A TRANSA2TION FD USING bdcdata (ESSAGES INTO mtab-

2A TRANSA2TION 3tranact9oncode4 USING 3bdc1table4 C (ODE A E N C U)DATE A S C (ESSAGES INTO 3metab4 C -

7SSAlt7S specifies that a system messages that are output during the eecution of a 2A++

TampANSA2TI5N are $ritten to the interna tae L7SSTA The interna tae must have the

structure 2Slt25++

4nie the cassica atch input processing $ith sessions 2A++ TampANSA2TI5N does not offer any

specia processing procedures for transactions containing errors There are no restart functions for

transactions that contain errors or that cause updating terminations

copy SAP AG BC420 12-66

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 6788

083

983209 SAP AG 1999

ALL TRASATI C4

RE)ORT 777-DATA mltot T0)E ctuaram-

2A TRANSA2TION FD USING BD2DATA

O)TIONS FRO( mltot-

2A TRANSA2TION 3tranact9oncode4 USING 3bdc1table4 C (ODE A E N C U)DATE A S C (ESSAGES INTO 3metab4 C O)TIONS FRO( ot C -

RE)ORT 777-DATA mltot T0)E ctuaram-2A TRANSA2TION FD USING bdcdata

O)TIONS FRO( mltot-

The addition 5PTI5NS enaes the ca transaction statement to e controed through a structure

The structure must have the dictionary type 2T43PAampAS

The addition 5PTI5NS Famp5 must not e comined either $ith the addition 57 or $ith

4PAT7 ore information on the net side

copy SAP AG BC420 12-67

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 6888

085

983209 SAP AG 1999

Structure TUltPARAMS

DISMD1 Procen mode anaoo o addon amp

UPDMD1 $pdae mode anaoo o addon $PA

ATTMD1 CA mode CA conro

D19SI1 orce de=a EndoE e drn procen

RAMMIT +o eD a Camp amp(

IPT +o a ac np eonF a F S-B+P SPAC

I1D +o a ac np eon a=er end o= BC daa

The components are defined as foo$s

The components 7FSIM7 ampA25IT N5INPT and N5I7N can have the foo$ing

vaues KGK E Ces or K K E No

If the addition 5PTI5NS Famp5 is not specified the foo$ing settings appy to the contro

parameters

IS57 from addition 57

4P57 from addition 4PAT7

2ATT57 2ATT not active

7FSIM7 o not not use defaut $indo$s siDe

ampA25IT Successfu eit at 25IT -5amp6

N5INPT atch input session active (SC9INPT E G)

N5I7N atch input session sti active after end of 2 data

copy SAP AG BC420 12-68

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 6988

087

983209 SAP AG 1999

SMSBID Message ID

SMSBT Message T(pe C1GIGWGSGA

SMSB Message umber

SMSB6 Message ariable 6

SMSBamp Message ariable amp

SMSB Message ariable

SMSB4 Message ariable 4

SMSBID Message ID

SMSBT Message T(pe C1GIGWGSGA

SMSB Message umber

SMSB6 Message ariable 6

SMSBamp Message ariable amp

SMSB Message ariable

SMSB4 Message ariable 4

Return code$

S(stem fields$

alue Meaning

0 Successful

6000 1rror in transaction

6000 1rror in processing call transaction

see also the s(stem fields specified

alue Meaning

0 Successful

6000 1rror in transaction

6000 1rror in processing call transaction

see also the s(stem fields specified

9ield name Meaning9ield name9ield name MeaningMeaning

Return ode and S(stem 9ields

The return code is used to specify $hether the caed transaction $as processed successfuy In

addition severa system fieds are fied The numer I type and variaes of the diaog message

output y the caed transaction Cou need this information to output the message tet

copy SAP AG BC420 12-69

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 7088

030

983209 SAP AG 1999

Benerated Program of the TA Recorder

REFRES= (ESSTAB-

2A TRANSA2TION tcode USING bdcdata (ODE ctumode U)DATE cudate (ESSAGES INTO metab-OO) AT metab- ENDOO)-IF lubrc 34 AND e8rou 34 S)A2E- IF e8rouoenend - 2A FUN2TION BD2O)ENGROU) E)ORTING ---------

--------- E8rouoened - ENDIF- 2A FUN2TION BD2INSERT E)ORTING T2ODE tcode TABES D0N)ROTAB bdcdata-ENDIF-REFRES= bdcdata-

Message table output

pen error session

Insert data record that

has errors into error

session

If you have seected ca transaction on the seection screen the generated program runs as foo$s

The onine transaction is caed $ith ca transaction and passed to tae 2ATA A the

messages arising during the ca transaction are put in the interna tae 7SSTA

7SSTA is output as a ist

If you have specified an error session ( 73ltamp54P L SPA27) on the seection screen and the

ca transaction comes across an error (+3S4amp2 L 0) the error session is opened The error

session is ho$ever ony opened once Then the data record is paced in the session

A the other data records that have errors $ith ca transaction are paced in the same session

copy SAP AG BC420 12-70

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 7188

036

983209 SAP AG 1999

The Transaction Recorder

PrinciplesPrinciples

Recording )ith the LSMWRecording )ith the LSMW

Principles of atch Input and all TransactionPrinciples of atch Input and all Transaction

Integrating the TA Program into the DWIntegrating the TA Program into the DW

Using the TA Recorder Using the TA Recorder

copy SAP AG BC420 12-71

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 7288

03amp

983209 SAP AG 1999

Integrating into the DW

Transfer program

AAP Dictionar(

Integrate

SDA0

SDA6

SDAamp

SDA

Cou can integrate the generated program into the G9- The structure of the fie must e created

in the AAP ictionary The taes SGA0 SGA8 SGA1 and SGA $i e fied

copy SAP AG BC420 12-72

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 7388

03

983209 SAP AG 1999

DW Release 42

Goo

-B eeae 45

aa ran=er ogtec

Int customer data transfer ob-ect

ecord =ed

Dece daa ran=er

d Goo

The ampunction ampor interatin TA recorder prora$s is

i$ple$ented in the

D+-B in Release

The recorder can e integrated as of ampeease and it is provided in the G9- ampeease

ltot to the G9- ampeease 5n the initia screen you can integrate programs y choosing ampoto

( +nt customer ata transfer o-ect

copy SAP AG BC420 12-73

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 7488

034

983209 SAP AG 1999

reating Program as D b-ect

Comer ran=er ogtec

ampgtec ype

Sor eD =or ogtec

aa ran=er proram

Srcre name

9900

(+A1

Cane comer

ZBCA+G

ZB

ustomer transfer ob-ect

umber bet)een 7000 and 7777

b-ect t(pe

Assignment to R ob-ect

Short tet for D ob-ectShort description

Data transfer program

ame of generated program

Structure name

A structure Cstructure la(out )ith this name is created in

the AAP Dictionar(

For ampeease transfer oects $ere not organiDed y 5amp oects ut y a G numer (00089

OOOO) The numer range O0009OOOO is reserved for customers

To create a connection to the ne$ G 9- you must assign the program to a 5amp oect

2reate a short tet for the G oect This tet $i appear in the method seection ist

Specify the program to e incuded

Specify a name for the structure to e created in the AAP ictionary

Note $he generated program appears under program type +N and not under program type

-

copy SAP AG BC420 12-74

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 7588

032

983209 SAP AG 1999

Adantages

Automatic program registration in the DW in

Release 48

ou can use all the functions defined for

standard ob-ects

1ception$ The (reate ampile ith data

function

If you incuded the oect in the ampeease $orench it is automaticay avaiae in the ampeease

B $orench

A the $orench functions are avaiae for your oect ecept for Create files ith transfer ata

copy SAP AG BC420 12-75

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 7688

038

983209 SAP AG 1999

ou are no) able to$

The Transaction Recorder$ Unit Summar(

Use the recording function in the LSMW to create

a batch input session )ith the data from the

eternal s(stem

Use the TA Recorder to create (our o)n data

transfer program

Anal(e programs that )or+ )ith batch input or

call transaction

Integrate the TA Recorder programs into the

DW

copy SAP AG BC420 12-76

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 7788

ercise 1

nit $ -ecorder

$opic 2reating etors

$ransaction -ecorder ercise 1

bull 2reating detors $ith eterna numer assignment

bull etor numers M9980008 to M9980080

Address data for detors $ith eterna numer assignment is to

e transferred using program ampFI700

ro4ect F5

Supro4ect +5

-un +575

$as)s 85 95 8S25

9oad program -F+00

8 In the foo$ing eercises eisting data is to e changed Therefore these detors $ith

eterna numer assignment have to first e created

898 4nder suproect 79 create run 797G9 $ith the name Detors ith

eternal numers

copy SAP AG BC420 12-77

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 7888

891 2reate the foo$ing three tass The tass map the foo$ing process steps

convert data create + session and process + session

89198 In run 797G9 create the foo$ing tas

9 Tas AP9

9 Name 2onvert data 9 Tas type AP

9 Program type +S-

Seect the foo$ing +S- oect

+S- proect 2109

+S- suproect 7I9

+S- oect I997GT

89191 In run 797G9 create the foo$ing tas 9 Tas +5A9

9 Name 2reate I session

Tas type +5A

9 Program type INP

Seect program ampFI700 $ith the variant

I97G9

8919 In run 797G9 create the foo$ing tas

9 Tas S29

9 Name Process I session Tas type S2

9 Program type amp7P5

Seect program ampS2S4 $ith the variant

S497G9

Note that you have to correct the seuence of the tass 2onvert data

create + session and process + session

4se the uttons

89 Start the run

The detors $i e created $ith eterna numer assignments

89 2hec in transaction F0 that the detors M9980008 to M9980080 have een

created

copy SAP AG BC420 12-78

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 7988

ercise

nit $ransaction -ecorder

$opic -ecording function in the 9S8(

bull 2reate a recording using the +S-

bull ltenerate a atch input session

2hange the detor address data in the amp System

Name of the recording +

Name of the file +2055+F9

8 2reate the recording 7I3 using the +S- ampecord the transaction F01 (2hange

detor)

898 efore you create the recording first test the transaction onineQ

For the recording use detor M9980008 5n the initia screen of the F01

maintain the foo$ing fieds ony

etor etor M9980008

2ompany code 0008

Address data seect

Note $he data record must e saved hile recording

891 aintain the names and the descriptions for the foo$ing fieds

Name city street posta code and teephone numereete a other fieds in screen 880 from the recording (eg S5ampT+ +AN8

SPampAS)

4se the same technica names as sho$n in the tae eo$ (automatic fied

mapping)

copy SAP AG BC420 12-79

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 8088

1 2reate the suproect 7I9 and the ne$ oect TA3 in your proect 2109

aintain the oect attriutes and seect the item atch input recording Seect your

recording 7I3

2reate the source structure address

2reate the source fieds according to the tae eo$ 5r copy them from proect 2109S37N suproect 7I900 oect TA900

198 Fie setup The data from the egacy system are dispayed in the foo$ing tae

Fied name Fied type Fied ength escription

N5 2 8B etor numer

NA7 2 Name

STamp77T 2 Street

2ITC 2 2ityPace of residence

MIP 2 80 Posta code

T7+ 2 8B Teephone numer

191 aintain the fied mapping 4se the automatic fied mapping (via menu item

7tras)

19 Specify the fies 5ny maintain the fie name of the source fie

Name of the fie 21099IFI+7

2odepage 8800

19 Import the data and convert them ispay the data in each caseQ

19 2reate a atch input session

19B ampun the atch input session

copy SAP AG BC420 12-80

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 8188

ercise 3

nit $ransaction -ecorder

$opic -ecording ith the $ -ecorder

bull ltenerate a recording using the TA recorder

bull Test the recording

2hange the address data of detors in the amp system

Name recording $+

Name of the file +2055+F9

8 2reate the recording TA37I3 using the transaction recorder ampecord the

transaction F01 (change detor)

898 4se detor M9980008 for the recording 5n the F01 initia screen ony

maintain the foo$ing fieds

etor etor M9980008

2ompany 2ode 0008

Address data seect

Note $he data record must e saved hen recording

eete a fieds that do not eist in the source fie 21099IFI+7 from screen

880 in the recording (eg 6NA89S5ampT+ 6NA89+AN8 6ANNQ9SPampAS) Note o not deete fieds ampF01946ampS and ampF0190880

Save the recording no$

1 S$itch to the recordings overvie$

198 Process the recording $ith the processing mode A (dispay a)

191 Process the recording $ith the processing mode RN (no dispay)

19 If the recording has een tested and no error has occurred generate a I session

and run it using the I monitor If an error shoud occur generate the recordingagainQ

copy SAP AG BC420 12-81

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 8288

From the recording generate the program M21037I3 in your deveopment cass

2109 Seect the foo$ing

bull ampead fied contents from fie

bull 2reate test data in the fie 2103dei3test3tt

98 Save this program and eecute it ltenerate one I session each and process it

2arry out the same steps again using the ca transaction

The generated program shoud no$ e changed so that fie 21099IFI+7 can e

read and processed

98 2hange the defaut vaue of the fie name (parameter dataset) in 21099

IFI+7

91 2hange the structure definition eete the company code fied and the address

data checo from the structure

9 2hange the su9routine ca perform dc3fied for the company code (KampF019

46ampSK) so that the vaue 0008 is transferred

9 2hange the su9routine ca perform dc3fied for the address data checo

(KampF0190880K) so that the vaue G is transferred

9 Start the program again and read the data from the fie 21099IFI+7 $ith

detor data ltenerate a I session $ith it and run it

copy SAP AG BC420 12-82

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 8388

033 Include DR16INCLUDE BDCRECX1

SELECTION-SCREEN BEGIN OF LINE

PARAMETERS SESSION RADIOBUTTON GROUP CTU create sessi SELECTION-SCREEN COMMENT $amp TEXT-S FOR FIELD SESSION

se(ecti-scree )siti +

PARAMETERS CTU RADIOBUTTON GROUP CTU ca(( trasacti

SELECTION-SCREEN COMMENT $amp TEXT-S FOR FIELD CTU

SELECTION-SCREEN END OF LINE

SELECTION-SCREEN BEGIN OF LINE

SELECTION-SCREEN COMMENT $amp TEXT-S1 FOR FIELD GROUP

se(ecti-scree )siti $+

PARAMETERS GROUP1$amp r) ae 0 sessi

SELECTION-SCREEN COMMENT $amp TEXT-S+ FOR FIELD CTUMODE

se(ecti-scree )siti

PARAMETERS CTUMODE LIE CTU2PARAMS-DISMODE DEFAULT 3N3

A4 s56 a(( 78)rs

E4 s56 78)r errr (8

N4 7 t 7is)(a8 78)r

SELECTION-SCREEN END OF LINE

SELECTION-SCREEN BEGIN OF LINE

SELECTION-SCREEN COMMENT $amp TEXT-S$ FOR FIELD USER

se(ecti-scree )siti $+

PARAMETERS4 USER1$amp DEFAULT S9-UNAME ser 0r sessi i atc5

SELECTION-SCREEN COMMENT $amp TEXT-S FOR FIELD CUPDATE

se(ecti-scree )siti

PARAMETERS CUPDATE LIE CTU2PARAMS-UPDMODE DEFAULT 3L3

S4 s8c5rs(8

A4 as8c5rs(8

L4 (ca(

SELECTION-SCREEN END OF LINE

SELECTION-SCREEN BEGIN OF LINE

SELECTION-SCREEN COMMENT $amp TEXT-S FOR FIELD EEP

se(ecti-scree )siti $+

PARAMETERS4 EEP AS CltECBOX 3 3 = 7e(ete sessi i0 0iis5e7

3X3 = gtee) sessi i0 0iis5e7

SELECTION-SCREEN COMMENT $amp TEXT-S FOR FIELD E2GROUP

copy SAP AG BC420 12-83

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 8488

se(ecti-scree )siti

)araeters E2GROUP1$amp r) ae 0 errr-sessi

SELECTION-SCREEN END OF LINE

SELECTION-SCREEN BEGIN OF LINE

SELECTION-SCREEN COMMENT $amp TEXT-S FOR FIELD ltOLDDATE

se(ecti-scree )siti $+

PARAMETERS4 ltOLDDATE LIE S9-DATUM

SELECTION-SCREEN COMMENT +11amp TEXT-S$ FOR FIELD E2USER

se(ecti-scree )siti

PARAMETERS4 E2USER1$amp DEFAULT S9-UNAME ser 0r errr-sessi

SELECTION-SCREEN END OF LINE

SELECTION-SCREEN BEGIN OF LINE

SELECTION-SCREEN COMMENT +11amp TEXT-S FOR FIELD E2EEP

se(ecti-scree )siti

PARAMETERS4 E2EEP AS CltECBOX 3 3 = 7e(ete sessi i0 0iis5e7

3X3 = gtee) sessi i0 0iis5e7

SELECTION-SCREEN END OF LINE

SELECTION-SCREEN BEGIN OF LINE

SELECTION-SCREEN COMMENT +11amp TEXT-S FOR FIELD E2ltDATE

se(ecti-scree )siti

PARAMETERS4 E2ltDATE LIE S9-DATUM

SELECTION-SCREEN END OF LINE

SELECTION-SCREEN SIP

SELECTION-SCREEN BEGIN OF LINE

SELECTION-SCREEN COMMENT 1amp TEXT-S1 FOR FIELD NODATA

PARAMETERS4 NODATA DEFAULT 33 LOER CASE 7ata

SELECTION-SCREEN END OF LINE

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

Batc5i)t7ata 0 si(e trasacti

DATA4 BDCDATA LIE BDCDATA OCCURS ITlt ltEADER LINE

essaes 0 ca(( trasacti

DATA4 MESSTAB LIE BDCMSGCOLL OCCURS ITlt ltEADER LINE

errr sessi )ee7 3 3 r 3X3amp

DATA4 E2GROUP2OPENED

essae tets

TABLES4 T1

copy SAP AG BC420 12-84

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 8588

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

at se(ecti scree

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

AT SELECTION-SCREEN

r) a7 ser st e 0i((e7 0r create sessi

IF SESSION = 3X3 AND

GROUP = SPACE OR USER = SPACE

MESSAGE E1MSamp

ENDIF

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

)e 7ataset

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

FORM OPEN2DATASET USING P2DATASET

OPEN DATASET P2DATASET IN TEXT MODE

IF S9-SUBRC

RITE4 TEXT-E S9-SUBRC

STOP

ENDIF

ENDFORM

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

c(se 7ataset

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

FORM CLOSE2DATASET USING P2DATASET

CLOSE DATASET P2DATASET

ENDFORM

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

create atc5i)t sessi

t 0r ca(( trasacti siamp

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

FORM OPEN2GROUP

IF SESSION = 3X3

SIP

RITE4 $amp 3Create r)3I1amp GROUP

SIP

)e atc5i)t r)

CALL FUNCTION 3BDC2OPEN2GROUP3

EXPORTING CLIENT = S9-MANDT

copy SAP AG BC420 12-85

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 8688

GROUP = GROUP

USER = USER

EEP = EEP

ltOLDDATE = ltOLDDATE

RITE4 amp 3BDC2OPEN2GROUP3I$amp

1$amp 3retrc7e43I+amp

S9-SUBRC

ENDIF

ENDFORM

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

e7 atc5i)t sessi

ca(( trasacti si4 errr sessiamp

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

FORM CLOSE2GROUP

IF SESSION = 3X3

c(se atc5i)t r)

CALL FUNCTION 3BDC2CLOSE2GROUP3

RITE4 amp 3BDC2CLOSE2GROUP3Iamp

1$amp 3retrc7e43I+amp

S9-SUBRC

ELSE

IF E2GROUP2OPENED = 3X3

CALL FUNCTION 3BDC2CLOSE2GROUP3

RITE4

RITE4 amp 3Fe5(era))e 6r7e eret3Iamp

ENDIF

ENDIF

ENDFORM

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

Start e6 trasacti accr7i t )araeters

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

FORM BDC2TRANSACTION USING TCODE

DATA4 L2MSTRINGamp

DATA4 L2SUBRC LIE S9-SUBRC

atc5 i)t sessi

IF SESSION = 3X3

CALL FUNCTION 3BDC2INSERT3

EXPORTING TCODE = TCODE

TABLES D9NPROTAB = BDCDATA

RITE4 3BDC2INSERT3Iamp

copy SAP AG BC420 12-86

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 8788

TCODE

3retrc7e43I+amp

S9-SUBRC

3RECORD43

S9-INDEX

ca(( trasacti si

ELSE

REFRESlt MESSTAB

CALL TRANSACTION TCODE USING BDCDATA

MODE CTUMODE

UPDATE CUPDATE

MESSAGES INTO MESSTAB

L2SUBRC = S9-SUBRC

RITE4 3CALL2TRANSACTION3

TCODE

3retrc7e43I+amp

L2SUBRC

3RECORD43

S9-INDEX

LOOP AT MESSTAB

SELECT SINGLE FROM T1 ltERE SPRSL = MESSTAB-MSGSPRA

AND ARBGB = MESSTAB-MSGID

AND MSGNR = MESSTAB-MSGNR

IF S9-SUBRC =

L2MSTRING = T1-TEXT

IF L2MSTRING CS 313

REPLACE 313 ITlt MESSTAB-MSGH1 INTO L2MSTRING

REPLACE 3$3 ITlt MESSTAB-MSGH$ INTO L2MSTRING

REPLACE 33 ITlt MESSTAB-MSGH INTO L2MSTRING

REPLACE 33 ITlt MESSTAB-MSGH INTO L2MSTRING

ELSE

REPLACE 33 ITlt MESSTAB-MSGH1 INTO L2MSTRING

REPLACE 33 ITlt MESSTAB-MSGH$ INTO L2MSTRING

REPLACE 33 ITlt MESSTAB-MSGH INTO L2MSTRING

REPLACE 33 ITlt MESSTAB-MSGH INTO L2MSTRING

ENDIF

CONDENSE L2MSTRING

RITE4 MESSTAB-MSGT9P L2MSTRING$+amp

ELSE

RITE4 MESSTAB

ENDIF

ENDLOOP

copy SAP AG BC420 12-87

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 8888

SIP

Eree 0e5(era))e

IF L2SUBRC AND E2GROUP SPACE

IF E2GROUP2OPENED = 3 3

CALL FUNCTION 3BDC2OPEN2GROUP3

EXPORTING CLIENT = S9-MANDT

GROUP = E2GROUP

USER = E2USER

EEP = E2EEP

ltOLDDATE = E2ltDATE

E2GROUP2OPENED = 3X3

ENDIF

CALL FUNCTION 3BDC2INSERT3

EXPORTING TCODE = TCODE

TABLES D9NPROTAB = BDCDATA

ENDIF

ENDIF

REFRESlt BDCDATA

ENDFORM

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

Start e6 scree

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

FORM BDC2D9NPRO USING PROGRAM D9NPRO

CLEAR BDCDATA

BDCDATA-PROGRAM = PROGRAM

BDCDATA-D9NPRO = D9NPRO

BDCDATA-D9NBEGIN = 3X3

APPEND BDCDATA

ENDFORM

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

Isert 0ie(7

Page 42: BC420_46C - 012The Transaction Recorder

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 4288

04amp

983209 SAP AG 1999

ed conen

reating a Program

Recording

ZBC420ampProram name

Transfer Program

e daa

ead =rom =e

ran=er =rom recordn

reate

9ile nameTest data

ranranpBC420AA

Cou can generate a program from the recording

In the foo$ing diaog o enter a program name In addition you can choose the type and method

for fiing the maintained fied contents from the recorded screens

4se the vaues used for the recording If you reuire feie data transfer you $i have to modify

this program ater

ParameteriDe the input vaues and read these vaues from a fie A data structure is created for

parameteriDationH the data records are read from an eterna fie into this data structure The

program assumes the fie $as taiored to this data structure

If you have decided to parameteriDe the input vaues you shoud aso create a test fie during

generation To do this seect the checo and enter a name for the fie

The attriute maintenance screen of the AAP editor appears aintain the attriutes and save the

program

copy SAP AG BC420 12-42

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 4388

04

983209 SAP AG 1999

Program 9unctions

Online

transaction

Transfer program

To

error

1rror

ption 6ption ampFlat SAP

structure

Monitor

Cou have no$ generated a data transfer program for importing data into the amp System The

program can eecute the data transfer using atch input or ca transaction

If you choose option 1 and there is an error the data record is paced into a atch input session

copy SAP AG BC420 12-43

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 4488

044

983209 SAP AG 1999

Benerating 9unction Modules

Recording

Zcreaedeor ncon mode

ncon rop

Sor eD

ZBC420

Creae comer

9unction module

nl( one data record can be processed at a time

In the net diaog o you can generate a function modue a function group and short tet from the

recording The function modue is automaticay created in the function group

copy SAP AG BC420 12-44

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 4588

042

983209 SAP AG 1999

9unction of 9unction Modules

Online

transaction

To

error

1rror

ption 6 ption amp

9unction module

Import

Parameter 1port

parameter

Tables

M1SSTA

Monitor

S$BC

Import interface

The import interface consists of a technica part and the fieds from the recording (A parameter is

created for each input fied of the recorded transactions)

7port interface

Simpy consists of the parameter S4amp2 The function modue $i return a vaue in the system

fied SC9S4amp2 after caing ca transaction This return vaue is set to Dero if the data record has

een correcty processed (5ny appies to 2T)

If a session is created you $i e notified $hether the data record coud e paced into the session

Tae interfaceThis is used ony if the function modue $ors $ith ca transaction The tae contains a the

system messages

copy SAP AG BC420 12-45

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 4688

048

983209 SAP AG 1999

Import Interface of 9unction Module

$

Technical

fields

Data

fields

BI session or CALL TRANSACTION

Processin $ode

pdate $ode

a$e oamp BI session iamp (T initial)

Bacround user iamp (T initial)

Delete session aampter processin

Loc date oamp session

ODATA indicator

TU

MD1

UPDAT1

BRUP

US1R

=11P

ELDDAT1

DATA

Cou can use parameter 2T4 to specify $hether the function modue creates a atch input session

(2T4 E ) or updates the data record directy using ca transaction (2T4 E G)

The other parameters are fied as for a atch input session header

Note 7very time the function modue is caed a atch input session is created

If the session is to contain severa transactions proceed as foo$s

ltenerate the transaction severa times This can e achieved y recording the transaction again The

function modue interface $i then contain more than one transaction -hen the function modue is

caed severa transactions can e generated for each session

copy SAP AG BC420 12-46

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 4788

043

983209 SAP AG 1999

The Transaction Recorder

PrinciplesPrinciples

Recording )ith the LSMWRecording )ith the LSMW

Principles of atch Input and all TransactionPrinciples of atch Input and all Transaction

Integrating the TA Program into the DWIntegrating the TA Program into the DW

Using the TA Recorder Using the TA Recorder

copy SAP AG BC420 12-47

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 4888

045

983209 SAP AG 1999

Benerated Program

9unction modules DltP1ltBRUP

DltIS1RT

DltLS1ltBRUP

AAP Program

Define structure of

data in seJuential

fileDefine D

table

pen seJuential file

pen I session

Read data recordCseJuential file

9ill D table

9ill I session gtALL TRASATI

Last data record K

lose I session

lose seJuential file

The generated program has the structure dispayed aove It uses the standard function modues for

creating atch input sessions

copy SAP AG BC420 12-48

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 4988

047

983209 SAP AG 1999

Structure of the Benerated Program

Benerated part

Define D

table

pen seJuential file

pen I session

Read data record

9ill D table

9ill I session gtALL TRASATI

Last data recordK

lose I session

lose seJuential file

Include DR16

Define filestructure

P1ltDATAS1T

P1ltBRUP

DltDPR

Dlt9I1LD

DltTRASATI

LS1ltBRUP

LS1ltDATAS1T

The generated program consists of t$o parts 9 a generated part and the incude 2amp72G8 The

incude is provided in the standard system

The incude contains the definition of the reuired 2 tae and a further seven suroutines These

suroutines eecute the foo$ing functions

5pen and cose fie

5pen and cose session

Fi 2 tae

Fi session

The generated part is the main program and cas the reevant suroutines A structure is aso

generated in the generated part to read the eterna data into the fie

See the Appendi for more information on the 2amp72G8 program

copy SAP AG BC420 12-49

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 5088

020

983209 SAP AG 1999

Structure of D Table

PRBRAM DPR D1BI 9AM 9ALPRBRAMPRBRAM DPRDPR D1BID1BI 9AM9AM 9AL9AL

SAPM90ampD 0602

R90ampD=UR 600000

R90ampDU=RS 0006

R90ampD=T=D =UA

SAPM90ampD 0660

=A6AM16 Smith

=A6PSTL 87000

=A6LAD6 US

=A6SPRAS 1

SAPM90ampD 06amp0

=A6ST1B US6amp428357DDATA

PRBRAM

DPR

D1BI

9AM

9AL

EAR

UM

EAR

EAR

EAR

40

4

6

6amp

6amp

D Module pool

D Screen number

D Start of screen

D 9ield name

D 9ield contents

9ield ame T(pe Length Short Tet

AAP Dictionar(

The 2 tae has the same structure as in a standard transfer

copy SAP AG BC420 12-50

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 5188

026

983209 SAP AG 1999

Read Structure

Recording

DATA BEGIN OF record data element BUKRS bukr$amp data element KTOKD ktokd$amp data element NA(EG) name$+amp data element SORT ortl$ampEND OF record-

record

Automaticall( generated

from recording

The structure of the fie is automaticay generated and is a$ays defined $ith the name amp725amp

The generated structure a$ays has the same ayout 7ach fied is defined y t$o generated ro$s

The first ro$ is a$ays a comment ro$ containing the tet J data eement and the data eement of

the screen fied from the recording In the net ro$ the fied itsef is defined $ith the name of the

data eement foo$ed y a three9digit position numer $hich specifies the ocation in the structure

The ength of the fied is set y the ength of the data eement If a fied is not defined through a data

eement the system uses the ength of the screen fied

copy SAP AG BC420 12-51

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 5288

02amp

983209 SAP AG 1999

pening and losing the 9ile

P1ltDATAS1T

LS1ltDATAS1T

FOR( oendataet USING dataet-O)EN DATASET dataet IN TET (ODE-

IF S01SUBR2 34 - 5RITE 6 te7t1e S01SUBR2-STO)-

ENDIF-

ENDFOR(-

FOR( cloedataet USING dataet-2OSE DATASET dataet-

ENDFOR(-

Include

DR16

The suroutine 5P7N3ATAS7T opens the seuentia fie

The suroutine 2+5S73ATAS7T coses the seuentia fie

copy SAP AG BC420 12-52

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 5388

02

983209 SAP AG 1999

9unction Modules for I Program

lient

Session name

Eold date

=eep session

D user name

RecordK

LI1T

BRUP

ELDDAT1

=11P

US1R

R1RD

DltP1ltBRUPDltP1ltBRUP

Transaction code

D table

TD1

DPRTA

DltIS1RTDltIS1RT

DltLS1ltBRUPDltLS1ltBRUP

pen Isessionpen Isession

Insert data for

transactions

Insert data for

transactions

lose I

session

lose I

session

The foo$ing function modues are provided for creating atch input sessions (function group

S2)

235P7N3ltamp54P

2reates a ne$ session and contains genera data for the $hoe session

23INS7ampT

Inserts a the data for a transaction into the session The transferred interna tae $ith the

structure 2ATA must contain a the data reuired for fuy processing the transaction

232+5S73ltamp54P

2oses the session after a the data has een inserted As soon as the session has een cosed it

can e processed

The interna tae $ith the structure 2ATA can ony contain atch input data for one singe

transaction run So the individua transactions are inserted into the atch input session in a oop

using severa 23INS7ampT cas

copy SAP AG BC420 12-53

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 5488

024

983209 SAP AG 2001

9unction Module DltP1ltBRUP

ALL 9UTI DltP1ltBRUPALL 9UTI DltP1ltBRUP

1PRTIB

LI1T client

BRUP session name

ELDDAT1 loc+ date

=11P delete flag

US1R bdc user name

R1RD recording

IMPRTIB

NID internal session +e(

11PTIS

1PRTIB

LI1T client

BRUP session name

ELDDAT1 loc+ date

=11P delete flag

US1R bdc user name

R1RD recording

IMPRTIB NID internal session +e(

11PTIS

-ith the function modue 235P7N3ltamp54P you can open a atch input session

The foo$ing parameters are mandatory

2+I7NT (cient)

ltamp54P (session name)

4S7amp (user name)

Note The 4S7amp must a$ays e specified This user name is reuired for processing the session

in atch mode

The foo$ing parameters are optiona

=5+AT7 specifies the eariest date on $hich the session can e started677P fag specifies $hether session shoud e deeted after it has een successfuy processed The

677P fag is ignored if the session contains errors

677P E K K means deete the session after processing (defaut vaue) H

677P E KGK means do not deete session

amp725amp E KGK ao$s you to create a recording instead of a I session

If gtI is specified the function modue returns the interna session ey This is needed to e ae to

differentiate sessions that have the same name

-ith 7G27PTI5NS you get various return vaues that can e ueried $ith SC9S4amp2

Note In onine mode the onine user is used for the authoriDation checs regardess of the user

name specified

copy SAP AG BC420 12-54

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 5588

022

983209 SAP AG 1999

Subprogram P1ltBRUP

P1ltBRUP

FOR( oen8rou-IF e9on -

2A FUN2TION BD2O)ENGROU) E)ORTING 2IENT lt1mandt GROU) 8rou USER uer KEE) kee

=ODDATE gtolddate-

ENDIF-ENDFOR(-

Include

DR16

The suprogram 5P7N3ltamp54P opens the atch input session

copy SAP AG BC420 12-55

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 5688

028

983209 SAP AG 1999

9unction Module DltIS1RT

ALL 9UTI DltIS1RTALL 9UTI DltIS1RT

IMPRT

TD1 Transaction code

PSTltLAL Update locall(

PRITIB print list

TAL1S DPRTA bdclttable

11PTIS

IMPRT

TD1 Transaction code

PSTltLAL Update locall(

PRITIB print list

TAL1S DPRTA bdclttable

11PTIS

-ith the function modue 23INS7ampT you can add transaction data to the session

Cou need an interna 2 tae to transfer the data

The foo$ing parameters are mandatory

T257 Transaction code

CNPamp5TA 2 tae

The foo$ing parameters are optiona

P5ST3+52A+ E KGK activates oca updating This means that the data to e updated is ept in the

appication server and updated in the ast step of the transaction This does not invove the update

process (For more information see course 28 Programming ataase 4pdates)

PampINTINlt E KGK 9 ists processed in I $i e printed immediatey -ith 7G27PTI5NS you get various return vaues that can e ueried $ith SC9S4amp2

copy SAP AG BC420 12-56

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 5788

023

983209 SAP AG 1999

Subprogram DltTRASATI

DltTRASATI

FOR( BD2TRANSA2TION USING tcode-

IF e9on -2A FUN2TION BD2INSERT

E)ORTING T2ODE tcode TABES D0N)ROTAB bdcdata-

ESE-

ENDIF-ENDFOR(-

T

Include

DR16

The suprogram 23TampANSA2TI5N moves the fied 2 tae either to a atch input session

or uses ca transaction to import the data into the system 5n the seection screen you can specify

$hether you $ant to create a session or you $ant to use ca transaction to process the data directy

The S7SSI5N fied is then set according to your seection

copy SAP AG BC420 12-57

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 5888

025

983209 SAP AG 1999

9unction Module DltLS1ltBRUP

ALL 9UTI DltLS1ltBRUP

11PTIS

TltP1 6

NU1U1lt1RRR amp

-ith the function modue 232+5S73ltamp54P you can cose a atch input session

In 7G27PTI5NS you get various return vaues that can e ueried $ith SC9S4amp2

copy SAP AG BC420 12-58

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 5988

027

983209 SAP AG 1999

Subprogram LS1ltBRUP

FOR( cloe8rou-IF e9on -cloe batcgt 9nut 8rou

2A FUN2TION BD22OSEGROU)-

ESE-IF e8rouoened -

2A FUN2TION BD22OSEGROU)-

ENDIF-ENDIF-

ENDFOR(-

LS1ltBRUPlose session

lose error session

Include

DR16

The suprogram 2+5S73ltamp54P coses the atch input session The suprogram differentiates

et$een a norma I session (S7SSI5N E G) and a session opened $hen ca transaction

encountered an error (73ltamp54P35P7N7 E G)

copy SAP AG BC420 12-59

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 6088

080

983209 SAP AG 1999

Subprograms DltDPRG Dlt9I1LD

DltDPR

Dlt9I1LD

FOR( bdc9eld USING nam al-IF al 34 nodata-2EAR bdcdata- bdcdata1nam nam- bdcdata1al al- A))END bdcdata-ENDIF-

ENDFOR(-

FOR( bdcdltnro USING ro8ram dltnro- 2EAR bdcdata-Bdcdata1ro8ram ro8ram-Bdcdata1dltnro dltnro-Bdcdata1dltnbe89n - A))END bdcdata-ENDFOR(-

Include

DR16

The incude 2amp72GG contains t$o suprograms 23CNPamp5 and 23FI7+

Suprogram 23CNPamp5 fis the 2 tae $ith program names and screen numers

Suprogram 23FI7+ fis the 2 tae $ith fied names and vaues

7ach suprogram creates an entry in the 2 tae

copy SAP AG BC420 12-60

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 6188

086

983209 SAP AG 1999

9illing the D Table

erorm bdcdltnro u9n8 SA)(FD +- erorm bdc9eld u9n8 BD22URSOR RFD1BUKRS- erorm bdc9eld u9n8 BD2OK2ODE 6- erorm bdc9eld u9n8 RFD1BUKRS record1BUKRS- erorm bdc9eld u9n8 RFD1KTOKD record1KTOKD-

erorm bdcdltnro u9n8 SA)(FD -

erorm bdc9eld u9n8 BD22URSOR KNA1S)RAS- erorm bdc9eld u9n8 BD2OK2ODE 6- erorm bdc9eld u9n8 KNA1NA(E record1NA(E-

erorm bdc9eld u9n8 KNA1SORT record1SORT-

Recording Benerated automaticall(

from the recording

)ERFOR( bdcdltnro USING SA)(FD +- )ERFOR( bdc9eld USING BD22URSOR RFD1BUKRS-)ERFOR( bdc9eld USING BD2OK2ODE 6-)ERFOR( bdc9eld USING RFD1BUKRS record1BUKRS-)ERFOR( bdc9eld USING RFD1KTOKD record1KTOKD-

)ERFOR( bdcdltnro USING SA)(FD -

)ERFOR( bdc9eld USING BD22URSOR KNA1S)RAS-)ERFOR( bdc9eld USING BD2OK2ODE 6-)ERFOR( bdc9eld USING KNA1NA(E record1NA(E-

)ERFOR( bdc9eld USING KNA1SORT record1SORT- ---

The 2 tae is fied $ith data from the recording The suroutines 23CNPamp5 and

23FI7+ are used for this

The suroutines are caed in the reuired structure or seuence

copy SAP AG BC420 12-61

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 6288

08amp

983209 SAP AG 1999

erie)

SAPDatabase

SeJuential9ile

SAPDatabase

ALL TRASATIALL TRASATI

SeJuential9ile

ATE IPUTATE IPUT

D TableD TableD TableD Table

I Monitor

T

In contrast to atch input you can use ca transaction to directy pass data to the diaog interface

$ithout using a atch input session Cou use an interna tae (2 tae same structure and ayout

as atch input) to temporariy store your screen data Then you ca the desired transaction in your

program

Note 5n average the 2a Transaction method is 8 to times faster than using atch Input

copy SAP AG BC420 12-62

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 6388

08

983209 SAP AG 1999

all Transaction Program$ 1ample

RE)ORT abcbdcdcdeb9ct-

)ARA(ETERS d9mode DEFAUT A

udmode DEFAUT S-FOR( calltranact9on-2A TRANSA2TION FD

USING bdcdata (ODE d9mode

U)DATE udmode-

IF lt1ubrc NE - 5RITE 6 ---

ENDIF-ENDFOR(-

Screen

00

Screen

100

Screen

An additiona system ro area is added for the caed transaction The system uses this area for

processing the individua screens in the transactionH the data from the tae is added here After the

transaction is processed the second ro area is reeasedH the system continues processing in the first

ro area

Notes

In contrast to atch input there is no error ogging (error sessions) here For processing the caed

transaction the system uses the authoriDations of the user that caed the transaction The 2 tae

can ony hod data for one transaction run at a time efore another transaction is caed and its data

can e added you must eecute a amp7Famp7S= for the 2 tae

copy SAP AG BC420 12-63

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 6488

084

983209 SAP AG 1999

ALL TRASATI C6

RE)ORT 777-

2A TRANSA2TION FD USING bdcdata (ODE E-

Default for MD1 is A

2A TRANSA2TION 3tranact9oncode4 USING 3bdc1table4 C (ODE A E N C-

-ith the parameter 57 you can seect a specific dispay mode for processing the transaction The

foo$ing three modes are avaiae

A (ispay a)

If you eecute the program a the screens and a their data are dispayed This is the defaut vaue

for the 57 in 2A++ TampANSA2TI5N

N (ispay nothing)

The screens are not dispayed at a regardess of $hether any of them contained errors As soon as

the transaction has een fuy processed contro is returned to your program (The vaue of the

parameter 4PAT7 determines $hether dataase updates are eecuted or not)

7 (ispay errors ony)As soon as an error occurs in a screen the transaction is s$itched to dispay mode so that you can

correct the errors

These dispay modes are the same as those in the atch input session processing

copy SAP AG BC420 12-64

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 6588

082

983209 SAP AG 1999

RE)ORT 777-

2A TRANSA2TION FD USING BD2DATA U)DATE -

ALL TRASATI Camp

RE)ORT 777-

2A TRANSA2TION FD USING bdcdata U)DATE -

2A TRANSA2TION 3tranact9oncode4 USING 3bdc1table4 C (ODE A E N C U)DATE A S C -

Default for UPDAT1 is A

-ith the parameter 4PAT7 you can contro ho$ dataase updates arising from a transaction are

carried out There are three options

A (asynchronous updating) The caed transaction does not $ait unti the dataase has een

updated it simpy for$ard the updates to the SAP update service This usuay speeds up the 2T

program This processing mode is N5T recommended for arge data sets as the caed transaction

does not receive a competion message from the update modue

The caing 2T program therefore cannot te if the transaction has een successfuy competed Cou

shoud use the updating administration function (transaction S8) to determine $hether updating

$as terminated eary The error anaysis correction functions for are ess hepfu than $ith

synchronous updating

S (synchronous updating) -ith synchronous updating the caed transaction $aits unti a the

updates have een competed So processing is so$er than $ith synchronous updating The caed

transaction can ho$ever report any updating errors to the program $hich maes error

anaysiscorrection easier

+ (local updating) $ith oca updating the dataase is not updated in a separate process it is

updated in the caers process (see appication hep documentation for the AAP ey$ord S7T

4PAT7 TAS6 +52A+)

copy SAP AG BC420 12-65

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 6688

088

983209 SAP AG 1999

ALL TRASATI C

RE)ORT 777-DATA mtab T0)E TABE OF bdcm8coll-

2A TRANSA2TION FD USING bdcdata (ESSAGES INTO mtab-

2A TRANSA2TION 3tranact9oncode4 USING 3bdc1table4 C (ODE A E N C U)DATE A S C (ESSAGES INTO 3metab4 C -

7SSAlt7S specifies that a system messages that are output during the eecution of a 2A++

TampANSA2TI5N are $ritten to the interna tae L7SSTA The interna tae must have the

structure 2Slt25++

4nie the cassica atch input processing $ith sessions 2A++ TampANSA2TI5N does not offer any

specia processing procedures for transactions containing errors There are no restart functions for

transactions that contain errors or that cause updating terminations

copy SAP AG BC420 12-66

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 6788

083

983209 SAP AG 1999

ALL TRASATI C4

RE)ORT 777-DATA mltot T0)E ctuaram-

2A TRANSA2TION FD USING BD2DATA

O)TIONS FRO( mltot-

2A TRANSA2TION 3tranact9oncode4 USING 3bdc1table4 C (ODE A E N C U)DATE A S C (ESSAGES INTO 3metab4 C O)TIONS FRO( ot C -

RE)ORT 777-DATA mltot T0)E ctuaram-2A TRANSA2TION FD USING bdcdata

O)TIONS FRO( mltot-

The addition 5PTI5NS enaes the ca transaction statement to e controed through a structure

The structure must have the dictionary type 2T43PAampAS

The addition 5PTI5NS Famp5 must not e comined either $ith the addition 57 or $ith

4PAT7 ore information on the net side

copy SAP AG BC420 12-67

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 6888

085

983209 SAP AG 1999

Structure TUltPARAMS

DISMD1 Procen mode anaoo o addon amp

UPDMD1 $pdae mode anaoo o addon $PA

ATTMD1 CA mode CA conro

D19SI1 orce de=a EndoE e drn procen

RAMMIT +o eD a Camp amp(

IPT +o a ac np eonF a F S-B+P SPAC

I1D +o a ac np eon a=er end o= BC daa

The components are defined as foo$s

The components 7FSIM7 ampA25IT N5INPT and N5I7N can have the foo$ing

vaues KGK E Ces or K K E No

If the addition 5PTI5NS Famp5 is not specified the foo$ing settings appy to the contro

parameters

IS57 from addition 57

4P57 from addition 4PAT7

2ATT57 2ATT not active

7FSIM7 o not not use defaut $indo$s siDe

ampA25IT Successfu eit at 25IT -5amp6

N5INPT atch input session active (SC9INPT E G)

N5I7N atch input session sti active after end of 2 data

copy SAP AG BC420 12-68

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 6988

087

983209 SAP AG 1999

SMSBID Message ID

SMSBT Message T(pe C1GIGWGSGA

SMSB Message umber

SMSB6 Message ariable 6

SMSBamp Message ariable amp

SMSB Message ariable

SMSB4 Message ariable 4

SMSBID Message ID

SMSBT Message T(pe C1GIGWGSGA

SMSB Message umber

SMSB6 Message ariable 6

SMSBamp Message ariable amp

SMSB Message ariable

SMSB4 Message ariable 4

Return code$

S(stem fields$

alue Meaning

0 Successful

6000 1rror in transaction

6000 1rror in processing call transaction

see also the s(stem fields specified

alue Meaning

0 Successful

6000 1rror in transaction

6000 1rror in processing call transaction

see also the s(stem fields specified

9ield name Meaning9ield name9ield name MeaningMeaning

Return ode and S(stem 9ields

The return code is used to specify $hether the caed transaction $as processed successfuy In

addition severa system fieds are fied The numer I type and variaes of the diaog message

output y the caed transaction Cou need this information to output the message tet

copy SAP AG BC420 12-69

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 7088

030

983209 SAP AG 1999

Benerated Program of the TA Recorder

REFRES= (ESSTAB-

2A TRANSA2TION tcode USING bdcdata (ODE ctumode U)DATE cudate (ESSAGES INTO metab-OO) AT metab- ENDOO)-IF lubrc 34 AND e8rou 34 S)A2E- IF e8rouoenend - 2A FUN2TION BD2O)ENGROU) E)ORTING ---------

--------- E8rouoened - ENDIF- 2A FUN2TION BD2INSERT E)ORTING T2ODE tcode TABES D0N)ROTAB bdcdata-ENDIF-REFRES= bdcdata-

Message table output

pen error session

Insert data record that

has errors into error

session

If you have seected ca transaction on the seection screen the generated program runs as foo$s

The onine transaction is caed $ith ca transaction and passed to tae 2ATA A the

messages arising during the ca transaction are put in the interna tae 7SSTA

7SSTA is output as a ist

If you have specified an error session ( 73ltamp54P L SPA27) on the seection screen and the

ca transaction comes across an error (+3S4amp2 L 0) the error session is opened The error

session is ho$ever ony opened once Then the data record is paced in the session

A the other data records that have errors $ith ca transaction are paced in the same session

copy SAP AG BC420 12-70

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 7188

036

983209 SAP AG 1999

The Transaction Recorder

PrinciplesPrinciples

Recording )ith the LSMWRecording )ith the LSMW

Principles of atch Input and all TransactionPrinciples of atch Input and all Transaction

Integrating the TA Program into the DWIntegrating the TA Program into the DW

Using the TA Recorder Using the TA Recorder

copy SAP AG BC420 12-71

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 7288

03amp

983209 SAP AG 1999

Integrating into the DW

Transfer program

AAP Dictionar(

Integrate

SDA0

SDA6

SDAamp

SDA

Cou can integrate the generated program into the G9- The structure of the fie must e created

in the AAP ictionary The taes SGA0 SGA8 SGA1 and SGA $i e fied

copy SAP AG BC420 12-72

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 7388

03

983209 SAP AG 1999

DW Release 42

Goo

-B eeae 45

aa ran=er ogtec

Int customer data transfer ob-ect

ecord =ed

Dece daa ran=er

d Goo

The ampunction ampor interatin TA recorder prora$s is

i$ple$ented in the

D+-B in Release

The recorder can e integrated as of ampeease and it is provided in the G9- ampeease

ltot to the G9- ampeease 5n the initia screen you can integrate programs y choosing ampoto

( +nt customer ata transfer o-ect

copy SAP AG BC420 12-73

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 7488

034

983209 SAP AG 1999

reating Program as D b-ect

Comer ran=er ogtec

ampgtec ype

Sor eD =or ogtec

aa ran=er proram

Srcre name

9900

(+A1

Cane comer

ZBCA+G

ZB

ustomer transfer ob-ect

umber bet)een 7000 and 7777

b-ect t(pe

Assignment to R ob-ect

Short tet for D ob-ectShort description

Data transfer program

ame of generated program

Structure name

A structure Cstructure la(out )ith this name is created in

the AAP Dictionar(

For ampeease transfer oects $ere not organiDed y 5amp oects ut y a G numer (00089

OOOO) The numer range O0009OOOO is reserved for customers

To create a connection to the ne$ G 9- you must assign the program to a 5amp oect

2reate a short tet for the G oect This tet $i appear in the method seection ist

Specify the program to e incuded

Specify a name for the structure to e created in the AAP ictionary

Note $he generated program appears under program type +N and not under program type

-

copy SAP AG BC420 12-74

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 7588

032

983209 SAP AG 1999

Adantages

Automatic program registration in the DW in

Release 48

ou can use all the functions defined for

standard ob-ects

1ception$ The (reate ampile ith data

function

If you incuded the oect in the ampeease $orench it is automaticay avaiae in the ampeease

B $orench

A the $orench functions are avaiae for your oect ecept for Create files ith transfer ata

copy SAP AG BC420 12-75

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 7688

038

983209 SAP AG 1999

ou are no) able to$

The Transaction Recorder$ Unit Summar(

Use the recording function in the LSMW to create

a batch input session )ith the data from the

eternal s(stem

Use the TA Recorder to create (our o)n data

transfer program

Anal(e programs that )or+ )ith batch input or

call transaction

Integrate the TA Recorder programs into the

DW

copy SAP AG BC420 12-76

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 7788

ercise 1

nit $ -ecorder

$opic 2reating etors

$ransaction -ecorder ercise 1

bull 2reating detors $ith eterna numer assignment

bull etor numers M9980008 to M9980080

Address data for detors $ith eterna numer assignment is to

e transferred using program ampFI700

ro4ect F5

Supro4ect +5

-un +575

$as)s 85 95 8S25

9oad program -F+00

8 In the foo$ing eercises eisting data is to e changed Therefore these detors $ith

eterna numer assignment have to first e created

898 4nder suproect 79 create run 797G9 $ith the name Detors ith

eternal numers

copy SAP AG BC420 12-77

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 7888

891 2reate the foo$ing three tass The tass map the foo$ing process steps

convert data create + session and process + session

89198 In run 797G9 create the foo$ing tas

9 Tas AP9

9 Name 2onvert data 9 Tas type AP

9 Program type +S-

Seect the foo$ing +S- oect

+S- proect 2109

+S- suproect 7I9

+S- oect I997GT

89191 In run 797G9 create the foo$ing tas 9 Tas +5A9

9 Name 2reate I session

Tas type +5A

9 Program type INP

Seect program ampFI700 $ith the variant

I97G9

8919 In run 797G9 create the foo$ing tas

9 Tas S29

9 Name Process I session Tas type S2

9 Program type amp7P5

Seect program ampS2S4 $ith the variant

S497G9

Note that you have to correct the seuence of the tass 2onvert data

create + session and process + session

4se the uttons

89 Start the run

The detors $i e created $ith eterna numer assignments

89 2hec in transaction F0 that the detors M9980008 to M9980080 have een

created

copy SAP AG BC420 12-78

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 7988

ercise

nit $ransaction -ecorder

$opic -ecording function in the 9S8(

bull 2reate a recording using the +S-

bull ltenerate a atch input session

2hange the detor address data in the amp System

Name of the recording +

Name of the file +2055+F9

8 2reate the recording 7I3 using the +S- ampecord the transaction F01 (2hange

detor)

898 efore you create the recording first test the transaction onineQ

For the recording use detor M9980008 5n the initia screen of the F01

maintain the foo$ing fieds ony

etor etor M9980008

2ompany code 0008

Address data seect

Note $he data record must e saved hile recording

891 aintain the names and the descriptions for the foo$ing fieds

Name city street posta code and teephone numereete a other fieds in screen 880 from the recording (eg S5ampT+ +AN8

SPampAS)

4se the same technica names as sho$n in the tae eo$ (automatic fied

mapping)

copy SAP AG BC420 12-79

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 8088

1 2reate the suproect 7I9 and the ne$ oect TA3 in your proect 2109

aintain the oect attriutes and seect the item atch input recording Seect your

recording 7I3

2reate the source structure address

2reate the source fieds according to the tae eo$ 5r copy them from proect 2109S37N suproect 7I900 oect TA900

198 Fie setup The data from the egacy system are dispayed in the foo$ing tae

Fied name Fied type Fied ength escription

N5 2 8B etor numer

NA7 2 Name

STamp77T 2 Street

2ITC 2 2ityPace of residence

MIP 2 80 Posta code

T7+ 2 8B Teephone numer

191 aintain the fied mapping 4se the automatic fied mapping (via menu item

7tras)

19 Specify the fies 5ny maintain the fie name of the source fie

Name of the fie 21099IFI+7

2odepage 8800

19 Import the data and convert them ispay the data in each caseQ

19 2reate a atch input session

19B ampun the atch input session

copy SAP AG BC420 12-80

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 8188

ercise 3

nit $ransaction -ecorder

$opic -ecording ith the $ -ecorder

bull ltenerate a recording using the TA recorder

bull Test the recording

2hange the address data of detors in the amp system

Name recording $+

Name of the file +2055+F9

8 2reate the recording TA37I3 using the transaction recorder ampecord the

transaction F01 (change detor)

898 4se detor M9980008 for the recording 5n the F01 initia screen ony

maintain the foo$ing fieds

etor etor M9980008

2ompany 2ode 0008

Address data seect

Note $he data record must e saved hen recording

eete a fieds that do not eist in the source fie 21099IFI+7 from screen

880 in the recording (eg 6NA89S5ampT+ 6NA89+AN8 6ANNQ9SPampAS) Note o not deete fieds ampF01946ampS and ampF0190880

Save the recording no$

1 S$itch to the recordings overvie$

198 Process the recording $ith the processing mode A (dispay a)

191 Process the recording $ith the processing mode RN (no dispay)

19 If the recording has een tested and no error has occurred generate a I session

and run it using the I monitor If an error shoud occur generate the recordingagainQ

copy SAP AG BC420 12-81

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 8288

From the recording generate the program M21037I3 in your deveopment cass

2109 Seect the foo$ing

bull ampead fied contents from fie

bull 2reate test data in the fie 2103dei3test3tt

98 Save this program and eecute it ltenerate one I session each and process it

2arry out the same steps again using the ca transaction

The generated program shoud no$ e changed so that fie 21099IFI+7 can e

read and processed

98 2hange the defaut vaue of the fie name (parameter dataset) in 21099

IFI+7

91 2hange the structure definition eete the company code fied and the address

data checo from the structure

9 2hange the su9routine ca perform dc3fied for the company code (KampF019

46ampSK) so that the vaue 0008 is transferred

9 2hange the su9routine ca perform dc3fied for the address data checo

(KampF0190880K) so that the vaue G is transferred

9 Start the program again and read the data from the fie 21099IFI+7 $ith

detor data ltenerate a I session $ith it and run it

copy SAP AG BC420 12-82

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 8388

033 Include DR16INCLUDE BDCRECX1

SELECTION-SCREEN BEGIN OF LINE

PARAMETERS SESSION RADIOBUTTON GROUP CTU create sessi SELECTION-SCREEN COMMENT $amp TEXT-S FOR FIELD SESSION

se(ecti-scree )siti +

PARAMETERS CTU RADIOBUTTON GROUP CTU ca(( trasacti

SELECTION-SCREEN COMMENT $amp TEXT-S FOR FIELD CTU

SELECTION-SCREEN END OF LINE

SELECTION-SCREEN BEGIN OF LINE

SELECTION-SCREEN COMMENT $amp TEXT-S1 FOR FIELD GROUP

se(ecti-scree )siti $+

PARAMETERS GROUP1$amp r) ae 0 sessi

SELECTION-SCREEN COMMENT $amp TEXT-S+ FOR FIELD CTUMODE

se(ecti-scree )siti

PARAMETERS CTUMODE LIE CTU2PARAMS-DISMODE DEFAULT 3N3

A4 s56 a(( 78)rs

E4 s56 78)r errr (8

N4 7 t 7is)(a8 78)r

SELECTION-SCREEN END OF LINE

SELECTION-SCREEN BEGIN OF LINE

SELECTION-SCREEN COMMENT $amp TEXT-S$ FOR FIELD USER

se(ecti-scree )siti $+

PARAMETERS4 USER1$amp DEFAULT S9-UNAME ser 0r sessi i atc5

SELECTION-SCREEN COMMENT $amp TEXT-S FOR FIELD CUPDATE

se(ecti-scree )siti

PARAMETERS CUPDATE LIE CTU2PARAMS-UPDMODE DEFAULT 3L3

S4 s8c5rs(8

A4 as8c5rs(8

L4 (ca(

SELECTION-SCREEN END OF LINE

SELECTION-SCREEN BEGIN OF LINE

SELECTION-SCREEN COMMENT $amp TEXT-S FOR FIELD EEP

se(ecti-scree )siti $+

PARAMETERS4 EEP AS CltECBOX 3 3 = 7e(ete sessi i0 0iis5e7

3X3 = gtee) sessi i0 0iis5e7

SELECTION-SCREEN COMMENT $amp TEXT-S FOR FIELD E2GROUP

copy SAP AG BC420 12-83

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 8488

se(ecti-scree )siti

)araeters E2GROUP1$amp r) ae 0 errr-sessi

SELECTION-SCREEN END OF LINE

SELECTION-SCREEN BEGIN OF LINE

SELECTION-SCREEN COMMENT $amp TEXT-S FOR FIELD ltOLDDATE

se(ecti-scree )siti $+

PARAMETERS4 ltOLDDATE LIE S9-DATUM

SELECTION-SCREEN COMMENT +11amp TEXT-S$ FOR FIELD E2USER

se(ecti-scree )siti

PARAMETERS4 E2USER1$amp DEFAULT S9-UNAME ser 0r errr-sessi

SELECTION-SCREEN END OF LINE

SELECTION-SCREEN BEGIN OF LINE

SELECTION-SCREEN COMMENT +11amp TEXT-S FOR FIELD E2EEP

se(ecti-scree )siti

PARAMETERS4 E2EEP AS CltECBOX 3 3 = 7e(ete sessi i0 0iis5e7

3X3 = gtee) sessi i0 0iis5e7

SELECTION-SCREEN END OF LINE

SELECTION-SCREEN BEGIN OF LINE

SELECTION-SCREEN COMMENT +11amp TEXT-S FOR FIELD E2ltDATE

se(ecti-scree )siti

PARAMETERS4 E2ltDATE LIE S9-DATUM

SELECTION-SCREEN END OF LINE

SELECTION-SCREEN SIP

SELECTION-SCREEN BEGIN OF LINE

SELECTION-SCREEN COMMENT 1amp TEXT-S1 FOR FIELD NODATA

PARAMETERS4 NODATA DEFAULT 33 LOER CASE 7ata

SELECTION-SCREEN END OF LINE

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

Batc5i)t7ata 0 si(e trasacti

DATA4 BDCDATA LIE BDCDATA OCCURS ITlt ltEADER LINE

essaes 0 ca(( trasacti

DATA4 MESSTAB LIE BDCMSGCOLL OCCURS ITlt ltEADER LINE

errr sessi )ee7 3 3 r 3X3amp

DATA4 E2GROUP2OPENED

essae tets

TABLES4 T1

copy SAP AG BC420 12-84

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 8588

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

at se(ecti scree

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

AT SELECTION-SCREEN

r) a7 ser st e 0i((e7 0r create sessi

IF SESSION = 3X3 AND

GROUP = SPACE OR USER = SPACE

MESSAGE E1MSamp

ENDIF

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

)e 7ataset

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

FORM OPEN2DATASET USING P2DATASET

OPEN DATASET P2DATASET IN TEXT MODE

IF S9-SUBRC

RITE4 TEXT-E S9-SUBRC

STOP

ENDIF

ENDFORM

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

c(se 7ataset

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

FORM CLOSE2DATASET USING P2DATASET

CLOSE DATASET P2DATASET

ENDFORM

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

create atc5i)t sessi

t 0r ca(( trasacti siamp

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

FORM OPEN2GROUP

IF SESSION = 3X3

SIP

RITE4 $amp 3Create r)3I1amp GROUP

SIP

)e atc5i)t r)

CALL FUNCTION 3BDC2OPEN2GROUP3

EXPORTING CLIENT = S9-MANDT

copy SAP AG BC420 12-85

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 8688

GROUP = GROUP

USER = USER

EEP = EEP

ltOLDDATE = ltOLDDATE

RITE4 amp 3BDC2OPEN2GROUP3I$amp

1$amp 3retrc7e43I+amp

S9-SUBRC

ENDIF

ENDFORM

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

e7 atc5i)t sessi

ca(( trasacti si4 errr sessiamp

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

FORM CLOSE2GROUP

IF SESSION = 3X3

c(se atc5i)t r)

CALL FUNCTION 3BDC2CLOSE2GROUP3

RITE4 amp 3BDC2CLOSE2GROUP3Iamp

1$amp 3retrc7e43I+amp

S9-SUBRC

ELSE

IF E2GROUP2OPENED = 3X3

CALL FUNCTION 3BDC2CLOSE2GROUP3

RITE4

RITE4 amp 3Fe5(era))e 6r7e eret3Iamp

ENDIF

ENDIF

ENDFORM

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

Start e6 trasacti accr7i t )araeters

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

FORM BDC2TRANSACTION USING TCODE

DATA4 L2MSTRINGamp

DATA4 L2SUBRC LIE S9-SUBRC

atc5 i)t sessi

IF SESSION = 3X3

CALL FUNCTION 3BDC2INSERT3

EXPORTING TCODE = TCODE

TABLES D9NPROTAB = BDCDATA

RITE4 3BDC2INSERT3Iamp

copy SAP AG BC420 12-86

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 8788

TCODE

3retrc7e43I+amp

S9-SUBRC

3RECORD43

S9-INDEX

ca(( trasacti si

ELSE

REFRESlt MESSTAB

CALL TRANSACTION TCODE USING BDCDATA

MODE CTUMODE

UPDATE CUPDATE

MESSAGES INTO MESSTAB

L2SUBRC = S9-SUBRC

RITE4 3CALL2TRANSACTION3

TCODE

3retrc7e43I+amp

L2SUBRC

3RECORD43

S9-INDEX

LOOP AT MESSTAB

SELECT SINGLE FROM T1 ltERE SPRSL = MESSTAB-MSGSPRA

AND ARBGB = MESSTAB-MSGID

AND MSGNR = MESSTAB-MSGNR

IF S9-SUBRC =

L2MSTRING = T1-TEXT

IF L2MSTRING CS 313

REPLACE 313 ITlt MESSTAB-MSGH1 INTO L2MSTRING

REPLACE 3$3 ITlt MESSTAB-MSGH$ INTO L2MSTRING

REPLACE 33 ITlt MESSTAB-MSGH INTO L2MSTRING

REPLACE 33 ITlt MESSTAB-MSGH INTO L2MSTRING

ELSE

REPLACE 33 ITlt MESSTAB-MSGH1 INTO L2MSTRING

REPLACE 33 ITlt MESSTAB-MSGH$ INTO L2MSTRING

REPLACE 33 ITlt MESSTAB-MSGH INTO L2MSTRING

REPLACE 33 ITlt MESSTAB-MSGH INTO L2MSTRING

ENDIF

CONDENSE L2MSTRING

RITE4 MESSTAB-MSGT9P L2MSTRING$+amp

ELSE

RITE4 MESSTAB

ENDIF

ENDLOOP

copy SAP AG BC420 12-87

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 8888

SIP

Eree 0e5(era))e

IF L2SUBRC AND E2GROUP SPACE

IF E2GROUP2OPENED = 3 3

CALL FUNCTION 3BDC2OPEN2GROUP3

EXPORTING CLIENT = S9-MANDT

GROUP = E2GROUP

USER = E2USER

EEP = E2EEP

ltOLDDATE = E2ltDATE

E2GROUP2OPENED = 3X3

ENDIF

CALL FUNCTION 3BDC2INSERT3

EXPORTING TCODE = TCODE

TABLES D9NPROTAB = BDCDATA

ENDIF

ENDIF

REFRESlt BDCDATA

ENDFORM

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

Start e6 scree

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

FORM BDC2D9NPRO USING PROGRAM D9NPRO

CLEAR BDCDATA

BDCDATA-PROGRAM = PROGRAM

BDCDATA-D9NPRO = D9NPRO

BDCDATA-D9NBEGIN = 3X3

APPEND BDCDATA

ENDFORM

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

Isert 0ie(7

Page 43: BC420_46C - 012The Transaction Recorder

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 4388

04

983209 SAP AG 1999

Program 9unctions

Online

transaction

Transfer program

To

error

1rror

ption 6ption ampFlat SAP

structure

Monitor

Cou have no$ generated a data transfer program for importing data into the amp System The

program can eecute the data transfer using atch input or ca transaction

If you choose option 1 and there is an error the data record is paced into a atch input session

copy SAP AG BC420 12-43

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 4488

044

983209 SAP AG 1999

Benerating 9unction Modules

Recording

Zcreaedeor ncon mode

ncon rop

Sor eD

ZBC420

Creae comer

9unction module

nl( one data record can be processed at a time

In the net diaog o you can generate a function modue a function group and short tet from the

recording The function modue is automaticay created in the function group

copy SAP AG BC420 12-44

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 4588

042

983209 SAP AG 1999

9unction of 9unction Modules

Online

transaction

To

error

1rror

ption 6 ption amp

9unction module

Import

Parameter 1port

parameter

Tables

M1SSTA

Monitor

S$BC

Import interface

The import interface consists of a technica part and the fieds from the recording (A parameter is

created for each input fied of the recorded transactions)

7port interface

Simpy consists of the parameter S4amp2 The function modue $i return a vaue in the system

fied SC9S4amp2 after caing ca transaction This return vaue is set to Dero if the data record has

een correcty processed (5ny appies to 2T)

If a session is created you $i e notified $hether the data record coud e paced into the session

Tae interfaceThis is used ony if the function modue $ors $ith ca transaction The tae contains a the

system messages

copy SAP AG BC420 12-45

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 4688

048

983209 SAP AG 1999

Import Interface of 9unction Module

$

Technical

fields

Data

fields

BI session or CALL TRANSACTION

Processin $ode

pdate $ode

a$e oamp BI session iamp (T initial)

Bacround user iamp (T initial)

Delete session aampter processin

Loc date oamp session

ODATA indicator

TU

MD1

UPDAT1

BRUP

US1R

=11P

ELDDAT1

DATA

Cou can use parameter 2T4 to specify $hether the function modue creates a atch input session

(2T4 E ) or updates the data record directy using ca transaction (2T4 E G)

The other parameters are fied as for a atch input session header

Note 7very time the function modue is caed a atch input session is created

If the session is to contain severa transactions proceed as foo$s

ltenerate the transaction severa times This can e achieved y recording the transaction again The

function modue interface $i then contain more than one transaction -hen the function modue is

caed severa transactions can e generated for each session

copy SAP AG BC420 12-46

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 4788

043

983209 SAP AG 1999

The Transaction Recorder

PrinciplesPrinciples

Recording )ith the LSMWRecording )ith the LSMW

Principles of atch Input and all TransactionPrinciples of atch Input and all Transaction

Integrating the TA Program into the DWIntegrating the TA Program into the DW

Using the TA Recorder Using the TA Recorder

copy SAP AG BC420 12-47

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 4888

045

983209 SAP AG 1999

Benerated Program

9unction modules DltP1ltBRUP

DltIS1RT

DltLS1ltBRUP

AAP Program

Define structure of

data in seJuential

fileDefine D

table

pen seJuential file

pen I session

Read data recordCseJuential file

9ill D table

9ill I session gtALL TRASATI

Last data record K

lose I session

lose seJuential file

The generated program has the structure dispayed aove It uses the standard function modues for

creating atch input sessions

copy SAP AG BC420 12-48

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 4988

047

983209 SAP AG 1999

Structure of the Benerated Program

Benerated part

Define D

table

pen seJuential file

pen I session

Read data record

9ill D table

9ill I session gtALL TRASATI

Last data recordK

lose I session

lose seJuential file

Include DR16

Define filestructure

P1ltDATAS1T

P1ltBRUP

DltDPR

Dlt9I1LD

DltTRASATI

LS1ltBRUP

LS1ltDATAS1T

The generated program consists of t$o parts 9 a generated part and the incude 2amp72G8 The

incude is provided in the standard system

The incude contains the definition of the reuired 2 tae and a further seven suroutines These

suroutines eecute the foo$ing functions

5pen and cose fie

5pen and cose session

Fi 2 tae

Fi session

The generated part is the main program and cas the reevant suroutines A structure is aso

generated in the generated part to read the eterna data into the fie

See the Appendi for more information on the 2amp72G8 program

copy SAP AG BC420 12-49

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 5088

020

983209 SAP AG 1999

Structure of D Table

PRBRAM DPR D1BI 9AM 9ALPRBRAMPRBRAM DPRDPR D1BID1BI 9AM9AM 9AL9AL

SAPM90ampD 0602

R90ampD=UR 600000

R90ampDU=RS 0006

R90ampD=T=D =UA

SAPM90ampD 0660

=A6AM16 Smith

=A6PSTL 87000

=A6LAD6 US

=A6SPRAS 1

SAPM90ampD 06amp0

=A6ST1B US6amp428357DDATA

PRBRAM

DPR

D1BI

9AM

9AL

EAR

UM

EAR

EAR

EAR

40

4

6

6amp

6amp

D Module pool

D Screen number

D Start of screen

D 9ield name

D 9ield contents

9ield ame T(pe Length Short Tet

AAP Dictionar(

The 2 tae has the same structure as in a standard transfer

copy SAP AG BC420 12-50

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 5188

026

983209 SAP AG 1999

Read Structure

Recording

DATA BEGIN OF record data element BUKRS bukr$amp data element KTOKD ktokd$amp data element NA(EG) name$+amp data element SORT ortl$ampEND OF record-

record

Automaticall( generated

from recording

The structure of the fie is automaticay generated and is a$ays defined $ith the name amp725amp

The generated structure a$ays has the same ayout 7ach fied is defined y t$o generated ro$s

The first ro$ is a$ays a comment ro$ containing the tet J data eement and the data eement of

the screen fied from the recording In the net ro$ the fied itsef is defined $ith the name of the

data eement foo$ed y a three9digit position numer $hich specifies the ocation in the structure

The ength of the fied is set y the ength of the data eement If a fied is not defined through a data

eement the system uses the ength of the screen fied

copy SAP AG BC420 12-51

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 5288

02amp

983209 SAP AG 1999

pening and losing the 9ile

P1ltDATAS1T

LS1ltDATAS1T

FOR( oendataet USING dataet-O)EN DATASET dataet IN TET (ODE-

IF S01SUBR2 34 - 5RITE 6 te7t1e S01SUBR2-STO)-

ENDIF-

ENDFOR(-

FOR( cloedataet USING dataet-2OSE DATASET dataet-

ENDFOR(-

Include

DR16

The suroutine 5P7N3ATAS7T opens the seuentia fie

The suroutine 2+5S73ATAS7T coses the seuentia fie

copy SAP AG BC420 12-52

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 5388

02

983209 SAP AG 1999

9unction Modules for I Program

lient

Session name

Eold date

=eep session

D user name

RecordK

LI1T

BRUP

ELDDAT1

=11P

US1R

R1RD

DltP1ltBRUPDltP1ltBRUP

Transaction code

D table

TD1

DPRTA

DltIS1RTDltIS1RT

DltLS1ltBRUPDltLS1ltBRUP

pen Isessionpen Isession

Insert data for

transactions

Insert data for

transactions

lose I

session

lose I

session

The foo$ing function modues are provided for creating atch input sessions (function group

S2)

235P7N3ltamp54P

2reates a ne$ session and contains genera data for the $hoe session

23INS7ampT

Inserts a the data for a transaction into the session The transferred interna tae $ith the

structure 2ATA must contain a the data reuired for fuy processing the transaction

232+5S73ltamp54P

2oses the session after a the data has een inserted As soon as the session has een cosed it

can e processed

The interna tae $ith the structure 2ATA can ony contain atch input data for one singe

transaction run So the individua transactions are inserted into the atch input session in a oop

using severa 23INS7ampT cas

copy SAP AG BC420 12-53

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 5488

024

983209 SAP AG 2001

9unction Module DltP1ltBRUP

ALL 9UTI DltP1ltBRUPALL 9UTI DltP1ltBRUP

1PRTIB

LI1T client

BRUP session name

ELDDAT1 loc+ date

=11P delete flag

US1R bdc user name

R1RD recording

IMPRTIB

NID internal session +e(

11PTIS

1PRTIB

LI1T client

BRUP session name

ELDDAT1 loc+ date

=11P delete flag

US1R bdc user name

R1RD recording

IMPRTIB NID internal session +e(

11PTIS

-ith the function modue 235P7N3ltamp54P you can open a atch input session

The foo$ing parameters are mandatory

2+I7NT (cient)

ltamp54P (session name)

4S7amp (user name)

Note The 4S7amp must a$ays e specified This user name is reuired for processing the session

in atch mode

The foo$ing parameters are optiona

=5+AT7 specifies the eariest date on $hich the session can e started677P fag specifies $hether session shoud e deeted after it has een successfuy processed The

677P fag is ignored if the session contains errors

677P E K K means deete the session after processing (defaut vaue) H

677P E KGK means do not deete session

amp725amp E KGK ao$s you to create a recording instead of a I session

If gtI is specified the function modue returns the interna session ey This is needed to e ae to

differentiate sessions that have the same name

-ith 7G27PTI5NS you get various return vaues that can e ueried $ith SC9S4amp2

Note In onine mode the onine user is used for the authoriDation checs regardess of the user

name specified

copy SAP AG BC420 12-54

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 5588

022

983209 SAP AG 1999

Subprogram P1ltBRUP

P1ltBRUP

FOR( oen8rou-IF e9on -

2A FUN2TION BD2O)ENGROU) E)ORTING 2IENT lt1mandt GROU) 8rou USER uer KEE) kee

=ODDATE gtolddate-

ENDIF-ENDFOR(-

Include

DR16

The suprogram 5P7N3ltamp54P opens the atch input session

copy SAP AG BC420 12-55

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 5688

028

983209 SAP AG 1999

9unction Module DltIS1RT

ALL 9UTI DltIS1RTALL 9UTI DltIS1RT

IMPRT

TD1 Transaction code

PSTltLAL Update locall(

PRITIB print list

TAL1S DPRTA bdclttable

11PTIS

IMPRT

TD1 Transaction code

PSTltLAL Update locall(

PRITIB print list

TAL1S DPRTA bdclttable

11PTIS

-ith the function modue 23INS7ampT you can add transaction data to the session

Cou need an interna 2 tae to transfer the data

The foo$ing parameters are mandatory

T257 Transaction code

CNPamp5TA 2 tae

The foo$ing parameters are optiona

P5ST3+52A+ E KGK activates oca updating This means that the data to e updated is ept in the

appication server and updated in the ast step of the transaction This does not invove the update

process (For more information see course 28 Programming ataase 4pdates)

PampINTINlt E KGK 9 ists processed in I $i e printed immediatey -ith 7G27PTI5NS you get various return vaues that can e ueried $ith SC9S4amp2

copy SAP AG BC420 12-56

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 5788

023

983209 SAP AG 1999

Subprogram DltTRASATI

DltTRASATI

FOR( BD2TRANSA2TION USING tcode-

IF e9on -2A FUN2TION BD2INSERT

E)ORTING T2ODE tcode TABES D0N)ROTAB bdcdata-

ESE-

ENDIF-ENDFOR(-

T

Include

DR16

The suprogram 23TampANSA2TI5N moves the fied 2 tae either to a atch input session

or uses ca transaction to import the data into the system 5n the seection screen you can specify

$hether you $ant to create a session or you $ant to use ca transaction to process the data directy

The S7SSI5N fied is then set according to your seection

copy SAP AG BC420 12-57

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 5888

025

983209 SAP AG 1999

9unction Module DltLS1ltBRUP

ALL 9UTI DltLS1ltBRUP

11PTIS

TltP1 6

NU1U1lt1RRR amp

-ith the function modue 232+5S73ltamp54P you can cose a atch input session

In 7G27PTI5NS you get various return vaues that can e ueried $ith SC9S4amp2

copy SAP AG BC420 12-58

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 5988

027

983209 SAP AG 1999

Subprogram LS1ltBRUP

FOR( cloe8rou-IF e9on -cloe batcgt 9nut 8rou

2A FUN2TION BD22OSEGROU)-

ESE-IF e8rouoened -

2A FUN2TION BD22OSEGROU)-

ENDIF-ENDIF-

ENDFOR(-

LS1ltBRUPlose session

lose error session

Include

DR16

The suprogram 2+5S73ltamp54P coses the atch input session The suprogram differentiates

et$een a norma I session (S7SSI5N E G) and a session opened $hen ca transaction

encountered an error (73ltamp54P35P7N7 E G)

copy SAP AG BC420 12-59

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 6088

080

983209 SAP AG 1999

Subprograms DltDPRG Dlt9I1LD

DltDPR

Dlt9I1LD

FOR( bdc9eld USING nam al-IF al 34 nodata-2EAR bdcdata- bdcdata1nam nam- bdcdata1al al- A))END bdcdata-ENDIF-

ENDFOR(-

FOR( bdcdltnro USING ro8ram dltnro- 2EAR bdcdata-Bdcdata1ro8ram ro8ram-Bdcdata1dltnro dltnro-Bdcdata1dltnbe89n - A))END bdcdata-ENDFOR(-

Include

DR16

The incude 2amp72GG contains t$o suprograms 23CNPamp5 and 23FI7+

Suprogram 23CNPamp5 fis the 2 tae $ith program names and screen numers

Suprogram 23FI7+ fis the 2 tae $ith fied names and vaues

7ach suprogram creates an entry in the 2 tae

copy SAP AG BC420 12-60

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 6188

086

983209 SAP AG 1999

9illing the D Table

erorm bdcdltnro u9n8 SA)(FD +- erorm bdc9eld u9n8 BD22URSOR RFD1BUKRS- erorm bdc9eld u9n8 BD2OK2ODE 6- erorm bdc9eld u9n8 RFD1BUKRS record1BUKRS- erorm bdc9eld u9n8 RFD1KTOKD record1KTOKD-

erorm bdcdltnro u9n8 SA)(FD -

erorm bdc9eld u9n8 BD22URSOR KNA1S)RAS- erorm bdc9eld u9n8 BD2OK2ODE 6- erorm bdc9eld u9n8 KNA1NA(E record1NA(E-

erorm bdc9eld u9n8 KNA1SORT record1SORT-

Recording Benerated automaticall(

from the recording

)ERFOR( bdcdltnro USING SA)(FD +- )ERFOR( bdc9eld USING BD22URSOR RFD1BUKRS-)ERFOR( bdc9eld USING BD2OK2ODE 6-)ERFOR( bdc9eld USING RFD1BUKRS record1BUKRS-)ERFOR( bdc9eld USING RFD1KTOKD record1KTOKD-

)ERFOR( bdcdltnro USING SA)(FD -

)ERFOR( bdc9eld USING BD22URSOR KNA1S)RAS-)ERFOR( bdc9eld USING BD2OK2ODE 6-)ERFOR( bdc9eld USING KNA1NA(E record1NA(E-

)ERFOR( bdc9eld USING KNA1SORT record1SORT- ---

The 2 tae is fied $ith data from the recording The suroutines 23CNPamp5 and

23FI7+ are used for this

The suroutines are caed in the reuired structure or seuence

copy SAP AG BC420 12-61

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 6288

08amp

983209 SAP AG 1999

erie)

SAPDatabase

SeJuential9ile

SAPDatabase

ALL TRASATIALL TRASATI

SeJuential9ile

ATE IPUTATE IPUT

D TableD TableD TableD Table

I Monitor

T

In contrast to atch input you can use ca transaction to directy pass data to the diaog interface

$ithout using a atch input session Cou use an interna tae (2 tae same structure and ayout

as atch input) to temporariy store your screen data Then you ca the desired transaction in your

program

Note 5n average the 2a Transaction method is 8 to times faster than using atch Input

copy SAP AG BC420 12-62

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 6388

08

983209 SAP AG 1999

all Transaction Program$ 1ample

RE)ORT abcbdcdcdeb9ct-

)ARA(ETERS d9mode DEFAUT A

udmode DEFAUT S-FOR( calltranact9on-2A TRANSA2TION FD

USING bdcdata (ODE d9mode

U)DATE udmode-

IF lt1ubrc NE - 5RITE 6 ---

ENDIF-ENDFOR(-

Screen

00

Screen

100

Screen

An additiona system ro area is added for the caed transaction The system uses this area for

processing the individua screens in the transactionH the data from the tae is added here After the

transaction is processed the second ro area is reeasedH the system continues processing in the first

ro area

Notes

In contrast to atch input there is no error ogging (error sessions) here For processing the caed

transaction the system uses the authoriDations of the user that caed the transaction The 2 tae

can ony hod data for one transaction run at a time efore another transaction is caed and its data

can e added you must eecute a amp7Famp7S= for the 2 tae

copy SAP AG BC420 12-63

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 6488

084

983209 SAP AG 1999

ALL TRASATI C6

RE)ORT 777-

2A TRANSA2TION FD USING bdcdata (ODE E-

Default for MD1 is A

2A TRANSA2TION 3tranact9oncode4 USING 3bdc1table4 C (ODE A E N C-

-ith the parameter 57 you can seect a specific dispay mode for processing the transaction The

foo$ing three modes are avaiae

A (ispay a)

If you eecute the program a the screens and a their data are dispayed This is the defaut vaue

for the 57 in 2A++ TampANSA2TI5N

N (ispay nothing)

The screens are not dispayed at a regardess of $hether any of them contained errors As soon as

the transaction has een fuy processed contro is returned to your program (The vaue of the

parameter 4PAT7 determines $hether dataase updates are eecuted or not)

7 (ispay errors ony)As soon as an error occurs in a screen the transaction is s$itched to dispay mode so that you can

correct the errors

These dispay modes are the same as those in the atch input session processing

copy SAP AG BC420 12-64

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 6588

082

983209 SAP AG 1999

RE)ORT 777-

2A TRANSA2TION FD USING BD2DATA U)DATE -

ALL TRASATI Camp

RE)ORT 777-

2A TRANSA2TION FD USING bdcdata U)DATE -

2A TRANSA2TION 3tranact9oncode4 USING 3bdc1table4 C (ODE A E N C U)DATE A S C -

Default for UPDAT1 is A

-ith the parameter 4PAT7 you can contro ho$ dataase updates arising from a transaction are

carried out There are three options

A (asynchronous updating) The caed transaction does not $ait unti the dataase has een

updated it simpy for$ard the updates to the SAP update service This usuay speeds up the 2T

program This processing mode is N5T recommended for arge data sets as the caed transaction

does not receive a competion message from the update modue

The caing 2T program therefore cannot te if the transaction has een successfuy competed Cou

shoud use the updating administration function (transaction S8) to determine $hether updating

$as terminated eary The error anaysis correction functions for are ess hepfu than $ith

synchronous updating

S (synchronous updating) -ith synchronous updating the caed transaction $aits unti a the

updates have een competed So processing is so$er than $ith synchronous updating The caed

transaction can ho$ever report any updating errors to the program $hich maes error

anaysiscorrection easier

+ (local updating) $ith oca updating the dataase is not updated in a separate process it is

updated in the caers process (see appication hep documentation for the AAP ey$ord S7T

4PAT7 TAS6 +52A+)

copy SAP AG BC420 12-65

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 6688

088

983209 SAP AG 1999

ALL TRASATI C

RE)ORT 777-DATA mtab T0)E TABE OF bdcm8coll-

2A TRANSA2TION FD USING bdcdata (ESSAGES INTO mtab-

2A TRANSA2TION 3tranact9oncode4 USING 3bdc1table4 C (ODE A E N C U)DATE A S C (ESSAGES INTO 3metab4 C -

7SSAlt7S specifies that a system messages that are output during the eecution of a 2A++

TampANSA2TI5N are $ritten to the interna tae L7SSTA The interna tae must have the

structure 2Slt25++

4nie the cassica atch input processing $ith sessions 2A++ TampANSA2TI5N does not offer any

specia processing procedures for transactions containing errors There are no restart functions for

transactions that contain errors or that cause updating terminations

copy SAP AG BC420 12-66

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 6788

083

983209 SAP AG 1999

ALL TRASATI C4

RE)ORT 777-DATA mltot T0)E ctuaram-

2A TRANSA2TION FD USING BD2DATA

O)TIONS FRO( mltot-

2A TRANSA2TION 3tranact9oncode4 USING 3bdc1table4 C (ODE A E N C U)DATE A S C (ESSAGES INTO 3metab4 C O)TIONS FRO( ot C -

RE)ORT 777-DATA mltot T0)E ctuaram-2A TRANSA2TION FD USING bdcdata

O)TIONS FRO( mltot-

The addition 5PTI5NS enaes the ca transaction statement to e controed through a structure

The structure must have the dictionary type 2T43PAampAS

The addition 5PTI5NS Famp5 must not e comined either $ith the addition 57 or $ith

4PAT7 ore information on the net side

copy SAP AG BC420 12-67

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 6888

085

983209 SAP AG 1999

Structure TUltPARAMS

DISMD1 Procen mode anaoo o addon amp

UPDMD1 $pdae mode anaoo o addon $PA

ATTMD1 CA mode CA conro

D19SI1 orce de=a EndoE e drn procen

RAMMIT +o eD a Camp amp(

IPT +o a ac np eonF a F S-B+P SPAC

I1D +o a ac np eon a=er end o= BC daa

The components are defined as foo$s

The components 7FSIM7 ampA25IT N5INPT and N5I7N can have the foo$ing

vaues KGK E Ces or K K E No

If the addition 5PTI5NS Famp5 is not specified the foo$ing settings appy to the contro

parameters

IS57 from addition 57

4P57 from addition 4PAT7

2ATT57 2ATT not active

7FSIM7 o not not use defaut $indo$s siDe

ampA25IT Successfu eit at 25IT -5amp6

N5INPT atch input session active (SC9INPT E G)

N5I7N atch input session sti active after end of 2 data

copy SAP AG BC420 12-68

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 6988

087

983209 SAP AG 1999

SMSBID Message ID

SMSBT Message T(pe C1GIGWGSGA

SMSB Message umber

SMSB6 Message ariable 6

SMSBamp Message ariable amp

SMSB Message ariable

SMSB4 Message ariable 4

SMSBID Message ID

SMSBT Message T(pe C1GIGWGSGA

SMSB Message umber

SMSB6 Message ariable 6

SMSBamp Message ariable amp

SMSB Message ariable

SMSB4 Message ariable 4

Return code$

S(stem fields$

alue Meaning

0 Successful

6000 1rror in transaction

6000 1rror in processing call transaction

see also the s(stem fields specified

alue Meaning

0 Successful

6000 1rror in transaction

6000 1rror in processing call transaction

see also the s(stem fields specified

9ield name Meaning9ield name9ield name MeaningMeaning

Return ode and S(stem 9ields

The return code is used to specify $hether the caed transaction $as processed successfuy In

addition severa system fieds are fied The numer I type and variaes of the diaog message

output y the caed transaction Cou need this information to output the message tet

copy SAP AG BC420 12-69

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 7088

030

983209 SAP AG 1999

Benerated Program of the TA Recorder

REFRES= (ESSTAB-

2A TRANSA2TION tcode USING bdcdata (ODE ctumode U)DATE cudate (ESSAGES INTO metab-OO) AT metab- ENDOO)-IF lubrc 34 AND e8rou 34 S)A2E- IF e8rouoenend - 2A FUN2TION BD2O)ENGROU) E)ORTING ---------

--------- E8rouoened - ENDIF- 2A FUN2TION BD2INSERT E)ORTING T2ODE tcode TABES D0N)ROTAB bdcdata-ENDIF-REFRES= bdcdata-

Message table output

pen error session

Insert data record that

has errors into error

session

If you have seected ca transaction on the seection screen the generated program runs as foo$s

The onine transaction is caed $ith ca transaction and passed to tae 2ATA A the

messages arising during the ca transaction are put in the interna tae 7SSTA

7SSTA is output as a ist

If you have specified an error session ( 73ltamp54P L SPA27) on the seection screen and the

ca transaction comes across an error (+3S4amp2 L 0) the error session is opened The error

session is ho$ever ony opened once Then the data record is paced in the session

A the other data records that have errors $ith ca transaction are paced in the same session

copy SAP AG BC420 12-70

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 7188

036

983209 SAP AG 1999

The Transaction Recorder

PrinciplesPrinciples

Recording )ith the LSMWRecording )ith the LSMW

Principles of atch Input and all TransactionPrinciples of atch Input and all Transaction

Integrating the TA Program into the DWIntegrating the TA Program into the DW

Using the TA Recorder Using the TA Recorder

copy SAP AG BC420 12-71

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 7288

03amp

983209 SAP AG 1999

Integrating into the DW

Transfer program

AAP Dictionar(

Integrate

SDA0

SDA6

SDAamp

SDA

Cou can integrate the generated program into the G9- The structure of the fie must e created

in the AAP ictionary The taes SGA0 SGA8 SGA1 and SGA $i e fied

copy SAP AG BC420 12-72

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 7388

03

983209 SAP AG 1999

DW Release 42

Goo

-B eeae 45

aa ran=er ogtec

Int customer data transfer ob-ect

ecord =ed

Dece daa ran=er

d Goo

The ampunction ampor interatin TA recorder prora$s is

i$ple$ented in the

D+-B in Release

The recorder can e integrated as of ampeease and it is provided in the G9- ampeease

ltot to the G9- ampeease 5n the initia screen you can integrate programs y choosing ampoto

( +nt customer ata transfer o-ect

copy SAP AG BC420 12-73

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 7488

034

983209 SAP AG 1999

reating Program as D b-ect

Comer ran=er ogtec

ampgtec ype

Sor eD =or ogtec

aa ran=er proram

Srcre name

9900

(+A1

Cane comer

ZBCA+G

ZB

ustomer transfer ob-ect

umber bet)een 7000 and 7777

b-ect t(pe

Assignment to R ob-ect

Short tet for D ob-ectShort description

Data transfer program

ame of generated program

Structure name

A structure Cstructure la(out )ith this name is created in

the AAP Dictionar(

For ampeease transfer oects $ere not organiDed y 5amp oects ut y a G numer (00089

OOOO) The numer range O0009OOOO is reserved for customers

To create a connection to the ne$ G 9- you must assign the program to a 5amp oect

2reate a short tet for the G oect This tet $i appear in the method seection ist

Specify the program to e incuded

Specify a name for the structure to e created in the AAP ictionary

Note $he generated program appears under program type +N and not under program type

-

copy SAP AG BC420 12-74

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 7588

032

983209 SAP AG 1999

Adantages

Automatic program registration in the DW in

Release 48

ou can use all the functions defined for

standard ob-ects

1ception$ The (reate ampile ith data

function

If you incuded the oect in the ampeease $orench it is automaticay avaiae in the ampeease

B $orench

A the $orench functions are avaiae for your oect ecept for Create files ith transfer ata

copy SAP AG BC420 12-75

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 7688

038

983209 SAP AG 1999

ou are no) able to$

The Transaction Recorder$ Unit Summar(

Use the recording function in the LSMW to create

a batch input session )ith the data from the

eternal s(stem

Use the TA Recorder to create (our o)n data

transfer program

Anal(e programs that )or+ )ith batch input or

call transaction

Integrate the TA Recorder programs into the

DW

copy SAP AG BC420 12-76

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 7788

ercise 1

nit $ -ecorder

$opic 2reating etors

$ransaction -ecorder ercise 1

bull 2reating detors $ith eterna numer assignment

bull etor numers M9980008 to M9980080

Address data for detors $ith eterna numer assignment is to

e transferred using program ampFI700

ro4ect F5

Supro4ect +5

-un +575

$as)s 85 95 8S25

9oad program -F+00

8 In the foo$ing eercises eisting data is to e changed Therefore these detors $ith

eterna numer assignment have to first e created

898 4nder suproect 79 create run 797G9 $ith the name Detors ith

eternal numers

copy SAP AG BC420 12-77

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 7888

891 2reate the foo$ing three tass The tass map the foo$ing process steps

convert data create + session and process + session

89198 In run 797G9 create the foo$ing tas

9 Tas AP9

9 Name 2onvert data 9 Tas type AP

9 Program type +S-

Seect the foo$ing +S- oect

+S- proect 2109

+S- suproect 7I9

+S- oect I997GT

89191 In run 797G9 create the foo$ing tas 9 Tas +5A9

9 Name 2reate I session

Tas type +5A

9 Program type INP

Seect program ampFI700 $ith the variant

I97G9

8919 In run 797G9 create the foo$ing tas

9 Tas S29

9 Name Process I session Tas type S2

9 Program type amp7P5

Seect program ampS2S4 $ith the variant

S497G9

Note that you have to correct the seuence of the tass 2onvert data

create + session and process + session

4se the uttons

89 Start the run

The detors $i e created $ith eterna numer assignments

89 2hec in transaction F0 that the detors M9980008 to M9980080 have een

created

copy SAP AG BC420 12-78

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 7988

ercise

nit $ransaction -ecorder

$opic -ecording function in the 9S8(

bull 2reate a recording using the +S-

bull ltenerate a atch input session

2hange the detor address data in the amp System

Name of the recording +

Name of the file +2055+F9

8 2reate the recording 7I3 using the +S- ampecord the transaction F01 (2hange

detor)

898 efore you create the recording first test the transaction onineQ

For the recording use detor M9980008 5n the initia screen of the F01

maintain the foo$ing fieds ony

etor etor M9980008

2ompany code 0008

Address data seect

Note $he data record must e saved hile recording

891 aintain the names and the descriptions for the foo$ing fieds

Name city street posta code and teephone numereete a other fieds in screen 880 from the recording (eg S5ampT+ +AN8

SPampAS)

4se the same technica names as sho$n in the tae eo$ (automatic fied

mapping)

copy SAP AG BC420 12-79

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 8088

1 2reate the suproect 7I9 and the ne$ oect TA3 in your proect 2109

aintain the oect attriutes and seect the item atch input recording Seect your

recording 7I3

2reate the source structure address

2reate the source fieds according to the tae eo$ 5r copy them from proect 2109S37N suproect 7I900 oect TA900

198 Fie setup The data from the egacy system are dispayed in the foo$ing tae

Fied name Fied type Fied ength escription

N5 2 8B etor numer

NA7 2 Name

STamp77T 2 Street

2ITC 2 2ityPace of residence

MIP 2 80 Posta code

T7+ 2 8B Teephone numer

191 aintain the fied mapping 4se the automatic fied mapping (via menu item

7tras)

19 Specify the fies 5ny maintain the fie name of the source fie

Name of the fie 21099IFI+7

2odepage 8800

19 Import the data and convert them ispay the data in each caseQ

19 2reate a atch input session

19B ampun the atch input session

copy SAP AG BC420 12-80

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 8188

ercise 3

nit $ransaction -ecorder

$opic -ecording ith the $ -ecorder

bull ltenerate a recording using the TA recorder

bull Test the recording

2hange the address data of detors in the amp system

Name recording $+

Name of the file +2055+F9

8 2reate the recording TA37I3 using the transaction recorder ampecord the

transaction F01 (change detor)

898 4se detor M9980008 for the recording 5n the F01 initia screen ony

maintain the foo$ing fieds

etor etor M9980008

2ompany 2ode 0008

Address data seect

Note $he data record must e saved hen recording

eete a fieds that do not eist in the source fie 21099IFI+7 from screen

880 in the recording (eg 6NA89S5ampT+ 6NA89+AN8 6ANNQ9SPampAS) Note o not deete fieds ampF01946ampS and ampF0190880

Save the recording no$

1 S$itch to the recordings overvie$

198 Process the recording $ith the processing mode A (dispay a)

191 Process the recording $ith the processing mode RN (no dispay)

19 If the recording has een tested and no error has occurred generate a I session

and run it using the I monitor If an error shoud occur generate the recordingagainQ

copy SAP AG BC420 12-81

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 8288

From the recording generate the program M21037I3 in your deveopment cass

2109 Seect the foo$ing

bull ampead fied contents from fie

bull 2reate test data in the fie 2103dei3test3tt

98 Save this program and eecute it ltenerate one I session each and process it

2arry out the same steps again using the ca transaction

The generated program shoud no$ e changed so that fie 21099IFI+7 can e

read and processed

98 2hange the defaut vaue of the fie name (parameter dataset) in 21099

IFI+7

91 2hange the structure definition eete the company code fied and the address

data checo from the structure

9 2hange the su9routine ca perform dc3fied for the company code (KampF019

46ampSK) so that the vaue 0008 is transferred

9 2hange the su9routine ca perform dc3fied for the address data checo

(KampF0190880K) so that the vaue G is transferred

9 Start the program again and read the data from the fie 21099IFI+7 $ith

detor data ltenerate a I session $ith it and run it

copy SAP AG BC420 12-82

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 8388

033 Include DR16INCLUDE BDCRECX1

SELECTION-SCREEN BEGIN OF LINE

PARAMETERS SESSION RADIOBUTTON GROUP CTU create sessi SELECTION-SCREEN COMMENT $amp TEXT-S FOR FIELD SESSION

se(ecti-scree )siti +

PARAMETERS CTU RADIOBUTTON GROUP CTU ca(( trasacti

SELECTION-SCREEN COMMENT $amp TEXT-S FOR FIELD CTU

SELECTION-SCREEN END OF LINE

SELECTION-SCREEN BEGIN OF LINE

SELECTION-SCREEN COMMENT $amp TEXT-S1 FOR FIELD GROUP

se(ecti-scree )siti $+

PARAMETERS GROUP1$amp r) ae 0 sessi

SELECTION-SCREEN COMMENT $amp TEXT-S+ FOR FIELD CTUMODE

se(ecti-scree )siti

PARAMETERS CTUMODE LIE CTU2PARAMS-DISMODE DEFAULT 3N3

A4 s56 a(( 78)rs

E4 s56 78)r errr (8

N4 7 t 7is)(a8 78)r

SELECTION-SCREEN END OF LINE

SELECTION-SCREEN BEGIN OF LINE

SELECTION-SCREEN COMMENT $amp TEXT-S$ FOR FIELD USER

se(ecti-scree )siti $+

PARAMETERS4 USER1$amp DEFAULT S9-UNAME ser 0r sessi i atc5

SELECTION-SCREEN COMMENT $amp TEXT-S FOR FIELD CUPDATE

se(ecti-scree )siti

PARAMETERS CUPDATE LIE CTU2PARAMS-UPDMODE DEFAULT 3L3

S4 s8c5rs(8

A4 as8c5rs(8

L4 (ca(

SELECTION-SCREEN END OF LINE

SELECTION-SCREEN BEGIN OF LINE

SELECTION-SCREEN COMMENT $amp TEXT-S FOR FIELD EEP

se(ecti-scree )siti $+

PARAMETERS4 EEP AS CltECBOX 3 3 = 7e(ete sessi i0 0iis5e7

3X3 = gtee) sessi i0 0iis5e7

SELECTION-SCREEN COMMENT $amp TEXT-S FOR FIELD E2GROUP

copy SAP AG BC420 12-83

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 8488

se(ecti-scree )siti

)araeters E2GROUP1$amp r) ae 0 errr-sessi

SELECTION-SCREEN END OF LINE

SELECTION-SCREEN BEGIN OF LINE

SELECTION-SCREEN COMMENT $amp TEXT-S FOR FIELD ltOLDDATE

se(ecti-scree )siti $+

PARAMETERS4 ltOLDDATE LIE S9-DATUM

SELECTION-SCREEN COMMENT +11amp TEXT-S$ FOR FIELD E2USER

se(ecti-scree )siti

PARAMETERS4 E2USER1$amp DEFAULT S9-UNAME ser 0r errr-sessi

SELECTION-SCREEN END OF LINE

SELECTION-SCREEN BEGIN OF LINE

SELECTION-SCREEN COMMENT +11amp TEXT-S FOR FIELD E2EEP

se(ecti-scree )siti

PARAMETERS4 E2EEP AS CltECBOX 3 3 = 7e(ete sessi i0 0iis5e7

3X3 = gtee) sessi i0 0iis5e7

SELECTION-SCREEN END OF LINE

SELECTION-SCREEN BEGIN OF LINE

SELECTION-SCREEN COMMENT +11amp TEXT-S FOR FIELD E2ltDATE

se(ecti-scree )siti

PARAMETERS4 E2ltDATE LIE S9-DATUM

SELECTION-SCREEN END OF LINE

SELECTION-SCREEN SIP

SELECTION-SCREEN BEGIN OF LINE

SELECTION-SCREEN COMMENT 1amp TEXT-S1 FOR FIELD NODATA

PARAMETERS4 NODATA DEFAULT 33 LOER CASE 7ata

SELECTION-SCREEN END OF LINE

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

Batc5i)t7ata 0 si(e trasacti

DATA4 BDCDATA LIE BDCDATA OCCURS ITlt ltEADER LINE

essaes 0 ca(( trasacti

DATA4 MESSTAB LIE BDCMSGCOLL OCCURS ITlt ltEADER LINE

errr sessi )ee7 3 3 r 3X3amp

DATA4 E2GROUP2OPENED

essae tets

TABLES4 T1

copy SAP AG BC420 12-84

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 8588

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

at se(ecti scree

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

AT SELECTION-SCREEN

r) a7 ser st e 0i((e7 0r create sessi

IF SESSION = 3X3 AND

GROUP = SPACE OR USER = SPACE

MESSAGE E1MSamp

ENDIF

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

)e 7ataset

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

FORM OPEN2DATASET USING P2DATASET

OPEN DATASET P2DATASET IN TEXT MODE

IF S9-SUBRC

RITE4 TEXT-E S9-SUBRC

STOP

ENDIF

ENDFORM

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

c(se 7ataset

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

FORM CLOSE2DATASET USING P2DATASET

CLOSE DATASET P2DATASET

ENDFORM

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

create atc5i)t sessi

t 0r ca(( trasacti siamp

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

FORM OPEN2GROUP

IF SESSION = 3X3

SIP

RITE4 $amp 3Create r)3I1amp GROUP

SIP

)e atc5i)t r)

CALL FUNCTION 3BDC2OPEN2GROUP3

EXPORTING CLIENT = S9-MANDT

copy SAP AG BC420 12-85

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 8688

GROUP = GROUP

USER = USER

EEP = EEP

ltOLDDATE = ltOLDDATE

RITE4 amp 3BDC2OPEN2GROUP3I$amp

1$amp 3retrc7e43I+amp

S9-SUBRC

ENDIF

ENDFORM

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

e7 atc5i)t sessi

ca(( trasacti si4 errr sessiamp

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

FORM CLOSE2GROUP

IF SESSION = 3X3

c(se atc5i)t r)

CALL FUNCTION 3BDC2CLOSE2GROUP3

RITE4 amp 3BDC2CLOSE2GROUP3Iamp

1$amp 3retrc7e43I+amp

S9-SUBRC

ELSE

IF E2GROUP2OPENED = 3X3

CALL FUNCTION 3BDC2CLOSE2GROUP3

RITE4

RITE4 amp 3Fe5(era))e 6r7e eret3Iamp

ENDIF

ENDIF

ENDFORM

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

Start e6 trasacti accr7i t )araeters

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

FORM BDC2TRANSACTION USING TCODE

DATA4 L2MSTRINGamp

DATA4 L2SUBRC LIE S9-SUBRC

atc5 i)t sessi

IF SESSION = 3X3

CALL FUNCTION 3BDC2INSERT3

EXPORTING TCODE = TCODE

TABLES D9NPROTAB = BDCDATA

RITE4 3BDC2INSERT3Iamp

copy SAP AG BC420 12-86

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 8788

TCODE

3retrc7e43I+amp

S9-SUBRC

3RECORD43

S9-INDEX

ca(( trasacti si

ELSE

REFRESlt MESSTAB

CALL TRANSACTION TCODE USING BDCDATA

MODE CTUMODE

UPDATE CUPDATE

MESSAGES INTO MESSTAB

L2SUBRC = S9-SUBRC

RITE4 3CALL2TRANSACTION3

TCODE

3retrc7e43I+amp

L2SUBRC

3RECORD43

S9-INDEX

LOOP AT MESSTAB

SELECT SINGLE FROM T1 ltERE SPRSL = MESSTAB-MSGSPRA

AND ARBGB = MESSTAB-MSGID

AND MSGNR = MESSTAB-MSGNR

IF S9-SUBRC =

L2MSTRING = T1-TEXT

IF L2MSTRING CS 313

REPLACE 313 ITlt MESSTAB-MSGH1 INTO L2MSTRING

REPLACE 3$3 ITlt MESSTAB-MSGH$ INTO L2MSTRING

REPLACE 33 ITlt MESSTAB-MSGH INTO L2MSTRING

REPLACE 33 ITlt MESSTAB-MSGH INTO L2MSTRING

ELSE

REPLACE 33 ITlt MESSTAB-MSGH1 INTO L2MSTRING

REPLACE 33 ITlt MESSTAB-MSGH$ INTO L2MSTRING

REPLACE 33 ITlt MESSTAB-MSGH INTO L2MSTRING

REPLACE 33 ITlt MESSTAB-MSGH INTO L2MSTRING

ENDIF

CONDENSE L2MSTRING

RITE4 MESSTAB-MSGT9P L2MSTRING$+amp

ELSE

RITE4 MESSTAB

ENDIF

ENDLOOP

copy SAP AG BC420 12-87

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 8888

SIP

Eree 0e5(era))e

IF L2SUBRC AND E2GROUP SPACE

IF E2GROUP2OPENED = 3 3

CALL FUNCTION 3BDC2OPEN2GROUP3

EXPORTING CLIENT = S9-MANDT

GROUP = E2GROUP

USER = E2USER

EEP = E2EEP

ltOLDDATE = E2ltDATE

E2GROUP2OPENED = 3X3

ENDIF

CALL FUNCTION 3BDC2INSERT3

EXPORTING TCODE = TCODE

TABLES D9NPROTAB = BDCDATA

ENDIF

ENDIF

REFRESlt BDCDATA

ENDFORM

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

Start e6 scree

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

FORM BDC2D9NPRO USING PROGRAM D9NPRO

CLEAR BDCDATA

BDCDATA-PROGRAM = PROGRAM

BDCDATA-D9NPRO = D9NPRO

BDCDATA-D9NBEGIN = 3X3

APPEND BDCDATA

ENDFORM

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

Isert 0ie(7

Page 44: BC420_46C - 012The Transaction Recorder

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 4488

044

983209 SAP AG 1999

Benerating 9unction Modules

Recording

Zcreaedeor ncon mode

ncon rop

Sor eD

ZBC420

Creae comer

9unction module

nl( one data record can be processed at a time

In the net diaog o you can generate a function modue a function group and short tet from the

recording The function modue is automaticay created in the function group

copy SAP AG BC420 12-44

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 4588

042

983209 SAP AG 1999

9unction of 9unction Modules

Online

transaction

To

error

1rror

ption 6 ption amp

9unction module

Import

Parameter 1port

parameter

Tables

M1SSTA

Monitor

S$BC

Import interface

The import interface consists of a technica part and the fieds from the recording (A parameter is

created for each input fied of the recorded transactions)

7port interface

Simpy consists of the parameter S4amp2 The function modue $i return a vaue in the system

fied SC9S4amp2 after caing ca transaction This return vaue is set to Dero if the data record has

een correcty processed (5ny appies to 2T)

If a session is created you $i e notified $hether the data record coud e paced into the session

Tae interfaceThis is used ony if the function modue $ors $ith ca transaction The tae contains a the

system messages

copy SAP AG BC420 12-45

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 4688

048

983209 SAP AG 1999

Import Interface of 9unction Module

$

Technical

fields

Data

fields

BI session or CALL TRANSACTION

Processin $ode

pdate $ode

a$e oamp BI session iamp (T initial)

Bacround user iamp (T initial)

Delete session aampter processin

Loc date oamp session

ODATA indicator

TU

MD1

UPDAT1

BRUP

US1R

=11P

ELDDAT1

DATA

Cou can use parameter 2T4 to specify $hether the function modue creates a atch input session

(2T4 E ) or updates the data record directy using ca transaction (2T4 E G)

The other parameters are fied as for a atch input session header

Note 7very time the function modue is caed a atch input session is created

If the session is to contain severa transactions proceed as foo$s

ltenerate the transaction severa times This can e achieved y recording the transaction again The

function modue interface $i then contain more than one transaction -hen the function modue is

caed severa transactions can e generated for each session

copy SAP AG BC420 12-46

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 4788

043

983209 SAP AG 1999

The Transaction Recorder

PrinciplesPrinciples

Recording )ith the LSMWRecording )ith the LSMW

Principles of atch Input and all TransactionPrinciples of atch Input and all Transaction

Integrating the TA Program into the DWIntegrating the TA Program into the DW

Using the TA Recorder Using the TA Recorder

copy SAP AG BC420 12-47

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 4888

045

983209 SAP AG 1999

Benerated Program

9unction modules DltP1ltBRUP

DltIS1RT

DltLS1ltBRUP

AAP Program

Define structure of

data in seJuential

fileDefine D

table

pen seJuential file

pen I session

Read data recordCseJuential file

9ill D table

9ill I session gtALL TRASATI

Last data record K

lose I session

lose seJuential file

The generated program has the structure dispayed aove It uses the standard function modues for

creating atch input sessions

copy SAP AG BC420 12-48

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 4988

047

983209 SAP AG 1999

Structure of the Benerated Program

Benerated part

Define D

table

pen seJuential file

pen I session

Read data record

9ill D table

9ill I session gtALL TRASATI

Last data recordK

lose I session

lose seJuential file

Include DR16

Define filestructure

P1ltDATAS1T

P1ltBRUP

DltDPR

Dlt9I1LD

DltTRASATI

LS1ltBRUP

LS1ltDATAS1T

The generated program consists of t$o parts 9 a generated part and the incude 2amp72G8 The

incude is provided in the standard system

The incude contains the definition of the reuired 2 tae and a further seven suroutines These

suroutines eecute the foo$ing functions

5pen and cose fie

5pen and cose session

Fi 2 tae

Fi session

The generated part is the main program and cas the reevant suroutines A structure is aso

generated in the generated part to read the eterna data into the fie

See the Appendi for more information on the 2amp72G8 program

copy SAP AG BC420 12-49

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 5088

020

983209 SAP AG 1999

Structure of D Table

PRBRAM DPR D1BI 9AM 9ALPRBRAMPRBRAM DPRDPR D1BID1BI 9AM9AM 9AL9AL

SAPM90ampD 0602

R90ampD=UR 600000

R90ampDU=RS 0006

R90ampD=T=D =UA

SAPM90ampD 0660

=A6AM16 Smith

=A6PSTL 87000

=A6LAD6 US

=A6SPRAS 1

SAPM90ampD 06amp0

=A6ST1B US6amp428357DDATA

PRBRAM

DPR

D1BI

9AM

9AL

EAR

UM

EAR

EAR

EAR

40

4

6

6amp

6amp

D Module pool

D Screen number

D Start of screen

D 9ield name

D 9ield contents

9ield ame T(pe Length Short Tet

AAP Dictionar(

The 2 tae has the same structure as in a standard transfer

copy SAP AG BC420 12-50

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 5188

026

983209 SAP AG 1999

Read Structure

Recording

DATA BEGIN OF record data element BUKRS bukr$amp data element KTOKD ktokd$amp data element NA(EG) name$+amp data element SORT ortl$ampEND OF record-

record

Automaticall( generated

from recording

The structure of the fie is automaticay generated and is a$ays defined $ith the name amp725amp

The generated structure a$ays has the same ayout 7ach fied is defined y t$o generated ro$s

The first ro$ is a$ays a comment ro$ containing the tet J data eement and the data eement of

the screen fied from the recording In the net ro$ the fied itsef is defined $ith the name of the

data eement foo$ed y a three9digit position numer $hich specifies the ocation in the structure

The ength of the fied is set y the ength of the data eement If a fied is not defined through a data

eement the system uses the ength of the screen fied

copy SAP AG BC420 12-51

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 5288

02amp

983209 SAP AG 1999

pening and losing the 9ile

P1ltDATAS1T

LS1ltDATAS1T

FOR( oendataet USING dataet-O)EN DATASET dataet IN TET (ODE-

IF S01SUBR2 34 - 5RITE 6 te7t1e S01SUBR2-STO)-

ENDIF-

ENDFOR(-

FOR( cloedataet USING dataet-2OSE DATASET dataet-

ENDFOR(-

Include

DR16

The suroutine 5P7N3ATAS7T opens the seuentia fie

The suroutine 2+5S73ATAS7T coses the seuentia fie

copy SAP AG BC420 12-52

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 5388

02

983209 SAP AG 1999

9unction Modules for I Program

lient

Session name

Eold date

=eep session

D user name

RecordK

LI1T

BRUP

ELDDAT1

=11P

US1R

R1RD

DltP1ltBRUPDltP1ltBRUP

Transaction code

D table

TD1

DPRTA

DltIS1RTDltIS1RT

DltLS1ltBRUPDltLS1ltBRUP

pen Isessionpen Isession

Insert data for

transactions

Insert data for

transactions

lose I

session

lose I

session

The foo$ing function modues are provided for creating atch input sessions (function group

S2)

235P7N3ltamp54P

2reates a ne$ session and contains genera data for the $hoe session

23INS7ampT

Inserts a the data for a transaction into the session The transferred interna tae $ith the

structure 2ATA must contain a the data reuired for fuy processing the transaction

232+5S73ltamp54P

2oses the session after a the data has een inserted As soon as the session has een cosed it

can e processed

The interna tae $ith the structure 2ATA can ony contain atch input data for one singe

transaction run So the individua transactions are inserted into the atch input session in a oop

using severa 23INS7ampT cas

copy SAP AG BC420 12-53

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 5488

024

983209 SAP AG 2001

9unction Module DltP1ltBRUP

ALL 9UTI DltP1ltBRUPALL 9UTI DltP1ltBRUP

1PRTIB

LI1T client

BRUP session name

ELDDAT1 loc+ date

=11P delete flag

US1R bdc user name

R1RD recording

IMPRTIB

NID internal session +e(

11PTIS

1PRTIB

LI1T client

BRUP session name

ELDDAT1 loc+ date

=11P delete flag

US1R bdc user name

R1RD recording

IMPRTIB NID internal session +e(

11PTIS

-ith the function modue 235P7N3ltamp54P you can open a atch input session

The foo$ing parameters are mandatory

2+I7NT (cient)

ltamp54P (session name)

4S7amp (user name)

Note The 4S7amp must a$ays e specified This user name is reuired for processing the session

in atch mode

The foo$ing parameters are optiona

=5+AT7 specifies the eariest date on $hich the session can e started677P fag specifies $hether session shoud e deeted after it has een successfuy processed The

677P fag is ignored if the session contains errors

677P E K K means deete the session after processing (defaut vaue) H

677P E KGK means do not deete session

amp725amp E KGK ao$s you to create a recording instead of a I session

If gtI is specified the function modue returns the interna session ey This is needed to e ae to

differentiate sessions that have the same name

-ith 7G27PTI5NS you get various return vaues that can e ueried $ith SC9S4amp2

Note In onine mode the onine user is used for the authoriDation checs regardess of the user

name specified

copy SAP AG BC420 12-54

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 5588

022

983209 SAP AG 1999

Subprogram P1ltBRUP

P1ltBRUP

FOR( oen8rou-IF e9on -

2A FUN2TION BD2O)ENGROU) E)ORTING 2IENT lt1mandt GROU) 8rou USER uer KEE) kee

=ODDATE gtolddate-

ENDIF-ENDFOR(-

Include

DR16

The suprogram 5P7N3ltamp54P opens the atch input session

copy SAP AG BC420 12-55

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 5688

028

983209 SAP AG 1999

9unction Module DltIS1RT

ALL 9UTI DltIS1RTALL 9UTI DltIS1RT

IMPRT

TD1 Transaction code

PSTltLAL Update locall(

PRITIB print list

TAL1S DPRTA bdclttable

11PTIS

IMPRT

TD1 Transaction code

PSTltLAL Update locall(

PRITIB print list

TAL1S DPRTA bdclttable

11PTIS

-ith the function modue 23INS7ampT you can add transaction data to the session

Cou need an interna 2 tae to transfer the data

The foo$ing parameters are mandatory

T257 Transaction code

CNPamp5TA 2 tae

The foo$ing parameters are optiona

P5ST3+52A+ E KGK activates oca updating This means that the data to e updated is ept in the

appication server and updated in the ast step of the transaction This does not invove the update

process (For more information see course 28 Programming ataase 4pdates)

PampINTINlt E KGK 9 ists processed in I $i e printed immediatey -ith 7G27PTI5NS you get various return vaues that can e ueried $ith SC9S4amp2

copy SAP AG BC420 12-56

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 5788

023

983209 SAP AG 1999

Subprogram DltTRASATI

DltTRASATI

FOR( BD2TRANSA2TION USING tcode-

IF e9on -2A FUN2TION BD2INSERT

E)ORTING T2ODE tcode TABES D0N)ROTAB bdcdata-

ESE-

ENDIF-ENDFOR(-

T

Include

DR16

The suprogram 23TampANSA2TI5N moves the fied 2 tae either to a atch input session

or uses ca transaction to import the data into the system 5n the seection screen you can specify

$hether you $ant to create a session or you $ant to use ca transaction to process the data directy

The S7SSI5N fied is then set according to your seection

copy SAP AG BC420 12-57

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 5888

025

983209 SAP AG 1999

9unction Module DltLS1ltBRUP

ALL 9UTI DltLS1ltBRUP

11PTIS

TltP1 6

NU1U1lt1RRR amp

-ith the function modue 232+5S73ltamp54P you can cose a atch input session

In 7G27PTI5NS you get various return vaues that can e ueried $ith SC9S4amp2

copy SAP AG BC420 12-58

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 5988

027

983209 SAP AG 1999

Subprogram LS1ltBRUP

FOR( cloe8rou-IF e9on -cloe batcgt 9nut 8rou

2A FUN2TION BD22OSEGROU)-

ESE-IF e8rouoened -

2A FUN2TION BD22OSEGROU)-

ENDIF-ENDIF-

ENDFOR(-

LS1ltBRUPlose session

lose error session

Include

DR16

The suprogram 2+5S73ltamp54P coses the atch input session The suprogram differentiates

et$een a norma I session (S7SSI5N E G) and a session opened $hen ca transaction

encountered an error (73ltamp54P35P7N7 E G)

copy SAP AG BC420 12-59

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 6088

080

983209 SAP AG 1999

Subprograms DltDPRG Dlt9I1LD

DltDPR

Dlt9I1LD

FOR( bdc9eld USING nam al-IF al 34 nodata-2EAR bdcdata- bdcdata1nam nam- bdcdata1al al- A))END bdcdata-ENDIF-

ENDFOR(-

FOR( bdcdltnro USING ro8ram dltnro- 2EAR bdcdata-Bdcdata1ro8ram ro8ram-Bdcdata1dltnro dltnro-Bdcdata1dltnbe89n - A))END bdcdata-ENDFOR(-

Include

DR16

The incude 2amp72GG contains t$o suprograms 23CNPamp5 and 23FI7+

Suprogram 23CNPamp5 fis the 2 tae $ith program names and screen numers

Suprogram 23FI7+ fis the 2 tae $ith fied names and vaues

7ach suprogram creates an entry in the 2 tae

copy SAP AG BC420 12-60

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 6188

086

983209 SAP AG 1999

9illing the D Table

erorm bdcdltnro u9n8 SA)(FD +- erorm bdc9eld u9n8 BD22URSOR RFD1BUKRS- erorm bdc9eld u9n8 BD2OK2ODE 6- erorm bdc9eld u9n8 RFD1BUKRS record1BUKRS- erorm bdc9eld u9n8 RFD1KTOKD record1KTOKD-

erorm bdcdltnro u9n8 SA)(FD -

erorm bdc9eld u9n8 BD22URSOR KNA1S)RAS- erorm bdc9eld u9n8 BD2OK2ODE 6- erorm bdc9eld u9n8 KNA1NA(E record1NA(E-

erorm bdc9eld u9n8 KNA1SORT record1SORT-

Recording Benerated automaticall(

from the recording

)ERFOR( bdcdltnro USING SA)(FD +- )ERFOR( bdc9eld USING BD22URSOR RFD1BUKRS-)ERFOR( bdc9eld USING BD2OK2ODE 6-)ERFOR( bdc9eld USING RFD1BUKRS record1BUKRS-)ERFOR( bdc9eld USING RFD1KTOKD record1KTOKD-

)ERFOR( bdcdltnro USING SA)(FD -

)ERFOR( bdc9eld USING BD22URSOR KNA1S)RAS-)ERFOR( bdc9eld USING BD2OK2ODE 6-)ERFOR( bdc9eld USING KNA1NA(E record1NA(E-

)ERFOR( bdc9eld USING KNA1SORT record1SORT- ---

The 2 tae is fied $ith data from the recording The suroutines 23CNPamp5 and

23FI7+ are used for this

The suroutines are caed in the reuired structure or seuence

copy SAP AG BC420 12-61

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 6288

08amp

983209 SAP AG 1999

erie)

SAPDatabase

SeJuential9ile

SAPDatabase

ALL TRASATIALL TRASATI

SeJuential9ile

ATE IPUTATE IPUT

D TableD TableD TableD Table

I Monitor

T

In contrast to atch input you can use ca transaction to directy pass data to the diaog interface

$ithout using a atch input session Cou use an interna tae (2 tae same structure and ayout

as atch input) to temporariy store your screen data Then you ca the desired transaction in your

program

Note 5n average the 2a Transaction method is 8 to times faster than using atch Input

copy SAP AG BC420 12-62

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 6388

08

983209 SAP AG 1999

all Transaction Program$ 1ample

RE)ORT abcbdcdcdeb9ct-

)ARA(ETERS d9mode DEFAUT A

udmode DEFAUT S-FOR( calltranact9on-2A TRANSA2TION FD

USING bdcdata (ODE d9mode

U)DATE udmode-

IF lt1ubrc NE - 5RITE 6 ---

ENDIF-ENDFOR(-

Screen

00

Screen

100

Screen

An additiona system ro area is added for the caed transaction The system uses this area for

processing the individua screens in the transactionH the data from the tae is added here After the

transaction is processed the second ro area is reeasedH the system continues processing in the first

ro area

Notes

In contrast to atch input there is no error ogging (error sessions) here For processing the caed

transaction the system uses the authoriDations of the user that caed the transaction The 2 tae

can ony hod data for one transaction run at a time efore another transaction is caed and its data

can e added you must eecute a amp7Famp7S= for the 2 tae

copy SAP AG BC420 12-63

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 6488

084

983209 SAP AG 1999

ALL TRASATI C6

RE)ORT 777-

2A TRANSA2TION FD USING bdcdata (ODE E-

Default for MD1 is A

2A TRANSA2TION 3tranact9oncode4 USING 3bdc1table4 C (ODE A E N C-

-ith the parameter 57 you can seect a specific dispay mode for processing the transaction The

foo$ing three modes are avaiae

A (ispay a)

If you eecute the program a the screens and a their data are dispayed This is the defaut vaue

for the 57 in 2A++ TampANSA2TI5N

N (ispay nothing)

The screens are not dispayed at a regardess of $hether any of them contained errors As soon as

the transaction has een fuy processed contro is returned to your program (The vaue of the

parameter 4PAT7 determines $hether dataase updates are eecuted or not)

7 (ispay errors ony)As soon as an error occurs in a screen the transaction is s$itched to dispay mode so that you can

correct the errors

These dispay modes are the same as those in the atch input session processing

copy SAP AG BC420 12-64

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 6588

082

983209 SAP AG 1999

RE)ORT 777-

2A TRANSA2TION FD USING BD2DATA U)DATE -

ALL TRASATI Camp

RE)ORT 777-

2A TRANSA2TION FD USING bdcdata U)DATE -

2A TRANSA2TION 3tranact9oncode4 USING 3bdc1table4 C (ODE A E N C U)DATE A S C -

Default for UPDAT1 is A

-ith the parameter 4PAT7 you can contro ho$ dataase updates arising from a transaction are

carried out There are three options

A (asynchronous updating) The caed transaction does not $ait unti the dataase has een

updated it simpy for$ard the updates to the SAP update service This usuay speeds up the 2T

program This processing mode is N5T recommended for arge data sets as the caed transaction

does not receive a competion message from the update modue

The caing 2T program therefore cannot te if the transaction has een successfuy competed Cou

shoud use the updating administration function (transaction S8) to determine $hether updating

$as terminated eary The error anaysis correction functions for are ess hepfu than $ith

synchronous updating

S (synchronous updating) -ith synchronous updating the caed transaction $aits unti a the

updates have een competed So processing is so$er than $ith synchronous updating The caed

transaction can ho$ever report any updating errors to the program $hich maes error

anaysiscorrection easier

+ (local updating) $ith oca updating the dataase is not updated in a separate process it is

updated in the caers process (see appication hep documentation for the AAP ey$ord S7T

4PAT7 TAS6 +52A+)

copy SAP AG BC420 12-65

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 6688

088

983209 SAP AG 1999

ALL TRASATI C

RE)ORT 777-DATA mtab T0)E TABE OF bdcm8coll-

2A TRANSA2TION FD USING bdcdata (ESSAGES INTO mtab-

2A TRANSA2TION 3tranact9oncode4 USING 3bdc1table4 C (ODE A E N C U)DATE A S C (ESSAGES INTO 3metab4 C -

7SSAlt7S specifies that a system messages that are output during the eecution of a 2A++

TampANSA2TI5N are $ritten to the interna tae L7SSTA The interna tae must have the

structure 2Slt25++

4nie the cassica atch input processing $ith sessions 2A++ TampANSA2TI5N does not offer any

specia processing procedures for transactions containing errors There are no restart functions for

transactions that contain errors or that cause updating terminations

copy SAP AG BC420 12-66

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 6788

083

983209 SAP AG 1999

ALL TRASATI C4

RE)ORT 777-DATA mltot T0)E ctuaram-

2A TRANSA2TION FD USING BD2DATA

O)TIONS FRO( mltot-

2A TRANSA2TION 3tranact9oncode4 USING 3bdc1table4 C (ODE A E N C U)DATE A S C (ESSAGES INTO 3metab4 C O)TIONS FRO( ot C -

RE)ORT 777-DATA mltot T0)E ctuaram-2A TRANSA2TION FD USING bdcdata

O)TIONS FRO( mltot-

The addition 5PTI5NS enaes the ca transaction statement to e controed through a structure

The structure must have the dictionary type 2T43PAampAS

The addition 5PTI5NS Famp5 must not e comined either $ith the addition 57 or $ith

4PAT7 ore information on the net side

copy SAP AG BC420 12-67

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 6888

085

983209 SAP AG 1999

Structure TUltPARAMS

DISMD1 Procen mode anaoo o addon amp

UPDMD1 $pdae mode anaoo o addon $PA

ATTMD1 CA mode CA conro

D19SI1 orce de=a EndoE e drn procen

RAMMIT +o eD a Camp amp(

IPT +o a ac np eonF a F S-B+P SPAC

I1D +o a ac np eon a=er end o= BC daa

The components are defined as foo$s

The components 7FSIM7 ampA25IT N5INPT and N5I7N can have the foo$ing

vaues KGK E Ces or K K E No

If the addition 5PTI5NS Famp5 is not specified the foo$ing settings appy to the contro

parameters

IS57 from addition 57

4P57 from addition 4PAT7

2ATT57 2ATT not active

7FSIM7 o not not use defaut $indo$s siDe

ampA25IT Successfu eit at 25IT -5amp6

N5INPT atch input session active (SC9INPT E G)

N5I7N atch input session sti active after end of 2 data

copy SAP AG BC420 12-68

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 6988

087

983209 SAP AG 1999

SMSBID Message ID

SMSBT Message T(pe C1GIGWGSGA

SMSB Message umber

SMSB6 Message ariable 6

SMSBamp Message ariable amp

SMSB Message ariable

SMSB4 Message ariable 4

SMSBID Message ID

SMSBT Message T(pe C1GIGWGSGA

SMSB Message umber

SMSB6 Message ariable 6

SMSBamp Message ariable amp

SMSB Message ariable

SMSB4 Message ariable 4

Return code$

S(stem fields$

alue Meaning

0 Successful

6000 1rror in transaction

6000 1rror in processing call transaction

see also the s(stem fields specified

alue Meaning

0 Successful

6000 1rror in transaction

6000 1rror in processing call transaction

see also the s(stem fields specified

9ield name Meaning9ield name9ield name MeaningMeaning

Return ode and S(stem 9ields

The return code is used to specify $hether the caed transaction $as processed successfuy In

addition severa system fieds are fied The numer I type and variaes of the diaog message

output y the caed transaction Cou need this information to output the message tet

copy SAP AG BC420 12-69

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 7088

030

983209 SAP AG 1999

Benerated Program of the TA Recorder

REFRES= (ESSTAB-

2A TRANSA2TION tcode USING bdcdata (ODE ctumode U)DATE cudate (ESSAGES INTO metab-OO) AT metab- ENDOO)-IF lubrc 34 AND e8rou 34 S)A2E- IF e8rouoenend - 2A FUN2TION BD2O)ENGROU) E)ORTING ---------

--------- E8rouoened - ENDIF- 2A FUN2TION BD2INSERT E)ORTING T2ODE tcode TABES D0N)ROTAB bdcdata-ENDIF-REFRES= bdcdata-

Message table output

pen error session

Insert data record that

has errors into error

session

If you have seected ca transaction on the seection screen the generated program runs as foo$s

The onine transaction is caed $ith ca transaction and passed to tae 2ATA A the

messages arising during the ca transaction are put in the interna tae 7SSTA

7SSTA is output as a ist

If you have specified an error session ( 73ltamp54P L SPA27) on the seection screen and the

ca transaction comes across an error (+3S4amp2 L 0) the error session is opened The error

session is ho$ever ony opened once Then the data record is paced in the session

A the other data records that have errors $ith ca transaction are paced in the same session

copy SAP AG BC420 12-70

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 7188

036

983209 SAP AG 1999

The Transaction Recorder

PrinciplesPrinciples

Recording )ith the LSMWRecording )ith the LSMW

Principles of atch Input and all TransactionPrinciples of atch Input and all Transaction

Integrating the TA Program into the DWIntegrating the TA Program into the DW

Using the TA Recorder Using the TA Recorder

copy SAP AG BC420 12-71

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 7288

03amp

983209 SAP AG 1999

Integrating into the DW

Transfer program

AAP Dictionar(

Integrate

SDA0

SDA6

SDAamp

SDA

Cou can integrate the generated program into the G9- The structure of the fie must e created

in the AAP ictionary The taes SGA0 SGA8 SGA1 and SGA $i e fied

copy SAP AG BC420 12-72

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 7388

03

983209 SAP AG 1999

DW Release 42

Goo

-B eeae 45

aa ran=er ogtec

Int customer data transfer ob-ect

ecord =ed

Dece daa ran=er

d Goo

The ampunction ampor interatin TA recorder prora$s is

i$ple$ented in the

D+-B in Release

The recorder can e integrated as of ampeease and it is provided in the G9- ampeease

ltot to the G9- ampeease 5n the initia screen you can integrate programs y choosing ampoto

( +nt customer ata transfer o-ect

copy SAP AG BC420 12-73

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 7488

034

983209 SAP AG 1999

reating Program as D b-ect

Comer ran=er ogtec

ampgtec ype

Sor eD =or ogtec

aa ran=er proram

Srcre name

9900

(+A1

Cane comer

ZBCA+G

ZB

ustomer transfer ob-ect

umber bet)een 7000 and 7777

b-ect t(pe

Assignment to R ob-ect

Short tet for D ob-ectShort description

Data transfer program

ame of generated program

Structure name

A structure Cstructure la(out )ith this name is created in

the AAP Dictionar(

For ampeease transfer oects $ere not organiDed y 5amp oects ut y a G numer (00089

OOOO) The numer range O0009OOOO is reserved for customers

To create a connection to the ne$ G 9- you must assign the program to a 5amp oect

2reate a short tet for the G oect This tet $i appear in the method seection ist

Specify the program to e incuded

Specify a name for the structure to e created in the AAP ictionary

Note $he generated program appears under program type +N and not under program type

-

copy SAP AG BC420 12-74

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 7588

032

983209 SAP AG 1999

Adantages

Automatic program registration in the DW in

Release 48

ou can use all the functions defined for

standard ob-ects

1ception$ The (reate ampile ith data

function

If you incuded the oect in the ampeease $orench it is automaticay avaiae in the ampeease

B $orench

A the $orench functions are avaiae for your oect ecept for Create files ith transfer ata

copy SAP AG BC420 12-75

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 7688

038

983209 SAP AG 1999

ou are no) able to$

The Transaction Recorder$ Unit Summar(

Use the recording function in the LSMW to create

a batch input session )ith the data from the

eternal s(stem

Use the TA Recorder to create (our o)n data

transfer program

Anal(e programs that )or+ )ith batch input or

call transaction

Integrate the TA Recorder programs into the

DW

copy SAP AG BC420 12-76

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 7788

ercise 1

nit $ -ecorder

$opic 2reating etors

$ransaction -ecorder ercise 1

bull 2reating detors $ith eterna numer assignment

bull etor numers M9980008 to M9980080

Address data for detors $ith eterna numer assignment is to

e transferred using program ampFI700

ro4ect F5

Supro4ect +5

-un +575

$as)s 85 95 8S25

9oad program -F+00

8 In the foo$ing eercises eisting data is to e changed Therefore these detors $ith

eterna numer assignment have to first e created

898 4nder suproect 79 create run 797G9 $ith the name Detors ith

eternal numers

copy SAP AG BC420 12-77

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 7888

891 2reate the foo$ing three tass The tass map the foo$ing process steps

convert data create + session and process + session

89198 In run 797G9 create the foo$ing tas

9 Tas AP9

9 Name 2onvert data 9 Tas type AP

9 Program type +S-

Seect the foo$ing +S- oect

+S- proect 2109

+S- suproect 7I9

+S- oect I997GT

89191 In run 797G9 create the foo$ing tas 9 Tas +5A9

9 Name 2reate I session

Tas type +5A

9 Program type INP

Seect program ampFI700 $ith the variant

I97G9

8919 In run 797G9 create the foo$ing tas

9 Tas S29

9 Name Process I session Tas type S2

9 Program type amp7P5

Seect program ampS2S4 $ith the variant

S497G9

Note that you have to correct the seuence of the tass 2onvert data

create + session and process + session

4se the uttons

89 Start the run

The detors $i e created $ith eterna numer assignments

89 2hec in transaction F0 that the detors M9980008 to M9980080 have een

created

copy SAP AG BC420 12-78

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 7988

ercise

nit $ransaction -ecorder

$opic -ecording function in the 9S8(

bull 2reate a recording using the +S-

bull ltenerate a atch input session

2hange the detor address data in the amp System

Name of the recording +

Name of the file +2055+F9

8 2reate the recording 7I3 using the +S- ampecord the transaction F01 (2hange

detor)

898 efore you create the recording first test the transaction onineQ

For the recording use detor M9980008 5n the initia screen of the F01

maintain the foo$ing fieds ony

etor etor M9980008

2ompany code 0008

Address data seect

Note $he data record must e saved hile recording

891 aintain the names and the descriptions for the foo$ing fieds

Name city street posta code and teephone numereete a other fieds in screen 880 from the recording (eg S5ampT+ +AN8

SPampAS)

4se the same technica names as sho$n in the tae eo$ (automatic fied

mapping)

copy SAP AG BC420 12-79

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 8088

1 2reate the suproect 7I9 and the ne$ oect TA3 in your proect 2109

aintain the oect attriutes and seect the item atch input recording Seect your

recording 7I3

2reate the source structure address

2reate the source fieds according to the tae eo$ 5r copy them from proect 2109S37N suproect 7I900 oect TA900

198 Fie setup The data from the egacy system are dispayed in the foo$ing tae

Fied name Fied type Fied ength escription

N5 2 8B etor numer

NA7 2 Name

STamp77T 2 Street

2ITC 2 2ityPace of residence

MIP 2 80 Posta code

T7+ 2 8B Teephone numer

191 aintain the fied mapping 4se the automatic fied mapping (via menu item

7tras)

19 Specify the fies 5ny maintain the fie name of the source fie

Name of the fie 21099IFI+7

2odepage 8800

19 Import the data and convert them ispay the data in each caseQ

19 2reate a atch input session

19B ampun the atch input session

copy SAP AG BC420 12-80

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 8188

ercise 3

nit $ransaction -ecorder

$opic -ecording ith the $ -ecorder

bull ltenerate a recording using the TA recorder

bull Test the recording

2hange the address data of detors in the amp system

Name recording $+

Name of the file +2055+F9

8 2reate the recording TA37I3 using the transaction recorder ampecord the

transaction F01 (change detor)

898 4se detor M9980008 for the recording 5n the F01 initia screen ony

maintain the foo$ing fieds

etor etor M9980008

2ompany 2ode 0008

Address data seect

Note $he data record must e saved hen recording

eete a fieds that do not eist in the source fie 21099IFI+7 from screen

880 in the recording (eg 6NA89S5ampT+ 6NA89+AN8 6ANNQ9SPampAS) Note o not deete fieds ampF01946ampS and ampF0190880

Save the recording no$

1 S$itch to the recordings overvie$

198 Process the recording $ith the processing mode A (dispay a)

191 Process the recording $ith the processing mode RN (no dispay)

19 If the recording has een tested and no error has occurred generate a I session

and run it using the I monitor If an error shoud occur generate the recordingagainQ

copy SAP AG BC420 12-81

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 8288

From the recording generate the program M21037I3 in your deveopment cass

2109 Seect the foo$ing

bull ampead fied contents from fie

bull 2reate test data in the fie 2103dei3test3tt

98 Save this program and eecute it ltenerate one I session each and process it

2arry out the same steps again using the ca transaction

The generated program shoud no$ e changed so that fie 21099IFI+7 can e

read and processed

98 2hange the defaut vaue of the fie name (parameter dataset) in 21099

IFI+7

91 2hange the structure definition eete the company code fied and the address

data checo from the structure

9 2hange the su9routine ca perform dc3fied for the company code (KampF019

46ampSK) so that the vaue 0008 is transferred

9 2hange the su9routine ca perform dc3fied for the address data checo

(KampF0190880K) so that the vaue G is transferred

9 Start the program again and read the data from the fie 21099IFI+7 $ith

detor data ltenerate a I session $ith it and run it

copy SAP AG BC420 12-82

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 8388

033 Include DR16INCLUDE BDCRECX1

SELECTION-SCREEN BEGIN OF LINE

PARAMETERS SESSION RADIOBUTTON GROUP CTU create sessi SELECTION-SCREEN COMMENT $amp TEXT-S FOR FIELD SESSION

se(ecti-scree )siti +

PARAMETERS CTU RADIOBUTTON GROUP CTU ca(( trasacti

SELECTION-SCREEN COMMENT $amp TEXT-S FOR FIELD CTU

SELECTION-SCREEN END OF LINE

SELECTION-SCREEN BEGIN OF LINE

SELECTION-SCREEN COMMENT $amp TEXT-S1 FOR FIELD GROUP

se(ecti-scree )siti $+

PARAMETERS GROUP1$amp r) ae 0 sessi

SELECTION-SCREEN COMMENT $amp TEXT-S+ FOR FIELD CTUMODE

se(ecti-scree )siti

PARAMETERS CTUMODE LIE CTU2PARAMS-DISMODE DEFAULT 3N3

A4 s56 a(( 78)rs

E4 s56 78)r errr (8

N4 7 t 7is)(a8 78)r

SELECTION-SCREEN END OF LINE

SELECTION-SCREEN BEGIN OF LINE

SELECTION-SCREEN COMMENT $amp TEXT-S$ FOR FIELD USER

se(ecti-scree )siti $+

PARAMETERS4 USER1$amp DEFAULT S9-UNAME ser 0r sessi i atc5

SELECTION-SCREEN COMMENT $amp TEXT-S FOR FIELD CUPDATE

se(ecti-scree )siti

PARAMETERS CUPDATE LIE CTU2PARAMS-UPDMODE DEFAULT 3L3

S4 s8c5rs(8

A4 as8c5rs(8

L4 (ca(

SELECTION-SCREEN END OF LINE

SELECTION-SCREEN BEGIN OF LINE

SELECTION-SCREEN COMMENT $amp TEXT-S FOR FIELD EEP

se(ecti-scree )siti $+

PARAMETERS4 EEP AS CltECBOX 3 3 = 7e(ete sessi i0 0iis5e7

3X3 = gtee) sessi i0 0iis5e7

SELECTION-SCREEN COMMENT $amp TEXT-S FOR FIELD E2GROUP

copy SAP AG BC420 12-83

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 8488

se(ecti-scree )siti

)araeters E2GROUP1$amp r) ae 0 errr-sessi

SELECTION-SCREEN END OF LINE

SELECTION-SCREEN BEGIN OF LINE

SELECTION-SCREEN COMMENT $amp TEXT-S FOR FIELD ltOLDDATE

se(ecti-scree )siti $+

PARAMETERS4 ltOLDDATE LIE S9-DATUM

SELECTION-SCREEN COMMENT +11amp TEXT-S$ FOR FIELD E2USER

se(ecti-scree )siti

PARAMETERS4 E2USER1$amp DEFAULT S9-UNAME ser 0r errr-sessi

SELECTION-SCREEN END OF LINE

SELECTION-SCREEN BEGIN OF LINE

SELECTION-SCREEN COMMENT +11amp TEXT-S FOR FIELD E2EEP

se(ecti-scree )siti

PARAMETERS4 E2EEP AS CltECBOX 3 3 = 7e(ete sessi i0 0iis5e7

3X3 = gtee) sessi i0 0iis5e7

SELECTION-SCREEN END OF LINE

SELECTION-SCREEN BEGIN OF LINE

SELECTION-SCREEN COMMENT +11amp TEXT-S FOR FIELD E2ltDATE

se(ecti-scree )siti

PARAMETERS4 E2ltDATE LIE S9-DATUM

SELECTION-SCREEN END OF LINE

SELECTION-SCREEN SIP

SELECTION-SCREEN BEGIN OF LINE

SELECTION-SCREEN COMMENT 1amp TEXT-S1 FOR FIELD NODATA

PARAMETERS4 NODATA DEFAULT 33 LOER CASE 7ata

SELECTION-SCREEN END OF LINE

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

Batc5i)t7ata 0 si(e trasacti

DATA4 BDCDATA LIE BDCDATA OCCURS ITlt ltEADER LINE

essaes 0 ca(( trasacti

DATA4 MESSTAB LIE BDCMSGCOLL OCCURS ITlt ltEADER LINE

errr sessi )ee7 3 3 r 3X3amp

DATA4 E2GROUP2OPENED

essae tets

TABLES4 T1

copy SAP AG BC420 12-84

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 8588

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

at se(ecti scree

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

AT SELECTION-SCREEN

r) a7 ser st e 0i((e7 0r create sessi

IF SESSION = 3X3 AND

GROUP = SPACE OR USER = SPACE

MESSAGE E1MSamp

ENDIF

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

)e 7ataset

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

FORM OPEN2DATASET USING P2DATASET

OPEN DATASET P2DATASET IN TEXT MODE

IF S9-SUBRC

RITE4 TEXT-E S9-SUBRC

STOP

ENDIF

ENDFORM

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

c(se 7ataset

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

FORM CLOSE2DATASET USING P2DATASET

CLOSE DATASET P2DATASET

ENDFORM

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

create atc5i)t sessi

t 0r ca(( trasacti siamp

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

FORM OPEN2GROUP

IF SESSION = 3X3

SIP

RITE4 $amp 3Create r)3I1amp GROUP

SIP

)e atc5i)t r)

CALL FUNCTION 3BDC2OPEN2GROUP3

EXPORTING CLIENT = S9-MANDT

copy SAP AG BC420 12-85

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 8688

GROUP = GROUP

USER = USER

EEP = EEP

ltOLDDATE = ltOLDDATE

RITE4 amp 3BDC2OPEN2GROUP3I$amp

1$amp 3retrc7e43I+amp

S9-SUBRC

ENDIF

ENDFORM

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

e7 atc5i)t sessi

ca(( trasacti si4 errr sessiamp

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

FORM CLOSE2GROUP

IF SESSION = 3X3

c(se atc5i)t r)

CALL FUNCTION 3BDC2CLOSE2GROUP3

RITE4 amp 3BDC2CLOSE2GROUP3Iamp

1$amp 3retrc7e43I+amp

S9-SUBRC

ELSE

IF E2GROUP2OPENED = 3X3

CALL FUNCTION 3BDC2CLOSE2GROUP3

RITE4

RITE4 amp 3Fe5(era))e 6r7e eret3Iamp

ENDIF

ENDIF

ENDFORM

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

Start e6 trasacti accr7i t )araeters

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

FORM BDC2TRANSACTION USING TCODE

DATA4 L2MSTRINGamp

DATA4 L2SUBRC LIE S9-SUBRC

atc5 i)t sessi

IF SESSION = 3X3

CALL FUNCTION 3BDC2INSERT3

EXPORTING TCODE = TCODE

TABLES D9NPROTAB = BDCDATA

RITE4 3BDC2INSERT3Iamp

copy SAP AG BC420 12-86

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 8788

TCODE

3retrc7e43I+amp

S9-SUBRC

3RECORD43

S9-INDEX

ca(( trasacti si

ELSE

REFRESlt MESSTAB

CALL TRANSACTION TCODE USING BDCDATA

MODE CTUMODE

UPDATE CUPDATE

MESSAGES INTO MESSTAB

L2SUBRC = S9-SUBRC

RITE4 3CALL2TRANSACTION3

TCODE

3retrc7e43I+amp

L2SUBRC

3RECORD43

S9-INDEX

LOOP AT MESSTAB

SELECT SINGLE FROM T1 ltERE SPRSL = MESSTAB-MSGSPRA

AND ARBGB = MESSTAB-MSGID

AND MSGNR = MESSTAB-MSGNR

IF S9-SUBRC =

L2MSTRING = T1-TEXT

IF L2MSTRING CS 313

REPLACE 313 ITlt MESSTAB-MSGH1 INTO L2MSTRING

REPLACE 3$3 ITlt MESSTAB-MSGH$ INTO L2MSTRING

REPLACE 33 ITlt MESSTAB-MSGH INTO L2MSTRING

REPLACE 33 ITlt MESSTAB-MSGH INTO L2MSTRING

ELSE

REPLACE 33 ITlt MESSTAB-MSGH1 INTO L2MSTRING

REPLACE 33 ITlt MESSTAB-MSGH$ INTO L2MSTRING

REPLACE 33 ITlt MESSTAB-MSGH INTO L2MSTRING

REPLACE 33 ITlt MESSTAB-MSGH INTO L2MSTRING

ENDIF

CONDENSE L2MSTRING

RITE4 MESSTAB-MSGT9P L2MSTRING$+amp

ELSE

RITE4 MESSTAB

ENDIF

ENDLOOP

copy SAP AG BC420 12-87

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 8888

SIP

Eree 0e5(era))e

IF L2SUBRC AND E2GROUP SPACE

IF E2GROUP2OPENED = 3 3

CALL FUNCTION 3BDC2OPEN2GROUP3

EXPORTING CLIENT = S9-MANDT

GROUP = E2GROUP

USER = E2USER

EEP = E2EEP

ltOLDDATE = E2ltDATE

E2GROUP2OPENED = 3X3

ENDIF

CALL FUNCTION 3BDC2INSERT3

EXPORTING TCODE = TCODE

TABLES D9NPROTAB = BDCDATA

ENDIF

ENDIF

REFRESlt BDCDATA

ENDFORM

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

Start e6 scree

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

FORM BDC2D9NPRO USING PROGRAM D9NPRO

CLEAR BDCDATA

BDCDATA-PROGRAM = PROGRAM

BDCDATA-D9NPRO = D9NPRO

BDCDATA-D9NBEGIN = 3X3

APPEND BDCDATA

ENDFORM

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

Isert 0ie(7

Page 45: BC420_46C - 012The Transaction Recorder

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 4588

042

983209 SAP AG 1999

9unction of 9unction Modules

Online

transaction

To

error

1rror

ption 6 ption amp

9unction module

Import

Parameter 1port

parameter

Tables

M1SSTA

Monitor

S$BC

Import interface

The import interface consists of a technica part and the fieds from the recording (A parameter is

created for each input fied of the recorded transactions)

7port interface

Simpy consists of the parameter S4amp2 The function modue $i return a vaue in the system

fied SC9S4amp2 after caing ca transaction This return vaue is set to Dero if the data record has

een correcty processed (5ny appies to 2T)

If a session is created you $i e notified $hether the data record coud e paced into the session

Tae interfaceThis is used ony if the function modue $ors $ith ca transaction The tae contains a the

system messages

copy SAP AG BC420 12-45

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 4688

048

983209 SAP AG 1999

Import Interface of 9unction Module

$

Technical

fields

Data

fields

BI session or CALL TRANSACTION

Processin $ode

pdate $ode

a$e oamp BI session iamp (T initial)

Bacround user iamp (T initial)

Delete session aampter processin

Loc date oamp session

ODATA indicator

TU

MD1

UPDAT1

BRUP

US1R

=11P

ELDDAT1

DATA

Cou can use parameter 2T4 to specify $hether the function modue creates a atch input session

(2T4 E ) or updates the data record directy using ca transaction (2T4 E G)

The other parameters are fied as for a atch input session header

Note 7very time the function modue is caed a atch input session is created

If the session is to contain severa transactions proceed as foo$s

ltenerate the transaction severa times This can e achieved y recording the transaction again The

function modue interface $i then contain more than one transaction -hen the function modue is

caed severa transactions can e generated for each session

copy SAP AG BC420 12-46

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 4788

043

983209 SAP AG 1999

The Transaction Recorder

PrinciplesPrinciples

Recording )ith the LSMWRecording )ith the LSMW

Principles of atch Input and all TransactionPrinciples of atch Input and all Transaction

Integrating the TA Program into the DWIntegrating the TA Program into the DW

Using the TA Recorder Using the TA Recorder

copy SAP AG BC420 12-47

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 4888

045

983209 SAP AG 1999

Benerated Program

9unction modules DltP1ltBRUP

DltIS1RT

DltLS1ltBRUP

AAP Program

Define structure of

data in seJuential

fileDefine D

table

pen seJuential file

pen I session

Read data recordCseJuential file

9ill D table

9ill I session gtALL TRASATI

Last data record K

lose I session

lose seJuential file

The generated program has the structure dispayed aove It uses the standard function modues for

creating atch input sessions

copy SAP AG BC420 12-48

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 4988

047

983209 SAP AG 1999

Structure of the Benerated Program

Benerated part

Define D

table

pen seJuential file

pen I session

Read data record

9ill D table

9ill I session gtALL TRASATI

Last data recordK

lose I session

lose seJuential file

Include DR16

Define filestructure

P1ltDATAS1T

P1ltBRUP

DltDPR

Dlt9I1LD

DltTRASATI

LS1ltBRUP

LS1ltDATAS1T

The generated program consists of t$o parts 9 a generated part and the incude 2amp72G8 The

incude is provided in the standard system

The incude contains the definition of the reuired 2 tae and a further seven suroutines These

suroutines eecute the foo$ing functions

5pen and cose fie

5pen and cose session

Fi 2 tae

Fi session

The generated part is the main program and cas the reevant suroutines A structure is aso

generated in the generated part to read the eterna data into the fie

See the Appendi for more information on the 2amp72G8 program

copy SAP AG BC420 12-49

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 5088

020

983209 SAP AG 1999

Structure of D Table

PRBRAM DPR D1BI 9AM 9ALPRBRAMPRBRAM DPRDPR D1BID1BI 9AM9AM 9AL9AL

SAPM90ampD 0602

R90ampD=UR 600000

R90ampDU=RS 0006

R90ampD=T=D =UA

SAPM90ampD 0660

=A6AM16 Smith

=A6PSTL 87000

=A6LAD6 US

=A6SPRAS 1

SAPM90ampD 06amp0

=A6ST1B US6amp428357DDATA

PRBRAM

DPR

D1BI

9AM

9AL

EAR

UM

EAR

EAR

EAR

40

4

6

6amp

6amp

D Module pool

D Screen number

D Start of screen

D 9ield name

D 9ield contents

9ield ame T(pe Length Short Tet

AAP Dictionar(

The 2 tae has the same structure as in a standard transfer

copy SAP AG BC420 12-50

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 5188

026

983209 SAP AG 1999

Read Structure

Recording

DATA BEGIN OF record data element BUKRS bukr$amp data element KTOKD ktokd$amp data element NA(EG) name$+amp data element SORT ortl$ampEND OF record-

record

Automaticall( generated

from recording

The structure of the fie is automaticay generated and is a$ays defined $ith the name amp725amp

The generated structure a$ays has the same ayout 7ach fied is defined y t$o generated ro$s

The first ro$ is a$ays a comment ro$ containing the tet J data eement and the data eement of

the screen fied from the recording In the net ro$ the fied itsef is defined $ith the name of the

data eement foo$ed y a three9digit position numer $hich specifies the ocation in the structure

The ength of the fied is set y the ength of the data eement If a fied is not defined through a data

eement the system uses the ength of the screen fied

copy SAP AG BC420 12-51

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 5288

02amp

983209 SAP AG 1999

pening and losing the 9ile

P1ltDATAS1T

LS1ltDATAS1T

FOR( oendataet USING dataet-O)EN DATASET dataet IN TET (ODE-

IF S01SUBR2 34 - 5RITE 6 te7t1e S01SUBR2-STO)-

ENDIF-

ENDFOR(-

FOR( cloedataet USING dataet-2OSE DATASET dataet-

ENDFOR(-

Include

DR16

The suroutine 5P7N3ATAS7T opens the seuentia fie

The suroutine 2+5S73ATAS7T coses the seuentia fie

copy SAP AG BC420 12-52

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 5388

02

983209 SAP AG 1999

9unction Modules for I Program

lient

Session name

Eold date

=eep session

D user name

RecordK

LI1T

BRUP

ELDDAT1

=11P

US1R

R1RD

DltP1ltBRUPDltP1ltBRUP

Transaction code

D table

TD1

DPRTA

DltIS1RTDltIS1RT

DltLS1ltBRUPDltLS1ltBRUP

pen Isessionpen Isession

Insert data for

transactions

Insert data for

transactions

lose I

session

lose I

session

The foo$ing function modues are provided for creating atch input sessions (function group

S2)

235P7N3ltamp54P

2reates a ne$ session and contains genera data for the $hoe session

23INS7ampT

Inserts a the data for a transaction into the session The transferred interna tae $ith the

structure 2ATA must contain a the data reuired for fuy processing the transaction

232+5S73ltamp54P

2oses the session after a the data has een inserted As soon as the session has een cosed it

can e processed

The interna tae $ith the structure 2ATA can ony contain atch input data for one singe

transaction run So the individua transactions are inserted into the atch input session in a oop

using severa 23INS7ampT cas

copy SAP AG BC420 12-53

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 5488

024

983209 SAP AG 2001

9unction Module DltP1ltBRUP

ALL 9UTI DltP1ltBRUPALL 9UTI DltP1ltBRUP

1PRTIB

LI1T client

BRUP session name

ELDDAT1 loc+ date

=11P delete flag

US1R bdc user name

R1RD recording

IMPRTIB

NID internal session +e(

11PTIS

1PRTIB

LI1T client

BRUP session name

ELDDAT1 loc+ date

=11P delete flag

US1R bdc user name

R1RD recording

IMPRTIB NID internal session +e(

11PTIS

-ith the function modue 235P7N3ltamp54P you can open a atch input session

The foo$ing parameters are mandatory

2+I7NT (cient)

ltamp54P (session name)

4S7amp (user name)

Note The 4S7amp must a$ays e specified This user name is reuired for processing the session

in atch mode

The foo$ing parameters are optiona

=5+AT7 specifies the eariest date on $hich the session can e started677P fag specifies $hether session shoud e deeted after it has een successfuy processed The

677P fag is ignored if the session contains errors

677P E K K means deete the session after processing (defaut vaue) H

677P E KGK means do not deete session

amp725amp E KGK ao$s you to create a recording instead of a I session

If gtI is specified the function modue returns the interna session ey This is needed to e ae to

differentiate sessions that have the same name

-ith 7G27PTI5NS you get various return vaues that can e ueried $ith SC9S4amp2

Note In onine mode the onine user is used for the authoriDation checs regardess of the user

name specified

copy SAP AG BC420 12-54

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 5588

022

983209 SAP AG 1999

Subprogram P1ltBRUP

P1ltBRUP

FOR( oen8rou-IF e9on -

2A FUN2TION BD2O)ENGROU) E)ORTING 2IENT lt1mandt GROU) 8rou USER uer KEE) kee

=ODDATE gtolddate-

ENDIF-ENDFOR(-

Include

DR16

The suprogram 5P7N3ltamp54P opens the atch input session

copy SAP AG BC420 12-55

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 5688

028

983209 SAP AG 1999

9unction Module DltIS1RT

ALL 9UTI DltIS1RTALL 9UTI DltIS1RT

IMPRT

TD1 Transaction code

PSTltLAL Update locall(

PRITIB print list

TAL1S DPRTA bdclttable

11PTIS

IMPRT

TD1 Transaction code

PSTltLAL Update locall(

PRITIB print list

TAL1S DPRTA bdclttable

11PTIS

-ith the function modue 23INS7ampT you can add transaction data to the session

Cou need an interna 2 tae to transfer the data

The foo$ing parameters are mandatory

T257 Transaction code

CNPamp5TA 2 tae

The foo$ing parameters are optiona

P5ST3+52A+ E KGK activates oca updating This means that the data to e updated is ept in the

appication server and updated in the ast step of the transaction This does not invove the update

process (For more information see course 28 Programming ataase 4pdates)

PampINTINlt E KGK 9 ists processed in I $i e printed immediatey -ith 7G27PTI5NS you get various return vaues that can e ueried $ith SC9S4amp2

copy SAP AG BC420 12-56

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 5788

023

983209 SAP AG 1999

Subprogram DltTRASATI

DltTRASATI

FOR( BD2TRANSA2TION USING tcode-

IF e9on -2A FUN2TION BD2INSERT

E)ORTING T2ODE tcode TABES D0N)ROTAB bdcdata-

ESE-

ENDIF-ENDFOR(-

T

Include

DR16

The suprogram 23TampANSA2TI5N moves the fied 2 tae either to a atch input session

or uses ca transaction to import the data into the system 5n the seection screen you can specify

$hether you $ant to create a session or you $ant to use ca transaction to process the data directy

The S7SSI5N fied is then set according to your seection

copy SAP AG BC420 12-57

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 5888

025

983209 SAP AG 1999

9unction Module DltLS1ltBRUP

ALL 9UTI DltLS1ltBRUP

11PTIS

TltP1 6

NU1U1lt1RRR amp

-ith the function modue 232+5S73ltamp54P you can cose a atch input session

In 7G27PTI5NS you get various return vaues that can e ueried $ith SC9S4amp2

copy SAP AG BC420 12-58

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 5988

027

983209 SAP AG 1999

Subprogram LS1ltBRUP

FOR( cloe8rou-IF e9on -cloe batcgt 9nut 8rou

2A FUN2TION BD22OSEGROU)-

ESE-IF e8rouoened -

2A FUN2TION BD22OSEGROU)-

ENDIF-ENDIF-

ENDFOR(-

LS1ltBRUPlose session

lose error session

Include

DR16

The suprogram 2+5S73ltamp54P coses the atch input session The suprogram differentiates

et$een a norma I session (S7SSI5N E G) and a session opened $hen ca transaction

encountered an error (73ltamp54P35P7N7 E G)

copy SAP AG BC420 12-59

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 6088

080

983209 SAP AG 1999

Subprograms DltDPRG Dlt9I1LD

DltDPR

Dlt9I1LD

FOR( bdc9eld USING nam al-IF al 34 nodata-2EAR bdcdata- bdcdata1nam nam- bdcdata1al al- A))END bdcdata-ENDIF-

ENDFOR(-

FOR( bdcdltnro USING ro8ram dltnro- 2EAR bdcdata-Bdcdata1ro8ram ro8ram-Bdcdata1dltnro dltnro-Bdcdata1dltnbe89n - A))END bdcdata-ENDFOR(-

Include

DR16

The incude 2amp72GG contains t$o suprograms 23CNPamp5 and 23FI7+

Suprogram 23CNPamp5 fis the 2 tae $ith program names and screen numers

Suprogram 23FI7+ fis the 2 tae $ith fied names and vaues

7ach suprogram creates an entry in the 2 tae

copy SAP AG BC420 12-60

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 6188

086

983209 SAP AG 1999

9illing the D Table

erorm bdcdltnro u9n8 SA)(FD +- erorm bdc9eld u9n8 BD22URSOR RFD1BUKRS- erorm bdc9eld u9n8 BD2OK2ODE 6- erorm bdc9eld u9n8 RFD1BUKRS record1BUKRS- erorm bdc9eld u9n8 RFD1KTOKD record1KTOKD-

erorm bdcdltnro u9n8 SA)(FD -

erorm bdc9eld u9n8 BD22URSOR KNA1S)RAS- erorm bdc9eld u9n8 BD2OK2ODE 6- erorm bdc9eld u9n8 KNA1NA(E record1NA(E-

erorm bdc9eld u9n8 KNA1SORT record1SORT-

Recording Benerated automaticall(

from the recording

)ERFOR( bdcdltnro USING SA)(FD +- )ERFOR( bdc9eld USING BD22URSOR RFD1BUKRS-)ERFOR( bdc9eld USING BD2OK2ODE 6-)ERFOR( bdc9eld USING RFD1BUKRS record1BUKRS-)ERFOR( bdc9eld USING RFD1KTOKD record1KTOKD-

)ERFOR( bdcdltnro USING SA)(FD -

)ERFOR( bdc9eld USING BD22URSOR KNA1S)RAS-)ERFOR( bdc9eld USING BD2OK2ODE 6-)ERFOR( bdc9eld USING KNA1NA(E record1NA(E-

)ERFOR( bdc9eld USING KNA1SORT record1SORT- ---

The 2 tae is fied $ith data from the recording The suroutines 23CNPamp5 and

23FI7+ are used for this

The suroutines are caed in the reuired structure or seuence

copy SAP AG BC420 12-61

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 6288

08amp

983209 SAP AG 1999

erie)

SAPDatabase

SeJuential9ile

SAPDatabase

ALL TRASATIALL TRASATI

SeJuential9ile

ATE IPUTATE IPUT

D TableD TableD TableD Table

I Monitor

T

In contrast to atch input you can use ca transaction to directy pass data to the diaog interface

$ithout using a atch input session Cou use an interna tae (2 tae same structure and ayout

as atch input) to temporariy store your screen data Then you ca the desired transaction in your

program

Note 5n average the 2a Transaction method is 8 to times faster than using atch Input

copy SAP AG BC420 12-62

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 6388

08

983209 SAP AG 1999

all Transaction Program$ 1ample

RE)ORT abcbdcdcdeb9ct-

)ARA(ETERS d9mode DEFAUT A

udmode DEFAUT S-FOR( calltranact9on-2A TRANSA2TION FD

USING bdcdata (ODE d9mode

U)DATE udmode-

IF lt1ubrc NE - 5RITE 6 ---

ENDIF-ENDFOR(-

Screen

00

Screen

100

Screen

An additiona system ro area is added for the caed transaction The system uses this area for

processing the individua screens in the transactionH the data from the tae is added here After the

transaction is processed the second ro area is reeasedH the system continues processing in the first

ro area

Notes

In contrast to atch input there is no error ogging (error sessions) here For processing the caed

transaction the system uses the authoriDations of the user that caed the transaction The 2 tae

can ony hod data for one transaction run at a time efore another transaction is caed and its data

can e added you must eecute a amp7Famp7S= for the 2 tae

copy SAP AG BC420 12-63

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 6488

084

983209 SAP AG 1999

ALL TRASATI C6

RE)ORT 777-

2A TRANSA2TION FD USING bdcdata (ODE E-

Default for MD1 is A

2A TRANSA2TION 3tranact9oncode4 USING 3bdc1table4 C (ODE A E N C-

-ith the parameter 57 you can seect a specific dispay mode for processing the transaction The

foo$ing three modes are avaiae

A (ispay a)

If you eecute the program a the screens and a their data are dispayed This is the defaut vaue

for the 57 in 2A++ TampANSA2TI5N

N (ispay nothing)

The screens are not dispayed at a regardess of $hether any of them contained errors As soon as

the transaction has een fuy processed contro is returned to your program (The vaue of the

parameter 4PAT7 determines $hether dataase updates are eecuted or not)

7 (ispay errors ony)As soon as an error occurs in a screen the transaction is s$itched to dispay mode so that you can

correct the errors

These dispay modes are the same as those in the atch input session processing

copy SAP AG BC420 12-64

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 6588

082

983209 SAP AG 1999

RE)ORT 777-

2A TRANSA2TION FD USING BD2DATA U)DATE -

ALL TRASATI Camp

RE)ORT 777-

2A TRANSA2TION FD USING bdcdata U)DATE -

2A TRANSA2TION 3tranact9oncode4 USING 3bdc1table4 C (ODE A E N C U)DATE A S C -

Default for UPDAT1 is A

-ith the parameter 4PAT7 you can contro ho$ dataase updates arising from a transaction are

carried out There are three options

A (asynchronous updating) The caed transaction does not $ait unti the dataase has een

updated it simpy for$ard the updates to the SAP update service This usuay speeds up the 2T

program This processing mode is N5T recommended for arge data sets as the caed transaction

does not receive a competion message from the update modue

The caing 2T program therefore cannot te if the transaction has een successfuy competed Cou

shoud use the updating administration function (transaction S8) to determine $hether updating

$as terminated eary The error anaysis correction functions for are ess hepfu than $ith

synchronous updating

S (synchronous updating) -ith synchronous updating the caed transaction $aits unti a the

updates have een competed So processing is so$er than $ith synchronous updating The caed

transaction can ho$ever report any updating errors to the program $hich maes error

anaysiscorrection easier

+ (local updating) $ith oca updating the dataase is not updated in a separate process it is

updated in the caers process (see appication hep documentation for the AAP ey$ord S7T

4PAT7 TAS6 +52A+)

copy SAP AG BC420 12-65

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 6688

088

983209 SAP AG 1999

ALL TRASATI C

RE)ORT 777-DATA mtab T0)E TABE OF bdcm8coll-

2A TRANSA2TION FD USING bdcdata (ESSAGES INTO mtab-

2A TRANSA2TION 3tranact9oncode4 USING 3bdc1table4 C (ODE A E N C U)DATE A S C (ESSAGES INTO 3metab4 C -

7SSAlt7S specifies that a system messages that are output during the eecution of a 2A++

TampANSA2TI5N are $ritten to the interna tae L7SSTA The interna tae must have the

structure 2Slt25++

4nie the cassica atch input processing $ith sessions 2A++ TampANSA2TI5N does not offer any

specia processing procedures for transactions containing errors There are no restart functions for

transactions that contain errors or that cause updating terminations

copy SAP AG BC420 12-66

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 6788

083

983209 SAP AG 1999

ALL TRASATI C4

RE)ORT 777-DATA mltot T0)E ctuaram-

2A TRANSA2TION FD USING BD2DATA

O)TIONS FRO( mltot-

2A TRANSA2TION 3tranact9oncode4 USING 3bdc1table4 C (ODE A E N C U)DATE A S C (ESSAGES INTO 3metab4 C O)TIONS FRO( ot C -

RE)ORT 777-DATA mltot T0)E ctuaram-2A TRANSA2TION FD USING bdcdata

O)TIONS FRO( mltot-

The addition 5PTI5NS enaes the ca transaction statement to e controed through a structure

The structure must have the dictionary type 2T43PAampAS

The addition 5PTI5NS Famp5 must not e comined either $ith the addition 57 or $ith

4PAT7 ore information on the net side

copy SAP AG BC420 12-67

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 6888

085

983209 SAP AG 1999

Structure TUltPARAMS

DISMD1 Procen mode anaoo o addon amp

UPDMD1 $pdae mode anaoo o addon $PA

ATTMD1 CA mode CA conro

D19SI1 orce de=a EndoE e drn procen

RAMMIT +o eD a Camp amp(

IPT +o a ac np eonF a F S-B+P SPAC

I1D +o a ac np eon a=er end o= BC daa

The components are defined as foo$s

The components 7FSIM7 ampA25IT N5INPT and N5I7N can have the foo$ing

vaues KGK E Ces or K K E No

If the addition 5PTI5NS Famp5 is not specified the foo$ing settings appy to the contro

parameters

IS57 from addition 57

4P57 from addition 4PAT7

2ATT57 2ATT not active

7FSIM7 o not not use defaut $indo$s siDe

ampA25IT Successfu eit at 25IT -5amp6

N5INPT atch input session active (SC9INPT E G)

N5I7N atch input session sti active after end of 2 data

copy SAP AG BC420 12-68

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 6988

087

983209 SAP AG 1999

SMSBID Message ID

SMSBT Message T(pe C1GIGWGSGA

SMSB Message umber

SMSB6 Message ariable 6

SMSBamp Message ariable amp

SMSB Message ariable

SMSB4 Message ariable 4

SMSBID Message ID

SMSBT Message T(pe C1GIGWGSGA

SMSB Message umber

SMSB6 Message ariable 6

SMSBamp Message ariable amp

SMSB Message ariable

SMSB4 Message ariable 4

Return code$

S(stem fields$

alue Meaning

0 Successful

6000 1rror in transaction

6000 1rror in processing call transaction

see also the s(stem fields specified

alue Meaning

0 Successful

6000 1rror in transaction

6000 1rror in processing call transaction

see also the s(stem fields specified

9ield name Meaning9ield name9ield name MeaningMeaning

Return ode and S(stem 9ields

The return code is used to specify $hether the caed transaction $as processed successfuy In

addition severa system fieds are fied The numer I type and variaes of the diaog message

output y the caed transaction Cou need this information to output the message tet

copy SAP AG BC420 12-69

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 7088

030

983209 SAP AG 1999

Benerated Program of the TA Recorder

REFRES= (ESSTAB-

2A TRANSA2TION tcode USING bdcdata (ODE ctumode U)DATE cudate (ESSAGES INTO metab-OO) AT metab- ENDOO)-IF lubrc 34 AND e8rou 34 S)A2E- IF e8rouoenend - 2A FUN2TION BD2O)ENGROU) E)ORTING ---------

--------- E8rouoened - ENDIF- 2A FUN2TION BD2INSERT E)ORTING T2ODE tcode TABES D0N)ROTAB bdcdata-ENDIF-REFRES= bdcdata-

Message table output

pen error session

Insert data record that

has errors into error

session

If you have seected ca transaction on the seection screen the generated program runs as foo$s

The onine transaction is caed $ith ca transaction and passed to tae 2ATA A the

messages arising during the ca transaction are put in the interna tae 7SSTA

7SSTA is output as a ist

If you have specified an error session ( 73ltamp54P L SPA27) on the seection screen and the

ca transaction comes across an error (+3S4amp2 L 0) the error session is opened The error

session is ho$ever ony opened once Then the data record is paced in the session

A the other data records that have errors $ith ca transaction are paced in the same session

copy SAP AG BC420 12-70

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 7188

036

983209 SAP AG 1999

The Transaction Recorder

PrinciplesPrinciples

Recording )ith the LSMWRecording )ith the LSMW

Principles of atch Input and all TransactionPrinciples of atch Input and all Transaction

Integrating the TA Program into the DWIntegrating the TA Program into the DW

Using the TA Recorder Using the TA Recorder

copy SAP AG BC420 12-71

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 7288

03amp

983209 SAP AG 1999

Integrating into the DW

Transfer program

AAP Dictionar(

Integrate

SDA0

SDA6

SDAamp

SDA

Cou can integrate the generated program into the G9- The structure of the fie must e created

in the AAP ictionary The taes SGA0 SGA8 SGA1 and SGA $i e fied

copy SAP AG BC420 12-72

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 7388

03

983209 SAP AG 1999

DW Release 42

Goo

-B eeae 45

aa ran=er ogtec

Int customer data transfer ob-ect

ecord =ed

Dece daa ran=er

d Goo

The ampunction ampor interatin TA recorder prora$s is

i$ple$ented in the

D+-B in Release

The recorder can e integrated as of ampeease and it is provided in the G9- ampeease

ltot to the G9- ampeease 5n the initia screen you can integrate programs y choosing ampoto

( +nt customer ata transfer o-ect

copy SAP AG BC420 12-73

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 7488

034

983209 SAP AG 1999

reating Program as D b-ect

Comer ran=er ogtec

ampgtec ype

Sor eD =or ogtec

aa ran=er proram

Srcre name

9900

(+A1

Cane comer

ZBCA+G

ZB

ustomer transfer ob-ect

umber bet)een 7000 and 7777

b-ect t(pe

Assignment to R ob-ect

Short tet for D ob-ectShort description

Data transfer program

ame of generated program

Structure name

A structure Cstructure la(out )ith this name is created in

the AAP Dictionar(

For ampeease transfer oects $ere not organiDed y 5amp oects ut y a G numer (00089

OOOO) The numer range O0009OOOO is reserved for customers

To create a connection to the ne$ G 9- you must assign the program to a 5amp oect

2reate a short tet for the G oect This tet $i appear in the method seection ist

Specify the program to e incuded

Specify a name for the structure to e created in the AAP ictionary

Note $he generated program appears under program type +N and not under program type

-

copy SAP AG BC420 12-74

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 7588

032

983209 SAP AG 1999

Adantages

Automatic program registration in the DW in

Release 48

ou can use all the functions defined for

standard ob-ects

1ception$ The (reate ampile ith data

function

If you incuded the oect in the ampeease $orench it is automaticay avaiae in the ampeease

B $orench

A the $orench functions are avaiae for your oect ecept for Create files ith transfer ata

copy SAP AG BC420 12-75

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 7688

038

983209 SAP AG 1999

ou are no) able to$

The Transaction Recorder$ Unit Summar(

Use the recording function in the LSMW to create

a batch input session )ith the data from the

eternal s(stem

Use the TA Recorder to create (our o)n data

transfer program

Anal(e programs that )or+ )ith batch input or

call transaction

Integrate the TA Recorder programs into the

DW

copy SAP AG BC420 12-76

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 7788

ercise 1

nit $ -ecorder

$opic 2reating etors

$ransaction -ecorder ercise 1

bull 2reating detors $ith eterna numer assignment

bull etor numers M9980008 to M9980080

Address data for detors $ith eterna numer assignment is to

e transferred using program ampFI700

ro4ect F5

Supro4ect +5

-un +575

$as)s 85 95 8S25

9oad program -F+00

8 In the foo$ing eercises eisting data is to e changed Therefore these detors $ith

eterna numer assignment have to first e created

898 4nder suproect 79 create run 797G9 $ith the name Detors ith

eternal numers

copy SAP AG BC420 12-77

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 7888

891 2reate the foo$ing three tass The tass map the foo$ing process steps

convert data create + session and process + session

89198 In run 797G9 create the foo$ing tas

9 Tas AP9

9 Name 2onvert data 9 Tas type AP

9 Program type +S-

Seect the foo$ing +S- oect

+S- proect 2109

+S- suproect 7I9

+S- oect I997GT

89191 In run 797G9 create the foo$ing tas 9 Tas +5A9

9 Name 2reate I session

Tas type +5A

9 Program type INP

Seect program ampFI700 $ith the variant

I97G9

8919 In run 797G9 create the foo$ing tas

9 Tas S29

9 Name Process I session Tas type S2

9 Program type amp7P5

Seect program ampS2S4 $ith the variant

S497G9

Note that you have to correct the seuence of the tass 2onvert data

create + session and process + session

4se the uttons

89 Start the run

The detors $i e created $ith eterna numer assignments

89 2hec in transaction F0 that the detors M9980008 to M9980080 have een

created

copy SAP AG BC420 12-78

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 7988

ercise

nit $ransaction -ecorder

$opic -ecording function in the 9S8(

bull 2reate a recording using the +S-

bull ltenerate a atch input session

2hange the detor address data in the amp System

Name of the recording +

Name of the file +2055+F9

8 2reate the recording 7I3 using the +S- ampecord the transaction F01 (2hange

detor)

898 efore you create the recording first test the transaction onineQ

For the recording use detor M9980008 5n the initia screen of the F01

maintain the foo$ing fieds ony

etor etor M9980008

2ompany code 0008

Address data seect

Note $he data record must e saved hile recording

891 aintain the names and the descriptions for the foo$ing fieds

Name city street posta code and teephone numereete a other fieds in screen 880 from the recording (eg S5ampT+ +AN8

SPampAS)

4se the same technica names as sho$n in the tae eo$ (automatic fied

mapping)

copy SAP AG BC420 12-79

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 8088

1 2reate the suproect 7I9 and the ne$ oect TA3 in your proect 2109

aintain the oect attriutes and seect the item atch input recording Seect your

recording 7I3

2reate the source structure address

2reate the source fieds according to the tae eo$ 5r copy them from proect 2109S37N suproect 7I900 oect TA900

198 Fie setup The data from the egacy system are dispayed in the foo$ing tae

Fied name Fied type Fied ength escription

N5 2 8B etor numer

NA7 2 Name

STamp77T 2 Street

2ITC 2 2ityPace of residence

MIP 2 80 Posta code

T7+ 2 8B Teephone numer

191 aintain the fied mapping 4se the automatic fied mapping (via menu item

7tras)

19 Specify the fies 5ny maintain the fie name of the source fie

Name of the fie 21099IFI+7

2odepage 8800

19 Import the data and convert them ispay the data in each caseQ

19 2reate a atch input session

19B ampun the atch input session

copy SAP AG BC420 12-80

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 8188

ercise 3

nit $ransaction -ecorder

$opic -ecording ith the $ -ecorder

bull ltenerate a recording using the TA recorder

bull Test the recording

2hange the address data of detors in the amp system

Name recording $+

Name of the file +2055+F9

8 2reate the recording TA37I3 using the transaction recorder ampecord the

transaction F01 (change detor)

898 4se detor M9980008 for the recording 5n the F01 initia screen ony

maintain the foo$ing fieds

etor etor M9980008

2ompany 2ode 0008

Address data seect

Note $he data record must e saved hen recording

eete a fieds that do not eist in the source fie 21099IFI+7 from screen

880 in the recording (eg 6NA89S5ampT+ 6NA89+AN8 6ANNQ9SPampAS) Note o not deete fieds ampF01946ampS and ampF0190880

Save the recording no$

1 S$itch to the recordings overvie$

198 Process the recording $ith the processing mode A (dispay a)

191 Process the recording $ith the processing mode RN (no dispay)

19 If the recording has een tested and no error has occurred generate a I session

and run it using the I monitor If an error shoud occur generate the recordingagainQ

copy SAP AG BC420 12-81

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 8288

From the recording generate the program M21037I3 in your deveopment cass

2109 Seect the foo$ing

bull ampead fied contents from fie

bull 2reate test data in the fie 2103dei3test3tt

98 Save this program and eecute it ltenerate one I session each and process it

2arry out the same steps again using the ca transaction

The generated program shoud no$ e changed so that fie 21099IFI+7 can e

read and processed

98 2hange the defaut vaue of the fie name (parameter dataset) in 21099

IFI+7

91 2hange the structure definition eete the company code fied and the address

data checo from the structure

9 2hange the su9routine ca perform dc3fied for the company code (KampF019

46ampSK) so that the vaue 0008 is transferred

9 2hange the su9routine ca perform dc3fied for the address data checo

(KampF0190880K) so that the vaue G is transferred

9 Start the program again and read the data from the fie 21099IFI+7 $ith

detor data ltenerate a I session $ith it and run it

copy SAP AG BC420 12-82

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 8388

033 Include DR16INCLUDE BDCRECX1

SELECTION-SCREEN BEGIN OF LINE

PARAMETERS SESSION RADIOBUTTON GROUP CTU create sessi SELECTION-SCREEN COMMENT $amp TEXT-S FOR FIELD SESSION

se(ecti-scree )siti +

PARAMETERS CTU RADIOBUTTON GROUP CTU ca(( trasacti

SELECTION-SCREEN COMMENT $amp TEXT-S FOR FIELD CTU

SELECTION-SCREEN END OF LINE

SELECTION-SCREEN BEGIN OF LINE

SELECTION-SCREEN COMMENT $amp TEXT-S1 FOR FIELD GROUP

se(ecti-scree )siti $+

PARAMETERS GROUP1$amp r) ae 0 sessi

SELECTION-SCREEN COMMENT $amp TEXT-S+ FOR FIELD CTUMODE

se(ecti-scree )siti

PARAMETERS CTUMODE LIE CTU2PARAMS-DISMODE DEFAULT 3N3

A4 s56 a(( 78)rs

E4 s56 78)r errr (8

N4 7 t 7is)(a8 78)r

SELECTION-SCREEN END OF LINE

SELECTION-SCREEN BEGIN OF LINE

SELECTION-SCREEN COMMENT $amp TEXT-S$ FOR FIELD USER

se(ecti-scree )siti $+

PARAMETERS4 USER1$amp DEFAULT S9-UNAME ser 0r sessi i atc5

SELECTION-SCREEN COMMENT $amp TEXT-S FOR FIELD CUPDATE

se(ecti-scree )siti

PARAMETERS CUPDATE LIE CTU2PARAMS-UPDMODE DEFAULT 3L3

S4 s8c5rs(8

A4 as8c5rs(8

L4 (ca(

SELECTION-SCREEN END OF LINE

SELECTION-SCREEN BEGIN OF LINE

SELECTION-SCREEN COMMENT $amp TEXT-S FOR FIELD EEP

se(ecti-scree )siti $+

PARAMETERS4 EEP AS CltECBOX 3 3 = 7e(ete sessi i0 0iis5e7

3X3 = gtee) sessi i0 0iis5e7

SELECTION-SCREEN COMMENT $amp TEXT-S FOR FIELD E2GROUP

copy SAP AG BC420 12-83

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 8488

se(ecti-scree )siti

)araeters E2GROUP1$amp r) ae 0 errr-sessi

SELECTION-SCREEN END OF LINE

SELECTION-SCREEN BEGIN OF LINE

SELECTION-SCREEN COMMENT $amp TEXT-S FOR FIELD ltOLDDATE

se(ecti-scree )siti $+

PARAMETERS4 ltOLDDATE LIE S9-DATUM

SELECTION-SCREEN COMMENT +11amp TEXT-S$ FOR FIELD E2USER

se(ecti-scree )siti

PARAMETERS4 E2USER1$amp DEFAULT S9-UNAME ser 0r errr-sessi

SELECTION-SCREEN END OF LINE

SELECTION-SCREEN BEGIN OF LINE

SELECTION-SCREEN COMMENT +11amp TEXT-S FOR FIELD E2EEP

se(ecti-scree )siti

PARAMETERS4 E2EEP AS CltECBOX 3 3 = 7e(ete sessi i0 0iis5e7

3X3 = gtee) sessi i0 0iis5e7

SELECTION-SCREEN END OF LINE

SELECTION-SCREEN BEGIN OF LINE

SELECTION-SCREEN COMMENT +11amp TEXT-S FOR FIELD E2ltDATE

se(ecti-scree )siti

PARAMETERS4 E2ltDATE LIE S9-DATUM

SELECTION-SCREEN END OF LINE

SELECTION-SCREEN SIP

SELECTION-SCREEN BEGIN OF LINE

SELECTION-SCREEN COMMENT 1amp TEXT-S1 FOR FIELD NODATA

PARAMETERS4 NODATA DEFAULT 33 LOER CASE 7ata

SELECTION-SCREEN END OF LINE

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

Batc5i)t7ata 0 si(e trasacti

DATA4 BDCDATA LIE BDCDATA OCCURS ITlt ltEADER LINE

essaes 0 ca(( trasacti

DATA4 MESSTAB LIE BDCMSGCOLL OCCURS ITlt ltEADER LINE

errr sessi )ee7 3 3 r 3X3amp

DATA4 E2GROUP2OPENED

essae tets

TABLES4 T1

copy SAP AG BC420 12-84

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 8588

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

at se(ecti scree

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

AT SELECTION-SCREEN

r) a7 ser st e 0i((e7 0r create sessi

IF SESSION = 3X3 AND

GROUP = SPACE OR USER = SPACE

MESSAGE E1MSamp

ENDIF

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

)e 7ataset

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

FORM OPEN2DATASET USING P2DATASET

OPEN DATASET P2DATASET IN TEXT MODE

IF S9-SUBRC

RITE4 TEXT-E S9-SUBRC

STOP

ENDIF

ENDFORM

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

c(se 7ataset

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

FORM CLOSE2DATASET USING P2DATASET

CLOSE DATASET P2DATASET

ENDFORM

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

create atc5i)t sessi

t 0r ca(( trasacti siamp

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

FORM OPEN2GROUP

IF SESSION = 3X3

SIP

RITE4 $amp 3Create r)3I1amp GROUP

SIP

)e atc5i)t r)

CALL FUNCTION 3BDC2OPEN2GROUP3

EXPORTING CLIENT = S9-MANDT

copy SAP AG BC420 12-85

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 8688

GROUP = GROUP

USER = USER

EEP = EEP

ltOLDDATE = ltOLDDATE

RITE4 amp 3BDC2OPEN2GROUP3I$amp

1$amp 3retrc7e43I+amp

S9-SUBRC

ENDIF

ENDFORM

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

e7 atc5i)t sessi

ca(( trasacti si4 errr sessiamp

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

FORM CLOSE2GROUP

IF SESSION = 3X3

c(se atc5i)t r)

CALL FUNCTION 3BDC2CLOSE2GROUP3

RITE4 amp 3BDC2CLOSE2GROUP3Iamp

1$amp 3retrc7e43I+amp

S9-SUBRC

ELSE

IF E2GROUP2OPENED = 3X3

CALL FUNCTION 3BDC2CLOSE2GROUP3

RITE4

RITE4 amp 3Fe5(era))e 6r7e eret3Iamp

ENDIF

ENDIF

ENDFORM

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

Start e6 trasacti accr7i t )araeters

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

FORM BDC2TRANSACTION USING TCODE

DATA4 L2MSTRINGamp

DATA4 L2SUBRC LIE S9-SUBRC

atc5 i)t sessi

IF SESSION = 3X3

CALL FUNCTION 3BDC2INSERT3

EXPORTING TCODE = TCODE

TABLES D9NPROTAB = BDCDATA

RITE4 3BDC2INSERT3Iamp

copy SAP AG BC420 12-86

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 8788

TCODE

3retrc7e43I+amp

S9-SUBRC

3RECORD43

S9-INDEX

ca(( trasacti si

ELSE

REFRESlt MESSTAB

CALL TRANSACTION TCODE USING BDCDATA

MODE CTUMODE

UPDATE CUPDATE

MESSAGES INTO MESSTAB

L2SUBRC = S9-SUBRC

RITE4 3CALL2TRANSACTION3

TCODE

3retrc7e43I+amp

L2SUBRC

3RECORD43

S9-INDEX

LOOP AT MESSTAB

SELECT SINGLE FROM T1 ltERE SPRSL = MESSTAB-MSGSPRA

AND ARBGB = MESSTAB-MSGID

AND MSGNR = MESSTAB-MSGNR

IF S9-SUBRC =

L2MSTRING = T1-TEXT

IF L2MSTRING CS 313

REPLACE 313 ITlt MESSTAB-MSGH1 INTO L2MSTRING

REPLACE 3$3 ITlt MESSTAB-MSGH$ INTO L2MSTRING

REPLACE 33 ITlt MESSTAB-MSGH INTO L2MSTRING

REPLACE 33 ITlt MESSTAB-MSGH INTO L2MSTRING

ELSE

REPLACE 33 ITlt MESSTAB-MSGH1 INTO L2MSTRING

REPLACE 33 ITlt MESSTAB-MSGH$ INTO L2MSTRING

REPLACE 33 ITlt MESSTAB-MSGH INTO L2MSTRING

REPLACE 33 ITlt MESSTAB-MSGH INTO L2MSTRING

ENDIF

CONDENSE L2MSTRING

RITE4 MESSTAB-MSGT9P L2MSTRING$+amp

ELSE

RITE4 MESSTAB

ENDIF

ENDLOOP

copy SAP AG BC420 12-87

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 8888

SIP

Eree 0e5(era))e

IF L2SUBRC AND E2GROUP SPACE

IF E2GROUP2OPENED = 3 3

CALL FUNCTION 3BDC2OPEN2GROUP3

EXPORTING CLIENT = S9-MANDT

GROUP = E2GROUP

USER = E2USER

EEP = E2EEP

ltOLDDATE = E2ltDATE

E2GROUP2OPENED = 3X3

ENDIF

CALL FUNCTION 3BDC2INSERT3

EXPORTING TCODE = TCODE

TABLES D9NPROTAB = BDCDATA

ENDIF

ENDIF

REFRESlt BDCDATA

ENDFORM

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

Start e6 scree

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

FORM BDC2D9NPRO USING PROGRAM D9NPRO

CLEAR BDCDATA

BDCDATA-PROGRAM = PROGRAM

BDCDATA-D9NPRO = D9NPRO

BDCDATA-D9NBEGIN = 3X3

APPEND BDCDATA

ENDFORM

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

Isert 0ie(7

Page 46: BC420_46C - 012The Transaction Recorder

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 4688

048

983209 SAP AG 1999

Import Interface of 9unction Module

$

Technical

fields

Data

fields

BI session or CALL TRANSACTION

Processin $ode

pdate $ode

a$e oamp BI session iamp (T initial)

Bacround user iamp (T initial)

Delete session aampter processin

Loc date oamp session

ODATA indicator

TU

MD1

UPDAT1

BRUP

US1R

=11P

ELDDAT1

DATA

Cou can use parameter 2T4 to specify $hether the function modue creates a atch input session

(2T4 E ) or updates the data record directy using ca transaction (2T4 E G)

The other parameters are fied as for a atch input session header

Note 7very time the function modue is caed a atch input session is created

If the session is to contain severa transactions proceed as foo$s

ltenerate the transaction severa times This can e achieved y recording the transaction again The

function modue interface $i then contain more than one transaction -hen the function modue is

caed severa transactions can e generated for each session

copy SAP AG BC420 12-46

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 4788

043

983209 SAP AG 1999

The Transaction Recorder

PrinciplesPrinciples

Recording )ith the LSMWRecording )ith the LSMW

Principles of atch Input and all TransactionPrinciples of atch Input and all Transaction

Integrating the TA Program into the DWIntegrating the TA Program into the DW

Using the TA Recorder Using the TA Recorder

copy SAP AG BC420 12-47

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 4888

045

983209 SAP AG 1999

Benerated Program

9unction modules DltP1ltBRUP

DltIS1RT

DltLS1ltBRUP

AAP Program

Define structure of

data in seJuential

fileDefine D

table

pen seJuential file

pen I session

Read data recordCseJuential file

9ill D table

9ill I session gtALL TRASATI

Last data record K

lose I session

lose seJuential file

The generated program has the structure dispayed aove It uses the standard function modues for

creating atch input sessions

copy SAP AG BC420 12-48

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 4988

047

983209 SAP AG 1999

Structure of the Benerated Program

Benerated part

Define D

table

pen seJuential file

pen I session

Read data record

9ill D table

9ill I session gtALL TRASATI

Last data recordK

lose I session

lose seJuential file

Include DR16

Define filestructure

P1ltDATAS1T

P1ltBRUP

DltDPR

Dlt9I1LD

DltTRASATI

LS1ltBRUP

LS1ltDATAS1T

The generated program consists of t$o parts 9 a generated part and the incude 2amp72G8 The

incude is provided in the standard system

The incude contains the definition of the reuired 2 tae and a further seven suroutines These

suroutines eecute the foo$ing functions

5pen and cose fie

5pen and cose session

Fi 2 tae

Fi session

The generated part is the main program and cas the reevant suroutines A structure is aso

generated in the generated part to read the eterna data into the fie

See the Appendi for more information on the 2amp72G8 program

copy SAP AG BC420 12-49

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 5088

020

983209 SAP AG 1999

Structure of D Table

PRBRAM DPR D1BI 9AM 9ALPRBRAMPRBRAM DPRDPR D1BID1BI 9AM9AM 9AL9AL

SAPM90ampD 0602

R90ampD=UR 600000

R90ampDU=RS 0006

R90ampD=T=D =UA

SAPM90ampD 0660

=A6AM16 Smith

=A6PSTL 87000

=A6LAD6 US

=A6SPRAS 1

SAPM90ampD 06amp0

=A6ST1B US6amp428357DDATA

PRBRAM

DPR

D1BI

9AM

9AL

EAR

UM

EAR

EAR

EAR

40

4

6

6amp

6amp

D Module pool

D Screen number

D Start of screen

D 9ield name

D 9ield contents

9ield ame T(pe Length Short Tet

AAP Dictionar(

The 2 tae has the same structure as in a standard transfer

copy SAP AG BC420 12-50

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 5188

026

983209 SAP AG 1999

Read Structure

Recording

DATA BEGIN OF record data element BUKRS bukr$amp data element KTOKD ktokd$amp data element NA(EG) name$+amp data element SORT ortl$ampEND OF record-

record

Automaticall( generated

from recording

The structure of the fie is automaticay generated and is a$ays defined $ith the name amp725amp

The generated structure a$ays has the same ayout 7ach fied is defined y t$o generated ro$s

The first ro$ is a$ays a comment ro$ containing the tet J data eement and the data eement of

the screen fied from the recording In the net ro$ the fied itsef is defined $ith the name of the

data eement foo$ed y a three9digit position numer $hich specifies the ocation in the structure

The ength of the fied is set y the ength of the data eement If a fied is not defined through a data

eement the system uses the ength of the screen fied

copy SAP AG BC420 12-51

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 5288

02amp

983209 SAP AG 1999

pening and losing the 9ile

P1ltDATAS1T

LS1ltDATAS1T

FOR( oendataet USING dataet-O)EN DATASET dataet IN TET (ODE-

IF S01SUBR2 34 - 5RITE 6 te7t1e S01SUBR2-STO)-

ENDIF-

ENDFOR(-

FOR( cloedataet USING dataet-2OSE DATASET dataet-

ENDFOR(-

Include

DR16

The suroutine 5P7N3ATAS7T opens the seuentia fie

The suroutine 2+5S73ATAS7T coses the seuentia fie

copy SAP AG BC420 12-52

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 5388

02

983209 SAP AG 1999

9unction Modules for I Program

lient

Session name

Eold date

=eep session

D user name

RecordK

LI1T

BRUP

ELDDAT1

=11P

US1R

R1RD

DltP1ltBRUPDltP1ltBRUP

Transaction code

D table

TD1

DPRTA

DltIS1RTDltIS1RT

DltLS1ltBRUPDltLS1ltBRUP

pen Isessionpen Isession

Insert data for

transactions

Insert data for

transactions

lose I

session

lose I

session

The foo$ing function modues are provided for creating atch input sessions (function group

S2)

235P7N3ltamp54P

2reates a ne$ session and contains genera data for the $hoe session

23INS7ampT

Inserts a the data for a transaction into the session The transferred interna tae $ith the

structure 2ATA must contain a the data reuired for fuy processing the transaction

232+5S73ltamp54P

2oses the session after a the data has een inserted As soon as the session has een cosed it

can e processed

The interna tae $ith the structure 2ATA can ony contain atch input data for one singe

transaction run So the individua transactions are inserted into the atch input session in a oop

using severa 23INS7ampT cas

copy SAP AG BC420 12-53

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 5488

024

983209 SAP AG 2001

9unction Module DltP1ltBRUP

ALL 9UTI DltP1ltBRUPALL 9UTI DltP1ltBRUP

1PRTIB

LI1T client

BRUP session name

ELDDAT1 loc+ date

=11P delete flag

US1R bdc user name

R1RD recording

IMPRTIB

NID internal session +e(

11PTIS

1PRTIB

LI1T client

BRUP session name

ELDDAT1 loc+ date

=11P delete flag

US1R bdc user name

R1RD recording

IMPRTIB NID internal session +e(

11PTIS

-ith the function modue 235P7N3ltamp54P you can open a atch input session

The foo$ing parameters are mandatory

2+I7NT (cient)

ltamp54P (session name)

4S7amp (user name)

Note The 4S7amp must a$ays e specified This user name is reuired for processing the session

in atch mode

The foo$ing parameters are optiona

=5+AT7 specifies the eariest date on $hich the session can e started677P fag specifies $hether session shoud e deeted after it has een successfuy processed The

677P fag is ignored if the session contains errors

677P E K K means deete the session after processing (defaut vaue) H

677P E KGK means do not deete session

amp725amp E KGK ao$s you to create a recording instead of a I session

If gtI is specified the function modue returns the interna session ey This is needed to e ae to

differentiate sessions that have the same name

-ith 7G27PTI5NS you get various return vaues that can e ueried $ith SC9S4amp2

Note In onine mode the onine user is used for the authoriDation checs regardess of the user

name specified

copy SAP AG BC420 12-54

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 5588

022

983209 SAP AG 1999

Subprogram P1ltBRUP

P1ltBRUP

FOR( oen8rou-IF e9on -

2A FUN2TION BD2O)ENGROU) E)ORTING 2IENT lt1mandt GROU) 8rou USER uer KEE) kee

=ODDATE gtolddate-

ENDIF-ENDFOR(-

Include

DR16

The suprogram 5P7N3ltamp54P opens the atch input session

copy SAP AG BC420 12-55

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 5688

028

983209 SAP AG 1999

9unction Module DltIS1RT

ALL 9UTI DltIS1RTALL 9UTI DltIS1RT

IMPRT

TD1 Transaction code

PSTltLAL Update locall(

PRITIB print list

TAL1S DPRTA bdclttable

11PTIS

IMPRT

TD1 Transaction code

PSTltLAL Update locall(

PRITIB print list

TAL1S DPRTA bdclttable

11PTIS

-ith the function modue 23INS7ampT you can add transaction data to the session

Cou need an interna 2 tae to transfer the data

The foo$ing parameters are mandatory

T257 Transaction code

CNPamp5TA 2 tae

The foo$ing parameters are optiona

P5ST3+52A+ E KGK activates oca updating This means that the data to e updated is ept in the

appication server and updated in the ast step of the transaction This does not invove the update

process (For more information see course 28 Programming ataase 4pdates)

PampINTINlt E KGK 9 ists processed in I $i e printed immediatey -ith 7G27PTI5NS you get various return vaues that can e ueried $ith SC9S4amp2

copy SAP AG BC420 12-56

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 5788

023

983209 SAP AG 1999

Subprogram DltTRASATI

DltTRASATI

FOR( BD2TRANSA2TION USING tcode-

IF e9on -2A FUN2TION BD2INSERT

E)ORTING T2ODE tcode TABES D0N)ROTAB bdcdata-

ESE-

ENDIF-ENDFOR(-

T

Include

DR16

The suprogram 23TampANSA2TI5N moves the fied 2 tae either to a atch input session

or uses ca transaction to import the data into the system 5n the seection screen you can specify

$hether you $ant to create a session or you $ant to use ca transaction to process the data directy

The S7SSI5N fied is then set according to your seection

copy SAP AG BC420 12-57

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 5888

025

983209 SAP AG 1999

9unction Module DltLS1ltBRUP

ALL 9UTI DltLS1ltBRUP

11PTIS

TltP1 6

NU1U1lt1RRR amp

-ith the function modue 232+5S73ltamp54P you can cose a atch input session

In 7G27PTI5NS you get various return vaues that can e ueried $ith SC9S4amp2

copy SAP AG BC420 12-58

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 5988

027

983209 SAP AG 1999

Subprogram LS1ltBRUP

FOR( cloe8rou-IF e9on -cloe batcgt 9nut 8rou

2A FUN2TION BD22OSEGROU)-

ESE-IF e8rouoened -

2A FUN2TION BD22OSEGROU)-

ENDIF-ENDIF-

ENDFOR(-

LS1ltBRUPlose session

lose error session

Include

DR16

The suprogram 2+5S73ltamp54P coses the atch input session The suprogram differentiates

et$een a norma I session (S7SSI5N E G) and a session opened $hen ca transaction

encountered an error (73ltamp54P35P7N7 E G)

copy SAP AG BC420 12-59

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 6088

080

983209 SAP AG 1999

Subprograms DltDPRG Dlt9I1LD

DltDPR

Dlt9I1LD

FOR( bdc9eld USING nam al-IF al 34 nodata-2EAR bdcdata- bdcdata1nam nam- bdcdata1al al- A))END bdcdata-ENDIF-

ENDFOR(-

FOR( bdcdltnro USING ro8ram dltnro- 2EAR bdcdata-Bdcdata1ro8ram ro8ram-Bdcdata1dltnro dltnro-Bdcdata1dltnbe89n - A))END bdcdata-ENDFOR(-

Include

DR16

The incude 2amp72GG contains t$o suprograms 23CNPamp5 and 23FI7+

Suprogram 23CNPamp5 fis the 2 tae $ith program names and screen numers

Suprogram 23FI7+ fis the 2 tae $ith fied names and vaues

7ach suprogram creates an entry in the 2 tae

copy SAP AG BC420 12-60

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 6188

086

983209 SAP AG 1999

9illing the D Table

erorm bdcdltnro u9n8 SA)(FD +- erorm bdc9eld u9n8 BD22URSOR RFD1BUKRS- erorm bdc9eld u9n8 BD2OK2ODE 6- erorm bdc9eld u9n8 RFD1BUKRS record1BUKRS- erorm bdc9eld u9n8 RFD1KTOKD record1KTOKD-

erorm bdcdltnro u9n8 SA)(FD -

erorm bdc9eld u9n8 BD22URSOR KNA1S)RAS- erorm bdc9eld u9n8 BD2OK2ODE 6- erorm bdc9eld u9n8 KNA1NA(E record1NA(E-

erorm bdc9eld u9n8 KNA1SORT record1SORT-

Recording Benerated automaticall(

from the recording

)ERFOR( bdcdltnro USING SA)(FD +- )ERFOR( bdc9eld USING BD22URSOR RFD1BUKRS-)ERFOR( bdc9eld USING BD2OK2ODE 6-)ERFOR( bdc9eld USING RFD1BUKRS record1BUKRS-)ERFOR( bdc9eld USING RFD1KTOKD record1KTOKD-

)ERFOR( bdcdltnro USING SA)(FD -

)ERFOR( bdc9eld USING BD22URSOR KNA1S)RAS-)ERFOR( bdc9eld USING BD2OK2ODE 6-)ERFOR( bdc9eld USING KNA1NA(E record1NA(E-

)ERFOR( bdc9eld USING KNA1SORT record1SORT- ---

The 2 tae is fied $ith data from the recording The suroutines 23CNPamp5 and

23FI7+ are used for this

The suroutines are caed in the reuired structure or seuence

copy SAP AG BC420 12-61

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 6288

08amp

983209 SAP AG 1999

erie)

SAPDatabase

SeJuential9ile

SAPDatabase

ALL TRASATIALL TRASATI

SeJuential9ile

ATE IPUTATE IPUT

D TableD TableD TableD Table

I Monitor

T

In contrast to atch input you can use ca transaction to directy pass data to the diaog interface

$ithout using a atch input session Cou use an interna tae (2 tae same structure and ayout

as atch input) to temporariy store your screen data Then you ca the desired transaction in your

program

Note 5n average the 2a Transaction method is 8 to times faster than using atch Input

copy SAP AG BC420 12-62

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 6388

08

983209 SAP AG 1999

all Transaction Program$ 1ample

RE)ORT abcbdcdcdeb9ct-

)ARA(ETERS d9mode DEFAUT A

udmode DEFAUT S-FOR( calltranact9on-2A TRANSA2TION FD

USING bdcdata (ODE d9mode

U)DATE udmode-

IF lt1ubrc NE - 5RITE 6 ---

ENDIF-ENDFOR(-

Screen

00

Screen

100

Screen

An additiona system ro area is added for the caed transaction The system uses this area for

processing the individua screens in the transactionH the data from the tae is added here After the

transaction is processed the second ro area is reeasedH the system continues processing in the first

ro area

Notes

In contrast to atch input there is no error ogging (error sessions) here For processing the caed

transaction the system uses the authoriDations of the user that caed the transaction The 2 tae

can ony hod data for one transaction run at a time efore another transaction is caed and its data

can e added you must eecute a amp7Famp7S= for the 2 tae

copy SAP AG BC420 12-63

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 6488

084

983209 SAP AG 1999

ALL TRASATI C6

RE)ORT 777-

2A TRANSA2TION FD USING bdcdata (ODE E-

Default for MD1 is A

2A TRANSA2TION 3tranact9oncode4 USING 3bdc1table4 C (ODE A E N C-

-ith the parameter 57 you can seect a specific dispay mode for processing the transaction The

foo$ing three modes are avaiae

A (ispay a)

If you eecute the program a the screens and a their data are dispayed This is the defaut vaue

for the 57 in 2A++ TampANSA2TI5N

N (ispay nothing)

The screens are not dispayed at a regardess of $hether any of them contained errors As soon as

the transaction has een fuy processed contro is returned to your program (The vaue of the

parameter 4PAT7 determines $hether dataase updates are eecuted or not)

7 (ispay errors ony)As soon as an error occurs in a screen the transaction is s$itched to dispay mode so that you can

correct the errors

These dispay modes are the same as those in the atch input session processing

copy SAP AG BC420 12-64

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 6588

082

983209 SAP AG 1999

RE)ORT 777-

2A TRANSA2TION FD USING BD2DATA U)DATE -

ALL TRASATI Camp

RE)ORT 777-

2A TRANSA2TION FD USING bdcdata U)DATE -

2A TRANSA2TION 3tranact9oncode4 USING 3bdc1table4 C (ODE A E N C U)DATE A S C -

Default for UPDAT1 is A

-ith the parameter 4PAT7 you can contro ho$ dataase updates arising from a transaction are

carried out There are three options

A (asynchronous updating) The caed transaction does not $ait unti the dataase has een

updated it simpy for$ard the updates to the SAP update service This usuay speeds up the 2T

program This processing mode is N5T recommended for arge data sets as the caed transaction

does not receive a competion message from the update modue

The caing 2T program therefore cannot te if the transaction has een successfuy competed Cou

shoud use the updating administration function (transaction S8) to determine $hether updating

$as terminated eary The error anaysis correction functions for are ess hepfu than $ith

synchronous updating

S (synchronous updating) -ith synchronous updating the caed transaction $aits unti a the

updates have een competed So processing is so$er than $ith synchronous updating The caed

transaction can ho$ever report any updating errors to the program $hich maes error

anaysiscorrection easier

+ (local updating) $ith oca updating the dataase is not updated in a separate process it is

updated in the caers process (see appication hep documentation for the AAP ey$ord S7T

4PAT7 TAS6 +52A+)

copy SAP AG BC420 12-65

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 6688

088

983209 SAP AG 1999

ALL TRASATI C

RE)ORT 777-DATA mtab T0)E TABE OF bdcm8coll-

2A TRANSA2TION FD USING bdcdata (ESSAGES INTO mtab-

2A TRANSA2TION 3tranact9oncode4 USING 3bdc1table4 C (ODE A E N C U)DATE A S C (ESSAGES INTO 3metab4 C -

7SSAlt7S specifies that a system messages that are output during the eecution of a 2A++

TampANSA2TI5N are $ritten to the interna tae L7SSTA The interna tae must have the

structure 2Slt25++

4nie the cassica atch input processing $ith sessions 2A++ TampANSA2TI5N does not offer any

specia processing procedures for transactions containing errors There are no restart functions for

transactions that contain errors or that cause updating terminations

copy SAP AG BC420 12-66

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 6788

083

983209 SAP AG 1999

ALL TRASATI C4

RE)ORT 777-DATA mltot T0)E ctuaram-

2A TRANSA2TION FD USING BD2DATA

O)TIONS FRO( mltot-

2A TRANSA2TION 3tranact9oncode4 USING 3bdc1table4 C (ODE A E N C U)DATE A S C (ESSAGES INTO 3metab4 C O)TIONS FRO( ot C -

RE)ORT 777-DATA mltot T0)E ctuaram-2A TRANSA2TION FD USING bdcdata

O)TIONS FRO( mltot-

The addition 5PTI5NS enaes the ca transaction statement to e controed through a structure

The structure must have the dictionary type 2T43PAampAS

The addition 5PTI5NS Famp5 must not e comined either $ith the addition 57 or $ith

4PAT7 ore information on the net side

copy SAP AG BC420 12-67

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 6888

085

983209 SAP AG 1999

Structure TUltPARAMS

DISMD1 Procen mode anaoo o addon amp

UPDMD1 $pdae mode anaoo o addon $PA

ATTMD1 CA mode CA conro

D19SI1 orce de=a EndoE e drn procen

RAMMIT +o eD a Camp amp(

IPT +o a ac np eonF a F S-B+P SPAC

I1D +o a ac np eon a=er end o= BC daa

The components are defined as foo$s

The components 7FSIM7 ampA25IT N5INPT and N5I7N can have the foo$ing

vaues KGK E Ces or K K E No

If the addition 5PTI5NS Famp5 is not specified the foo$ing settings appy to the contro

parameters

IS57 from addition 57

4P57 from addition 4PAT7

2ATT57 2ATT not active

7FSIM7 o not not use defaut $indo$s siDe

ampA25IT Successfu eit at 25IT -5amp6

N5INPT atch input session active (SC9INPT E G)

N5I7N atch input session sti active after end of 2 data

copy SAP AG BC420 12-68

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 6988

087

983209 SAP AG 1999

SMSBID Message ID

SMSBT Message T(pe C1GIGWGSGA

SMSB Message umber

SMSB6 Message ariable 6

SMSBamp Message ariable amp

SMSB Message ariable

SMSB4 Message ariable 4

SMSBID Message ID

SMSBT Message T(pe C1GIGWGSGA

SMSB Message umber

SMSB6 Message ariable 6

SMSBamp Message ariable amp

SMSB Message ariable

SMSB4 Message ariable 4

Return code$

S(stem fields$

alue Meaning

0 Successful

6000 1rror in transaction

6000 1rror in processing call transaction

see also the s(stem fields specified

alue Meaning

0 Successful

6000 1rror in transaction

6000 1rror in processing call transaction

see also the s(stem fields specified

9ield name Meaning9ield name9ield name MeaningMeaning

Return ode and S(stem 9ields

The return code is used to specify $hether the caed transaction $as processed successfuy In

addition severa system fieds are fied The numer I type and variaes of the diaog message

output y the caed transaction Cou need this information to output the message tet

copy SAP AG BC420 12-69

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 7088

030

983209 SAP AG 1999

Benerated Program of the TA Recorder

REFRES= (ESSTAB-

2A TRANSA2TION tcode USING bdcdata (ODE ctumode U)DATE cudate (ESSAGES INTO metab-OO) AT metab- ENDOO)-IF lubrc 34 AND e8rou 34 S)A2E- IF e8rouoenend - 2A FUN2TION BD2O)ENGROU) E)ORTING ---------

--------- E8rouoened - ENDIF- 2A FUN2TION BD2INSERT E)ORTING T2ODE tcode TABES D0N)ROTAB bdcdata-ENDIF-REFRES= bdcdata-

Message table output

pen error session

Insert data record that

has errors into error

session

If you have seected ca transaction on the seection screen the generated program runs as foo$s

The onine transaction is caed $ith ca transaction and passed to tae 2ATA A the

messages arising during the ca transaction are put in the interna tae 7SSTA

7SSTA is output as a ist

If you have specified an error session ( 73ltamp54P L SPA27) on the seection screen and the

ca transaction comes across an error (+3S4amp2 L 0) the error session is opened The error

session is ho$ever ony opened once Then the data record is paced in the session

A the other data records that have errors $ith ca transaction are paced in the same session

copy SAP AG BC420 12-70

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 7188

036

983209 SAP AG 1999

The Transaction Recorder

PrinciplesPrinciples

Recording )ith the LSMWRecording )ith the LSMW

Principles of atch Input and all TransactionPrinciples of atch Input and all Transaction

Integrating the TA Program into the DWIntegrating the TA Program into the DW

Using the TA Recorder Using the TA Recorder

copy SAP AG BC420 12-71

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 7288

03amp

983209 SAP AG 1999

Integrating into the DW

Transfer program

AAP Dictionar(

Integrate

SDA0

SDA6

SDAamp

SDA

Cou can integrate the generated program into the G9- The structure of the fie must e created

in the AAP ictionary The taes SGA0 SGA8 SGA1 and SGA $i e fied

copy SAP AG BC420 12-72

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 7388

03

983209 SAP AG 1999

DW Release 42

Goo

-B eeae 45

aa ran=er ogtec

Int customer data transfer ob-ect

ecord =ed

Dece daa ran=er

d Goo

The ampunction ampor interatin TA recorder prora$s is

i$ple$ented in the

D+-B in Release

The recorder can e integrated as of ampeease and it is provided in the G9- ampeease

ltot to the G9- ampeease 5n the initia screen you can integrate programs y choosing ampoto

( +nt customer ata transfer o-ect

copy SAP AG BC420 12-73

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 7488

034

983209 SAP AG 1999

reating Program as D b-ect

Comer ran=er ogtec

ampgtec ype

Sor eD =or ogtec

aa ran=er proram

Srcre name

9900

(+A1

Cane comer

ZBCA+G

ZB

ustomer transfer ob-ect

umber bet)een 7000 and 7777

b-ect t(pe

Assignment to R ob-ect

Short tet for D ob-ectShort description

Data transfer program

ame of generated program

Structure name

A structure Cstructure la(out )ith this name is created in

the AAP Dictionar(

For ampeease transfer oects $ere not organiDed y 5amp oects ut y a G numer (00089

OOOO) The numer range O0009OOOO is reserved for customers

To create a connection to the ne$ G 9- you must assign the program to a 5amp oect

2reate a short tet for the G oect This tet $i appear in the method seection ist

Specify the program to e incuded

Specify a name for the structure to e created in the AAP ictionary

Note $he generated program appears under program type +N and not under program type

-

copy SAP AG BC420 12-74

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 7588

032

983209 SAP AG 1999

Adantages

Automatic program registration in the DW in

Release 48

ou can use all the functions defined for

standard ob-ects

1ception$ The (reate ampile ith data

function

If you incuded the oect in the ampeease $orench it is automaticay avaiae in the ampeease

B $orench

A the $orench functions are avaiae for your oect ecept for Create files ith transfer ata

copy SAP AG BC420 12-75

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 7688

038

983209 SAP AG 1999

ou are no) able to$

The Transaction Recorder$ Unit Summar(

Use the recording function in the LSMW to create

a batch input session )ith the data from the

eternal s(stem

Use the TA Recorder to create (our o)n data

transfer program

Anal(e programs that )or+ )ith batch input or

call transaction

Integrate the TA Recorder programs into the

DW

copy SAP AG BC420 12-76

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 7788

ercise 1

nit $ -ecorder

$opic 2reating etors

$ransaction -ecorder ercise 1

bull 2reating detors $ith eterna numer assignment

bull etor numers M9980008 to M9980080

Address data for detors $ith eterna numer assignment is to

e transferred using program ampFI700

ro4ect F5

Supro4ect +5

-un +575

$as)s 85 95 8S25

9oad program -F+00

8 In the foo$ing eercises eisting data is to e changed Therefore these detors $ith

eterna numer assignment have to first e created

898 4nder suproect 79 create run 797G9 $ith the name Detors ith

eternal numers

copy SAP AG BC420 12-77

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 7888

891 2reate the foo$ing three tass The tass map the foo$ing process steps

convert data create + session and process + session

89198 In run 797G9 create the foo$ing tas

9 Tas AP9

9 Name 2onvert data 9 Tas type AP

9 Program type +S-

Seect the foo$ing +S- oect

+S- proect 2109

+S- suproect 7I9

+S- oect I997GT

89191 In run 797G9 create the foo$ing tas 9 Tas +5A9

9 Name 2reate I session

Tas type +5A

9 Program type INP

Seect program ampFI700 $ith the variant

I97G9

8919 In run 797G9 create the foo$ing tas

9 Tas S29

9 Name Process I session Tas type S2

9 Program type amp7P5

Seect program ampS2S4 $ith the variant

S497G9

Note that you have to correct the seuence of the tass 2onvert data

create + session and process + session

4se the uttons

89 Start the run

The detors $i e created $ith eterna numer assignments

89 2hec in transaction F0 that the detors M9980008 to M9980080 have een

created

copy SAP AG BC420 12-78

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 7988

ercise

nit $ransaction -ecorder

$opic -ecording function in the 9S8(

bull 2reate a recording using the +S-

bull ltenerate a atch input session

2hange the detor address data in the amp System

Name of the recording +

Name of the file +2055+F9

8 2reate the recording 7I3 using the +S- ampecord the transaction F01 (2hange

detor)

898 efore you create the recording first test the transaction onineQ

For the recording use detor M9980008 5n the initia screen of the F01

maintain the foo$ing fieds ony

etor etor M9980008

2ompany code 0008

Address data seect

Note $he data record must e saved hile recording

891 aintain the names and the descriptions for the foo$ing fieds

Name city street posta code and teephone numereete a other fieds in screen 880 from the recording (eg S5ampT+ +AN8

SPampAS)

4se the same technica names as sho$n in the tae eo$ (automatic fied

mapping)

copy SAP AG BC420 12-79

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 8088

1 2reate the suproect 7I9 and the ne$ oect TA3 in your proect 2109

aintain the oect attriutes and seect the item atch input recording Seect your

recording 7I3

2reate the source structure address

2reate the source fieds according to the tae eo$ 5r copy them from proect 2109S37N suproect 7I900 oect TA900

198 Fie setup The data from the egacy system are dispayed in the foo$ing tae

Fied name Fied type Fied ength escription

N5 2 8B etor numer

NA7 2 Name

STamp77T 2 Street

2ITC 2 2ityPace of residence

MIP 2 80 Posta code

T7+ 2 8B Teephone numer

191 aintain the fied mapping 4se the automatic fied mapping (via menu item

7tras)

19 Specify the fies 5ny maintain the fie name of the source fie

Name of the fie 21099IFI+7

2odepage 8800

19 Import the data and convert them ispay the data in each caseQ

19 2reate a atch input session

19B ampun the atch input session

copy SAP AG BC420 12-80

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 8188

ercise 3

nit $ransaction -ecorder

$opic -ecording ith the $ -ecorder

bull ltenerate a recording using the TA recorder

bull Test the recording

2hange the address data of detors in the amp system

Name recording $+

Name of the file +2055+F9

8 2reate the recording TA37I3 using the transaction recorder ampecord the

transaction F01 (change detor)

898 4se detor M9980008 for the recording 5n the F01 initia screen ony

maintain the foo$ing fieds

etor etor M9980008

2ompany 2ode 0008

Address data seect

Note $he data record must e saved hen recording

eete a fieds that do not eist in the source fie 21099IFI+7 from screen

880 in the recording (eg 6NA89S5ampT+ 6NA89+AN8 6ANNQ9SPampAS) Note o not deete fieds ampF01946ampS and ampF0190880

Save the recording no$

1 S$itch to the recordings overvie$

198 Process the recording $ith the processing mode A (dispay a)

191 Process the recording $ith the processing mode RN (no dispay)

19 If the recording has een tested and no error has occurred generate a I session

and run it using the I monitor If an error shoud occur generate the recordingagainQ

copy SAP AG BC420 12-81

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 8288

From the recording generate the program M21037I3 in your deveopment cass

2109 Seect the foo$ing

bull ampead fied contents from fie

bull 2reate test data in the fie 2103dei3test3tt

98 Save this program and eecute it ltenerate one I session each and process it

2arry out the same steps again using the ca transaction

The generated program shoud no$ e changed so that fie 21099IFI+7 can e

read and processed

98 2hange the defaut vaue of the fie name (parameter dataset) in 21099

IFI+7

91 2hange the structure definition eete the company code fied and the address

data checo from the structure

9 2hange the su9routine ca perform dc3fied for the company code (KampF019

46ampSK) so that the vaue 0008 is transferred

9 2hange the su9routine ca perform dc3fied for the address data checo

(KampF0190880K) so that the vaue G is transferred

9 Start the program again and read the data from the fie 21099IFI+7 $ith

detor data ltenerate a I session $ith it and run it

copy SAP AG BC420 12-82

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 8388

033 Include DR16INCLUDE BDCRECX1

SELECTION-SCREEN BEGIN OF LINE

PARAMETERS SESSION RADIOBUTTON GROUP CTU create sessi SELECTION-SCREEN COMMENT $amp TEXT-S FOR FIELD SESSION

se(ecti-scree )siti +

PARAMETERS CTU RADIOBUTTON GROUP CTU ca(( trasacti

SELECTION-SCREEN COMMENT $amp TEXT-S FOR FIELD CTU

SELECTION-SCREEN END OF LINE

SELECTION-SCREEN BEGIN OF LINE

SELECTION-SCREEN COMMENT $amp TEXT-S1 FOR FIELD GROUP

se(ecti-scree )siti $+

PARAMETERS GROUP1$amp r) ae 0 sessi

SELECTION-SCREEN COMMENT $amp TEXT-S+ FOR FIELD CTUMODE

se(ecti-scree )siti

PARAMETERS CTUMODE LIE CTU2PARAMS-DISMODE DEFAULT 3N3

A4 s56 a(( 78)rs

E4 s56 78)r errr (8

N4 7 t 7is)(a8 78)r

SELECTION-SCREEN END OF LINE

SELECTION-SCREEN BEGIN OF LINE

SELECTION-SCREEN COMMENT $amp TEXT-S$ FOR FIELD USER

se(ecti-scree )siti $+

PARAMETERS4 USER1$amp DEFAULT S9-UNAME ser 0r sessi i atc5

SELECTION-SCREEN COMMENT $amp TEXT-S FOR FIELD CUPDATE

se(ecti-scree )siti

PARAMETERS CUPDATE LIE CTU2PARAMS-UPDMODE DEFAULT 3L3

S4 s8c5rs(8

A4 as8c5rs(8

L4 (ca(

SELECTION-SCREEN END OF LINE

SELECTION-SCREEN BEGIN OF LINE

SELECTION-SCREEN COMMENT $amp TEXT-S FOR FIELD EEP

se(ecti-scree )siti $+

PARAMETERS4 EEP AS CltECBOX 3 3 = 7e(ete sessi i0 0iis5e7

3X3 = gtee) sessi i0 0iis5e7

SELECTION-SCREEN COMMENT $amp TEXT-S FOR FIELD E2GROUP

copy SAP AG BC420 12-83

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 8488

se(ecti-scree )siti

)araeters E2GROUP1$amp r) ae 0 errr-sessi

SELECTION-SCREEN END OF LINE

SELECTION-SCREEN BEGIN OF LINE

SELECTION-SCREEN COMMENT $amp TEXT-S FOR FIELD ltOLDDATE

se(ecti-scree )siti $+

PARAMETERS4 ltOLDDATE LIE S9-DATUM

SELECTION-SCREEN COMMENT +11amp TEXT-S$ FOR FIELD E2USER

se(ecti-scree )siti

PARAMETERS4 E2USER1$amp DEFAULT S9-UNAME ser 0r errr-sessi

SELECTION-SCREEN END OF LINE

SELECTION-SCREEN BEGIN OF LINE

SELECTION-SCREEN COMMENT +11amp TEXT-S FOR FIELD E2EEP

se(ecti-scree )siti

PARAMETERS4 E2EEP AS CltECBOX 3 3 = 7e(ete sessi i0 0iis5e7

3X3 = gtee) sessi i0 0iis5e7

SELECTION-SCREEN END OF LINE

SELECTION-SCREEN BEGIN OF LINE

SELECTION-SCREEN COMMENT +11amp TEXT-S FOR FIELD E2ltDATE

se(ecti-scree )siti

PARAMETERS4 E2ltDATE LIE S9-DATUM

SELECTION-SCREEN END OF LINE

SELECTION-SCREEN SIP

SELECTION-SCREEN BEGIN OF LINE

SELECTION-SCREEN COMMENT 1amp TEXT-S1 FOR FIELD NODATA

PARAMETERS4 NODATA DEFAULT 33 LOER CASE 7ata

SELECTION-SCREEN END OF LINE

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

Batc5i)t7ata 0 si(e trasacti

DATA4 BDCDATA LIE BDCDATA OCCURS ITlt ltEADER LINE

essaes 0 ca(( trasacti

DATA4 MESSTAB LIE BDCMSGCOLL OCCURS ITlt ltEADER LINE

errr sessi )ee7 3 3 r 3X3amp

DATA4 E2GROUP2OPENED

essae tets

TABLES4 T1

copy SAP AG BC420 12-84

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 8588

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

at se(ecti scree

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

AT SELECTION-SCREEN

r) a7 ser st e 0i((e7 0r create sessi

IF SESSION = 3X3 AND

GROUP = SPACE OR USER = SPACE

MESSAGE E1MSamp

ENDIF

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

)e 7ataset

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

FORM OPEN2DATASET USING P2DATASET

OPEN DATASET P2DATASET IN TEXT MODE

IF S9-SUBRC

RITE4 TEXT-E S9-SUBRC

STOP

ENDIF

ENDFORM

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

c(se 7ataset

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

FORM CLOSE2DATASET USING P2DATASET

CLOSE DATASET P2DATASET

ENDFORM

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

create atc5i)t sessi

t 0r ca(( trasacti siamp

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

FORM OPEN2GROUP

IF SESSION = 3X3

SIP

RITE4 $amp 3Create r)3I1amp GROUP

SIP

)e atc5i)t r)

CALL FUNCTION 3BDC2OPEN2GROUP3

EXPORTING CLIENT = S9-MANDT

copy SAP AG BC420 12-85

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 8688

GROUP = GROUP

USER = USER

EEP = EEP

ltOLDDATE = ltOLDDATE

RITE4 amp 3BDC2OPEN2GROUP3I$amp

1$amp 3retrc7e43I+amp

S9-SUBRC

ENDIF

ENDFORM

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

e7 atc5i)t sessi

ca(( trasacti si4 errr sessiamp

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

FORM CLOSE2GROUP

IF SESSION = 3X3

c(se atc5i)t r)

CALL FUNCTION 3BDC2CLOSE2GROUP3

RITE4 amp 3BDC2CLOSE2GROUP3Iamp

1$amp 3retrc7e43I+amp

S9-SUBRC

ELSE

IF E2GROUP2OPENED = 3X3

CALL FUNCTION 3BDC2CLOSE2GROUP3

RITE4

RITE4 amp 3Fe5(era))e 6r7e eret3Iamp

ENDIF

ENDIF

ENDFORM

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

Start e6 trasacti accr7i t )araeters

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

FORM BDC2TRANSACTION USING TCODE

DATA4 L2MSTRINGamp

DATA4 L2SUBRC LIE S9-SUBRC

atc5 i)t sessi

IF SESSION = 3X3

CALL FUNCTION 3BDC2INSERT3

EXPORTING TCODE = TCODE

TABLES D9NPROTAB = BDCDATA

RITE4 3BDC2INSERT3Iamp

copy SAP AG BC420 12-86

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 8788

TCODE

3retrc7e43I+amp

S9-SUBRC

3RECORD43

S9-INDEX

ca(( trasacti si

ELSE

REFRESlt MESSTAB

CALL TRANSACTION TCODE USING BDCDATA

MODE CTUMODE

UPDATE CUPDATE

MESSAGES INTO MESSTAB

L2SUBRC = S9-SUBRC

RITE4 3CALL2TRANSACTION3

TCODE

3retrc7e43I+amp

L2SUBRC

3RECORD43

S9-INDEX

LOOP AT MESSTAB

SELECT SINGLE FROM T1 ltERE SPRSL = MESSTAB-MSGSPRA

AND ARBGB = MESSTAB-MSGID

AND MSGNR = MESSTAB-MSGNR

IF S9-SUBRC =

L2MSTRING = T1-TEXT

IF L2MSTRING CS 313

REPLACE 313 ITlt MESSTAB-MSGH1 INTO L2MSTRING

REPLACE 3$3 ITlt MESSTAB-MSGH$ INTO L2MSTRING

REPLACE 33 ITlt MESSTAB-MSGH INTO L2MSTRING

REPLACE 33 ITlt MESSTAB-MSGH INTO L2MSTRING

ELSE

REPLACE 33 ITlt MESSTAB-MSGH1 INTO L2MSTRING

REPLACE 33 ITlt MESSTAB-MSGH$ INTO L2MSTRING

REPLACE 33 ITlt MESSTAB-MSGH INTO L2MSTRING

REPLACE 33 ITlt MESSTAB-MSGH INTO L2MSTRING

ENDIF

CONDENSE L2MSTRING

RITE4 MESSTAB-MSGT9P L2MSTRING$+amp

ELSE

RITE4 MESSTAB

ENDIF

ENDLOOP

copy SAP AG BC420 12-87

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 8888

SIP

Eree 0e5(era))e

IF L2SUBRC AND E2GROUP SPACE

IF E2GROUP2OPENED = 3 3

CALL FUNCTION 3BDC2OPEN2GROUP3

EXPORTING CLIENT = S9-MANDT

GROUP = E2GROUP

USER = E2USER

EEP = E2EEP

ltOLDDATE = E2ltDATE

E2GROUP2OPENED = 3X3

ENDIF

CALL FUNCTION 3BDC2INSERT3

EXPORTING TCODE = TCODE

TABLES D9NPROTAB = BDCDATA

ENDIF

ENDIF

REFRESlt BDCDATA

ENDFORM

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

Start e6 scree

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

FORM BDC2D9NPRO USING PROGRAM D9NPRO

CLEAR BDCDATA

BDCDATA-PROGRAM = PROGRAM

BDCDATA-D9NPRO = D9NPRO

BDCDATA-D9NBEGIN = 3X3

APPEND BDCDATA

ENDFORM

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

Isert 0ie(7

Page 47: BC420_46C - 012The Transaction Recorder

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 4788

043

983209 SAP AG 1999

The Transaction Recorder

PrinciplesPrinciples

Recording )ith the LSMWRecording )ith the LSMW

Principles of atch Input and all TransactionPrinciples of atch Input and all Transaction

Integrating the TA Program into the DWIntegrating the TA Program into the DW

Using the TA Recorder Using the TA Recorder

copy SAP AG BC420 12-47

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 4888

045

983209 SAP AG 1999

Benerated Program

9unction modules DltP1ltBRUP

DltIS1RT

DltLS1ltBRUP

AAP Program

Define structure of

data in seJuential

fileDefine D

table

pen seJuential file

pen I session

Read data recordCseJuential file

9ill D table

9ill I session gtALL TRASATI

Last data record K

lose I session

lose seJuential file

The generated program has the structure dispayed aove It uses the standard function modues for

creating atch input sessions

copy SAP AG BC420 12-48

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 4988

047

983209 SAP AG 1999

Structure of the Benerated Program

Benerated part

Define D

table

pen seJuential file

pen I session

Read data record

9ill D table

9ill I session gtALL TRASATI

Last data recordK

lose I session

lose seJuential file

Include DR16

Define filestructure

P1ltDATAS1T

P1ltBRUP

DltDPR

Dlt9I1LD

DltTRASATI

LS1ltBRUP

LS1ltDATAS1T

The generated program consists of t$o parts 9 a generated part and the incude 2amp72G8 The

incude is provided in the standard system

The incude contains the definition of the reuired 2 tae and a further seven suroutines These

suroutines eecute the foo$ing functions

5pen and cose fie

5pen and cose session

Fi 2 tae

Fi session

The generated part is the main program and cas the reevant suroutines A structure is aso

generated in the generated part to read the eterna data into the fie

See the Appendi for more information on the 2amp72G8 program

copy SAP AG BC420 12-49

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 5088

020

983209 SAP AG 1999

Structure of D Table

PRBRAM DPR D1BI 9AM 9ALPRBRAMPRBRAM DPRDPR D1BID1BI 9AM9AM 9AL9AL

SAPM90ampD 0602

R90ampD=UR 600000

R90ampDU=RS 0006

R90ampD=T=D =UA

SAPM90ampD 0660

=A6AM16 Smith

=A6PSTL 87000

=A6LAD6 US

=A6SPRAS 1

SAPM90ampD 06amp0

=A6ST1B US6amp428357DDATA

PRBRAM

DPR

D1BI

9AM

9AL

EAR

UM

EAR

EAR

EAR

40

4

6

6amp

6amp

D Module pool

D Screen number

D Start of screen

D 9ield name

D 9ield contents

9ield ame T(pe Length Short Tet

AAP Dictionar(

The 2 tae has the same structure as in a standard transfer

copy SAP AG BC420 12-50

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 5188

026

983209 SAP AG 1999

Read Structure

Recording

DATA BEGIN OF record data element BUKRS bukr$amp data element KTOKD ktokd$amp data element NA(EG) name$+amp data element SORT ortl$ampEND OF record-

record

Automaticall( generated

from recording

The structure of the fie is automaticay generated and is a$ays defined $ith the name amp725amp

The generated structure a$ays has the same ayout 7ach fied is defined y t$o generated ro$s

The first ro$ is a$ays a comment ro$ containing the tet J data eement and the data eement of

the screen fied from the recording In the net ro$ the fied itsef is defined $ith the name of the

data eement foo$ed y a three9digit position numer $hich specifies the ocation in the structure

The ength of the fied is set y the ength of the data eement If a fied is not defined through a data

eement the system uses the ength of the screen fied

copy SAP AG BC420 12-51

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 5288

02amp

983209 SAP AG 1999

pening and losing the 9ile

P1ltDATAS1T

LS1ltDATAS1T

FOR( oendataet USING dataet-O)EN DATASET dataet IN TET (ODE-

IF S01SUBR2 34 - 5RITE 6 te7t1e S01SUBR2-STO)-

ENDIF-

ENDFOR(-

FOR( cloedataet USING dataet-2OSE DATASET dataet-

ENDFOR(-

Include

DR16

The suroutine 5P7N3ATAS7T opens the seuentia fie

The suroutine 2+5S73ATAS7T coses the seuentia fie

copy SAP AG BC420 12-52

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 5388

02

983209 SAP AG 1999

9unction Modules for I Program

lient

Session name

Eold date

=eep session

D user name

RecordK

LI1T

BRUP

ELDDAT1

=11P

US1R

R1RD

DltP1ltBRUPDltP1ltBRUP

Transaction code

D table

TD1

DPRTA

DltIS1RTDltIS1RT

DltLS1ltBRUPDltLS1ltBRUP

pen Isessionpen Isession

Insert data for

transactions

Insert data for

transactions

lose I

session

lose I

session

The foo$ing function modues are provided for creating atch input sessions (function group

S2)

235P7N3ltamp54P

2reates a ne$ session and contains genera data for the $hoe session

23INS7ampT

Inserts a the data for a transaction into the session The transferred interna tae $ith the

structure 2ATA must contain a the data reuired for fuy processing the transaction

232+5S73ltamp54P

2oses the session after a the data has een inserted As soon as the session has een cosed it

can e processed

The interna tae $ith the structure 2ATA can ony contain atch input data for one singe

transaction run So the individua transactions are inserted into the atch input session in a oop

using severa 23INS7ampT cas

copy SAP AG BC420 12-53

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 5488

024

983209 SAP AG 2001

9unction Module DltP1ltBRUP

ALL 9UTI DltP1ltBRUPALL 9UTI DltP1ltBRUP

1PRTIB

LI1T client

BRUP session name

ELDDAT1 loc+ date

=11P delete flag

US1R bdc user name

R1RD recording

IMPRTIB

NID internal session +e(

11PTIS

1PRTIB

LI1T client

BRUP session name

ELDDAT1 loc+ date

=11P delete flag

US1R bdc user name

R1RD recording

IMPRTIB NID internal session +e(

11PTIS

-ith the function modue 235P7N3ltamp54P you can open a atch input session

The foo$ing parameters are mandatory

2+I7NT (cient)

ltamp54P (session name)

4S7amp (user name)

Note The 4S7amp must a$ays e specified This user name is reuired for processing the session

in atch mode

The foo$ing parameters are optiona

=5+AT7 specifies the eariest date on $hich the session can e started677P fag specifies $hether session shoud e deeted after it has een successfuy processed The

677P fag is ignored if the session contains errors

677P E K K means deete the session after processing (defaut vaue) H

677P E KGK means do not deete session

amp725amp E KGK ao$s you to create a recording instead of a I session

If gtI is specified the function modue returns the interna session ey This is needed to e ae to

differentiate sessions that have the same name

-ith 7G27PTI5NS you get various return vaues that can e ueried $ith SC9S4amp2

Note In onine mode the onine user is used for the authoriDation checs regardess of the user

name specified

copy SAP AG BC420 12-54

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 5588

022

983209 SAP AG 1999

Subprogram P1ltBRUP

P1ltBRUP

FOR( oen8rou-IF e9on -

2A FUN2TION BD2O)ENGROU) E)ORTING 2IENT lt1mandt GROU) 8rou USER uer KEE) kee

=ODDATE gtolddate-

ENDIF-ENDFOR(-

Include

DR16

The suprogram 5P7N3ltamp54P opens the atch input session

copy SAP AG BC420 12-55

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 5688

028

983209 SAP AG 1999

9unction Module DltIS1RT

ALL 9UTI DltIS1RTALL 9UTI DltIS1RT

IMPRT

TD1 Transaction code

PSTltLAL Update locall(

PRITIB print list

TAL1S DPRTA bdclttable

11PTIS

IMPRT

TD1 Transaction code

PSTltLAL Update locall(

PRITIB print list

TAL1S DPRTA bdclttable

11PTIS

-ith the function modue 23INS7ampT you can add transaction data to the session

Cou need an interna 2 tae to transfer the data

The foo$ing parameters are mandatory

T257 Transaction code

CNPamp5TA 2 tae

The foo$ing parameters are optiona

P5ST3+52A+ E KGK activates oca updating This means that the data to e updated is ept in the

appication server and updated in the ast step of the transaction This does not invove the update

process (For more information see course 28 Programming ataase 4pdates)

PampINTINlt E KGK 9 ists processed in I $i e printed immediatey -ith 7G27PTI5NS you get various return vaues that can e ueried $ith SC9S4amp2

copy SAP AG BC420 12-56

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 5788

023

983209 SAP AG 1999

Subprogram DltTRASATI

DltTRASATI

FOR( BD2TRANSA2TION USING tcode-

IF e9on -2A FUN2TION BD2INSERT

E)ORTING T2ODE tcode TABES D0N)ROTAB bdcdata-

ESE-

ENDIF-ENDFOR(-

T

Include

DR16

The suprogram 23TampANSA2TI5N moves the fied 2 tae either to a atch input session

or uses ca transaction to import the data into the system 5n the seection screen you can specify

$hether you $ant to create a session or you $ant to use ca transaction to process the data directy

The S7SSI5N fied is then set according to your seection

copy SAP AG BC420 12-57

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 5888

025

983209 SAP AG 1999

9unction Module DltLS1ltBRUP

ALL 9UTI DltLS1ltBRUP

11PTIS

TltP1 6

NU1U1lt1RRR amp

-ith the function modue 232+5S73ltamp54P you can cose a atch input session

In 7G27PTI5NS you get various return vaues that can e ueried $ith SC9S4amp2

copy SAP AG BC420 12-58

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 5988

027

983209 SAP AG 1999

Subprogram LS1ltBRUP

FOR( cloe8rou-IF e9on -cloe batcgt 9nut 8rou

2A FUN2TION BD22OSEGROU)-

ESE-IF e8rouoened -

2A FUN2TION BD22OSEGROU)-

ENDIF-ENDIF-

ENDFOR(-

LS1ltBRUPlose session

lose error session

Include

DR16

The suprogram 2+5S73ltamp54P coses the atch input session The suprogram differentiates

et$een a norma I session (S7SSI5N E G) and a session opened $hen ca transaction

encountered an error (73ltamp54P35P7N7 E G)

copy SAP AG BC420 12-59

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 6088

080

983209 SAP AG 1999

Subprograms DltDPRG Dlt9I1LD

DltDPR

Dlt9I1LD

FOR( bdc9eld USING nam al-IF al 34 nodata-2EAR bdcdata- bdcdata1nam nam- bdcdata1al al- A))END bdcdata-ENDIF-

ENDFOR(-

FOR( bdcdltnro USING ro8ram dltnro- 2EAR bdcdata-Bdcdata1ro8ram ro8ram-Bdcdata1dltnro dltnro-Bdcdata1dltnbe89n - A))END bdcdata-ENDFOR(-

Include

DR16

The incude 2amp72GG contains t$o suprograms 23CNPamp5 and 23FI7+

Suprogram 23CNPamp5 fis the 2 tae $ith program names and screen numers

Suprogram 23FI7+ fis the 2 tae $ith fied names and vaues

7ach suprogram creates an entry in the 2 tae

copy SAP AG BC420 12-60

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 6188

086

983209 SAP AG 1999

9illing the D Table

erorm bdcdltnro u9n8 SA)(FD +- erorm bdc9eld u9n8 BD22URSOR RFD1BUKRS- erorm bdc9eld u9n8 BD2OK2ODE 6- erorm bdc9eld u9n8 RFD1BUKRS record1BUKRS- erorm bdc9eld u9n8 RFD1KTOKD record1KTOKD-

erorm bdcdltnro u9n8 SA)(FD -

erorm bdc9eld u9n8 BD22URSOR KNA1S)RAS- erorm bdc9eld u9n8 BD2OK2ODE 6- erorm bdc9eld u9n8 KNA1NA(E record1NA(E-

erorm bdc9eld u9n8 KNA1SORT record1SORT-

Recording Benerated automaticall(

from the recording

)ERFOR( bdcdltnro USING SA)(FD +- )ERFOR( bdc9eld USING BD22URSOR RFD1BUKRS-)ERFOR( bdc9eld USING BD2OK2ODE 6-)ERFOR( bdc9eld USING RFD1BUKRS record1BUKRS-)ERFOR( bdc9eld USING RFD1KTOKD record1KTOKD-

)ERFOR( bdcdltnro USING SA)(FD -

)ERFOR( bdc9eld USING BD22URSOR KNA1S)RAS-)ERFOR( bdc9eld USING BD2OK2ODE 6-)ERFOR( bdc9eld USING KNA1NA(E record1NA(E-

)ERFOR( bdc9eld USING KNA1SORT record1SORT- ---

The 2 tae is fied $ith data from the recording The suroutines 23CNPamp5 and

23FI7+ are used for this

The suroutines are caed in the reuired structure or seuence

copy SAP AG BC420 12-61

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 6288

08amp

983209 SAP AG 1999

erie)

SAPDatabase

SeJuential9ile

SAPDatabase

ALL TRASATIALL TRASATI

SeJuential9ile

ATE IPUTATE IPUT

D TableD TableD TableD Table

I Monitor

T

In contrast to atch input you can use ca transaction to directy pass data to the diaog interface

$ithout using a atch input session Cou use an interna tae (2 tae same structure and ayout

as atch input) to temporariy store your screen data Then you ca the desired transaction in your

program

Note 5n average the 2a Transaction method is 8 to times faster than using atch Input

copy SAP AG BC420 12-62

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 6388

08

983209 SAP AG 1999

all Transaction Program$ 1ample

RE)ORT abcbdcdcdeb9ct-

)ARA(ETERS d9mode DEFAUT A

udmode DEFAUT S-FOR( calltranact9on-2A TRANSA2TION FD

USING bdcdata (ODE d9mode

U)DATE udmode-

IF lt1ubrc NE - 5RITE 6 ---

ENDIF-ENDFOR(-

Screen

00

Screen

100

Screen

An additiona system ro area is added for the caed transaction The system uses this area for

processing the individua screens in the transactionH the data from the tae is added here After the

transaction is processed the second ro area is reeasedH the system continues processing in the first

ro area

Notes

In contrast to atch input there is no error ogging (error sessions) here For processing the caed

transaction the system uses the authoriDations of the user that caed the transaction The 2 tae

can ony hod data for one transaction run at a time efore another transaction is caed and its data

can e added you must eecute a amp7Famp7S= for the 2 tae

copy SAP AG BC420 12-63

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 6488

084

983209 SAP AG 1999

ALL TRASATI C6

RE)ORT 777-

2A TRANSA2TION FD USING bdcdata (ODE E-

Default for MD1 is A

2A TRANSA2TION 3tranact9oncode4 USING 3bdc1table4 C (ODE A E N C-

-ith the parameter 57 you can seect a specific dispay mode for processing the transaction The

foo$ing three modes are avaiae

A (ispay a)

If you eecute the program a the screens and a their data are dispayed This is the defaut vaue

for the 57 in 2A++ TampANSA2TI5N

N (ispay nothing)

The screens are not dispayed at a regardess of $hether any of them contained errors As soon as

the transaction has een fuy processed contro is returned to your program (The vaue of the

parameter 4PAT7 determines $hether dataase updates are eecuted or not)

7 (ispay errors ony)As soon as an error occurs in a screen the transaction is s$itched to dispay mode so that you can

correct the errors

These dispay modes are the same as those in the atch input session processing

copy SAP AG BC420 12-64

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 6588

082

983209 SAP AG 1999

RE)ORT 777-

2A TRANSA2TION FD USING BD2DATA U)DATE -

ALL TRASATI Camp

RE)ORT 777-

2A TRANSA2TION FD USING bdcdata U)DATE -

2A TRANSA2TION 3tranact9oncode4 USING 3bdc1table4 C (ODE A E N C U)DATE A S C -

Default for UPDAT1 is A

-ith the parameter 4PAT7 you can contro ho$ dataase updates arising from a transaction are

carried out There are three options

A (asynchronous updating) The caed transaction does not $ait unti the dataase has een

updated it simpy for$ard the updates to the SAP update service This usuay speeds up the 2T

program This processing mode is N5T recommended for arge data sets as the caed transaction

does not receive a competion message from the update modue

The caing 2T program therefore cannot te if the transaction has een successfuy competed Cou

shoud use the updating administration function (transaction S8) to determine $hether updating

$as terminated eary The error anaysis correction functions for are ess hepfu than $ith

synchronous updating

S (synchronous updating) -ith synchronous updating the caed transaction $aits unti a the

updates have een competed So processing is so$er than $ith synchronous updating The caed

transaction can ho$ever report any updating errors to the program $hich maes error

anaysiscorrection easier

+ (local updating) $ith oca updating the dataase is not updated in a separate process it is

updated in the caers process (see appication hep documentation for the AAP ey$ord S7T

4PAT7 TAS6 +52A+)

copy SAP AG BC420 12-65

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 6688

088

983209 SAP AG 1999

ALL TRASATI C

RE)ORT 777-DATA mtab T0)E TABE OF bdcm8coll-

2A TRANSA2TION FD USING bdcdata (ESSAGES INTO mtab-

2A TRANSA2TION 3tranact9oncode4 USING 3bdc1table4 C (ODE A E N C U)DATE A S C (ESSAGES INTO 3metab4 C -

7SSAlt7S specifies that a system messages that are output during the eecution of a 2A++

TampANSA2TI5N are $ritten to the interna tae L7SSTA The interna tae must have the

structure 2Slt25++

4nie the cassica atch input processing $ith sessions 2A++ TampANSA2TI5N does not offer any

specia processing procedures for transactions containing errors There are no restart functions for

transactions that contain errors or that cause updating terminations

copy SAP AG BC420 12-66

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 6788

083

983209 SAP AG 1999

ALL TRASATI C4

RE)ORT 777-DATA mltot T0)E ctuaram-

2A TRANSA2TION FD USING BD2DATA

O)TIONS FRO( mltot-

2A TRANSA2TION 3tranact9oncode4 USING 3bdc1table4 C (ODE A E N C U)DATE A S C (ESSAGES INTO 3metab4 C O)TIONS FRO( ot C -

RE)ORT 777-DATA mltot T0)E ctuaram-2A TRANSA2TION FD USING bdcdata

O)TIONS FRO( mltot-

The addition 5PTI5NS enaes the ca transaction statement to e controed through a structure

The structure must have the dictionary type 2T43PAampAS

The addition 5PTI5NS Famp5 must not e comined either $ith the addition 57 or $ith

4PAT7 ore information on the net side

copy SAP AG BC420 12-67

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 6888

085

983209 SAP AG 1999

Structure TUltPARAMS

DISMD1 Procen mode anaoo o addon amp

UPDMD1 $pdae mode anaoo o addon $PA

ATTMD1 CA mode CA conro

D19SI1 orce de=a EndoE e drn procen

RAMMIT +o eD a Camp amp(

IPT +o a ac np eonF a F S-B+P SPAC

I1D +o a ac np eon a=er end o= BC daa

The components are defined as foo$s

The components 7FSIM7 ampA25IT N5INPT and N5I7N can have the foo$ing

vaues KGK E Ces or K K E No

If the addition 5PTI5NS Famp5 is not specified the foo$ing settings appy to the contro

parameters

IS57 from addition 57

4P57 from addition 4PAT7

2ATT57 2ATT not active

7FSIM7 o not not use defaut $indo$s siDe

ampA25IT Successfu eit at 25IT -5amp6

N5INPT atch input session active (SC9INPT E G)

N5I7N atch input session sti active after end of 2 data

copy SAP AG BC420 12-68

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 6988

087

983209 SAP AG 1999

SMSBID Message ID

SMSBT Message T(pe C1GIGWGSGA

SMSB Message umber

SMSB6 Message ariable 6

SMSBamp Message ariable amp

SMSB Message ariable

SMSB4 Message ariable 4

SMSBID Message ID

SMSBT Message T(pe C1GIGWGSGA

SMSB Message umber

SMSB6 Message ariable 6

SMSBamp Message ariable amp

SMSB Message ariable

SMSB4 Message ariable 4

Return code$

S(stem fields$

alue Meaning

0 Successful

6000 1rror in transaction

6000 1rror in processing call transaction

see also the s(stem fields specified

alue Meaning

0 Successful

6000 1rror in transaction

6000 1rror in processing call transaction

see also the s(stem fields specified

9ield name Meaning9ield name9ield name MeaningMeaning

Return ode and S(stem 9ields

The return code is used to specify $hether the caed transaction $as processed successfuy In

addition severa system fieds are fied The numer I type and variaes of the diaog message

output y the caed transaction Cou need this information to output the message tet

copy SAP AG BC420 12-69

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 7088

030

983209 SAP AG 1999

Benerated Program of the TA Recorder

REFRES= (ESSTAB-

2A TRANSA2TION tcode USING bdcdata (ODE ctumode U)DATE cudate (ESSAGES INTO metab-OO) AT metab- ENDOO)-IF lubrc 34 AND e8rou 34 S)A2E- IF e8rouoenend - 2A FUN2TION BD2O)ENGROU) E)ORTING ---------

--------- E8rouoened - ENDIF- 2A FUN2TION BD2INSERT E)ORTING T2ODE tcode TABES D0N)ROTAB bdcdata-ENDIF-REFRES= bdcdata-

Message table output

pen error session

Insert data record that

has errors into error

session

If you have seected ca transaction on the seection screen the generated program runs as foo$s

The onine transaction is caed $ith ca transaction and passed to tae 2ATA A the

messages arising during the ca transaction are put in the interna tae 7SSTA

7SSTA is output as a ist

If you have specified an error session ( 73ltamp54P L SPA27) on the seection screen and the

ca transaction comes across an error (+3S4amp2 L 0) the error session is opened The error

session is ho$ever ony opened once Then the data record is paced in the session

A the other data records that have errors $ith ca transaction are paced in the same session

copy SAP AG BC420 12-70

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 7188

036

983209 SAP AG 1999

The Transaction Recorder

PrinciplesPrinciples

Recording )ith the LSMWRecording )ith the LSMW

Principles of atch Input and all TransactionPrinciples of atch Input and all Transaction

Integrating the TA Program into the DWIntegrating the TA Program into the DW

Using the TA Recorder Using the TA Recorder

copy SAP AG BC420 12-71

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 7288

03amp

983209 SAP AG 1999

Integrating into the DW

Transfer program

AAP Dictionar(

Integrate

SDA0

SDA6

SDAamp

SDA

Cou can integrate the generated program into the G9- The structure of the fie must e created

in the AAP ictionary The taes SGA0 SGA8 SGA1 and SGA $i e fied

copy SAP AG BC420 12-72

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 7388

03

983209 SAP AG 1999

DW Release 42

Goo

-B eeae 45

aa ran=er ogtec

Int customer data transfer ob-ect

ecord =ed

Dece daa ran=er

d Goo

The ampunction ampor interatin TA recorder prora$s is

i$ple$ented in the

D+-B in Release

The recorder can e integrated as of ampeease and it is provided in the G9- ampeease

ltot to the G9- ampeease 5n the initia screen you can integrate programs y choosing ampoto

( +nt customer ata transfer o-ect

copy SAP AG BC420 12-73

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 7488

034

983209 SAP AG 1999

reating Program as D b-ect

Comer ran=er ogtec

ampgtec ype

Sor eD =or ogtec

aa ran=er proram

Srcre name

9900

(+A1

Cane comer

ZBCA+G

ZB

ustomer transfer ob-ect

umber bet)een 7000 and 7777

b-ect t(pe

Assignment to R ob-ect

Short tet for D ob-ectShort description

Data transfer program

ame of generated program

Structure name

A structure Cstructure la(out )ith this name is created in

the AAP Dictionar(

For ampeease transfer oects $ere not organiDed y 5amp oects ut y a G numer (00089

OOOO) The numer range O0009OOOO is reserved for customers

To create a connection to the ne$ G 9- you must assign the program to a 5amp oect

2reate a short tet for the G oect This tet $i appear in the method seection ist

Specify the program to e incuded

Specify a name for the structure to e created in the AAP ictionary

Note $he generated program appears under program type +N and not under program type

-

copy SAP AG BC420 12-74

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 7588

032

983209 SAP AG 1999

Adantages

Automatic program registration in the DW in

Release 48

ou can use all the functions defined for

standard ob-ects

1ception$ The (reate ampile ith data

function

If you incuded the oect in the ampeease $orench it is automaticay avaiae in the ampeease

B $orench

A the $orench functions are avaiae for your oect ecept for Create files ith transfer ata

copy SAP AG BC420 12-75

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 7688

038

983209 SAP AG 1999

ou are no) able to$

The Transaction Recorder$ Unit Summar(

Use the recording function in the LSMW to create

a batch input session )ith the data from the

eternal s(stem

Use the TA Recorder to create (our o)n data

transfer program

Anal(e programs that )or+ )ith batch input or

call transaction

Integrate the TA Recorder programs into the

DW

copy SAP AG BC420 12-76

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 7788

ercise 1

nit $ -ecorder

$opic 2reating etors

$ransaction -ecorder ercise 1

bull 2reating detors $ith eterna numer assignment

bull etor numers M9980008 to M9980080

Address data for detors $ith eterna numer assignment is to

e transferred using program ampFI700

ro4ect F5

Supro4ect +5

-un +575

$as)s 85 95 8S25

9oad program -F+00

8 In the foo$ing eercises eisting data is to e changed Therefore these detors $ith

eterna numer assignment have to first e created

898 4nder suproect 79 create run 797G9 $ith the name Detors ith

eternal numers

copy SAP AG BC420 12-77

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 7888

891 2reate the foo$ing three tass The tass map the foo$ing process steps

convert data create + session and process + session

89198 In run 797G9 create the foo$ing tas

9 Tas AP9

9 Name 2onvert data 9 Tas type AP

9 Program type +S-

Seect the foo$ing +S- oect

+S- proect 2109

+S- suproect 7I9

+S- oect I997GT

89191 In run 797G9 create the foo$ing tas 9 Tas +5A9

9 Name 2reate I session

Tas type +5A

9 Program type INP

Seect program ampFI700 $ith the variant

I97G9

8919 In run 797G9 create the foo$ing tas

9 Tas S29

9 Name Process I session Tas type S2

9 Program type amp7P5

Seect program ampS2S4 $ith the variant

S497G9

Note that you have to correct the seuence of the tass 2onvert data

create + session and process + session

4se the uttons

89 Start the run

The detors $i e created $ith eterna numer assignments

89 2hec in transaction F0 that the detors M9980008 to M9980080 have een

created

copy SAP AG BC420 12-78

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 7988

ercise

nit $ransaction -ecorder

$opic -ecording function in the 9S8(

bull 2reate a recording using the +S-

bull ltenerate a atch input session

2hange the detor address data in the amp System

Name of the recording +

Name of the file +2055+F9

8 2reate the recording 7I3 using the +S- ampecord the transaction F01 (2hange

detor)

898 efore you create the recording first test the transaction onineQ

For the recording use detor M9980008 5n the initia screen of the F01

maintain the foo$ing fieds ony

etor etor M9980008

2ompany code 0008

Address data seect

Note $he data record must e saved hile recording

891 aintain the names and the descriptions for the foo$ing fieds

Name city street posta code and teephone numereete a other fieds in screen 880 from the recording (eg S5ampT+ +AN8

SPampAS)

4se the same technica names as sho$n in the tae eo$ (automatic fied

mapping)

copy SAP AG BC420 12-79

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 8088

1 2reate the suproect 7I9 and the ne$ oect TA3 in your proect 2109

aintain the oect attriutes and seect the item atch input recording Seect your

recording 7I3

2reate the source structure address

2reate the source fieds according to the tae eo$ 5r copy them from proect 2109S37N suproect 7I900 oect TA900

198 Fie setup The data from the egacy system are dispayed in the foo$ing tae

Fied name Fied type Fied ength escription

N5 2 8B etor numer

NA7 2 Name

STamp77T 2 Street

2ITC 2 2ityPace of residence

MIP 2 80 Posta code

T7+ 2 8B Teephone numer

191 aintain the fied mapping 4se the automatic fied mapping (via menu item

7tras)

19 Specify the fies 5ny maintain the fie name of the source fie

Name of the fie 21099IFI+7

2odepage 8800

19 Import the data and convert them ispay the data in each caseQ

19 2reate a atch input session

19B ampun the atch input session

copy SAP AG BC420 12-80

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 8188

ercise 3

nit $ransaction -ecorder

$opic -ecording ith the $ -ecorder

bull ltenerate a recording using the TA recorder

bull Test the recording

2hange the address data of detors in the amp system

Name recording $+

Name of the file +2055+F9

8 2reate the recording TA37I3 using the transaction recorder ampecord the

transaction F01 (change detor)

898 4se detor M9980008 for the recording 5n the F01 initia screen ony

maintain the foo$ing fieds

etor etor M9980008

2ompany 2ode 0008

Address data seect

Note $he data record must e saved hen recording

eete a fieds that do not eist in the source fie 21099IFI+7 from screen

880 in the recording (eg 6NA89S5ampT+ 6NA89+AN8 6ANNQ9SPampAS) Note o not deete fieds ampF01946ampS and ampF0190880

Save the recording no$

1 S$itch to the recordings overvie$

198 Process the recording $ith the processing mode A (dispay a)

191 Process the recording $ith the processing mode RN (no dispay)

19 If the recording has een tested and no error has occurred generate a I session

and run it using the I monitor If an error shoud occur generate the recordingagainQ

copy SAP AG BC420 12-81

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 8288

From the recording generate the program M21037I3 in your deveopment cass

2109 Seect the foo$ing

bull ampead fied contents from fie

bull 2reate test data in the fie 2103dei3test3tt

98 Save this program and eecute it ltenerate one I session each and process it

2arry out the same steps again using the ca transaction

The generated program shoud no$ e changed so that fie 21099IFI+7 can e

read and processed

98 2hange the defaut vaue of the fie name (parameter dataset) in 21099

IFI+7

91 2hange the structure definition eete the company code fied and the address

data checo from the structure

9 2hange the su9routine ca perform dc3fied for the company code (KampF019

46ampSK) so that the vaue 0008 is transferred

9 2hange the su9routine ca perform dc3fied for the address data checo

(KampF0190880K) so that the vaue G is transferred

9 Start the program again and read the data from the fie 21099IFI+7 $ith

detor data ltenerate a I session $ith it and run it

copy SAP AG BC420 12-82

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 8388

033 Include DR16INCLUDE BDCRECX1

SELECTION-SCREEN BEGIN OF LINE

PARAMETERS SESSION RADIOBUTTON GROUP CTU create sessi SELECTION-SCREEN COMMENT $amp TEXT-S FOR FIELD SESSION

se(ecti-scree )siti +

PARAMETERS CTU RADIOBUTTON GROUP CTU ca(( trasacti

SELECTION-SCREEN COMMENT $amp TEXT-S FOR FIELD CTU

SELECTION-SCREEN END OF LINE

SELECTION-SCREEN BEGIN OF LINE

SELECTION-SCREEN COMMENT $amp TEXT-S1 FOR FIELD GROUP

se(ecti-scree )siti $+

PARAMETERS GROUP1$amp r) ae 0 sessi

SELECTION-SCREEN COMMENT $amp TEXT-S+ FOR FIELD CTUMODE

se(ecti-scree )siti

PARAMETERS CTUMODE LIE CTU2PARAMS-DISMODE DEFAULT 3N3

A4 s56 a(( 78)rs

E4 s56 78)r errr (8

N4 7 t 7is)(a8 78)r

SELECTION-SCREEN END OF LINE

SELECTION-SCREEN BEGIN OF LINE

SELECTION-SCREEN COMMENT $amp TEXT-S$ FOR FIELD USER

se(ecti-scree )siti $+

PARAMETERS4 USER1$amp DEFAULT S9-UNAME ser 0r sessi i atc5

SELECTION-SCREEN COMMENT $amp TEXT-S FOR FIELD CUPDATE

se(ecti-scree )siti

PARAMETERS CUPDATE LIE CTU2PARAMS-UPDMODE DEFAULT 3L3

S4 s8c5rs(8

A4 as8c5rs(8

L4 (ca(

SELECTION-SCREEN END OF LINE

SELECTION-SCREEN BEGIN OF LINE

SELECTION-SCREEN COMMENT $amp TEXT-S FOR FIELD EEP

se(ecti-scree )siti $+

PARAMETERS4 EEP AS CltECBOX 3 3 = 7e(ete sessi i0 0iis5e7

3X3 = gtee) sessi i0 0iis5e7

SELECTION-SCREEN COMMENT $amp TEXT-S FOR FIELD E2GROUP

copy SAP AG BC420 12-83

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 8488

se(ecti-scree )siti

)araeters E2GROUP1$amp r) ae 0 errr-sessi

SELECTION-SCREEN END OF LINE

SELECTION-SCREEN BEGIN OF LINE

SELECTION-SCREEN COMMENT $amp TEXT-S FOR FIELD ltOLDDATE

se(ecti-scree )siti $+

PARAMETERS4 ltOLDDATE LIE S9-DATUM

SELECTION-SCREEN COMMENT +11amp TEXT-S$ FOR FIELD E2USER

se(ecti-scree )siti

PARAMETERS4 E2USER1$amp DEFAULT S9-UNAME ser 0r errr-sessi

SELECTION-SCREEN END OF LINE

SELECTION-SCREEN BEGIN OF LINE

SELECTION-SCREEN COMMENT +11amp TEXT-S FOR FIELD E2EEP

se(ecti-scree )siti

PARAMETERS4 E2EEP AS CltECBOX 3 3 = 7e(ete sessi i0 0iis5e7

3X3 = gtee) sessi i0 0iis5e7

SELECTION-SCREEN END OF LINE

SELECTION-SCREEN BEGIN OF LINE

SELECTION-SCREEN COMMENT +11amp TEXT-S FOR FIELD E2ltDATE

se(ecti-scree )siti

PARAMETERS4 E2ltDATE LIE S9-DATUM

SELECTION-SCREEN END OF LINE

SELECTION-SCREEN SIP

SELECTION-SCREEN BEGIN OF LINE

SELECTION-SCREEN COMMENT 1amp TEXT-S1 FOR FIELD NODATA

PARAMETERS4 NODATA DEFAULT 33 LOER CASE 7ata

SELECTION-SCREEN END OF LINE

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

Batc5i)t7ata 0 si(e trasacti

DATA4 BDCDATA LIE BDCDATA OCCURS ITlt ltEADER LINE

essaes 0 ca(( trasacti

DATA4 MESSTAB LIE BDCMSGCOLL OCCURS ITlt ltEADER LINE

errr sessi )ee7 3 3 r 3X3amp

DATA4 E2GROUP2OPENED

essae tets

TABLES4 T1

copy SAP AG BC420 12-84

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 8588

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

at se(ecti scree

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

AT SELECTION-SCREEN

r) a7 ser st e 0i((e7 0r create sessi

IF SESSION = 3X3 AND

GROUP = SPACE OR USER = SPACE

MESSAGE E1MSamp

ENDIF

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

)e 7ataset

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

FORM OPEN2DATASET USING P2DATASET

OPEN DATASET P2DATASET IN TEXT MODE

IF S9-SUBRC

RITE4 TEXT-E S9-SUBRC

STOP

ENDIF

ENDFORM

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

c(se 7ataset

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

FORM CLOSE2DATASET USING P2DATASET

CLOSE DATASET P2DATASET

ENDFORM

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

create atc5i)t sessi

t 0r ca(( trasacti siamp

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

FORM OPEN2GROUP

IF SESSION = 3X3

SIP

RITE4 $amp 3Create r)3I1amp GROUP

SIP

)e atc5i)t r)

CALL FUNCTION 3BDC2OPEN2GROUP3

EXPORTING CLIENT = S9-MANDT

copy SAP AG BC420 12-85

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 8688

GROUP = GROUP

USER = USER

EEP = EEP

ltOLDDATE = ltOLDDATE

RITE4 amp 3BDC2OPEN2GROUP3I$amp

1$amp 3retrc7e43I+amp

S9-SUBRC

ENDIF

ENDFORM

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

e7 atc5i)t sessi

ca(( trasacti si4 errr sessiamp

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

FORM CLOSE2GROUP

IF SESSION = 3X3

c(se atc5i)t r)

CALL FUNCTION 3BDC2CLOSE2GROUP3

RITE4 amp 3BDC2CLOSE2GROUP3Iamp

1$amp 3retrc7e43I+amp

S9-SUBRC

ELSE

IF E2GROUP2OPENED = 3X3

CALL FUNCTION 3BDC2CLOSE2GROUP3

RITE4

RITE4 amp 3Fe5(era))e 6r7e eret3Iamp

ENDIF

ENDIF

ENDFORM

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

Start e6 trasacti accr7i t )araeters

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

FORM BDC2TRANSACTION USING TCODE

DATA4 L2MSTRINGamp

DATA4 L2SUBRC LIE S9-SUBRC

atc5 i)t sessi

IF SESSION = 3X3

CALL FUNCTION 3BDC2INSERT3

EXPORTING TCODE = TCODE

TABLES D9NPROTAB = BDCDATA

RITE4 3BDC2INSERT3Iamp

copy SAP AG BC420 12-86

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 8788

TCODE

3retrc7e43I+amp

S9-SUBRC

3RECORD43

S9-INDEX

ca(( trasacti si

ELSE

REFRESlt MESSTAB

CALL TRANSACTION TCODE USING BDCDATA

MODE CTUMODE

UPDATE CUPDATE

MESSAGES INTO MESSTAB

L2SUBRC = S9-SUBRC

RITE4 3CALL2TRANSACTION3

TCODE

3retrc7e43I+amp

L2SUBRC

3RECORD43

S9-INDEX

LOOP AT MESSTAB

SELECT SINGLE FROM T1 ltERE SPRSL = MESSTAB-MSGSPRA

AND ARBGB = MESSTAB-MSGID

AND MSGNR = MESSTAB-MSGNR

IF S9-SUBRC =

L2MSTRING = T1-TEXT

IF L2MSTRING CS 313

REPLACE 313 ITlt MESSTAB-MSGH1 INTO L2MSTRING

REPLACE 3$3 ITlt MESSTAB-MSGH$ INTO L2MSTRING

REPLACE 33 ITlt MESSTAB-MSGH INTO L2MSTRING

REPLACE 33 ITlt MESSTAB-MSGH INTO L2MSTRING

ELSE

REPLACE 33 ITlt MESSTAB-MSGH1 INTO L2MSTRING

REPLACE 33 ITlt MESSTAB-MSGH$ INTO L2MSTRING

REPLACE 33 ITlt MESSTAB-MSGH INTO L2MSTRING

REPLACE 33 ITlt MESSTAB-MSGH INTO L2MSTRING

ENDIF

CONDENSE L2MSTRING

RITE4 MESSTAB-MSGT9P L2MSTRING$+amp

ELSE

RITE4 MESSTAB

ENDIF

ENDLOOP

copy SAP AG BC420 12-87

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 8888

SIP

Eree 0e5(era))e

IF L2SUBRC AND E2GROUP SPACE

IF E2GROUP2OPENED = 3 3

CALL FUNCTION 3BDC2OPEN2GROUP3

EXPORTING CLIENT = S9-MANDT

GROUP = E2GROUP

USER = E2USER

EEP = E2EEP

ltOLDDATE = E2ltDATE

E2GROUP2OPENED = 3X3

ENDIF

CALL FUNCTION 3BDC2INSERT3

EXPORTING TCODE = TCODE

TABLES D9NPROTAB = BDCDATA

ENDIF

ENDIF

REFRESlt BDCDATA

ENDFORM

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

Start e6 scree

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

FORM BDC2D9NPRO USING PROGRAM D9NPRO

CLEAR BDCDATA

BDCDATA-PROGRAM = PROGRAM

BDCDATA-D9NPRO = D9NPRO

BDCDATA-D9NBEGIN = 3X3

APPEND BDCDATA

ENDFORM

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

Isert 0ie(7

Page 48: BC420_46C - 012The Transaction Recorder

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 4888

045

983209 SAP AG 1999

Benerated Program

9unction modules DltP1ltBRUP

DltIS1RT

DltLS1ltBRUP

AAP Program

Define structure of

data in seJuential

fileDefine D

table

pen seJuential file

pen I session

Read data recordCseJuential file

9ill D table

9ill I session gtALL TRASATI

Last data record K

lose I session

lose seJuential file

The generated program has the structure dispayed aove It uses the standard function modues for

creating atch input sessions

copy SAP AG BC420 12-48

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 4988

047

983209 SAP AG 1999

Structure of the Benerated Program

Benerated part

Define D

table

pen seJuential file

pen I session

Read data record

9ill D table

9ill I session gtALL TRASATI

Last data recordK

lose I session

lose seJuential file

Include DR16

Define filestructure

P1ltDATAS1T

P1ltBRUP

DltDPR

Dlt9I1LD

DltTRASATI

LS1ltBRUP

LS1ltDATAS1T

The generated program consists of t$o parts 9 a generated part and the incude 2amp72G8 The

incude is provided in the standard system

The incude contains the definition of the reuired 2 tae and a further seven suroutines These

suroutines eecute the foo$ing functions

5pen and cose fie

5pen and cose session

Fi 2 tae

Fi session

The generated part is the main program and cas the reevant suroutines A structure is aso

generated in the generated part to read the eterna data into the fie

See the Appendi for more information on the 2amp72G8 program

copy SAP AG BC420 12-49

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 5088

020

983209 SAP AG 1999

Structure of D Table

PRBRAM DPR D1BI 9AM 9ALPRBRAMPRBRAM DPRDPR D1BID1BI 9AM9AM 9AL9AL

SAPM90ampD 0602

R90ampD=UR 600000

R90ampDU=RS 0006

R90ampD=T=D =UA

SAPM90ampD 0660

=A6AM16 Smith

=A6PSTL 87000

=A6LAD6 US

=A6SPRAS 1

SAPM90ampD 06amp0

=A6ST1B US6amp428357DDATA

PRBRAM

DPR

D1BI

9AM

9AL

EAR

UM

EAR

EAR

EAR

40

4

6

6amp

6amp

D Module pool

D Screen number

D Start of screen

D 9ield name

D 9ield contents

9ield ame T(pe Length Short Tet

AAP Dictionar(

The 2 tae has the same structure as in a standard transfer

copy SAP AG BC420 12-50

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 5188

026

983209 SAP AG 1999

Read Structure

Recording

DATA BEGIN OF record data element BUKRS bukr$amp data element KTOKD ktokd$amp data element NA(EG) name$+amp data element SORT ortl$ampEND OF record-

record

Automaticall( generated

from recording

The structure of the fie is automaticay generated and is a$ays defined $ith the name amp725amp

The generated structure a$ays has the same ayout 7ach fied is defined y t$o generated ro$s

The first ro$ is a$ays a comment ro$ containing the tet J data eement and the data eement of

the screen fied from the recording In the net ro$ the fied itsef is defined $ith the name of the

data eement foo$ed y a three9digit position numer $hich specifies the ocation in the structure

The ength of the fied is set y the ength of the data eement If a fied is not defined through a data

eement the system uses the ength of the screen fied

copy SAP AG BC420 12-51

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 5288

02amp

983209 SAP AG 1999

pening and losing the 9ile

P1ltDATAS1T

LS1ltDATAS1T

FOR( oendataet USING dataet-O)EN DATASET dataet IN TET (ODE-

IF S01SUBR2 34 - 5RITE 6 te7t1e S01SUBR2-STO)-

ENDIF-

ENDFOR(-

FOR( cloedataet USING dataet-2OSE DATASET dataet-

ENDFOR(-

Include

DR16

The suroutine 5P7N3ATAS7T opens the seuentia fie

The suroutine 2+5S73ATAS7T coses the seuentia fie

copy SAP AG BC420 12-52

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 5388

02

983209 SAP AG 1999

9unction Modules for I Program

lient

Session name

Eold date

=eep session

D user name

RecordK

LI1T

BRUP

ELDDAT1

=11P

US1R

R1RD

DltP1ltBRUPDltP1ltBRUP

Transaction code

D table

TD1

DPRTA

DltIS1RTDltIS1RT

DltLS1ltBRUPDltLS1ltBRUP

pen Isessionpen Isession

Insert data for

transactions

Insert data for

transactions

lose I

session

lose I

session

The foo$ing function modues are provided for creating atch input sessions (function group

S2)

235P7N3ltamp54P

2reates a ne$ session and contains genera data for the $hoe session

23INS7ampT

Inserts a the data for a transaction into the session The transferred interna tae $ith the

structure 2ATA must contain a the data reuired for fuy processing the transaction

232+5S73ltamp54P

2oses the session after a the data has een inserted As soon as the session has een cosed it

can e processed

The interna tae $ith the structure 2ATA can ony contain atch input data for one singe

transaction run So the individua transactions are inserted into the atch input session in a oop

using severa 23INS7ampT cas

copy SAP AG BC420 12-53

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 5488

024

983209 SAP AG 2001

9unction Module DltP1ltBRUP

ALL 9UTI DltP1ltBRUPALL 9UTI DltP1ltBRUP

1PRTIB

LI1T client

BRUP session name

ELDDAT1 loc+ date

=11P delete flag

US1R bdc user name

R1RD recording

IMPRTIB

NID internal session +e(

11PTIS

1PRTIB

LI1T client

BRUP session name

ELDDAT1 loc+ date

=11P delete flag

US1R bdc user name

R1RD recording

IMPRTIB NID internal session +e(

11PTIS

-ith the function modue 235P7N3ltamp54P you can open a atch input session

The foo$ing parameters are mandatory

2+I7NT (cient)

ltamp54P (session name)

4S7amp (user name)

Note The 4S7amp must a$ays e specified This user name is reuired for processing the session

in atch mode

The foo$ing parameters are optiona

=5+AT7 specifies the eariest date on $hich the session can e started677P fag specifies $hether session shoud e deeted after it has een successfuy processed The

677P fag is ignored if the session contains errors

677P E K K means deete the session after processing (defaut vaue) H

677P E KGK means do not deete session

amp725amp E KGK ao$s you to create a recording instead of a I session

If gtI is specified the function modue returns the interna session ey This is needed to e ae to

differentiate sessions that have the same name

-ith 7G27PTI5NS you get various return vaues that can e ueried $ith SC9S4amp2

Note In onine mode the onine user is used for the authoriDation checs regardess of the user

name specified

copy SAP AG BC420 12-54

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 5588

022

983209 SAP AG 1999

Subprogram P1ltBRUP

P1ltBRUP

FOR( oen8rou-IF e9on -

2A FUN2TION BD2O)ENGROU) E)ORTING 2IENT lt1mandt GROU) 8rou USER uer KEE) kee

=ODDATE gtolddate-

ENDIF-ENDFOR(-

Include

DR16

The suprogram 5P7N3ltamp54P opens the atch input session

copy SAP AG BC420 12-55

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 5688

028

983209 SAP AG 1999

9unction Module DltIS1RT

ALL 9UTI DltIS1RTALL 9UTI DltIS1RT

IMPRT

TD1 Transaction code

PSTltLAL Update locall(

PRITIB print list

TAL1S DPRTA bdclttable

11PTIS

IMPRT

TD1 Transaction code

PSTltLAL Update locall(

PRITIB print list

TAL1S DPRTA bdclttable

11PTIS

-ith the function modue 23INS7ampT you can add transaction data to the session

Cou need an interna 2 tae to transfer the data

The foo$ing parameters are mandatory

T257 Transaction code

CNPamp5TA 2 tae

The foo$ing parameters are optiona

P5ST3+52A+ E KGK activates oca updating This means that the data to e updated is ept in the

appication server and updated in the ast step of the transaction This does not invove the update

process (For more information see course 28 Programming ataase 4pdates)

PampINTINlt E KGK 9 ists processed in I $i e printed immediatey -ith 7G27PTI5NS you get various return vaues that can e ueried $ith SC9S4amp2

copy SAP AG BC420 12-56

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 5788

023

983209 SAP AG 1999

Subprogram DltTRASATI

DltTRASATI

FOR( BD2TRANSA2TION USING tcode-

IF e9on -2A FUN2TION BD2INSERT

E)ORTING T2ODE tcode TABES D0N)ROTAB bdcdata-

ESE-

ENDIF-ENDFOR(-

T

Include

DR16

The suprogram 23TampANSA2TI5N moves the fied 2 tae either to a atch input session

or uses ca transaction to import the data into the system 5n the seection screen you can specify

$hether you $ant to create a session or you $ant to use ca transaction to process the data directy

The S7SSI5N fied is then set according to your seection

copy SAP AG BC420 12-57

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 5888

025

983209 SAP AG 1999

9unction Module DltLS1ltBRUP

ALL 9UTI DltLS1ltBRUP

11PTIS

TltP1 6

NU1U1lt1RRR amp

-ith the function modue 232+5S73ltamp54P you can cose a atch input session

In 7G27PTI5NS you get various return vaues that can e ueried $ith SC9S4amp2

copy SAP AG BC420 12-58

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 5988

027

983209 SAP AG 1999

Subprogram LS1ltBRUP

FOR( cloe8rou-IF e9on -cloe batcgt 9nut 8rou

2A FUN2TION BD22OSEGROU)-

ESE-IF e8rouoened -

2A FUN2TION BD22OSEGROU)-

ENDIF-ENDIF-

ENDFOR(-

LS1ltBRUPlose session

lose error session

Include

DR16

The suprogram 2+5S73ltamp54P coses the atch input session The suprogram differentiates

et$een a norma I session (S7SSI5N E G) and a session opened $hen ca transaction

encountered an error (73ltamp54P35P7N7 E G)

copy SAP AG BC420 12-59

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 6088

080

983209 SAP AG 1999

Subprograms DltDPRG Dlt9I1LD

DltDPR

Dlt9I1LD

FOR( bdc9eld USING nam al-IF al 34 nodata-2EAR bdcdata- bdcdata1nam nam- bdcdata1al al- A))END bdcdata-ENDIF-

ENDFOR(-

FOR( bdcdltnro USING ro8ram dltnro- 2EAR bdcdata-Bdcdata1ro8ram ro8ram-Bdcdata1dltnro dltnro-Bdcdata1dltnbe89n - A))END bdcdata-ENDFOR(-

Include

DR16

The incude 2amp72GG contains t$o suprograms 23CNPamp5 and 23FI7+

Suprogram 23CNPamp5 fis the 2 tae $ith program names and screen numers

Suprogram 23FI7+ fis the 2 tae $ith fied names and vaues

7ach suprogram creates an entry in the 2 tae

copy SAP AG BC420 12-60

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 6188

086

983209 SAP AG 1999

9illing the D Table

erorm bdcdltnro u9n8 SA)(FD +- erorm bdc9eld u9n8 BD22URSOR RFD1BUKRS- erorm bdc9eld u9n8 BD2OK2ODE 6- erorm bdc9eld u9n8 RFD1BUKRS record1BUKRS- erorm bdc9eld u9n8 RFD1KTOKD record1KTOKD-

erorm bdcdltnro u9n8 SA)(FD -

erorm bdc9eld u9n8 BD22URSOR KNA1S)RAS- erorm bdc9eld u9n8 BD2OK2ODE 6- erorm bdc9eld u9n8 KNA1NA(E record1NA(E-

erorm bdc9eld u9n8 KNA1SORT record1SORT-

Recording Benerated automaticall(

from the recording

)ERFOR( bdcdltnro USING SA)(FD +- )ERFOR( bdc9eld USING BD22URSOR RFD1BUKRS-)ERFOR( bdc9eld USING BD2OK2ODE 6-)ERFOR( bdc9eld USING RFD1BUKRS record1BUKRS-)ERFOR( bdc9eld USING RFD1KTOKD record1KTOKD-

)ERFOR( bdcdltnro USING SA)(FD -

)ERFOR( bdc9eld USING BD22URSOR KNA1S)RAS-)ERFOR( bdc9eld USING BD2OK2ODE 6-)ERFOR( bdc9eld USING KNA1NA(E record1NA(E-

)ERFOR( bdc9eld USING KNA1SORT record1SORT- ---

The 2 tae is fied $ith data from the recording The suroutines 23CNPamp5 and

23FI7+ are used for this

The suroutines are caed in the reuired structure or seuence

copy SAP AG BC420 12-61

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 6288

08amp

983209 SAP AG 1999

erie)

SAPDatabase

SeJuential9ile

SAPDatabase

ALL TRASATIALL TRASATI

SeJuential9ile

ATE IPUTATE IPUT

D TableD TableD TableD Table

I Monitor

T

In contrast to atch input you can use ca transaction to directy pass data to the diaog interface

$ithout using a atch input session Cou use an interna tae (2 tae same structure and ayout

as atch input) to temporariy store your screen data Then you ca the desired transaction in your

program

Note 5n average the 2a Transaction method is 8 to times faster than using atch Input

copy SAP AG BC420 12-62

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 6388

08

983209 SAP AG 1999

all Transaction Program$ 1ample

RE)ORT abcbdcdcdeb9ct-

)ARA(ETERS d9mode DEFAUT A

udmode DEFAUT S-FOR( calltranact9on-2A TRANSA2TION FD

USING bdcdata (ODE d9mode

U)DATE udmode-

IF lt1ubrc NE - 5RITE 6 ---

ENDIF-ENDFOR(-

Screen

00

Screen

100

Screen

An additiona system ro area is added for the caed transaction The system uses this area for

processing the individua screens in the transactionH the data from the tae is added here After the

transaction is processed the second ro area is reeasedH the system continues processing in the first

ro area

Notes

In contrast to atch input there is no error ogging (error sessions) here For processing the caed

transaction the system uses the authoriDations of the user that caed the transaction The 2 tae

can ony hod data for one transaction run at a time efore another transaction is caed and its data

can e added you must eecute a amp7Famp7S= for the 2 tae

copy SAP AG BC420 12-63

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 6488

084

983209 SAP AG 1999

ALL TRASATI C6

RE)ORT 777-

2A TRANSA2TION FD USING bdcdata (ODE E-

Default for MD1 is A

2A TRANSA2TION 3tranact9oncode4 USING 3bdc1table4 C (ODE A E N C-

-ith the parameter 57 you can seect a specific dispay mode for processing the transaction The

foo$ing three modes are avaiae

A (ispay a)

If you eecute the program a the screens and a their data are dispayed This is the defaut vaue

for the 57 in 2A++ TampANSA2TI5N

N (ispay nothing)

The screens are not dispayed at a regardess of $hether any of them contained errors As soon as

the transaction has een fuy processed contro is returned to your program (The vaue of the

parameter 4PAT7 determines $hether dataase updates are eecuted or not)

7 (ispay errors ony)As soon as an error occurs in a screen the transaction is s$itched to dispay mode so that you can

correct the errors

These dispay modes are the same as those in the atch input session processing

copy SAP AG BC420 12-64

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 6588

082

983209 SAP AG 1999

RE)ORT 777-

2A TRANSA2TION FD USING BD2DATA U)DATE -

ALL TRASATI Camp

RE)ORT 777-

2A TRANSA2TION FD USING bdcdata U)DATE -

2A TRANSA2TION 3tranact9oncode4 USING 3bdc1table4 C (ODE A E N C U)DATE A S C -

Default for UPDAT1 is A

-ith the parameter 4PAT7 you can contro ho$ dataase updates arising from a transaction are

carried out There are three options

A (asynchronous updating) The caed transaction does not $ait unti the dataase has een

updated it simpy for$ard the updates to the SAP update service This usuay speeds up the 2T

program This processing mode is N5T recommended for arge data sets as the caed transaction

does not receive a competion message from the update modue

The caing 2T program therefore cannot te if the transaction has een successfuy competed Cou

shoud use the updating administration function (transaction S8) to determine $hether updating

$as terminated eary The error anaysis correction functions for are ess hepfu than $ith

synchronous updating

S (synchronous updating) -ith synchronous updating the caed transaction $aits unti a the

updates have een competed So processing is so$er than $ith synchronous updating The caed

transaction can ho$ever report any updating errors to the program $hich maes error

anaysiscorrection easier

+ (local updating) $ith oca updating the dataase is not updated in a separate process it is

updated in the caers process (see appication hep documentation for the AAP ey$ord S7T

4PAT7 TAS6 +52A+)

copy SAP AG BC420 12-65

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 6688

088

983209 SAP AG 1999

ALL TRASATI C

RE)ORT 777-DATA mtab T0)E TABE OF bdcm8coll-

2A TRANSA2TION FD USING bdcdata (ESSAGES INTO mtab-

2A TRANSA2TION 3tranact9oncode4 USING 3bdc1table4 C (ODE A E N C U)DATE A S C (ESSAGES INTO 3metab4 C -

7SSAlt7S specifies that a system messages that are output during the eecution of a 2A++

TampANSA2TI5N are $ritten to the interna tae L7SSTA The interna tae must have the

structure 2Slt25++

4nie the cassica atch input processing $ith sessions 2A++ TampANSA2TI5N does not offer any

specia processing procedures for transactions containing errors There are no restart functions for

transactions that contain errors or that cause updating terminations

copy SAP AG BC420 12-66

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 6788

083

983209 SAP AG 1999

ALL TRASATI C4

RE)ORT 777-DATA mltot T0)E ctuaram-

2A TRANSA2TION FD USING BD2DATA

O)TIONS FRO( mltot-

2A TRANSA2TION 3tranact9oncode4 USING 3bdc1table4 C (ODE A E N C U)DATE A S C (ESSAGES INTO 3metab4 C O)TIONS FRO( ot C -

RE)ORT 777-DATA mltot T0)E ctuaram-2A TRANSA2TION FD USING bdcdata

O)TIONS FRO( mltot-

The addition 5PTI5NS enaes the ca transaction statement to e controed through a structure

The structure must have the dictionary type 2T43PAampAS

The addition 5PTI5NS Famp5 must not e comined either $ith the addition 57 or $ith

4PAT7 ore information on the net side

copy SAP AG BC420 12-67

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 6888

085

983209 SAP AG 1999

Structure TUltPARAMS

DISMD1 Procen mode anaoo o addon amp

UPDMD1 $pdae mode anaoo o addon $PA

ATTMD1 CA mode CA conro

D19SI1 orce de=a EndoE e drn procen

RAMMIT +o eD a Camp amp(

IPT +o a ac np eonF a F S-B+P SPAC

I1D +o a ac np eon a=er end o= BC daa

The components are defined as foo$s

The components 7FSIM7 ampA25IT N5INPT and N5I7N can have the foo$ing

vaues KGK E Ces or K K E No

If the addition 5PTI5NS Famp5 is not specified the foo$ing settings appy to the contro

parameters

IS57 from addition 57

4P57 from addition 4PAT7

2ATT57 2ATT not active

7FSIM7 o not not use defaut $indo$s siDe

ampA25IT Successfu eit at 25IT -5amp6

N5INPT atch input session active (SC9INPT E G)

N5I7N atch input session sti active after end of 2 data

copy SAP AG BC420 12-68

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 6988

087

983209 SAP AG 1999

SMSBID Message ID

SMSBT Message T(pe C1GIGWGSGA

SMSB Message umber

SMSB6 Message ariable 6

SMSBamp Message ariable amp

SMSB Message ariable

SMSB4 Message ariable 4

SMSBID Message ID

SMSBT Message T(pe C1GIGWGSGA

SMSB Message umber

SMSB6 Message ariable 6

SMSBamp Message ariable amp

SMSB Message ariable

SMSB4 Message ariable 4

Return code$

S(stem fields$

alue Meaning

0 Successful

6000 1rror in transaction

6000 1rror in processing call transaction

see also the s(stem fields specified

alue Meaning

0 Successful

6000 1rror in transaction

6000 1rror in processing call transaction

see also the s(stem fields specified

9ield name Meaning9ield name9ield name MeaningMeaning

Return ode and S(stem 9ields

The return code is used to specify $hether the caed transaction $as processed successfuy In

addition severa system fieds are fied The numer I type and variaes of the diaog message

output y the caed transaction Cou need this information to output the message tet

copy SAP AG BC420 12-69

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 7088

030

983209 SAP AG 1999

Benerated Program of the TA Recorder

REFRES= (ESSTAB-

2A TRANSA2TION tcode USING bdcdata (ODE ctumode U)DATE cudate (ESSAGES INTO metab-OO) AT metab- ENDOO)-IF lubrc 34 AND e8rou 34 S)A2E- IF e8rouoenend - 2A FUN2TION BD2O)ENGROU) E)ORTING ---------

--------- E8rouoened - ENDIF- 2A FUN2TION BD2INSERT E)ORTING T2ODE tcode TABES D0N)ROTAB bdcdata-ENDIF-REFRES= bdcdata-

Message table output

pen error session

Insert data record that

has errors into error

session

If you have seected ca transaction on the seection screen the generated program runs as foo$s

The onine transaction is caed $ith ca transaction and passed to tae 2ATA A the

messages arising during the ca transaction are put in the interna tae 7SSTA

7SSTA is output as a ist

If you have specified an error session ( 73ltamp54P L SPA27) on the seection screen and the

ca transaction comes across an error (+3S4amp2 L 0) the error session is opened The error

session is ho$ever ony opened once Then the data record is paced in the session

A the other data records that have errors $ith ca transaction are paced in the same session

copy SAP AG BC420 12-70

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 7188

036

983209 SAP AG 1999

The Transaction Recorder

PrinciplesPrinciples

Recording )ith the LSMWRecording )ith the LSMW

Principles of atch Input and all TransactionPrinciples of atch Input and all Transaction

Integrating the TA Program into the DWIntegrating the TA Program into the DW

Using the TA Recorder Using the TA Recorder

copy SAP AG BC420 12-71

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 7288

03amp

983209 SAP AG 1999

Integrating into the DW

Transfer program

AAP Dictionar(

Integrate

SDA0

SDA6

SDAamp

SDA

Cou can integrate the generated program into the G9- The structure of the fie must e created

in the AAP ictionary The taes SGA0 SGA8 SGA1 and SGA $i e fied

copy SAP AG BC420 12-72

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 7388

03

983209 SAP AG 1999

DW Release 42

Goo

-B eeae 45

aa ran=er ogtec

Int customer data transfer ob-ect

ecord =ed

Dece daa ran=er

d Goo

The ampunction ampor interatin TA recorder prora$s is

i$ple$ented in the

D+-B in Release

The recorder can e integrated as of ampeease and it is provided in the G9- ampeease

ltot to the G9- ampeease 5n the initia screen you can integrate programs y choosing ampoto

( +nt customer ata transfer o-ect

copy SAP AG BC420 12-73

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 7488

034

983209 SAP AG 1999

reating Program as D b-ect

Comer ran=er ogtec

ampgtec ype

Sor eD =or ogtec

aa ran=er proram

Srcre name

9900

(+A1

Cane comer

ZBCA+G

ZB

ustomer transfer ob-ect

umber bet)een 7000 and 7777

b-ect t(pe

Assignment to R ob-ect

Short tet for D ob-ectShort description

Data transfer program

ame of generated program

Structure name

A structure Cstructure la(out )ith this name is created in

the AAP Dictionar(

For ampeease transfer oects $ere not organiDed y 5amp oects ut y a G numer (00089

OOOO) The numer range O0009OOOO is reserved for customers

To create a connection to the ne$ G 9- you must assign the program to a 5amp oect

2reate a short tet for the G oect This tet $i appear in the method seection ist

Specify the program to e incuded

Specify a name for the structure to e created in the AAP ictionary

Note $he generated program appears under program type +N and not under program type

-

copy SAP AG BC420 12-74

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 7588

032

983209 SAP AG 1999

Adantages

Automatic program registration in the DW in

Release 48

ou can use all the functions defined for

standard ob-ects

1ception$ The (reate ampile ith data

function

If you incuded the oect in the ampeease $orench it is automaticay avaiae in the ampeease

B $orench

A the $orench functions are avaiae for your oect ecept for Create files ith transfer ata

copy SAP AG BC420 12-75

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 7688

038

983209 SAP AG 1999

ou are no) able to$

The Transaction Recorder$ Unit Summar(

Use the recording function in the LSMW to create

a batch input session )ith the data from the

eternal s(stem

Use the TA Recorder to create (our o)n data

transfer program

Anal(e programs that )or+ )ith batch input or

call transaction

Integrate the TA Recorder programs into the

DW

copy SAP AG BC420 12-76

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 7788

ercise 1

nit $ -ecorder

$opic 2reating etors

$ransaction -ecorder ercise 1

bull 2reating detors $ith eterna numer assignment

bull etor numers M9980008 to M9980080

Address data for detors $ith eterna numer assignment is to

e transferred using program ampFI700

ro4ect F5

Supro4ect +5

-un +575

$as)s 85 95 8S25

9oad program -F+00

8 In the foo$ing eercises eisting data is to e changed Therefore these detors $ith

eterna numer assignment have to first e created

898 4nder suproect 79 create run 797G9 $ith the name Detors ith

eternal numers

copy SAP AG BC420 12-77

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 7888

891 2reate the foo$ing three tass The tass map the foo$ing process steps

convert data create + session and process + session

89198 In run 797G9 create the foo$ing tas

9 Tas AP9

9 Name 2onvert data 9 Tas type AP

9 Program type +S-

Seect the foo$ing +S- oect

+S- proect 2109

+S- suproect 7I9

+S- oect I997GT

89191 In run 797G9 create the foo$ing tas 9 Tas +5A9

9 Name 2reate I session

Tas type +5A

9 Program type INP

Seect program ampFI700 $ith the variant

I97G9

8919 In run 797G9 create the foo$ing tas

9 Tas S29

9 Name Process I session Tas type S2

9 Program type amp7P5

Seect program ampS2S4 $ith the variant

S497G9

Note that you have to correct the seuence of the tass 2onvert data

create + session and process + session

4se the uttons

89 Start the run

The detors $i e created $ith eterna numer assignments

89 2hec in transaction F0 that the detors M9980008 to M9980080 have een

created

copy SAP AG BC420 12-78

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 7988

ercise

nit $ransaction -ecorder

$opic -ecording function in the 9S8(

bull 2reate a recording using the +S-

bull ltenerate a atch input session

2hange the detor address data in the amp System

Name of the recording +

Name of the file +2055+F9

8 2reate the recording 7I3 using the +S- ampecord the transaction F01 (2hange

detor)

898 efore you create the recording first test the transaction onineQ

For the recording use detor M9980008 5n the initia screen of the F01

maintain the foo$ing fieds ony

etor etor M9980008

2ompany code 0008

Address data seect

Note $he data record must e saved hile recording

891 aintain the names and the descriptions for the foo$ing fieds

Name city street posta code and teephone numereete a other fieds in screen 880 from the recording (eg S5ampT+ +AN8

SPampAS)

4se the same technica names as sho$n in the tae eo$ (automatic fied

mapping)

copy SAP AG BC420 12-79

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 8088

1 2reate the suproect 7I9 and the ne$ oect TA3 in your proect 2109

aintain the oect attriutes and seect the item atch input recording Seect your

recording 7I3

2reate the source structure address

2reate the source fieds according to the tae eo$ 5r copy them from proect 2109S37N suproect 7I900 oect TA900

198 Fie setup The data from the egacy system are dispayed in the foo$ing tae

Fied name Fied type Fied ength escription

N5 2 8B etor numer

NA7 2 Name

STamp77T 2 Street

2ITC 2 2ityPace of residence

MIP 2 80 Posta code

T7+ 2 8B Teephone numer

191 aintain the fied mapping 4se the automatic fied mapping (via menu item

7tras)

19 Specify the fies 5ny maintain the fie name of the source fie

Name of the fie 21099IFI+7

2odepage 8800

19 Import the data and convert them ispay the data in each caseQ

19 2reate a atch input session

19B ampun the atch input session

copy SAP AG BC420 12-80

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 8188

ercise 3

nit $ransaction -ecorder

$opic -ecording ith the $ -ecorder

bull ltenerate a recording using the TA recorder

bull Test the recording

2hange the address data of detors in the amp system

Name recording $+

Name of the file +2055+F9

8 2reate the recording TA37I3 using the transaction recorder ampecord the

transaction F01 (change detor)

898 4se detor M9980008 for the recording 5n the F01 initia screen ony

maintain the foo$ing fieds

etor etor M9980008

2ompany 2ode 0008

Address data seect

Note $he data record must e saved hen recording

eete a fieds that do not eist in the source fie 21099IFI+7 from screen

880 in the recording (eg 6NA89S5ampT+ 6NA89+AN8 6ANNQ9SPampAS) Note o not deete fieds ampF01946ampS and ampF0190880

Save the recording no$

1 S$itch to the recordings overvie$

198 Process the recording $ith the processing mode A (dispay a)

191 Process the recording $ith the processing mode RN (no dispay)

19 If the recording has een tested and no error has occurred generate a I session

and run it using the I monitor If an error shoud occur generate the recordingagainQ

copy SAP AG BC420 12-81

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 8288

From the recording generate the program M21037I3 in your deveopment cass

2109 Seect the foo$ing

bull ampead fied contents from fie

bull 2reate test data in the fie 2103dei3test3tt

98 Save this program and eecute it ltenerate one I session each and process it

2arry out the same steps again using the ca transaction

The generated program shoud no$ e changed so that fie 21099IFI+7 can e

read and processed

98 2hange the defaut vaue of the fie name (parameter dataset) in 21099

IFI+7

91 2hange the structure definition eete the company code fied and the address

data checo from the structure

9 2hange the su9routine ca perform dc3fied for the company code (KampF019

46ampSK) so that the vaue 0008 is transferred

9 2hange the su9routine ca perform dc3fied for the address data checo

(KampF0190880K) so that the vaue G is transferred

9 Start the program again and read the data from the fie 21099IFI+7 $ith

detor data ltenerate a I session $ith it and run it

copy SAP AG BC420 12-82

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 8388

033 Include DR16INCLUDE BDCRECX1

SELECTION-SCREEN BEGIN OF LINE

PARAMETERS SESSION RADIOBUTTON GROUP CTU create sessi SELECTION-SCREEN COMMENT $amp TEXT-S FOR FIELD SESSION

se(ecti-scree )siti +

PARAMETERS CTU RADIOBUTTON GROUP CTU ca(( trasacti

SELECTION-SCREEN COMMENT $amp TEXT-S FOR FIELD CTU

SELECTION-SCREEN END OF LINE

SELECTION-SCREEN BEGIN OF LINE

SELECTION-SCREEN COMMENT $amp TEXT-S1 FOR FIELD GROUP

se(ecti-scree )siti $+

PARAMETERS GROUP1$amp r) ae 0 sessi

SELECTION-SCREEN COMMENT $amp TEXT-S+ FOR FIELD CTUMODE

se(ecti-scree )siti

PARAMETERS CTUMODE LIE CTU2PARAMS-DISMODE DEFAULT 3N3

A4 s56 a(( 78)rs

E4 s56 78)r errr (8

N4 7 t 7is)(a8 78)r

SELECTION-SCREEN END OF LINE

SELECTION-SCREEN BEGIN OF LINE

SELECTION-SCREEN COMMENT $amp TEXT-S$ FOR FIELD USER

se(ecti-scree )siti $+

PARAMETERS4 USER1$amp DEFAULT S9-UNAME ser 0r sessi i atc5

SELECTION-SCREEN COMMENT $amp TEXT-S FOR FIELD CUPDATE

se(ecti-scree )siti

PARAMETERS CUPDATE LIE CTU2PARAMS-UPDMODE DEFAULT 3L3

S4 s8c5rs(8

A4 as8c5rs(8

L4 (ca(

SELECTION-SCREEN END OF LINE

SELECTION-SCREEN BEGIN OF LINE

SELECTION-SCREEN COMMENT $amp TEXT-S FOR FIELD EEP

se(ecti-scree )siti $+

PARAMETERS4 EEP AS CltECBOX 3 3 = 7e(ete sessi i0 0iis5e7

3X3 = gtee) sessi i0 0iis5e7

SELECTION-SCREEN COMMENT $amp TEXT-S FOR FIELD E2GROUP

copy SAP AG BC420 12-83

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 8488

se(ecti-scree )siti

)araeters E2GROUP1$amp r) ae 0 errr-sessi

SELECTION-SCREEN END OF LINE

SELECTION-SCREEN BEGIN OF LINE

SELECTION-SCREEN COMMENT $amp TEXT-S FOR FIELD ltOLDDATE

se(ecti-scree )siti $+

PARAMETERS4 ltOLDDATE LIE S9-DATUM

SELECTION-SCREEN COMMENT +11amp TEXT-S$ FOR FIELD E2USER

se(ecti-scree )siti

PARAMETERS4 E2USER1$amp DEFAULT S9-UNAME ser 0r errr-sessi

SELECTION-SCREEN END OF LINE

SELECTION-SCREEN BEGIN OF LINE

SELECTION-SCREEN COMMENT +11amp TEXT-S FOR FIELD E2EEP

se(ecti-scree )siti

PARAMETERS4 E2EEP AS CltECBOX 3 3 = 7e(ete sessi i0 0iis5e7

3X3 = gtee) sessi i0 0iis5e7

SELECTION-SCREEN END OF LINE

SELECTION-SCREEN BEGIN OF LINE

SELECTION-SCREEN COMMENT +11amp TEXT-S FOR FIELD E2ltDATE

se(ecti-scree )siti

PARAMETERS4 E2ltDATE LIE S9-DATUM

SELECTION-SCREEN END OF LINE

SELECTION-SCREEN SIP

SELECTION-SCREEN BEGIN OF LINE

SELECTION-SCREEN COMMENT 1amp TEXT-S1 FOR FIELD NODATA

PARAMETERS4 NODATA DEFAULT 33 LOER CASE 7ata

SELECTION-SCREEN END OF LINE

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

Batc5i)t7ata 0 si(e trasacti

DATA4 BDCDATA LIE BDCDATA OCCURS ITlt ltEADER LINE

essaes 0 ca(( trasacti

DATA4 MESSTAB LIE BDCMSGCOLL OCCURS ITlt ltEADER LINE

errr sessi )ee7 3 3 r 3X3amp

DATA4 E2GROUP2OPENED

essae tets

TABLES4 T1

copy SAP AG BC420 12-84

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 8588

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

at se(ecti scree

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

AT SELECTION-SCREEN

r) a7 ser st e 0i((e7 0r create sessi

IF SESSION = 3X3 AND

GROUP = SPACE OR USER = SPACE

MESSAGE E1MSamp

ENDIF

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

)e 7ataset

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

FORM OPEN2DATASET USING P2DATASET

OPEN DATASET P2DATASET IN TEXT MODE

IF S9-SUBRC

RITE4 TEXT-E S9-SUBRC

STOP

ENDIF

ENDFORM

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

c(se 7ataset

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

FORM CLOSE2DATASET USING P2DATASET

CLOSE DATASET P2DATASET

ENDFORM

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

create atc5i)t sessi

t 0r ca(( trasacti siamp

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

FORM OPEN2GROUP

IF SESSION = 3X3

SIP

RITE4 $amp 3Create r)3I1amp GROUP

SIP

)e atc5i)t r)

CALL FUNCTION 3BDC2OPEN2GROUP3

EXPORTING CLIENT = S9-MANDT

copy SAP AG BC420 12-85

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 8688

GROUP = GROUP

USER = USER

EEP = EEP

ltOLDDATE = ltOLDDATE

RITE4 amp 3BDC2OPEN2GROUP3I$amp

1$amp 3retrc7e43I+amp

S9-SUBRC

ENDIF

ENDFORM

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

e7 atc5i)t sessi

ca(( trasacti si4 errr sessiamp

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

FORM CLOSE2GROUP

IF SESSION = 3X3

c(se atc5i)t r)

CALL FUNCTION 3BDC2CLOSE2GROUP3

RITE4 amp 3BDC2CLOSE2GROUP3Iamp

1$amp 3retrc7e43I+amp

S9-SUBRC

ELSE

IF E2GROUP2OPENED = 3X3

CALL FUNCTION 3BDC2CLOSE2GROUP3

RITE4

RITE4 amp 3Fe5(era))e 6r7e eret3Iamp

ENDIF

ENDIF

ENDFORM

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

Start e6 trasacti accr7i t )araeters

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

FORM BDC2TRANSACTION USING TCODE

DATA4 L2MSTRINGamp

DATA4 L2SUBRC LIE S9-SUBRC

atc5 i)t sessi

IF SESSION = 3X3

CALL FUNCTION 3BDC2INSERT3

EXPORTING TCODE = TCODE

TABLES D9NPROTAB = BDCDATA

RITE4 3BDC2INSERT3Iamp

copy SAP AG BC420 12-86

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 8788

TCODE

3retrc7e43I+amp

S9-SUBRC

3RECORD43

S9-INDEX

ca(( trasacti si

ELSE

REFRESlt MESSTAB

CALL TRANSACTION TCODE USING BDCDATA

MODE CTUMODE

UPDATE CUPDATE

MESSAGES INTO MESSTAB

L2SUBRC = S9-SUBRC

RITE4 3CALL2TRANSACTION3

TCODE

3retrc7e43I+amp

L2SUBRC

3RECORD43

S9-INDEX

LOOP AT MESSTAB

SELECT SINGLE FROM T1 ltERE SPRSL = MESSTAB-MSGSPRA

AND ARBGB = MESSTAB-MSGID

AND MSGNR = MESSTAB-MSGNR

IF S9-SUBRC =

L2MSTRING = T1-TEXT

IF L2MSTRING CS 313

REPLACE 313 ITlt MESSTAB-MSGH1 INTO L2MSTRING

REPLACE 3$3 ITlt MESSTAB-MSGH$ INTO L2MSTRING

REPLACE 33 ITlt MESSTAB-MSGH INTO L2MSTRING

REPLACE 33 ITlt MESSTAB-MSGH INTO L2MSTRING

ELSE

REPLACE 33 ITlt MESSTAB-MSGH1 INTO L2MSTRING

REPLACE 33 ITlt MESSTAB-MSGH$ INTO L2MSTRING

REPLACE 33 ITlt MESSTAB-MSGH INTO L2MSTRING

REPLACE 33 ITlt MESSTAB-MSGH INTO L2MSTRING

ENDIF

CONDENSE L2MSTRING

RITE4 MESSTAB-MSGT9P L2MSTRING$+amp

ELSE

RITE4 MESSTAB

ENDIF

ENDLOOP

copy SAP AG BC420 12-87

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 8888

SIP

Eree 0e5(era))e

IF L2SUBRC AND E2GROUP SPACE

IF E2GROUP2OPENED = 3 3

CALL FUNCTION 3BDC2OPEN2GROUP3

EXPORTING CLIENT = S9-MANDT

GROUP = E2GROUP

USER = E2USER

EEP = E2EEP

ltOLDDATE = E2ltDATE

E2GROUP2OPENED = 3X3

ENDIF

CALL FUNCTION 3BDC2INSERT3

EXPORTING TCODE = TCODE

TABLES D9NPROTAB = BDCDATA

ENDIF

ENDIF

REFRESlt BDCDATA

ENDFORM

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

Start e6 scree

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

FORM BDC2D9NPRO USING PROGRAM D9NPRO

CLEAR BDCDATA

BDCDATA-PROGRAM = PROGRAM

BDCDATA-D9NPRO = D9NPRO

BDCDATA-D9NBEGIN = 3X3

APPEND BDCDATA

ENDFORM

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

Isert 0ie(7

Page 49: BC420_46C - 012The Transaction Recorder

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 4988

047

983209 SAP AG 1999

Structure of the Benerated Program

Benerated part

Define D

table

pen seJuential file

pen I session

Read data record

9ill D table

9ill I session gtALL TRASATI

Last data recordK

lose I session

lose seJuential file

Include DR16

Define filestructure

P1ltDATAS1T

P1ltBRUP

DltDPR

Dlt9I1LD

DltTRASATI

LS1ltBRUP

LS1ltDATAS1T

The generated program consists of t$o parts 9 a generated part and the incude 2amp72G8 The

incude is provided in the standard system

The incude contains the definition of the reuired 2 tae and a further seven suroutines These

suroutines eecute the foo$ing functions

5pen and cose fie

5pen and cose session

Fi 2 tae

Fi session

The generated part is the main program and cas the reevant suroutines A structure is aso

generated in the generated part to read the eterna data into the fie

See the Appendi for more information on the 2amp72G8 program

copy SAP AG BC420 12-49

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 5088

020

983209 SAP AG 1999

Structure of D Table

PRBRAM DPR D1BI 9AM 9ALPRBRAMPRBRAM DPRDPR D1BID1BI 9AM9AM 9AL9AL

SAPM90ampD 0602

R90ampD=UR 600000

R90ampDU=RS 0006

R90ampD=T=D =UA

SAPM90ampD 0660

=A6AM16 Smith

=A6PSTL 87000

=A6LAD6 US

=A6SPRAS 1

SAPM90ampD 06amp0

=A6ST1B US6amp428357DDATA

PRBRAM

DPR

D1BI

9AM

9AL

EAR

UM

EAR

EAR

EAR

40

4

6

6amp

6amp

D Module pool

D Screen number

D Start of screen

D 9ield name

D 9ield contents

9ield ame T(pe Length Short Tet

AAP Dictionar(

The 2 tae has the same structure as in a standard transfer

copy SAP AG BC420 12-50

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 5188

026

983209 SAP AG 1999

Read Structure

Recording

DATA BEGIN OF record data element BUKRS bukr$amp data element KTOKD ktokd$amp data element NA(EG) name$+amp data element SORT ortl$ampEND OF record-

record

Automaticall( generated

from recording

The structure of the fie is automaticay generated and is a$ays defined $ith the name amp725amp

The generated structure a$ays has the same ayout 7ach fied is defined y t$o generated ro$s

The first ro$ is a$ays a comment ro$ containing the tet J data eement and the data eement of

the screen fied from the recording In the net ro$ the fied itsef is defined $ith the name of the

data eement foo$ed y a three9digit position numer $hich specifies the ocation in the structure

The ength of the fied is set y the ength of the data eement If a fied is not defined through a data

eement the system uses the ength of the screen fied

copy SAP AG BC420 12-51

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 5288

02amp

983209 SAP AG 1999

pening and losing the 9ile

P1ltDATAS1T

LS1ltDATAS1T

FOR( oendataet USING dataet-O)EN DATASET dataet IN TET (ODE-

IF S01SUBR2 34 - 5RITE 6 te7t1e S01SUBR2-STO)-

ENDIF-

ENDFOR(-

FOR( cloedataet USING dataet-2OSE DATASET dataet-

ENDFOR(-

Include

DR16

The suroutine 5P7N3ATAS7T opens the seuentia fie

The suroutine 2+5S73ATAS7T coses the seuentia fie

copy SAP AG BC420 12-52

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 5388

02

983209 SAP AG 1999

9unction Modules for I Program

lient

Session name

Eold date

=eep session

D user name

RecordK

LI1T

BRUP

ELDDAT1

=11P

US1R

R1RD

DltP1ltBRUPDltP1ltBRUP

Transaction code

D table

TD1

DPRTA

DltIS1RTDltIS1RT

DltLS1ltBRUPDltLS1ltBRUP

pen Isessionpen Isession

Insert data for

transactions

Insert data for

transactions

lose I

session

lose I

session

The foo$ing function modues are provided for creating atch input sessions (function group

S2)

235P7N3ltamp54P

2reates a ne$ session and contains genera data for the $hoe session

23INS7ampT

Inserts a the data for a transaction into the session The transferred interna tae $ith the

structure 2ATA must contain a the data reuired for fuy processing the transaction

232+5S73ltamp54P

2oses the session after a the data has een inserted As soon as the session has een cosed it

can e processed

The interna tae $ith the structure 2ATA can ony contain atch input data for one singe

transaction run So the individua transactions are inserted into the atch input session in a oop

using severa 23INS7ampT cas

copy SAP AG BC420 12-53

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 5488

024

983209 SAP AG 2001

9unction Module DltP1ltBRUP

ALL 9UTI DltP1ltBRUPALL 9UTI DltP1ltBRUP

1PRTIB

LI1T client

BRUP session name

ELDDAT1 loc+ date

=11P delete flag

US1R bdc user name

R1RD recording

IMPRTIB

NID internal session +e(

11PTIS

1PRTIB

LI1T client

BRUP session name

ELDDAT1 loc+ date

=11P delete flag

US1R bdc user name

R1RD recording

IMPRTIB NID internal session +e(

11PTIS

-ith the function modue 235P7N3ltamp54P you can open a atch input session

The foo$ing parameters are mandatory

2+I7NT (cient)

ltamp54P (session name)

4S7amp (user name)

Note The 4S7amp must a$ays e specified This user name is reuired for processing the session

in atch mode

The foo$ing parameters are optiona

=5+AT7 specifies the eariest date on $hich the session can e started677P fag specifies $hether session shoud e deeted after it has een successfuy processed The

677P fag is ignored if the session contains errors

677P E K K means deete the session after processing (defaut vaue) H

677P E KGK means do not deete session

amp725amp E KGK ao$s you to create a recording instead of a I session

If gtI is specified the function modue returns the interna session ey This is needed to e ae to

differentiate sessions that have the same name

-ith 7G27PTI5NS you get various return vaues that can e ueried $ith SC9S4amp2

Note In onine mode the onine user is used for the authoriDation checs regardess of the user

name specified

copy SAP AG BC420 12-54

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 5588

022

983209 SAP AG 1999

Subprogram P1ltBRUP

P1ltBRUP

FOR( oen8rou-IF e9on -

2A FUN2TION BD2O)ENGROU) E)ORTING 2IENT lt1mandt GROU) 8rou USER uer KEE) kee

=ODDATE gtolddate-

ENDIF-ENDFOR(-

Include

DR16

The suprogram 5P7N3ltamp54P opens the atch input session

copy SAP AG BC420 12-55

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 5688

028

983209 SAP AG 1999

9unction Module DltIS1RT

ALL 9UTI DltIS1RTALL 9UTI DltIS1RT

IMPRT

TD1 Transaction code

PSTltLAL Update locall(

PRITIB print list

TAL1S DPRTA bdclttable

11PTIS

IMPRT

TD1 Transaction code

PSTltLAL Update locall(

PRITIB print list

TAL1S DPRTA bdclttable

11PTIS

-ith the function modue 23INS7ampT you can add transaction data to the session

Cou need an interna 2 tae to transfer the data

The foo$ing parameters are mandatory

T257 Transaction code

CNPamp5TA 2 tae

The foo$ing parameters are optiona

P5ST3+52A+ E KGK activates oca updating This means that the data to e updated is ept in the

appication server and updated in the ast step of the transaction This does not invove the update

process (For more information see course 28 Programming ataase 4pdates)

PampINTINlt E KGK 9 ists processed in I $i e printed immediatey -ith 7G27PTI5NS you get various return vaues that can e ueried $ith SC9S4amp2

copy SAP AG BC420 12-56

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 5788

023

983209 SAP AG 1999

Subprogram DltTRASATI

DltTRASATI

FOR( BD2TRANSA2TION USING tcode-

IF e9on -2A FUN2TION BD2INSERT

E)ORTING T2ODE tcode TABES D0N)ROTAB bdcdata-

ESE-

ENDIF-ENDFOR(-

T

Include

DR16

The suprogram 23TampANSA2TI5N moves the fied 2 tae either to a atch input session

or uses ca transaction to import the data into the system 5n the seection screen you can specify

$hether you $ant to create a session or you $ant to use ca transaction to process the data directy

The S7SSI5N fied is then set according to your seection

copy SAP AG BC420 12-57

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 5888

025

983209 SAP AG 1999

9unction Module DltLS1ltBRUP

ALL 9UTI DltLS1ltBRUP

11PTIS

TltP1 6

NU1U1lt1RRR amp

-ith the function modue 232+5S73ltamp54P you can cose a atch input session

In 7G27PTI5NS you get various return vaues that can e ueried $ith SC9S4amp2

copy SAP AG BC420 12-58

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 5988

027

983209 SAP AG 1999

Subprogram LS1ltBRUP

FOR( cloe8rou-IF e9on -cloe batcgt 9nut 8rou

2A FUN2TION BD22OSEGROU)-

ESE-IF e8rouoened -

2A FUN2TION BD22OSEGROU)-

ENDIF-ENDIF-

ENDFOR(-

LS1ltBRUPlose session

lose error session

Include

DR16

The suprogram 2+5S73ltamp54P coses the atch input session The suprogram differentiates

et$een a norma I session (S7SSI5N E G) and a session opened $hen ca transaction

encountered an error (73ltamp54P35P7N7 E G)

copy SAP AG BC420 12-59

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 6088

080

983209 SAP AG 1999

Subprograms DltDPRG Dlt9I1LD

DltDPR

Dlt9I1LD

FOR( bdc9eld USING nam al-IF al 34 nodata-2EAR bdcdata- bdcdata1nam nam- bdcdata1al al- A))END bdcdata-ENDIF-

ENDFOR(-

FOR( bdcdltnro USING ro8ram dltnro- 2EAR bdcdata-Bdcdata1ro8ram ro8ram-Bdcdata1dltnro dltnro-Bdcdata1dltnbe89n - A))END bdcdata-ENDFOR(-

Include

DR16

The incude 2amp72GG contains t$o suprograms 23CNPamp5 and 23FI7+

Suprogram 23CNPamp5 fis the 2 tae $ith program names and screen numers

Suprogram 23FI7+ fis the 2 tae $ith fied names and vaues

7ach suprogram creates an entry in the 2 tae

copy SAP AG BC420 12-60

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 6188

086

983209 SAP AG 1999

9illing the D Table

erorm bdcdltnro u9n8 SA)(FD +- erorm bdc9eld u9n8 BD22URSOR RFD1BUKRS- erorm bdc9eld u9n8 BD2OK2ODE 6- erorm bdc9eld u9n8 RFD1BUKRS record1BUKRS- erorm bdc9eld u9n8 RFD1KTOKD record1KTOKD-

erorm bdcdltnro u9n8 SA)(FD -

erorm bdc9eld u9n8 BD22URSOR KNA1S)RAS- erorm bdc9eld u9n8 BD2OK2ODE 6- erorm bdc9eld u9n8 KNA1NA(E record1NA(E-

erorm bdc9eld u9n8 KNA1SORT record1SORT-

Recording Benerated automaticall(

from the recording

)ERFOR( bdcdltnro USING SA)(FD +- )ERFOR( bdc9eld USING BD22URSOR RFD1BUKRS-)ERFOR( bdc9eld USING BD2OK2ODE 6-)ERFOR( bdc9eld USING RFD1BUKRS record1BUKRS-)ERFOR( bdc9eld USING RFD1KTOKD record1KTOKD-

)ERFOR( bdcdltnro USING SA)(FD -

)ERFOR( bdc9eld USING BD22URSOR KNA1S)RAS-)ERFOR( bdc9eld USING BD2OK2ODE 6-)ERFOR( bdc9eld USING KNA1NA(E record1NA(E-

)ERFOR( bdc9eld USING KNA1SORT record1SORT- ---

The 2 tae is fied $ith data from the recording The suroutines 23CNPamp5 and

23FI7+ are used for this

The suroutines are caed in the reuired structure or seuence

copy SAP AG BC420 12-61

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 6288

08amp

983209 SAP AG 1999

erie)

SAPDatabase

SeJuential9ile

SAPDatabase

ALL TRASATIALL TRASATI

SeJuential9ile

ATE IPUTATE IPUT

D TableD TableD TableD Table

I Monitor

T

In contrast to atch input you can use ca transaction to directy pass data to the diaog interface

$ithout using a atch input session Cou use an interna tae (2 tae same structure and ayout

as atch input) to temporariy store your screen data Then you ca the desired transaction in your

program

Note 5n average the 2a Transaction method is 8 to times faster than using atch Input

copy SAP AG BC420 12-62

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 6388

08

983209 SAP AG 1999

all Transaction Program$ 1ample

RE)ORT abcbdcdcdeb9ct-

)ARA(ETERS d9mode DEFAUT A

udmode DEFAUT S-FOR( calltranact9on-2A TRANSA2TION FD

USING bdcdata (ODE d9mode

U)DATE udmode-

IF lt1ubrc NE - 5RITE 6 ---

ENDIF-ENDFOR(-

Screen

00

Screen

100

Screen

An additiona system ro area is added for the caed transaction The system uses this area for

processing the individua screens in the transactionH the data from the tae is added here After the

transaction is processed the second ro area is reeasedH the system continues processing in the first

ro area

Notes

In contrast to atch input there is no error ogging (error sessions) here For processing the caed

transaction the system uses the authoriDations of the user that caed the transaction The 2 tae

can ony hod data for one transaction run at a time efore another transaction is caed and its data

can e added you must eecute a amp7Famp7S= for the 2 tae

copy SAP AG BC420 12-63

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 6488

084

983209 SAP AG 1999

ALL TRASATI C6

RE)ORT 777-

2A TRANSA2TION FD USING bdcdata (ODE E-

Default for MD1 is A

2A TRANSA2TION 3tranact9oncode4 USING 3bdc1table4 C (ODE A E N C-

-ith the parameter 57 you can seect a specific dispay mode for processing the transaction The

foo$ing three modes are avaiae

A (ispay a)

If you eecute the program a the screens and a their data are dispayed This is the defaut vaue

for the 57 in 2A++ TampANSA2TI5N

N (ispay nothing)

The screens are not dispayed at a regardess of $hether any of them contained errors As soon as

the transaction has een fuy processed contro is returned to your program (The vaue of the

parameter 4PAT7 determines $hether dataase updates are eecuted or not)

7 (ispay errors ony)As soon as an error occurs in a screen the transaction is s$itched to dispay mode so that you can

correct the errors

These dispay modes are the same as those in the atch input session processing

copy SAP AG BC420 12-64

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 6588

082

983209 SAP AG 1999

RE)ORT 777-

2A TRANSA2TION FD USING BD2DATA U)DATE -

ALL TRASATI Camp

RE)ORT 777-

2A TRANSA2TION FD USING bdcdata U)DATE -

2A TRANSA2TION 3tranact9oncode4 USING 3bdc1table4 C (ODE A E N C U)DATE A S C -

Default for UPDAT1 is A

-ith the parameter 4PAT7 you can contro ho$ dataase updates arising from a transaction are

carried out There are three options

A (asynchronous updating) The caed transaction does not $ait unti the dataase has een

updated it simpy for$ard the updates to the SAP update service This usuay speeds up the 2T

program This processing mode is N5T recommended for arge data sets as the caed transaction

does not receive a competion message from the update modue

The caing 2T program therefore cannot te if the transaction has een successfuy competed Cou

shoud use the updating administration function (transaction S8) to determine $hether updating

$as terminated eary The error anaysis correction functions for are ess hepfu than $ith

synchronous updating

S (synchronous updating) -ith synchronous updating the caed transaction $aits unti a the

updates have een competed So processing is so$er than $ith synchronous updating The caed

transaction can ho$ever report any updating errors to the program $hich maes error

anaysiscorrection easier

+ (local updating) $ith oca updating the dataase is not updated in a separate process it is

updated in the caers process (see appication hep documentation for the AAP ey$ord S7T

4PAT7 TAS6 +52A+)

copy SAP AG BC420 12-65

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 6688

088

983209 SAP AG 1999

ALL TRASATI C

RE)ORT 777-DATA mtab T0)E TABE OF bdcm8coll-

2A TRANSA2TION FD USING bdcdata (ESSAGES INTO mtab-

2A TRANSA2TION 3tranact9oncode4 USING 3bdc1table4 C (ODE A E N C U)DATE A S C (ESSAGES INTO 3metab4 C -

7SSAlt7S specifies that a system messages that are output during the eecution of a 2A++

TampANSA2TI5N are $ritten to the interna tae L7SSTA The interna tae must have the

structure 2Slt25++

4nie the cassica atch input processing $ith sessions 2A++ TampANSA2TI5N does not offer any

specia processing procedures for transactions containing errors There are no restart functions for

transactions that contain errors or that cause updating terminations

copy SAP AG BC420 12-66

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 6788

083

983209 SAP AG 1999

ALL TRASATI C4

RE)ORT 777-DATA mltot T0)E ctuaram-

2A TRANSA2TION FD USING BD2DATA

O)TIONS FRO( mltot-

2A TRANSA2TION 3tranact9oncode4 USING 3bdc1table4 C (ODE A E N C U)DATE A S C (ESSAGES INTO 3metab4 C O)TIONS FRO( ot C -

RE)ORT 777-DATA mltot T0)E ctuaram-2A TRANSA2TION FD USING bdcdata

O)TIONS FRO( mltot-

The addition 5PTI5NS enaes the ca transaction statement to e controed through a structure

The structure must have the dictionary type 2T43PAampAS

The addition 5PTI5NS Famp5 must not e comined either $ith the addition 57 or $ith

4PAT7 ore information on the net side

copy SAP AG BC420 12-67

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 6888

085

983209 SAP AG 1999

Structure TUltPARAMS

DISMD1 Procen mode anaoo o addon amp

UPDMD1 $pdae mode anaoo o addon $PA

ATTMD1 CA mode CA conro

D19SI1 orce de=a EndoE e drn procen

RAMMIT +o eD a Camp amp(

IPT +o a ac np eonF a F S-B+P SPAC

I1D +o a ac np eon a=er end o= BC daa

The components are defined as foo$s

The components 7FSIM7 ampA25IT N5INPT and N5I7N can have the foo$ing

vaues KGK E Ces or K K E No

If the addition 5PTI5NS Famp5 is not specified the foo$ing settings appy to the contro

parameters

IS57 from addition 57

4P57 from addition 4PAT7

2ATT57 2ATT not active

7FSIM7 o not not use defaut $indo$s siDe

ampA25IT Successfu eit at 25IT -5amp6

N5INPT atch input session active (SC9INPT E G)

N5I7N atch input session sti active after end of 2 data

copy SAP AG BC420 12-68

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 6988

087

983209 SAP AG 1999

SMSBID Message ID

SMSBT Message T(pe C1GIGWGSGA

SMSB Message umber

SMSB6 Message ariable 6

SMSBamp Message ariable amp

SMSB Message ariable

SMSB4 Message ariable 4

SMSBID Message ID

SMSBT Message T(pe C1GIGWGSGA

SMSB Message umber

SMSB6 Message ariable 6

SMSBamp Message ariable amp

SMSB Message ariable

SMSB4 Message ariable 4

Return code$

S(stem fields$

alue Meaning

0 Successful

6000 1rror in transaction

6000 1rror in processing call transaction

see also the s(stem fields specified

alue Meaning

0 Successful

6000 1rror in transaction

6000 1rror in processing call transaction

see also the s(stem fields specified

9ield name Meaning9ield name9ield name MeaningMeaning

Return ode and S(stem 9ields

The return code is used to specify $hether the caed transaction $as processed successfuy In

addition severa system fieds are fied The numer I type and variaes of the diaog message

output y the caed transaction Cou need this information to output the message tet

copy SAP AG BC420 12-69

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 7088

030

983209 SAP AG 1999

Benerated Program of the TA Recorder

REFRES= (ESSTAB-

2A TRANSA2TION tcode USING bdcdata (ODE ctumode U)DATE cudate (ESSAGES INTO metab-OO) AT metab- ENDOO)-IF lubrc 34 AND e8rou 34 S)A2E- IF e8rouoenend - 2A FUN2TION BD2O)ENGROU) E)ORTING ---------

--------- E8rouoened - ENDIF- 2A FUN2TION BD2INSERT E)ORTING T2ODE tcode TABES D0N)ROTAB bdcdata-ENDIF-REFRES= bdcdata-

Message table output

pen error session

Insert data record that

has errors into error

session

If you have seected ca transaction on the seection screen the generated program runs as foo$s

The onine transaction is caed $ith ca transaction and passed to tae 2ATA A the

messages arising during the ca transaction are put in the interna tae 7SSTA

7SSTA is output as a ist

If you have specified an error session ( 73ltamp54P L SPA27) on the seection screen and the

ca transaction comes across an error (+3S4amp2 L 0) the error session is opened The error

session is ho$ever ony opened once Then the data record is paced in the session

A the other data records that have errors $ith ca transaction are paced in the same session

copy SAP AG BC420 12-70

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 7188

036

983209 SAP AG 1999

The Transaction Recorder

PrinciplesPrinciples

Recording )ith the LSMWRecording )ith the LSMW

Principles of atch Input and all TransactionPrinciples of atch Input and all Transaction

Integrating the TA Program into the DWIntegrating the TA Program into the DW

Using the TA Recorder Using the TA Recorder

copy SAP AG BC420 12-71

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 7288

03amp

983209 SAP AG 1999

Integrating into the DW

Transfer program

AAP Dictionar(

Integrate

SDA0

SDA6

SDAamp

SDA

Cou can integrate the generated program into the G9- The structure of the fie must e created

in the AAP ictionary The taes SGA0 SGA8 SGA1 and SGA $i e fied

copy SAP AG BC420 12-72

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 7388

03

983209 SAP AG 1999

DW Release 42

Goo

-B eeae 45

aa ran=er ogtec

Int customer data transfer ob-ect

ecord =ed

Dece daa ran=er

d Goo

The ampunction ampor interatin TA recorder prora$s is

i$ple$ented in the

D+-B in Release

The recorder can e integrated as of ampeease and it is provided in the G9- ampeease

ltot to the G9- ampeease 5n the initia screen you can integrate programs y choosing ampoto

( +nt customer ata transfer o-ect

copy SAP AG BC420 12-73

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 7488

034

983209 SAP AG 1999

reating Program as D b-ect

Comer ran=er ogtec

ampgtec ype

Sor eD =or ogtec

aa ran=er proram

Srcre name

9900

(+A1

Cane comer

ZBCA+G

ZB

ustomer transfer ob-ect

umber bet)een 7000 and 7777

b-ect t(pe

Assignment to R ob-ect

Short tet for D ob-ectShort description

Data transfer program

ame of generated program

Structure name

A structure Cstructure la(out )ith this name is created in

the AAP Dictionar(

For ampeease transfer oects $ere not organiDed y 5amp oects ut y a G numer (00089

OOOO) The numer range O0009OOOO is reserved for customers

To create a connection to the ne$ G 9- you must assign the program to a 5amp oect

2reate a short tet for the G oect This tet $i appear in the method seection ist

Specify the program to e incuded

Specify a name for the structure to e created in the AAP ictionary

Note $he generated program appears under program type +N and not under program type

-

copy SAP AG BC420 12-74

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 7588

032

983209 SAP AG 1999

Adantages

Automatic program registration in the DW in

Release 48

ou can use all the functions defined for

standard ob-ects

1ception$ The (reate ampile ith data

function

If you incuded the oect in the ampeease $orench it is automaticay avaiae in the ampeease

B $orench

A the $orench functions are avaiae for your oect ecept for Create files ith transfer ata

copy SAP AG BC420 12-75

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 7688

038

983209 SAP AG 1999

ou are no) able to$

The Transaction Recorder$ Unit Summar(

Use the recording function in the LSMW to create

a batch input session )ith the data from the

eternal s(stem

Use the TA Recorder to create (our o)n data

transfer program

Anal(e programs that )or+ )ith batch input or

call transaction

Integrate the TA Recorder programs into the

DW

copy SAP AG BC420 12-76

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 7788

ercise 1

nit $ -ecorder

$opic 2reating etors

$ransaction -ecorder ercise 1

bull 2reating detors $ith eterna numer assignment

bull etor numers M9980008 to M9980080

Address data for detors $ith eterna numer assignment is to

e transferred using program ampFI700

ro4ect F5

Supro4ect +5

-un +575

$as)s 85 95 8S25

9oad program -F+00

8 In the foo$ing eercises eisting data is to e changed Therefore these detors $ith

eterna numer assignment have to first e created

898 4nder suproect 79 create run 797G9 $ith the name Detors ith

eternal numers

copy SAP AG BC420 12-77

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 7888

891 2reate the foo$ing three tass The tass map the foo$ing process steps

convert data create + session and process + session

89198 In run 797G9 create the foo$ing tas

9 Tas AP9

9 Name 2onvert data 9 Tas type AP

9 Program type +S-

Seect the foo$ing +S- oect

+S- proect 2109

+S- suproect 7I9

+S- oect I997GT

89191 In run 797G9 create the foo$ing tas 9 Tas +5A9

9 Name 2reate I session

Tas type +5A

9 Program type INP

Seect program ampFI700 $ith the variant

I97G9

8919 In run 797G9 create the foo$ing tas

9 Tas S29

9 Name Process I session Tas type S2

9 Program type amp7P5

Seect program ampS2S4 $ith the variant

S497G9

Note that you have to correct the seuence of the tass 2onvert data

create + session and process + session

4se the uttons

89 Start the run

The detors $i e created $ith eterna numer assignments

89 2hec in transaction F0 that the detors M9980008 to M9980080 have een

created

copy SAP AG BC420 12-78

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 7988

ercise

nit $ransaction -ecorder

$opic -ecording function in the 9S8(

bull 2reate a recording using the +S-

bull ltenerate a atch input session

2hange the detor address data in the amp System

Name of the recording +

Name of the file +2055+F9

8 2reate the recording 7I3 using the +S- ampecord the transaction F01 (2hange

detor)

898 efore you create the recording first test the transaction onineQ

For the recording use detor M9980008 5n the initia screen of the F01

maintain the foo$ing fieds ony

etor etor M9980008

2ompany code 0008

Address data seect

Note $he data record must e saved hile recording

891 aintain the names and the descriptions for the foo$ing fieds

Name city street posta code and teephone numereete a other fieds in screen 880 from the recording (eg S5ampT+ +AN8

SPampAS)

4se the same technica names as sho$n in the tae eo$ (automatic fied

mapping)

copy SAP AG BC420 12-79

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 8088

1 2reate the suproect 7I9 and the ne$ oect TA3 in your proect 2109

aintain the oect attriutes and seect the item atch input recording Seect your

recording 7I3

2reate the source structure address

2reate the source fieds according to the tae eo$ 5r copy them from proect 2109S37N suproect 7I900 oect TA900

198 Fie setup The data from the egacy system are dispayed in the foo$ing tae

Fied name Fied type Fied ength escription

N5 2 8B etor numer

NA7 2 Name

STamp77T 2 Street

2ITC 2 2ityPace of residence

MIP 2 80 Posta code

T7+ 2 8B Teephone numer

191 aintain the fied mapping 4se the automatic fied mapping (via menu item

7tras)

19 Specify the fies 5ny maintain the fie name of the source fie

Name of the fie 21099IFI+7

2odepage 8800

19 Import the data and convert them ispay the data in each caseQ

19 2reate a atch input session

19B ampun the atch input session

copy SAP AG BC420 12-80

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 8188

ercise 3

nit $ransaction -ecorder

$opic -ecording ith the $ -ecorder

bull ltenerate a recording using the TA recorder

bull Test the recording

2hange the address data of detors in the amp system

Name recording $+

Name of the file +2055+F9

8 2reate the recording TA37I3 using the transaction recorder ampecord the

transaction F01 (change detor)

898 4se detor M9980008 for the recording 5n the F01 initia screen ony

maintain the foo$ing fieds

etor etor M9980008

2ompany 2ode 0008

Address data seect

Note $he data record must e saved hen recording

eete a fieds that do not eist in the source fie 21099IFI+7 from screen

880 in the recording (eg 6NA89S5ampT+ 6NA89+AN8 6ANNQ9SPampAS) Note o not deete fieds ampF01946ampS and ampF0190880

Save the recording no$

1 S$itch to the recordings overvie$

198 Process the recording $ith the processing mode A (dispay a)

191 Process the recording $ith the processing mode RN (no dispay)

19 If the recording has een tested and no error has occurred generate a I session

and run it using the I monitor If an error shoud occur generate the recordingagainQ

copy SAP AG BC420 12-81

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 8288

From the recording generate the program M21037I3 in your deveopment cass

2109 Seect the foo$ing

bull ampead fied contents from fie

bull 2reate test data in the fie 2103dei3test3tt

98 Save this program and eecute it ltenerate one I session each and process it

2arry out the same steps again using the ca transaction

The generated program shoud no$ e changed so that fie 21099IFI+7 can e

read and processed

98 2hange the defaut vaue of the fie name (parameter dataset) in 21099

IFI+7

91 2hange the structure definition eete the company code fied and the address

data checo from the structure

9 2hange the su9routine ca perform dc3fied for the company code (KampF019

46ampSK) so that the vaue 0008 is transferred

9 2hange the su9routine ca perform dc3fied for the address data checo

(KampF0190880K) so that the vaue G is transferred

9 Start the program again and read the data from the fie 21099IFI+7 $ith

detor data ltenerate a I session $ith it and run it

copy SAP AG BC420 12-82

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 8388

033 Include DR16INCLUDE BDCRECX1

SELECTION-SCREEN BEGIN OF LINE

PARAMETERS SESSION RADIOBUTTON GROUP CTU create sessi SELECTION-SCREEN COMMENT $amp TEXT-S FOR FIELD SESSION

se(ecti-scree )siti +

PARAMETERS CTU RADIOBUTTON GROUP CTU ca(( trasacti

SELECTION-SCREEN COMMENT $amp TEXT-S FOR FIELD CTU

SELECTION-SCREEN END OF LINE

SELECTION-SCREEN BEGIN OF LINE

SELECTION-SCREEN COMMENT $amp TEXT-S1 FOR FIELD GROUP

se(ecti-scree )siti $+

PARAMETERS GROUP1$amp r) ae 0 sessi

SELECTION-SCREEN COMMENT $amp TEXT-S+ FOR FIELD CTUMODE

se(ecti-scree )siti

PARAMETERS CTUMODE LIE CTU2PARAMS-DISMODE DEFAULT 3N3

A4 s56 a(( 78)rs

E4 s56 78)r errr (8

N4 7 t 7is)(a8 78)r

SELECTION-SCREEN END OF LINE

SELECTION-SCREEN BEGIN OF LINE

SELECTION-SCREEN COMMENT $amp TEXT-S$ FOR FIELD USER

se(ecti-scree )siti $+

PARAMETERS4 USER1$amp DEFAULT S9-UNAME ser 0r sessi i atc5

SELECTION-SCREEN COMMENT $amp TEXT-S FOR FIELD CUPDATE

se(ecti-scree )siti

PARAMETERS CUPDATE LIE CTU2PARAMS-UPDMODE DEFAULT 3L3

S4 s8c5rs(8

A4 as8c5rs(8

L4 (ca(

SELECTION-SCREEN END OF LINE

SELECTION-SCREEN BEGIN OF LINE

SELECTION-SCREEN COMMENT $amp TEXT-S FOR FIELD EEP

se(ecti-scree )siti $+

PARAMETERS4 EEP AS CltECBOX 3 3 = 7e(ete sessi i0 0iis5e7

3X3 = gtee) sessi i0 0iis5e7

SELECTION-SCREEN COMMENT $amp TEXT-S FOR FIELD E2GROUP

copy SAP AG BC420 12-83

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 8488

se(ecti-scree )siti

)araeters E2GROUP1$amp r) ae 0 errr-sessi

SELECTION-SCREEN END OF LINE

SELECTION-SCREEN BEGIN OF LINE

SELECTION-SCREEN COMMENT $amp TEXT-S FOR FIELD ltOLDDATE

se(ecti-scree )siti $+

PARAMETERS4 ltOLDDATE LIE S9-DATUM

SELECTION-SCREEN COMMENT +11amp TEXT-S$ FOR FIELD E2USER

se(ecti-scree )siti

PARAMETERS4 E2USER1$amp DEFAULT S9-UNAME ser 0r errr-sessi

SELECTION-SCREEN END OF LINE

SELECTION-SCREEN BEGIN OF LINE

SELECTION-SCREEN COMMENT +11amp TEXT-S FOR FIELD E2EEP

se(ecti-scree )siti

PARAMETERS4 E2EEP AS CltECBOX 3 3 = 7e(ete sessi i0 0iis5e7

3X3 = gtee) sessi i0 0iis5e7

SELECTION-SCREEN END OF LINE

SELECTION-SCREEN BEGIN OF LINE

SELECTION-SCREEN COMMENT +11amp TEXT-S FOR FIELD E2ltDATE

se(ecti-scree )siti

PARAMETERS4 E2ltDATE LIE S9-DATUM

SELECTION-SCREEN END OF LINE

SELECTION-SCREEN SIP

SELECTION-SCREEN BEGIN OF LINE

SELECTION-SCREEN COMMENT 1amp TEXT-S1 FOR FIELD NODATA

PARAMETERS4 NODATA DEFAULT 33 LOER CASE 7ata

SELECTION-SCREEN END OF LINE

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

Batc5i)t7ata 0 si(e trasacti

DATA4 BDCDATA LIE BDCDATA OCCURS ITlt ltEADER LINE

essaes 0 ca(( trasacti

DATA4 MESSTAB LIE BDCMSGCOLL OCCURS ITlt ltEADER LINE

errr sessi )ee7 3 3 r 3X3amp

DATA4 E2GROUP2OPENED

essae tets

TABLES4 T1

copy SAP AG BC420 12-84

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 8588

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

at se(ecti scree

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

AT SELECTION-SCREEN

r) a7 ser st e 0i((e7 0r create sessi

IF SESSION = 3X3 AND

GROUP = SPACE OR USER = SPACE

MESSAGE E1MSamp

ENDIF

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

)e 7ataset

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

FORM OPEN2DATASET USING P2DATASET

OPEN DATASET P2DATASET IN TEXT MODE

IF S9-SUBRC

RITE4 TEXT-E S9-SUBRC

STOP

ENDIF

ENDFORM

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

c(se 7ataset

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

FORM CLOSE2DATASET USING P2DATASET

CLOSE DATASET P2DATASET

ENDFORM

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

create atc5i)t sessi

t 0r ca(( trasacti siamp

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

FORM OPEN2GROUP

IF SESSION = 3X3

SIP

RITE4 $amp 3Create r)3I1amp GROUP

SIP

)e atc5i)t r)

CALL FUNCTION 3BDC2OPEN2GROUP3

EXPORTING CLIENT = S9-MANDT

copy SAP AG BC420 12-85

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 8688

GROUP = GROUP

USER = USER

EEP = EEP

ltOLDDATE = ltOLDDATE

RITE4 amp 3BDC2OPEN2GROUP3I$amp

1$amp 3retrc7e43I+amp

S9-SUBRC

ENDIF

ENDFORM

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

e7 atc5i)t sessi

ca(( trasacti si4 errr sessiamp

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

FORM CLOSE2GROUP

IF SESSION = 3X3

c(se atc5i)t r)

CALL FUNCTION 3BDC2CLOSE2GROUP3

RITE4 amp 3BDC2CLOSE2GROUP3Iamp

1$amp 3retrc7e43I+amp

S9-SUBRC

ELSE

IF E2GROUP2OPENED = 3X3

CALL FUNCTION 3BDC2CLOSE2GROUP3

RITE4

RITE4 amp 3Fe5(era))e 6r7e eret3Iamp

ENDIF

ENDIF

ENDFORM

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

Start e6 trasacti accr7i t )araeters

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

FORM BDC2TRANSACTION USING TCODE

DATA4 L2MSTRINGamp

DATA4 L2SUBRC LIE S9-SUBRC

atc5 i)t sessi

IF SESSION = 3X3

CALL FUNCTION 3BDC2INSERT3

EXPORTING TCODE = TCODE

TABLES D9NPROTAB = BDCDATA

RITE4 3BDC2INSERT3Iamp

copy SAP AG BC420 12-86

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 8788

TCODE

3retrc7e43I+amp

S9-SUBRC

3RECORD43

S9-INDEX

ca(( trasacti si

ELSE

REFRESlt MESSTAB

CALL TRANSACTION TCODE USING BDCDATA

MODE CTUMODE

UPDATE CUPDATE

MESSAGES INTO MESSTAB

L2SUBRC = S9-SUBRC

RITE4 3CALL2TRANSACTION3

TCODE

3retrc7e43I+amp

L2SUBRC

3RECORD43

S9-INDEX

LOOP AT MESSTAB

SELECT SINGLE FROM T1 ltERE SPRSL = MESSTAB-MSGSPRA

AND ARBGB = MESSTAB-MSGID

AND MSGNR = MESSTAB-MSGNR

IF S9-SUBRC =

L2MSTRING = T1-TEXT

IF L2MSTRING CS 313

REPLACE 313 ITlt MESSTAB-MSGH1 INTO L2MSTRING

REPLACE 3$3 ITlt MESSTAB-MSGH$ INTO L2MSTRING

REPLACE 33 ITlt MESSTAB-MSGH INTO L2MSTRING

REPLACE 33 ITlt MESSTAB-MSGH INTO L2MSTRING

ELSE

REPLACE 33 ITlt MESSTAB-MSGH1 INTO L2MSTRING

REPLACE 33 ITlt MESSTAB-MSGH$ INTO L2MSTRING

REPLACE 33 ITlt MESSTAB-MSGH INTO L2MSTRING

REPLACE 33 ITlt MESSTAB-MSGH INTO L2MSTRING

ENDIF

CONDENSE L2MSTRING

RITE4 MESSTAB-MSGT9P L2MSTRING$+amp

ELSE

RITE4 MESSTAB

ENDIF

ENDLOOP

copy SAP AG BC420 12-87

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 8888

SIP

Eree 0e5(era))e

IF L2SUBRC AND E2GROUP SPACE

IF E2GROUP2OPENED = 3 3

CALL FUNCTION 3BDC2OPEN2GROUP3

EXPORTING CLIENT = S9-MANDT

GROUP = E2GROUP

USER = E2USER

EEP = E2EEP

ltOLDDATE = E2ltDATE

E2GROUP2OPENED = 3X3

ENDIF

CALL FUNCTION 3BDC2INSERT3

EXPORTING TCODE = TCODE

TABLES D9NPROTAB = BDCDATA

ENDIF

ENDIF

REFRESlt BDCDATA

ENDFORM

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

Start e6 scree

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

FORM BDC2D9NPRO USING PROGRAM D9NPRO

CLEAR BDCDATA

BDCDATA-PROGRAM = PROGRAM

BDCDATA-D9NPRO = D9NPRO

BDCDATA-D9NBEGIN = 3X3

APPEND BDCDATA

ENDFORM

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

Isert 0ie(7

Page 50: BC420_46C - 012The Transaction Recorder

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 5088

020

983209 SAP AG 1999

Structure of D Table

PRBRAM DPR D1BI 9AM 9ALPRBRAMPRBRAM DPRDPR D1BID1BI 9AM9AM 9AL9AL

SAPM90ampD 0602

R90ampD=UR 600000

R90ampDU=RS 0006

R90ampD=T=D =UA

SAPM90ampD 0660

=A6AM16 Smith

=A6PSTL 87000

=A6LAD6 US

=A6SPRAS 1

SAPM90ampD 06amp0

=A6ST1B US6amp428357DDATA

PRBRAM

DPR

D1BI

9AM

9AL

EAR

UM

EAR

EAR

EAR

40

4

6

6amp

6amp

D Module pool

D Screen number

D Start of screen

D 9ield name

D 9ield contents

9ield ame T(pe Length Short Tet

AAP Dictionar(

The 2 tae has the same structure as in a standard transfer

copy SAP AG BC420 12-50

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 5188

026

983209 SAP AG 1999

Read Structure

Recording

DATA BEGIN OF record data element BUKRS bukr$amp data element KTOKD ktokd$amp data element NA(EG) name$+amp data element SORT ortl$ampEND OF record-

record

Automaticall( generated

from recording

The structure of the fie is automaticay generated and is a$ays defined $ith the name amp725amp

The generated structure a$ays has the same ayout 7ach fied is defined y t$o generated ro$s

The first ro$ is a$ays a comment ro$ containing the tet J data eement and the data eement of

the screen fied from the recording In the net ro$ the fied itsef is defined $ith the name of the

data eement foo$ed y a three9digit position numer $hich specifies the ocation in the structure

The ength of the fied is set y the ength of the data eement If a fied is not defined through a data

eement the system uses the ength of the screen fied

copy SAP AG BC420 12-51

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 5288

02amp

983209 SAP AG 1999

pening and losing the 9ile

P1ltDATAS1T

LS1ltDATAS1T

FOR( oendataet USING dataet-O)EN DATASET dataet IN TET (ODE-

IF S01SUBR2 34 - 5RITE 6 te7t1e S01SUBR2-STO)-

ENDIF-

ENDFOR(-

FOR( cloedataet USING dataet-2OSE DATASET dataet-

ENDFOR(-

Include

DR16

The suroutine 5P7N3ATAS7T opens the seuentia fie

The suroutine 2+5S73ATAS7T coses the seuentia fie

copy SAP AG BC420 12-52

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 5388

02

983209 SAP AG 1999

9unction Modules for I Program

lient

Session name

Eold date

=eep session

D user name

RecordK

LI1T

BRUP

ELDDAT1

=11P

US1R

R1RD

DltP1ltBRUPDltP1ltBRUP

Transaction code

D table

TD1

DPRTA

DltIS1RTDltIS1RT

DltLS1ltBRUPDltLS1ltBRUP

pen Isessionpen Isession

Insert data for

transactions

Insert data for

transactions

lose I

session

lose I

session

The foo$ing function modues are provided for creating atch input sessions (function group

S2)

235P7N3ltamp54P

2reates a ne$ session and contains genera data for the $hoe session

23INS7ampT

Inserts a the data for a transaction into the session The transferred interna tae $ith the

structure 2ATA must contain a the data reuired for fuy processing the transaction

232+5S73ltamp54P

2oses the session after a the data has een inserted As soon as the session has een cosed it

can e processed

The interna tae $ith the structure 2ATA can ony contain atch input data for one singe

transaction run So the individua transactions are inserted into the atch input session in a oop

using severa 23INS7ampT cas

copy SAP AG BC420 12-53

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 5488

024

983209 SAP AG 2001

9unction Module DltP1ltBRUP

ALL 9UTI DltP1ltBRUPALL 9UTI DltP1ltBRUP

1PRTIB

LI1T client

BRUP session name

ELDDAT1 loc+ date

=11P delete flag

US1R bdc user name

R1RD recording

IMPRTIB

NID internal session +e(

11PTIS

1PRTIB

LI1T client

BRUP session name

ELDDAT1 loc+ date

=11P delete flag

US1R bdc user name

R1RD recording

IMPRTIB NID internal session +e(

11PTIS

-ith the function modue 235P7N3ltamp54P you can open a atch input session

The foo$ing parameters are mandatory

2+I7NT (cient)

ltamp54P (session name)

4S7amp (user name)

Note The 4S7amp must a$ays e specified This user name is reuired for processing the session

in atch mode

The foo$ing parameters are optiona

=5+AT7 specifies the eariest date on $hich the session can e started677P fag specifies $hether session shoud e deeted after it has een successfuy processed The

677P fag is ignored if the session contains errors

677P E K K means deete the session after processing (defaut vaue) H

677P E KGK means do not deete session

amp725amp E KGK ao$s you to create a recording instead of a I session

If gtI is specified the function modue returns the interna session ey This is needed to e ae to

differentiate sessions that have the same name

-ith 7G27PTI5NS you get various return vaues that can e ueried $ith SC9S4amp2

Note In onine mode the onine user is used for the authoriDation checs regardess of the user

name specified

copy SAP AG BC420 12-54

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 5588

022

983209 SAP AG 1999

Subprogram P1ltBRUP

P1ltBRUP

FOR( oen8rou-IF e9on -

2A FUN2TION BD2O)ENGROU) E)ORTING 2IENT lt1mandt GROU) 8rou USER uer KEE) kee

=ODDATE gtolddate-

ENDIF-ENDFOR(-

Include

DR16

The suprogram 5P7N3ltamp54P opens the atch input session

copy SAP AG BC420 12-55

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 5688

028

983209 SAP AG 1999

9unction Module DltIS1RT

ALL 9UTI DltIS1RTALL 9UTI DltIS1RT

IMPRT

TD1 Transaction code

PSTltLAL Update locall(

PRITIB print list

TAL1S DPRTA bdclttable

11PTIS

IMPRT

TD1 Transaction code

PSTltLAL Update locall(

PRITIB print list

TAL1S DPRTA bdclttable

11PTIS

-ith the function modue 23INS7ampT you can add transaction data to the session

Cou need an interna 2 tae to transfer the data

The foo$ing parameters are mandatory

T257 Transaction code

CNPamp5TA 2 tae

The foo$ing parameters are optiona

P5ST3+52A+ E KGK activates oca updating This means that the data to e updated is ept in the

appication server and updated in the ast step of the transaction This does not invove the update

process (For more information see course 28 Programming ataase 4pdates)

PampINTINlt E KGK 9 ists processed in I $i e printed immediatey -ith 7G27PTI5NS you get various return vaues that can e ueried $ith SC9S4amp2

copy SAP AG BC420 12-56

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 5788

023

983209 SAP AG 1999

Subprogram DltTRASATI

DltTRASATI

FOR( BD2TRANSA2TION USING tcode-

IF e9on -2A FUN2TION BD2INSERT

E)ORTING T2ODE tcode TABES D0N)ROTAB bdcdata-

ESE-

ENDIF-ENDFOR(-

T

Include

DR16

The suprogram 23TampANSA2TI5N moves the fied 2 tae either to a atch input session

or uses ca transaction to import the data into the system 5n the seection screen you can specify

$hether you $ant to create a session or you $ant to use ca transaction to process the data directy

The S7SSI5N fied is then set according to your seection

copy SAP AG BC420 12-57

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 5888

025

983209 SAP AG 1999

9unction Module DltLS1ltBRUP

ALL 9UTI DltLS1ltBRUP

11PTIS

TltP1 6

NU1U1lt1RRR amp

-ith the function modue 232+5S73ltamp54P you can cose a atch input session

In 7G27PTI5NS you get various return vaues that can e ueried $ith SC9S4amp2

copy SAP AG BC420 12-58

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 5988

027

983209 SAP AG 1999

Subprogram LS1ltBRUP

FOR( cloe8rou-IF e9on -cloe batcgt 9nut 8rou

2A FUN2TION BD22OSEGROU)-

ESE-IF e8rouoened -

2A FUN2TION BD22OSEGROU)-

ENDIF-ENDIF-

ENDFOR(-

LS1ltBRUPlose session

lose error session

Include

DR16

The suprogram 2+5S73ltamp54P coses the atch input session The suprogram differentiates

et$een a norma I session (S7SSI5N E G) and a session opened $hen ca transaction

encountered an error (73ltamp54P35P7N7 E G)

copy SAP AG BC420 12-59

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 6088

080

983209 SAP AG 1999

Subprograms DltDPRG Dlt9I1LD

DltDPR

Dlt9I1LD

FOR( bdc9eld USING nam al-IF al 34 nodata-2EAR bdcdata- bdcdata1nam nam- bdcdata1al al- A))END bdcdata-ENDIF-

ENDFOR(-

FOR( bdcdltnro USING ro8ram dltnro- 2EAR bdcdata-Bdcdata1ro8ram ro8ram-Bdcdata1dltnro dltnro-Bdcdata1dltnbe89n - A))END bdcdata-ENDFOR(-

Include

DR16

The incude 2amp72GG contains t$o suprograms 23CNPamp5 and 23FI7+

Suprogram 23CNPamp5 fis the 2 tae $ith program names and screen numers

Suprogram 23FI7+ fis the 2 tae $ith fied names and vaues

7ach suprogram creates an entry in the 2 tae

copy SAP AG BC420 12-60

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 6188

086

983209 SAP AG 1999

9illing the D Table

erorm bdcdltnro u9n8 SA)(FD +- erorm bdc9eld u9n8 BD22URSOR RFD1BUKRS- erorm bdc9eld u9n8 BD2OK2ODE 6- erorm bdc9eld u9n8 RFD1BUKRS record1BUKRS- erorm bdc9eld u9n8 RFD1KTOKD record1KTOKD-

erorm bdcdltnro u9n8 SA)(FD -

erorm bdc9eld u9n8 BD22URSOR KNA1S)RAS- erorm bdc9eld u9n8 BD2OK2ODE 6- erorm bdc9eld u9n8 KNA1NA(E record1NA(E-

erorm bdc9eld u9n8 KNA1SORT record1SORT-

Recording Benerated automaticall(

from the recording

)ERFOR( bdcdltnro USING SA)(FD +- )ERFOR( bdc9eld USING BD22URSOR RFD1BUKRS-)ERFOR( bdc9eld USING BD2OK2ODE 6-)ERFOR( bdc9eld USING RFD1BUKRS record1BUKRS-)ERFOR( bdc9eld USING RFD1KTOKD record1KTOKD-

)ERFOR( bdcdltnro USING SA)(FD -

)ERFOR( bdc9eld USING BD22URSOR KNA1S)RAS-)ERFOR( bdc9eld USING BD2OK2ODE 6-)ERFOR( bdc9eld USING KNA1NA(E record1NA(E-

)ERFOR( bdc9eld USING KNA1SORT record1SORT- ---

The 2 tae is fied $ith data from the recording The suroutines 23CNPamp5 and

23FI7+ are used for this

The suroutines are caed in the reuired structure or seuence

copy SAP AG BC420 12-61

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 6288

08amp

983209 SAP AG 1999

erie)

SAPDatabase

SeJuential9ile

SAPDatabase

ALL TRASATIALL TRASATI

SeJuential9ile

ATE IPUTATE IPUT

D TableD TableD TableD Table

I Monitor

T

In contrast to atch input you can use ca transaction to directy pass data to the diaog interface

$ithout using a atch input session Cou use an interna tae (2 tae same structure and ayout

as atch input) to temporariy store your screen data Then you ca the desired transaction in your

program

Note 5n average the 2a Transaction method is 8 to times faster than using atch Input

copy SAP AG BC420 12-62

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 6388

08

983209 SAP AG 1999

all Transaction Program$ 1ample

RE)ORT abcbdcdcdeb9ct-

)ARA(ETERS d9mode DEFAUT A

udmode DEFAUT S-FOR( calltranact9on-2A TRANSA2TION FD

USING bdcdata (ODE d9mode

U)DATE udmode-

IF lt1ubrc NE - 5RITE 6 ---

ENDIF-ENDFOR(-

Screen

00

Screen

100

Screen

An additiona system ro area is added for the caed transaction The system uses this area for

processing the individua screens in the transactionH the data from the tae is added here After the

transaction is processed the second ro area is reeasedH the system continues processing in the first

ro area

Notes

In contrast to atch input there is no error ogging (error sessions) here For processing the caed

transaction the system uses the authoriDations of the user that caed the transaction The 2 tae

can ony hod data for one transaction run at a time efore another transaction is caed and its data

can e added you must eecute a amp7Famp7S= for the 2 tae

copy SAP AG BC420 12-63

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 6488

084

983209 SAP AG 1999

ALL TRASATI C6

RE)ORT 777-

2A TRANSA2TION FD USING bdcdata (ODE E-

Default for MD1 is A

2A TRANSA2TION 3tranact9oncode4 USING 3bdc1table4 C (ODE A E N C-

-ith the parameter 57 you can seect a specific dispay mode for processing the transaction The

foo$ing three modes are avaiae

A (ispay a)

If you eecute the program a the screens and a their data are dispayed This is the defaut vaue

for the 57 in 2A++ TampANSA2TI5N

N (ispay nothing)

The screens are not dispayed at a regardess of $hether any of them contained errors As soon as

the transaction has een fuy processed contro is returned to your program (The vaue of the

parameter 4PAT7 determines $hether dataase updates are eecuted or not)

7 (ispay errors ony)As soon as an error occurs in a screen the transaction is s$itched to dispay mode so that you can

correct the errors

These dispay modes are the same as those in the atch input session processing

copy SAP AG BC420 12-64

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 6588

082

983209 SAP AG 1999

RE)ORT 777-

2A TRANSA2TION FD USING BD2DATA U)DATE -

ALL TRASATI Camp

RE)ORT 777-

2A TRANSA2TION FD USING bdcdata U)DATE -

2A TRANSA2TION 3tranact9oncode4 USING 3bdc1table4 C (ODE A E N C U)DATE A S C -

Default for UPDAT1 is A

-ith the parameter 4PAT7 you can contro ho$ dataase updates arising from a transaction are

carried out There are three options

A (asynchronous updating) The caed transaction does not $ait unti the dataase has een

updated it simpy for$ard the updates to the SAP update service This usuay speeds up the 2T

program This processing mode is N5T recommended for arge data sets as the caed transaction

does not receive a competion message from the update modue

The caing 2T program therefore cannot te if the transaction has een successfuy competed Cou

shoud use the updating administration function (transaction S8) to determine $hether updating

$as terminated eary The error anaysis correction functions for are ess hepfu than $ith

synchronous updating

S (synchronous updating) -ith synchronous updating the caed transaction $aits unti a the

updates have een competed So processing is so$er than $ith synchronous updating The caed

transaction can ho$ever report any updating errors to the program $hich maes error

anaysiscorrection easier

+ (local updating) $ith oca updating the dataase is not updated in a separate process it is

updated in the caers process (see appication hep documentation for the AAP ey$ord S7T

4PAT7 TAS6 +52A+)

copy SAP AG BC420 12-65

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 6688

088

983209 SAP AG 1999

ALL TRASATI C

RE)ORT 777-DATA mtab T0)E TABE OF bdcm8coll-

2A TRANSA2TION FD USING bdcdata (ESSAGES INTO mtab-

2A TRANSA2TION 3tranact9oncode4 USING 3bdc1table4 C (ODE A E N C U)DATE A S C (ESSAGES INTO 3metab4 C -

7SSAlt7S specifies that a system messages that are output during the eecution of a 2A++

TampANSA2TI5N are $ritten to the interna tae L7SSTA The interna tae must have the

structure 2Slt25++

4nie the cassica atch input processing $ith sessions 2A++ TampANSA2TI5N does not offer any

specia processing procedures for transactions containing errors There are no restart functions for

transactions that contain errors or that cause updating terminations

copy SAP AG BC420 12-66

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 6788

083

983209 SAP AG 1999

ALL TRASATI C4

RE)ORT 777-DATA mltot T0)E ctuaram-

2A TRANSA2TION FD USING BD2DATA

O)TIONS FRO( mltot-

2A TRANSA2TION 3tranact9oncode4 USING 3bdc1table4 C (ODE A E N C U)DATE A S C (ESSAGES INTO 3metab4 C O)TIONS FRO( ot C -

RE)ORT 777-DATA mltot T0)E ctuaram-2A TRANSA2TION FD USING bdcdata

O)TIONS FRO( mltot-

The addition 5PTI5NS enaes the ca transaction statement to e controed through a structure

The structure must have the dictionary type 2T43PAampAS

The addition 5PTI5NS Famp5 must not e comined either $ith the addition 57 or $ith

4PAT7 ore information on the net side

copy SAP AG BC420 12-67

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 6888

085

983209 SAP AG 1999

Structure TUltPARAMS

DISMD1 Procen mode anaoo o addon amp

UPDMD1 $pdae mode anaoo o addon $PA

ATTMD1 CA mode CA conro

D19SI1 orce de=a EndoE e drn procen

RAMMIT +o eD a Camp amp(

IPT +o a ac np eonF a F S-B+P SPAC

I1D +o a ac np eon a=er end o= BC daa

The components are defined as foo$s

The components 7FSIM7 ampA25IT N5INPT and N5I7N can have the foo$ing

vaues KGK E Ces or K K E No

If the addition 5PTI5NS Famp5 is not specified the foo$ing settings appy to the contro

parameters

IS57 from addition 57

4P57 from addition 4PAT7

2ATT57 2ATT not active

7FSIM7 o not not use defaut $indo$s siDe

ampA25IT Successfu eit at 25IT -5amp6

N5INPT atch input session active (SC9INPT E G)

N5I7N atch input session sti active after end of 2 data

copy SAP AG BC420 12-68

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 6988

087

983209 SAP AG 1999

SMSBID Message ID

SMSBT Message T(pe C1GIGWGSGA

SMSB Message umber

SMSB6 Message ariable 6

SMSBamp Message ariable amp

SMSB Message ariable

SMSB4 Message ariable 4

SMSBID Message ID

SMSBT Message T(pe C1GIGWGSGA

SMSB Message umber

SMSB6 Message ariable 6

SMSBamp Message ariable amp

SMSB Message ariable

SMSB4 Message ariable 4

Return code$

S(stem fields$

alue Meaning

0 Successful

6000 1rror in transaction

6000 1rror in processing call transaction

see also the s(stem fields specified

alue Meaning

0 Successful

6000 1rror in transaction

6000 1rror in processing call transaction

see also the s(stem fields specified

9ield name Meaning9ield name9ield name MeaningMeaning

Return ode and S(stem 9ields

The return code is used to specify $hether the caed transaction $as processed successfuy In

addition severa system fieds are fied The numer I type and variaes of the diaog message

output y the caed transaction Cou need this information to output the message tet

copy SAP AG BC420 12-69

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 7088

030

983209 SAP AG 1999

Benerated Program of the TA Recorder

REFRES= (ESSTAB-

2A TRANSA2TION tcode USING bdcdata (ODE ctumode U)DATE cudate (ESSAGES INTO metab-OO) AT metab- ENDOO)-IF lubrc 34 AND e8rou 34 S)A2E- IF e8rouoenend - 2A FUN2TION BD2O)ENGROU) E)ORTING ---------

--------- E8rouoened - ENDIF- 2A FUN2TION BD2INSERT E)ORTING T2ODE tcode TABES D0N)ROTAB bdcdata-ENDIF-REFRES= bdcdata-

Message table output

pen error session

Insert data record that

has errors into error

session

If you have seected ca transaction on the seection screen the generated program runs as foo$s

The onine transaction is caed $ith ca transaction and passed to tae 2ATA A the

messages arising during the ca transaction are put in the interna tae 7SSTA

7SSTA is output as a ist

If you have specified an error session ( 73ltamp54P L SPA27) on the seection screen and the

ca transaction comes across an error (+3S4amp2 L 0) the error session is opened The error

session is ho$ever ony opened once Then the data record is paced in the session

A the other data records that have errors $ith ca transaction are paced in the same session

copy SAP AG BC420 12-70

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 7188

036

983209 SAP AG 1999

The Transaction Recorder

PrinciplesPrinciples

Recording )ith the LSMWRecording )ith the LSMW

Principles of atch Input and all TransactionPrinciples of atch Input and all Transaction

Integrating the TA Program into the DWIntegrating the TA Program into the DW

Using the TA Recorder Using the TA Recorder

copy SAP AG BC420 12-71

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 7288

03amp

983209 SAP AG 1999

Integrating into the DW

Transfer program

AAP Dictionar(

Integrate

SDA0

SDA6

SDAamp

SDA

Cou can integrate the generated program into the G9- The structure of the fie must e created

in the AAP ictionary The taes SGA0 SGA8 SGA1 and SGA $i e fied

copy SAP AG BC420 12-72

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 7388

03

983209 SAP AG 1999

DW Release 42

Goo

-B eeae 45

aa ran=er ogtec

Int customer data transfer ob-ect

ecord =ed

Dece daa ran=er

d Goo

The ampunction ampor interatin TA recorder prora$s is

i$ple$ented in the

D+-B in Release

The recorder can e integrated as of ampeease and it is provided in the G9- ampeease

ltot to the G9- ampeease 5n the initia screen you can integrate programs y choosing ampoto

( +nt customer ata transfer o-ect

copy SAP AG BC420 12-73

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 7488

034

983209 SAP AG 1999

reating Program as D b-ect

Comer ran=er ogtec

ampgtec ype

Sor eD =or ogtec

aa ran=er proram

Srcre name

9900

(+A1

Cane comer

ZBCA+G

ZB

ustomer transfer ob-ect

umber bet)een 7000 and 7777

b-ect t(pe

Assignment to R ob-ect

Short tet for D ob-ectShort description

Data transfer program

ame of generated program

Structure name

A structure Cstructure la(out )ith this name is created in

the AAP Dictionar(

For ampeease transfer oects $ere not organiDed y 5amp oects ut y a G numer (00089

OOOO) The numer range O0009OOOO is reserved for customers

To create a connection to the ne$ G 9- you must assign the program to a 5amp oect

2reate a short tet for the G oect This tet $i appear in the method seection ist

Specify the program to e incuded

Specify a name for the structure to e created in the AAP ictionary

Note $he generated program appears under program type +N and not under program type

-

copy SAP AG BC420 12-74

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 7588

032

983209 SAP AG 1999

Adantages

Automatic program registration in the DW in

Release 48

ou can use all the functions defined for

standard ob-ects

1ception$ The (reate ampile ith data

function

If you incuded the oect in the ampeease $orench it is automaticay avaiae in the ampeease

B $orench

A the $orench functions are avaiae for your oect ecept for Create files ith transfer ata

copy SAP AG BC420 12-75

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 7688

038

983209 SAP AG 1999

ou are no) able to$

The Transaction Recorder$ Unit Summar(

Use the recording function in the LSMW to create

a batch input session )ith the data from the

eternal s(stem

Use the TA Recorder to create (our o)n data

transfer program

Anal(e programs that )or+ )ith batch input or

call transaction

Integrate the TA Recorder programs into the

DW

copy SAP AG BC420 12-76

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 7788

ercise 1

nit $ -ecorder

$opic 2reating etors

$ransaction -ecorder ercise 1

bull 2reating detors $ith eterna numer assignment

bull etor numers M9980008 to M9980080

Address data for detors $ith eterna numer assignment is to

e transferred using program ampFI700

ro4ect F5

Supro4ect +5

-un +575

$as)s 85 95 8S25

9oad program -F+00

8 In the foo$ing eercises eisting data is to e changed Therefore these detors $ith

eterna numer assignment have to first e created

898 4nder suproect 79 create run 797G9 $ith the name Detors ith

eternal numers

copy SAP AG BC420 12-77

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 7888

891 2reate the foo$ing three tass The tass map the foo$ing process steps

convert data create + session and process + session

89198 In run 797G9 create the foo$ing tas

9 Tas AP9

9 Name 2onvert data 9 Tas type AP

9 Program type +S-

Seect the foo$ing +S- oect

+S- proect 2109

+S- suproect 7I9

+S- oect I997GT

89191 In run 797G9 create the foo$ing tas 9 Tas +5A9

9 Name 2reate I session

Tas type +5A

9 Program type INP

Seect program ampFI700 $ith the variant

I97G9

8919 In run 797G9 create the foo$ing tas

9 Tas S29

9 Name Process I session Tas type S2

9 Program type amp7P5

Seect program ampS2S4 $ith the variant

S497G9

Note that you have to correct the seuence of the tass 2onvert data

create + session and process + session

4se the uttons

89 Start the run

The detors $i e created $ith eterna numer assignments

89 2hec in transaction F0 that the detors M9980008 to M9980080 have een

created

copy SAP AG BC420 12-78

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 7988

ercise

nit $ransaction -ecorder

$opic -ecording function in the 9S8(

bull 2reate a recording using the +S-

bull ltenerate a atch input session

2hange the detor address data in the amp System

Name of the recording +

Name of the file +2055+F9

8 2reate the recording 7I3 using the +S- ampecord the transaction F01 (2hange

detor)

898 efore you create the recording first test the transaction onineQ

For the recording use detor M9980008 5n the initia screen of the F01

maintain the foo$ing fieds ony

etor etor M9980008

2ompany code 0008

Address data seect

Note $he data record must e saved hile recording

891 aintain the names and the descriptions for the foo$ing fieds

Name city street posta code and teephone numereete a other fieds in screen 880 from the recording (eg S5ampT+ +AN8

SPampAS)

4se the same technica names as sho$n in the tae eo$ (automatic fied

mapping)

copy SAP AG BC420 12-79

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 8088

1 2reate the suproect 7I9 and the ne$ oect TA3 in your proect 2109

aintain the oect attriutes and seect the item atch input recording Seect your

recording 7I3

2reate the source structure address

2reate the source fieds according to the tae eo$ 5r copy them from proect 2109S37N suproect 7I900 oect TA900

198 Fie setup The data from the egacy system are dispayed in the foo$ing tae

Fied name Fied type Fied ength escription

N5 2 8B etor numer

NA7 2 Name

STamp77T 2 Street

2ITC 2 2ityPace of residence

MIP 2 80 Posta code

T7+ 2 8B Teephone numer

191 aintain the fied mapping 4se the automatic fied mapping (via menu item

7tras)

19 Specify the fies 5ny maintain the fie name of the source fie

Name of the fie 21099IFI+7

2odepage 8800

19 Import the data and convert them ispay the data in each caseQ

19 2reate a atch input session

19B ampun the atch input session

copy SAP AG BC420 12-80

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 8188

ercise 3

nit $ransaction -ecorder

$opic -ecording ith the $ -ecorder

bull ltenerate a recording using the TA recorder

bull Test the recording

2hange the address data of detors in the amp system

Name recording $+

Name of the file +2055+F9

8 2reate the recording TA37I3 using the transaction recorder ampecord the

transaction F01 (change detor)

898 4se detor M9980008 for the recording 5n the F01 initia screen ony

maintain the foo$ing fieds

etor etor M9980008

2ompany 2ode 0008

Address data seect

Note $he data record must e saved hen recording

eete a fieds that do not eist in the source fie 21099IFI+7 from screen

880 in the recording (eg 6NA89S5ampT+ 6NA89+AN8 6ANNQ9SPampAS) Note o not deete fieds ampF01946ampS and ampF0190880

Save the recording no$

1 S$itch to the recordings overvie$

198 Process the recording $ith the processing mode A (dispay a)

191 Process the recording $ith the processing mode RN (no dispay)

19 If the recording has een tested and no error has occurred generate a I session

and run it using the I monitor If an error shoud occur generate the recordingagainQ

copy SAP AG BC420 12-81

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 8288

From the recording generate the program M21037I3 in your deveopment cass

2109 Seect the foo$ing

bull ampead fied contents from fie

bull 2reate test data in the fie 2103dei3test3tt

98 Save this program and eecute it ltenerate one I session each and process it

2arry out the same steps again using the ca transaction

The generated program shoud no$ e changed so that fie 21099IFI+7 can e

read and processed

98 2hange the defaut vaue of the fie name (parameter dataset) in 21099

IFI+7

91 2hange the structure definition eete the company code fied and the address

data checo from the structure

9 2hange the su9routine ca perform dc3fied for the company code (KampF019

46ampSK) so that the vaue 0008 is transferred

9 2hange the su9routine ca perform dc3fied for the address data checo

(KampF0190880K) so that the vaue G is transferred

9 Start the program again and read the data from the fie 21099IFI+7 $ith

detor data ltenerate a I session $ith it and run it

copy SAP AG BC420 12-82

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 8388

033 Include DR16INCLUDE BDCRECX1

SELECTION-SCREEN BEGIN OF LINE

PARAMETERS SESSION RADIOBUTTON GROUP CTU create sessi SELECTION-SCREEN COMMENT $amp TEXT-S FOR FIELD SESSION

se(ecti-scree )siti +

PARAMETERS CTU RADIOBUTTON GROUP CTU ca(( trasacti

SELECTION-SCREEN COMMENT $amp TEXT-S FOR FIELD CTU

SELECTION-SCREEN END OF LINE

SELECTION-SCREEN BEGIN OF LINE

SELECTION-SCREEN COMMENT $amp TEXT-S1 FOR FIELD GROUP

se(ecti-scree )siti $+

PARAMETERS GROUP1$amp r) ae 0 sessi

SELECTION-SCREEN COMMENT $amp TEXT-S+ FOR FIELD CTUMODE

se(ecti-scree )siti

PARAMETERS CTUMODE LIE CTU2PARAMS-DISMODE DEFAULT 3N3

A4 s56 a(( 78)rs

E4 s56 78)r errr (8

N4 7 t 7is)(a8 78)r

SELECTION-SCREEN END OF LINE

SELECTION-SCREEN BEGIN OF LINE

SELECTION-SCREEN COMMENT $amp TEXT-S$ FOR FIELD USER

se(ecti-scree )siti $+

PARAMETERS4 USER1$amp DEFAULT S9-UNAME ser 0r sessi i atc5

SELECTION-SCREEN COMMENT $amp TEXT-S FOR FIELD CUPDATE

se(ecti-scree )siti

PARAMETERS CUPDATE LIE CTU2PARAMS-UPDMODE DEFAULT 3L3

S4 s8c5rs(8

A4 as8c5rs(8

L4 (ca(

SELECTION-SCREEN END OF LINE

SELECTION-SCREEN BEGIN OF LINE

SELECTION-SCREEN COMMENT $amp TEXT-S FOR FIELD EEP

se(ecti-scree )siti $+

PARAMETERS4 EEP AS CltECBOX 3 3 = 7e(ete sessi i0 0iis5e7

3X3 = gtee) sessi i0 0iis5e7

SELECTION-SCREEN COMMENT $amp TEXT-S FOR FIELD E2GROUP

copy SAP AG BC420 12-83

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 8488

se(ecti-scree )siti

)araeters E2GROUP1$amp r) ae 0 errr-sessi

SELECTION-SCREEN END OF LINE

SELECTION-SCREEN BEGIN OF LINE

SELECTION-SCREEN COMMENT $amp TEXT-S FOR FIELD ltOLDDATE

se(ecti-scree )siti $+

PARAMETERS4 ltOLDDATE LIE S9-DATUM

SELECTION-SCREEN COMMENT +11amp TEXT-S$ FOR FIELD E2USER

se(ecti-scree )siti

PARAMETERS4 E2USER1$amp DEFAULT S9-UNAME ser 0r errr-sessi

SELECTION-SCREEN END OF LINE

SELECTION-SCREEN BEGIN OF LINE

SELECTION-SCREEN COMMENT +11amp TEXT-S FOR FIELD E2EEP

se(ecti-scree )siti

PARAMETERS4 E2EEP AS CltECBOX 3 3 = 7e(ete sessi i0 0iis5e7

3X3 = gtee) sessi i0 0iis5e7

SELECTION-SCREEN END OF LINE

SELECTION-SCREEN BEGIN OF LINE

SELECTION-SCREEN COMMENT +11amp TEXT-S FOR FIELD E2ltDATE

se(ecti-scree )siti

PARAMETERS4 E2ltDATE LIE S9-DATUM

SELECTION-SCREEN END OF LINE

SELECTION-SCREEN SIP

SELECTION-SCREEN BEGIN OF LINE

SELECTION-SCREEN COMMENT 1amp TEXT-S1 FOR FIELD NODATA

PARAMETERS4 NODATA DEFAULT 33 LOER CASE 7ata

SELECTION-SCREEN END OF LINE

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

Batc5i)t7ata 0 si(e trasacti

DATA4 BDCDATA LIE BDCDATA OCCURS ITlt ltEADER LINE

essaes 0 ca(( trasacti

DATA4 MESSTAB LIE BDCMSGCOLL OCCURS ITlt ltEADER LINE

errr sessi )ee7 3 3 r 3X3amp

DATA4 E2GROUP2OPENED

essae tets

TABLES4 T1

copy SAP AG BC420 12-84

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 8588

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

at se(ecti scree

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

AT SELECTION-SCREEN

r) a7 ser st e 0i((e7 0r create sessi

IF SESSION = 3X3 AND

GROUP = SPACE OR USER = SPACE

MESSAGE E1MSamp

ENDIF

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

)e 7ataset

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

FORM OPEN2DATASET USING P2DATASET

OPEN DATASET P2DATASET IN TEXT MODE

IF S9-SUBRC

RITE4 TEXT-E S9-SUBRC

STOP

ENDIF

ENDFORM

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

c(se 7ataset

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

FORM CLOSE2DATASET USING P2DATASET

CLOSE DATASET P2DATASET

ENDFORM

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

create atc5i)t sessi

t 0r ca(( trasacti siamp

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

FORM OPEN2GROUP

IF SESSION = 3X3

SIP

RITE4 $amp 3Create r)3I1amp GROUP

SIP

)e atc5i)t r)

CALL FUNCTION 3BDC2OPEN2GROUP3

EXPORTING CLIENT = S9-MANDT

copy SAP AG BC420 12-85

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 8688

GROUP = GROUP

USER = USER

EEP = EEP

ltOLDDATE = ltOLDDATE

RITE4 amp 3BDC2OPEN2GROUP3I$amp

1$amp 3retrc7e43I+amp

S9-SUBRC

ENDIF

ENDFORM

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

e7 atc5i)t sessi

ca(( trasacti si4 errr sessiamp

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

FORM CLOSE2GROUP

IF SESSION = 3X3

c(se atc5i)t r)

CALL FUNCTION 3BDC2CLOSE2GROUP3

RITE4 amp 3BDC2CLOSE2GROUP3Iamp

1$amp 3retrc7e43I+amp

S9-SUBRC

ELSE

IF E2GROUP2OPENED = 3X3

CALL FUNCTION 3BDC2CLOSE2GROUP3

RITE4

RITE4 amp 3Fe5(era))e 6r7e eret3Iamp

ENDIF

ENDIF

ENDFORM

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

Start e6 trasacti accr7i t )araeters

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

FORM BDC2TRANSACTION USING TCODE

DATA4 L2MSTRINGamp

DATA4 L2SUBRC LIE S9-SUBRC

atc5 i)t sessi

IF SESSION = 3X3

CALL FUNCTION 3BDC2INSERT3

EXPORTING TCODE = TCODE

TABLES D9NPROTAB = BDCDATA

RITE4 3BDC2INSERT3Iamp

copy SAP AG BC420 12-86

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 8788

TCODE

3retrc7e43I+amp

S9-SUBRC

3RECORD43

S9-INDEX

ca(( trasacti si

ELSE

REFRESlt MESSTAB

CALL TRANSACTION TCODE USING BDCDATA

MODE CTUMODE

UPDATE CUPDATE

MESSAGES INTO MESSTAB

L2SUBRC = S9-SUBRC

RITE4 3CALL2TRANSACTION3

TCODE

3retrc7e43I+amp

L2SUBRC

3RECORD43

S9-INDEX

LOOP AT MESSTAB

SELECT SINGLE FROM T1 ltERE SPRSL = MESSTAB-MSGSPRA

AND ARBGB = MESSTAB-MSGID

AND MSGNR = MESSTAB-MSGNR

IF S9-SUBRC =

L2MSTRING = T1-TEXT

IF L2MSTRING CS 313

REPLACE 313 ITlt MESSTAB-MSGH1 INTO L2MSTRING

REPLACE 3$3 ITlt MESSTAB-MSGH$ INTO L2MSTRING

REPLACE 33 ITlt MESSTAB-MSGH INTO L2MSTRING

REPLACE 33 ITlt MESSTAB-MSGH INTO L2MSTRING

ELSE

REPLACE 33 ITlt MESSTAB-MSGH1 INTO L2MSTRING

REPLACE 33 ITlt MESSTAB-MSGH$ INTO L2MSTRING

REPLACE 33 ITlt MESSTAB-MSGH INTO L2MSTRING

REPLACE 33 ITlt MESSTAB-MSGH INTO L2MSTRING

ENDIF

CONDENSE L2MSTRING

RITE4 MESSTAB-MSGT9P L2MSTRING$+amp

ELSE

RITE4 MESSTAB

ENDIF

ENDLOOP

copy SAP AG BC420 12-87

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 8888

SIP

Eree 0e5(era))e

IF L2SUBRC AND E2GROUP SPACE

IF E2GROUP2OPENED = 3 3

CALL FUNCTION 3BDC2OPEN2GROUP3

EXPORTING CLIENT = S9-MANDT

GROUP = E2GROUP

USER = E2USER

EEP = E2EEP

ltOLDDATE = E2ltDATE

E2GROUP2OPENED = 3X3

ENDIF

CALL FUNCTION 3BDC2INSERT3

EXPORTING TCODE = TCODE

TABLES D9NPROTAB = BDCDATA

ENDIF

ENDIF

REFRESlt BDCDATA

ENDFORM

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

Start e6 scree

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

FORM BDC2D9NPRO USING PROGRAM D9NPRO

CLEAR BDCDATA

BDCDATA-PROGRAM = PROGRAM

BDCDATA-D9NPRO = D9NPRO

BDCDATA-D9NBEGIN = 3X3

APPEND BDCDATA

ENDFORM

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

Isert 0ie(7

Page 51: BC420_46C - 012The Transaction Recorder

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 5188

026

983209 SAP AG 1999

Read Structure

Recording

DATA BEGIN OF record data element BUKRS bukr$amp data element KTOKD ktokd$amp data element NA(EG) name$+amp data element SORT ortl$ampEND OF record-

record

Automaticall( generated

from recording

The structure of the fie is automaticay generated and is a$ays defined $ith the name amp725amp

The generated structure a$ays has the same ayout 7ach fied is defined y t$o generated ro$s

The first ro$ is a$ays a comment ro$ containing the tet J data eement and the data eement of

the screen fied from the recording In the net ro$ the fied itsef is defined $ith the name of the

data eement foo$ed y a three9digit position numer $hich specifies the ocation in the structure

The ength of the fied is set y the ength of the data eement If a fied is not defined through a data

eement the system uses the ength of the screen fied

copy SAP AG BC420 12-51

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 5288

02amp

983209 SAP AG 1999

pening and losing the 9ile

P1ltDATAS1T

LS1ltDATAS1T

FOR( oendataet USING dataet-O)EN DATASET dataet IN TET (ODE-

IF S01SUBR2 34 - 5RITE 6 te7t1e S01SUBR2-STO)-

ENDIF-

ENDFOR(-

FOR( cloedataet USING dataet-2OSE DATASET dataet-

ENDFOR(-

Include

DR16

The suroutine 5P7N3ATAS7T opens the seuentia fie

The suroutine 2+5S73ATAS7T coses the seuentia fie

copy SAP AG BC420 12-52

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 5388

02

983209 SAP AG 1999

9unction Modules for I Program

lient

Session name

Eold date

=eep session

D user name

RecordK

LI1T

BRUP

ELDDAT1

=11P

US1R

R1RD

DltP1ltBRUPDltP1ltBRUP

Transaction code

D table

TD1

DPRTA

DltIS1RTDltIS1RT

DltLS1ltBRUPDltLS1ltBRUP

pen Isessionpen Isession

Insert data for

transactions

Insert data for

transactions

lose I

session

lose I

session

The foo$ing function modues are provided for creating atch input sessions (function group

S2)

235P7N3ltamp54P

2reates a ne$ session and contains genera data for the $hoe session

23INS7ampT

Inserts a the data for a transaction into the session The transferred interna tae $ith the

structure 2ATA must contain a the data reuired for fuy processing the transaction

232+5S73ltamp54P

2oses the session after a the data has een inserted As soon as the session has een cosed it

can e processed

The interna tae $ith the structure 2ATA can ony contain atch input data for one singe

transaction run So the individua transactions are inserted into the atch input session in a oop

using severa 23INS7ampT cas

copy SAP AG BC420 12-53

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 5488

024

983209 SAP AG 2001

9unction Module DltP1ltBRUP

ALL 9UTI DltP1ltBRUPALL 9UTI DltP1ltBRUP

1PRTIB

LI1T client

BRUP session name

ELDDAT1 loc+ date

=11P delete flag

US1R bdc user name

R1RD recording

IMPRTIB

NID internal session +e(

11PTIS

1PRTIB

LI1T client

BRUP session name

ELDDAT1 loc+ date

=11P delete flag

US1R bdc user name

R1RD recording

IMPRTIB NID internal session +e(

11PTIS

-ith the function modue 235P7N3ltamp54P you can open a atch input session

The foo$ing parameters are mandatory

2+I7NT (cient)

ltamp54P (session name)

4S7amp (user name)

Note The 4S7amp must a$ays e specified This user name is reuired for processing the session

in atch mode

The foo$ing parameters are optiona

=5+AT7 specifies the eariest date on $hich the session can e started677P fag specifies $hether session shoud e deeted after it has een successfuy processed The

677P fag is ignored if the session contains errors

677P E K K means deete the session after processing (defaut vaue) H

677P E KGK means do not deete session

amp725amp E KGK ao$s you to create a recording instead of a I session

If gtI is specified the function modue returns the interna session ey This is needed to e ae to

differentiate sessions that have the same name

-ith 7G27PTI5NS you get various return vaues that can e ueried $ith SC9S4amp2

Note In onine mode the onine user is used for the authoriDation checs regardess of the user

name specified

copy SAP AG BC420 12-54

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 5588

022

983209 SAP AG 1999

Subprogram P1ltBRUP

P1ltBRUP

FOR( oen8rou-IF e9on -

2A FUN2TION BD2O)ENGROU) E)ORTING 2IENT lt1mandt GROU) 8rou USER uer KEE) kee

=ODDATE gtolddate-

ENDIF-ENDFOR(-

Include

DR16

The suprogram 5P7N3ltamp54P opens the atch input session

copy SAP AG BC420 12-55

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 5688

028

983209 SAP AG 1999

9unction Module DltIS1RT

ALL 9UTI DltIS1RTALL 9UTI DltIS1RT

IMPRT

TD1 Transaction code

PSTltLAL Update locall(

PRITIB print list

TAL1S DPRTA bdclttable

11PTIS

IMPRT

TD1 Transaction code

PSTltLAL Update locall(

PRITIB print list

TAL1S DPRTA bdclttable

11PTIS

-ith the function modue 23INS7ampT you can add transaction data to the session

Cou need an interna 2 tae to transfer the data

The foo$ing parameters are mandatory

T257 Transaction code

CNPamp5TA 2 tae

The foo$ing parameters are optiona

P5ST3+52A+ E KGK activates oca updating This means that the data to e updated is ept in the

appication server and updated in the ast step of the transaction This does not invove the update

process (For more information see course 28 Programming ataase 4pdates)

PampINTINlt E KGK 9 ists processed in I $i e printed immediatey -ith 7G27PTI5NS you get various return vaues that can e ueried $ith SC9S4amp2

copy SAP AG BC420 12-56

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 5788

023

983209 SAP AG 1999

Subprogram DltTRASATI

DltTRASATI

FOR( BD2TRANSA2TION USING tcode-

IF e9on -2A FUN2TION BD2INSERT

E)ORTING T2ODE tcode TABES D0N)ROTAB bdcdata-

ESE-

ENDIF-ENDFOR(-

T

Include

DR16

The suprogram 23TampANSA2TI5N moves the fied 2 tae either to a atch input session

or uses ca transaction to import the data into the system 5n the seection screen you can specify

$hether you $ant to create a session or you $ant to use ca transaction to process the data directy

The S7SSI5N fied is then set according to your seection

copy SAP AG BC420 12-57

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 5888

025

983209 SAP AG 1999

9unction Module DltLS1ltBRUP

ALL 9UTI DltLS1ltBRUP

11PTIS

TltP1 6

NU1U1lt1RRR amp

-ith the function modue 232+5S73ltamp54P you can cose a atch input session

In 7G27PTI5NS you get various return vaues that can e ueried $ith SC9S4amp2

copy SAP AG BC420 12-58

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 5988

027

983209 SAP AG 1999

Subprogram LS1ltBRUP

FOR( cloe8rou-IF e9on -cloe batcgt 9nut 8rou

2A FUN2TION BD22OSEGROU)-

ESE-IF e8rouoened -

2A FUN2TION BD22OSEGROU)-

ENDIF-ENDIF-

ENDFOR(-

LS1ltBRUPlose session

lose error session

Include

DR16

The suprogram 2+5S73ltamp54P coses the atch input session The suprogram differentiates

et$een a norma I session (S7SSI5N E G) and a session opened $hen ca transaction

encountered an error (73ltamp54P35P7N7 E G)

copy SAP AG BC420 12-59

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 6088

080

983209 SAP AG 1999

Subprograms DltDPRG Dlt9I1LD

DltDPR

Dlt9I1LD

FOR( bdc9eld USING nam al-IF al 34 nodata-2EAR bdcdata- bdcdata1nam nam- bdcdata1al al- A))END bdcdata-ENDIF-

ENDFOR(-

FOR( bdcdltnro USING ro8ram dltnro- 2EAR bdcdata-Bdcdata1ro8ram ro8ram-Bdcdata1dltnro dltnro-Bdcdata1dltnbe89n - A))END bdcdata-ENDFOR(-

Include

DR16

The incude 2amp72GG contains t$o suprograms 23CNPamp5 and 23FI7+

Suprogram 23CNPamp5 fis the 2 tae $ith program names and screen numers

Suprogram 23FI7+ fis the 2 tae $ith fied names and vaues

7ach suprogram creates an entry in the 2 tae

copy SAP AG BC420 12-60

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 6188

086

983209 SAP AG 1999

9illing the D Table

erorm bdcdltnro u9n8 SA)(FD +- erorm bdc9eld u9n8 BD22URSOR RFD1BUKRS- erorm bdc9eld u9n8 BD2OK2ODE 6- erorm bdc9eld u9n8 RFD1BUKRS record1BUKRS- erorm bdc9eld u9n8 RFD1KTOKD record1KTOKD-

erorm bdcdltnro u9n8 SA)(FD -

erorm bdc9eld u9n8 BD22URSOR KNA1S)RAS- erorm bdc9eld u9n8 BD2OK2ODE 6- erorm bdc9eld u9n8 KNA1NA(E record1NA(E-

erorm bdc9eld u9n8 KNA1SORT record1SORT-

Recording Benerated automaticall(

from the recording

)ERFOR( bdcdltnro USING SA)(FD +- )ERFOR( bdc9eld USING BD22URSOR RFD1BUKRS-)ERFOR( bdc9eld USING BD2OK2ODE 6-)ERFOR( bdc9eld USING RFD1BUKRS record1BUKRS-)ERFOR( bdc9eld USING RFD1KTOKD record1KTOKD-

)ERFOR( bdcdltnro USING SA)(FD -

)ERFOR( bdc9eld USING BD22URSOR KNA1S)RAS-)ERFOR( bdc9eld USING BD2OK2ODE 6-)ERFOR( bdc9eld USING KNA1NA(E record1NA(E-

)ERFOR( bdc9eld USING KNA1SORT record1SORT- ---

The 2 tae is fied $ith data from the recording The suroutines 23CNPamp5 and

23FI7+ are used for this

The suroutines are caed in the reuired structure or seuence

copy SAP AG BC420 12-61

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 6288

08amp

983209 SAP AG 1999

erie)

SAPDatabase

SeJuential9ile

SAPDatabase

ALL TRASATIALL TRASATI

SeJuential9ile

ATE IPUTATE IPUT

D TableD TableD TableD Table

I Monitor

T

In contrast to atch input you can use ca transaction to directy pass data to the diaog interface

$ithout using a atch input session Cou use an interna tae (2 tae same structure and ayout

as atch input) to temporariy store your screen data Then you ca the desired transaction in your

program

Note 5n average the 2a Transaction method is 8 to times faster than using atch Input

copy SAP AG BC420 12-62

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 6388

08

983209 SAP AG 1999

all Transaction Program$ 1ample

RE)ORT abcbdcdcdeb9ct-

)ARA(ETERS d9mode DEFAUT A

udmode DEFAUT S-FOR( calltranact9on-2A TRANSA2TION FD

USING bdcdata (ODE d9mode

U)DATE udmode-

IF lt1ubrc NE - 5RITE 6 ---

ENDIF-ENDFOR(-

Screen

00

Screen

100

Screen

An additiona system ro area is added for the caed transaction The system uses this area for

processing the individua screens in the transactionH the data from the tae is added here After the

transaction is processed the second ro area is reeasedH the system continues processing in the first

ro area

Notes

In contrast to atch input there is no error ogging (error sessions) here For processing the caed

transaction the system uses the authoriDations of the user that caed the transaction The 2 tae

can ony hod data for one transaction run at a time efore another transaction is caed and its data

can e added you must eecute a amp7Famp7S= for the 2 tae

copy SAP AG BC420 12-63

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 6488

084

983209 SAP AG 1999

ALL TRASATI C6

RE)ORT 777-

2A TRANSA2TION FD USING bdcdata (ODE E-

Default for MD1 is A

2A TRANSA2TION 3tranact9oncode4 USING 3bdc1table4 C (ODE A E N C-

-ith the parameter 57 you can seect a specific dispay mode for processing the transaction The

foo$ing three modes are avaiae

A (ispay a)

If you eecute the program a the screens and a their data are dispayed This is the defaut vaue

for the 57 in 2A++ TampANSA2TI5N

N (ispay nothing)

The screens are not dispayed at a regardess of $hether any of them contained errors As soon as

the transaction has een fuy processed contro is returned to your program (The vaue of the

parameter 4PAT7 determines $hether dataase updates are eecuted or not)

7 (ispay errors ony)As soon as an error occurs in a screen the transaction is s$itched to dispay mode so that you can

correct the errors

These dispay modes are the same as those in the atch input session processing

copy SAP AG BC420 12-64

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 6588

082

983209 SAP AG 1999

RE)ORT 777-

2A TRANSA2TION FD USING BD2DATA U)DATE -

ALL TRASATI Camp

RE)ORT 777-

2A TRANSA2TION FD USING bdcdata U)DATE -

2A TRANSA2TION 3tranact9oncode4 USING 3bdc1table4 C (ODE A E N C U)DATE A S C -

Default for UPDAT1 is A

-ith the parameter 4PAT7 you can contro ho$ dataase updates arising from a transaction are

carried out There are three options

A (asynchronous updating) The caed transaction does not $ait unti the dataase has een

updated it simpy for$ard the updates to the SAP update service This usuay speeds up the 2T

program This processing mode is N5T recommended for arge data sets as the caed transaction

does not receive a competion message from the update modue

The caing 2T program therefore cannot te if the transaction has een successfuy competed Cou

shoud use the updating administration function (transaction S8) to determine $hether updating

$as terminated eary The error anaysis correction functions for are ess hepfu than $ith

synchronous updating

S (synchronous updating) -ith synchronous updating the caed transaction $aits unti a the

updates have een competed So processing is so$er than $ith synchronous updating The caed

transaction can ho$ever report any updating errors to the program $hich maes error

anaysiscorrection easier

+ (local updating) $ith oca updating the dataase is not updated in a separate process it is

updated in the caers process (see appication hep documentation for the AAP ey$ord S7T

4PAT7 TAS6 +52A+)

copy SAP AG BC420 12-65

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 6688

088

983209 SAP AG 1999

ALL TRASATI C

RE)ORT 777-DATA mtab T0)E TABE OF bdcm8coll-

2A TRANSA2TION FD USING bdcdata (ESSAGES INTO mtab-

2A TRANSA2TION 3tranact9oncode4 USING 3bdc1table4 C (ODE A E N C U)DATE A S C (ESSAGES INTO 3metab4 C -

7SSAlt7S specifies that a system messages that are output during the eecution of a 2A++

TampANSA2TI5N are $ritten to the interna tae L7SSTA The interna tae must have the

structure 2Slt25++

4nie the cassica atch input processing $ith sessions 2A++ TampANSA2TI5N does not offer any

specia processing procedures for transactions containing errors There are no restart functions for

transactions that contain errors or that cause updating terminations

copy SAP AG BC420 12-66

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 6788

083

983209 SAP AG 1999

ALL TRASATI C4

RE)ORT 777-DATA mltot T0)E ctuaram-

2A TRANSA2TION FD USING BD2DATA

O)TIONS FRO( mltot-

2A TRANSA2TION 3tranact9oncode4 USING 3bdc1table4 C (ODE A E N C U)DATE A S C (ESSAGES INTO 3metab4 C O)TIONS FRO( ot C -

RE)ORT 777-DATA mltot T0)E ctuaram-2A TRANSA2TION FD USING bdcdata

O)TIONS FRO( mltot-

The addition 5PTI5NS enaes the ca transaction statement to e controed through a structure

The structure must have the dictionary type 2T43PAampAS

The addition 5PTI5NS Famp5 must not e comined either $ith the addition 57 or $ith

4PAT7 ore information on the net side

copy SAP AG BC420 12-67

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 6888

085

983209 SAP AG 1999

Structure TUltPARAMS

DISMD1 Procen mode anaoo o addon amp

UPDMD1 $pdae mode anaoo o addon $PA

ATTMD1 CA mode CA conro

D19SI1 orce de=a EndoE e drn procen

RAMMIT +o eD a Camp amp(

IPT +o a ac np eonF a F S-B+P SPAC

I1D +o a ac np eon a=er end o= BC daa

The components are defined as foo$s

The components 7FSIM7 ampA25IT N5INPT and N5I7N can have the foo$ing

vaues KGK E Ces or K K E No

If the addition 5PTI5NS Famp5 is not specified the foo$ing settings appy to the contro

parameters

IS57 from addition 57

4P57 from addition 4PAT7

2ATT57 2ATT not active

7FSIM7 o not not use defaut $indo$s siDe

ampA25IT Successfu eit at 25IT -5amp6

N5INPT atch input session active (SC9INPT E G)

N5I7N atch input session sti active after end of 2 data

copy SAP AG BC420 12-68

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 6988

087

983209 SAP AG 1999

SMSBID Message ID

SMSBT Message T(pe C1GIGWGSGA

SMSB Message umber

SMSB6 Message ariable 6

SMSBamp Message ariable amp

SMSB Message ariable

SMSB4 Message ariable 4

SMSBID Message ID

SMSBT Message T(pe C1GIGWGSGA

SMSB Message umber

SMSB6 Message ariable 6

SMSBamp Message ariable amp

SMSB Message ariable

SMSB4 Message ariable 4

Return code$

S(stem fields$

alue Meaning

0 Successful

6000 1rror in transaction

6000 1rror in processing call transaction

see also the s(stem fields specified

alue Meaning

0 Successful

6000 1rror in transaction

6000 1rror in processing call transaction

see also the s(stem fields specified

9ield name Meaning9ield name9ield name MeaningMeaning

Return ode and S(stem 9ields

The return code is used to specify $hether the caed transaction $as processed successfuy In

addition severa system fieds are fied The numer I type and variaes of the diaog message

output y the caed transaction Cou need this information to output the message tet

copy SAP AG BC420 12-69

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 7088

030

983209 SAP AG 1999

Benerated Program of the TA Recorder

REFRES= (ESSTAB-

2A TRANSA2TION tcode USING bdcdata (ODE ctumode U)DATE cudate (ESSAGES INTO metab-OO) AT metab- ENDOO)-IF lubrc 34 AND e8rou 34 S)A2E- IF e8rouoenend - 2A FUN2TION BD2O)ENGROU) E)ORTING ---------

--------- E8rouoened - ENDIF- 2A FUN2TION BD2INSERT E)ORTING T2ODE tcode TABES D0N)ROTAB bdcdata-ENDIF-REFRES= bdcdata-

Message table output

pen error session

Insert data record that

has errors into error

session

If you have seected ca transaction on the seection screen the generated program runs as foo$s

The onine transaction is caed $ith ca transaction and passed to tae 2ATA A the

messages arising during the ca transaction are put in the interna tae 7SSTA

7SSTA is output as a ist

If you have specified an error session ( 73ltamp54P L SPA27) on the seection screen and the

ca transaction comes across an error (+3S4amp2 L 0) the error session is opened The error

session is ho$ever ony opened once Then the data record is paced in the session

A the other data records that have errors $ith ca transaction are paced in the same session

copy SAP AG BC420 12-70

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 7188

036

983209 SAP AG 1999

The Transaction Recorder

PrinciplesPrinciples

Recording )ith the LSMWRecording )ith the LSMW

Principles of atch Input and all TransactionPrinciples of atch Input and all Transaction

Integrating the TA Program into the DWIntegrating the TA Program into the DW

Using the TA Recorder Using the TA Recorder

copy SAP AG BC420 12-71

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 7288

03amp

983209 SAP AG 1999

Integrating into the DW

Transfer program

AAP Dictionar(

Integrate

SDA0

SDA6

SDAamp

SDA

Cou can integrate the generated program into the G9- The structure of the fie must e created

in the AAP ictionary The taes SGA0 SGA8 SGA1 and SGA $i e fied

copy SAP AG BC420 12-72

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 7388

03

983209 SAP AG 1999

DW Release 42

Goo

-B eeae 45

aa ran=er ogtec

Int customer data transfer ob-ect

ecord =ed

Dece daa ran=er

d Goo

The ampunction ampor interatin TA recorder prora$s is

i$ple$ented in the

D+-B in Release

The recorder can e integrated as of ampeease and it is provided in the G9- ampeease

ltot to the G9- ampeease 5n the initia screen you can integrate programs y choosing ampoto

( +nt customer ata transfer o-ect

copy SAP AG BC420 12-73

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 7488

034

983209 SAP AG 1999

reating Program as D b-ect

Comer ran=er ogtec

ampgtec ype

Sor eD =or ogtec

aa ran=er proram

Srcre name

9900

(+A1

Cane comer

ZBCA+G

ZB

ustomer transfer ob-ect

umber bet)een 7000 and 7777

b-ect t(pe

Assignment to R ob-ect

Short tet for D ob-ectShort description

Data transfer program

ame of generated program

Structure name

A structure Cstructure la(out )ith this name is created in

the AAP Dictionar(

For ampeease transfer oects $ere not organiDed y 5amp oects ut y a G numer (00089

OOOO) The numer range O0009OOOO is reserved for customers

To create a connection to the ne$ G 9- you must assign the program to a 5amp oect

2reate a short tet for the G oect This tet $i appear in the method seection ist

Specify the program to e incuded

Specify a name for the structure to e created in the AAP ictionary

Note $he generated program appears under program type +N and not under program type

-

copy SAP AG BC420 12-74

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 7588

032

983209 SAP AG 1999

Adantages

Automatic program registration in the DW in

Release 48

ou can use all the functions defined for

standard ob-ects

1ception$ The (reate ampile ith data

function

If you incuded the oect in the ampeease $orench it is automaticay avaiae in the ampeease

B $orench

A the $orench functions are avaiae for your oect ecept for Create files ith transfer ata

copy SAP AG BC420 12-75

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 7688

038

983209 SAP AG 1999

ou are no) able to$

The Transaction Recorder$ Unit Summar(

Use the recording function in the LSMW to create

a batch input session )ith the data from the

eternal s(stem

Use the TA Recorder to create (our o)n data

transfer program

Anal(e programs that )or+ )ith batch input or

call transaction

Integrate the TA Recorder programs into the

DW

copy SAP AG BC420 12-76

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 7788

ercise 1

nit $ -ecorder

$opic 2reating etors

$ransaction -ecorder ercise 1

bull 2reating detors $ith eterna numer assignment

bull etor numers M9980008 to M9980080

Address data for detors $ith eterna numer assignment is to

e transferred using program ampFI700

ro4ect F5

Supro4ect +5

-un +575

$as)s 85 95 8S25

9oad program -F+00

8 In the foo$ing eercises eisting data is to e changed Therefore these detors $ith

eterna numer assignment have to first e created

898 4nder suproect 79 create run 797G9 $ith the name Detors ith

eternal numers

copy SAP AG BC420 12-77

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 7888

891 2reate the foo$ing three tass The tass map the foo$ing process steps

convert data create + session and process + session

89198 In run 797G9 create the foo$ing tas

9 Tas AP9

9 Name 2onvert data 9 Tas type AP

9 Program type +S-

Seect the foo$ing +S- oect

+S- proect 2109

+S- suproect 7I9

+S- oect I997GT

89191 In run 797G9 create the foo$ing tas 9 Tas +5A9

9 Name 2reate I session

Tas type +5A

9 Program type INP

Seect program ampFI700 $ith the variant

I97G9

8919 In run 797G9 create the foo$ing tas

9 Tas S29

9 Name Process I session Tas type S2

9 Program type amp7P5

Seect program ampS2S4 $ith the variant

S497G9

Note that you have to correct the seuence of the tass 2onvert data

create + session and process + session

4se the uttons

89 Start the run

The detors $i e created $ith eterna numer assignments

89 2hec in transaction F0 that the detors M9980008 to M9980080 have een

created

copy SAP AG BC420 12-78

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 7988

ercise

nit $ransaction -ecorder

$opic -ecording function in the 9S8(

bull 2reate a recording using the +S-

bull ltenerate a atch input session

2hange the detor address data in the amp System

Name of the recording +

Name of the file +2055+F9

8 2reate the recording 7I3 using the +S- ampecord the transaction F01 (2hange

detor)

898 efore you create the recording first test the transaction onineQ

For the recording use detor M9980008 5n the initia screen of the F01

maintain the foo$ing fieds ony

etor etor M9980008

2ompany code 0008

Address data seect

Note $he data record must e saved hile recording

891 aintain the names and the descriptions for the foo$ing fieds

Name city street posta code and teephone numereete a other fieds in screen 880 from the recording (eg S5ampT+ +AN8

SPampAS)

4se the same technica names as sho$n in the tae eo$ (automatic fied

mapping)

copy SAP AG BC420 12-79

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 8088

1 2reate the suproect 7I9 and the ne$ oect TA3 in your proect 2109

aintain the oect attriutes and seect the item atch input recording Seect your

recording 7I3

2reate the source structure address

2reate the source fieds according to the tae eo$ 5r copy them from proect 2109S37N suproect 7I900 oect TA900

198 Fie setup The data from the egacy system are dispayed in the foo$ing tae

Fied name Fied type Fied ength escription

N5 2 8B etor numer

NA7 2 Name

STamp77T 2 Street

2ITC 2 2ityPace of residence

MIP 2 80 Posta code

T7+ 2 8B Teephone numer

191 aintain the fied mapping 4se the automatic fied mapping (via menu item

7tras)

19 Specify the fies 5ny maintain the fie name of the source fie

Name of the fie 21099IFI+7

2odepage 8800

19 Import the data and convert them ispay the data in each caseQ

19 2reate a atch input session

19B ampun the atch input session

copy SAP AG BC420 12-80

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 8188

ercise 3

nit $ransaction -ecorder

$opic -ecording ith the $ -ecorder

bull ltenerate a recording using the TA recorder

bull Test the recording

2hange the address data of detors in the amp system

Name recording $+

Name of the file +2055+F9

8 2reate the recording TA37I3 using the transaction recorder ampecord the

transaction F01 (change detor)

898 4se detor M9980008 for the recording 5n the F01 initia screen ony

maintain the foo$ing fieds

etor etor M9980008

2ompany 2ode 0008

Address data seect

Note $he data record must e saved hen recording

eete a fieds that do not eist in the source fie 21099IFI+7 from screen

880 in the recording (eg 6NA89S5ampT+ 6NA89+AN8 6ANNQ9SPampAS) Note o not deete fieds ampF01946ampS and ampF0190880

Save the recording no$

1 S$itch to the recordings overvie$

198 Process the recording $ith the processing mode A (dispay a)

191 Process the recording $ith the processing mode RN (no dispay)

19 If the recording has een tested and no error has occurred generate a I session

and run it using the I monitor If an error shoud occur generate the recordingagainQ

copy SAP AG BC420 12-81

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 8288

From the recording generate the program M21037I3 in your deveopment cass

2109 Seect the foo$ing

bull ampead fied contents from fie

bull 2reate test data in the fie 2103dei3test3tt

98 Save this program and eecute it ltenerate one I session each and process it

2arry out the same steps again using the ca transaction

The generated program shoud no$ e changed so that fie 21099IFI+7 can e

read and processed

98 2hange the defaut vaue of the fie name (parameter dataset) in 21099

IFI+7

91 2hange the structure definition eete the company code fied and the address

data checo from the structure

9 2hange the su9routine ca perform dc3fied for the company code (KampF019

46ampSK) so that the vaue 0008 is transferred

9 2hange the su9routine ca perform dc3fied for the address data checo

(KampF0190880K) so that the vaue G is transferred

9 Start the program again and read the data from the fie 21099IFI+7 $ith

detor data ltenerate a I session $ith it and run it

copy SAP AG BC420 12-82

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 8388

033 Include DR16INCLUDE BDCRECX1

SELECTION-SCREEN BEGIN OF LINE

PARAMETERS SESSION RADIOBUTTON GROUP CTU create sessi SELECTION-SCREEN COMMENT $amp TEXT-S FOR FIELD SESSION

se(ecti-scree )siti +

PARAMETERS CTU RADIOBUTTON GROUP CTU ca(( trasacti

SELECTION-SCREEN COMMENT $amp TEXT-S FOR FIELD CTU

SELECTION-SCREEN END OF LINE

SELECTION-SCREEN BEGIN OF LINE

SELECTION-SCREEN COMMENT $amp TEXT-S1 FOR FIELD GROUP

se(ecti-scree )siti $+

PARAMETERS GROUP1$amp r) ae 0 sessi

SELECTION-SCREEN COMMENT $amp TEXT-S+ FOR FIELD CTUMODE

se(ecti-scree )siti

PARAMETERS CTUMODE LIE CTU2PARAMS-DISMODE DEFAULT 3N3

A4 s56 a(( 78)rs

E4 s56 78)r errr (8

N4 7 t 7is)(a8 78)r

SELECTION-SCREEN END OF LINE

SELECTION-SCREEN BEGIN OF LINE

SELECTION-SCREEN COMMENT $amp TEXT-S$ FOR FIELD USER

se(ecti-scree )siti $+

PARAMETERS4 USER1$amp DEFAULT S9-UNAME ser 0r sessi i atc5

SELECTION-SCREEN COMMENT $amp TEXT-S FOR FIELD CUPDATE

se(ecti-scree )siti

PARAMETERS CUPDATE LIE CTU2PARAMS-UPDMODE DEFAULT 3L3

S4 s8c5rs(8

A4 as8c5rs(8

L4 (ca(

SELECTION-SCREEN END OF LINE

SELECTION-SCREEN BEGIN OF LINE

SELECTION-SCREEN COMMENT $amp TEXT-S FOR FIELD EEP

se(ecti-scree )siti $+

PARAMETERS4 EEP AS CltECBOX 3 3 = 7e(ete sessi i0 0iis5e7

3X3 = gtee) sessi i0 0iis5e7

SELECTION-SCREEN COMMENT $amp TEXT-S FOR FIELD E2GROUP

copy SAP AG BC420 12-83

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 8488

se(ecti-scree )siti

)araeters E2GROUP1$amp r) ae 0 errr-sessi

SELECTION-SCREEN END OF LINE

SELECTION-SCREEN BEGIN OF LINE

SELECTION-SCREEN COMMENT $amp TEXT-S FOR FIELD ltOLDDATE

se(ecti-scree )siti $+

PARAMETERS4 ltOLDDATE LIE S9-DATUM

SELECTION-SCREEN COMMENT +11amp TEXT-S$ FOR FIELD E2USER

se(ecti-scree )siti

PARAMETERS4 E2USER1$amp DEFAULT S9-UNAME ser 0r errr-sessi

SELECTION-SCREEN END OF LINE

SELECTION-SCREEN BEGIN OF LINE

SELECTION-SCREEN COMMENT +11amp TEXT-S FOR FIELD E2EEP

se(ecti-scree )siti

PARAMETERS4 E2EEP AS CltECBOX 3 3 = 7e(ete sessi i0 0iis5e7

3X3 = gtee) sessi i0 0iis5e7

SELECTION-SCREEN END OF LINE

SELECTION-SCREEN BEGIN OF LINE

SELECTION-SCREEN COMMENT +11amp TEXT-S FOR FIELD E2ltDATE

se(ecti-scree )siti

PARAMETERS4 E2ltDATE LIE S9-DATUM

SELECTION-SCREEN END OF LINE

SELECTION-SCREEN SIP

SELECTION-SCREEN BEGIN OF LINE

SELECTION-SCREEN COMMENT 1amp TEXT-S1 FOR FIELD NODATA

PARAMETERS4 NODATA DEFAULT 33 LOER CASE 7ata

SELECTION-SCREEN END OF LINE

----------------------------------------------------------------------

Batc5i)t7ata 0 si(e trasacti

DATA4 BDCDATA LIE BDCDATA OCCURS ITlt ltEADER LINE

essaes 0 ca(( trasacti

DATA4 MESSTAB LIE BDCMSGCOLL OCCURS ITlt ltEADER LINE

errr sessi )ee7 3 3 r 3X3amp

DATA4 E2GROUP2OPENED

essae tets

TABLES4 T1

copy SAP AG BC420 12-84

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 8588

----------------------------------------------------------------------

at se(ecti scree

----------------------------------------------------------------------

AT SELECTION-SCREEN

r) a7 ser st e 0i((e7 0r create sessi

IF SESSION = 3X3 AND

GROUP = SPACE OR USER = SPACE

MESSAGE E1MSamp

ENDIF

----------------------------------------------------------------------

)e 7ataset

----------------------------------------------------------------------

FORM OPEN2DATASET USING P2DATASET

OPEN DATASET P2DATASET IN TEXT MODE

IF S9-SUBRC

RITE4 TEXT-E S9-SUBRC

STOP

ENDIF

ENDFORM

----------------------------------------------------------------------

c(se 7ataset

----------------------------------------------------------------------

FORM CLOSE2DATASET USING P2DATASET

CLOSE DATASET P2DATASET

ENDFORM

----------------------------------------------------------------------

create atc5i)t sessi

t 0r ca(( trasacti siamp

----------------------------------------------------------------------

FORM OPEN2GROUP

IF SESSION = 3X3

SIP

RITE4 $amp 3Create r)3I1amp GROUP

SIP

)e atc5i)t r)

CALL FUNCTION 3BDC2OPEN2GROUP3

EXPORTING CLIENT = S9-MANDT

copy SAP AG BC420 12-85

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 8688

GROUP = GROUP

USER = USER

EEP = EEP

ltOLDDATE = ltOLDDATE

RITE4 amp 3BDC2OPEN2GROUP3I$amp

1$amp 3retrc7e43I+amp

S9-SUBRC

ENDIF

ENDFORM

----------------------------------------------------------------------

e7 atc5i)t sessi

ca(( trasacti si4 errr sessiamp

----------------------------------------------------------------------

FORM CLOSE2GROUP

IF SESSION = 3X3

c(se atc5i)t r)

CALL FUNCTION 3BDC2CLOSE2GROUP3

RITE4 amp 3BDC2CLOSE2GROUP3Iamp

1$amp 3retrc7e43I+amp

S9-SUBRC

ELSE

IF E2GROUP2OPENED = 3X3

CALL FUNCTION 3BDC2CLOSE2GROUP3

RITE4

RITE4 amp 3Fe5(era))e 6r7e eret3Iamp

ENDIF

ENDIF

ENDFORM

----------------------------------------------------------------------

Start e6 trasacti accr7i t )araeters

----------------------------------------------------------------------

FORM BDC2TRANSACTION USING TCODE

DATA4 L2MSTRINGamp

DATA4 L2SUBRC LIE S9-SUBRC

atc5 i)t sessi

IF SESSION = 3X3

CALL FUNCTION 3BDC2INSERT3

EXPORTING TCODE = TCODE

TABLES D9NPROTAB = BDCDATA

RITE4 3BDC2INSERT3Iamp

copy SAP AG BC420 12-86

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 8788

TCODE

3retrc7e43I+amp

S9-SUBRC

3RECORD43

S9-INDEX

ca(( trasacti si

ELSE

REFRESlt MESSTAB

CALL TRANSACTION TCODE USING BDCDATA

MODE CTUMODE

UPDATE CUPDATE

MESSAGES INTO MESSTAB

L2SUBRC = S9-SUBRC

RITE4 3CALL2TRANSACTION3

TCODE

3retrc7e43I+amp

L2SUBRC

3RECORD43

S9-INDEX

LOOP AT MESSTAB

SELECT SINGLE FROM T1 ltERE SPRSL = MESSTAB-MSGSPRA

AND ARBGB = MESSTAB-MSGID

AND MSGNR = MESSTAB-MSGNR

IF S9-SUBRC =

L2MSTRING = T1-TEXT

IF L2MSTRING CS 313

REPLACE 313 ITlt MESSTAB-MSGH1 INTO L2MSTRING

REPLACE 3$3 ITlt MESSTAB-MSGH$ INTO L2MSTRING

REPLACE 33 ITlt MESSTAB-MSGH INTO L2MSTRING

REPLACE 33 ITlt MESSTAB-MSGH INTO L2MSTRING

ELSE

REPLACE 33 ITlt MESSTAB-MSGH1 INTO L2MSTRING

REPLACE 33 ITlt MESSTAB-MSGH$ INTO L2MSTRING

REPLACE 33 ITlt MESSTAB-MSGH INTO L2MSTRING

REPLACE 33 ITlt MESSTAB-MSGH INTO L2MSTRING

ENDIF

CONDENSE L2MSTRING

RITE4 MESSTAB-MSGT9P L2MSTRING$+amp

ELSE

RITE4 MESSTAB

ENDIF

ENDLOOP

copy SAP AG BC420 12-87

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 8888

SIP

Eree 0e5(era))e

IF L2SUBRC AND E2GROUP SPACE

IF E2GROUP2OPENED = 3 3

CALL FUNCTION 3BDC2OPEN2GROUP3

EXPORTING CLIENT = S9-MANDT

GROUP = E2GROUP

USER = E2USER

EEP = E2EEP

ltOLDDATE = E2ltDATE

E2GROUP2OPENED = 3X3

ENDIF

CALL FUNCTION 3BDC2INSERT3

EXPORTING TCODE = TCODE

TABLES D9NPROTAB = BDCDATA

ENDIF

ENDIF

REFRESlt BDCDATA

ENDFORM

----------------------------------------------------------------------

Start e6 scree

----------------------------------------------------------------------

FORM BDC2D9NPRO USING PROGRAM D9NPRO

CLEAR BDCDATA

BDCDATA-PROGRAM = PROGRAM

BDCDATA-D9NPRO = D9NPRO

BDCDATA-D9NBEGIN = 3X3

APPEND BDCDATA

ENDFORM

----------------------------------------------------------------------

Isert 0ie(7

Page 52: BC420_46C - 012The Transaction Recorder

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 5288

02amp

983209 SAP AG 1999

pening and losing the 9ile

P1ltDATAS1T

LS1ltDATAS1T

FOR( oendataet USING dataet-O)EN DATASET dataet IN TET (ODE-

IF S01SUBR2 34 - 5RITE 6 te7t1e S01SUBR2-STO)-

ENDIF-

ENDFOR(-

FOR( cloedataet USING dataet-2OSE DATASET dataet-

ENDFOR(-

Include

DR16

The suroutine 5P7N3ATAS7T opens the seuentia fie

The suroutine 2+5S73ATAS7T coses the seuentia fie

copy SAP AG BC420 12-52

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 5388

02

983209 SAP AG 1999

9unction Modules for I Program

lient

Session name

Eold date

=eep session

D user name

RecordK

LI1T

BRUP

ELDDAT1

=11P

US1R

R1RD

DltP1ltBRUPDltP1ltBRUP

Transaction code

D table

TD1

DPRTA

DltIS1RTDltIS1RT

DltLS1ltBRUPDltLS1ltBRUP

pen Isessionpen Isession

Insert data for

transactions

Insert data for

transactions

lose I

session

lose I

session

The foo$ing function modues are provided for creating atch input sessions (function group

S2)

235P7N3ltamp54P

2reates a ne$ session and contains genera data for the $hoe session

23INS7ampT

Inserts a the data for a transaction into the session The transferred interna tae $ith the

structure 2ATA must contain a the data reuired for fuy processing the transaction

232+5S73ltamp54P

2oses the session after a the data has een inserted As soon as the session has een cosed it

can e processed

The interna tae $ith the structure 2ATA can ony contain atch input data for one singe

transaction run So the individua transactions are inserted into the atch input session in a oop

using severa 23INS7ampT cas

copy SAP AG BC420 12-53

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 5488

024

983209 SAP AG 2001

9unction Module DltP1ltBRUP

ALL 9UTI DltP1ltBRUPALL 9UTI DltP1ltBRUP

1PRTIB

LI1T client

BRUP session name

ELDDAT1 loc+ date

=11P delete flag

US1R bdc user name

R1RD recording

IMPRTIB

NID internal session +e(

11PTIS

1PRTIB

LI1T client

BRUP session name

ELDDAT1 loc+ date

=11P delete flag

US1R bdc user name

R1RD recording

IMPRTIB NID internal session +e(

11PTIS

-ith the function modue 235P7N3ltamp54P you can open a atch input session

The foo$ing parameters are mandatory

2+I7NT (cient)

ltamp54P (session name)

4S7amp (user name)

Note The 4S7amp must a$ays e specified This user name is reuired for processing the session

in atch mode

The foo$ing parameters are optiona

=5+AT7 specifies the eariest date on $hich the session can e started677P fag specifies $hether session shoud e deeted after it has een successfuy processed The

677P fag is ignored if the session contains errors

677P E K K means deete the session after processing (defaut vaue) H

677P E KGK means do not deete session

amp725amp E KGK ao$s you to create a recording instead of a I session

If gtI is specified the function modue returns the interna session ey This is needed to e ae to

differentiate sessions that have the same name

-ith 7G27PTI5NS you get various return vaues that can e ueried $ith SC9S4amp2

Note In onine mode the onine user is used for the authoriDation checs regardess of the user

name specified

copy SAP AG BC420 12-54

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 5588

022

983209 SAP AG 1999

Subprogram P1ltBRUP

P1ltBRUP

FOR( oen8rou-IF e9on -

2A FUN2TION BD2O)ENGROU) E)ORTING 2IENT lt1mandt GROU) 8rou USER uer KEE) kee

=ODDATE gtolddate-

ENDIF-ENDFOR(-

Include

DR16

The suprogram 5P7N3ltamp54P opens the atch input session

copy SAP AG BC420 12-55

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 5688

028

983209 SAP AG 1999

9unction Module DltIS1RT

ALL 9UTI DltIS1RTALL 9UTI DltIS1RT

IMPRT

TD1 Transaction code

PSTltLAL Update locall(

PRITIB print list

TAL1S DPRTA bdclttable

11PTIS

IMPRT

TD1 Transaction code

PSTltLAL Update locall(

PRITIB print list

TAL1S DPRTA bdclttable

11PTIS

-ith the function modue 23INS7ampT you can add transaction data to the session

Cou need an interna 2 tae to transfer the data

The foo$ing parameters are mandatory

T257 Transaction code

CNPamp5TA 2 tae

The foo$ing parameters are optiona

P5ST3+52A+ E KGK activates oca updating This means that the data to e updated is ept in the

appication server and updated in the ast step of the transaction This does not invove the update

process (For more information see course 28 Programming ataase 4pdates)

PampINTINlt E KGK 9 ists processed in I $i e printed immediatey -ith 7G27PTI5NS you get various return vaues that can e ueried $ith SC9S4amp2

copy SAP AG BC420 12-56

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 5788

023

983209 SAP AG 1999

Subprogram DltTRASATI

DltTRASATI

FOR( BD2TRANSA2TION USING tcode-

IF e9on -2A FUN2TION BD2INSERT

E)ORTING T2ODE tcode TABES D0N)ROTAB bdcdata-

ESE-

ENDIF-ENDFOR(-

T

Include

DR16

The suprogram 23TampANSA2TI5N moves the fied 2 tae either to a atch input session

or uses ca transaction to import the data into the system 5n the seection screen you can specify

$hether you $ant to create a session or you $ant to use ca transaction to process the data directy

The S7SSI5N fied is then set according to your seection

copy SAP AG BC420 12-57

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 5888

025

983209 SAP AG 1999

9unction Module DltLS1ltBRUP

ALL 9UTI DltLS1ltBRUP

11PTIS

TltP1 6

NU1U1lt1RRR amp

-ith the function modue 232+5S73ltamp54P you can cose a atch input session

In 7G27PTI5NS you get various return vaues that can e ueried $ith SC9S4amp2

copy SAP AG BC420 12-58

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 5988

027

983209 SAP AG 1999

Subprogram LS1ltBRUP

FOR( cloe8rou-IF e9on -cloe batcgt 9nut 8rou

2A FUN2TION BD22OSEGROU)-

ESE-IF e8rouoened -

2A FUN2TION BD22OSEGROU)-

ENDIF-ENDIF-

ENDFOR(-

LS1ltBRUPlose session

lose error session

Include

DR16

The suprogram 2+5S73ltamp54P coses the atch input session The suprogram differentiates

et$een a norma I session (S7SSI5N E G) and a session opened $hen ca transaction

encountered an error (73ltamp54P35P7N7 E G)

copy SAP AG BC420 12-59

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 6088

080

983209 SAP AG 1999

Subprograms DltDPRG Dlt9I1LD

DltDPR

Dlt9I1LD

FOR( bdc9eld USING nam al-IF al 34 nodata-2EAR bdcdata- bdcdata1nam nam- bdcdata1al al- A))END bdcdata-ENDIF-

ENDFOR(-

FOR( bdcdltnro USING ro8ram dltnro- 2EAR bdcdata-Bdcdata1ro8ram ro8ram-Bdcdata1dltnro dltnro-Bdcdata1dltnbe89n - A))END bdcdata-ENDFOR(-

Include

DR16

The incude 2amp72GG contains t$o suprograms 23CNPamp5 and 23FI7+

Suprogram 23CNPamp5 fis the 2 tae $ith program names and screen numers

Suprogram 23FI7+ fis the 2 tae $ith fied names and vaues

7ach suprogram creates an entry in the 2 tae

copy SAP AG BC420 12-60

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 6188

086

983209 SAP AG 1999

9illing the D Table

erorm bdcdltnro u9n8 SA)(FD +- erorm bdc9eld u9n8 BD22URSOR RFD1BUKRS- erorm bdc9eld u9n8 BD2OK2ODE 6- erorm bdc9eld u9n8 RFD1BUKRS record1BUKRS- erorm bdc9eld u9n8 RFD1KTOKD record1KTOKD-

erorm bdcdltnro u9n8 SA)(FD -

erorm bdc9eld u9n8 BD22URSOR KNA1S)RAS- erorm bdc9eld u9n8 BD2OK2ODE 6- erorm bdc9eld u9n8 KNA1NA(E record1NA(E-

erorm bdc9eld u9n8 KNA1SORT record1SORT-

Recording Benerated automaticall(

from the recording

)ERFOR( bdcdltnro USING SA)(FD +- )ERFOR( bdc9eld USING BD22URSOR RFD1BUKRS-)ERFOR( bdc9eld USING BD2OK2ODE 6-)ERFOR( bdc9eld USING RFD1BUKRS record1BUKRS-)ERFOR( bdc9eld USING RFD1KTOKD record1KTOKD-

)ERFOR( bdcdltnro USING SA)(FD -

)ERFOR( bdc9eld USING BD22URSOR KNA1S)RAS-)ERFOR( bdc9eld USING BD2OK2ODE 6-)ERFOR( bdc9eld USING KNA1NA(E record1NA(E-

)ERFOR( bdc9eld USING KNA1SORT record1SORT- ---

The 2 tae is fied $ith data from the recording The suroutines 23CNPamp5 and

23FI7+ are used for this

The suroutines are caed in the reuired structure or seuence

copy SAP AG BC420 12-61

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 6288

08amp

983209 SAP AG 1999

erie)

SAPDatabase

SeJuential9ile

SAPDatabase

ALL TRASATIALL TRASATI

SeJuential9ile

ATE IPUTATE IPUT

D TableD TableD TableD Table

I Monitor

T

In contrast to atch input you can use ca transaction to directy pass data to the diaog interface

$ithout using a atch input session Cou use an interna tae (2 tae same structure and ayout

as atch input) to temporariy store your screen data Then you ca the desired transaction in your

program

Note 5n average the 2a Transaction method is 8 to times faster than using atch Input

copy SAP AG BC420 12-62

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 6388

08

983209 SAP AG 1999

all Transaction Program$ 1ample

RE)ORT abcbdcdcdeb9ct-

)ARA(ETERS d9mode DEFAUT A

udmode DEFAUT S-FOR( calltranact9on-2A TRANSA2TION FD

USING bdcdata (ODE d9mode

U)DATE udmode-

IF lt1ubrc NE - 5RITE 6 ---

ENDIF-ENDFOR(-

Screen

00

Screen

100

Screen

An additiona system ro area is added for the caed transaction The system uses this area for

processing the individua screens in the transactionH the data from the tae is added here After the

transaction is processed the second ro area is reeasedH the system continues processing in the first

ro area

Notes

In contrast to atch input there is no error ogging (error sessions) here For processing the caed

transaction the system uses the authoriDations of the user that caed the transaction The 2 tae

can ony hod data for one transaction run at a time efore another transaction is caed and its data

can e added you must eecute a amp7Famp7S= for the 2 tae

copy SAP AG BC420 12-63

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 6488

084

983209 SAP AG 1999

ALL TRASATI C6

RE)ORT 777-

2A TRANSA2TION FD USING bdcdata (ODE E-

Default for MD1 is A

2A TRANSA2TION 3tranact9oncode4 USING 3bdc1table4 C (ODE A E N C-

-ith the parameter 57 you can seect a specific dispay mode for processing the transaction The

foo$ing three modes are avaiae

A (ispay a)

If you eecute the program a the screens and a their data are dispayed This is the defaut vaue

for the 57 in 2A++ TampANSA2TI5N

N (ispay nothing)

The screens are not dispayed at a regardess of $hether any of them contained errors As soon as

the transaction has een fuy processed contro is returned to your program (The vaue of the

parameter 4PAT7 determines $hether dataase updates are eecuted or not)

7 (ispay errors ony)As soon as an error occurs in a screen the transaction is s$itched to dispay mode so that you can

correct the errors

These dispay modes are the same as those in the atch input session processing

copy SAP AG BC420 12-64

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 6588

082

983209 SAP AG 1999

RE)ORT 777-

2A TRANSA2TION FD USING BD2DATA U)DATE -

ALL TRASATI Camp

RE)ORT 777-

2A TRANSA2TION FD USING bdcdata U)DATE -

2A TRANSA2TION 3tranact9oncode4 USING 3bdc1table4 C (ODE A E N C U)DATE A S C -

Default for UPDAT1 is A

-ith the parameter 4PAT7 you can contro ho$ dataase updates arising from a transaction are

carried out There are three options

A (asynchronous updating) The caed transaction does not $ait unti the dataase has een

updated it simpy for$ard the updates to the SAP update service This usuay speeds up the 2T

program This processing mode is N5T recommended for arge data sets as the caed transaction

does not receive a competion message from the update modue

The caing 2T program therefore cannot te if the transaction has een successfuy competed Cou

shoud use the updating administration function (transaction S8) to determine $hether updating

$as terminated eary The error anaysis correction functions for are ess hepfu than $ith

synchronous updating

S (synchronous updating) -ith synchronous updating the caed transaction $aits unti a the

updates have een competed So processing is so$er than $ith synchronous updating The caed

transaction can ho$ever report any updating errors to the program $hich maes error

anaysiscorrection easier

+ (local updating) $ith oca updating the dataase is not updated in a separate process it is

updated in the caers process (see appication hep documentation for the AAP ey$ord S7T

4PAT7 TAS6 +52A+)

copy SAP AG BC420 12-65

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 6688

088

983209 SAP AG 1999

ALL TRASATI C

RE)ORT 777-DATA mtab T0)E TABE OF bdcm8coll-

2A TRANSA2TION FD USING bdcdata (ESSAGES INTO mtab-

2A TRANSA2TION 3tranact9oncode4 USING 3bdc1table4 C (ODE A E N C U)DATE A S C (ESSAGES INTO 3metab4 C -

7SSAlt7S specifies that a system messages that are output during the eecution of a 2A++

TampANSA2TI5N are $ritten to the interna tae L7SSTA The interna tae must have the

structure 2Slt25++

4nie the cassica atch input processing $ith sessions 2A++ TampANSA2TI5N does not offer any

specia processing procedures for transactions containing errors There are no restart functions for

transactions that contain errors or that cause updating terminations

copy SAP AG BC420 12-66

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 6788

083

983209 SAP AG 1999

ALL TRASATI C4

RE)ORT 777-DATA mltot T0)E ctuaram-

2A TRANSA2TION FD USING BD2DATA

O)TIONS FRO( mltot-

2A TRANSA2TION 3tranact9oncode4 USING 3bdc1table4 C (ODE A E N C U)DATE A S C (ESSAGES INTO 3metab4 C O)TIONS FRO( ot C -

RE)ORT 777-DATA mltot T0)E ctuaram-2A TRANSA2TION FD USING bdcdata

O)TIONS FRO( mltot-

The addition 5PTI5NS enaes the ca transaction statement to e controed through a structure

The structure must have the dictionary type 2T43PAampAS

The addition 5PTI5NS Famp5 must not e comined either $ith the addition 57 or $ith

4PAT7 ore information on the net side

copy SAP AG BC420 12-67

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 6888

085

983209 SAP AG 1999

Structure TUltPARAMS

DISMD1 Procen mode anaoo o addon amp

UPDMD1 $pdae mode anaoo o addon $PA

ATTMD1 CA mode CA conro

D19SI1 orce de=a EndoE e drn procen

RAMMIT +o eD a Camp amp(

IPT +o a ac np eonF a F S-B+P SPAC

I1D +o a ac np eon a=er end o= BC daa

The components are defined as foo$s

The components 7FSIM7 ampA25IT N5INPT and N5I7N can have the foo$ing

vaues KGK E Ces or K K E No

If the addition 5PTI5NS Famp5 is not specified the foo$ing settings appy to the contro

parameters

IS57 from addition 57

4P57 from addition 4PAT7

2ATT57 2ATT not active

7FSIM7 o not not use defaut $indo$s siDe

ampA25IT Successfu eit at 25IT -5amp6

N5INPT atch input session active (SC9INPT E G)

N5I7N atch input session sti active after end of 2 data

copy SAP AG BC420 12-68

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 6988

087

983209 SAP AG 1999

SMSBID Message ID

SMSBT Message T(pe C1GIGWGSGA

SMSB Message umber

SMSB6 Message ariable 6

SMSBamp Message ariable amp

SMSB Message ariable

SMSB4 Message ariable 4

SMSBID Message ID

SMSBT Message T(pe C1GIGWGSGA

SMSB Message umber

SMSB6 Message ariable 6

SMSBamp Message ariable amp

SMSB Message ariable

SMSB4 Message ariable 4

Return code$

S(stem fields$

alue Meaning

0 Successful

6000 1rror in transaction

6000 1rror in processing call transaction

see also the s(stem fields specified

alue Meaning

0 Successful

6000 1rror in transaction

6000 1rror in processing call transaction

see also the s(stem fields specified

9ield name Meaning9ield name9ield name MeaningMeaning

Return ode and S(stem 9ields

The return code is used to specify $hether the caed transaction $as processed successfuy In

addition severa system fieds are fied The numer I type and variaes of the diaog message

output y the caed transaction Cou need this information to output the message tet

copy SAP AG BC420 12-69

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 7088

030

983209 SAP AG 1999

Benerated Program of the TA Recorder

REFRES= (ESSTAB-

2A TRANSA2TION tcode USING bdcdata (ODE ctumode U)DATE cudate (ESSAGES INTO metab-OO) AT metab- ENDOO)-IF lubrc 34 AND e8rou 34 S)A2E- IF e8rouoenend - 2A FUN2TION BD2O)ENGROU) E)ORTING ---------

--------- E8rouoened - ENDIF- 2A FUN2TION BD2INSERT E)ORTING T2ODE tcode TABES D0N)ROTAB bdcdata-ENDIF-REFRES= bdcdata-

Message table output

pen error session

Insert data record that

has errors into error

session

If you have seected ca transaction on the seection screen the generated program runs as foo$s

The onine transaction is caed $ith ca transaction and passed to tae 2ATA A the

messages arising during the ca transaction are put in the interna tae 7SSTA

7SSTA is output as a ist

If you have specified an error session ( 73ltamp54P L SPA27) on the seection screen and the

ca transaction comes across an error (+3S4amp2 L 0) the error session is opened The error

session is ho$ever ony opened once Then the data record is paced in the session

A the other data records that have errors $ith ca transaction are paced in the same session

copy SAP AG BC420 12-70

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 7188

036

983209 SAP AG 1999

The Transaction Recorder

PrinciplesPrinciples

Recording )ith the LSMWRecording )ith the LSMW

Principles of atch Input and all TransactionPrinciples of atch Input and all Transaction

Integrating the TA Program into the DWIntegrating the TA Program into the DW

Using the TA Recorder Using the TA Recorder

copy SAP AG BC420 12-71

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 7288

03amp

983209 SAP AG 1999

Integrating into the DW

Transfer program

AAP Dictionar(

Integrate

SDA0

SDA6

SDAamp

SDA

Cou can integrate the generated program into the G9- The structure of the fie must e created

in the AAP ictionary The taes SGA0 SGA8 SGA1 and SGA $i e fied

copy SAP AG BC420 12-72

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 7388

03

983209 SAP AG 1999

DW Release 42

Goo

-B eeae 45

aa ran=er ogtec

Int customer data transfer ob-ect

ecord =ed

Dece daa ran=er

d Goo

The ampunction ampor interatin TA recorder prora$s is

i$ple$ented in the

D+-B in Release

The recorder can e integrated as of ampeease and it is provided in the G9- ampeease

ltot to the G9- ampeease 5n the initia screen you can integrate programs y choosing ampoto

( +nt customer ata transfer o-ect

copy SAP AG BC420 12-73

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 7488

034

983209 SAP AG 1999

reating Program as D b-ect

Comer ran=er ogtec

ampgtec ype

Sor eD =or ogtec

aa ran=er proram

Srcre name

9900

(+A1

Cane comer

ZBCA+G

ZB

ustomer transfer ob-ect

umber bet)een 7000 and 7777

b-ect t(pe

Assignment to R ob-ect

Short tet for D ob-ectShort description

Data transfer program

ame of generated program

Structure name

A structure Cstructure la(out )ith this name is created in

the AAP Dictionar(

For ampeease transfer oects $ere not organiDed y 5amp oects ut y a G numer (00089

OOOO) The numer range O0009OOOO is reserved for customers

To create a connection to the ne$ G 9- you must assign the program to a 5amp oect

2reate a short tet for the G oect This tet $i appear in the method seection ist

Specify the program to e incuded

Specify a name for the structure to e created in the AAP ictionary

Note $he generated program appears under program type +N and not under program type

-

copy SAP AG BC420 12-74

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 7588

032

983209 SAP AG 1999

Adantages

Automatic program registration in the DW in

Release 48

ou can use all the functions defined for

standard ob-ects

1ception$ The (reate ampile ith data

function

If you incuded the oect in the ampeease $orench it is automaticay avaiae in the ampeease

B $orench

A the $orench functions are avaiae for your oect ecept for Create files ith transfer ata

copy SAP AG BC420 12-75

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 7688

038

983209 SAP AG 1999

ou are no) able to$

The Transaction Recorder$ Unit Summar(

Use the recording function in the LSMW to create

a batch input session )ith the data from the

eternal s(stem

Use the TA Recorder to create (our o)n data

transfer program

Anal(e programs that )or+ )ith batch input or

call transaction

Integrate the TA Recorder programs into the

DW

copy SAP AG BC420 12-76

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 7788

ercise 1

nit $ -ecorder

$opic 2reating etors

$ransaction -ecorder ercise 1

bull 2reating detors $ith eterna numer assignment

bull etor numers M9980008 to M9980080

Address data for detors $ith eterna numer assignment is to

e transferred using program ampFI700

ro4ect F5

Supro4ect +5

-un +575

$as)s 85 95 8S25

9oad program -F+00

8 In the foo$ing eercises eisting data is to e changed Therefore these detors $ith

eterna numer assignment have to first e created

898 4nder suproect 79 create run 797G9 $ith the name Detors ith

eternal numers

copy SAP AG BC420 12-77

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 7888

891 2reate the foo$ing three tass The tass map the foo$ing process steps

convert data create + session and process + session

89198 In run 797G9 create the foo$ing tas

9 Tas AP9

9 Name 2onvert data 9 Tas type AP

9 Program type +S-

Seect the foo$ing +S- oect

+S- proect 2109

+S- suproect 7I9

+S- oect I997GT

89191 In run 797G9 create the foo$ing tas 9 Tas +5A9

9 Name 2reate I session

Tas type +5A

9 Program type INP

Seect program ampFI700 $ith the variant

I97G9

8919 In run 797G9 create the foo$ing tas

9 Tas S29

9 Name Process I session Tas type S2

9 Program type amp7P5

Seect program ampS2S4 $ith the variant

S497G9

Note that you have to correct the seuence of the tass 2onvert data

create + session and process + session

4se the uttons

89 Start the run

The detors $i e created $ith eterna numer assignments

89 2hec in transaction F0 that the detors M9980008 to M9980080 have een

created

copy SAP AG BC420 12-78

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 7988

ercise

nit $ransaction -ecorder

$opic -ecording function in the 9S8(

bull 2reate a recording using the +S-

bull ltenerate a atch input session

2hange the detor address data in the amp System

Name of the recording +

Name of the file +2055+F9

8 2reate the recording 7I3 using the +S- ampecord the transaction F01 (2hange

detor)

898 efore you create the recording first test the transaction onineQ

For the recording use detor M9980008 5n the initia screen of the F01

maintain the foo$ing fieds ony

etor etor M9980008

2ompany code 0008

Address data seect

Note $he data record must e saved hile recording

891 aintain the names and the descriptions for the foo$ing fieds

Name city street posta code and teephone numereete a other fieds in screen 880 from the recording (eg S5ampT+ +AN8

SPampAS)

4se the same technica names as sho$n in the tae eo$ (automatic fied

mapping)

copy SAP AG BC420 12-79

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 8088

1 2reate the suproect 7I9 and the ne$ oect TA3 in your proect 2109

aintain the oect attriutes and seect the item atch input recording Seect your

recording 7I3

2reate the source structure address

2reate the source fieds according to the tae eo$ 5r copy them from proect 2109S37N suproect 7I900 oect TA900

198 Fie setup The data from the egacy system are dispayed in the foo$ing tae

Fied name Fied type Fied ength escription

N5 2 8B etor numer

NA7 2 Name

STamp77T 2 Street

2ITC 2 2ityPace of residence

MIP 2 80 Posta code

T7+ 2 8B Teephone numer

191 aintain the fied mapping 4se the automatic fied mapping (via menu item

7tras)

19 Specify the fies 5ny maintain the fie name of the source fie

Name of the fie 21099IFI+7

2odepage 8800

19 Import the data and convert them ispay the data in each caseQ

19 2reate a atch input session

19B ampun the atch input session

copy SAP AG BC420 12-80

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 8188

ercise 3

nit $ransaction -ecorder

$opic -ecording ith the $ -ecorder

bull ltenerate a recording using the TA recorder

bull Test the recording

2hange the address data of detors in the amp system

Name recording $+

Name of the file +2055+F9

8 2reate the recording TA37I3 using the transaction recorder ampecord the

transaction F01 (change detor)

898 4se detor M9980008 for the recording 5n the F01 initia screen ony

maintain the foo$ing fieds

etor etor M9980008

2ompany 2ode 0008

Address data seect

Note $he data record must e saved hen recording

eete a fieds that do not eist in the source fie 21099IFI+7 from screen

880 in the recording (eg 6NA89S5ampT+ 6NA89+AN8 6ANNQ9SPampAS) Note o not deete fieds ampF01946ampS and ampF0190880

Save the recording no$

1 S$itch to the recordings overvie$

198 Process the recording $ith the processing mode A (dispay a)

191 Process the recording $ith the processing mode RN (no dispay)

19 If the recording has een tested and no error has occurred generate a I session

and run it using the I monitor If an error shoud occur generate the recordingagainQ

copy SAP AG BC420 12-81

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 8288

From the recording generate the program M21037I3 in your deveopment cass

2109 Seect the foo$ing

bull ampead fied contents from fie

bull 2reate test data in the fie 2103dei3test3tt

98 Save this program and eecute it ltenerate one I session each and process it

2arry out the same steps again using the ca transaction

The generated program shoud no$ e changed so that fie 21099IFI+7 can e

read and processed

98 2hange the defaut vaue of the fie name (parameter dataset) in 21099

IFI+7

91 2hange the structure definition eete the company code fied and the address

data checo from the structure

9 2hange the su9routine ca perform dc3fied for the company code (KampF019

46ampSK) so that the vaue 0008 is transferred

9 2hange the su9routine ca perform dc3fied for the address data checo

(KampF0190880K) so that the vaue G is transferred

9 Start the program again and read the data from the fie 21099IFI+7 $ith

detor data ltenerate a I session $ith it and run it

copy SAP AG BC420 12-82

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 8388

033 Include DR16INCLUDE BDCRECX1

SELECTION-SCREEN BEGIN OF LINE

PARAMETERS SESSION RADIOBUTTON GROUP CTU create sessi SELECTION-SCREEN COMMENT $amp TEXT-S FOR FIELD SESSION

se(ecti-scree )siti +

PARAMETERS CTU RADIOBUTTON GROUP CTU ca(( trasacti

SELECTION-SCREEN COMMENT $amp TEXT-S FOR FIELD CTU

SELECTION-SCREEN END OF LINE

SELECTION-SCREEN BEGIN OF LINE

SELECTION-SCREEN COMMENT $amp TEXT-S1 FOR FIELD GROUP

se(ecti-scree )siti $+

PARAMETERS GROUP1$amp r) ae 0 sessi

SELECTION-SCREEN COMMENT $amp TEXT-S+ FOR FIELD CTUMODE

se(ecti-scree )siti

PARAMETERS CTUMODE LIE CTU2PARAMS-DISMODE DEFAULT 3N3

A4 s56 a(( 78)rs

E4 s56 78)r errr (8

N4 7 t 7is)(a8 78)r

SELECTION-SCREEN END OF LINE

SELECTION-SCREEN BEGIN OF LINE

SELECTION-SCREEN COMMENT $amp TEXT-S$ FOR FIELD USER

se(ecti-scree )siti $+

PARAMETERS4 USER1$amp DEFAULT S9-UNAME ser 0r sessi i atc5

SELECTION-SCREEN COMMENT $amp TEXT-S FOR FIELD CUPDATE

se(ecti-scree )siti

PARAMETERS CUPDATE LIE CTU2PARAMS-UPDMODE DEFAULT 3L3

S4 s8c5rs(8

A4 as8c5rs(8

L4 (ca(

SELECTION-SCREEN END OF LINE

SELECTION-SCREEN BEGIN OF LINE

SELECTION-SCREEN COMMENT $amp TEXT-S FOR FIELD EEP

se(ecti-scree )siti $+

PARAMETERS4 EEP AS CltECBOX 3 3 = 7e(ete sessi i0 0iis5e7

3X3 = gtee) sessi i0 0iis5e7

SELECTION-SCREEN COMMENT $amp TEXT-S FOR FIELD E2GROUP

copy SAP AG BC420 12-83

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 8488

se(ecti-scree )siti

)araeters E2GROUP1$amp r) ae 0 errr-sessi

SELECTION-SCREEN END OF LINE

SELECTION-SCREEN BEGIN OF LINE

SELECTION-SCREEN COMMENT $amp TEXT-S FOR FIELD ltOLDDATE

se(ecti-scree )siti $+

PARAMETERS4 ltOLDDATE LIE S9-DATUM

SELECTION-SCREEN COMMENT +11amp TEXT-S$ FOR FIELD E2USER

se(ecti-scree )siti

PARAMETERS4 E2USER1$amp DEFAULT S9-UNAME ser 0r errr-sessi

SELECTION-SCREEN END OF LINE

SELECTION-SCREEN BEGIN OF LINE

SELECTION-SCREEN COMMENT +11amp TEXT-S FOR FIELD E2EEP

se(ecti-scree )siti

PARAMETERS4 E2EEP AS CltECBOX 3 3 = 7e(ete sessi i0 0iis5e7

3X3 = gtee) sessi i0 0iis5e7

SELECTION-SCREEN END OF LINE

SELECTION-SCREEN BEGIN OF LINE

SELECTION-SCREEN COMMENT +11amp TEXT-S FOR FIELD E2ltDATE

se(ecti-scree )siti

PARAMETERS4 E2ltDATE LIE S9-DATUM

SELECTION-SCREEN END OF LINE

SELECTION-SCREEN SIP

SELECTION-SCREEN BEGIN OF LINE

SELECTION-SCREEN COMMENT 1amp TEXT-S1 FOR FIELD NODATA

PARAMETERS4 NODATA DEFAULT 33 LOER CASE 7ata

SELECTION-SCREEN END OF LINE

----------------------------------------------------------------------

Batc5i)t7ata 0 si(e trasacti

DATA4 BDCDATA LIE BDCDATA OCCURS ITlt ltEADER LINE

essaes 0 ca(( trasacti

DATA4 MESSTAB LIE BDCMSGCOLL OCCURS ITlt ltEADER LINE

errr sessi )ee7 3 3 r 3X3amp

DATA4 E2GROUP2OPENED

essae tets

TABLES4 T1

copy SAP AG BC420 12-84

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 8588

----------------------------------------------------------------------

at se(ecti scree

----------------------------------------------------------------------

AT SELECTION-SCREEN

r) a7 ser st e 0i((e7 0r create sessi

IF SESSION = 3X3 AND

GROUP = SPACE OR USER = SPACE

MESSAGE E1MSamp

ENDIF

----------------------------------------------------------------------

)e 7ataset

----------------------------------------------------------------------

FORM OPEN2DATASET USING P2DATASET

OPEN DATASET P2DATASET IN TEXT MODE

IF S9-SUBRC

RITE4 TEXT-E S9-SUBRC

STOP

ENDIF

ENDFORM

----------------------------------------------------------------------

c(se 7ataset

----------------------------------------------------------------------

FORM CLOSE2DATASET USING P2DATASET

CLOSE DATASET P2DATASET

ENDFORM

----------------------------------------------------------------------

create atc5i)t sessi

t 0r ca(( trasacti siamp

----------------------------------------------------------------------

FORM OPEN2GROUP

IF SESSION = 3X3

SIP

RITE4 $amp 3Create r)3I1amp GROUP

SIP

)e atc5i)t r)

CALL FUNCTION 3BDC2OPEN2GROUP3

EXPORTING CLIENT = S9-MANDT

copy SAP AG BC420 12-85

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 8688

GROUP = GROUP

USER = USER

EEP = EEP

ltOLDDATE = ltOLDDATE

RITE4 amp 3BDC2OPEN2GROUP3I$amp

1$amp 3retrc7e43I+amp

S9-SUBRC

ENDIF

ENDFORM

----------------------------------------------------------------------

e7 atc5i)t sessi

ca(( trasacti si4 errr sessiamp

----------------------------------------------------------------------

FORM CLOSE2GROUP

IF SESSION = 3X3

c(se atc5i)t r)

CALL FUNCTION 3BDC2CLOSE2GROUP3

RITE4 amp 3BDC2CLOSE2GROUP3Iamp

1$amp 3retrc7e43I+amp

S9-SUBRC

ELSE

IF E2GROUP2OPENED = 3X3

CALL FUNCTION 3BDC2CLOSE2GROUP3

RITE4

RITE4 amp 3Fe5(era))e 6r7e eret3Iamp

ENDIF

ENDIF

ENDFORM

----------------------------------------------------------------------

Start e6 trasacti accr7i t )araeters

----------------------------------------------------------------------

FORM BDC2TRANSACTION USING TCODE

DATA4 L2MSTRINGamp

DATA4 L2SUBRC LIE S9-SUBRC

atc5 i)t sessi

IF SESSION = 3X3

CALL FUNCTION 3BDC2INSERT3

EXPORTING TCODE = TCODE

TABLES D9NPROTAB = BDCDATA

RITE4 3BDC2INSERT3Iamp

copy SAP AG BC420 12-86

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 8788

TCODE

3retrc7e43I+amp

S9-SUBRC

3RECORD43

S9-INDEX

ca(( trasacti si

ELSE

REFRESlt MESSTAB

CALL TRANSACTION TCODE USING BDCDATA

MODE CTUMODE

UPDATE CUPDATE

MESSAGES INTO MESSTAB

L2SUBRC = S9-SUBRC

RITE4 3CALL2TRANSACTION3

TCODE

3retrc7e43I+amp

L2SUBRC

3RECORD43

S9-INDEX

LOOP AT MESSTAB

SELECT SINGLE FROM T1 ltERE SPRSL = MESSTAB-MSGSPRA

AND ARBGB = MESSTAB-MSGID

AND MSGNR = MESSTAB-MSGNR

IF S9-SUBRC =

L2MSTRING = T1-TEXT

IF L2MSTRING CS 313

REPLACE 313 ITlt MESSTAB-MSGH1 INTO L2MSTRING

REPLACE 3$3 ITlt MESSTAB-MSGH$ INTO L2MSTRING

REPLACE 33 ITlt MESSTAB-MSGH INTO L2MSTRING

REPLACE 33 ITlt MESSTAB-MSGH INTO L2MSTRING

ELSE

REPLACE 33 ITlt MESSTAB-MSGH1 INTO L2MSTRING

REPLACE 33 ITlt MESSTAB-MSGH$ INTO L2MSTRING

REPLACE 33 ITlt MESSTAB-MSGH INTO L2MSTRING

REPLACE 33 ITlt MESSTAB-MSGH INTO L2MSTRING

ENDIF

CONDENSE L2MSTRING

RITE4 MESSTAB-MSGT9P L2MSTRING$+amp

ELSE

RITE4 MESSTAB

ENDIF

ENDLOOP

copy SAP AG BC420 12-87

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 8888

SIP

Eree 0e5(era))e

IF L2SUBRC AND E2GROUP SPACE

IF E2GROUP2OPENED = 3 3

CALL FUNCTION 3BDC2OPEN2GROUP3

EXPORTING CLIENT = S9-MANDT

GROUP = E2GROUP

USER = E2USER

EEP = E2EEP

ltOLDDATE = E2ltDATE

E2GROUP2OPENED = 3X3

ENDIF

CALL FUNCTION 3BDC2INSERT3

EXPORTING TCODE = TCODE

TABLES D9NPROTAB = BDCDATA

ENDIF

ENDIF

REFRESlt BDCDATA

ENDFORM

----------------------------------------------------------------------

Start e6 scree

----------------------------------------------------------------------

FORM BDC2D9NPRO USING PROGRAM D9NPRO

CLEAR BDCDATA

BDCDATA-PROGRAM = PROGRAM

BDCDATA-D9NPRO = D9NPRO

BDCDATA-D9NBEGIN = 3X3

APPEND BDCDATA

ENDFORM

----------------------------------------------------------------------

Isert 0ie(7

Page 53: BC420_46C - 012The Transaction Recorder

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 5388

02

983209 SAP AG 1999

9unction Modules for I Program

lient

Session name

Eold date

=eep session

D user name

RecordK

LI1T

BRUP

ELDDAT1

=11P

US1R

R1RD

DltP1ltBRUPDltP1ltBRUP

Transaction code

D table

TD1

DPRTA

DltIS1RTDltIS1RT

DltLS1ltBRUPDltLS1ltBRUP

pen Isessionpen Isession

Insert data for

transactions

Insert data for

transactions

lose I

session

lose I

session

The foo$ing function modues are provided for creating atch input sessions (function group

S2)

235P7N3ltamp54P

2reates a ne$ session and contains genera data for the $hoe session

23INS7ampT

Inserts a the data for a transaction into the session The transferred interna tae $ith the

structure 2ATA must contain a the data reuired for fuy processing the transaction

232+5S73ltamp54P

2oses the session after a the data has een inserted As soon as the session has een cosed it

can e processed

The interna tae $ith the structure 2ATA can ony contain atch input data for one singe

transaction run So the individua transactions are inserted into the atch input session in a oop

using severa 23INS7ampT cas

copy SAP AG BC420 12-53

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 5488

024

983209 SAP AG 2001

9unction Module DltP1ltBRUP

ALL 9UTI DltP1ltBRUPALL 9UTI DltP1ltBRUP

1PRTIB

LI1T client

BRUP session name

ELDDAT1 loc+ date

=11P delete flag

US1R bdc user name

R1RD recording

IMPRTIB

NID internal session +e(

11PTIS

1PRTIB

LI1T client

BRUP session name

ELDDAT1 loc+ date

=11P delete flag

US1R bdc user name

R1RD recording

IMPRTIB NID internal session +e(

11PTIS

-ith the function modue 235P7N3ltamp54P you can open a atch input session

The foo$ing parameters are mandatory

2+I7NT (cient)

ltamp54P (session name)

4S7amp (user name)

Note The 4S7amp must a$ays e specified This user name is reuired for processing the session

in atch mode

The foo$ing parameters are optiona

=5+AT7 specifies the eariest date on $hich the session can e started677P fag specifies $hether session shoud e deeted after it has een successfuy processed The

677P fag is ignored if the session contains errors

677P E K K means deete the session after processing (defaut vaue) H

677P E KGK means do not deete session

amp725amp E KGK ao$s you to create a recording instead of a I session

If gtI is specified the function modue returns the interna session ey This is needed to e ae to

differentiate sessions that have the same name

-ith 7G27PTI5NS you get various return vaues that can e ueried $ith SC9S4amp2

Note In onine mode the onine user is used for the authoriDation checs regardess of the user

name specified

copy SAP AG BC420 12-54

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 5588

022

983209 SAP AG 1999

Subprogram P1ltBRUP

P1ltBRUP

FOR( oen8rou-IF e9on -

2A FUN2TION BD2O)ENGROU) E)ORTING 2IENT lt1mandt GROU) 8rou USER uer KEE) kee

=ODDATE gtolddate-

ENDIF-ENDFOR(-

Include

DR16

The suprogram 5P7N3ltamp54P opens the atch input session

copy SAP AG BC420 12-55

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 5688

028

983209 SAP AG 1999

9unction Module DltIS1RT

ALL 9UTI DltIS1RTALL 9UTI DltIS1RT

IMPRT

TD1 Transaction code

PSTltLAL Update locall(

PRITIB print list

TAL1S DPRTA bdclttable

11PTIS

IMPRT

TD1 Transaction code

PSTltLAL Update locall(

PRITIB print list

TAL1S DPRTA bdclttable

11PTIS

-ith the function modue 23INS7ampT you can add transaction data to the session

Cou need an interna 2 tae to transfer the data

The foo$ing parameters are mandatory

T257 Transaction code

CNPamp5TA 2 tae

The foo$ing parameters are optiona

P5ST3+52A+ E KGK activates oca updating This means that the data to e updated is ept in the

appication server and updated in the ast step of the transaction This does not invove the update

process (For more information see course 28 Programming ataase 4pdates)

PampINTINlt E KGK 9 ists processed in I $i e printed immediatey -ith 7G27PTI5NS you get various return vaues that can e ueried $ith SC9S4amp2

copy SAP AG BC420 12-56

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 5788

023

983209 SAP AG 1999

Subprogram DltTRASATI

DltTRASATI

FOR( BD2TRANSA2TION USING tcode-

IF e9on -2A FUN2TION BD2INSERT

E)ORTING T2ODE tcode TABES D0N)ROTAB bdcdata-

ESE-

ENDIF-ENDFOR(-

T

Include

DR16

The suprogram 23TampANSA2TI5N moves the fied 2 tae either to a atch input session

or uses ca transaction to import the data into the system 5n the seection screen you can specify

$hether you $ant to create a session or you $ant to use ca transaction to process the data directy

The S7SSI5N fied is then set according to your seection

copy SAP AG BC420 12-57

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 5888

025

983209 SAP AG 1999

9unction Module DltLS1ltBRUP

ALL 9UTI DltLS1ltBRUP

11PTIS

TltP1 6

NU1U1lt1RRR amp

-ith the function modue 232+5S73ltamp54P you can cose a atch input session

In 7G27PTI5NS you get various return vaues that can e ueried $ith SC9S4amp2

copy SAP AG BC420 12-58

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 5988

027

983209 SAP AG 1999

Subprogram LS1ltBRUP

FOR( cloe8rou-IF e9on -cloe batcgt 9nut 8rou

2A FUN2TION BD22OSEGROU)-

ESE-IF e8rouoened -

2A FUN2TION BD22OSEGROU)-

ENDIF-ENDIF-

ENDFOR(-

LS1ltBRUPlose session

lose error session

Include

DR16

The suprogram 2+5S73ltamp54P coses the atch input session The suprogram differentiates

et$een a norma I session (S7SSI5N E G) and a session opened $hen ca transaction

encountered an error (73ltamp54P35P7N7 E G)

copy SAP AG BC420 12-59

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 6088

080

983209 SAP AG 1999

Subprograms DltDPRG Dlt9I1LD

DltDPR

Dlt9I1LD

FOR( bdc9eld USING nam al-IF al 34 nodata-2EAR bdcdata- bdcdata1nam nam- bdcdata1al al- A))END bdcdata-ENDIF-

ENDFOR(-

FOR( bdcdltnro USING ro8ram dltnro- 2EAR bdcdata-Bdcdata1ro8ram ro8ram-Bdcdata1dltnro dltnro-Bdcdata1dltnbe89n - A))END bdcdata-ENDFOR(-

Include

DR16

The incude 2amp72GG contains t$o suprograms 23CNPamp5 and 23FI7+

Suprogram 23CNPamp5 fis the 2 tae $ith program names and screen numers

Suprogram 23FI7+ fis the 2 tae $ith fied names and vaues

7ach suprogram creates an entry in the 2 tae

copy SAP AG BC420 12-60

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 6188

086

983209 SAP AG 1999

9illing the D Table

erorm bdcdltnro u9n8 SA)(FD +- erorm bdc9eld u9n8 BD22URSOR RFD1BUKRS- erorm bdc9eld u9n8 BD2OK2ODE 6- erorm bdc9eld u9n8 RFD1BUKRS record1BUKRS- erorm bdc9eld u9n8 RFD1KTOKD record1KTOKD-

erorm bdcdltnro u9n8 SA)(FD -

erorm bdc9eld u9n8 BD22URSOR KNA1S)RAS- erorm bdc9eld u9n8 BD2OK2ODE 6- erorm bdc9eld u9n8 KNA1NA(E record1NA(E-

erorm bdc9eld u9n8 KNA1SORT record1SORT-

Recording Benerated automaticall(

from the recording

)ERFOR( bdcdltnro USING SA)(FD +- )ERFOR( bdc9eld USING BD22URSOR RFD1BUKRS-)ERFOR( bdc9eld USING BD2OK2ODE 6-)ERFOR( bdc9eld USING RFD1BUKRS record1BUKRS-)ERFOR( bdc9eld USING RFD1KTOKD record1KTOKD-

)ERFOR( bdcdltnro USING SA)(FD -

)ERFOR( bdc9eld USING BD22URSOR KNA1S)RAS-)ERFOR( bdc9eld USING BD2OK2ODE 6-)ERFOR( bdc9eld USING KNA1NA(E record1NA(E-

)ERFOR( bdc9eld USING KNA1SORT record1SORT- ---

The 2 tae is fied $ith data from the recording The suroutines 23CNPamp5 and

23FI7+ are used for this

The suroutines are caed in the reuired structure or seuence

copy SAP AG BC420 12-61

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 6288

08amp

983209 SAP AG 1999

erie)

SAPDatabase

SeJuential9ile

SAPDatabase

ALL TRASATIALL TRASATI

SeJuential9ile

ATE IPUTATE IPUT

D TableD TableD TableD Table

I Monitor

T

In contrast to atch input you can use ca transaction to directy pass data to the diaog interface

$ithout using a atch input session Cou use an interna tae (2 tae same structure and ayout

as atch input) to temporariy store your screen data Then you ca the desired transaction in your

program

Note 5n average the 2a Transaction method is 8 to times faster than using atch Input

copy SAP AG BC420 12-62

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 6388

08

983209 SAP AG 1999

all Transaction Program$ 1ample

RE)ORT abcbdcdcdeb9ct-

)ARA(ETERS d9mode DEFAUT A

udmode DEFAUT S-FOR( calltranact9on-2A TRANSA2TION FD

USING bdcdata (ODE d9mode

U)DATE udmode-

IF lt1ubrc NE - 5RITE 6 ---

ENDIF-ENDFOR(-

Screen

00

Screen

100

Screen

An additiona system ro area is added for the caed transaction The system uses this area for

processing the individua screens in the transactionH the data from the tae is added here After the

transaction is processed the second ro area is reeasedH the system continues processing in the first

ro area

Notes

In contrast to atch input there is no error ogging (error sessions) here For processing the caed

transaction the system uses the authoriDations of the user that caed the transaction The 2 tae

can ony hod data for one transaction run at a time efore another transaction is caed and its data

can e added you must eecute a amp7Famp7S= for the 2 tae

copy SAP AG BC420 12-63

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 6488

084

983209 SAP AG 1999

ALL TRASATI C6

RE)ORT 777-

2A TRANSA2TION FD USING bdcdata (ODE E-

Default for MD1 is A

2A TRANSA2TION 3tranact9oncode4 USING 3bdc1table4 C (ODE A E N C-

-ith the parameter 57 you can seect a specific dispay mode for processing the transaction The

foo$ing three modes are avaiae

A (ispay a)

If you eecute the program a the screens and a their data are dispayed This is the defaut vaue

for the 57 in 2A++ TampANSA2TI5N

N (ispay nothing)

The screens are not dispayed at a regardess of $hether any of them contained errors As soon as

the transaction has een fuy processed contro is returned to your program (The vaue of the

parameter 4PAT7 determines $hether dataase updates are eecuted or not)

7 (ispay errors ony)As soon as an error occurs in a screen the transaction is s$itched to dispay mode so that you can

correct the errors

These dispay modes are the same as those in the atch input session processing

copy SAP AG BC420 12-64

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 6588

082

983209 SAP AG 1999

RE)ORT 777-

2A TRANSA2TION FD USING BD2DATA U)DATE -

ALL TRASATI Camp

RE)ORT 777-

2A TRANSA2TION FD USING bdcdata U)DATE -

2A TRANSA2TION 3tranact9oncode4 USING 3bdc1table4 C (ODE A E N C U)DATE A S C -

Default for UPDAT1 is A

-ith the parameter 4PAT7 you can contro ho$ dataase updates arising from a transaction are

carried out There are three options

A (asynchronous updating) The caed transaction does not $ait unti the dataase has een

updated it simpy for$ard the updates to the SAP update service This usuay speeds up the 2T

program This processing mode is N5T recommended for arge data sets as the caed transaction

does not receive a competion message from the update modue

The caing 2T program therefore cannot te if the transaction has een successfuy competed Cou

shoud use the updating administration function (transaction S8) to determine $hether updating

$as terminated eary The error anaysis correction functions for are ess hepfu than $ith

synchronous updating

S (synchronous updating) -ith synchronous updating the caed transaction $aits unti a the

updates have een competed So processing is so$er than $ith synchronous updating The caed

transaction can ho$ever report any updating errors to the program $hich maes error

anaysiscorrection easier

+ (local updating) $ith oca updating the dataase is not updated in a separate process it is

updated in the caers process (see appication hep documentation for the AAP ey$ord S7T

4PAT7 TAS6 +52A+)

copy SAP AG BC420 12-65

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 6688

088

983209 SAP AG 1999

ALL TRASATI C

RE)ORT 777-DATA mtab T0)E TABE OF bdcm8coll-

2A TRANSA2TION FD USING bdcdata (ESSAGES INTO mtab-

2A TRANSA2TION 3tranact9oncode4 USING 3bdc1table4 C (ODE A E N C U)DATE A S C (ESSAGES INTO 3metab4 C -

7SSAlt7S specifies that a system messages that are output during the eecution of a 2A++

TampANSA2TI5N are $ritten to the interna tae L7SSTA The interna tae must have the

structure 2Slt25++

4nie the cassica atch input processing $ith sessions 2A++ TampANSA2TI5N does not offer any

specia processing procedures for transactions containing errors There are no restart functions for

transactions that contain errors or that cause updating terminations

copy SAP AG BC420 12-66

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 6788

083

983209 SAP AG 1999

ALL TRASATI C4

RE)ORT 777-DATA mltot T0)E ctuaram-

2A TRANSA2TION FD USING BD2DATA

O)TIONS FRO( mltot-

2A TRANSA2TION 3tranact9oncode4 USING 3bdc1table4 C (ODE A E N C U)DATE A S C (ESSAGES INTO 3metab4 C O)TIONS FRO( ot C -

RE)ORT 777-DATA mltot T0)E ctuaram-2A TRANSA2TION FD USING bdcdata

O)TIONS FRO( mltot-

The addition 5PTI5NS enaes the ca transaction statement to e controed through a structure

The structure must have the dictionary type 2T43PAampAS

The addition 5PTI5NS Famp5 must not e comined either $ith the addition 57 or $ith

4PAT7 ore information on the net side

copy SAP AG BC420 12-67

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 6888

085

983209 SAP AG 1999

Structure TUltPARAMS

DISMD1 Procen mode anaoo o addon amp

UPDMD1 $pdae mode anaoo o addon $PA

ATTMD1 CA mode CA conro

D19SI1 orce de=a EndoE e drn procen

RAMMIT +o eD a Camp amp(

IPT +o a ac np eonF a F S-B+P SPAC

I1D +o a ac np eon a=er end o= BC daa

The components are defined as foo$s

The components 7FSIM7 ampA25IT N5INPT and N5I7N can have the foo$ing

vaues KGK E Ces or K K E No

If the addition 5PTI5NS Famp5 is not specified the foo$ing settings appy to the contro

parameters

IS57 from addition 57

4P57 from addition 4PAT7

2ATT57 2ATT not active

7FSIM7 o not not use defaut $indo$s siDe

ampA25IT Successfu eit at 25IT -5amp6

N5INPT atch input session active (SC9INPT E G)

N5I7N atch input session sti active after end of 2 data

copy SAP AG BC420 12-68

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 6988

087

983209 SAP AG 1999

SMSBID Message ID

SMSBT Message T(pe C1GIGWGSGA

SMSB Message umber

SMSB6 Message ariable 6

SMSBamp Message ariable amp

SMSB Message ariable

SMSB4 Message ariable 4

SMSBID Message ID

SMSBT Message T(pe C1GIGWGSGA

SMSB Message umber

SMSB6 Message ariable 6

SMSBamp Message ariable amp

SMSB Message ariable

SMSB4 Message ariable 4

Return code$

S(stem fields$

alue Meaning

0 Successful

6000 1rror in transaction

6000 1rror in processing call transaction

see also the s(stem fields specified

alue Meaning

0 Successful

6000 1rror in transaction

6000 1rror in processing call transaction

see also the s(stem fields specified

9ield name Meaning9ield name9ield name MeaningMeaning

Return ode and S(stem 9ields

The return code is used to specify $hether the caed transaction $as processed successfuy In

addition severa system fieds are fied The numer I type and variaes of the diaog message

output y the caed transaction Cou need this information to output the message tet

copy SAP AG BC420 12-69

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 7088

030

983209 SAP AG 1999

Benerated Program of the TA Recorder

REFRES= (ESSTAB-

2A TRANSA2TION tcode USING bdcdata (ODE ctumode U)DATE cudate (ESSAGES INTO metab-OO) AT metab- ENDOO)-IF lubrc 34 AND e8rou 34 S)A2E- IF e8rouoenend - 2A FUN2TION BD2O)ENGROU) E)ORTING ---------

--------- E8rouoened - ENDIF- 2A FUN2TION BD2INSERT E)ORTING T2ODE tcode TABES D0N)ROTAB bdcdata-ENDIF-REFRES= bdcdata-

Message table output

pen error session

Insert data record that

has errors into error

session

If you have seected ca transaction on the seection screen the generated program runs as foo$s

The onine transaction is caed $ith ca transaction and passed to tae 2ATA A the

messages arising during the ca transaction are put in the interna tae 7SSTA

7SSTA is output as a ist

If you have specified an error session ( 73ltamp54P L SPA27) on the seection screen and the

ca transaction comes across an error (+3S4amp2 L 0) the error session is opened The error

session is ho$ever ony opened once Then the data record is paced in the session

A the other data records that have errors $ith ca transaction are paced in the same session

copy SAP AG BC420 12-70

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 7188

036

983209 SAP AG 1999

The Transaction Recorder

PrinciplesPrinciples

Recording )ith the LSMWRecording )ith the LSMW

Principles of atch Input and all TransactionPrinciples of atch Input and all Transaction

Integrating the TA Program into the DWIntegrating the TA Program into the DW

Using the TA Recorder Using the TA Recorder

copy SAP AG BC420 12-71

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 7288

03amp

983209 SAP AG 1999

Integrating into the DW

Transfer program

AAP Dictionar(

Integrate

SDA0

SDA6

SDAamp

SDA

Cou can integrate the generated program into the G9- The structure of the fie must e created

in the AAP ictionary The taes SGA0 SGA8 SGA1 and SGA $i e fied

copy SAP AG BC420 12-72

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 7388

03

983209 SAP AG 1999

DW Release 42

Goo

-B eeae 45

aa ran=er ogtec

Int customer data transfer ob-ect

ecord =ed

Dece daa ran=er

d Goo

The ampunction ampor interatin TA recorder prora$s is

i$ple$ented in the

D+-B in Release

The recorder can e integrated as of ampeease and it is provided in the G9- ampeease

ltot to the G9- ampeease 5n the initia screen you can integrate programs y choosing ampoto

( +nt customer ata transfer o-ect

copy SAP AG BC420 12-73

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 7488

034

983209 SAP AG 1999

reating Program as D b-ect

Comer ran=er ogtec

ampgtec ype

Sor eD =or ogtec

aa ran=er proram

Srcre name

9900

(+A1

Cane comer

ZBCA+G

ZB

ustomer transfer ob-ect

umber bet)een 7000 and 7777

b-ect t(pe

Assignment to R ob-ect

Short tet for D ob-ectShort description

Data transfer program

ame of generated program

Structure name

A structure Cstructure la(out )ith this name is created in

the AAP Dictionar(

For ampeease transfer oects $ere not organiDed y 5amp oects ut y a G numer (00089

OOOO) The numer range O0009OOOO is reserved for customers

To create a connection to the ne$ G 9- you must assign the program to a 5amp oect

2reate a short tet for the G oect This tet $i appear in the method seection ist

Specify the program to e incuded

Specify a name for the structure to e created in the AAP ictionary

Note $he generated program appears under program type +N and not under program type

-

copy SAP AG BC420 12-74

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 7588

032

983209 SAP AG 1999

Adantages

Automatic program registration in the DW in

Release 48

ou can use all the functions defined for

standard ob-ects

1ception$ The (reate ampile ith data

function

If you incuded the oect in the ampeease $orench it is automaticay avaiae in the ampeease

B $orench

A the $orench functions are avaiae for your oect ecept for Create files ith transfer ata

copy SAP AG BC420 12-75

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 7688

038

983209 SAP AG 1999

ou are no) able to$

The Transaction Recorder$ Unit Summar(

Use the recording function in the LSMW to create

a batch input session )ith the data from the

eternal s(stem

Use the TA Recorder to create (our o)n data

transfer program

Anal(e programs that )or+ )ith batch input or

call transaction

Integrate the TA Recorder programs into the

DW

copy SAP AG BC420 12-76

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 7788

ercise 1

nit $ -ecorder

$opic 2reating etors

$ransaction -ecorder ercise 1

bull 2reating detors $ith eterna numer assignment

bull etor numers M9980008 to M9980080

Address data for detors $ith eterna numer assignment is to

e transferred using program ampFI700

ro4ect F5

Supro4ect +5

-un +575

$as)s 85 95 8S25

9oad program -F+00

8 In the foo$ing eercises eisting data is to e changed Therefore these detors $ith

eterna numer assignment have to first e created

898 4nder suproect 79 create run 797G9 $ith the name Detors ith

eternal numers

copy SAP AG BC420 12-77

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 7888

891 2reate the foo$ing three tass The tass map the foo$ing process steps

convert data create + session and process + session

89198 In run 797G9 create the foo$ing tas

9 Tas AP9

9 Name 2onvert data 9 Tas type AP

9 Program type +S-

Seect the foo$ing +S- oect

+S- proect 2109

+S- suproect 7I9

+S- oect I997GT

89191 In run 797G9 create the foo$ing tas 9 Tas +5A9

9 Name 2reate I session

Tas type +5A

9 Program type INP

Seect program ampFI700 $ith the variant

I97G9

8919 In run 797G9 create the foo$ing tas

9 Tas S29

9 Name Process I session Tas type S2

9 Program type amp7P5

Seect program ampS2S4 $ith the variant

S497G9

Note that you have to correct the seuence of the tass 2onvert data

create + session and process + session

4se the uttons

89 Start the run

The detors $i e created $ith eterna numer assignments

89 2hec in transaction F0 that the detors M9980008 to M9980080 have een

created

copy SAP AG BC420 12-78

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 7988

ercise

nit $ransaction -ecorder

$opic -ecording function in the 9S8(

bull 2reate a recording using the +S-

bull ltenerate a atch input session

2hange the detor address data in the amp System

Name of the recording +

Name of the file +2055+F9

8 2reate the recording 7I3 using the +S- ampecord the transaction F01 (2hange

detor)

898 efore you create the recording first test the transaction onineQ

For the recording use detor M9980008 5n the initia screen of the F01

maintain the foo$ing fieds ony

etor etor M9980008

2ompany code 0008

Address data seect

Note $he data record must e saved hile recording

891 aintain the names and the descriptions for the foo$ing fieds

Name city street posta code and teephone numereete a other fieds in screen 880 from the recording (eg S5ampT+ +AN8

SPampAS)

4se the same technica names as sho$n in the tae eo$ (automatic fied

mapping)

copy SAP AG BC420 12-79

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 8088

1 2reate the suproect 7I9 and the ne$ oect TA3 in your proect 2109

aintain the oect attriutes and seect the item atch input recording Seect your

recording 7I3

2reate the source structure address

2reate the source fieds according to the tae eo$ 5r copy them from proect 2109S37N suproect 7I900 oect TA900

198 Fie setup The data from the egacy system are dispayed in the foo$ing tae

Fied name Fied type Fied ength escription

N5 2 8B etor numer

NA7 2 Name

STamp77T 2 Street

2ITC 2 2ityPace of residence

MIP 2 80 Posta code

T7+ 2 8B Teephone numer

191 aintain the fied mapping 4se the automatic fied mapping (via menu item

7tras)

19 Specify the fies 5ny maintain the fie name of the source fie

Name of the fie 21099IFI+7

2odepage 8800

19 Import the data and convert them ispay the data in each caseQ

19 2reate a atch input session

19B ampun the atch input session

copy SAP AG BC420 12-80

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 8188

ercise 3

nit $ransaction -ecorder

$opic -ecording ith the $ -ecorder

bull ltenerate a recording using the TA recorder

bull Test the recording

2hange the address data of detors in the amp system

Name recording $+

Name of the file +2055+F9

8 2reate the recording TA37I3 using the transaction recorder ampecord the

transaction F01 (change detor)

898 4se detor M9980008 for the recording 5n the F01 initia screen ony

maintain the foo$ing fieds

etor etor M9980008

2ompany 2ode 0008

Address data seect

Note $he data record must e saved hen recording

eete a fieds that do not eist in the source fie 21099IFI+7 from screen

880 in the recording (eg 6NA89S5ampT+ 6NA89+AN8 6ANNQ9SPampAS) Note o not deete fieds ampF01946ampS and ampF0190880

Save the recording no$

1 S$itch to the recordings overvie$

198 Process the recording $ith the processing mode A (dispay a)

191 Process the recording $ith the processing mode RN (no dispay)

19 If the recording has een tested and no error has occurred generate a I session

and run it using the I monitor If an error shoud occur generate the recordingagainQ

copy SAP AG BC420 12-81

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 8288

From the recording generate the program M21037I3 in your deveopment cass

2109 Seect the foo$ing

bull ampead fied contents from fie

bull 2reate test data in the fie 2103dei3test3tt

98 Save this program and eecute it ltenerate one I session each and process it

2arry out the same steps again using the ca transaction

The generated program shoud no$ e changed so that fie 21099IFI+7 can e

read and processed

98 2hange the defaut vaue of the fie name (parameter dataset) in 21099

IFI+7

91 2hange the structure definition eete the company code fied and the address

data checo from the structure

9 2hange the su9routine ca perform dc3fied for the company code (KampF019

46ampSK) so that the vaue 0008 is transferred

9 2hange the su9routine ca perform dc3fied for the address data checo

(KampF0190880K) so that the vaue G is transferred

9 Start the program again and read the data from the fie 21099IFI+7 $ith

detor data ltenerate a I session $ith it and run it

copy SAP AG BC420 12-82

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 8388

033 Include DR16INCLUDE BDCRECX1

SELECTION-SCREEN BEGIN OF LINE

PARAMETERS SESSION RADIOBUTTON GROUP CTU create sessi SELECTION-SCREEN COMMENT $amp TEXT-S FOR FIELD SESSION

se(ecti-scree )siti +

PARAMETERS CTU RADIOBUTTON GROUP CTU ca(( trasacti

SELECTION-SCREEN COMMENT $amp TEXT-S FOR FIELD CTU

SELECTION-SCREEN END OF LINE

SELECTION-SCREEN BEGIN OF LINE

SELECTION-SCREEN COMMENT $amp TEXT-S1 FOR FIELD GROUP

se(ecti-scree )siti $+

PARAMETERS GROUP1$amp r) ae 0 sessi

SELECTION-SCREEN COMMENT $amp TEXT-S+ FOR FIELD CTUMODE

se(ecti-scree )siti

PARAMETERS CTUMODE LIE CTU2PARAMS-DISMODE DEFAULT 3N3

A4 s56 a(( 78)rs

E4 s56 78)r errr (8

N4 7 t 7is)(a8 78)r

SELECTION-SCREEN END OF LINE

SELECTION-SCREEN BEGIN OF LINE

SELECTION-SCREEN COMMENT $amp TEXT-S$ FOR FIELD USER

se(ecti-scree )siti $+

PARAMETERS4 USER1$amp DEFAULT S9-UNAME ser 0r sessi i atc5

SELECTION-SCREEN COMMENT $amp TEXT-S FOR FIELD CUPDATE

se(ecti-scree )siti

PARAMETERS CUPDATE LIE CTU2PARAMS-UPDMODE DEFAULT 3L3

S4 s8c5rs(8

A4 as8c5rs(8

L4 (ca(

SELECTION-SCREEN END OF LINE

SELECTION-SCREEN BEGIN OF LINE

SELECTION-SCREEN COMMENT $amp TEXT-S FOR FIELD EEP

se(ecti-scree )siti $+

PARAMETERS4 EEP AS CltECBOX 3 3 = 7e(ete sessi i0 0iis5e7

3X3 = gtee) sessi i0 0iis5e7

SELECTION-SCREEN COMMENT $amp TEXT-S FOR FIELD E2GROUP

copy SAP AG BC420 12-83

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 8488

se(ecti-scree )siti

)araeters E2GROUP1$amp r) ae 0 errr-sessi

SELECTION-SCREEN END OF LINE

SELECTION-SCREEN BEGIN OF LINE

SELECTION-SCREEN COMMENT $amp TEXT-S FOR FIELD ltOLDDATE

se(ecti-scree )siti $+

PARAMETERS4 ltOLDDATE LIE S9-DATUM

SELECTION-SCREEN COMMENT +11amp TEXT-S$ FOR FIELD E2USER

se(ecti-scree )siti

PARAMETERS4 E2USER1$amp DEFAULT S9-UNAME ser 0r errr-sessi

SELECTION-SCREEN END OF LINE

SELECTION-SCREEN BEGIN OF LINE

SELECTION-SCREEN COMMENT +11amp TEXT-S FOR FIELD E2EEP

se(ecti-scree )siti

PARAMETERS4 E2EEP AS CltECBOX 3 3 = 7e(ete sessi i0 0iis5e7

3X3 = gtee) sessi i0 0iis5e7

SELECTION-SCREEN END OF LINE

SELECTION-SCREEN BEGIN OF LINE

SELECTION-SCREEN COMMENT +11amp TEXT-S FOR FIELD E2ltDATE

se(ecti-scree )siti

PARAMETERS4 E2ltDATE LIE S9-DATUM

SELECTION-SCREEN END OF LINE

SELECTION-SCREEN SIP

SELECTION-SCREEN BEGIN OF LINE

SELECTION-SCREEN COMMENT 1amp TEXT-S1 FOR FIELD NODATA

PARAMETERS4 NODATA DEFAULT 33 LOER CASE 7ata

SELECTION-SCREEN END OF LINE

----------------------------------------------------------------------

Batc5i)t7ata 0 si(e trasacti

DATA4 BDCDATA LIE BDCDATA OCCURS ITlt ltEADER LINE

essaes 0 ca(( trasacti

DATA4 MESSTAB LIE BDCMSGCOLL OCCURS ITlt ltEADER LINE

errr sessi )ee7 3 3 r 3X3amp

DATA4 E2GROUP2OPENED

essae tets

TABLES4 T1

copy SAP AG BC420 12-84

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 8588

----------------------------------------------------------------------

at se(ecti scree

----------------------------------------------------------------------

AT SELECTION-SCREEN

r) a7 ser st e 0i((e7 0r create sessi

IF SESSION = 3X3 AND

GROUP = SPACE OR USER = SPACE

MESSAGE E1MSamp

ENDIF

----------------------------------------------------------------------

)e 7ataset

----------------------------------------------------------------------

FORM OPEN2DATASET USING P2DATASET

OPEN DATASET P2DATASET IN TEXT MODE

IF S9-SUBRC

RITE4 TEXT-E S9-SUBRC

STOP

ENDIF

ENDFORM

----------------------------------------------------------------------

c(se 7ataset

----------------------------------------------------------------------

FORM CLOSE2DATASET USING P2DATASET

CLOSE DATASET P2DATASET

ENDFORM

----------------------------------------------------------------------

create atc5i)t sessi

t 0r ca(( trasacti siamp

----------------------------------------------------------------------

FORM OPEN2GROUP

IF SESSION = 3X3

SIP

RITE4 $amp 3Create r)3I1amp GROUP

SIP

)e atc5i)t r)

CALL FUNCTION 3BDC2OPEN2GROUP3

EXPORTING CLIENT = S9-MANDT

copy SAP AG BC420 12-85

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 8688

GROUP = GROUP

USER = USER

EEP = EEP

ltOLDDATE = ltOLDDATE

RITE4 amp 3BDC2OPEN2GROUP3I$amp

1$amp 3retrc7e43I+amp

S9-SUBRC

ENDIF

ENDFORM

----------------------------------------------------------------------

e7 atc5i)t sessi

ca(( trasacti si4 errr sessiamp

----------------------------------------------------------------------

FORM CLOSE2GROUP

IF SESSION = 3X3

c(se atc5i)t r)

CALL FUNCTION 3BDC2CLOSE2GROUP3

RITE4 amp 3BDC2CLOSE2GROUP3Iamp

1$amp 3retrc7e43I+amp

S9-SUBRC

ELSE

IF E2GROUP2OPENED = 3X3

CALL FUNCTION 3BDC2CLOSE2GROUP3

RITE4

RITE4 amp 3Fe5(era))e 6r7e eret3Iamp

ENDIF

ENDIF

ENDFORM

----------------------------------------------------------------------

Start e6 trasacti accr7i t )araeters

----------------------------------------------------------------------

FORM BDC2TRANSACTION USING TCODE

DATA4 L2MSTRINGamp

DATA4 L2SUBRC LIE S9-SUBRC

atc5 i)t sessi

IF SESSION = 3X3

CALL FUNCTION 3BDC2INSERT3

EXPORTING TCODE = TCODE

TABLES D9NPROTAB = BDCDATA

RITE4 3BDC2INSERT3Iamp

copy SAP AG BC420 12-86

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 8788

TCODE

3retrc7e43I+amp

S9-SUBRC

3RECORD43

S9-INDEX

ca(( trasacti si

ELSE

REFRESlt MESSTAB

CALL TRANSACTION TCODE USING BDCDATA

MODE CTUMODE

UPDATE CUPDATE

MESSAGES INTO MESSTAB

L2SUBRC = S9-SUBRC

RITE4 3CALL2TRANSACTION3

TCODE

3retrc7e43I+amp

L2SUBRC

3RECORD43

S9-INDEX

LOOP AT MESSTAB

SELECT SINGLE FROM T1 ltERE SPRSL = MESSTAB-MSGSPRA

AND ARBGB = MESSTAB-MSGID

AND MSGNR = MESSTAB-MSGNR

IF S9-SUBRC =

L2MSTRING = T1-TEXT

IF L2MSTRING CS 313

REPLACE 313 ITlt MESSTAB-MSGH1 INTO L2MSTRING

REPLACE 3$3 ITlt MESSTAB-MSGH$ INTO L2MSTRING

REPLACE 33 ITlt MESSTAB-MSGH INTO L2MSTRING

REPLACE 33 ITlt MESSTAB-MSGH INTO L2MSTRING

ELSE

REPLACE 33 ITlt MESSTAB-MSGH1 INTO L2MSTRING

REPLACE 33 ITlt MESSTAB-MSGH$ INTO L2MSTRING

REPLACE 33 ITlt MESSTAB-MSGH INTO L2MSTRING

REPLACE 33 ITlt MESSTAB-MSGH INTO L2MSTRING

ENDIF

CONDENSE L2MSTRING

RITE4 MESSTAB-MSGT9P L2MSTRING$+amp

ELSE

RITE4 MESSTAB

ENDIF

ENDLOOP

copy SAP AG BC420 12-87

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 8888

SIP

Eree 0e5(era))e

IF L2SUBRC AND E2GROUP SPACE

IF E2GROUP2OPENED = 3 3

CALL FUNCTION 3BDC2OPEN2GROUP3

EXPORTING CLIENT = S9-MANDT

GROUP = E2GROUP

USER = E2USER

EEP = E2EEP

ltOLDDATE = E2ltDATE

E2GROUP2OPENED = 3X3

ENDIF

CALL FUNCTION 3BDC2INSERT3

EXPORTING TCODE = TCODE

TABLES D9NPROTAB = BDCDATA

ENDIF

ENDIF

REFRESlt BDCDATA

ENDFORM

----------------------------------------------------------------------

Start e6 scree

----------------------------------------------------------------------

FORM BDC2D9NPRO USING PROGRAM D9NPRO

CLEAR BDCDATA

BDCDATA-PROGRAM = PROGRAM

BDCDATA-D9NPRO = D9NPRO

BDCDATA-D9NBEGIN = 3X3

APPEND BDCDATA

ENDFORM

----------------------------------------------------------------------

Isert 0ie(7

Page 54: BC420_46C - 012The Transaction Recorder

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 5488

024

983209 SAP AG 2001

9unction Module DltP1ltBRUP

ALL 9UTI DltP1ltBRUPALL 9UTI DltP1ltBRUP

1PRTIB

LI1T client

BRUP session name

ELDDAT1 loc+ date

=11P delete flag

US1R bdc user name

R1RD recording

IMPRTIB

NID internal session +e(

11PTIS

1PRTIB

LI1T client

BRUP session name

ELDDAT1 loc+ date

=11P delete flag

US1R bdc user name

R1RD recording

IMPRTIB NID internal session +e(

11PTIS

-ith the function modue 235P7N3ltamp54P you can open a atch input session

The foo$ing parameters are mandatory

2+I7NT (cient)

ltamp54P (session name)

4S7amp (user name)

Note The 4S7amp must a$ays e specified This user name is reuired for processing the session

in atch mode

The foo$ing parameters are optiona

=5+AT7 specifies the eariest date on $hich the session can e started677P fag specifies $hether session shoud e deeted after it has een successfuy processed The

677P fag is ignored if the session contains errors

677P E K K means deete the session after processing (defaut vaue) H

677P E KGK means do not deete session

amp725amp E KGK ao$s you to create a recording instead of a I session

If gtI is specified the function modue returns the interna session ey This is needed to e ae to

differentiate sessions that have the same name

-ith 7G27PTI5NS you get various return vaues that can e ueried $ith SC9S4amp2

Note In onine mode the onine user is used for the authoriDation checs regardess of the user

name specified

copy SAP AG BC420 12-54

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 5588

022

983209 SAP AG 1999

Subprogram P1ltBRUP

P1ltBRUP

FOR( oen8rou-IF e9on -

2A FUN2TION BD2O)ENGROU) E)ORTING 2IENT lt1mandt GROU) 8rou USER uer KEE) kee

=ODDATE gtolddate-

ENDIF-ENDFOR(-

Include

DR16

The suprogram 5P7N3ltamp54P opens the atch input session

copy SAP AG BC420 12-55

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 5688

028

983209 SAP AG 1999

9unction Module DltIS1RT

ALL 9UTI DltIS1RTALL 9UTI DltIS1RT

IMPRT

TD1 Transaction code

PSTltLAL Update locall(

PRITIB print list

TAL1S DPRTA bdclttable

11PTIS

IMPRT

TD1 Transaction code

PSTltLAL Update locall(

PRITIB print list

TAL1S DPRTA bdclttable

11PTIS

-ith the function modue 23INS7ampT you can add transaction data to the session

Cou need an interna 2 tae to transfer the data

The foo$ing parameters are mandatory

T257 Transaction code

CNPamp5TA 2 tae

The foo$ing parameters are optiona

P5ST3+52A+ E KGK activates oca updating This means that the data to e updated is ept in the

appication server and updated in the ast step of the transaction This does not invove the update

process (For more information see course 28 Programming ataase 4pdates)

PampINTINlt E KGK 9 ists processed in I $i e printed immediatey -ith 7G27PTI5NS you get various return vaues that can e ueried $ith SC9S4amp2

copy SAP AG BC420 12-56

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 5788

023

983209 SAP AG 1999

Subprogram DltTRASATI

DltTRASATI

FOR( BD2TRANSA2TION USING tcode-

IF e9on -2A FUN2TION BD2INSERT

E)ORTING T2ODE tcode TABES D0N)ROTAB bdcdata-

ESE-

ENDIF-ENDFOR(-

T

Include

DR16

The suprogram 23TampANSA2TI5N moves the fied 2 tae either to a atch input session

or uses ca transaction to import the data into the system 5n the seection screen you can specify

$hether you $ant to create a session or you $ant to use ca transaction to process the data directy

The S7SSI5N fied is then set according to your seection

copy SAP AG BC420 12-57

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 5888

025

983209 SAP AG 1999

9unction Module DltLS1ltBRUP

ALL 9UTI DltLS1ltBRUP

11PTIS

TltP1 6

NU1U1lt1RRR amp

-ith the function modue 232+5S73ltamp54P you can cose a atch input session

In 7G27PTI5NS you get various return vaues that can e ueried $ith SC9S4amp2

copy SAP AG BC420 12-58

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 5988

027

983209 SAP AG 1999

Subprogram LS1ltBRUP

FOR( cloe8rou-IF e9on -cloe batcgt 9nut 8rou

2A FUN2TION BD22OSEGROU)-

ESE-IF e8rouoened -

2A FUN2TION BD22OSEGROU)-

ENDIF-ENDIF-

ENDFOR(-

LS1ltBRUPlose session

lose error session

Include

DR16

The suprogram 2+5S73ltamp54P coses the atch input session The suprogram differentiates

et$een a norma I session (S7SSI5N E G) and a session opened $hen ca transaction

encountered an error (73ltamp54P35P7N7 E G)

copy SAP AG BC420 12-59

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 6088

080

983209 SAP AG 1999

Subprograms DltDPRG Dlt9I1LD

DltDPR

Dlt9I1LD

FOR( bdc9eld USING nam al-IF al 34 nodata-2EAR bdcdata- bdcdata1nam nam- bdcdata1al al- A))END bdcdata-ENDIF-

ENDFOR(-

FOR( bdcdltnro USING ro8ram dltnro- 2EAR bdcdata-Bdcdata1ro8ram ro8ram-Bdcdata1dltnro dltnro-Bdcdata1dltnbe89n - A))END bdcdata-ENDFOR(-

Include

DR16

The incude 2amp72GG contains t$o suprograms 23CNPamp5 and 23FI7+

Suprogram 23CNPamp5 fis the 2 tae $ith program names and screen numers

Suprogram 23FI7+ fis the 2 tae $ith fied names and vaues

7ach suprogram creates an entry in the 2 tae

copy SAP AG BC420 12-60

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 6188

086

983209 SAP AG 1999

9illing the D Table

erorm bdcdltnro u9n8 SA)(FD +- erorm bdc9eld u9n8 BD22URSOR RFD1BUKRS- erorm bdc9eld u9n8 BD2OK2ODE 6- erorm bdc9eld u9n8 RFD1BUKRS record1BUKRS- erorm bdc9eld u9n8 RFD1KTOKD record1KTOKD-

erorm bdcdltnro u9n8 SA)(FD -

erorm bdc9eld u9n8 BD22URSOR KNA1S)RAS- erorm bdc9eld u9n8 BD2OK2ODE 6- erorm bdc9eld u9n8 KNA1NA(E record1NA(E-

erorm bdc9eld u9n8 KNA1SORT record1SORT-

Recording Benerated automaticall(

from the recording

)ERFOR( bdcdltnro USING SA)(FD +- )ERFOR( bdc9eld USING BD22URSOR RFD1BUKRS-)ERFOR( bdc9eld USING BD2OK2ODE 6-)ERFOR( bdc9eld USING RFD1BUKRS record1BUKRS-)ERFOR( bdc9eld USING RFD1KTOKD record1KTOKD-

)ERFOR( bdcdltnro USING SA)(FD -

)ERFOR( bdc9eld USING BD22URSOR KNA1S)RAS-)ERFOR( bdc9eld USING BD2OK2ODE 6-)ERFOR( bdc9eld USING KNA1NA(E record1NA(E-

)ERFOR( bdc9eld USING KNA1SORT record1SORT- ---

The 2 tae is fied $ith data from the recording The suroutines 23CNPamp5 and

23FI7+ are used for this

The suroutines are caed in the reuired structure or seuence

copy SAP AG BC420 12-61

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 6288

08amp

983209 SAP AG 1999

erie)

SAPDatabase

SeJuential9ile

SAPDatabase

ALL TRASATIALL TRASATI

SeJuential9ile

ATE IPUTATE IPUT

D TableD TableD TableD Table

I Monitor

T

In contrast to atch input you can use ca transaction to directy pass data to the diaog interface

$ithout using a atch input session Cou use an interna tae (2 tae same structure and ayout

as atch input) to temporariy store your screen data Then you ca the desired transaction in your

program

Note 5n average the 2a Transaction method is 8 to times faster than using atch Input

copy SAP AG BC420 12-62

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 6388

08

983209 SAP AG 1999

all Transaction Program$ 1ample

RE)ORT abcbdcdcdeb9ct-

)ARA(ETERS d9mode DEFAUT A

udmode DEFAUT S-FOR( calltranact9on-2A TRANSA2TION FD

USING bdcdata (ODE d9mode

U)DATE udmode-

IF lt1ubrc NE - 5RITE 6 ---

ENDIF-ENDFOR(-

Screen

00

Screen

100

Screen

An additiona system ro area is added for the caed transaction The system uses this area for

processing the individua screens in the transactionH the data from the tae is added here After the

transaction is processed the second ro area is reeasedH the system continues processing in the first

ro area

Notes

In contrast to atch input there is no error ogging (error sessions) here For processing the caed

transaction the system uses the authoriDations of the user that caed the transaction The 2 tae

can ony hod data for one transaction run at a time efore another transaction is caed and its data

can e added you must eecute a amp7Famp7S= for the 2 tae

copy SAP AG BC420 12-63

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 6488

084

983209 SAP AG 1999

ALL TRASATI C6

RE)ORT 777-

2A TRANSA2TION FD USING bdcdata (ODE E-

Default for MD1 is A

2A TRANSA2TION 3tranact9oncode4 USING 3bdc1table4 C (ODE A E N C-

-ith the parameter 57 you can seect a specific dispay mode for processing the transaction The

foo$ing three modes are avaiae

A (ispay a)

If you eecute the program a the screens and a their data are dispayed This is the defaut vaue

for the 57 in 2A++ TampANSA2TI5N

N (ispay nothing)

The screens are not dispayed at a regardess of $hether any of them contained errors As soon as

the transaction has een fuy processed contro is returned to your program (The vaue of the

parameter 4PAT7 determines $hether dataase updates are eecuted or not)

7 (ispay errors ony)As soon as an error occurs in a screen the transaction is s$itched to dispay mode so that you can

correct the errors

These dispay modes are the same as those in the atch input session processing

copy SAP AG BC420 12-64

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 6588

082

983209 SAP AG 1999

RE)ORT 777-

2A TRANSA2TION FD USING BD2DATA U)DATE -

ALL TRASATI Camp

RE)ORT 777-

2A TRANSA2TION FD USING bdcdata U)DATE -

2A TRANSA2TION 3tranact9oncode4 USING 3bdc1table4 C (ODE A E N C U)DATE A S C -

Default for UPDAT1 is A

-ith the parameter 4PAT7 you can contro ho$ dataase updates arising from a transaction are

carried out There are three options

A (asynchronous updating) The caed transaction does not $ait unti the dataase has een

updated it simpy for$ard the updates to the SAP update service This usuay speeds up the 2T

program This processing mode is N5T recommended for arge data sets as the caed transaction

does not receive a competion message from the update modue

The caing 2T program therefore cannot te if the transaction has een successfuy competed Cou

shoud use the updating administration function (transaction S8) to determine $hether updating

$as terminated eary The error anaysis correction functions for are ess hepfu than $ith

synchronous updating

S (synchronous updating) -ith synchronous updating the caed transaction $aits unti a the

updates have een competed So processing is so$er than $ith synchronous updating The caed

transaction can ho$ever report any updating errors to the program $hich maes error

anaysiscorrection easier

+ (local updating) $ith oca updating the dataase is not updated in a separate process it is

updated in the caers process (see appication hep documentation for the AAP ey$ord S7T

4PAT7 TAS6 +52A+)

copy SAP AG BC420 12-65

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 6688

088

983209 SAP AG 1999

ALL TRASATI C

RE)ORT 777-DATA mtab T0)E TABE OF bdcm8coll-

2A TRANSA2TION FD USING bdcdata (ESSAGES INTO mtab-

2A TRANSA2TION 3tranact9oncode4 USING 3bdc1table4 C (ODE A E N C U)DATE A S C (ESSAGES INTO 3metab4 C -

7SSAlt7S specifies that a system messages that are output during the eecution of a 2A++

TampANSA2TI5N are $ritten to the interna tae L7SSTA The interna tae must have the

structure 2Slt25++

4nie the cassica atch input processing $ith sessions 2A++ TampANSA2TI5N does not offer any

specia processing procedures for transactions containing errors There are no restart functions for

transactions that contain errors or that cause updating terminations

copy SAP AG BC420 12-66

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 6788

083

983209 SAP AG 1999

ALL TRASATI C4

RE)ORT 777-DATA mltot T0)E ctuaram-

2A TRANSA2TION FD USING BD2DATA

O)TIONS FRO( mltot-

2A TRANSA2TION 3tranact9oncode4 USING 3bdc1table4 C (ODE A E N C U)DATE A S C (ESSAGES INTO 3metab4 C O)TIONS FRO( ot C -

RE)ORT 777-DATA mltot T0)E ctuaram-2A TRANSA2TION FD USING bdcdata

O)TIONS FRO( mltot-

The addition 5PTI5NS enaes the ca transaction statement to e controed through a structure

The structure must have the dictionary type 2T43PAampAS

The addition 5PTI5NS Famp5 must not e comined either $ith the addition 57 or $ith

4PAT7 ore information on the net side

copy SAP AG BC420 12-67

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 6888

085

983209 SAP AG 1999

Structure TUltPARAMS

DISMD1 Procen mode anaoo o addon amp

UPDMD1 $pdae mode anaoo o addon $PA

ATTMD1 CA mode CA conro

D19SI1 orce de=a EndoE e drn procen

RAMMIT +o eD a Camp amp(

IPT +o a ac np eonF a F S-B+P SPAC

I1D +o a ac np eon a=er end o= BC daa

The components are defined as foo$s

The components 7FSIM7 ampA25IT N5INPT and N5I7N can have the foo$ing

vaues KGK E Ces or K K E No

If the addition 5PTI5NS Famp5 is not specified the foo$ing settings appy to the contro

parameters

IS57 from addition 57

4P57 from addition 4PAT7

2ATT57 2ATT not active

7FSIM7 o not not use defaut $indo$s siDe

ampA25IT Successfu eit at 25IT -5amp6

N5INPT atch input session active (SC9INPT E G)

N5I7N atch input session sti active after end of 2 data

copy SAP AG BC420 12-68

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 6988

087

983209 SAP AG 1999

SMSBID Message ID

SMSBT Message T(pe C1GIGWGSGA

SMSB Message umber

SMSB6 Message ariable 6

SMSBamp Message ariable amp

SMSB Message ariable

SMSB4 Message ariable 4

SMSBID Message ID

SMSBT Message T(pe C1GIGWGSGA

SMSB Message umber

SMSB6 Message ariable 6

SMSBamp Message ariable amp

SMSB Message ariable

SMSB4 Message ariable 4

Return code$

S(stem fields$

alue Meaning

0 Successful

6000 1rror in transaction

6000 1rror in processing call transaction

see also the s(stem fields specified

alue Meaning

0 Successful

6000 1rror in transaction

6000 1rror in processing call transaction

see also the s(stem fields specified

9ield name Meaning9ield name9ield name MeaningMeaning

Return ode and S(stem 9ields

The return code is used to specify $hether the caed transaction $as processed successfuy In

addition severa system fieds are fied The numer I type and variaes of the diaog message

output y the caed transaction Cou need this information to output the message tet

copy SAP AG BC420 12-69

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 7088

030

983209 SAP AG 1999

Benerated Program of the TA Recorder

REFRES= (ESSTAB-

2A TRANSA2TION tcode USING bdcdata (ODE ctumode U)DATE cudate (ESSAGES INTO metab-OO) AT metab- ENDOO)-IF lubrc 34 AND e8rou 34 S)A2E- IF e8rouoenend - 2A FUN2TION BD2O)ENGROU) E)ORTING ---------

--------- E8rouoened - ENDIF- 2A FUN2TION BD2INSERT E)ORTING T2ODE tcode TABES D0N)ROTAB bdcdata-ENDIF-REFRES= bdcdata-

Message table output

pen error session

Insert data record that

has errors into error

session

If you have seected ca transaction on the seection screen the generated program runs as foo$s

The onine transaction is caed $ith ca transaction and passed to tae 2ATA A the

messages arising during the ca transaction are put in the interna tae 7SSTA

7SSTA is output as a ist

If you have specified an error session ( 73ltamp54P L SPA27) on the seection screen and the

ca transaction comes across an error (+3S4amp2 L 0) the error session is opened The error

session is ho$ever ony opened once Then the data record is paced in the session

A the other data records that have errors $ith ca transaction are paced in the same session

copy SAP AG BC420 12-70

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 7188

036

983209 SAP AG 1999

The Transaction Recorder

PrinciplesPrinciples

Recording )ith the LSMWRecording )ith the LSMW

Principles of atch Input and all TransactionPrinciples of atch Input and all Transaction

Integrating the TA Program into the DWIntegrating the TA Program into the DW

Using the TA Recorder Using the TA Recorder

copy SAP AG BC420 12-71

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 7288

03amp

983209 SAP AG 1999

Integrating into the DW

Transfer program

AAP Dictionar(

Integrate

SDA0

SDA6

SDAamp

SDA

Cou can integrate the generated program into the G9- The structure of the fie must e created

in the AAP ictionary The taes SGA0 SGA8 SGA1 and SGA $i e fied

copy SAP AG BC420 12-72

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 7388

03

983209 SAP AG 1999

DW Release 42

Goo

-B eeae 45

aa ran=er ogtec

Int customer data transfer ob-ect

ecord =ed

Dece daa ran=er

d Goo

The ampunction ampor interatin TA recorder prora$s is

i$ple$ented in the

D+-B in Release

The recorder can e integrated as of ampeease and it is provided in the G9- ampeease

ltot to the G9- ampeease 5n the initia screen you can integrate programs y choosing ampoto

( +nt customer ata transfer o-ect

copy SAP AG BC420 12-73

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 7488

034

983209 SAP AG 1999

reating Program as D b-ect

Comer ran=er ogtec

ampgtec ype

Sor eD =or ogtec

aa ran=er proram

Srcre name

9900

(+A1

Cane comer

ZBCA+G

ZB

ustomer transfer ob-ect

umber bet)een 7000 and 7777

b-ect t(pe

Assignment to R ob-ect

Short tet for D ob-ectShort description

Data transfer program

ame of generated program

Structure name

A structure Cstructure la(out )ith this name is created in

the AAP Dictionar(

For ampeease transfer oects $ere not organiDed y 5amp oects ut y a G numer (00089

OOOO) The numer range O0009OOOO is reserved for customers

To create a connection to the ne$ G 9- you must assign the program to a 5amp oect

2reate a short tet for the G oect This tet $i appear in the method seection ist

Specify the program to e incuded

Specify a name for the structure to e created in the AAP ictionary

Note $he generated program appears under program type +N and not under program type

-

copy SAP AG BC420 12-74

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 7588

032

983209 SAP AG 1999

Adantages

Automatic program registration in the DW in

Release 48

ou can use all the functions defined for

standard ob-ects

1ception$ The (reate ampile ith data

function

If you incuded the oect in the ampeease $orench it is automaticay avaiae in the ampeease

B $orench

A the $orench functions are avaiae for your oect ecept for Create files ith transfer ata

copy SAP AG BC420 12-75

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 7688

038

983209 SAP AG 1999

ou are no) able to$

The Transaction Recorder$ Unit Summar(

Use the recording function in the LSMW to create

a batch input session )ith the data from the

eternal s(stem

Use the TA Recorder to create (our o)n data

transfer program

Anal(e programs that )or+ )ith batch input or

call transaction

Integrate the TA Recorder programs into the

DW

copy SAP AG BC420 12-76

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 7788

ercise 1

nit $ -ecorder

$opic 2reating etors

$ransaction -ecorder ercise 1

bull 2reating detors $ith eterna numer assignment

bull etor numers M9980008 to M9980080

Address data for detors $ith eterna numer assignment is to

e transferred using program ampFI700

ro4ect F5

Supro4ect +5

-un +575

$as)s 85 95 8S25

9oad program -F+00

8 In the foo$ing eercises eisting data is to e changed Therefore these detors $ith

eterna numer assignment have to first e created

898 4nder suproect 79 create run 797G9 $ith the name Detors ith

eternal numers

copy SAP AG BC420 12-77

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 7888

891 2reate the foo$ing three tass The tass map the foo$ing process steps

convert data create + session and process + session

89198 In run 797G9 create the foo$ing tas

9 Tas AP9

9 Name 2onvert data 9 Tas type AP

9 Program type +S-

Seect the foo$ing +S- oect

+S- proect 2109

+S- suproect 7I9

+S- oect I997GT

89191 In run 797G9 create the foo$ing tas 9 Tas +5A9

9 Name 2reate I session

Tas type +5A

9 Program type INP

Seect program ampFI700 $ith the variant

I97G9

8919 In run 797G9 create the foo$ing tas

9 Tas S29

9 Name Process I session Tas type S2

9 Program type amp7P5

Seect program ampS2S4 $ith the variant

S497G9

Note that you have to correct the seuence of the tass 2onvert data

create + session and process + session

4se the uttons

89 Start the run

The detors $i e created $ith eterna numer assignments

89 2hec in transaction F0 that the detors M9980008 to M9980080 have een

created

copy SAP AG BC420 12-78

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 7988

ercise

nit $ransaction -ecorder

$opic -ecording function in the 9S8(

bull 2reate a recording using the +S-

bull ltenerate a atch input session

2hange the detor address data in the amp System

Name of the recording +

Name of the file +2055+F9

8 2reate the recording 7I3 using the +S- ampecord the transaction F01 (2hange

detor)

898 efore you create the recording first test the transaction onineQ

For the recording use detor M9980008 5n the initia screen of the F01

maintain the foo$ing fieds ony

etor etor M9980008

2ompany code 0008

Address data seect

Note $he data record must e saved hile recording

891 aintain the names and the descriptions for the foo$ing fieds

Name city street posta code and teephone numereete a other fieds in screen 880 from the recording (eg S5ampT+ +AN8

SPampAS)

4se the same technica names as sho$n in the tae eo$ (automatic fied

mapping)

copy SAP AG BC420 12-79

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 8088

1 2reate the suproect 7I9 and the ne$ oect TA3 in your proect 2109

aintain the oect attriutes and seect the item atch input recording Seect your

recording 7I3

2reate the source structure address

2reate the source fieds according to the tae eo$ 5r copy them from proect 2109S37N suproect 7I900 oect TA900

198 Fie setup The data from the egacy system are dispayed in the foo$ing tae

Fied name Fied type Fied ength escription

N5 2 8B etor numer

NA7 2 Name

STamp77T 2 Street

2ITC 2 2ityPace of residence

MIP 2 80 Posta code

T7+ 2 8B Teephone numer

191 aintain the fied mapping 4se the automatic fied mapping (via menu item

7tras)

19 Specify the fies 5ny maintain the fie name of the source fie

Name of the fie 21099IFI+7

2odepage 8800

19 Import the data and convert them ispay the data in each caseQ

19 2reate a atch input session

19B ampun the atch input session

copy SAP AG BC420 12-80

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 8188

ercise 3

nit $ransaction -ecorder

$opic -ecording ith the $ -ecorder

bull ltenerate a recording using the TA recorder

bull Test the recording

2hange the address data of detors in the amp system

Name recording $+

Name of the file +2055+F9

8 2reate the recording TA37I3 using the transaction recorder ampecord the

transaction F01 (change detor)

898 4se detor M9980008 for the recording 5n the F01 initia screen ony

maintain the foo$ing fieds

etor etor M9980008

2ompany 2ode 0008

Address data seect

Note $he data record must e saved hen recording

eete a fieds that do not eist in the source fie 21099IFI+7 from screen

880 in the recording (eg 6NA89S5ampT+ 6NA89+AN8 6ANNQ9SPampAS) Note o not deete fieds ampF01946ampS and ampF0190880

Save the recording no$

1 S$itch to the recordings overvie$

198 Process the recording $ith the processing mode A (dispay a)

191 Process the recording $ith the processing mode RN (no dispay)

19 If the recording has een tested and no error has occurred generate a I session

and run it using the I monitor If an error shoud occur generate the recordingagainQ

copy SAP AG BC420 12-81

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 8288

From the recording generate the program M21037I3 in your deveopment cass

2109 Seect the foo$ing

bull ampead fied contents from fie

bull 2reate test data in the fie 2103dei3test3tt

98 Save this program and eecute it ltenerate one I session each and process it

2arry out the same steps again using the ca transaction

The generated program shoud no$ e changed so that fie 21099IFI+7 can e

read and processed

98 2hange the defaut vaue of the fie name (parameter dataset) in 21099

IFI+7

91 2hange the structure definition eete the company code fied and the address

data checo from the structure

9 2hange the su9routine ca perform dc3fied for the company code (KampF019

46ampSK) so that the vaue 0008 is transferred

9 2hange the su9routine ca perform dc3fied for the address data checo

(KampF0190880K) so that the vaue G is transferred

9 Start the program again and read the data from the fie 21099IFI+7 $ith

detor data ltenerate a I session $ith it and run it

copy SAP AG BC420 12-82

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 8388

033 Include DR16INCLUDE BDCRECX1

SELECTION-SCREEN BEGIN OF LINE

PARAMETERS SESSION RADIOBUTTON GROUP CTU create sessi SELECTION-SCREEN COMMENT $amp TEXT-S FOR FIELD SESSION

se(ecti-scree )siti +

PARAMETERS CTU RADIOBUTTON GROUP CTU ca(( trasacti

SELECTION-SCREEN COMMENT $amp TEXT-S FOR FIELD CTU

SELECTION-SCREEN END OF LINE

SELECTION-SCREEN BEGIN OF LINE

SELECTION-SCREEN COMMENT $amp TEXT-S1 FOR FIELD GROUP

se(ecti-scree )siti $+

PARAMETERS GROUP1$amp r) ae 0 sessi

SELECTION-SCREEN COMMENT $amp TEXT-S+ FOR FIELD CTUMODE

se(ecti-scree )siti

PARAMETERS CTUMODE LIE CTU2PARAMS-DISMODE DEFAULT 3N3

A4 s56 a(( 78)rs

E4 s56 78)r errr (8

N4 7 t 7is)(a8 78)r

SELECTION-SCREEN END OF LINE

SELECTION-SCREEN BEGIN OF LINE

SELECTION-SCREEN COMMENT $amp TEXT-S$ FOR FIELD USER

se(ecti-scree )siti $+

PARAMETERS4 USER1$amp DEFAULT S9-UNAME ser 0r sessi i atc5

SELECTION-SCREEN COMMENT $amp TEXT-S FOR FIELD CUPDATE

se(ecti-scree )siti

PARAMETERS CUPDATE LIE CTU2PARAMS-UPDMODE DEFAULT 3L3

S4 s8c5rs(8

A4 as8c5rs(8

L4 (ca(

SELECTION-SCREEN END OF LINE

SELECTION-SCREEN BEGIN OF LINE

SELECTION-SCREEN COMMENT $amp TEXT-S FOR FIELD EEP

se(ecti-scree )siti $+

PARAMETERS4 EEP AS CltECBOX 3 3 = 7e(ete sessi i0 0iis5e7

3X3 = gtee) sessi i0 0iis5e7

SELECTION-SCREEN COMMENT $amp TEXT-S FOR FIELD E2GROUP

copy SAP AG BC420 12-83

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 8488

se(ecti-scree )siti

)araeters E2GROUP1$amp r) ae 0 errr-sessi

SELECTION-SCREEN END OF LINE

SELECTION-SCREEN BEGIN OF LINE

SELECTION-SCREEN COMMENT $amp TEXT-S FOR FIELD ltOLDDATE

se(ecti-scree )siti $+

PARAMETERS4 ltOLDDATE LIE S9-DATUM

SELECTION-SCREEN COMMENT +11amp TEXT-S$ FOR FIELD E2USER

se(ecti-scree )siti

PARAMETERS4 E2USER1$amp DEFAULT S9-UNAME ser 0r errr-sessi

SELECTION-SCREEN END OF LINE

SELECTION-SCREEN BEGIN OF LINE

SELECTION-SCREEN COMMENT +11amp TEXT-S FOR FIELD E2EEP

se(ecti-scree )siti

PARAMETERS4 E2EEP AS CltECBOX 3 3 = 7e(ete sessi i0 0iis5e7

3X3 = gtee) sessi i0 0iis5e7

SELECTION-SCREEN END OF LINE

SELECTION-SCREEN BEGIN OF LINE

SELECTION-SCREEN COMMENT +11amp TEXT-S FOR FIELD E2ltDATE

se(ecti-scree )siti

PARAMETERS4 E2ltDATE LIE S9-DATUM

SELECTION-SCREEN END OF LINE

SELECTION-SCREEN SIP

SELECTION-SCREEN BEGIN OF LINE

SELECTION-SCREEN COMMENT 1amp TEXT-S1 FOR FIELD NODATA

PARAMETERS4 NODATA DEFAULT 33 LOER CASE 7ata

SELECTION-SCREEN END OF LINE

----------------------------------------------------------------------

Batc5i)t7ata 0 si(e trasacti

DATA4 BDCDATA LIE BDCDATA OCCURS ITlt ltEADER LINE

essaes 0 ca(( trasacti

DATA4 MESSTAB LIE BDCMSGCOLL OCCURS ITlt ltEADER LINE

errr sessi )ee7 3 3 r 3X3amp

DATA4 E2GROUP2OPENED

essae tets

TABLES4 T1

copy SAP AG BC420 12-84

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 8588

----------------------------------------------------------------------

at se(ecti scree

----------------------------------------------------------------------

AT SELECTION-SCREEN

r) a7 ser st e 0i((e7 0r create sessi

IF SESSION = 3X3 AND

GROUP = SPACE OR USER = SPACE

MESSAGE E1MSamp

ENDIF

----------------------------------------------------------------------

)e 7ataset

----------------------------------------------------------------------

FORM OPEN2DATASET USING P2DATASET

OPEN DATASET P2DATASET IN TEXT MODE

IF S9-SUBRC

RITE4 TEXT-E S9-SUBRC

STOP

ENDIF

ENDFORM

----------------------------------------------------------------------

c(se 7ataset

----------------------------------------------------------------------

FORM CLOSE2DATASET USING P2DATASET

CLOSE DATASET P2DATASET

ENDFORM

----------------------------------------------------------------------

create atc5i)t sessi

t 0r ca(( trasacti siamp

----------------------------------------------------------------------

FORM OPEN2GROUP

IF SESSION = 3X3

SIP

RITE4 $amp 3Create r)3I1amp GROUP

SIP

)e atc5i)t r)

CALL FUNCTION 3BDC2OPEN2GROUP3

EXPORTING CLIENT = S9-MANDT

copy SAP AG BC420 12-85

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 8688

GROUP = GROUP

USER = USER

EEP = EEP

ltOLDDATE = ltOLDDATE

RITE4 amp 3BDC2OPEN2GROUP3I$amp

1$amp 3retrc7e43I+amp

S9-SUBRC

ENDIF

ENDFORM

----------------------------------------------------------------------

e7 atc5i)t sessi

ca(( trasacti si4 errr sessiamp

----------------------------------------------------------------------

FORM CLOSE2GROUP

IF SESSION = 3X3

c(se atc5i)t r)

CALL FUNCTION 3BDC2CLOSE2GROUP3

RITE4 amp 3BDC2CLOSE2GROUP3Iamp

1$amp 3retrc7e43I+amp

S9-SUBRC

ELSE

IF E2GROUP2OPENED = 3X3

CALL FUNCTION 3BDC2CLOSE2GROUP3

RITE4

RITE4 amp 3Fe5(era))e 6r7e eret3Iamp

ENDIF

ENDIF

ENDFORM

----------------------------------------------------------------------

Start e6 trasacti accr7i t )araeters

----------------------------------------------------------------------

FORM BDC2TRANSACTION USING TCODE

DATA4 L2MSTRINGamp

DATA4 L2SUBRC LIE S9-SUBRC

atc5 i)t sessi

IF SESSION = 3X3

CALL FUNCTION 3BDC2INSERT3

EXPORTING TCODE = TCODE

TABLES D9NPROTAB = BDCDATA

RITE4 3BDC2INSERT3Iamp

copy SAP AG BC420 12-86

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 8788

TCODE

3retrc7e43I+amp

S9-SUBRC

3RECORD43

S9-INDEX

ca(( trasacti si

ELSE

REFRESlt MESSTAB

CALL TRANSACTION TCODE USING BDCDATA

MODE CTUMODE

UPDATE CUPDATE

MESSAGES INTO MESSTAB

L2SUBRC = S9-SUBRC

RITE4 3CALL2TRANSACTION3

TCODE

3retrc7e43I+amp

L2SUBRC

3RECORD43

S9-INDEX

LOOP AT MESSTAB

SELECT SINGLE FROM T1 ltERE SPRSL = MESSTAB-MSGSPRA

AND ARBGB = MESSTAB-MSGID

AND MSGNR = MESSTAB-MSGNR

IF S9-SUBRC =

L2MSTRING = T1-TEXT

IF L2MSTRING CS 313

REPLACE 313 ITlt MESSTAB-MSGH1 INTO L2MSTRING

REPLACE 3$3 ITlt MESSTAB-MSGH$ INTO L2MSTRING

REPLACE 33 ITlt MESSTAB-MSGH INTO L2MSTRING

REPLACE 33 ITlt MESSTAB-MSGH INTO L2MSTRING

ELSE

REPLACE 33 ITlt MESSTAB-MSGH1 INTO L2MSTRING

REPLACE 33 ITlt MESSTAB-MSGH$ INTO L2MSTRING

REPLACE 33 ITlt MESSTAB-MSGH INTO L2MSTRING

REPLACE 33 ITlt MESSTAB-MSGH INTO L2MSTRING

ENDIF

CONDENSE L2MSTRING

RITE4 MESSTAB-MSGT9P L2MSTRING$+amp

ELSE

RITE4 MESSTAB

ENDIF

ENDLOOP

copy SAP AG BC420 12-87

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 8888

SIP

Eree 0e5(era))e

IF L2SUBRC AND E2GROUP SPACE

IF E2GROUP2OPENED = 3 3

CALL FUNCTION 3BDC2OPEN2GROUP3

EXPORTING CLIENT = S9-MANDT

GROUP = E2GROUP

USER = E2USER

EEP = E2EEP

ltOLDDATE = E2ltDATE

E2GROUP2OPENED = 3X3

ENDIF

CALL FUNCTION 3BDC2INSERT3

EXPORTING TCODE = TCODE

TABLES D9NPROTAB = BDCDATA

ENDIF

ENDIF

REFRESlt BDCDATA

ENDFORM

----------------------------------------------------------------------

Start e6 scree

----------------------------------------------------------------------

FORM BDC2D9NPRO USING PROGRAM D9NPRO

CLEAR BDCDATA

BDCDATA-PROGRAM = PROGRAM

BDCDATA-D9NPRO = D9NPRO

BDCDATA-D9NBEGIN = 3X3

APPEND BDCDATA

ENDFORM

----------------------------------------------------------------------

Isert 0ie(7

Page 55: BC420_46C - 012The Transaction Recorder

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 5588

022

983209 SAP AG 1999

Subprogram P1ltBRUP

P1ltBRUP

FOR( oen8rou-IF e9on -

2A FUN2TION BD2O)ENGROU) E)ORTING 2IENT lt1mandt GROU) 8rou USER uer KEE) kee

=ODDATE gtolddate-

ENDIF-ENDFOR(-

Include

DR16

The suprogram 5P7N3ltamp54P opens the atch input session

copy SAP AG BC420 12-55

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 5688

028

983209 SAP AG 1999

9unction Module DltIS1RT

ALL 9UTI DltIS1RTALL 9UTI DltIS1RT

IMPRT

TD1 Transaction code

PSTltLAL Update locall(

PRITIB print list

TAL1S DPRTA bdclttable

11PTIS

IMPRT

TD1 Transaction code

PSTltLAL Update locall(

PRITIB print list

TAL1S DPRTA bdclttable

11PTIS

-ith the function modue 23INS7ampT you can add transaction data to the session

Cou need an interna 2 tae to transfer the data

The foo$ing parameters are mandatory

T257 Transaction code

CNPamp5TA 2 tae

The foo$ing parameters are optiona

P5ST3+52A+ E KGK activates oca updating This means that the data to e updated is ept in the

appication server and updated in the ast step of the transaction This does not invove the update

process (For more information see course 28 Programming ataase 4pdates)

PampINTINlt E KGK 9 ists processed in I $i e printed immediatey -ith 7G27PTI5NS you get various return vaues that can e ueried $ith SC9S4amp2

copy SAP AG BC420 12-56

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 5788

023

983209 SAP AG 1999

Subprogram DltTRASATI

DltTRASATI

FOR( BD2TRANSA2TION USING tcode-

IF e9on -2A FUN2TION BD2INSERT

E)ORTING T2ODE tcode TABES D0N)ROTAB bdcdata-

ESE-

ENDIF-ENDFOR(-

T

Include

DR16

The suprogram 23TampANSA2TI5N moves the fied 2 tae either to a atch input session

or uses ca transaction to import the data into the system 5n the seection screen you can specify

$hether you $ant to create a session or you $ant to use ca transaction to process the data directy

The S7SSI5N fied is then set according to your seection

copy SAP AG BC420 12-57

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 5888

025

983209 SAP AG 1999

9unction Module DltLS1ltBRUP

ALL 9UTI DltLS1ltBRUP

11PTIS

TltP1 6

NU1U1lt1RRR amp

-ith the function modue 232+5S73ltamp54P you can cose a atch input session

In 7G27PTI5NS you get various return vaues that can e ueried $ith SC9S4amp2

copy SAP AG BC420 12-58

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 5988

027

983209 SAP AG 1999

Subprogram LS1ltBRUP

FOR( cloe8rou-IF e9on -cloe batcgt 9nut 8rou

2A FUN2TION BD22OSEGROU)-

ESE-IF e8rouoened -

2A FUN2TION BD22OSEGROU)-

ENDIF-ENDIF-

ENDFOR(-

LS1ltBRUPlose session

lose error session

Include

DR16

The suprogram 2+5S73ltamp54P coses the atch input session The suprogram differentiates

et$een a norma I session (S7SSI5N E G) and a session opened $hen ca transaction

encountered an error (73ltamp54P35P7N7 E G)

copy SAP AG BC420 12-59

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 6088

080

983209 SAP AG 1999

Subprograms DltDPRG Dlt9I1LD

DltDPR

Dlt9I1LD

FOR( bdc9eld USING nam al-IF al 34 nodata-2EAR bdcdata- bdcdata1nam nam- bdcdata1al al- A))END bdcdata-ENDIF-

ENDFOR(-

FOR( bdcdltnro USING ro8ram dltnro- 2EAR bdcdata-Bdcdata1ro8ram ro8ram-Bdcdata1dltnro dltnro-Bdcdata1dltnbe89n - A))END bdcdata-ENDFOR(-

Include

DR16

The incude 2amp72GG contains t$o suprograms 23CNPamp5 and 23FI7+

Suprogram 23CNPamp5 fis the 2 tae $ith program names and screen numers

Suprogram 23FI7+ fis the 2 tae $ith fied names and vaues

7ach suprogram creates an entry in the 2 tae

copy SAP AG BC420 12-60

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 6188

086

983209 SAP AG 1999

9illing the D Table

erorm bdcdltnro u9n8 SA)(FD +- erorm bdc9eld u9n8 BD22URSOR RFD1BUKRS- erorm bdc9eld u9n8 BD2OK2ODE 6- erorm bdc9eld u9n8 RFD1BUKRS record1BUKRS- erorm bdc9eld u9n8 RFD1KTOKD record1KTOKD-

erorm bdcdltnro u9n8 SA)(FD -

erorm bdc9eld u9n8 BD22URSOR KNA1S)RAS- erorm bdc9eld u9n8 BD2OK2ODE 6- erorm bdc9eld u9n8 KNA1NA(E record1NA(E-

erorm bdc9eld u9n8 KNA1SORT record1SORT-

Recording Benerated automaticall(

from the recording

)ERFOR( bdcdltnro USING SA)(FD +- )ERFOR( bdc9eld USING BD22URSOR RFD1BUKRS-)ERFOR( bdc9eld USING BD2OK2ODE 6-)ERFOR( bdc9eld USING RFD1BUKRS record1BUKRS-)ERFOR( bdc9eld USING RFD1KTOKD record1KTOKD-

)ERFOR( bdcdltnro USING SA)(FD -

)ERFOR( bdc9eld USING BD22URSOR KNA1S)RAS-)ERFOR( bdc9eld USING BD2OK2ODE 6-)ERFOR( bdc9eld USING KNA1NA(E record1NA(E-

)ERFOR( bdc9eld USING KNA1SORT record1SORT- ---

The 2 tae is fied $ith data from the recording The suroutines 23CNPamp5 and

23FI7+ are used for this

The suroutines are caed in the reuired structure or seuence

copy SAP AG BC420 12-61

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 6288

08amp

983209 SAP AG 1999

erie)

SAPDatabase

SeJuential9ile

SAPDatabase

ALL TRASATIALL TRASATI

SeJuential9ile

ATE IPUTATE IPUT

D TableD TableD TableD Table

I Monitor

T

In contrast to atch input you can use ca transaction to directy pass data to the diaog interface

$ithout using a atch input session Cou use an interna tae (2 tae same structure and ayout

as atch input) to temporariy store your screen data Then you ca the desired transaction in your

program

Note 5n average the 2a Transaction method is 8 to times faster than using atch Input

copy SAP AG BC420 12-62

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 6388

08

983209 SAP AG 1999

all Transaction Program$ 1ample

RE)ORT abcbdcdcdeb9ct-

)ARA(ETERS d9mode DEFAUT A

udmode DEFAUT S-FOR( calltranact9on-2A TRANSA2TION FD

USING bdcdata (ODE d9mode

U)DATE udmode-

IF lt1ubrc NE - 5RITE 6 ---

ENDIF-ENDFOR(-

Screen

00

Screen

100

Screen

An additiona system ro area is added for the caed transaction The system uses this area for

processing the individua screens in the transactionH the data from the tae is added here After the

transaction is processed the second ro area is reeasedH the system continues processing in the first

ro area

Notes

In contrast to atch input there is no error ogging (error sessions) here For processing the caed

transaction the system uses the authoriDations of the user that caed the transaction The 2 tae

can ony hod data for one transaction run at a time efore another transaction is caed and its data

can e added you must eecute a amp7Famp7S= for the 2 tae

copy SAP AG BC420 12-63

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 6488

084

983209 SAP AG 1999

ALL TRASATI C6

RE)ORT 777-

2A TRANSA2TION FD USING bdcdata (ODE E-

Default for MD1 is A

2A TRANSA2TION 3tranact9oncode4 USING 3bdc1table4 C (ODE A E N C-

-ith the parameter 57 you can seect a specific dispay mode for processing the transaction The

foo$ing three modes are avaiae

A (ispay a)

If you eecute the program a the screens and a their data are dispayed This is the defaut vaue

for the 57 in 2A++ TampANSA2TI5N

N (ispay nothing)

The screens are not dispayed at a regardess of $hether any of them contained errors As soon as

the transaction has een fuy processed contro is returned to your program (The vaue of the

parameter 4PAT7 determines $hether dataase updates are eecuted or not)

7 (ispay errors ony)As soon as an error occurs in a screen the transaction is s$itched to dispay mode so that you can

correct the errors

These dispay modes are the same as those in the atch input session processing

copy SAP AG BC420 12-64

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 6588

082

983209 SAP AG 1999

RE)ORT 777-

2A TRANSA2TION FD USING BD2DATA U)DATE -

ALL TRASATI Camp

RE)ORT 777-

2A TRANSA2TION FD USING bdcdata U)DATE -

2A TRANSA2TION 3tranact9oncode4 USING 3bdc1table4 C (ODE A E N C U)DATE A S C -

Default for UPDAT1 is A

-ith the parameter 4PAT7 you can contro ho$ dataase updates arising from a transaction are

carried out There are three options

A (asynchronous updating) The caed transaction does not $ait unti the dataase has een

updated it simpy for$ard the updates to the SAP update service This usuay speeds up the 2T

program This processing mode is N5T recommended for arge data sets as the caed transaction

does not receive a competion message from the update modue

The caing 2T program therefore cannot te if the transaction has een successfuy competed Cou

shoud use the updating administration function (transaction S8) to determine $hether updating

$as terminated eary The error anaysis correction functions for are ess hepfu than $ith

synchronous updating

S (synchronous updating) -ith synchronous updating the caed transaction $aits unti a the

updates have een competed So processing is so$er than $ith synchronous updating The caed

transaction can ho$ever report any updating errors to the program $hich maes error

anaysiscorrection easier

+ (local updating) $ith oca updating the dataase is not updated in a separate process it is

updated in the caers process (see appication hep documentation for the AAP ey$ord S7T

4PAT7 TAS6 +52A+)

copy SAP AG BC420 12-65

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 6688

088

983209 SAP AG 1999

ALL TRASATI C

RE)ORT 777-DATA mtab T0)E TABE OF bdcm8coll-

2A TRANSA2TION FD USING bdcdata (ESSAGES INTO mtab-

2A TRANSA2TION 3tranact9oncode4 USING 3bdc1table4 C (ODE A E N C U)DATE A S C (ESSAGES INTO 3metab4 C -

7SSAlt7S specifies that a system messages that are output during the eecution of a 2A++

TampANSA2TI5N are $ritten to the interna tae L7SSTA The interna tae must have the

structure 2Slt25++

4nie the cassica atch input processing $ith sessions 2A++ TampANSA2TI5N does not offer any

specia processing procedures for transactions containing errors There are no restart functions for

transactions that contain errors or that cause updating terminations

copy SAP AG BC420 12-66

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 6788

083

983209 SAP AG 1999

ALL TRASATI C4

RE)ORT 777-DATA mltot T0)E ctuaram-

2A TRANSA2TION FD USING BD2DATA

O)TIONS FRO( mltot-

2A TRANSA2TION 3tranact9oncode4 USING 3bdc1table4 C (ODE A E N C U)DATE A S C (ESSAGES INTO 3metab4 C O)TIONS FRO( ot C -

RE)ORT 777-DATA mltot T0)E ctuaram-2A TRANSA2TION FD USING bdcdata

O)TIONS FRO( mltot-

The addition 5PTI5NS enaes the ca transaction statement to e controed through a structure

The structure must have the dictionary type 2T43PAampAS

The addition 5PTI5NS Famp5 must not e comined either $ith the addition 57 or $ith

4PAT7 ore information on the net side

copy SAP AG BC420 12-67

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 6888

085

983209 SAP AG 1999

Structure TUltPARAMS

DISMD1 Procen mode anaoo o addon amp

UPDMD1 $pdae mode anaoo o addon $PA

ATTMD1 CA mode CA conro

D19SI1 orce de=a EndoE e drn procen

RAMMIT +o eD a Camp amp(

IPT +o a ac np eonF a F S-B+P SPAC

I1D +o a ac np eon a=er end o= BC daa

The components are defined as foo$s

The components 7FSIM7 ampA25IT N5INPT and N5I7N can have the foo$ing

vaues KGK E Ces or K K E No

If the addition 5PTI5NS Famp5 is not specified the foo$ing settings appy to the contro

parameters

IS57 from addition 57

4P57 from addition 4PAT7

2ATT57 2ATT not active

7FSIM7 o not not use defaut $indo$s siDe

ampA25IT Successfu eit at 25IT -5amp6

N5INPT atch input session active (SC9INPT E G)

N5I7N atch input session sti active after end of 2 data

copy SAP AG BC420 12-68

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 6988

087

983209 SAP AG 1999

SMSBID Message ID

SMSBT Message T(pe C1GIGWGSGA

SMSB Message umber

SMSB6 Message ariable 6

SMSBamp Message ariable amp

SMSB Message ariable

SMSB4 Message ariable 4

SMSBID Message ID

SMSBT Message T(pe C1GIGWGSGA

SMSB Message umber

SMSB6 Message ariable 6

SMSBamp Message ariable amp

SMSB Message ariable

SMSB4 Message ariable 4

Return code$

S(stem fields$

alue Meaning

0 Successful

6000 1rror in transaction

6000 1rror in processing call transaction

see also the s(stem fields specified

alue Meaning

0 Successful

6000 1rror in transaction

6000 1rror in processing call transaction

see also the s(stem fields specified

9ield name Meaning9ield name9ield name MeaningMeaning

Return ode and S(stem 9ields

The return code is used to specify $hether the caed transaction $as processed successfuy In

addition severa system fieds are fied The numer I type and variaes of the diaog message

output y the caed transaction Cou need this information to output the message tet

copy SAP AG BC420 12-69

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 7088

030

983209 SAP AG 1999

Benerated Program of the TA Recorder

REFRES= (ESSTAB-

2A TRANSA2TION tcode USING bdcdata (ODE ctumode U)DATE cudate (ESSAGES INTO metab-OO) AT metab- ENDOO)-IF lubrc 34 AND e8rou 34 S)A2E- IF e8rouoenend - 2A FUN2TION BD2O)ENGROU) E)ORTING ---------

--------- E8rouoened - ENDIF- 2A FUN2TION BD2INSERT E)ORTING T2ODE tcode TABES D0N)ROTAB bdcdata-ENDIF-REFRES= bdcdata-

Message table output

pen error session

Insert data record that

has errors into error

session

If you have seected ca transaction on the seection screen the generated program runs as foo$s

The onine transaction is caed $ith ca transaction and passed to tae 2ATA A the

messages arising during the ca transaction are put in the interna tae 7SSTA

7SSTA is output as a ist

If you have specified an error session ( 73ltamp54P L SPA27) on the seection screen and the

ca transaction comes across an error (+3S4amp2 L 0) the error session is opened The error

session is ho$ever ony opened once Then the data record is paced in the session

A the other data records that have errors $ith ca transaction are paced in the same session

copy SAP AG BC420 12-70

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 7188

036

983209 SAP AG 1999

The Transaction Recorder

PrinciplesPrinciples

Recording )ith the LSMWRecording )ith the LSMW

Principles of atch Input and all TransactionPrinciples of atch Input and all Transaction

Integrating the TA Program into the DWIntegrating the TA Program into the DW

Using the TA Recorder Using the TA Recorder

copy SAP AG BC420 12-71

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 7288

03amp

983209 SAP AG 1999

Integrating into the DW

Transfer program

AAP Dictionar(

Integrate

SDA0

SDA6

SDAamp

SDA

Cou can integrate the generated program into the G9- The structure of the fie must e created

in the AAP ictionary The taes SGA0 SGA8 SGA1 and SGA $i e fied

copy SAP AG BC420 12-72

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 7388

03

983209 SAP AG 1999

DW Release 42

Goo

-B eeae 45

aa ran=er ogtec

Int customer data transfer ob-ect

ecord =ed

Dece daa ran=er

d Goo

The ampunction ampor interatin TA recorder prora$s is

i$ple$ented in the

D+-B in Release

The recorder can e integrated as of ampeease and it is provided in the G9- ampeease

ltot to the G9- ampeease 5n the initia screen you can integrate programs y choosing ampoto

( +nt customer ata transfer o-ect

copy SAP AG BC420 12-73

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 7488

034

983209 SAP AG 1999

reating Program as D b-ect

Comer ran=er ogtec

ampgtec ype

Sor eD =or ogtec

aa ran=er proram

Srcre name

9900

(+A1

Cane comer

ZBCA+G

ZB

ustomer transfer ob-ect

umber bet)een 7000 and 7777

b-ect t(pe

Assignment to R ob-ect

Short tet for D ob-ectShort description

Data transfer program

ame of generated program

Structure name

A structure Cstructure la(out )ith this name is created in

the AAP Dictionar(

For ampeease transfer oects $ere not organiDed y 5amp oects ut y a G numer (00089

OOOO) The numer range O0009OOOO is reserved for customers

To create a connection to the ne$ G 9- you must assign the program to a 5amp oect

2reate a short tet for the G oect This tet $i appear in the method seection ist

Specify the program to e incuded

Specify a name for the structure to e created in the AAP ictionary

Note $he generated program appears under program type +N and not under program type

-

copy SAP AG BC420 12-74

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 7588

032

983209 SAP AG 1999

Adantages

Automatic program registration in the DW in

Release 48

ou can use all the functions defined for

standard ob-ects

1ception$ The (reate ampile ith data

function

If you incuded the oect in the ampeease $orench it is automaticay avaiae in the ampeease

B $orench

A the $orench functions are avaiae for your oect ecept for Create files ith transfer ata

copy SAP AG BC420 12-75

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 7688

038

983209 SAP AG 1999

ou are no) able to$

The Transaction Recorder$ Unit Summar(

Use the recording function in the LSMW to create

a batch input session )ith the data from the

eternal s(stem

Use the TA Recorder to create (our o)n data

transfer program

Anal(e programs that )or+ )ith batch input or

call transaction

Integrate the TA Recorder programs into the

DW

copy SAP AG BC420 12-76

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 7788

ercise 1

nit $ -ecorder

$opic 2reating etors

$ransaction -ecorder ercise 1

bull 2reating detors $ith eterna numer assignment

bull etor numers M9980008 to M9980080

Address data for detors $ith eterna numer assignment is to

e transferred using program ampFI700

ro4ect F5

Supro4ect +5

-un +575

$as)s 85 95 8S25

9oad program -F+00

8 In the foo$ing eercises eisting data is to e changed Therefore these detors $ith

eterna numer assignment have to first e created

898 4nder suproect 79 create run 797G9 $ith the name Detors ith

eternal numers

copy SAP AG BC420 12-77

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 7888

891 2reate the foo$ing three tass The tass map the foo$ing process steps

convert data create + session and process + session

89198 In run 797G9 create the foo$ing tas

9 Tas AP9

9 Name 2onvert data 9 Tas type AP

9 Program type +S-

Seect the foo$ing +S- oect

+S- proect 2109

+S- suproect 7I9

+S- oect I997GT

89191 In run 797G9 create the foo$ing tas 9 Tas +5A9

9 Name 2reate I session

Tas type +5A

9 Program type INP

Seect program ampFI700 $ith the variant

I97G9

8919 In run 797G9 create the foo$ing tas

9 Tas S29

9 Name Process I session Tas type S2

9 Program type amp7P5

Seect program ampS2S4 $ith the variant

S497G9

Note that you have to correct the seuence of the tass 2onvert data

create + session and process + session

4se the uttons

89 Start the run

The detors $i e created $ith eterna numer assignments

89 2hec in transaction F0 that the detors M9980008 to M9980080 have een

created

copy SAP AG BC420 12-78

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 7988

ercise

nit $ransaction -ecorder

$opic -ecording function in the 9S8(

bull 2reate a recording using the +S-

bull ltenerate a atch input session

2hange the detor address data in the amp System

Name of the recording +

Name of the file +2055+F9

8 2reate the recording 7I3 using the +S- ampecord the transaction F01 (2hange

detor)

898 efore you create the recording first test the transaction onineQ

For the recording use detor M9980008 5n the initia screen of the F01

maintain the foo$ing fieds ony

etor etor M9980008

2ompany code 0008

Address data seect

Note $he data record must e saved hile recording

891 aintain the names and the descriptions for the foo$ing fieds

Name city street posta code and teephone numereete a other fieds in screen 880 from the recording (eg S5ampT+ +AN8

SPampAS)

4se the same technica names as sho$n in the tae eo$ (automatic fied

mapping)

copy SAP AG BC420 12-79

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 8088

1 2reate the suproect 7I9 and the ne$ oect TA3 in your proect 2109

aintain the oect attriutes and seect the item atch input recording Seect your

recording 7I3

2reate the source structure address

2reate the source fieds according to the tae eo$ 5r copy them from proect 2109S37N suproect 7I900 oect TA900

198 Fie setup The data from the egacy system are dispayed in the foo$ing tae

Fied name Fied type Fied ength escription

N5 2 8B etor numer

NA7 2 Name

STamp77T 2 Street

2ITC 2 2ityPace of residence

MIP 2 80 Posta code

T7+ 2 8B Teephone numer

191 aintain the fied mapping 4se the automatic fied mapping (via menu item

7tras)

19 Specify the fies 5ny maintain the fie name of the source fie

Name of the fie 21099IFI+7

2odepage 8800

19 Import the data and convert them ispay the data in each caseQ

19 2reate a atch input session

19B ampun the atch input session

copy SAP AG BC420 12-80

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 8188

ercise 3

nit $ransaction -ecorder

$opic -ecording ith the $ -ecorder

bull ltenerate a recording using the TA recorder

bull Test the recording

2hange the address data of detors in the amp system

Name recording $+

Name of the file +2055+F9

8 2reate the recording TA37I3 using the transaction recorder ampecord the

transaction F01 (change detor)

898 4se detor M9980008 for the recording 5n the F01 initia screen ony

maintain the foo$ing fieds

etor etor M9980008

2ompany 2ode 0008

Address data seect

Note $he data record must e saved hen recording

eete a fieds that do not eist in the source fie 21099IFI+7 from screen

880 in the recording (eg 6NA89S5ampT+ 6NA89+AN8 6ANNQ9SPampAS) Note o not deete fieds ampF01946ampS and ampF0190880

Save the recording no$

1 S$itch to the recordings overvie$

198 Process the recording $ith the processing mode A (dispay a)

191 Process the recording $ith the processing mode RN (no dispay)

19 If the recording has een tested and no error has occurred generate a I session

and run it using the I monitor If an error shoud occur generate the recordingagainQ

copy SAP AG BC420 12-81

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 8288

From the recording generate the program M21037I3 in your deveopment cass

2109 Seect the foo$ing

bull ampead fied contents from fie

bull 2reate test data in the fie 2103dei3test3tt

98 Save this program and eecute it ltenerate one I session each and process it

2arry out the same steps again using the ca transaction

The generated program shoud no$ e changed so that fie 21099IFI+7 can e

read and processed

98 2hange the defaut vaue of the fie name (parameter dataset) in 21099

IFI+7

91 2hange the structure definition eete the company code fied and the address

data checo from the structure

9 2hange the su9routine ca perform dc3fied for the company code (KampF019

46ampSK) so that the vaue 0008 is transferred

9 2hange the su9routine ca perform dc3fied for the address data checo

(KampF0190880K) so that the vaue G is transferred

9 Start the program again and read the data from the fie 21099IFI+7 $ith

detor data ltenerate a I session $ith it and run it

copy SAP AG BC420 12-82

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 8388

033 Include DR16INCLUDE BDCRECX1

SELECTION-SCREEN BEGIN OF LINE

PARAMETERS SESSION RADIOBUTTON GROUP CTU create sessi SELECTION-SCREEN COMMENT $amp TEXT-S FOR FIELD SESSION

se(ecti-scree )siti +

PARAMETERS CTU RADIOBUTTON GROUP CTU ca(( trasacti

SELECTION-SCREEN COMMENT $amp TEXT-S FOR FIELD CTU

SELECTION-SCREEN END OF LINE

SELECTION-SCREEN BEGIN OF LINE

SELECTION-SCREEN COMMENT $amp TEXT-S1 FOR FIELD GROUP

se(ecti-scree )siti $+

PARAMETERS GROUP1$amp r) ae 0 sessi

SELECTION-SCREEN COMMENT $amp TEXT-S+ FOR FIELD CTUMODE

se(ecti-scree )siti

PARAMETERS CTUMODE LIE CTU2PARAMS-DISMODE DEFAULT 3N3

A4 s56 a(( 78)rs

E4 s56 78)r errr (8

N4 7 t 7is)(a8 78)r

SELECTION-SCREEN END OF LINE

SELECTION-SCREEN BEGIN OF LINE

SELECTION-SCREEN COMMENT $amp TEXT-S$ FOR FIELD USER

se(ecti-scree )siti $+

PARAMETERS4 USER1$amp DEFAULT S9-UNAME ser 0r sessi i atc5

SELECTION-SCREEN COMMENT $amp TEXT-S FOR FIELD CUPDATE

se(ecti-scree )siti

PARAMETERS CUPDATE LIE CTU2PARAMS-UPDMODE DEFAULT 3L3

S4 s8c5rs(8

A4 as8c5rs(8

L4 (ca(

SELECTION-SCREEN END OF LINE

SELECTION-SCREEN BEGIN OF LINE

SELECTION-SCREEN COMMENT $amp TEXT-S FOR FIELD EEP

se(ecti-scree )siti $+

PARAMETERS4 EEP AS CltECBOX 3 3 = 7e(ete sessi i0 0iis5e7

3X3 = gtee) sessi i0 0iis5e7

SELECTION-SCREEN COMMENT $amp TEXT-S FOR FIELD E2GROUP

copy SAP AG BC420 12-83

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 8488

se(ecti-scree )siti

)araeters E2GROUP1$amp r) ae 0 errr-sessi

SELECTION-SCREEN END OF LINE

SELECTION-SCREEN BEGIN OF LINE

SELECTION-SCREEN COMMENT $amp TEXT-S FOR FIELD ltOLDDATE

se(ecti-scree )siti $+

PARAMETERS4 ltOLDDATE LIE S9-DATUM

SELECTION-SCREEN COMMENT +11amp TEXT-S$ FOR FIELD E2USER

se(ecti-scree )siti

PARAMETERS4 E2USER1$amp DEFAULT S9-UNAME ser 0r errr-sessi

SELECTION-SCREEN END OF LINE

SELECTION-SCREEN BEGIN OF LINE

SELECTION-SCREEN COMMENT +11amp TEXT-S FOR FIELD E2EEP

se(ecti-scree )siti

PARAMETERS4 E2EEP AS CltECBOX 3 3 = 7e(ete sessi i0 0iis5e7

3X3 = gtee) sessi i0 0iis5e7

SELECTION-SCREEN END OF LINE

SELECTION-SCREEN BEGIN OF LINE

SELECTION-SCREEN COMMENT +11amp TEXT-S FOR FIELD E2ltDATE

se(ecti-scree )siti

PARAMETERS4 E2ltDATE LIE S9-DATUM

SELECTION-SCREEN END OF LINE

SELECTION-SCREEN SIP

SELECTION-SCREEN BEGIN OF LINE

SELECTION-SCREEN COMMENT 1amp TEXT-S1 FOR FIELD NODATA

PARAMETERS4 NODATA DEFAULT 33 LOER CASE 7ata

SELECTION-SCREEN END OF LINE

----------------------------------------------------------------------

Batc5i)t7ata 0 si(e trasacti

DATA4 BDCDATA LIE BDCDATA OCCURS ITlt ltEADER LINE

essaes 0 ca(( trasacti

DATA4 MESSTAB LIE BDCMSGCOLL OCCURS ITlt ltEADER LINE

errr sessi )ee7 3 3 r 3X3amp

DATA4 E2GROUP2OPENED

essae tets

TABLES4 T1

copy SAP AG BC420 12-84

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 8588

----------------------------------------------------------------------

at se(ecti scree

----------------------------------------------------------------------

AT SELECTION-SCREEN

r) a7 ser st e 0i((e7 0r create sessi

IF SESSION = 3X3 AND

GROUP = SPACE OR USER = SPACE

MESSAGE E1MSamp

ENDIF

----------------------------------------------------------------------

)e 7ataset

----------------------------------------------------------------------

FORM OPEN2DATASET USING P2DATASET

OPEN DATASET P2DATASET IN TEXT MODE

IF S9-SUBRC

RITE4 TEXT-E S9-SUBRC

STOP

ENDIF

ENDFORM

----------------------------------------------------------------------

c(se 7ataset

----------------------------------------------------------------------

FORM CLOSE2DATASET USING P2DATASET

CLOSE DATASET P2DATASET

ENDFORM

----------------------------------------------------------------------

create atc5i)t sessi

t 0r ca(( trasacti siamp

----------------------------------------------------------------------

FORM OPEN2GROUP

IF SESSION = 3X3

SIP

RITE4 $amp 3Create r)3I1amp GROUP

SIP

)e atc5i)t r)

CALL FUNCTION 3BDC2OPEN2GROUP3

EXPORTING CLIENT = S9-MANDT

copy SAP AG BC420 12-85

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 8688

GROUP = GROUP

USER = USER

EEP = EEP

ltOLDDATE = ltOLDDATE

RITE4 amp 3BDC2OPEN2GROUP3I$amp

1$amp 3retrc7e43I+amp

S9-SUBRC

ENDIF

ENDFORM

----------------------------------------------------------------------

e7 atc5i)t sessi

ca(( trasacti si4 errr sessiamp

----------------------------------------------------------------------

FORM CLOSE2GROUP

IF SESSION = 3X3

c(se atc5i)t r)

CALL FUNCTION 3BDC2CLOSE2GROUP3

RITE4 amp 3BDC2CLOSE2GROUP3Iamp

1$amp 3retrc7e43I+amp

S9-SUBRC

ELSE

IF E2GROUP2OPENED = 3X3

CALL FUNCTION 3BDC2CLOSE2GROUP3

RITE4

RITE4 amp 3Fe5(era))e 6r7e eret3Iamp

ENDIF

ENDIF

ENDFORM

----------------------------------------------------------------------

Start e6 trasacti accr7i t )araeters

----------------------------------------------------------------------

FORM BDC2TRANSACTION USING TCODE

DATA4 L2MSTRINGamp

DATA4 L2SUBRC LIE S9-SUBRC

atc5 i)t sessi

IF SESSION = 3X3

CALL FUNCTION 3BDC2INSERT3

EXPORTING TCODE = TCODE

TABLES D9NPROTAB = BDCDATA

RITE4 3BDC2INSERT3Iamp

copy SAP AG BC420 12-86

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 8788

TCODE

3retrc7e43I+amp

S9-SUBRC

3RECORD43

S9-INDEX

ca(( trasacti si

ELSE

REFRESlt MESSTAB

CALL TRANSACTION TCODE USING BDCDATA

MODE CTUMODE

UPDATE CUPDATE

MESSAGES INTO MESSTAB

L2SUBRC = S9-SUBRC

RITE4 3CALL2TRANSACTION3

TCODE

3retrc7e43I+amp

L2SUBRC

3RECORD43

S9-INDEX

LOOP AT MESSTAB

SELECT SINGLE FROM T1 ltERE SPRSL = MESSTAB-MSGSPRA

AND ARBGB = MESSTAB-MSGID

AND MSGNR = MESSTAB-MSGNR

IF S9-SUBRC =

L2MSTRING = T1-TEXT

IF L2MSTRING CS 313

REPLACE 313 ITlt MESSTAB-MSGH1 INTO L2MSTRING

REPLACE 3$3 ITlt MESSTAB-MSGH$ INTO L2MSTRING

REPLACE 33 ITlt MESSTAB-MSGH INTO L2MSTRING

REPLACE 33 ITlt MESSTAB-MSGH INTO L2MSTRING

ELSE

REPLACE 33 ITlt MESSTAB-MSGH1 INTO L2MSTRING

REPLACE 33 ITlt MESSTAB-MSGH$ INTO L2MSTRING

REPLACE 33 ITlt MESSTAB-MSGH INTO L2MSTRING

REPLACE 33 ITlt MESSTAB-MSGH INTO L2MSTRING

ENDIF

CONDENSE L2MSTRING

RITE4 MESSTAB-MSGT9P L2MSTRING$+amp

ELSE

RITE4 MESSTAB

ENDIF

ENDLOOP

copy SAP AG BC420 12-87

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 8888

SIP

Eree 0e5(era))e

IF L2SUBRC AND E2GROUP SPACE

IF E2GROUP2OPENED = 3 3

CALL FUNCTION 3BDC2OPEN2GROUP3

EXPORTING CLIENT = S9-MANDT

GROUP = E2GROUP

USER = E2USER

EEP = E2EEP

ltOLDDATE = E2ltDATE

E2GROUP2OPENED = 3X3

ENDIF

CALL FUNCTION 3BDC2INSERT3

EXPORTING TCODE = TCODE

TABLES D9NPROTAB = BDCDATA

ENDIF

ENDIF

REFRESlt BDCDATA

ENDFORM

----------------------------------------------------------------------

Start e6 scree

----------------------------------------------------------------------

FORM BDC2D9NPRO USING PROGRAM D9NPRO

CLEAR BDCDATA

BDCDATA-PROGRAM = PROGRAM

BDCDATA-D9NPRO = D9NPRO

BDCDATA-D9NBEGIN = 3X3

APPEND BDCDATA

ENDFORM

----------------------------------------------------------------------

Isert 0ie(7

Page 56: BC420_46C - 012The Transaction Recorder

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 5688

028

983209 SAP AG 1999

9unction Module DltIS1RT

ALL 9UTI DltIS1RTALL 9UTI DltIS1RT

IMPRT

TD1 Transaction code

PSTltLAL Update locall(

PRITIB print list

TAL1S DPRTA bdclttable

11PTIS

IMPRT

TD1 Transaction code

PSTltLAL Update locall(

PRITIB print list

TAL1S DPRTA bdclttable

11PTIS

-ith the function modue 23INS7ampT you can add transaction data to the session

Cou need an interna 2 tae to transfer the data

The foo$ing parameters are mandatory

T257 Transaction code

CNPamp5TA 2 tae

The foo$ing parameters are optiona

P5ST3+52A+ E KGK activates oca updating This means that the data to e updated is ept in the

appication server and updated in the ast step of the transaction This does not invove the update

process (For more information see course 28 Programming ataase 4pdates)

PampINTINlt E KGK 9 ists processed in I $i e printed immediatey -ith 7G27PTI5NS you get various return vaues that can e ueried $ith SC9S4amp2

copy SAP AG BC420 12-56

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 5788

023

983209 SAP AG 1999

Subprogram DltTRASATI

DltTRASATI

FOR( BD2TRANSA2TION USING tcode-

IF e9on -2A FUN2TION BD2INSERT

E)ORTING T2ODE tcode TABES D0N)ROTAB bdcdata-

ESE-

ENDIF-ENDFOR(-

T

Include

DR16

The suprogram 23TampANSA2TI5N moves the fied 2 tae either to a atch input session

or uses ca transaction to import the data into the system 5n the seection screen you can specify

$hether you $ant to create a session or you $ant to use ca transaction to process the data directy

The S7SSI5N fied is then set according to your seection

copy SAP AG BC420 12-57

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 5888

025

983209 SAP AG 1999

9unction Module DltLS1ltBRUP

ALL 9UTI DltLS1ltBRUP

11PTIS

TltP1 6

NU1U1lt1RRR amp

-ith the function modue 232+5S73ltamp54P you can cose a atch input session

In 7G27PTI5NS you get various return vaues that can e ueried $ith SC9S4amp2

copy SAP AG BC420 12-58

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 5988

027

983209 SAP AG 1999

Subprogram LS1ltBRUP

FOR( cloe8rou-IF e9on -cloe batcgt 9nut 8rou

2A FUN2TION BD22OSEGROU)-

ESE-IF e8rouoened -

2A FUN2TION BD22OSEGROU)-

ENDIF-ENDIF-

ENDFOR(-

LS1ltBRUPlose session

lose error session

Include

DR16

The suprogram 2+5S73ltamp54P coses the atch input session The suprogram differentiates

et$een a norma I session (S7SSI5N E G) and a session opened $hen ca transaction

encountered an error (73ltamp54P35P7N7 E G)

copy SAP AG BC420 12-59

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 6088

080

983209 SAP AG 1999

Subprograms DltDPRG Dlt9I1LD

DltDPR

Dlt9I1LD

FOR( bdc9eld USING nam al-IF al 34 nodata-2EAR bdcdata- bdcdata1nam nam- bdcdata1al al- A))END bdcdata-ENDIF-

ENDFOR(-

FOR( bdcdltnro USING ro8ram dltnro- 2EAR bdcdata-Bdcdata1ro8ram ro8ram-Bdcdata1dltnro dltnro-Bdcdata1dltnbe89n - A))END bdcdata-ENDFOR(-

Include

DR16

The incude 2amp72GG contains t$o suprograms 23CNPamp5 and 23FI7+

Suprogram 23CNPamp5 fis the 2 tae $ith program names and screen numers

Suprogram 23FI7+ fis the 2 tae $ith fied names and vaues

7ach suprogram creates an entry in the 2 tae

copy SAP AG BC420 12-60

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 6188

086

983209 SAP AG 1999

9illing the D Table

erorm bdcdltnro u9n8 SA)(FD +- erorm bdc9eld u9n8 BD22URSOR RFD1BUKRS- erorm bdc9eld u9n8 BD2OK2ODE 6- erorm bdc9eld u9n8 RFD1BUKRS record1BUKRS- erorm bdc9eld u9n8 RFD1KTOKD record1KTOKD-

erorm bdcdltnro u9n8 SA)(FD -

erorm bdc9eld u9n8 BD22URSOR KNA1S)RAS- erorm bdc9eld u9n8 BD2OK2ODE 6- erorm bdc9eld u9n8 KNA1NA(E record1NA(E-

erorm bdc9eld u9n8 KNA1SORT record1SORT-

Recording Benerated automaticall(

from the recording

)ERFOR( bdcdltnro USING SA)(FD +- )ERFOR( bdc9eld USING BD22URSOR RFD1BUKRS-)ERFOR( bdc9eld USING BD2OK2ODE 6-)ERFOR( bdc9eld USING RFD1BUKRS record1BUKRS-)ERFOR( bdc9eld USING RFD1KTOKD record1KTOKD-

)ERFOR( bdcdltnro USING SA)(FD -

)ERFOR( bdc9eld USING BD22URSOR KNA1S)RAS-)ERFOR( bdc9eld USING BD2OK2ODE 6-)ERFOR( bdc9eld USING KNA1NA(E record1NA(E-

)ERFOR( bdc9eld USING KNA1SORT record1SORT- ---

The 2 tae is fied $ith data from the recording The suroutines 23CNPamp5 and

23FI7+ are used for this

The suroutines are caed in the reuired structure or seuence

copy SAP AG BC420 12-61

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 6288

08amp

983209 SAP AG 1999

erie)

SAPDatabase

SeJuential9ile

SAPDatabase

ALL TRASATIALL TRASATI

SeJuential9ile

ATE IPUTATE IPUT

D TableD TableD TableD Table

I Monitor

T

In contrast to atch input you can use ca transaction to directy pass data to the diaog interface

$ithout using a atch input session Cou use an interna tae (2 tae same structure and ayout

as atch input) to temporariy store your screen data Then you ca the desired transaction in your

program

Note 5n average the 2a Transaction method is 8 to times faster than using atch Input

copy SAP AG BC420 12-62

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 6388

08

983209 SAP AG 1999

all Transaction Program$ 1ample

RE)ORT abcbdcdcdeb9ct-

)ARA(ETERS d9mode DEFAUT A

udmode DEFAUT S-FOR( calltranact9on-2A TRANSA2TION FD

USING bdcdata (ODE d9mode

U)DATE udmode-

IF lt1ubrc NE - 5RITE 6 ---

ENDIF-ENDFOR(-

Screen

00

Screen

100

Screen

An additiona system ro area is added for the caed transaction The system uses this area for

processing the individua screens in the transactionH the data from the tae is added here After the

transaction is processed the second ro area is reeasedH the system continues processing in the first

ro area

Notes

In contrast to atch input there is no error ogging (error sessions) here For processing the caed

transaction the system uses the authoriDations of the user that caed the transaction The 2 tae

can ony hod data for one transaction run at a time efore another transaction is caed and its data

can e added you must eecute a amp7Famp7S= for the 2 tae

copy SAP AG BC420 12-63

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 6488

084

983209 SAP AG 1999

ALL TRASATI C6

RE)ORT 777-

2A TRANSA2TION FD USING bdcdata (ODE E-

Default for MD1 is A

2A TRANSA2TION 3tranact9oncode4 USING 3bdc1table4 C (ODE A E N C-

-ith the parameter 57 you can seect a specific dispay mode for processing the transaction The

foo$ing three modes are avaiae

A (ispay a)

If you eecute the program a the screens and a their data are dispayed This is the defaut vaue

for the 57 in 2A++ TampANSA2TI5N

N (ispay nothing)

The screens are not dispayed at a regardess of $hether any of them contained errors As soon as

the transaction has een fuy processed contro is returned to your program (The vaue of the

parameter 4PAT7 determines $hether dataase updates are eecuted or not)

7 (ispay errors ony)As soon as an error occurs in a screen the transaction is s$itched to dispay mode so that you can

correct the errors

These dispay modes are the same as those in the atch input session processing

copy SAP AG BC420 12-64

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 6588

082

983209 SAP AG 1999

RE)ORT 777-

2A TRANSA2TION FD USING BD2DATA U)DATE -

ALL TRASATI Camp

RE)ORT 777-

2A TRANSA2TION FD USING bdcdata U)DATE -

2A TRANSA2TION 3tranact9oncode4 USING 3bdc1table4 C (ODE A E N C U)DATE A S C -

Default for UPDAT1 is A

-ith the parameter 4PAT7 you can contro ho$ dataase updates arising from a transaction are

carried out There are three options

A (asynchronous updating) The caed transaction does not $ait unti the dataase has een

updated it simpy for$ard the updates to the SAP update service This usuay speeds up the 2T

program This processing mode is N5T recommended for arge data sets as the caed transaction

does not receive a competion message from the update modue

The caing 2T program therefore cannot te if the transaction has een successfuy competed Cou

shoud use the updating administration function (transaction S8) to determine $hether updating

$as terminated eary The error anaysis correction functions for are ess hepfu than $ith

synchronous updating

S (synchronous updating) -ith synchronous updating the caed transaction $aits unti a the

updates have een competed So processing is so$er than $ith synchronous updating The caed

transaction can ho$ever report any updating errors to the program $hich maes error

anaysiscorrection easier

+ (local updating) $ith oca updating the dataase is not updated in a separate process it is

updated in the caers process (see appication hep documentation for the AAP ey$ord S7T

4PAT7 TAS6 +52A+)

copy SAP AG BC420 12-65

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 6688

088

983209 SAP AG 1999

ALL TRASATI C

RE)ORT 777-DATA mtab T0)E TABE OF bdcm8coll-

2A TRANSA2TION FD USING bdcdata (ESSAGES INTO mtab-

2A TRANSA2TION 3tranact9oncode4 USING 3bdc1table4 C (ODE A E N C U)DATE A S C (ESSAGES INTO 3metab4 C -

7SSAlt7S specifies that a system messages that are output during the eecution of a 2A++

TampANSA2TI5N are $ritten to the interna tae L7SSTA The interna tae must have the

structure 2Slt25++

4nie the cassica atch input processing $ith sessions 2A++ TampANSA2TI5N does not offer any

specia processing procedures for transactions containing errors There are no restart functions for

transactions that contain errors or that cause updating terminations

copy SAP AG BC420 12-66

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 6788

083

983209 SAP AG 1999

ALL TRASATI C4

RE)ORT 777-DATA mltot T0)E ctuaram-

2A TRANSA2TION FD USING BD2DATA

O)TIONS FRO( mltot-

2A TRANSA2TION 3tranact9oncode4 USING 3bdc1table4 C (ODE A E N C U)DATE A S C (ESSAGES INTO 3metab4 C O)TIONS FRO( ot C -

RE)ORT 777-DATA mltot T0)E ctuaram-2A TRANSA2TION FD USING bdcdata

O)TIONS FRO( mltot-

The addition 5PTI5NS enaes the ca transaction statement to e controed through a structure

The structure must have the dictionary type 2T43PAampAS

The addition 5PTI5NS Famp5 must not e comined either $ith the addition 57 or $ith

4PAT7 ore information on the net side

copy SAP AG BC420 12-67

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 6888

085

983209 SAP AG 1999

Structure TUltPARAMS

DISMD1 Procen mode anaoo o addon amp

UPDMD1 $pdae mode anaoo o addon $PA

ATTMD1 CA mode CA conro

D19SI1 orce de=a EndoE e drn procen

RAMMIT +o eD a Camp amp(

IPT +o a ac np eonF a F S-B+P SPAC

I1D +o a ac np eon a=er end o= BC daa

The components are defined as foo$s

The components 7FSIM7 ampA25IT N5INPT and N5I7N can have the foo$ing

vaues KGK E Ces or K K E No

If the addition 5PTI5NS Famp5 is not specified the foo$ing settings appy to the contro

parameters

IS57 from addition 57

4P57 from addition 4PAT7

2ATT57 2ATT not active

7FSIM7 o not not use defaut $indo$s siDe

ampA25IT Successfu eit at 25IT -5amp6

N5INPT atch input session active (SC9INPT E G)

N5I7N atch input session sti active after end of 2 data

copy SAP AG BC420 12-68

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 6988

087

983209 SAP AG 1999

SMSBID Message ID

SMSBT Message T(pe C1GIGWGSGA

SMSB Message umber

SMSB6 Message ariable 6

SMSBamp Message ariable amp

SMSB Message ariable

SMSB4 Message ariable 4

SMSBID Message ID

SMSBT Message T(pe C1GIGWGSGA

SMSB Message umber

SMSB6 Message ariable 6

SMSBamp Message ariable amp

SMSB Message ariable

SMSB4 Message ariable 4

Return code$

S(stem fields$

alue Meaning

0 Successful

6000 1rror in transaction

6000 1rror in processing call transaction

see also the s(stem fields specified

alue Meaning

0 Successful

6000 1rror in transaction

6000 1rror in processing call transaction

see also the s(stem fields specified

9ield name Meaning9ield name9ield name MeaningMeaning

Return ode and S(stem 9ields

The return code is used to specify $hether the caed transaction $as processed successfuy In

addition severa system fieds are fied The numer I type and variaes of the diaog message

output y the caed transaction Cou need this information to output the message tet

copy SAP AG BC420 12-69

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 7088

030

983209 SAP AG 1999

Benerated Program of the TA Recorder

REFRES= (ESSTAB-

2A TRANSA2TION tcode USING bdcdata (ODE ctumode U)DATE cudate (ESSAGES INTO metab-OO) AT metab- ENDOO)-IF lubrc 34 AND e8rou 34 S)A2E- IF e8rouoenend - 2A FUN2TION BD2O)ENGROU) E)ORTING ---------

--------- E8rouoened - ENDIF- 2A FUN2TION BD2INSERT E)ORTING T2ODE tcode TABES D0N)ROTAB bdcdata-ENDIF-REFRES= bdcdata-

Message table output

pen error session

Insert data record that

has errors into error

session

If you have seected ca transaction on the seection screen the generated program runs as foo$s

The onine transaction is caed $ith ca transaction and passed to tae 2ATA A the

messages arising during the ca transaction are put in the interna tae 7SSTA

7SSTA is output as a ist

If you have specified an error session ( 73ltamp54P L SPA27) on the seection screen and the

ca transaction comes across an error (+3S4amp2 L 0) the error session is opened The error

session is ho$ever ony opened once Then the data record is paced in the session

A the other data records that have errors $ith ca transaction are paced in the same session

copy SAP AG BC420 12-70

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 7188

036

983209 SAP AG 1999

The Transaction Recorder

PrinciplesPrinciples

Recording )ith the LSMWRecording )ith the LSMW

Principles of atch Input and all TransactionPrinciples of atch Input and all Transaction

Integrating the TA Program into the DWIntegrating the TA Program into the DW

Using the TA Recorder Using the TA Recorder

copy SAP AG BC420 12-71

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 7288

03amp

983209 SAP AG 1999

Integrating into the DW

Transfer program

AAP Dictionar(

Integrate

SDA0

SDA6

SDAamp

SDA

Cou can integrate the generated program into the G9- The structure of the fie must e created

in the AAP ictionary The taes SGA0 SGA8 SGA1 and SGA $i e fied

copy SAP AG BC420 12-72

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 7388

03

983209 SAP AG 1999

DW Release 42

Goo

-B eeae 45

aa ran=er ogtec

Int customer data transfer ob-ect

ecord =ed

Dece daa ran=er

d Goo

The ampunction ampor interatin TA recorder prora$s is

i$ple$ented in the

D+-B in Release

The recorder can e integrated as of ampeease and it is provided in the G9- ampeease

ltot to the G9- ampeease 5n the initia screen you can integrate programs y choosing ampoto

( +nt customer ata transfer o-ect

copy SAP AG BC420 12-73

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 7488

034

983209 SAP AG 1999

reating Program as D b-ect

Comer ran=er ogtec

ampgtec ype

Sor eD =or ogtec

aa ran=er proram

Srcre name

9900

(+A1

Cane comer

ZBCA+G

ZB

ustomer transfer ob-ect

umber bet)een 7000 and 7777

b-ect t(pe

Assignment to R ob-ect

Short tet for D ob-ectShort description

Data transfer program

ame of generated program

Structure name

A structure Cstructure la(out )ith this name is created in

the AAP Dictionar(

For ampeease transfer oects $ere not organiDed y 5amp oects ut y a G numer (00089

OOOO) The numer range O0009OOOO is reserved for customers

To create a connection to the ne$ G 9- you must assign the program to a 5amp oect

2reate a short tet for the G oect This tet $i appear in the method seection ist

Specify the program to e incuded

Specify a name for the structure to e created in the AAP ictionary

Note $he generated program appears under program type +N and not under program type

-

copy SAP AG BC420 12-74

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 7588

032

983209 SAP AG 1999

Adantages

Automatic program registration in the DW in

Release 48

ou can use all the functions defined for

standard ob-ects

1ception$ The (reate ampile ith data

function

If you incuded the oect in the ampeease $orench it is automaticay avaiae in the ampeease

B $orench

A the $orench functions are avaiae for your oect ecept for Create files ith transfer ata

copy SAP AG BC420 12-75

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 7688

038

983209 SAP AG 1999

ou are no) able to$

The Transaction Recorder$ Unit Summar(

Use the recording function in the LSMW to create

a batch input session )ith the data from the

eternal s(stem

Use the TA Recorder to create (our o)n data

transfer program

Anal(e programs that )or+ )ith batch input or

call transaction

Integrate the TA Recorder programs into the

DW

copy SAP AG BC420 12-76

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 7788

ercise 1

nit $ -ecorder

$opic 2reating etors

$ransaction -ecorder ercise 1

bull 2reating detors $ith eterna numer assignment

bull etor numers M9980008 to M9980080

Address data for detors $ith eterna numer assignment is to

e transferred using program ampFI700

ro4ect F5

Supro4ect +5

-un +575

$as)s 85 95 8S25

9oad program -F+00

8 In the foo$ing eercises eisting data is to e changed Therefore these detors $ith

eterna numer assignment have to first e created

898 4nder suproect 79 create run 797G9 $ith the name Detors ith

eternal numers

copy SAP AG BC420 12-77

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 7888

891 2reate the foo$ing three tass The tass map the foo$ing process steps

convert data create + session and process + session

89198 In run 797G9 create the foo$ing tas

9 Tas AP9

9 Name 2onvert data 9 Tas type AP

9 Program type +S-

Seect the foo$ing +S- oect

+S- proect 2109

+S- suproect 7I9

+S- oect I997GT

89191 In run 797G9 create the foo$ing tas 9 Tas +5A9

9 Name 2reate I session

Tas type +5A

9 Program type INP

Seect program ampFI700 $ith the variant

I97G9

8919 In run 797G9 create the foo$ing tas

9 Tas S29

9 Name Process I session Tas type S2

9 Program type amp7P5

Seect program ampS2S4 $ith the variant

S497G9

Note that you have to correct the seuence of the tass 2onvert data

create + session and process + session

4se the uttons

89 Start the run

The detors $i e created $ith eterna numer assignments

89 2hec in transaction F0 that the detors M9980008 to M9980080 have een

created

copy SAP AG BC420 12-78

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 7988

ercise

nit $ransaction -ecorder

$opic -ecording function in the 9S8(

bull 2reate a recording using the +S-

bull ltenerate a atch input session

2hange the detor address data in the amp System

Name of the recording +

Name of the file +2055+F9

8 2reate the recording 7I3 using the +S- ampecord the transaction F01 (2hange

detor)

898 efore you create the recording first test the transaction onineQ

For the recording use detor M9980008 5n the initia screen of the F01

maintain the foo$ing fieds ony

etor etor M9980008

2ompany code 0008

Address data seect

Note $he data record must e saved hile recording

891 aintain the names and the descriptions for the foo$ing fieds

Name city street posta code and teephone numereete a other fieds in screen 880 from the recording (eg S5ampT+ +AN8

SPampAS)

4se the same technica names as sho$n in the tae eo$ (automatic fied

mapping)

copy SAP AG BC420 12-79

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 8088

1 2reate the suproect 7I9 and the ne$ oect TA3 in your proect 2109

aintain the oect attriutes and seect the item atch input recording Seect your

recording 7I3

2reate the source structure address

2reate the source fieds according to the tae eo$ 5r copy them from proect 2109S37N suproect 7I900 oect TA900

198 Fie setup The data from the egacy system are dispayed in the foo$ing tae

Fied name Fied type Fied ength escription

N5 2 8B etor numer

NA7 2 Name

STamp77T 2 Street

2ITC 2 2ityPace of residence

MIP 2 80 Posta code

T7+ 2 8B Teephone numer

191 aintain the fied mapping 4se the automatic fied mapping (via menu item

7tras)

19 Specify the fies 5ny maintain the fie name of the source fie

Name of the fie 21099IFI+7

2odepage 8800

19 Import the data and convert them ispay the data in each caseQ

19 2reate a atch input session

19B ampun the atch input session

copy SAP AG BC420 12-80

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 8188

ercise 3

nit $ransaction -ecorder

$opic -ecording ith the $ -ecorder

bull ltenerate a recording using the TA recorder

bull Test the recording

2hange the address data of detors in the amp system

Name recording $+

Name of the file +2055+F9

8 2reate the recording TA37I3 using the transaction recorder ampecord the

transaction F01 (change detor)

898 4se detor M9980008 for the recording 5n the F01 initia screen ony

maintain the foo$ing fieds

etor etor M9980008

2ompany 2ode 0008

Address data seect

Note $he data record must e saved hen recording

eete a fieds that do not eist in the source fie 21099IFI+7 from screen

880 in the recording (eg 6NA89S5ampT+ 6NA89+AN8 6ANNQ9SPampAS) Note o not deete fieds ampF01946ampS and ampF0190880

Save the recording no$

1 S$itch to the recordings overvie$

198 Process the recording $ith the processing mode A (dispay a)

191 Process the recording $ith the processing mode RN (no dispay)

19 If the recording has een tested and no error has occurred generate a I session

and run it using the I monitor If an error shoud occur generate the recordingagainQ

copy SAP AG BC420 12-81

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 8288

From the recording generate the program M21037I3 in your deveopment cass

2109 Seect the foo$ing

bull ampead fied contents from fie

bull 2reate test data in the fie 2103dei3test3tt

98 Save this program and eecute it ltenerate one I session each and process it

2arry out the same steps again using the ca transaction

The generated program shoud no$ e changed so that fie 21099IFI+7 can e

read and processed

98 2hange the defaut vaue of the fie name (parameter dataset) in 21099

IFI+7

91 2hange the structure definition eete the company code fied and the address

data checo from the structure

9 2hange the su9routine ca perform dc3fied for the company code (KampF019

46ampSK) so that the vaue 0008 is transferred

9 2hange the su9routine ca perform dc3fied for the address data checo

(KampF0190880K) so that the vaue G is transferred

9 Start the program again and read the data from the fie 21099IFI+7 $ith

detor data ltenerate a I session $ith it and run it

copy SAP AG BC420 12-82

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 8388

033 Include DR16INCLUDE BDCRECX1

SELECTION-SCREEN BEGIN OF LINE

PARAMETERS SESSION RADIOBUTTON GROUP CTU create sessi SELECTION-SCREEN COMMENT $amp TEXT-S FOR FIELD SESSION

se(ecti-scree )siti +

PARAMETERS CTU RADIOBUTTON GROUP CTU ca(( trasacti

SELECTION-SCREEN COMMENT $amp TEXT-S FOR FIELD CTU

SELECTION-SCREEN END OF LINE

SELECTION-SCREEN BEGIN OF LINE

SELECTION-SCREEN COMMENT $amp TEXT-S1 FOR FIELD GROUP

se(ecti-scree )siti $+

PARAMETERS GROUP1$amp r) ae 0 sessi

SELECTION-SCREEN COMMENT $amp TEXT-S+ FOR FIELD CTUMODE

se(ecti-scree )siti

PARAMETERS CTUMODE LIE CTU2PARAMS-DISMODE DEFAULT 3N3

A4 s56 a(( 78)rs

E4 s56 78)r errr (8

N4 7 t 7is)(a8 78)r

SELECTION-SCREEN END OF LINE

SELECTION-SCREEN BEGIN OF LINE

SELECTION-SCREEN COMMENT $amp TEXT-S$ FOR FIELD USER

se(ecti-scree )siti $+

PARAMETERS4 USER1$amp DEFAULT S9-UNAME ser 0r sessi i atc5

SELECTION-SCREEN COMMENT $amp TEXT-S FOR FIELD CUPDATE

se(ecti-scree )siti

PARAMETERS CUPDATE LIE CTU2PARAMS-UPDMODE DEFAULT 3L3

S4 s8c5rs(8

A4 as8c5rs(8

L4 (ca(

SELECTION-SCREEN END OF LINE

SELECTION-SCREEN BEGIN OF LINE

SELECTION-SCREEN COMMENT $amp TEXT-S FOR FIELD EEP

se(ecti-scree )siti $+

PARAMETERS4 EEP AS CltECBOX 3 3 = 7e(ete sessi i0 0iis5e7

3X3 = gtee) sessi i0 0iis5e7

SELECTION-SCREEN COMMENT $amp TEXT-S FOR FIELD E2GROUP

copy SAP AG BC420 12-83

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 8488

se(ecti-scree )siti

)araeters E2GROUP1$amp r) ae 0 errr-sessi

SELECTION-SCREEN END OF LINE

SELECTION-SCREEN BEGIN OF LINE

SELECTION-SCREEN COMMENT $amp TEXT-S FOR FIELD ltOLDDATE

se(ecti-scree )siti $+

PARAMETERS4 ltOLDDATE LIE S9-DATUM

SELECTION-SCREEN COMMENT +11amp TEXT-S$ FOR FIELD E2USER

se(ecti-scree )siti

PARAMETERS4 E2USER1$amp DEFAULT S9-UNAME ser 0r errr-sessi

SELECTION-SCREEN END OF LINE

SELECTION-SCREEN BEGIN OF LINE

SELECTION-SCREEN COMMENT +11amp TEXT-S FOR FIELD E2EEP

se(ecti-scree )siti

PARAMETERS4 E2EEP AS CltECBOX 3 3 = 7e(ete sessi i0 0iis5e7

3X3 = gtee) sessi i0 0iis5e7

SELECTION-SCREEN END OF LINE

SELECTION-SCREEN BEGIN OF LINE

SELECTION-SCREEN COMMENT +11amp TEXT-S FOR FIELD E2ltDATE

se(ecti-scree )siti

PARAMETERS4 E2ltDATE LIE S9-DATUM

SELECTION-SCREEN END OF LINE

SELECTION-SCREEN SIP

SELECTION-SCREEN BEGIN OF LINE

SELECTION-SCREEN COMMENT 1amp TEXT-S1 FOR FIELD NODATA

PARAMETERS4 NODATA DEFAULT 33 LOER CASE 7ata

SELECTION-SCREEN END OF LINE

----------------------------------------------------------------------

Batc5i)t7ata 0 si(e trasacti

DATA4 BDCDATA LIE BDCDATA OCCURS ITlt ltEADER LINE

essaes 0 ca(( trasacti

DATA4 MESSTAB LIE BDCMSGCOLL OCCURS ITlt ltEADER LINE

errr sessi )ee7 3 3 r 3X3amp

DATA4 E2GROUP2OPENED

essae tets

TABLES4 T1

copy SAP AG BC420 12-84

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 8588

----------------------------------------------------------------------

at se(ecti scree

----------------------------------------------------------------------

AT SELECTION-SCREEN

r) a7 ser st e 0i((e7 0r create sessi

IF SESSION = 3X3 AND

GROUP = SPACE OR USER = SPACE

MESSAGE E1MSamp

ENDIF

----------------------------------------------------------------------

)e 7ataset

----------------------------------------------------------------------

FORM OPEN2DATASET USING P2DATASET

OPEN DATASET P2DATASET IN TEXT MODE

IF S9-SUBRC

RITE4 TEXT-E S9-SUBRC

STOP

ENDIF

ENDFORM

----------------------------------------------------------------------

c(se 7ataset

----------------------------------------------------------------------

FORM CLOSE2DATASET USING P2DATASET

CLOSE DATASET P2DATASET

ENDFORM

----------------------------------------------------------------------

create atc5i)t sessi

t 0r ca(( trasacti siamp

----------------------------------------------------------------------

FORM OPEN2GROUP

IF SESSION = 3X3

SIP

RITE4 $amp 3Create r)3I1amp GROUP

SIP

)e atc5i)t r)

CALL FUNCTION 3BDC2OPEN2GROUP3

EXPORTING CLIENT = S9-MANDT

copy SAP AG BC420 12-85

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 8688

GROUP = GROUP

USER = USER

EEP = EEP

ltOLDDATE = ltOLDDATE

RITE4 amp 3BDC2OPEN2GROUP3I$amp

1$amp 3retrc7e43I+amp

S9-SUBRC

ENDIF

ENDFORM

----------------------------------------------------------------------

e7 atc5i)t sessi

ca(( trasacti si4 errr sessiamp

----------------------------------------------------------------------

FORM CLOSE2GROUP

IF SESSION = 3X3

c(se atc5i)t r)

CALL FUNCTION 3BDC2CLOSE2GROUP3

RITE4 amp 3BDC2CLOSE2GROUP3Iamp

1$amp 3retrc7e43I+amp

S9-SUBRC

ELSE

IF E2GROUP2OPENED = 3X3

CALL FUNCTION 3BDC2CLOSE2GROUP3

RITE4

RITE4 amp 3Fe5(era))e 6r7e eret3Iamp

ENDIF

ENDIF

ENDFORM

----------------------------------------------------------------------

Start e6 trasacti accr7i t )araeters

----------------------------------------------------------------------

FORM BDC2TRANSACTION USING TCODE

DATA4 L2MSTRINGamp

DATA4 L2SUBRC LIE S9-SUBRC

atc5 i)t sessi

IF SESSION = 3X3

CALL FUNCTION 3BDC2INSERT3

EXPORTING TCODE = TCODE

TABLES D9NPROTAB = BDCDATA

RITE4 3BDC2INSERT3Iamp

copy SAP AG BC420 12-86

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 8788

TCODE

3retrc7e43I+amp

S9-SUBRC

3RECORD43

S9-INDEX

ca(( trasacti si

ELSE

REFRESlt MESSTAB

CALL TRANSACTION TCODE USING BDCDATA

MODE CTUMODE

UPDATE CUPDATE

MESSAGES INTO MESSTAB

L2SUBRC = S9-SUBRC

RITE4 3CALL2TRANSACTION3

TCODE

3retrc7e43I+amp

L2SUBRC

3RECORD43

S9-INDEX

LOOP AT MESSTAB

SELECT SINGLE FROM T1 ltERE SPRSL = MESSTAB-MSGSPRA

AND ARBGB = MESSTAB-MSGID

AND MSGNR = MESSTAB-MSGNR

IF S9-SUBRC =

L2MSTRING = T1-TEXT

IF L2MSTRING CS 313

REPLACE 313 ITlt MESSTAB-MSGH1 INTO L2MSTRING

REPLACE 3$3 ITlt MESSTAB-MSGH$ INTO L2MSTRING

REPLACE 33 ITlt MESSTAB-MSGH INTO L2MSTRING

REPLACE 33 ITlt MESSTAB-MSGH INTO L2MSTRING

ELSE

REPLACE 33 ITlt MESSTAB-MSGH1 INTO L2MSTRING

REPLACE 33 ITlt MESSTAB-MSGH$ INTO L2MSTRING

REPLACE 33 ITlt MESSTAB-MSGH INTO L2MSTRING

REPLACE 33 ITlt MESSTAB-MSGH INTO L2MSTRING

ENDIF

CONDENSE L2MSTRING

RITE4 MESSTAB-MSGT9P L2MSTRING$+amp

ELSE

RITE4 MESSTAB

ENDIF

ENDLOOP

copy SAP AG BC420 12-87

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 8888

SIP

Eree 0e5(era))e

IF L2SUBRC AND E2GROUP SPACE

IF E2GROUP2OPENED = 3 3

CALL FUNCTION 3BDC2OPEN2GROUP3

EXPORTING CLIENT = S9-MANDT

GROUP = E2GROUP

USER = E2USER

EEP = E2EEP

ltOLDDATE = E2ltDATE

E2GROUP2OPENED = 3X3

ENDIF

CALL FUNCTION 3BDC2INSERT3

EXPORTING TCODE = TCODE

TABLES D9NPROTAB = BDCDATA

ENDIF

ENDIF

REFRESlt BDCDATA

ENDFORM

----------------------------------------------------------------------

Start e6 scree

----------------------------------------------------------------------

FORM BDC2D9NPRO USING PROGRAM D9NPRO

CLEAR BDCDATA

BDCDATA-PROGRAM = PROGRAM

BDCDATA-D9NPRO = D9NPRO

BDCDATA-D9NBEGIN = 3X3

APPEND BDCDATA

ENDFORM

----------------------------------------------------------------------

Isert 0ie(7

Page 57: BC420_46C - 012The Transaction Recorder

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 5788

023

983209 SAP AG 1999

Subprogram DltTRASATI

DltTRASATI

FOR( BD2TRANSA2TION USING tcode-

IF e9on -2A FUN2TION BD2INSERT

E)ORTING T2ODE tcode TABES D0N)ROTAB bdcdata-

ESE-

ENDIF-ENDFOR(-

T

Include

DR16

The suprogram 23TampANSA2TI5N moves the fied 2 tae either to a atch input session

or uses ca transaction to import the data into the system 5n the seection screen you can specify

$hether you $ant to create a session or you $ant to use ca transaction to process the data directy

The S7SSI5N fied is then set according to your seection

copy SAP AG BC420 12-57

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 5888

025

983209 SAP AG 1999

9unction Module DltLS1ltBRUP

ALL 9UTI DltLS1ltBRUP

11PTIS

TltP1 6

NU1U1lt1RRR amp

-ith the function modue 232+5S73ltamp54P you can cose a atch input session

In 7G27PTI5NS you get various return vaues that can e ueried $ith SC9S4amp2

copy SAP AG BC420 12-58

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 5988

027

983209 SAP AG 1999

Subprogram LS1ltBRUP

FOR( cloe8rou-IF e9on -cloe batcgt 9nut 8rou

2A FUN2TION BD22OSEGROU)-

ESE-IF e8rouoened -

2A FUN2TION BD22OSEGROU)-

ENDIF-ENDIF-

ENDFOR(-

LS1ltBRUPlose session

lose error session

Include

DR16

The suprogram 2+5S73ltamp54P coses the atch input session The suprogram differentiates

et$een a norma I session (S7SSI5N E G) and a session opened $hen ca transaction

encountered an error (73ltamp54P35P7N7 E G)

copy SAP AG BC420 12-59

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 6088

080

983209 SAP AG 1999

Subprograms DltDPRG Dlt9I1LD

DltDPR

Dlt9I1LD

FOR( bdc9eld USING nam al-IF al 34 nodata-2EAR bdcdata- bdcdata1nam nam- bdcdata1al al- A))END bdcdata-ENDIF-

ENDFOR(-

FOR( bdcdltnro USING ro8ram dltnro- 2EAR bdcdata-Bdcdata1ro8ram ro8ram-Bdcdata1dltnro dltnro-Bdcdata1dltnbe89n - A))END bdcdata-ENDFOR(-

Include

DR16

The incude 2amp72GG contains t$o suprograms 23CNPamp5 and 23FI7+

Suprogram 23CNPamp5 fis the 2 tae $ith program names and screen numers

Suprogram 23FI7+ fis the 2 tae $ith fied names and vaues

7ach suprogram creates an entry in the 2 tae

copy SAP AG BC420 12-60

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 6188

086

983209 SAP AG 1999

9illing the D Table

erorm bdcdltnro u9n8 SA)(FD +- erorm bdc9eld u9n8 BD22URSOR RFD1BUKRS- erorm bdc9eld u9n8 BD2OK2ODE 6- erorm bdc9eld u9n8 RFD1BUKRS record1BUKRS- erorm bdc9eld u9n8 RFD1KTOKD record1KTOKD-

erorm bdcdltnro u9n8 SA)(FD -

erorm bdc9eld u9n8 BD22URSOR KNA1S)RAS- erorm bdc9eld u9n8 BD2OK2ODE 6- erorm bdc9eld u9n8 KNA1NA(E record1NA(E-

erorm bdc9eld u9n8 KNA1SORT record1SORT-

Recording Benerated automaticall(

from the recording

)ERFOR( bdcdltnro USING SA)(FD +- )ERFOR( bdc9eld USING BD22URSOR RFD1BUKRS-)ERFOR( bdc9eld USING BD2OK2ODE 6-)ERFOR( bdc9eld USING RFD1BUKRS record1BUKRS-)ERFOR( bdc9eld USING RFD1KTOKD record1KTOKD-

)ERFOR( bdcdltnro USING SA)(FD -

)ERFOR( bdc9eld USING BD22URSOR KNA1S)RAS-)ERFOR( bdc9eld USING BD2OK2ODE 6-)ERFOR( bdc9eld USING KNA1NA(E record1NA(E-

)ERFOR( bdc9eld USING KNA1SORT record1SORT- ---

The 2 tae is fied $ith data from the recording The suroutines 23CNPamp5 and

23FI7+ are used for this

The suroutines are caed in the reuired structure or seuence

copy SAP AG BC420 12-61

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 6288

08amp

983209 SAP AG 1999

erie)

SAPDatabase

SeJuential9ile

SAPDatabase

ALL TRASATIALL TRASATI

SeJuential9ile

ATE IPUTATE IPUT

D TableD TableD TableD Table

I Monitor

T

In contrast to atch input you can use ca transaction to directy pass data to the diaog interface

$ithout using a atch input session Cou use an interna tae (2 tae same structure and ayout

as atch input) to temporariy store your screen data Then you ca the desired transaction in your

program

Note 5n average the 2a Transaction method is 8 to times faster than using atch Input

copy SAP AG BC420 12-62

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 6388

08

983209 SAP AG 1999

all Transaction Program$ 1ample

RE)ORT abcbdcdcdeb9ct-

)ARA(ETERS d9mode DEFAUT A

udmode DEFAUT S-FOR( calltranact9on-2A TRANSA2TION FD

USING bdcdata (ODE d9mode

U)DATE udmode-

IF lt1ubrc NE - 5RITE 6 ---

ENDIF-ENDFOR(-

Screen

00

Screen

100

Screen

An additiona system ro area is added for the caed transaction The system uses this area for

processing the individua screens in the transactionH the data from the tae is added here After the

transaction is processed the second ro area is reeasedH the system continues processing in the first

ro area

Notes

In contrast to atch input there is no error ogging (error sessions) here For processing the caed

transaction the system uses the authoriDations of the user that caed the transaction The 2 tae

can ony hod data for one transaction run at a time efore another transaction is caed and its data

can e added you must eecute a amp7Famp7S= for the 2 tae

copy SAP AG BC420 12-63

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 6488

084

983209 SAP AG 1999

ALL TRASATI C6

RE)ORT 777-

2A TRANSA2TION FD USING bdcdata (ODE E-

Default for MD1 is A

2A TRANSA2TION 3tranact9oncode4 USING 3bdc1table4 C (ODE A E N C-

-ith the parameter 57 you can seect a specific dispay mode for processing the transaction The

foo$ing three modes are avaiae

A (ispay a)

If you eecute the program a the screens and a their data are dispayed This is the defaut vaue

for the 57 in 2A++ TampANSA2TI5N

N (ispay nothing)

The screens are not dispayed at a regardess of $hether any of them contained errors As soon as

the transaction has een fuy processed contro is returned to your program (The vaue of the

parameter 4PAT7 determines $hether dataase updates are eecuted or not)

7 (ispay errors ony)As soon as an error occurs in a screen the transaction is s$itched to dispay mode so that you can

correct the errors

These dispay modes are the same as those in the atch input session processing

copy SAP AG BC420 12-64

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 6588

082

983209 SAP AG 1999

RE)ORT 777-

2A TRANSA2TION FD USING BD2DATA U)DATE -

ALL TRASATI Camp

RE)ORT 777-

2A TRANSA2TION FD USING bdcdata U)DATE -

2A TRANSA2TION 3tranact9oncode4 USING 3bdc1table4 C (ODE A E N C U)DATE A S C -

Default for UPDAT1 is A

-ith the parameter 4PAT7 you can contro ho$ dataase updates arising from a transaction are

carried out There are three options

A (asynchronous updating) The caed transaction does not $ait unti the dataase has een

updated it simpy for$ard the updates to the SAP update service This usuay speeds up the 2T

program This processing mode is N5T recommended for arge data sets as the caed transaction

does not receive a competion message from the update modue

The caing 2T program therefore cannot te if the transaction has een successfuy competed Cou

shoud use the updating administration function (transaction S8) to determine $hether updating

$as terminated eary The error anaysis correction functions for are ess hepfu than $ith

synchronous updating

S (synchronous updating) -ith synchronous updating the caed transaction $aits unti a the

updates have een competed So processing is so$er than $ith synchronous updating The caed

transaction can ho$ever report any updating errors to the program $hich maes error

anaysiscorrection easier

+ (local updating) $ith oca updating the dataase is not updated in a separate process it is

updated in the caers process (see appication hep documentation for the AAP ey$ord S7T

4PAT7 TAS6 +52A+)

copy SAP AG BC420 12-65

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 6688

088

983209 SAP AG 1999

ALL TRASATI C

RE)ORT 777-DATA mtab T0)E TABE OF bdcm8coll-

2A TRANSA2TION FD USING bdcdata (ESSAGES INTO mtab-

2A TRANSA2TION 3tranact9oncode4 USING 3bdc1table4 C (ODE A E N C U)DATE A S C (ESSAGES INTO 3metab4 C -

7SSAlt7S specifies that a system messages that are output during the eecution of a 2A++

TampANSA2TI5N are $ritten to the interna tae L7SSTA The interna tae must have the

structure 2Slt25++

4nie the cassica atch input processing $ith sessions 2A++ TampANSA2TI5N does not offer any

specia processing procedures for transactions containing errors There are no restart functions for

transactions that contain errors or that cause updating terminations

copy SAP AG BC420 12-66

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 6788

083

983209 SAP AG 1999

ALL TRASATI C4

RE)ORT 777-DATA mltot T0)E ctuaram-

2A TRANSA2TION FD USING BD2DATA

O)TIONS FRO( mltot-

2A TRANSA2TION 3tranact9oncode4 USING 3bdc1table4 C (ODE A E N C U)DATE A S C (ESSAGES INTO 3metab4 C O)TIONS FRO( ot C -

RE)ORT 777-DATA mltot T0)E ctuaram-2A TRANSA2TION FD USING bdcdata

O)TIONS FRO( mltot-

The addition 5PTI5NS enaes the ca transaction statement to e controed through a structure

The structure must have the dictionary type 2T43PAampAS

The addition 5PTI5NS Famp5 must not e comined either $ith the addition 57 or $ith

4PAT7 ore information on the net side

copy SAP AG BC420 12-67

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 6888

085

983209 SAP AG 1999

Structure TUltPARAMS

DISMD1 Procen mode anaoo o addon amp

UPDMD1 $pdae mode anaoo o addon $PA

ATTMD1 CA mode CA conro

D19SI1 orce de=a EndoE e drn procen

RAMMIT +o eD a Camp amp(

IPT +o a ac np eonF a F S-B+P SPAC

I1D +o a ac np eon a=er end o= BC daa

The components are defined as foo$s

The components 7FSIM7 ampA25IT N5INPT and N5I7N can have the foo$ing

vaues KGK E Ces or K K E No

If the addition 5PTI5NS Famp5 is not specified the foo$ing settings appy to the contro

parameters

IS57 from addition 57

4P57 from addition 4PAT7

2ATT57 2ATT not active

7FSIM7 o not not use defaut $indo$s siDe

ampA25IT Successfu eit at 25IT -5amp6

N5INPT atch input session active (SC9INPT E G)

N5I7N atch input session sti active after end of 2 data

copy SAP AG BC420 12-68

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 6988

087

983209 SAP AG 1999

SMSBID Message ID

SMSBT Message T(pe C1GIGWGSGA

SMSB Message umber

SMSB6 Message ariable 6

SMSBamp Message ariable amp

SMSB Message ariable

SMSB4 Message ariable 4

SMSBID Message ID

SMSBT Message T(pe C1GIGWGSGA

SMSB Message umber

SMSB6 Message ariable 6

SMSBamp Message ariable amp

SMSB Message ariable

SMSB4 Message ariable 4

Return code$

S(stem fields$

alue Meaning

0 Successful

6000 1rror in transaction

6000 1rror in processing call transaction

see also the s(stem fields specified

alue Meaning

0 Successful

6000 1rror in transaction

6000 1rror in processing call transaction

see also the s(stem fields specified

9ield name Meaning9ield name9ield name MeaningMeaning

Return ode and S(stem 9ields

The return code is used to specify $hether the caed transaction $as processed successfuy In

addition severa system fieds are fied The numer I type and variaes of the diaog message

output y the caed transaction Cou need this information to output the message tet

copy SAP AG BC420 12-69

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 7088

030

983209 SAP AG 1999

Benerated Program of the TA Recorder

REFRES= (ESSTAB-

2A TRANSA2TION tcode USING bdcdata (ODE ctumode U)DATE cudate (ESSAGES INTO metab-OO) AT metab- ENDOO)-IF lubrc 34 AND e8rou 34 S)A2E- IF e8rouoenend - 2A FUN2TION BD2O)ENGROU) E)ORTING ---------

--------- E8rouoened - ENDIF- 2A FUN2TION BD2INSERT E)ORTING T2ODE tcode TABES D0N)ROTAB bdcdata-ENDIF-REFRES= bdcdata-

Message table output

pen error session

Insert data record that

has errors into error

session

If you have seected ca transaction on the seection screen the generated program runs as foo$s

The onine transaction is caed $ith ca transaction and passed to tae 2ATA A the

messages arising during the ca transaction are put in the interna tae 7SSTA

7SSTA is output as a ist

If you have specified an error session ( 73ltamp54P L SPA27) on the seection screen and the

ca transaction comes across an error (+3S4amp2 L 0) the error session is opened The error

session is ho$ever ony opened once Then the data record is paced in the session

A the other data records that have errors $ith ca transaction are paced in the same session

copy SAP AG BC420 12-70

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 7188

036

983209 SAP AG 1999

The Transaction Recorder

PrinciplesPrinciples

Recording )ith the LSMWRecording )ith the LSMW

Principles of atch Input and all TransactionPrinciples of atch Input and all Transaction

Integrating the TA Program into the DWIntegrating the TA Program into the DW

Using the TA Recorder Using the TA Recorder

copy SAP AG BC420 12-71

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 7288

03amp

983209 SAP AG 1999

Integrating into the DW

Transfer program

AAP Dictionar(

Integrate

SDA0

SDA6

SDAamp

SDA

Cou can integrate the generated program into the G9- The structure of the fie must e created

in the AAP ictionary The taes SGA0 SGA8 SGA1 and SGA $i e fied

copy SAP AG BC420 12-72

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 7388

03

983209 SAP AG 1999

DW Release 42

Goo

-B eeae 45

aa ran=er ogtec

Int customer data transfer ob-ect

ecord =ed

Dece daa ran=er

d Goo

The ampunction ampor interatin TA recorder prora$s is

i$ple$ented in the

D+-B in Release

The recorder can e integrated as of ampeease and it is provided in the G9- ampeease

ltot to the G9- ampeease 5n the initia screen you can integrate programs y choosing ampoto

( +nt customer ata transfer o-ect

copy SAP AG BC420 12-73

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 7488

034

983209 SAP AG 1999

reating Program as D b-ect

Comer ran=er ogtec

ampgtec ype

Sor eD =or ogtec

aa ran=er proram

Srcre name

9900

(+A1

Cane comer

ZBCA+G

ZB

ustomer transfer ob-ect

umber bet)een 7000 and 7777

b-ect t(pe

Assignment to R ob-ect

Short tet for D ob-ectShort description

Data transfer program

ame of generated program

Structure name

A structure Cstructure la(out )ith this name is created in

the AAP Dictionar(

For ampeease transfer oects $ere not organiDed y 5amp oects ut y a G numer (00089

OOOO) The numer range O0009OOOO is reserved for customers

To create a connection to the ne$ G 9- you must assign the program to a 5amp oect

2reate a short tet for the G oect This tet $i appear in the method seection ist

Specify the program to e incuded

Specify a name for the structure to e created in the AAP ictionary

Note $he generated program appears under program type +N and not under program type

-

copy SAP AG BC420 12-74

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 7588

032

983209 SAP AG 1999

Adantages

Automatic program registration in the DW in

Release 48

ou can use all the functions defined for

standard ob-ects

1ception$ The (reate ampile ith data

function

If you incuded the oect in the ampeease $orench it is automaticay avaiae in the ampeease

B $orench

A the $orench functions are avaiae for your oect ecept for Create files ith transfer ata

copy SAP AG BC420 12-75

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 7688

038

983209 SAP AG 1999

ou are no) able to$

The Transaction Recorder$ Unit Summar(

Use the recording function in the LSMW to create

a batch input session )ith the data from the

eternal s(stem

Use the TA Recorder to create (our o)n data

transfer program

Anal(e programs that )or+ )ith batch input or

call transaction

Integrate the TA Recorder programs into the

DW

copy SAP AG BC420 12-76

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 7788

ercise 1

nit $ -ecorder

$opic 2reating etors

$ransaction -ecorder ercise 1

bull 2reating detors $ith eterna numer assignment

bull etor numers M9980008 to M9980080

Address data for detors $ith eterna numer assignment is to

e transferred using program ampFI700

ro4ect F5

Supro4ect +5

-un +575

$as)s 85 95 8S25

9oad program -F+00

8 In the foo$ing eercises eisting data is to e changed Therefore these detors $ith

eterna numer assignment have to first e created

898 4nder suproect 79 create run 797G9 $ith the name Detors ith

eternal numers

copy SAP AG BC420 12-77

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 7888

891 2reate the foo$ing three tass The tass map the foo$ing process steps

convert data create + session and process + session

89198 In run 797G9 create the foo$ing tas

9 Tas AP9

9 Name 2onvert data 9 Tas type AP

9 Program type +S-

Seect the foo$ing +S- oect

+S- proect 2109

+S- suproect 7I9

+S- oect I997GT

89191 In run 797G9 create the foo$ing tas 9 Tas +5A9

9 Name 2reate I session

Tas type +5A

9 Program type INP

Seect program ampFI700 $ith the variant

I97G9

8919 In run 797G9 create the foo$ing tas

9 Tas S29

9 Name Process I session Tas type S2

9 Program type amp7P5

Seect program ampS2S4 $ith the variant

S497G9

Note that you have to correct the seuence of the tass 2onvert data

create + session and process + session

4se the uttons

89 Start the run

The detors $i e created $ith eterna numer assignments

89 2hec in transaction F0 that the detors M9980008 to M9980080 have een

created

copy SAP AG BC420 12-78

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 7988

ercise

nit $ransaction -ecorder

$opic -ecording function in the 9S8(

bull 2reate a recording using the +S-

bull ltenerate a atch input session

2hange the detor address data in the amp System

Name of the recording +

Name of the file +2055+F9

8 2reate the recording 7I3 using the +S- ampecord the transaction F01 (2hange

detor)

898 efore you create the recording first test the transaction onineQ

For the recording use detor M9980008 5n the initia screen of the F01

maintain the foo$ing fieds ony

etor etor M9980008

2ompany code 0008

Address data seect

Note $he data record must e saved hile recording

891 aintain the names and the descriptions for the foo$ing fieds

Name city street posta code and teephone numereete a other fieds in screen 880 from the recording (eg S5ampT+ +AN8

SPampAS)

4se the same technica names as sho$n in the tae eo$ (automatic fied

mapping)

copy SAP AG BC420 12-79

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 8088

1 2reate the suproect 7I9 and the ne$ oect TA3 in your proect 2109

aintain the oect attriutes and seect the item atch input recording Seect your

recording 7I3

2reate the source structure address

2reate the source fieds according to the tae eo$ 5r copy them from proect 2109S37N suproect 7I900 oect TA900

198 Fie setup The data from the egacy system are dispayed in the foo$ing tae

Fied name Fied type Fied ength escription

N5 2 8B etor numer

NA7 2 Name

STamp77T 2 Street

2ITC 2 2ityPace of residence

MIP 2 80 Posta code

T7+ 2 8B Teephone numer

191 aintain the fied mapping 4se the automatic fied mapping (via menu item

7tras)

19 Specify the fies 5ny maintain the fie name of the source fie

Name of the fie 21099IFI+7

2odepage 8800

19 Import the data and convert them ispay the data in each caseQ

19 2reate a atch input session

19B ampun the atch input session

copy SAP AG BC420 12-80

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 8188

ercise 3

nit $ransaction -ecorder

$opic -ecording ith the $ -ecorder

bull ltenerate a recording using the TA recorder

bull Test the recording

2hange the address data of detors in the amp system

Name recording $+

Name of the file +2055+F9

8 2reate the recording TA37I3 using the transaction recorder ampecord the

transaction F01 (change detor)

898 4se detor M9980008 for the recording 5n the F01 initia screen ony

maintain the foo$ing fieds

etor etor M9980008

2ompany 2ode 0008

Address data seect

Note $he data record must e saved hen recording

eete a fieds that do not eist in the source fie 21099IFI+7 from screen

880 in the recording (eg 6NA89S5ampT+ 6NA89+AN8 6ANNQ9SPampAS) Note o not deete fieds ampF01946ampS and ampF0190880

Save the recording no$

1 S$itch to the recordings overvie$

198 Process the recording $ith the processing mode A (dispay a)

191 Process the recording $ith the processing mode RN (no dispay)

19 If the recording has een tested and no error has occurred generate a I session

and run it using the I monitor If an error shoud occur generate the recordingagainQ

copy SAP AG BC420 12-81

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 8288

From the recording generate the program M21037I3 in your deveopment cass

2109 Seect the foo$ing

bull ampead fied contents from fie

bull 2reate test data in the fie 2103dei3test3tt

98 Save this program and eecute it ltenerate one I session each and process it

2arry out the same steps again using the ca transaction

The generated program shoud no$ e changed so that fie 21099IFI+7 can e

read and processed

98 2hange the defaut vaue of the fie name (parameter dataset) in 21099

IFI+7

91 2hange the structure definition eete the company code fied and the address

data checo from the structure

9 2hange the su9routine ca perform dc3fied for the company code (KampF019

46ampSK) so that the vaue 0008 is transferred

9 2hange the su9routine ca perform dc3fied for the address data checo

(KampF0190880K) so that the vaue G is transferred

9 Start the program again and read the data from the fie 21099IFI+7 $ith

detor data ltenerate a I session $ith it and run it

copy SAP AG BC420 12-82

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 8388

033 Include DR16INCLUDE BDCRECX1

SELECTION-SCREEN BEGIN OF LINE

PARAMETERS SESSION RADIOBUTTON GROUP CTU create sessi SELECTION-SCREEN COMMENT $amp TEXT-S FOR FIELD SESSION

se(ecti-scree )siti +

PARAMETERS CTU RADIOBUTTON GROUP CTU ca(( trasacti

SELECTION-SCREEN COMMENT $amp TEXT-S FOR FIELD CTU

SELECTION-SCREEN END OF LINE

SELECTION-SCREEN BEGIN OF LINE

SELECTION-SCREEN COMMENT $amp TEXT-S1 FOR FIELD GROUP

se(ecti-scree )siti $+

PARAMETERS GROUP1$amp r) ae 0 sessi

SELECTION-SCREEN COMMENT $amp TEXT-S+ FOR FIELD CTUMODE

se(ecti-scree )siti

PARAMETERS CTUMODE LIE CTU2PARAMS-DISMODE DEFAULT 3N3

A4 s56 a(( 78)rs

E4 s56 78)r errr (8

N4 7 t 7is)(a8 78)r

SELECTION-SCREEN END OF LINE

SELECTION-SCREEN BEGIN OF LINE

SELECTION-SCREEN COMMENT $amp TEXT-S$ FOR FIELD USER

se(ecti-scree )siti $+

PARAMETERS4 USER1$amp DEFAULT S9-UNAME ser 0r sessi i atc5

SELECTION-SCREEN COMMENT $amp TEXT-S FOR FIELD CUPDATE

se(ecti-scree )siti

PARAMETERS CUPDATE LIE CTU2PARAMS-UPDMODE DEFAULT 3L3

S4 s8c5rs(8

A4 as8c5rs(8

L4 (ca(

SELECTION-SCREEN END OF LINE

SELECTION-SCREEN BEGIN OF LINE

SELECTION-SCREEN COMMENT $amp TEXT-S FOR FIELD EEP

se(ecti-scree )siti $+

PARAMETERS4 EEP AS CltECBOX 3 3 = 7e(ete sessi i0 0iis5e7

3X3 = gtee) sessi i0 0iis5e7

SELECTION-SCREEN COMMENT $amp TEXT-S FOR FIELD E2GROUP

copy SAP AG BC420 12-83

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 8488

se(ecti-scree )siti

)araeters E2GROUP1$amp r) ae 0 errr-sessi

SELECTION-SCREEN END OF LINE

SELECTION-SCREEN BEGIN OF LINE

SELECTION-SCREEN COMMENT $amp TEXT-S FOR FIELD ltOLDDATE

se(ecti-scree )siti $+

PARAMETERS4 ltOLDDATE LIE S9-DATUM

SELECTION-SCREEN COMMENT +11amp TEXT-S$ FOR FIELD E2USER

se(ecti-scree )siti

PARAMETERS4 E2USER1$amp DEFAULT S9-UNAME ser 0r errr-sessi

SELECTION-SCREEN END OF LINE

SELECTION-SCREEN BEGIN OF LINE

SELECTION-SCREEN COMMENT +11amp TEXT-S FOR FIELD E2EEP

se(ecti-scree )siti

PARAMETERS4 E2EEP AS CltECBOX 3 3 = 7e(ete sessi i0 0iis5e7

3X3 = gtee) sessi i0 0iis5e7

SELECTION-SCREEN END OF LINE

SELECTION-SCREEN BEGIN OF LINE

SELECTION-SCREEN COMMENT +11amp TEXT-S FOR FIELD E2ltDATE

se(ecti-scree )siti

PARAMETERS4 E2ltDATE LIE S9-DATUM

SELECTION-SCREEN END OF LINE

SELECTION-SCREEN SIP

SELECTION-SCREEN BEGIN OF LINE

SELECTION-SCREEN COMMENT 1amp TEXT-S1 FOR FIELD NODATA

PARAMETERS4 NODATA DEFAULT 33 LOER CASE 7ata

SELECTION-SCREEN END OF LINE

----------------------------------------------------------------------

Batc5i)t7ata 0 si(e trasacti

DATA4 BDCDATA LIE BDCDATA OCCURS ITlt ltEADER LINE

essaes 0 ca(( trasacti

DATA4 MESSTAB LIE BDCMSGCOLL OCCURS ITlt ltEADER LINE

errr sessi )ee7 3 3 r 3X3amp

DATA4 E2GROUP2OPENED

essae tets

TABLES4 T1

copy SAP AG BC420 12-84

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 8588

----------------------------------------------------------------------

at se(ecti scree

----------------------------------------------------------------------

AT SELECTION-SCREEN

r) a7 ser st e 0i((e7 0r create sessi

IF SESSION = 3X3 AND

GROUP = SPACE OR USER = SPACE

MESSAGE E1MSamp

ENDIF

----------------------------------------------------------------------

)e 7ataset

----------------------------------------------------------------------

FORM OPEN2DATASET USING P2DATASET

OPEN DATASET P2DATASET IN TEXT MODE

IF S9-SUBRC

RITE4 TEXT-E S9-SUBRC

STOP

ENDIF

ENDFORM

----------------------------------------------------------------------

c(se 7ataset

----------------------------------------------------------------------

FORM CLOSE2DATASET USING P2DATASET

CLOSE DATASET P2DATASET

ENDFORM

----------------------------------------------------------------------

create atc5i)t sessi

t 0r ca(( trasacti siamp

----------------------------------------------------------------------

FORM OPEN2GROUP

IF SESSION = 3X3

SIP

RITE4 $amp 3Create r)3I1amp GROUP

SIP

)e atc5i)t r)

CALL FUNCTION 3BDC2OPEN2GROUP3

EXPORTING CLIENT = S9-MANDT

copy SAP AG BC420 12-85

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 8688

GROUP = GROUP

USER = USER

EEP = EEP

ltOLDDATE = ltOLDDATE

RITE4 amp 3BDC2OPEN2GROUP3I$amp

1$amp 3retrc7e43I+amp

S9-SUBRC

ENDIF

ENDFORM

----------------------------------------------------------------------

e7 atc5i)t sessi

ca(( trasacti si4 errr sessiamp

----------------------------------------------------------------------

FORM CLOSE2GROUP

IF SESSION = 3X3

c(se atc5i)t r)

CALL FUNCTION 3BDC2CLOSE2GROUP3

RITE4 amp 3BDC2CLOSE2GROUP3Iamp

1$amp 3retrc7e43I+amp

S9-SUBRC

ELSE

IF E2GROUP2OPENED = 3X3

CALL FUNCTION 3BDC2CLOSE2GROUP3

RITE4

RITE4 amp 3Fe5(era))e 6r7e eret3Iamp

ENDIF

ENDIF

ENDFORM

----------------------------------------------------------------------

Start e6 trasacti accr7i t )araeters

----------------------------------------------------------------------

FORM BDC2TRANSACTION USING TCODE

DATA4 L2MSTRINGamp

DATA4 L2SUBRC LIE S9-SUBRC

atc5 i)t sessi

IF SESSION = 3X3

CALL FUNCTION 3BDC2INSERT3

EXPORTING TCODE = TCODE

TABLES D9NPROTAB = BDCDATA

RITE4 3BDC2INSERT3Iamp

copy SAP AG BC420 12-86

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 8788

TCODE

3retrc7e43I+amp

S9-SUBRC

3RECORD43

S9-INDEX

ca(( trasacti si

ELSE

REFRESlt MESSTAB

CALL TRANSACTION TCODE USING BDCDATA

MODE CTUMODE

UPDATE CUPDATE

MESSAGES INTO MESSTAB

L2SUBRC = S9-SUBRC

RITE4 3CALL2TRANSACTION3

TCODE

3retrc7e43I+amp

L2SUBRC

3RECORD43

S9-INDEX

LOOP AT MESSTAB

SELECT SINGLE FROM T1 ltERE SPRSL = MESSTAB-MSGSPRA

AND ARBGB = MESSTAB-MSGID

AND MSGNR = MESSTAB-MSGNR

IF S9-SUBRC =

L2MSTRING = T1-TEXT

IF L2MSTRING CS 313

REPLACE 313 ITlt MESSTAB-MSGH1 INTO L2MSTRING

REPLACE 3$3 ITlt MESSTAB-MSGH$ INTO L2MSTRING

REPLACE 33 ITlt MESSTAB-MSGH INTO L2MSTRING

REPLACE 33 ITlt MESSTAB-MSGH INTO L2MSTRING

ELSE

REPLACE 33 ITlt MESSTAB-MSGH1 INTO L2MSTRING

REPLACE 33 ITlt MESSTAB-MSGH$ INTO L2MSTRING

REPLACE 33 ITlt MESSTAB-MSGH INTO L2MSTRING

REPLACE 33 ITlt MESSTAB-MSGH INTO L2MSTRING

ENDIF

CONDENSE L2MSTRING

RITE4 MESSTAB-MSGT9P L2MSTRING$+amp

ELSE

RITE4 MESSTAB

ENDIF

ENDLOOP

copy SAP AG BC420 12-87

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 8888

SIP

Eree 0e5(era))e

IF L2SUBRC AND E2GROUP SPACE

IF E2GROUP2OPENED = 3 3

CALL FUNCTION 3BDC2OPEN2GROUP3

EXPORTING CLIENT = S9-MANDT

GROUP = E2GROUP

USER = E2USER

EEP = E2EEP

ltOLDDATE = E2ltDATE

E2GROUP2OPENED = 3X3

ENDIF

CALL FUNCTION 3BDC2INSERT3

EXPORTING TCODE = TCODE

TABLES D9NPROTAB = BDCDATA

ENDIF

ENDIF

REFRESlt BDCDATA

ENDFORM

----------------------------------------------------------------------

Start e6 scree

----------------------------------------------------------------------

FORM BDC2D9NPRO USING PROGRAM D9NPRO

CLEAR BDCDATA

BDCDATA-PROGRAM = PROGRAM

BDCDATA-D9NPRO = D9NPRO

BDCDATA-D9NBEGIN = 3X3

APPEND BDCDATA

ENDFORM

----------------------------------------------------------------------

Isert 0ie(7

Page 58: BC420_46C - 012The Transaction Recorder

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 5888

025

983209 SAP AG 1999

9unction Module DltLS1ltBRUP

ALL 9UTI DltLS1ltBRUP

11PTIS

TltP1 6

NU1U1lt1RRR amp

-ith the function modue 232+5S73ltamp54P you can cose a atch input session

In 7G27PTI5NS you get various return vaues that can e ueried $ith SC9S4amp2

copy SAP AG BC420 12-58

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 5988

027

983209 SAP AG 1999

Subprogram LS1ltBRUP

FOR( cloe8rou-IF e9on -cloe batcgt 9nut 8rou

2A FUN2TION BD22OSEGROU)-

ESE-IF e8rouoened -

2A FUN2TION BD22OSEGROU)-

ENDIF-ENDIF-

ENDFOR(-

LS1ltBRUPlose session

lose error session

Include

DR16

The suprogram 2+5S73ltamp54P coses the atch input session The suprogram differentiates

et$een a norma I session (S7SSI5N E G) and a session opened $hen ca transaction

encountered an error (73ltamp54P35P7N7 E G)

copy SAP AG BC420 12-59

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 6088

080

983209 SAP AG 1999

Subprograms DltDPRG Dlt9I1LD

DltDPR

Dlt9I1LD

FOR( bdc9eld USING nam al-IF al 34 nodata-2EAR bdcdata- bdcdata1nam nam- bdcdata1al al- A))END bdcdata-ENDIF-

ENDFOR(-

FOR( bdcdltnro USING ro8ram dltnro- 2EAR bdcdata-Bdcdata1ro8ram ro8ram-Bdcdata1dltnro dltnro-Bdcdata1dltnbe89n - A))END bdcdata-ENDFOR(-

Include

DR16

The incude 2amp72GG contains t$o suprograms 23CNPamp5 and 23FI7+

Suprogram 23CNPamp5 fis the 2 tae $ith program names and screen numers

Suprogram 23FI7+ fis the 2 tae $ith fied names and vaues

7ach suprogram creates an entry in the 2 tae

copy SAP AG BC420 12-60

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 6188

086

983209 SAP AG 1999

9illing the D Table

erorm bdcdltnro u9n8 SA)(FD +- erorm bdc9eld u9n8 BD22URSOR RFD1BUKRS- erorm bdc9eld u9n8 BD2OK2ODE 6- erorm bdc9eld u9n8 RFD1BUKRS record1BUKRS- erorm bdc9eld u9n8 RFD1KTOKD record1KTOKD-

erorm bdcdltnro u9n8 SA)(FD -

erorm bdc9eld u9n8 BD22URSOR KNA1S)RAS- erorm bdc9eld u9n8 BD2OK2ODE 6- erorm bdc9eld u9n8 KNA1NA(E record1NA(E-

erorm bdc9eld u9n8 KNA1SORT record1SORT-

Recording Benerated automaticall(

from the recording

)ERFOR( bdcdltnro USING SA)(FD +- )ERFOR( bdc9eld USING BD22URSOR RFD1BUKRS-)ERFOR( bdc9eld USING BD2OK2ODE 6-)ERFOR( bdc9eld USING RFD1BUKRS record1BUKRS-)ERFOR( bdc9eld USING RFD1KTOKD record1KTOKD-

)ERFOR( bdcdltnro USING SA)(FD -

)ERFOR( bdc9eld USING BD22URSOR KNA1S)RAS-)ERFOR( bdc9eld USING BD2OK2ODE 6-)ERFOR( bdc9eld USING KNA1NA(E record1NA(E-

)ERFOR( bdc9eld USING KNA1SORT record1SORT- ---

The 2 tae is fied $ith data from the recording The suroutines 23CNPamp5 and

23FI7+ are used for this

The suroutines are caed in the reuired structure or seuence

copy SAP AG BC420 12-61

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 6288

08amp

983209 SAP AG 1999

erie)

SAPDatabase

SeJuential9ile

SAPDatabase

ALL TRASATIALL TRASATI

SeJuential9ile

ATE IPUTATE IPUT

D TableD TableD TableD Table

I Monitor

T

In contrast to atch input you can use ca transaction to directy pass data to the diaog interface

$ithout using a atch input session Cou use an interna tae (2 tae same structure and ayout

as atch input) to temporariy store your screen data Then you ca the desired transaction in your

program

Note 5n average the 2a Transaction method is 8 to times faster than using atch Input

copy SAP AG BC420 12-62

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 6388

08

983209 SAP AG 1999

all Transaction Program$ 1ample

RE)ORT abcbdcdcdeb9ct-

)ARA(ETERS d9mode DEFAUT A

udmode DEFAUT S-FOR( calltranact9on-2A TRANSA2TION FD

USING bdcdata (ODE d9mode

U)DATE udmode-

IF lt1ubrc NE - 5RITE 6 ---

ENDIF-ENDFOR(-

Screen

00

Screen

100

Screen

An additiona system ro area is added for the caed transaction The system uses this area for

processing the individua screens in the transactionH the data from the tae is added here After the

transaction is processed the second ro area is reeasedH the system continues processing in the first

ro area

Notes

In contrast to atch input there is no error ogging (error sessions) here For processing the caed

transaction the system uses the authoriDations of the user that caed the transaction The 2 tae

can ony hod data for one transaction run at a time efore another transaction is caed and its data

can e added you must eecute a amp7Famp7S= for the 2 tae

copy SAP AG BC420 12-63

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 6488

084

983209 SAP AG 1999

ALL TRASATI C6

RE)ORT 777-

2A TRANSA2TION FD USING bdcdata (ODE E-

Default for MD1 is A

2A TRANSA2TION 3tranact9oncode4 USING 3bdc1table4 C (ODE A E N C-

-ith the parameter 57 you can seect a specific dispay mode for processing the transaction The

foo$ing three modes are avaiae

A (ispay a)

If you eecute the program a the screens and a their data are dispayed This is the defaut vaue

for the 57 in 2A++ TampANSA2TI5N

N (ispay nothing)

The screens are not dispayed at a regardess of $hether any of them contained errors As soon as

the transaction has een fuy processed contro is returned to your program (The vaue of the

parameter 4PAT7 determines $hether dataase updates are eecuted or not)

7 (ispay errors ony)As soon as an error occurs in a screen the transaction is s$itched to dispay mode so that you can

correct the errors

These dispay modes are the same as those in the atch input session processing

copy SAP AG BC420 12-64

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 6588

082

983209 SAP AG 1999

RE)ORT 777-

2A TRANSA2TION FD USING BD2DATA U)DATE -

ALL TRASATI Camp

RE)ORT 777-

2A TRANSA2TION FD USING bdcdata U)DATE -

2A TRANSA2TION 3tranact9oncode4 USING 3bdc1table4 C (ODE A E N C U)DATE A S C -

Default for UPDAT1 is A

-ith the parameter 4PAT7 you can contro ho$ dataase updates arising from a transaction are

carried out There are three options

A (asynchronous updating) The caed transaction does not $ait unti the dataase has een

updated it simpy for$ard the updates to the SAP update service This usuay speeds up the 2T

program This processing mode is N5T recommended for arge data sets as the caed transaction

does not receive a competion message from the update modue

The caing 2T program therefore cannot te if the transaction has een successfuy competed Cou

shoud use the updating administration function (transaction S8) to determine $hether updating

$as terminated eary The error anaysis correction functions for are ess hepfu than $ith

synchronous updating

S (synchronous updating) -ith synchronous updating the caed transaction $aits unti a the

updates have een competed So processing is so$er than $ith synchronous updating The caed

transaction can ho$ever report any updating errors to the program $hich maes error

anaysiscorrection easier

+ (local updating) $ith oca updating the dataase is not updated in a separate process it is

updated in the caers process (see appication hep documentation for the AAP ey$ord S7T

4PAT7 TAS6 +52A+)

copy SAP AG BC420 12-65

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 6688

088

983209 SAP AG 1999

ALL TRASATI C

RE)ORT 777-DATA mtab T0)E TABE OF bdcm8coll-

2A TRANSA2TION FD USING bdcdata (ESSAGES INTO mtab-

2A TRANSA2TION 3tranact9oncode4 USING 3bdc1table4 C (ODE A E N C U)DATE A S C (ESSAGES INTO 3metab4 C -

7SSAlt7S specifies that a system messages that are output during the eecution of a 2A++

TampANSA2TI5N are $ritten to the interna tae L7SSTA The interna tae must have the

structure 2Slt25++

4nie the cassica atch input processing $ith sessions 2A++ TampANSA2TI5N does not offer any

specia processing procedures for transactions containing errors There are no restart functions for

transactions that contain errors or that cause updating terminations

copy SAP AG BC420 12-66

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 6788

083

983209 SAP AG 1999

ALL TRASATI C4

RE)ORT 777-DATA mltot T0)E ctuaram-

2A TRANSA2TION FD USING BD2DATA

O)TIONS FRO( mltot-

2A TRANSA2TION 3tranact9oncode4 USING 3bdc1table4 C (ODE A E N C U)DATE A S C (ESSAGES INTO 3metab4 C O)TIONS FRO( ot C -

RE)ORT 777-DATA mltot T0)E ctuaram-2A TRANSA2TION FD USING bdcdata

O)TIONS FRO( mltot-

The addition 5PTI5NS enaes the ca transaction statement to e controed through a structure

The structure must have the dictionary type 2T43PAampAS

The addition 5PTI5NS Famp5 must not e comined either $ith the addition 57 or $ith

4PAT7 ore information on the net side

copy SAP AG BC420 12-67

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 6888

085

983209 SAP AG 1999

Structure TUltPARAMS

DISMD1 Procen mode anaoo o addon amp

UPDMD1 $pdae mode anaoo o addon $PA

ATTMD1 CA mode CA conro

D19SI1 orce de=a EndoE e drn procen

RAMMIT +o eD a Camp amp(

IPT +o a ac np eonF a F S-B+P SPAC

I1D +o a ac np eon a=er end o= BC daa

The components are defined as foo$s

The components 7FSIM7 ampA25IT N5INPT and N5I7N can have the foo$ing

vaues KGK E Ces or K K E No

If the addition 5PTI5NS Famp5 is not specified the foo$ing settings appy to the contro

parameters

IS57 from addition 57

4P57 from addition 4PAT7

2ATT57 2ATT not active

7FSIM7 o not not use defaut $indo$s siDe

ampA25IT Successfu eit at 25IT -5amp6

N5INPT atch input session active (SC9INPT E G)

N5I7N atch input session sti active after end of 2 data

copy SAP AG BC420 12-68

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 6988

087

983209 SAP AG 1999

SMSBID Message ID

SMSBT Message T(pe C1GIGWGSGA

SMSB Message umber

SMSB6 Message ariable 6

SMSBamp Message ariable amp

SMSB Message ariable

SMSB4 Message ariable 4

SMSBID Message ID

SMSBT Message T(pe C1GIGWGSGA

SMSB Message umber

SMSB6 Message ariable 6

SMSBamp Message ariable amp

SMSB Message ariable

SMSB4 Message ariable 4

Return code$

S(stem fields$

alue Meaning

0 Successful

6000 1rror in transaction

6000 1rror in processing call transaction

see also the s(stem fields specified

alue Meaning

0 Successful

6000 1rror in transaction

6000 1rror in processing call transaction

see also the s(stem fields specified

9ield name Meaning9ield name9ield name MeaningMeaning

Return ode and S(stem 9ields

The return code is used to specify $hether the caed transaction $as processed successfuy In

addition severa system fieds are fied The numer I type and variaes of the diaog message

output y the caed transaction Cou need this information to output the message tet

copy SAP AG BC420 12-69

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 7088

030

983209 SAP AG 1999

Benerated Program of the TA Recorder

REFRES= (ESSTAB-

2A TRANSA2TION tcode USING bdcdata (ODE ctumode U)DATE cudate (ESSAGES INTO metab-OO) AT metab- ENDOO)-IF lubrc 34 AND e8rou 34 S)A2E- IF e8rouoenend - 2A FUN2TION BD2O)ENGROU) E)ORTING ---------

--------- E8rouoened - ENDIF- 2A FUN2TION BD2INSERT E)ORTING T2ODE tcode TABES D0N)ROTAB bdcdata-ENDIF-REFRES= bdcdata-

Message table output

pen error session

Insert data record that

has errors into error

session

If you have seected ca transaction on the seection screen the generated program runs as foo$s

The onine transaction is caed $ith ca transaction and passed to tae 2ATA A the

messages arising during the ca transaction are put in the interna tae 7SSTA

7SSTA is output as a ist

If you have specified an error session ( 73ltamp54P L SPA27) on the seection screen and the

ca transaction comes across an error (+3S4amp2 L 0) the error session is opened The error

session is ho$ever ony opened once Then the data record is paced in the session

A the other data records that have errors $ith ca transaction are paced in the same session

copy SAP AG BC420 12-70

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 7188

036

983209 SAP AG 1999

The Transaction Recorder

PrinciplesPrinciples

Recording )ith the LSMWRecording )ith the LSMW

Principles of atch Input and all TransactionPrinciples of atch Input and all Transaction

Integrating the TA Program into the DWIntegrating the TA Program into the DW

Using the TA Recorder Using the TA Recorder

copy SAP AG BC420 12-71

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 7288

03amp

983209 SAP AG 1999

Integrating into the DW

Transfer program

AAP Dictionar(

Integrate

SDA0

SDA6

SDAamp

SDA

Cou can integrate the generated program into the G9- The structure of the fie must e created

in the AAP ictionary The taes SGA0 SGA8 SGA1 and SGA $i e fied

copy SAP AG BC420 12-72

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 7388

03

983209 SAP AG 1999

DW Release 42

Goo

-B eeae 45

aa ran=er ogtec

Int customer data transfer ob-ect

ecord =ed

Dece daa ran=er

d Goo

The ampunction ampor interatin TA recorder prora$s is

i$ple$ented in the

D+-B in Release

The recorder can e integrated as of ampeease and it is provided in the G9- ampeease

ltot to the G9- ampeease 5n the initia screen you can integrate programs y choosing ampoto

( +nt customer ata transfer o-ect

copy SAP AG BC420 12-73

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 7488

034

983209 SAP AG 1999

reating Program as D b-ect

Comer ran=er ogtec

ampgtec ype

Sor eD =or ogtec

aa ran=er proram

Srcre name

9900

(+A1

Cane comer

ZBCA+G

ZB

ustomer transfer ob-ect

umber bet)een 7000 and 7777

b-ect t(pe

Assignment to R ob-ect

Short tet for D ob-ectShort description

Data transfer program

ame of generated program

Structure name

A structure Cstructure la(out )ith this name is created in

the AAP Dictionar(

For ampeease transfer oects $ere not organiDed y 5amp oects ut y a G numer (00089

OOOO) The numer range O0009OOOO is reserved for customers

To create a connection to the ne$ G 9- you must assign the program to a 5amp oect

2reate a short tet for the G oect This tet $i appear in the method seection ist

Specify the program to e incuded

Specify a name for the structure to e created in the AAP ictionary

Note $he generated program appears under program type +N and not under program type

-

copy SAP AG BC420 12-74

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 7588

032

983209 SAP AG 1999

Adantages

Automatic program registration in the DW in

Release 48

ou can use all the functions defined for

standard ob-ects

1ception$ The (reate ampile ith data

function

If you incuded the oect in the ampeease $orench it is automaticay avaiae in the ampeease

B $orench

A the $orench functions are avaiae for your oect ecept for Create files ith transfer ata

copy SAP AG BC420 12-75

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 7688

038

983209 SAP AG 1999

ou are no) able to$

The Transaction Recorder$ Unit Summar(

Use the recording function in the LSMW to create

a batch input session )ith the data from the

eternal s(stem

Use the TA Recorder to create (our o)n data

transfer program

Anal(e programs that )or+ )ith batch input or

call transaction

Integrate the TA Recorder programs into the

DW

copy SAP AG BC420 12-76

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 7788

ercise 1

nit $ -ecorder

$opic 2reating etors

$ransaction -ecorder ercise 1

bull 2reating detors $ith eterna numer assignment

bull etor numers M9980008 to M9980080

Address data for detors $ith eterna numer assignment is to

e transferred using program ampFI700

ro4ect F5

Supro4ect +5

-un +575

$as)s 85 95 8S25

9oad program -F+00

8 In the foo$ing eercises eisting data is to e changed Therefore these detors $ith

eterna numer assignment have to first e created

898 4nder suproect 79 create run 797G9 $ith the name Detors ith

eternal numers

copy SAP AG BC420 12-77

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 7888

891 2reate the foo$ing three tass The tass map the foo$ing process steps

convert data create + session and process + session

89198 In run 797G9 create the foo$ing tas

9 Tas AP9

9 Name 2onvert data 9 Tas type AP

9 Program type +S-

Seect the foo$ing +S- oect

+S- proect 2109

+S- suproect 7I9

+S- oect I997GT

89191 In run 797G9 create the foo$ing tas 9 Tas +5A9

9 Name 2reate I session

Tas type +5A

9 Program type INP

Seect program ampFI700 $ith the variant

I97G9

8919 In run 797G9 create the foo$ing tas

9 Tas S29

9 Name Process I session Tas type S2

9 Program type amp7P5

Seect program ampS2S4 $ith the variant

S497G9

Note that you have to correct the seuence of the tass 2onvert data

create + session and process + session

4se the uttons

89 Start the run

The detors $i e created $ith eterna numer assignments

89 2hec in transaction F0 that the detors M9980008 to M9980080 have een

created

copy SAP AG BC420 12-78

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 7988

ercise

nit $ransaction -ecorder

$opic -ecording function in the 9S8(

bull 2reate a recording using the +S-

bull ltenerate a atch input session

2hange the detor address data in the amp System

Name of the recording +

Name of the file +2055+F9

8 2reate the recording 7I3 using the +S- ampecord the transaction F01 (2hange

detor)

898 efore you create the recording first test the transaction onineQ

For the recording use detor M9980008 5n the initia screen of the F01

maintain the foo$ing fieds ony

etor etor M9980008

2ompany code 0008

Address data seect

Note $he data record must e saved hile recording

891 aintain the names and the descriptions for the foo$ing fieds

Name city street posta code and teephone numereete a other fieds in screen 880 from the recording (eg S5ampT+ +AN8

SPampAS)

4se the same technica names as sho$n in the tae eo$ (automatic fied

mapping)

copy SAP AG BC420 12-79

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 8088

1 2reate the suproect 7I9 and the ne$ oect TA3 in your proect 2109

aintain the oect attriutes and seect the item atch input recording Seect your

recording 7I3

2reate the source structure address

2reate the source fieds according to the tae eo$ 5r copy them from proect 2109S37N suproect 7I900 oect TA900

198 Fie setup The data from the egacy system are dispayed in the foo$ing tae

Fied name Fied type Fied ength escription

N5 2 8B etor numer

NA7 2 Name

STamp77T 2 Street

2ITC 2 2ityPace of residence

MIP 2 80 Posta code

T7+ 2 8B Teephone numer

191 aintain the fied mapping 4se the automatic fied mapping (via menu item

7tras)

19 Specify the fies 5ny maintain the fie name of the source fie

Name of the fie 21099IFI+7

2odepage 8800

19 Import the data and convert them ispay the data in each caseQ

19 2reate a atch input session

19B ampun the atch input session

copy SAP AG BC420 12-80

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 8188

ercise 3

nit $ransaction -ecorder

$opic -ecording ith the $ -ecorder

bull ltenerate a recording using the TA recorder

bull Test the recording

2hange the address data of detors in the amp system

Name recording $+

Name of the file +2055+F9

8 2reate the recording TA37I3 using the transaction recorder ampecord the

transaction F01 (change detor)

898 4se detor M9980008 for the recording 5n the F01 initia screen ony

maintain the foo$ing fieds

etor etor M9980008

2ompany 2ode 0008

Address data seect

Note $he data record must e saved hen recording

eete a fieds that do not eist in the source fie 21099IFI+7 from screen

880 in the recording (eg 6NA89S5ampT+ 6NA89+AN8 6ANNQ9SPampAS) Note o not deete fieds ampF01946ampS and ampF0190880

Save the recording no$

1 S$itch to the recordings overvie$

198 Process the recording $ith the processing mode A (dispay a)

191 Process the recording $ith the processing mode RN (no dispay)

19 If the recording has een tested and no error has occurred generate a I session

and run it using the I monitor If an error shoud occur generate the recordingagainQ

copy SAP AG BC420 12-81

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 8288

From the recording generate the program M21037I3 in your deveopment cass

2109 Seect the foo$ing

bull ampead fied contents from fie

bull 2reate test data in the fie 2103dei3test3tt

98 Save this program and eecute it ltenerate one I session each and process it

2arry out the same steps again using the ca transaction

The generated program shoud no$ e changed so that fie 21099IFI+7 can e

read and processed

98 2hange the defaut vaue of the fie name (parameter dataset) in 21099

IFI+7

91 2hange the structure definition eete the company code fied and the address

data checo from the structure

9 2hange the su9routine ca perform dc3fied for the company code (KampF019

46ampSK) so that the vaue 0008 is transferred

9 2hange the su9routine ca perform dc3fied for the address data checo

(KampF0190880K) so that the vaue G is transferred

9 Start the program again and read the data from the fie 21099IFI+7 $ith

detor data ltenerate a I session $ith it and run it

copy SAP AG BC420 12-82

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 8388

033 Include DR16INCLUDE BDCRECX1

SELECTION-SCREEN BEGIN OF LINE

PARAMETERS SESSION RADIOBUTTON GROUP CTU create sessi SELECTION-SCREEN COMMENT $amp TEXT-S FOR FIELD SESSION

se(ecti-scree )siti +

PARAMETERS CTU RADIOBUTTON GROUP CTU ca(( trasacti

SELECTION-SCREEN COMMENT $amp TEXT-S FOR FIELD CTU

SELECTION-SCREEN END OF LINE

SELECTION-SCREEN BEGIN OF LINE

SELECTION-SCREEN COMMENT $amp TEXT-S1 FOR FIELD GROUP

se(ecti-scree )siti $+

PARAMETERS GROUP1$amp r) ae 0 sessi

SELECTION-SCREEN COMMENT $amp TEXT-S+ FOR FIELD CTUMODE

se(ecti-scree )siti

PARAMETERS CTUMODE LIE CTU2PARAMS-DISMODE DEFAULT 3N3

A4 s56 a(( 78)rs

E4 s56 78)r errr (8

N4 7 t 7is)(a8 78)r

SELECTION-SCREEN END OF LINE

SELECTION-SCREEN BEGIN OF LINE

SELECTION-SCREEN COMMENT $amp TEXT-S$ FOR FIELD USER

se(ecti-scree )siti $+

PARAMETERS4 USER1$amp DEFAULT S9-UNAME ser 0r sessi i atc5

SELECTION-SCREEN COMMENT $amp TEXT-S FOR FIELD CUPDATE

se(ecti-scree )siti

PARAMETERS CUPDATE LIE CTU2PARAMS-UPDMODE DEFAULT 3L3

S4 s8c5rs(8

A4 as8c5rs(8

L4 (ca(

SELECTION-SCREEN END OF LINE

SELECTION-SCREEN BEGIN OF LINE

SELECTION-SCREEN COMMENT $amp TEXT-S FOR FIELD EEP

se(ecti-scree )siti $+

PARAMETERS4 EEP AS CltECBOX 3 3 = 7e(ete sessi i0 0iis5e7

3X3 = gtee) sessi i0 0iis5e7

SELECTION-SCREEN COMMENT $amp TEXT-S FOR FIELD E2GROUP

copy SAP AG BC420 12-83

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 8488

se(ecti-scree )siti

)araeters E2GROUP1$amp r) ae 0 errr-sessi

SELECTION-SCREEN END OF LINE

SELECTION-SCREEN BEGIN OF LINE

SELECTION-SCREEN COMMENT $amp TEXT-S FOR FIELD ltOLDDATE

se(ecti-scree )siti $+

PARAMETERS4 ltOLDDATE LIE S9-DATUM

SELECTION-SCREEN COMMENT +11amp TEXT-S$ FOR FIELD E2USER

se(ecti-scree )siti

PARAMETERS4 E2USER1$amp DEFAULT S9-UNAME ser 0r errr-sessi

SELECTION-SCREEN END OF LINE

SELECTION-SCREEN BEGIN OF LINE

SELECTION-SCREEN COMMENT +11amp TEXT-S FOR FIELD E2EEP

se(ecti-scree )siti

PARAMETERS4 E2EEP AS CltECBOX 3 3 = 7e(ete sessi i0 0iis5e7

3X3 = gtee) sessi i0 0iis5e7

SELECTION-SCREEN END OF LINE

SELECTION-SCREEN BEGIN OF LINE

SELECTION-SCREEN COMMENT +11amp TEXT-S FOR FIELD E2ltDATE

se(ecti-scree )siti

PARAMETERS4 E2ltDATE LIE S9-DATUM

SELECTION-SCREEN END OF LINE

SELECTION-SCREEN SIP

SELECTION-SCREEN BEGIN OF LINE

SELECTION-SCREEN COMMENT 1amp TEXT-S1 FOR FIELD NODATA

PARAMETERS4 NODATA DEFAULT 33 LOER CASE 7ata

SELECTION-SCREEN END OF LINE

----------------------------------------------------------------------

Batc5i)t7ata 0 si(e trasacti

DATA4 BDCDATA LIE BDCDATA OCCURS ITlt ltEADER LINE

essaes 0 ca(( trasacti

DATA4 MESSTAB LIE BDCMSGCOLL OCCURS ITlt ltEADER LINE

errr sessi )ee7 3 3 r 3X3amp

DATA4 E2GROUP2OPENED

essae tets

TABLES4 T1

copy SAP AG BC420 12-84

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 8588

----------------------------------------------------------------------

at se(ecti scree

----------------------------------------------------------------------

AT SELECTION-SCREEN

r) a7 ser st e 0i((e7 0r create sessi

IF SESSION = 3X3 AND

GROUP = SPACE OR USER = SPACE

MESSAGE E1MSamp

ENDIF

----------------------------------------------------------------------

)e 7ataset

----------------------------------------------------------------------

FORM OPEN2DATASET USING P2DATASET

OPEN DATASET P2DATASET IN TEXT MODE

IF S9-SUBRC

RITE4 TEXT-E S9-SUBRC

STOP

ENDIF

ENDFORM

----------------------------------------------------------------------

c(se 7ataset

----------------------------------------------------------------------

FORM CLOSE2DATASET USING P2DATASET

CLOSE DATASET P2DATASET

ENDFORM

----------------------------------------------------------------------

create atc5i)t sessi

t 0r ca(( trasacti siamp

----------------------------------------------------------------------

FORM OPEN2GROUP

IF SESSION = 3X3

SIP

RITE4 $amp 3Create r)3I1amp GROUP

SIP

)e atc5i)t r)

CALL FUNCTION 3BDC2OPEN2GROUP3

EXPORTING CLIENT = S9-MANDT

copy SAP AG BC420 12-85

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 8688

GROUP = GROUP

USER = USER

EEP = EEP

ltOLDDATE = ltOLDDATE

RITE4 amp 3BDC2OPEN2GROUP3I$amp

1$amp 3retrc7e43I+amp

S9-SUBRC

ENDIF

ENDFORM

----------------------------------------------------------------------

e7 atc5i)t sessi

ca(( trasacti si4 errr sessiamp

----------------------------------------------------------------------

FORM CLOSE2GROUP

IF SESSION = 3X3

c(se atc5i)t r)

CALL FUNCTION 3BDC2CLOSE2GROUP3

RITE4 amp 3BDC2CLOSE2GROUP3Iamp

1$amp 3retrc7e43I+amp

S9-SUBRC

ELSE

IF E2GROUP2OPENED = 3X3

CALL FUNCTION 3BDC2CLOSE2GROUP3

RITE4

RITE4 amp 3Fe5(era))e 6r7e eret3Iamp

ENDIF

ENDIF

ENDFORM

----------------------------------------------------------------------

Start e6 trasacti accr7i t )araeters

----------------------------------------------------------------------

FORM BDC2TRANSACTION USING TCODE

DATA4 L2MSTRINGamp

DATA4 L2SUBRC LIE S9-SUBRC

atc5 i)t sessi

IF SESSION = 3X3

CALL FUNCTION 3BDC2INSERT3

EXPORTING TCODE = TCODE

TABLES D9NPROTAB = BDCDATA

RITE4 3BDC2INSERT3Iamp

copy SAP AG BC420 12-86

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 8788

TCODE

3retrc7e43I+amp

S9-SUBRC

3RECORD43

S9-INDEX

ca(( trasacti si

ELSE

REFRESlt MESSTAB

CALL TRANSACTION TCODE USING BDCDATA

MODE CTUMODE

UPDATE CUPDATE

MESSAGES INTO MESSTAB

L2SUBRC = S9-SUBRC

RITE4 3CALL2TRANSACTION3

TCODE

3retrc7e43I+amp

L2SUBRC

3RECORD43

S9-INDEX

LOOP AT MESSTAB

SELECT SINGLE FROM T1 ltERE SPRSL = MESSTAB-MSGSPRA

AND ARBGB = MESSTAB-MSGID

AND MSGNR = MESSTAB-MSGNR

IF S9-SUBRC =

L2MSTRING = T1-TEXT

IF L2MSTRING CS 313

REPLACE 313 ITlt MESSTAB-MSGH1 INTO L2MSTRING

REPLACE 3$3 ITlt MESSTAB-MSGH$ INTO L2MSTRING

REPLACE 33 ITlt MESSTAB-MSGH INTO L2MSTRING

REPLACE 33 ITlt MESSTAB-MSGH INTO L2MSTRING

ELSE

REPLACE 33 ITlt MESSTAB-MSGH1 INTO L2MSTRING

REPLACE 33 ITlt MESSTAB-MSGH$ INTO L2MSTRING

REPLACE 33 ITlt MESSTAB-MSGH INTO L2MSTRING

REPLACE 33 ITlt MESSTAB-MSGH INTO L2MSTRING

ENDIF

CONDENSE L2MSTRING

RITE4 MESSTAB-MSGT9P L2MSTRING$+amp

ELSE

RITE4 MESSTAB

ENDIF

ENDLOOP

copy SAP AG BC420 12-87

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 8888

SIP

Eree 0e5(era))e

IF L2SUBRC AND E2GROUP SPACE

IF E2GROUP2OPENED = 3 3

CALL FUNCTION 3BDC2OPEN2GROUP3

EXPORTING CLIENT = S9-MANDT

GROUP = E2GROUP

USER = E2USER

EEP = E2EEP

ltOLDDATE = E2ltDATE

E2GROUP2OPENED = 3X3

ENDIF

CALL FUNCTION 3BDC2INSERT3

EXPORTING TCODE = TCODE

TABLES D9NPROTAB = BDCDATA

ENDIF

ENDIF

REFRESlt BDCDATA

ENDFORM

----------------------------------------------------------------------

Start e6 scree

----------------------------------------------------------------------

FORM BDC2D9NPRO USING PROGRAM D9NPRO

CLEAR BDCDATA

BDCDATA-PROGRAM = PROGRAM

BDCDATA-D9NPRO = D9NPRO

BDCDATA-D9NBEGIN = 3X3

APPEND BDCDATA

ENDFORM

----------------------------------------------------------------------

Isert 0ie(7

Page 59: BC420_46C - 012The Transaction Recorder

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 5988

027

983209 SAP AG 1999

Subprogram LS1ltBRUP

FOR( cloe8rou-IF e9on -cloe batcgt 9nut 8rou

2A FUN2TION BD22OSEGROU)-

ESE-IF e8rouoened -

2A FUN2TION BD22OSEGROU)-

ENDIF-ENDIF-

ENDFOR(-

LS1ltBRUPlose session

lose error session

Include

DR16

The suprogram 2+5S73ltamp54P coses the atch input session The suprogram differentiates

et$een a norma I session (S7SSI5N E G) and a session opened $hen ca transaction

encountered an error (73ltamp54P35P7N7 E G)

copy SAP AG BC420 12-59

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 6088

080

983209 SAP AG 1999

Subprograms DltDPRG Dlt9I1LD

DltDPR

Dlt9I1LD

FOR( bdc9eld USING nam al-IF al 34 nodata-2EAR bdcdata- bdcdata1nam nam- bdcdata1al al- A))END bdcdata-ENDIF-

ENDFOR(-

FOR( bdcdltnro USING ro8ram dltnro- 2EAR bdcdata-Bdcdata1ro8ram ro8ram-Bdcdata1dltnro dltnro-Bdcdata1dltnbe89n - A))END bdcdata-ENDFOR(-

Include

DR16

The incude 2amp72GG contains t$o suprograms 23CNPamp5 and 23FI7+

Suprogram 23CNPamp5 fis the 2 tae $ith program names and screen numers

Suprogram 23FI7+ fis the 2 tae $ith fied names and vaues

7ach suprogram creates an entry in the 2 tae

copy SAP AG BC420 12-60

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 6188

086

983209 SAP AG 1999

9illing the D Table

erorm bdcdltnro u9n8 SA)(FD +- erorm bdc9eld u9n8 BD22URSOR RFD1BUKRS- erorm bdc9eld u9n8 BD2OK2ODE 6- erorm bdc9eld u9n8 RFD1BUKRS record1BUKRS- erorm bdc9eld u9n8 RFD1KTOKD record1KTOKD-

erorm bdcdltnro u9n8 SA)(FD -

erorm bdc9eld u9n8 BD22URSOR KNA1S)RAS- erorm bdc9eld u9n8 BD2OK2ODE 6- erorm bdc9eld u9n8 KNA1NA(E record1NA(E-

erorm bdc9eld u9n8 KNA1SORT record1SORT-

Recording Benerated automaticall(

from the recording

)ERFOR( bdcdltnro USING SA)(FD +- )ERFOR( bdc9eld USING BD22URSOR RFD1BUKRS-)ERFOR( bdc9eld USING BD2OK2ODE 6-)ERFOR( bdc9eld USING RFD1BUKRS record1BUKRS-)ERFOR( bdc9eld USING RFD1KTOKD record1KTOKD-

)ERFOR( bdcdltnro USING SA)(FD -

)ERFOR( bdc9eld USING BD22URSOR KNA1S)RAS-)ERFOR( bdc9eld USING BD2OK2ODE 6-)ERFOR( bdc9eld USING KNA1NA(E record1NA(E-

)ERFOR( bdc9eld USING KNA1SORT record1SORT- ---

The 2 tae is fied $ith data from the recording The suroutines 23CNPamp5 and

23FI7+ are used for this

The suroutines are caed in the reuired structure or seuence

copy SAP AG BC420 12-61

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 6288

08amp

983209 SAP AG 1999

erie)

SAPDatabase

SeJuential9ile

SAPDatabase

ALL TRASATIALL TRASATI

SeJuential9ile

ATE IPUTATE IPUT

D TableD TableD TableD Table

I Monitor

T

In contrast to atch input you can use ca transaction to directy pass data to the diaog interface

$ithout using a atch input session Cou use an interna tae (2 tae same structure and ayout

as atch input) to temporariy store your screen data Then you ca the desired transaction in your

program

Note 5n average the 2a Transaction method is 8 to times faster than using atch Input

copy SAP AG BC420 12-62

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 6388

08

983209 SAP AG 1999

all Transaction Program$ 1ample

RE)ORT abcbdcdcdeb9ct-

)ARA(ETERS d9mode DEFAUT A

udmode DEFAUT S-FOR( calltranact9on-2A TRANSA2TION FD

USING bdcdata (ODE d9mode

U)DATE udmode-

IF lt1ubrc NE - 5RITE 6 ---

ENDIF-ENDFOR(-

Screen

00

Screen

100

Screen

An additiona system ro area is added for the caed transaction The system uses this area for

processing the individua screens in the transactionH the data from the tae is added here After the

transaction is processed the second ro area is reeasedH the system continues processing in the first

ro area

Notes

In contrast to atch input there is no error ogging (error sessions) here For processing the caed

transaction the system uses the authoriDations of the user that caed the transaction The 2 tae

can ony hod data for one transaction run at a time efore another transaction is caed and its data

can e added you must eecute a amp7Famp7S= for the 2 tae

copy SAP AG BC420 12-63

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 6488

084

983209 SAP AG 1999

ALL TRASATI C6

RE)ORT 777-

2A TRANSA2TION FD USING bdcdata (ODE E-

Default for MD1 is A

2A TRANSA2TION 3tranact9oncode4 USING 3bdc1table4 C (ODE A E N C-

-ith the parameter 57 you can seect a specific dispay mode for processing the transaction The

foo$ing three modes are avaiae

A (ispay a)

If you eecute the program a the screens and a their data are dispayed This is the defaut vaue

for the 57 in 2A++ TampANSA2TI5N

N (ispay nothing)

The screens are not dispayed at a regardess of $hether any of them contained errors As soon as

the transaction has een fuy processed contro is returned to your program (The vaue of the

parameter 4PAT7 determines $hether dataase updates are eecuted or not)

7 (ispay errors ony)As soon as an error occurs in a screen the transaction is s$itched to dispay mode so that you can

correct the errors

These dispay modes are the same as those in the atch input session processing

copy SAP AG BC420 12-64

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 6588

082

983209 SAP AG 1999

RE)ORT 777-

2A TRANSA2TION FD USING BD2DATA U)DATE -

ALL TRASATI Camp

RE)ORT 777-

2A TRANSA2TION FD USING bdcdata U)DATE -

2A TRANSA2TION 3tranact9oncode4 USING 3bdc1table4 C (ODE A E N C U)DATE A S C -

Default for UPDAT1 is A

-ith the parameter 4PAT7 you can contro ho$ dataase updates arising from a transaction are

carried out There are three options

A (asynchronous updating) The caed transaction does not $ait unti the dataase has een

updated it simpy for$ard the updates to the SAP update service This usuay speeds up the 2T

program This processing mode is N5T recommended for arge data sets as the caed transaction

does not receive a competion message from the update modue

The caing 2T program therefore cannot te if the transaction has een successfuy competed Cou

shoud use the updating administration function (transaction S8) to determine $hether updating

$as terminated eary The error anaysis correction functions for are ess hepfu than $ith

synchronous updating

S (synchronous updating) -ith synchronous updating the caed transaction $aits unti a the

updates have een competed So processing is so$er than $ith synchronous updating The caed

transaction can ho$ever report any updating errors to the program $hich maes error

anaysiscorrection easier

+ (local updating) $ith oca updating the dataase is not updated in a separate process it is

updated in the caers process (see appication hep documentation for the AAP ey$ord S7T

4PAT7 TAS6 +52A+)

copy SAP AG BC420 12-65

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 6688

088

983209 SAP AG 1999

ALL TRASATI C

RE)ORT 777-DATA mtab T0)E TABE OF bdcm8coll-

2A TRANSA2TION FD USING bdcdata (ESSAGES INTO mtab-

2A TRANSA2TION 3tranact9oncode4 USING 3bdc1table4 C (ODE A E N C U)DATE A S C (ESSAGES INTO 3metab4 C -

7SSAlt7S specifies that a system messages that are output during the eecution of a 2A++

TampANSA2TI5N are $ritten to the interna tae L7SSTA The interna tae must have the

structure 2Slt25++

4nie the cassica atch input processing $ith sessions 2A++ TampANSA2TI5N does not offer any

specia processing procedures for transactions containing errors There are no restart functions for

transactions that contain errors or that cause updating terminations

copy SAP AG BC420 12-66

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 6788

083

983209 SAP AG 1999

ALL TRASATI C4

RE)ORT 777-DATA mltot T0)E ctuaram-

2A TRANSA2TION FD USING BD2DATA

O)TIONS FRO( mltot-

2A TRANSA2TION 3tranact9oncode4 USING 3bdc1table4 C (ODE A E N C U)DATE A S C (ESSAGES INTO 3metab4 C O)TIONS FRO( ot C -

RE)ORT 777-DATA mltot T0)E ctuaram-2A TRANSA2TION FD USING bdcdata

O)TIONS FRO( mltot-

The addition 5PTI5NS enaes the ca transaction statement to e controed through a structure

The structure must have the dictionary type 2T43PAampAS

The addition 5PTI5NS Famp5 must not e comined either $ith the addition 57 or $ith

4PAT7 ore information on the net side

copy SAP AG BC420 12-67

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 6888

085

983209 SAP AG 1999

Structure TUltPARAMS

DISMD1 Procen mode anaoo o addon amp

UPDMD1 $pdae mode anaoo o addon $PA

ATTMD1 CA mode CA conro

D19SI1 orce de=a EndoE e drn procen

RAMMIT +o eD a Camp amp(

IPT +o a ac np eonF a F S-B+P SPAC

I1D +o a ac np eon a=er end o= BC daa

The components are defined as foo$s

The components 7FSIM7 ampA25IT N5INPT and N5I7N can have the foo$ing

vaues KGK E Ces or K K E No

If the addition 5PTI5NS Famp5 is not specified the foo$ing settings appy to the contro

parameters

IS57 from addition 57

4P57 from addition 4PAT7

2ATT57 2ATT not active

7FSIM7 o not not use defaut $indo$s siDe

ampA25IT Successfu eit at 25IT -5amp6

N5INPT atch input session active (SC9INPT E G)

N5I7N atch input session sti active after end of 2 data

copy SAP AG BC420 12-68

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 6988

087

983209 SAP AG 1999

SMSBID Message ID

SMSBT Message T(pe C1GIGWGSGA

SMSB Message umber

SMSB6 Message ariable 6

SMSBamp Message ariable amp

SMSB Message ariable

SMSB4 Message ariable 4

SMSBID Message ID

SMSBT Message T(pe C1GIGWGSGA

SMSB Message umber

SMSB6 Message ariable 6

SMSBamp Message ariable amp

SMSB Message ariable

SMSB4 Message ariable 4

Return code$

S(stem fields$

alue Meaning

0 Successful

6000 1rror in transaction

6000 1rror in processing call transaction

see also the s(stem fields specified

alue Meaning

0 Successful

6000 1rror in transaction

6000 1rror in processing call transaction

see also the s(stem fields specified

9ield name Meaning9ield name9ield name MeaningMeaning

Return ode and S(stem 9ields

The return code is used to specify $hether the caed transaction $as processed successfuy In

addition severa system fieds are fied The numer I type and variaes of the diaog message

output y the caed transaction Cou need this information to output the message tet

copy SAP AG BC420 12-69

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 7088

030

983209 SAP AG 1999

Benerated Program of the TA Recorder

REFRES= (ESSTAB-

2A TRANSA2TION tcode USING bdcdata (ODE ctumode U)DATE cudate (ESSAGES INTO metab-OO) AT metab- ENDOO)-IF lubrc 34 AND e8rou 34 S)A2E- IF e8rouoenend - 2A FUN2TION BD2O)ENGROU) E)ORTING ---------

--------- E8rouoened - ENDIF- 2A FUN2TION BD2INSERT E)ORTING T2ODE tcode TABES D0N)ROTAB bdcdata-ENDIF-REFRES= bdcdata-

Message table output

pen error session

Insert data record that

has errors into error

session

If you have seected ca transaction on the seection screen the generated program runs as foo$s

The onine transaction is caed $ith ca transaction and passed to tae 2ATA A the

messages arising during the ca transaction are put in the interna tae 7SSTA

7SSTA is output as a ist

If you have specified an error session ( 73ltamp54P L SPA27) on the seection screen and the

ca transaction comes across an error (+3S4amp2 L 0) the error session is opened The error

session is ho$ever ony opened once Then the data record is paced in the session

A the other data records that have errors $ith ca transaction are paced in the same session

copy SAP AG BC420 12-70

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 7188

036

983209 SAP AG 1999

The Transaction Recorder

PrinciplesPrinciples

Recording )ith the LSMWRecording )ith the LSMW

Principles of atch Input and all TransactionPrinciples of atch Input and all Transaction

Integrating the TA Program into the DWIntegrating the TA Program into the DW

Using the TA Recorder Using the TA Recorder

copy SAP AG BC420 12-71

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 7288

03amp

983209 SAP AG 1999

Integrating into the DW

Transfer program

AAP Dictionar(

Integrate

SDA0

SDA6

SDAamp

SDA

Cou can integrate the generated program into the G9- The structure of the fie must e created

in the AAP ictionary The taes SGA0 SGA8 SGA1 and SGA $i e fied

copy SAP AG BC420 12-72

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 7388

03

983209 SAP AG 1999

DW Release 42

Goo

-B eeae 45

aa ran=er ogtec

Int customer data transfer ob-ect

ecord =ed

Dece daa ran=er

d Goo

The ampunction ampor interatin TA recorder prora$s is

i$ple$ented in the

D+-B in Release

The recorder can e integrated as of ampeease and it is provided in the G9- ampeease

ltot to the G9- ampeease 5n the initia screen you can integrate programs y choosing ampoto

( +nt customer ata transfer o-ect

copy SAP AG BC420 12-73

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 7488

034

983209 SAP AG 1999

reating Program as D b-ect

Comer ran=er ogtec

ampgtec ype

Sor eD =or ogtec

aa ran=er proram

Srcre name

9900

(+A1

Cane comer

ZBCA+G

ZB

ustomer transfer ob-ect

umber bet)een 7000 and 7777

b-ect t(pe

Assignment to R ob-ect

Short tet for D ob-ectShort description

Data transfer program

ame of generated program

Structure name

A structure Cstructure la(out )ith this name is created in

the AAP Dictionar(

For ampeease transfer oects $ere not organiDed y 5amp oects ut y a G numer (00089

OOOO) The numer range O0009OOOO is reserved for customers

To create a connection to the ne$ G 9- you must assign the program to a 5amp oect

2reate a short tet for the G oect This tet $i appear in the method seection ist

Specify the program to e incuded

Specify a name for the structure to e created in the AAP ictionary

Note $he generated program appears under program type +N and not under program type

-

copy SAP AG BC420 12-74

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 7588

032

983209 SAP AG 1999

Adantages

Automatic program registration in the DW in

Release 48

ou can use all the functions defined for

standard ob-ects

1ception$ The (reate ampile ith data

function

If you incuded the oect in the ampeease $orench it is automaticay avaiae in the ampeease

B $orench

A the $orench functions are avaiae for your oect ecept for Create files ith transfer ata

copy SAP AG BC420 12-75

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 7688

038

983209 SAP AG 1999

ou are no) able to$

The Transaction Recorder$ Unit Summar(

Use the recording function in the LSMW to create

a batch input session )ith the data from the

eternal s(stem

Use the TA Recorder to create (our o)n data

transfer program

Anal(e programs that )or+ )ith batch input or

call transaction

Integrate the TA Recorder programs into the

DW

copy SAP AG BC420 12-76

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 7788

ercise 1

nit $ -ecorder

$opic 2reating etors

$ransaction -ecorder ercise 1

bull 2reating detors $ith eterna numer assignment

bull etor numers M9980008 to M9980080

Address data for detors $ith eterna numer assignment is to

e transferred using program ampFI700

ro4ect F5

Supro4ect +5

-un +575

$as)s 85 95 8S25

9oad program -F+00

8 In the foo$ing eercises eisting data is to e changed Therefore these detors $ith

eterna numer assignment have to first e created

898 4nder suproect 79 create run 797G9 $ith the name Detors ith

eternal numers

copy SAP AG BC420 12-77

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 7888

891 2reate the foo$ing three tass The tass map the foo$ing process steps

convert data create + session and process + session

89198 In run 797G9 create the foo$ing tas

9 Tas AP9

9 Name 2onvert data 9 Tas type AP

9 Program type +S-

Seect the foo$ing +S- oect

+S- proect 2109

+S- suproect 7I9

+S- oect I997GT

89191 In run 797G9 create the foo$ing tas 9 Tas +5A9

9 Name 2reate I session

Tas type +5A

9 Program type INP

Seect program ampFI700 $ith the variant

I97G9

8919 In run 797G9 create the foo$ing tas

9 Tas S29

9 Name Process I session Tas type S2

9 Program type amp7P5

Seect program ampS2S4 $ith the variant

S497G9

Note that you have to correct the seuence of the tass 2onvert data

create + session and process + session

4se the uttons

89 Start the run

The detors $i e created $ith eterna numer assignments

89 2hec in transaction F0 that the detors M9980008 to M9980080 have een

created

copy SAP AG BC420 12-78

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 7988

ercise

nit $ransaction -ecorder

$opic -ecording function in the 9S8(

bull 2reate a recording using the +S-

bull ltenerate a atch input session

2hange the detor address data in the amp System

Name of the recording +

Name of the file +2055+F9

8 2reate the recording 7I3 using the +S- ampecord the transaction F01 (2hange

detor)

898 efore you create the recording first test the transaction onineQ

For the recording use detor M9980008 5n the initia screen of the F01

maintain the foo$ing fieds ony

etor etor M9980008

2ompany code 0008

Address data seect

Note $he data record must e saved hile recording

891 aintain the names and the descriptions for the foo$ing fieds

Name city street posta code and teephone numereete a other fieds in screen 880 from the recording (eg S5ampT+ +AN8

SPampAS)

4se the same technica names as sho$n in the tae eo$ (automatic fied

mapping)

copy SAP AG BC420 12-79

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 8088

1 2reate the suproect 7I9 and the ne$ oect TA3 in your proect 2109

aintain the oect attriutes and seect the item atch input recording Seect your

recording 7I3

2reate the source structure address

2reate the source fieds according to the tae eo$ 5r copy them from proect 2109S37N suproect 7I900 oect TA900

198 Fie setup The data from the egacy system are dispayed in the foo$ing tae

Fied name Fied type Fied ength escription

N5 2 8B etor numer

NA7 2 Name

STamp77T 2 Street

2ITC 2 2ityPace of residence

MIP 2 80 Posta code

T7+ 2 8B Teephone numer

191 aintain the fied mapping 4se the automatic fied mapping (via menu item

7tras)

19 Specify the fies 5ny maintain the fie name of the source fie

Name of the fie 21099IFI+7

2odepage 8800

19 Import the data and convert them ispay the data in each caseQ

19 2reate a atch input session

19B ampun the atch input session

copy SAP AG BC420 12-80

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 8188

ercise 3

nit $ransaction -ecorder

$opic -ecording ith the $ -ecorder

bull ltenerate a recording using the TA recorder

bull Test the recording

2hange the address data of detors in the amp system

Name recording $+

Name of the file +2055+F9

8 2reate the recording TA37I3 using the transaction recorder ampecord the

transaction F01 (change detor)

898 4se detor M9980008 for the recording 5n the F01 initia screen ony

maintain the foo$ing fieds

etor etor M9980008

2ompany 2ode 0008

Address data seect

Note $he data record must e saved hen recording

eete a fieds that do not eist in the source fie 21099IFI+7 from screen

880 in the recording (eg 6NA89S5ampT+ 6NA89+AN8 6ANNQ9SPampAS) Note o not deete fieds ampF01946ampS and ampF0190880

Save the recording no$

1 S$itch to the recordings overvie$

198 Process the recording $ith the processing mode A (dispay a)

191 Process the recording $ith the processing mode RN (no dispay)

19 If the recording has een tested and no error has occurred generate a I session

and run it using the I monitor If an error shoud occur generate the recordingagainQ

copy SAP AG BC420 12-81

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 8288

From the recording generate the program M21037I3 in your deveopment cass

2109 Seect the foo$ing

bull ampead fied contents from fie

bull 2reate test data in the fie 2103dei3test3tt

98 Save this program and eecute it ltenerate one I session each and process it

2arry out the same steps again using the ca transaction

The generated program shoud no$ e changed so that fie 21099IFI+7 can e

read and processed

98 2hange the defaut vaue of the fie name (parameter dataset) in 21099

IFI+7

91 2hange the structure definition eete the company code fied and the address

data checo from the structure

9 2hange the su9routine ca perform dc3fied for the company code (KampF019

46ampSK) so that the vaue 0008 is transferred

9 2hange the su9routine ca perform dc3fied for the address data checo

(KampF0190880K) so that the vaue G is transferred

9 Start the program again and read the data from the fie 21099IFI+7 $ith

detor data ltenerate a I session $ith it and run it

copy SAP AG BC420 12-82

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 8388

033 Include DR16INCLUDE BDCRECX1

SELECTION-SCREEN BEGIN OF LINE

PARAMETERS SESSION RADIOBUTTON GROUP CTU create sessi SELECTION-SCREEN COMMENT $amp TEXT-S FOR FIELD SESSION

se(ecti-scree )siti +

PARAMETERS CTU RADIOBUTTON GROUP CTU ca(( trasacti

SELECTION-SCREEN COMMENT $amp TEXT-S FOR FIELD CTU

SELECTION-SCREEN END OF LINE

SELECTION-SCREEN BEGIN OF LINE

SELECTION-SCREEN COMMENT $amp TEXT-S1 FOR FIELD GROUP

se(ecti-scree )siti $+

PARAMETERS GROUP1$amp r) ae 0 sessi

SELECTION-SCREEN COMMENT $amp TEXT-S+ FOR FIELD CTUMODE

se(ecti-scree )siti

PARAMETERS CTUMODE LIE CTU2PARAMS-DISMODE DEFAULT 3N3

A4 s56 a(( 78)rs

E4 s56 78)r errr (8

N4 7 t 7is)(a8 78)r

SELECTION-SCREEN END OF LINE

SELECTION-SCREEN BEGIN OF LINE

SELECTION-SCREEN COMMENT $amp TEXT-S$ FOR FIELD USER

se(ecti-scree )siti $+

PARAMETERS4 USER1$amp DEFAULT S9-UNAME ser 0r sessi i atc5

SELECTION-SCREEN COMMENT $amp TEXT-S FOR FIELD CUPDATE

se(ecti-scree )siti

PARAMETERS CUPDATE LIE CTU2PARAMS-UPDMODE DEFAULT 3L3

S4 s8c5rs(8

A4 as8c5rs(8

L4 (ca(

SELECTION-SCREEN END OF LINE

SELECTION-SCREEN BEGIN OF LINE

SELECTION-SCREEN COMMENT $amp TEXT-S FOR FIELD EEP

se(ecti-scree )siti $+

PARAMETERS4 EEP AS CltECBOX 3 3 = 7e(ete sessi i0 0iis5e7

3X3 = gtee) sessi i0 0iis5e7

SELECTION-SCREEN COMMENT $amp TEXT-S FOR FIELD E2GROUP

copy SAP AG BC420 12-83

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 8488

se(ecti-scree )siti

)araeters E2GROUP1$amp r) ae 0 errr-sessi

SELECTION-SCREEN END OF LINE

SELECTION-SCREEN BEGIN OF LINE

SELECTION-SCREEN COMMENT $amp TEXT-S FOR FIELD ltOLDDATE

se(ecti-scree )siti $+

PARAMETERS4 ltOLDDATE LIE S9-DATUM

SELECTION-SCREEN COMMENT +11amp TEXT-S$ FOR FIELD E2USER

se(ecti-scree )siti

PARAMETERS4 E2USER1$amp DEFAULT S9-UNAME ser 0r errr-sessi

SELECTION-SCREEN END OF LINE

SELECTION-SCREEN BEGIN OF LINE

SELECTION-SCREEN COMMENT +11amp TEXT-S FOR FIELD E2EEP

se(ecti-scree )siti

PARAMETERS4 E2EEP AS CltECBOX 3 3 = 7e(ete sessi i0 0iis5e7

3X3 = gtee) sessi i0 0iis5e7

SELECTION-SCREEN END OF LINE

SELECTION-SCREEN BEGIN OF LINE

SELECTION-SCREEN COMMENT +11amp TEXT-S FOR FIELD E2ltDATE

se(ecti-scree )siti

PARAMETERS4 E2ltDATE LIE S9-DATUM

SELECTION-SCREEN END OF LINE

SELECTION-SCREEN SIP

SELECTION-SCREEN BEGIN OF LINE

SELECTION-SCREEN COMMENT 1amp TEXT-S1 FOR FIELD NODATA

PARAMETERS4 NODATA DEFAULT 33 LOER CASE 7ata

SELECTION-SCREEN END OF LINE

----------------------------------------------------------------------

Batc5i)t7ata 0 si(e trasacti

DATA4 BDCDATA LIE BDCDATA OCCURS ITlt ltEADER LINE

essaes 0 ca(( trasacti

DATA4 MESSTAB LIE BDCMSGCOLL OCCURS ITlt ltEADER LINE

errr sessi )ee7 3 3 r 3X3amp

DATA4 E2GROUP2OPENED

essae tets

TABLES4 T1

copy SAP AG BC420 12-84

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 8588

----------------------------------------------------------------------

at se(ecti scree

----------------------------------------------------------------------

AT SELECTION-SCREEN

r) a7 ser st e 0i((e7 0r create sessi

IF SESSION = 3X3 AND

GROUP = SPACE OR USER = SPACE

MESSAGE E1MSamp

ENDIF

----------------------------------------------------------------------

)e 7ataset

----------------------------------------------------------------------

FORM OPEN2DATASET USING P2DATASET

OPEN DATASET P2DATASET IN TEXT MODE

IF S9-SUBRC

RITE4 TEXT-E S9-SUBRC

STOP

ENDIF

ENDFORM

----------------------------------------------------------------------

c(se 7ataset

----------------------------------------------------------------------

FORM CLOSE2DATASET USING P2DATASET

CLOSE DATASET P2DATASET

ENDFORM

----------------------------------------------------------------------

create atc5i)t sessi

t 0r ca(( trasacti siamp

----------------------------------------------------------------------

FORM OPEN2GROUP

IF SESSION = 3X3

SIP

RITE4 $amp 3Create r)3I1amp GROUP

SIP

)e atc5i)t r)

CALL FUNCTION 3BDC2OPEN2GROUP3

EXPORTING CLIENT = S9-MANDT

copy SAP AG BC420 12-85

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 8688

GROUP = GROUP

USER = USER

EEP = EEP

ltOLDDATE = ltOLDDATE

RITE4 amp 3BDC2OPEN2GROUP3I$amp

1$amp 3retrc7e43I+amp

S9-SUBRC

ENDIF

ENDFORM

----------------------------------------------------------------------

e7 atc5i)t sessi

ca(( trasacti si4 errr sessiamp

----------------------------------------------------------------------

FORM CLOSE2GROUP

IF SESSION = 3X3

c(se atc5i)t r)

CALL FUNCTION 3BDC2CLOSE2GROUP3

RITE4 amp 3BDC2CLOSE2GROUP3Iamp

1$amp 3retrc7e43I+amp

S9-SUBRC

ELSE

IF E2GROUP2OPENED = 3X3

CALL FUNCTION 3BDC2CLOSE2GROUP3

RITE4

RITE4 amp 3Fe5(era))e 6r7e eret3Iamp

ENDIF

ENDIF

ENDFORM

----------------------------------------------------------------------

Start e6 trasacti accr7i t )araeters

----------------------------------------------------------------------

FORM BDC2TRANSACTION USING TCODE

DATA4 L2MSTRINGamp

DATA4 L2SUBRC LIE S9-SUBRC

atc5 i)t sessi

IF SESSION = 3X3

CALL FUNCTION 3BDC2INSERT3

EXPORTING TCODE = TCODE

TABLES D9NPROTAB = BDCDATA

RITE4 3BDC2INSERT3Iamp

copy SAP AG BC420 12-86

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 8788

TCODE

3retrc7e43I+amp

S9-SUBRC

3RECORD43

S9-INDEX

ca(( trasacti si

ELSE

REFRESlt MESSTAB

CALL TRANSACTION TCODE USING BDCDATA

MODE CTUMODE

UPDATE CUPDATE

MESSAGES INTO MESSTAB

L2SUBRC = S9-SUBRC

RITE4 3CALL2TRANSACTION3

TCODE

3retrc7e43I+amp

L2SUBRC

3RECORD43

S9-INDEX

LOOP AT MESSTAB

SELECT SINGLE FROM T1 ltERE SPRSL = MESSTAB-MSGSPRA

AND ARBGB = MESSTAB-MSGID

AND MSGNR = MESSTAB-MSGNR

IF S9-SUBRC =

L2MSTRING = T1-TEXT

IF L2MSTRING CS 313

REPLACE 313 ITlt MESSTAB-MSGH1 INTO L2MSTRING

REPLACE 3$3 ITlt MESSTAB-MSGH$ INTO L2MSTRING

REPLACE 33 ITlt MESSTAB-MSGH INTO L2MSTRING

REPLACE 33 ITlt MESSTAB-MSGH INTO L2MSTRING

ELSE

REPLACE 33 ITlt MESSTAB-MSGH1 INTO L2MSTRING

REPLACE 33 ITlt MESSTAB-MSGH$ INTO L2MSTRING

REPLACE 33 ITlt MESSTAB-MSGH INTO L2MSTRING

REPLACE 33 ITlt MESSTAB-MSGH INTO L2MSTRING

ENDIF

CONDENSE L2MSTRING

RITE4 MESSTAB-MSGT9P L2MSTRING$+amp

ELSE

RITE4 MESSTAB

ENDIF

ENDLOOP

copy SAP AG BC420 12-87

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 8888

SIP

Eree 0e5(era))e

IF L2SUBRC AND E2GROUP SPACE

IF E2GROUP2OPENED = 3 3

CALL FUNCTION 3BDC2OPEN2GROUP3

EXPORTING CLIENT = S9-MANDT

GROUP = E2GROUP

USER = E2USER

EEP = E2EEP

ltOLDDATE = E2ltDATE

E2GROUP2OPENED = 3X3

ENDIF

CALL FUNCTION 3BDC2INSERT3

EXPORTING TCODE = TCODE

TABLES D9NPROTAB = BDCDATA

ENDIF

ENDIF

REFRESlt BDCDATA

ENDFORM

----------------------------------------------------------------------

Start e6 scree

----------------------------------------------------------------------

FORM BDC2D9NPRO USING PROGRAM D9NPRO

CLEAR BDCDATA

BDCDATA-PROGRAM = PROGRAM

BDCDATA-D9NPRO = D9NPRO

BDCDATA-D9NBEGIN = 3X3

APPEND BDCDATA

ENDFORM

----------------------------------------------------------------------

Isert 0ie(7

Page 60: BC420_46C - 012The Transaction Recorder

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 6088

080

983209 SAP AG 1999

Subprograms DltDPRG Dlt9I1LD

DltDPR

Dlt9I1LD

FOR( bdc9eld USING nam al-IF al 34 nodata-2EAR bdcdata- bdcdata1nam nam- bdcdata1al al- A))END bdcdata-ENDIF-

ENDFOR(-

FOR( bdcdltnro USING ro8ram dltnro- 2EAR bdcdata-Bdcdata1ro8ram ro8ram-Bdcdata1dltnro dltnro-Bdcdata1dltnbe89n - A))END bdcdata-ENDFOR(-

Include

DR16

The incude 2amp72GG contains t$o suprograms 23CNPamp5 and 23FI7+

Suprogram 23CNPamp5 fis the 2 tae $ith program names and screen numers

Suprogram 23FI7+ fis the 2 tae $ith fied names and vaues

7ach suprogram creates an entry in the 2 tae

copy SAP AG BC420 12-60

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 6188

086

983209 SAP AG 1999

9illing the D Table

erorm bdcdltnro u9n8 SA)(FD +- erorm bdc9eld u9n8 BD22URSOR RFD1BUKRS- erorm bdc9eld u9n8 BD2OK2ODE 6- erorm bdc9eld u9n8 RFD1BUKRS record1BUKRS- erorm bdc9eld u9n8 RFD1KTOKD record1KTOKD-

erorm bdcdltnro u9n8 SA)(FD -

erorm bdc9eld u9n8 BD22URSOR KNA1S)RAS- erorm bdc9eld u9n8 BD2OK2ODE 6- erorm bdc9eld u9n8 KNA1NA(E record1NA(E-

erorm bdc9eld u9n8 KNA1SORT record1SORT-

Recording Benerated automaticall(

from the recording

)ERFOR( bdcdltnro USING SA)(FD +- )ERFOR( bdc9eld USING BD22URSOR RFD1BUKRS-)ERFOR( bdc9eld USING BD2OK2ODE 6-)ERFOR( bdc9eld USING RFD1BUKRS record1BUKRS-)ERFOR( bdc9eld USING RFD1KTOKD record1KTOKD-

)ERFOR( bdcdltnro USING SA)(FD -

)ERFOR( bdc9eld USING BD22URSOR KNA1S)RAS-)ERFOR( bdc9eld USING BD2OK2ODE 6-)ERFOR( bdc9eld USING KNA1NA(E record1NA(E-

)ERFOR( bdc9eld USING KNA1SORT record1SORT- ---

The 2 tae is fied $ith data from the recording The suroutines 23CNPamp5 and

23FI7+ are used for this

The suroutines are caed in the reuired structure or seuence

copy SAP AG BC420 12-61

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 6288

08amp

983209 SAP AG 1999

erie)

SAPDatabase

SeJuential9ile

SAPDatabase

ALL TRASATIALL TRASATI

SeJuential9ile

ATE IPUTATE IPUT

D TableD TableD TableD Table

I Monitor

T

In contrast to atch input you can use ca transaction to directy pass data to the diaog interface

$ithout using a atch input session Cou use an interna tae (2 tae same structure and ayout

as atch input) to temporariy store your screen data Then you ca the desired transaction in your

program

Note 5n average the 2a Transaction method is 8 to times faster than using atch Input

copy SAP AG BC420 12-62

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 6388

08

983209 SAP AG 1999

all Transaction Program$ 1ample

RE)ORT abcbdcdcdeb9ct-

)ARA(ETERS d9mode DEFAUT A

udmode DEFAUT S-FOR( calltranact9on-2A TRANSA2TION FD

USING bdcdata (ODE d9mode

U)DATE udmode-

IF lt1ubrc NE - 5RITE 6 ---

ENDIF-ENDFOR(-

Screen

00

Screen

100

Screen

An additiona system ro area is added for the caed transaction The system uses this area for

processing the individua screens in the transactionH the data from the tae is added here After the

transaction is processed the second ro area is reeasedH the system continues processing in the first

ro area

Notes

In contrast to atch input there is no error ogging (error sessions) here For processing the caed

transaction the system uses the authoriDations of the user that caed the transaction The 2 tae

can ony hod data for one transaction run at a time efore another transaction is caed and its data

can e added you must eecute a amp7Famp7S= for the 2 tae

copy SAP AG BC420 12-63

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 6488

084

983209 SAP AG 1999

ALL TRASATI C6

RE)ORT 777-

2A TRANSA2TION FD USING bdcdata (ODE E-

Default for MD1 is A

2A TRANSA2TION 3tranact9oncode4 USING 3bdc1table4 C (ODE A E N C-

-ith the parameter 57 you can seect a specific dispay mode for processing the transaction The

foo$ing three modes are avaiae

A (ispay a)

If you eecute the program a the screens and a their data are dispayed This is the defaut vaue

for the 57 in 2A++ TampANSA2TI5N

N (ispay nothing)

The screens are not dispayed at a regardess of $hether any of them contained errors As soon as

the transaction has een fuy processed contro is returned to your program (The vaue of the

parameter 4PAT7 determines $hether dataase updates are eecuted or not)

7 (ispay errors ony)As soon as an error occurs in a screen the transaction is s$itched to dispay mode so that you can

correct the errors

These dispay modes are the same as those in the atch input session processing

copy SAP AG BC420 12-64

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 6588

082

983209 SAP AG 1999

RE)ORT 777-

2A TRANSA2TION FD USING BD2DATA U)DATE -

ALL TRASATI Camp

RE)ORT 777-

2A TRANSA2TION FD USING bdcdata U)DATE -

2A TRANSA2TION 3tranact9oncode4 USING 3bdc1table4 C (ODE A E N C U)DATE A S C -

Default for UPDAT1 is A

-ith the parameter 4PAT7 you can contro ho$ dataase updates arising from a transaction are

carried out There are three options

A (asynchronous updating) The caed transaction does not $ait unti the dataase has een

updated it simpy for$ard the updates to the SAP update service This usuay speeds up the 2T

program This processing mode is N5T recommended for arge data sets as the caed transaction

does not receive a competion message from the update modue

The caing 2T program therefore cannot te if the transaction has een successfuy competed Cou

shoud use the updating administration function (transaction S8) to determine $hether updating

$as terminated eary The error anaysis correction functions for are ess hepfu than $ith

synchronous updating

S (synchronous updating) -ith synchronous updating the caed transaction $aits unti a the

updates have een competed So processing is so$er than $ith synchronous updating The caed

transaction can ho$ever report any updating errors to the program $hich maes error

anaysiscorrection easier

+ (local updating) $ith oca updating the dataase is not updated in a separate process it is

updated in the caers process (see appication hep documentation for the AAP ey$ord S7T

4PAT7 TAS6 +52A+)

copy SAP AG BC420 12-65

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 6688

088

983209 SAP AG 1999

ALL TRASATI C

RE)ORT 777-DATA mtab T0)E TABE OF bdcm8coll-

2A TRANSA2TION FD USING bdcdata (ESSAGES INTO mtab-

2A TRANSA2TION 3tranact9oncode4 USING 3bdc1table4 C (ODE A E N C U)DATE A S C (ESSAGES INTO 3metab4 C -

7SSAlt7S specifies that a system messages that are output during the eecution of a 2A++

TampANSA2TI5N are $ritten to the interna tae L7SSTA The interna tae must have the

structure 2Slt25++

4nie the cassica atch input processing $ith sessions 2A++ TampANSA2TI5N does not offer any

specia processing procedures for transactions containing errors There are no restart functions for

transactions that contain errors or that cause updating terminations

copy SAP AG BC420 12-66

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 6788

083

983209 SAP AG 1999

ALL TRASATI C4

RE)ORT 777-DATA mltot T0)E ctuaram-

2A TRANSA2TION FD USING BD2DATA

O)TIONS FRO( mltot-

2A TRANSA2TION 3tranact9oncode4 USING 3bdc1table4 C (ODE A E N C U)DATE A S C (ESSAGES INTO 3metab4 C O)TIONS FRO( ot C -

RE)ORT 777-DATA mltot T0)E ctuaram-2A TRANSA2TION FD USING bdcdata

O)TIONS FRO( mltot-

The addition 5PTI5NS enaes the ca transaction statement to e controed through a structure

The structure must have the dictionary type 2T43PAampAS

The addition 5PTI5NS Famp5 must not e comined either $ith the addition 57 or $ith

4PAT7 ore information on the net side

copy SAP AG BC420 12-67

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 6888

085

983209 SAP AG 1999

Structure TUltPARAMS

DISMD1 Procen mode anaoo o addon amp

UPDMD1 $pdae mode anaoo o addon $PA

ATTMD1 CA mode CA conro

D19SI1 orce de=a EndoE e drn procen

RAMMIT +o eD a Camp amp(

IPT +o a ac np eonF a F S-B+P SPAC

I1D +o a ac np eon a=er end o= BC daa

The components are defined as foo$s

The components 7FSIM7 ampA25IT N5INPT and N5I7N can have the foo$ing

vaues KGK E Ces or K K E No

If the addition 5PTI5NS Famp5 is not specified the foo$ing settings appy to the contro

parameters

IS57 from addition 57

4P57 from addition 4PAT7

2ATT57 2ATT not active

7FSIM7 o not not use defaut $indo$s siDe

ampA25IT Successfu eit at 25IT -5amp6

N5INPT atch input session active (SC9INPT E G)

N5I7N atch input session sti active after end of 2 data

copy SAP AG BC420 12-68

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 6988

087

983209 SAP AG 1999

SMSBID Message ID

SMSBT Message T(pe C1GIGWGSGA

SMSB Message umber

SMSB6 Message ariable 6

SMSBamp Message ariable amp

SMSB Message ariable

SMSB4 Message ariable 4

SMSBID Message ID

SMSBT Message T(pe C1GIGWGSGA

SMSB Message umber

SMSB6 Message ariable 6

SMSBamp Message ariable amp

SMSB Message ariable

SMSB4 Message ariable 4

Return code$

S(stem fields$

alue Meaning

0 Successful

6000 1rror in transaction

6000 1rror in processing call transaction

see also the s(stem fields specified

alue Meaning

0 Successful

6000 1rror in transaction

6000 1rror in processing call transaction

see also the s(stem fields specified

9ield name Meaning9ield name9ield name MeaningMeaning

Return ode and S(stem 9ields

The return code is used to specify $hether the caed transaction $as processed successfuy In

addition severa system fieds are fied The numer I type and variaes of the diaog message

output y the caed transaction Cou need this information to output the message tet

copy SAP AG BC420 12-69

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 7088

030

983209 SAP AG 1999

Benerated Program of the TA Recorder

REFRES= (ESSTAB-

2A TRANSA2TION tcode USING bdcdata (ODE ctumode U)DATE cudate (ESSAGES INTO metab-OO) AT metab- ENDOO)-IF lubrc 34 AND e8rou 34 S)A2E- IF e8rouoenend - 2A FUN2TION BD2O)ENGROU) E)ORTING ---------

--------- E8rouoened - ENDIF- 2A FUN2TION BD2INSERT E)ORTING T2ODE tcode TABES D0N)ROTAB bdcdata-ENDIF-REFRES= bdcdata-

Message table output

pen error session

Insert data record that

has errors into error

session

If you have seected ca transaction on the seection screen the generated program runs as foo$s

The onine transaction is caed $ith ca transaction and passed to tae 2ATA A the

messages arising during the ca transaction are put in the interna tae 7SSTA

7SSTA is output as a ist

If you have specified an error session ( 73ltamp54P L SPA27) on the seection screen and the

ca transaction comes across an error (+3S4amp2 L 0) the error session is opened The error

session is ho$ever ony opened once Then the data record is paced in the session

A the other data records that have errors $ith ca transaction are paced in the same session

copy SAP AG BC420 12-70

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 7188

036

983209 SAP AG 1999

The Transaction Recorder

PrinciplesPrinciples

Recording )ith the LSMWRecording )ith the LSMW

Principles of atch Input and all TransactionPrinciples of atch Input and all Transaction

Integrating the TA Program into the DWIntegrating the TA Program into the DW

Using the TA Recorder Using the TA Recorder

copy SAP AG BC420 12-71

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 7288

03amp

983209 SAP AG 1999

Integrating into the DW

Transfer program

AAP Dictionar(

Integrate

SDA0

SDA6

SDAamp

SDA

Cou can integrate the generated program into the G9- The structure of the fie must e created

in the AAP ictionary The taes SGA0 SGA8 SGA1 and SGA $i e fied

copy SAP AG BC420 12-72

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 7388

03

983209 SAP AG 1999

DW Release 42

Goo

-B eeae 45

aa ran=er ogtec

Int customer data transfer ob-ect

ecord =ed

Dece daa ran=er

d Goo

The ampunction ampor interatin TA recorder prora$s is

i$ple$ented in the

D+-B in Release

The recorder can e integrated as of ampeease and it is provided in the G9- ampeease

ltot to the G9- ampeease 5n the initia screen you can integrate programs y choosing ampoto

( +nt customer ata transfer o-ect

copy SAP AG BC420 12-73

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 7488

034

983209 SAP AG 1999

reating Program as D b-ect

Comer ran=er ogtec

ampgtec ype

Sor eD =or ogtec

aa ran=er proram

Srcre name

9900

(+A1

Cane comer

ZBCA+G

ZB

ustomer transfer ob-ect

umber bet)een 7000 and 7777

b-ect t(pe

Assignment to R ob-ect

Short tet for D ob-ectShort description

Data transfer program

ame of generated program

Structure name

A structure Cstructure la(out )ith this name is created in

the AAP Dictionar(

For ampeease transfer oects $ere not organiDed y 5amp oects ut y a G numer (00089

OOOO) The numer range O0009OOOO is reserved for customers

To create a connection to the ne$ G 9- you must assign the program to a 5amp oect

2reate a short tet for the G oect This tet $i appear in the method seection ist

Specify the program to e incuded

Specify a name for the structure to e created in the AAP ictionary

Note $he generated program appears under program type +N and not under program type

-

copy SAP AG BC420 12-74

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 7588

032

983209 SAP AG 1999

Adantages

Automatic program registration in the DW in

Release 48

ou can use all the functions defined for

standard ob-ects

1ception$ The (reate ampile ith data

function

If you incuded the oect in the ampeease $orench it is automaticay avaiae in the ampeease

B $orench

A the $orench functions are avaiae for your oect ecept for Create files ith transfer ata

copy SAP AG BC420 12-75

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 7688

038

983209 SAP AG 1999

ou are no) able to$

The Transaction Recorder$ Unit Summar(

Use the recording function in the LSMW to create

a batch input session )ith the data from the

eternal s(stem

Use the TA Recorder to create (our o)n data

transfer program

Anal(e programs that )or+ )ith batch input or

call transaction

Integrate the TA Recorder programs into the

DW

copy SAP AG BC420 12-76

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 7788

ercise 1

nit $ -ecorder

$opic 2reating etors

$ransaction -ecorder ercise 1

bull 2reating detors $ith eterna numer assignment

bull etor numers M9980008 to M9980080

Address data for detors $ith eterna numer assignment is to

e transferred using program ampFI700

ro4ect F5

Supro4ect +5

-un +575

$as)s 85 95 8S25

9oad program -F+00

8 In the foo$ing eercises eisting data is to e changed Therefore these detors $ith

eterna numer assignment have to first e created

898 4nder suproect 79 create run 797G9 $ith the name Detors ith

eternal numers

copy SAP AG BC420 12-77

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 7888

891 2reate the foo$ing three tass The tass map the foo$ing process steps

convert data create + session and process + session

89198 In run 797G9 create the foo$ing tas

9 Tas AP9

9 Name 2onvert data 9 Tas type AP

9 Program type +S-

Seect the foo$ing +S- oect

+S- proect 2109

+S- suproect 7I9

+S- oect I997GT

89191 In run 797G9 create the foo$ing tas 9 Tas +5A9

9 Name 2reate I session

Tas type +5A

9 Program type INP

Seect program ampFI700 $ith the variant

I97G9

8919 In run 797G9 create the foo$ing tas

9 Tas S29

9 Name Process I session Tas type S2

9 Program type amp7P5

Seect program ampS2S4 $ith the variant

S497G9

Note that you have to correct the seuence of the tass 2onvert data

create + session and process + session

4se the uttons

89 Start the run

The detors $i e created $ith eterna numer assignments

89 2hec in transaction F0 that the detors M9980008 to M9980080 have een

created

copy SAP AG BC420 12-78

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 7988

ercise

nit $ransaction -ecorder

$opic -ecording function in the 9S8(

bull 2reate a recording using the +S-

bull ltenerate a atch input session

2hange the detor address data in the amp System

Name of the recording +

Name of the file +2055+F9

8 2reate the recording 7I3 using the +S- ampecord the transaction F01 (2hange

detor)

898 efore you create the recording first test the transaction onineQ

For the recording use detor M9980008 5n the initia screen of the F01

maintain the foo$ing fieds ony

etor etor M9980008

2ompany code 0008

Address data seect

Note $he data record must e saved hile recording

891 aintain the names and the descriptions for the foo$ing fieds

Name city street posta code and teephone numereete a other fieds in screen 880 from the recording (eg S5ampT+ +AN8

SPampAS)

4se the same technica names as sho$n in the tae eo$ (automatic fied

mapping)

copy SAP AG BC420 12-79

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 8088

1 2reate the suproect 7I9 and the ne$ oect TA3 in your proect 2109

aintain the oect attriutes and seect the item atch input recording Seect your

recording 7I3

2reate the source structure address

2reate the source fieds according to the tae eo$ 5r copy them from proect 2109S37N suproect 7I900 oect TA900

198 Fie setup The data from the egacy system are dispayed in the foo$ing tae

Fied name Fied type Fied ength escription

N5 2 8B etor numer

NA7 2 Name

STamp77T 2 Street

2ITC 2 2ityPace of residence

MIP 2 80 Posta code

T7+ 2 8B Teephone numer

191 aintain the fied mapping 4se the automatic fied mapping (via menu item

7tras)

19 Specify the fies 5ny maintain the fie name of the source fie

Name of the fie 21099IFI+7

2odepage 8800

19 Import the data and convert them ispay the data in each caseQ

19 2reate a atch input session

19B ampun the atch input session

copy SAP AG BC420 12-80

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 8188

ercise 3

nit $ransaction -ecorder

$opic -ecording ith the $ -ecorder

bull ltenerate a recording using the TA recorder

bull Test the recording

2hange the address data of detors in the amp system

Name recording $+

Name of the file +2055+F9

8 2reate the recording TA37I3 using the transaction recorder ampecord the

transaction F01 (change detor)

898 4se detor M9980008 for the recording 5n the F01 initia screen ony

maintain the foo$ing fieds

etor etor M9980008

2ompany 2ode 0008

Address data seect

Note $he data record must e saved hen recording

eete a fieds that do not eist in the source fie 21099IFI+7 from screen

880 in the recording (eg 6NA89S5ampT+ 6NA89+AN8 6ANNQ9SPampAS) Note o not deete fieds ampF01946ampS and ampF0190880

Save the recording no$

1 S$itch to the recordings overvie$

198 Process the recording $ith the processing mode A (dispay a)

191 Process the recording $ith the processing mode RN (no dispay)

19 If the recording has een tested and no error has occurred generate a I session

and run it using the I monitor If an error shoud occur generate the recordingagainQ

copy SAP AG BC420 12-81

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 8288

From the recording generate the program M21037I3 in your deveopment cass

2109 Seect the foo$ing

bull ampead fied contents from fie

bull 2reate test data in the fie 2103dei3test3tt

98 Save this program and eecute it ltenerate one I session each and process it

2arry out the same steps again using the ca transaction

The generated program shoud no$ e changed so that fie 21099IFI+7 can e

read and processed

98 2hange the defaut vaue of the fie name (parameter dataset) in 21099

IFI+7

91 2hange the structure definition eete the company code fied and the address

data checo from the structure

9 2hange the su9routine ca perform dc3fied for the company code (KampF019

46ampSK) so that the vaue 0008 is transferred

9 2hange the su9routine ca perform dc3fied for the address data checo

(KampF0190880K) so that the vaue G is transferred

9 Start the program again and read the data from the fie 21099IFI+7 $ith

detor data ltenerate a I session $ith it and run it

copy SAP AG BC420 12-82

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 8388

033 Include DR16INCLUDE BDCRECX1

SELECTION-SCREEN BEGIN OF LINE

PARAMETERS SESSION RADIOBUTTON GROUP CTU create sessi SELECTION-SCREEN COMMENT $amp TEXT-S FOR FIELD SESSION

se(ecti-scree )siti +

PARAMETERS CTU RADIOBUTTON GROUP CTU ca(( trasacti

SELECTION-SCREEN COMMENT $amp TEXT-S FOR FIELD CTU

SELECTION-SCREEN END OF LINE

SELECTION-SCREEN BEGIN OF LINE

SELECTION-SCREEN COMMENT $amp TEXT-S1 FOR FIELD GROUP

se(ecti-scree )siti $+

PARAMETERS GROUP1$amp r) ae 0 sessi

SELECTION-SCREEN COMMENT $amp TEXT-S+ FOR FIELD CTUMODE

se(ecti-scree )siti

PARAMETERS CTUMODE LIE CTU2PARAMS-DISMODE DEFAULT 3N3

A4 s56 a(( 78)rs

E4 s56 78)r errr (8

N4 7 t 7is)(a8 78)r

SELECTION-SCREEN END OF LINE

SELECTION-SCREEN BEGIN OF LINE

SELECTION-SCREEN COMMENT $amp TEXT-S$ FOR FIELD USER

se(ecti-scree )siti $+

PARAMETERS4 USER1$amp DEFAULT S9-UNAME ser 0r sessi i atc5

SELECTION-SCREEN COMMENT $amp TEXT-S FOR FIELD CUPDATE

se(ecti-scree )siti

PARAMETERS CUPDATE LIE CTU2PARAMS-UPDMODE DEFAULT 3L3

S4 s8c5rs(8

A4 as8c5rs(8

L4 (ca(

SELECTION-SCREEN END OF LINE

SELECTION-SCREEN BEGIN OF LINE

SELECTION-SCREEN COMMENT $amp TEXT-S FOR FIELD EEP

se(ecti-scree )siti $+

PARAMETERS4 EEP AS CltECBOX 3 3 = 7e(ete sessi i0 0iis5e7

3X3 = gtee) sessi i0 0iis5e7

SELECTION-SCREEN COMMENT $amp TEXT-S FOR FIELD E2GROUP

copy SAP AG BC420 12-83

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 8488

se(ecti-scree )siti

)araeters E2GROUP1$amp r) ae 0 errr-sessi

SELECTION-SCREEN END OF LINE

SELECTION-SCREEN BEGIN OF LINE

SELECTION-SCREEN COMMENT $amp TEXT-S FOR FIELD ltOLDDATE

se(ecti-scree )siti $+

PARAMETERS4 ltOLDDATE LIE S9-DATUM

SELECTION-SCREEN COMMENT +11amp TEXT-S$ FOR FIELD E2USER

se(ecti-scree )siti

PARAMETERS4 E2USER1$amp DEFAULT S9-UNAME ser 0r errr-sessi

SELECTION-SCREEN END OF LINE

SELECTION-SCREEN BEGIN OF LINE

SELECTION-SCREEN COMMENT +11amp TEXT-S FOR FIELD E2EEP

se(ecti-scree )siti

PARAMETERS4 E2EEP AS CltECBOX 3 3 = 7e(ete sessi i0 0iis5e7

3X3 = gtee) sessi i0 0iis5e7

SELECTION-SCREEN END OF LINE

SELECTION-SCREEN BEGIN OF LINE

SELECTION-SCREEN COMMENT +11amp TEXT-S FOR FIELD E2ltDATE

se(ecti-scree )siti

PARAMETERS4 E2ltDATE LIE S9-DATUM

SELECTION-SCREEN END OF LINE

SELECTION-SCREEN SIP

SELECTION-SCREEN BEGIN OF LINE

SELECTION-SCREEN COMMENT 1amp TEXT-S1 FOR FIELD NODATA

PARAMETERS4 NODATA DEFAULT 33 LOER CASE 7ata

SELECTION-SCREEN END OF LINE

----------------------------------------------------------------------

Batc5i)t7ata 0 si(e trasacti

DATA4 BDCDATA LIE BDCDATA OCCURS ITlt ltEADER LINE

essaes 0 ca(( trasacti

DATA4 MESSTAB LIE BDCMSGCOLL OCCURS ITlt ltEADER LINE

errr sessi )ee7 3 3 r 3X3amp

DATA4 E2GROUP2OPENED

essae tets

TABLES4 T1

copy SAP AG BC420 12-84

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 8588

----------------------------------------------------------------------

at se(ecti scree

----------------------------------------------------------------------

AT SELECTION-SCREEN

r) a7 ser st e 0i((e7 0r create sessi

IF SESSION = 3X3 AND

GROUP = SPACE OR USER = SPACE

MESSAGE E1MSamp

ENDIF

----------------------------------------------------------------------

)e 7ataset

----------------------------------------------------------------------

FORM OPEN2DATASET USING P2DATASET

OPEN DATASET P2DATASET IN TEXT MODE

IF S9-SUBRC

RITE4 TEXT-E S9-SUBRC

STOP

ENDIF

ENDFORM

----------------------------------------------------------------------

c(se 7ataset

----------------------------------------------------------------------

FORM CLOSE2DATASET USING P2DATASET

CLOSE DATASET P2DATASET

ENDFORM

----------------------------------------------------------------------

create atc5i)t sessi

t 0r ca(( trasacti siamp

----------------------------------------------------------------------

FORM OPEN2GROUP

IF SESSION = 3X3

SIP

RITE4 $amp 3Create r)3I1amp GROUP

SIP

)e atc5i)t r)

CALL FUNCTION 3BDC2OPEN2GROUP3

EXPORTING CLIENT = S9-MANDT

copy SAP AG BC420 12-85

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 8688

GROUP = GROUP

USER = USER

EEP = EEP

ltOLDDATE = ltOLDDATE

RITE4 amp 3BDC2OPEN2GROUP3I$amp

1$amp 3retrc7e43I+amp

S9-SUBRC

ENDIF

ENDFORM

----------------------------------------------------------------------

e7 atc5i)t sessi

ca(( trasacti si4 errr sessiamp

----------------------------------------------------------------------

FORM CLOSE2GROUP

IF SESSION = 3X3

c(se atc5i)t r)

CALL FUNCTION 3BDC2CLOSE2GROUP3

RITE4 amp 3BDC2CLOSE2GROUP3Iamp

1$amp 3retrc7e43I+amp

S9-SUBRC

ELSE

IF E2GROUP2OPENED = 3X3

CALL FUNCTION 3BDC2CLOSE2GROUP3

RITE4

RITE4 amp 3Fe5(era))e 6r7e eret3Iamp

ENDIF

ENDIF

ENDFORM

----------------------------------------------------------------------

Start e6 trasacti accr7i t )araeters

----------------------------------------------------------------------

FORM BDC2TRANSACTION USING TCODE

DATA4 L2MSTRINGamp

DATA4 L2SUBRC LIE S9-SUBRC

atc5 i)t sessi

IF SESSION = 3X3

CALL FUNCTION 3BDC2INSERT3

EXPORTING TCODE = TCODE

TABLES D9NPROTAB = BDCDATA

RITE4 3BDC2INSERT3Iamp

copy SAP AG BC420 12-86

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 8788

TCODE

3retrc7e43I+amp

S9-SUBRC

3RECORD43

S9-INDEX

ca(( trasacti si

ELSE

REFRESlt MESSTAB

CALL TRANSACTION TCODE USING BDCDATA

MODE CTUMODE

UPDATE CUPDATE

MESSAGES INTO MESSTAB

L2SUBRC = S9-SUBRC

RITE4 3CALL2TRANSACTION3

TCODE

3retrc7e43I+amp

L2SUBRC

3RECORD43

S9-INDEX

LOOP AT MESSTAB

SELECT SINGLE FROM T1 ltERE SPRSL = MESSTAB-MSGSPRA

AND ARBGB = MESSTAB-MSGID

AND MSGNR = MESSTAB-MSGNR

IF S9-SUBRC =

L2MSTRING = T1-TEXT

IF L2MSTRING CS 313

REPLACE 313 ITlt MESSTAB-MSGH1 INTO L2MSTRING

REPLACE 3$3 ITlt MESSTAB-MSGH$ INTO L2MSTRING

REPLACE 33 ITlt MESSTAB-MSGH INTO L2MSTRING

REPLACE 33 ITlt MESSTAB-MSGH INTO L2MSTRING

ELSE

REPLACE 33 ITlt MESSTAB-MSGH1 INTO L2MSTRING

REPLACE 33 ITlt MESSTAB-MSGH$ INTO L2MSTRING

REPLACE 33 ITlt MESSTAB-MSGH INTO L2MSTRING

REPLACE 33 ITlt MESSTAB-MSGH INTO L2MSTRING

ENDIF

CONDENSE L2MSTRING

RITE4 MESSTAB-MSGT9P L2MSTRING$+amp

ELSE

RITE4 MESSTAB

ENDIF

ENDLOOP

copy SAP AG BC420 12-87

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 8888

SIP

Eree 0e5(era))e

IF L2SUBRC AND E2GROUP SPACE

IF E2GROUP2OPENED = 3 3

CALL FUNCTION 3BDC2OPEN2GROUP3

EXPORTING CLIENT = S9-MANDT

GROUP = E2GROUP

USER = E2USER

EEP = E2EEP

ltOLDDATE = E2ltDATE

E2GROUP2OPENED = 3X3

ENDIF

CALL FUNCTION 3BDC2INSERT3

EXPORTING TCODE = TCODE

TABLES D9NPROTAB = BDCDATA

ENDIF

ENDIF

REFRESlt BDCDATA

ENDFORM

----------------------------------------------------------------------

Start e6 scree

----------------------------------------------------------------------

FORM BDC2D9NPRO USING PROGRAM D9NPRO

CLEAR BDCDATA

BDCDATA-PROGRAM = PROGRAM

BDCDATA-D9NPRO = D9NPRO

BDCDATA-D9NBEGIN = 3X3

APPEND BDCDATA

ENDFORM

----------------------------------------------------------------------

Isert 0ie(7

Page 61: BC420_46C - 012The Transaction Recorder

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 6188

086

983209 SAP AG 1999

9illing the D Table

erorm bdcdltnro u9n8 SA)(FD +- erorm bdc9eld u9n8 BD22URSOR RFD1BUKRS- erorm bdc9eld u9n8 BD2OK2ODE 6- erorm bdc9eld u9n8 RFD1BUKRS record1BUKRS- erorm bdc9eld u9n8 RFD1KTOKD record1KTOKD-

erorm bdcdltnro u9n8 SA)(FD -

erorm bdc9eld u9n8 BD22URSOR KNA1S)RAS- erorm bdc9eld u9n8 BD2OK2ODE 6- erorm bdc9eld u9n8 KNA1NA(E record1NA(E-

erorm bdc9eld u9n8 KNA1SORT record1SORT-

Recording Benerated automaticall(

from the recording

)ERFOR( bdcdltnro USING SA)(FD +- )ERFOR( bdc9eld USING BD22URSOR RFD1BUKRS-)ERFOR( bdc9eld USING BD2OK2ODE 6-)ERFOR( bdc9eld USING RFD1BUKRS record1BUKRS-)ERFOR( bdc9eld USING RFD1KTOKD record1KTOKD-

)ERFOR( bdcdltnro USING SA)(FD -

)ERFOR( bdc9eld USING BD22URSOR KNA1S)RAS-)ERFOR( bdc9eld USING BD2OK2ODE 6-)ERFOR( bdc9eld USING KNA1NA(E record1NA(E-

)ERFOR( bdc9eld USING KNA1SORT record1SORT- ---

The 2 tae is fied $ith data from the recording The suroutines 23CNPamp5 and

23FI7+ are used for this

The suroutines are caed in the reuired structure or seuence

copy SAP AG BC420 12-61

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 6288

08amp

983209 SAP AG 1999

erie)

SAPDatabase

SeJuential9ile

SAPDatabase

ALL TRASATIALL TRASATI

SeJuential9ile

ATE IPUTATE IPUT

D TableD TableD TableD Table

I Monitor

T

In contrast to atch input you can use ca transaction to directy pass data to the diaog interface

$ithout using a atch input session Cou use an interna tae (2 tae same structure and ayout

as atch input) to temporariy store your screen data Then you ca the desired transaction in your

program

Note 5n average the 2a Transaction method is 8 to times faster than using atch Input

copy SAP AG BC420 12-62

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 6388

08

983209 SAP AG 1999

all Transaction Program$ 1ample

RE)ORT abcbdcdcdeb9ct-

)ARA(ETERS d9mode DEFAUT A

udmode DEFAUT S-FOR( calltranact9on-2A TRANSA2TION FD

USING bdcdata (ODE d9mode

U)DATE udmode-

IF lt1ubrc NE - 5RITE 6 ---

ENDIF-ENDFOR(-

Screen

00

Screen

100

Screen

An additiona system ro area is added for the caed transaction The system uses this area for

processing the individua screens in the transactionH the data from the tae is added here After the

transaction is processed the second ro area is reeasedH the system continues processing in the first

ro area

Notes

In contrast to atch input there is no error ogging (error sessions) here For processing the caed

transaction the system uses the authoriDations of the user that caed the transaction The 2 tae

can ony hod data for one transaction run at a time efore another transaction is caed and its data

can e added you must eecute a amp7Famp7S= for the 2 tae

copy SAP AG BC420 12-63

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 6488

084

983209 SAP AG 1999

ALL TRASATI C6

RE)ORT 777-

2A TRANSA2TION FD USING bdcdata (ODE E-

Default for MD1 is A

2A TRANSA2TION 3tranact9oncode4 USING 3bdc1table4 C (ODE A E N C-

-ith the parameter 57 you can seect a specific dispay mode for processing the transaction The

foo$ing three modes are avaiae

A (ispay a)

If you eecute the program a the screens and a their data are dispayed This is the defaut vaue

for the 57 in 2A++ TampANSA2TI5N

N (ispay nothing)

The screens are not dispayed at a regardess of $hether any of them contained errors As soon as

the transaction has een fuy processed contro is returned to your program (The vaue of the

parameter 4PAT7 determines $hether dataase updates are eecuted or not)

7 (ispay errors ony)As soon as an error occurs in a screen the transaction is s$itched to dispay mode so that you can

correct the errors

These dispay modes are the same as those in the atch input session processing

copy SAP AG BC420 12-64

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 6588

082

983209 SAP AG 1999

RE)ORT 777-

2A TRANSA2TION FD USING BD2DATA U)DATE -

ALL TRASATI Camp

RE)ORT 777-

2A TRANSA2TION FD USING bdcdata U)DATE -

2A TRANSA2TION 3tranact9oncode4 USING 3bdc1table4 C (ODE A E N C U)DATE A S C -

Default for UPDAT1 is A

-ith the parameter 4PAT7 you can contro ho$ dataase updates arising from a transaction are

carried out There are three options

A (asynchronous updating) The caed transaction does not $ait unti the dataase has een

updated it simpy for$ard the updates to the SAP update service This usuay speeds up the 2T

program This processing mode is N5T recommended for arge data sets as the caed transaction

does not receive a competion message from the update modue

The caing 2T program therefore cannot te if the transaction has een successfuy competed Cou

shoud use the updating administration function (transaction S8) to determine $hether updating

$as terminated eary The error anaysis correction functions for are ess hepfu than $ith

synchronous updating

S (synchronous updating) -ith synchronous updating the caed transaction $aits unti a the

updates have een competed So processing is so$er than $ith synchronous updating The caed

transaction can ho$ever report any updating errors to the program $hich maes error

anaysiscorrection easier

+ (local updating) $ith oca updating the dataase is not updated in a separate process it is

updated in the caers process (see appication hep documentation for the AAP ey$ord S7T

4PAT7 TAS6 +52A+)

copy SAP AG BC420 12-65

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 6688

088

983209 SAP AG 1999

ALL TRASATI C

RE)ORT 777-DATA mtab T0)E TABE OF bdcm8coll-

2A TRANSA2TION FD USING bdcdata (ESSAGES INTO mtab-

2A TRANSA2TION 3tranact9oncode4 USING 3bdc1table4 C (ODE A E N C U)DATE A S C (ESSAGES INTO 3metab4 C -

7SSAlt7S specifies that a system messages that are output during the eecution of a 2A++

TampANSA2TI5N are $ritten to the interna tae L7SSTA The interna tae must have the

structure 2Slt25++

4nie the cassica atch input processing $ith sessions 2A++ TampANSA2TI5N does not offer any

specia processing procedures for transactions containing errors There are no restart functions for

transactions that contain errors or that cause updating terminations

copy SAP AG BC420 12-66

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 6788

083

983209 SAP AG 1999

ALL TRASATI C4

RE)ORT 777-DATA mltot T0)E ctuaram-

2A TRANSA2TION FD USING BD2DATA

O)TIONS FRO( mltot-

2A TRANSA2TION 3tranact9oncode4 USING 3bdc1table4 C (ODE A E N C U)DATE A S C (ESSAGES INTO 3metab4 C O)TIONS FRO( ot C -

RE)ORT 777-DATA mltot T0)E ctuaram-2A TRANSA2TION FD USING bdcdata

O)TIONS FRO( mltot-

The addition 5PTI5NS enaes the ca transaction statement to e controed through a structure

The structure must have the dictionary type 2T43PAampAS

The addition 5PTI5NS Famp5 must not e comined either $ith the addition 57 or $ith

4PAT7 ore information on the net side

copy SAP AG BC420 12-67

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 6888

085

983209 SAP AG 1999

Structure TUltPARAMS

DISMD1 Procen mode anaoo o addon amp

UPDMD1 $pdae mode anaoo o addon $PA

ATTMD1 CA mode CA conro

D19SI1 orce de=a EndoE e drn procen

RAMMIT +o eD a Camp amp(

IPT +o a ac np eonF a F S-B+P SPAC

I1D +o a ac np eon a=er end o= BC daa

The components are defined as foo$s

The components 7FSIM7 ampA25IT N5INPT and N5I7N can have the foo$ing

vaues KGK E Ces or K K E No

If the addition 5PTI5NS Famp5 is not specified the foo$ing settings appy to the contro

parameters

IS57 from addition 57

4P57 from addition 4PAT7

2ATT57 2ATT not active

7FSIM7 o not not use defaut $indo$s siDe

ampA25IT Successfu eit at 25IT -5amp6

N5INPT atch input session active (SC9INPT E G)

N5I7N atch input session sti active after end of 2 data

copy SAP AG BC420 12-68

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 6988

087

983209 SAP AG 1999

SMSBID Message ID

SMSBT Message T(pe C1GIGWGSGA

SMSB Message umber

SMSB6 Message ariable 6

SMSBamp Message ariable amp

SMSB Message ariable

SMSB4 Message ariable 4

SMSBID Message ID

SMSBT Message T(pe C1GIGWGSGA

SMSB Message umber

SMSB6 Message ariable 6

SMSBamp Message ariable amp

SMSB Message ariable

SMSB4 Message ariable 4

Return code$

S(stem fields$

alue Meaning

0 Successful

6000 1rror in transaction

6000 1rror in processing call transaction

see also the s(stem fields specified

alue Meaning

0 Successful

6000 1rror in transaction

6000 1rror in processing call transaction

see also the s(stem fields specified

9ield name Meaning9ield name9ield name MeaningMeaning

Return ode and S(stem 9ields

The return code is used to specify $hether the caed transaction $as processed successfuy In

addition severa system fieds are fied The numer I type and variaes of the diaog message

output y the caed transaction Cou need this information to output the message tet

copy SAP AG BC420 12-69

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 7088

030

983209 SAP AG 1999

Benerated Program of the TA Recorder

REFRES= (ESSTAB-

2A TRANSA2TION tcode USING bdcdata (ODE ctumode U)DATE cudate (ESSAGES INTO metab-OO) AT metab- ENDOO)-IF lubrc 34 AND e8rou 34 S)A2E- IF e8rouoenend - 2A FUN2TION BD2O)ENGROU) E)ORTING ---------

--------- E8rouoened - ENDIF- 2A FUN2TION BD2INSERT E)ORTING T2ODE tcode TABES D0N)ROTAB bdcdata-ENDIF-REFRES= bdcdata-

Message table output

pen error session

Insert data record that

has errors into error

session

If you have seected ca transaction on the seection screen the generated program runs as foo$s

The onine transaction is caed $ith ca transaction and passed to tae 2ATA A the

messages arising during the ca transaction are put in the interna tae 7SSTA

7SSTA is output as a ist

If you have specified an error session ( 73ltamp54P L SPA27) on the seection screen and the

ca transaction comes across an error (+3S4amp2 L 0) the error session is opened The error

session is ho$ever ony opened once Then the data record is paced in the session

A the other data records that have errors $ith ca transaction are paced in the same session

copy SAP AG BC420 12-70

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 7188

036

983209 SAP AG 1999

The Transaction Recorder

PrinciplesPrinciples

Recording )ith the LSMWRecording )ith the LSMW

Principles of atch Input and all TransactionPrinciples of atch Input and all Transaction

Integrating the TA Program into the DWIntegrating the TA Program into the DW

Using the TA Recorder Using the TA Recorder

copy SAP AG BC420 12-71

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 7288

03amp

983209 SAP AG 1999

Integrating into the DW

Transfer program

AAP Dictionar(

Integrate

SDA0

SDA6

SDAamp

SDA

Cou can integrate the generated program into the G9- The structure of the fie must e created

in the AAP ictionary The taes SGA0 SGA8 SGA1 and SGA $i e fied

copy SAP AG BC420 12-72

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 7388

03

983209 SAP AG 1999

DW Release 42

Goo

-B eeae 45

aa ran=er ogtec

Int customer data transfer ob-ect

ecord =ed

Dece daa ran=er

d Goo

The ampunction ampor interatin TA recorder prora$s is

i$ple$ented in the

D+-B in Release

The recorder can e integrated as of ampeease and it is provided in the G9- ampeease

ltot to the G9- ampeease 5n the initia screen you can integrate programs y choosing ampoto

( +nt customer ata transfer o-ect

copy SAP AG BC420 12-73

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 7488

034

983209 SAP AG 1999

reating Program as D b-ect

Comer ran=er ogtec

ampgtec ype

Sor eD =or ogtec

aa ran=er proram

Srcre name

9900

(+A1

Cane comer

ZBCA+G

ZB

ustomer transfer ob-ect

umber bet)een 7000 and 7777

b-ect t(pe

Assignment to R ob-ect

Short tet for D ob-ectShort description

Data transfer program

ame of generated program

Structure name

A structure Cstructure la(out )ith this name is created in

the AAP Dictionar(

For ampeease transfer oects $ere not organiDed y 5amp oects ut y a G numer (00089

OOOO) The numer range O0009OOOO is reserved for customers

To create a connection to the ne$ G 9- you must assign the program to a 5amp oect

2reate a short tet for the G oect This tet $i appear in the method seection ist

Specify the program to e incuded

Specify a name for the structure to e created in the AAP ictionary

Note $he generated program appears under program type +N and not under program type

-

copy SAP AG BC420 12-74

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 7588

032

983209 SAP AG 1999

Adantages

Automatic program registration in the DW in

Release 48

ou can use all the functions defined for

standard ob-ects

1ception$ The (reate ampile ith data

function

If you incuded the oect in the ampeease $orench it is automaticay avaiae in the ampeease

B $orench

A the $orench functions are avaiae for your oect ecept for Create files ith transfer ata

copy SAP AG BC420 12-75

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 7688

038

983209 SAP AG 1999

ou are no) able to$

The Transaction Recorder$ Unit Summar(

Use the recording function in the LSMW to create

a batch input session )ith the data from the

eternal s(stem

Use the TA Recorder to create (our o)n data

transfer program

Anal(e programs that )or+ )ith batch input or

call transaction

Integrate the TA Recorder programs into the

DW

copy SAP AG BC420 12-76

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 7788

ercise 1

nit $ -ecorder

$opic 2reating etors

$ransaction -ecorder ercise 1

bull 2reating detors $ith eterna numer assignment

bull etor numers M9980008 to M9980080

Address data for detors $ith eterna numer assignment is to

e transferred using program ampFI700

ro4ect F5

Supro4ect +5

-un +575

$as)s 85 95 8S25

9oad program -F+00

8 In the foo$ing eercises eisting data is to e changed Therefore these detors $ith

eterna numer assignment have to first e created

898 4nder suproect 79 create run 797G9 $ith the name Detors ith

eternal numers

copy SAP AG BC420 12-77

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 7888

891 2reate the foo$ing three tass The tass map the foo$ing process steps

convert data create + session and process + session

89198 In run 797G9 create the foo$ing tas

9 Tas AP9

9 Name 2onvert data 9 Tas type AP

9 Program type +S-

Seect the foo$ing +S- oect

+S- proect 2109

+S- suproect 7I9

+S- oect I997GT

89191 In run 797G9 create the foo$ing tas 9 Tas +5A9

9 Name 2reate I session

Tas type +5A

9 Program type INP

Seect program ampFI700 $ith the variant

I97G9

8919 In run 797G9 create the foo$ing tas

9 Tas S29

9 Name Process I session Tas type S2

9 Program type amp7P5

Seect program ampS2S4 $ith the variant

S497G9

Note that you have to correct the seuence of the tass 2onvert data

create + session and process + session

4se the uttons

89 Start the run

The detors $i e created $ith eterna numer assignments

89 2hec in transaction F0 that the detors M9980008 to M9980080 have een

created

copy SAP AG BC420 12-78

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 7988

ercise

nit $ransaction -ecorder

$opic -ecording function in the 9S8(

bull 2reate a recording using the +S-

bull ltenerate a atch input session

2hange the detor address data in the amp System

Name of the recording +

Name of the file +2055+F9

8 2reate the recording 7I3 using the +S- ampecord the transaction F01 (2hange

detor)

898 efore you create the recording first test the transaction onineQ

For the recording use detor M9980008 5n the initia screen of the F01

maintain the foo$ing fieds ony

etor etor M9980008

2ompany code 0008

Address data seect

Note $he data record must e saved hile recording

891 aintain the names and the descriptions for the foo$ing fieds

Name city street posta code and teephone numereete a other fieds in screen 880 from the recording (eg S5ampT+ +AN8

SPampAS)

4se the same technica names as sho$n in the tae eo$ (automatic fied

mapping)

copy SAP AG BC420 12-79

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 8088

1 2reate the suproect 7I9 and the ne$ oect TA3 in your proect 2109

aintain the oect attriutes and seect the item atch input recording Seect your

recording 7I3

2reate the source structure address

2reate the source fieds according to the tae eo$ 5r copy them from proect 2109S37N suproect 7I900 oect TA900

198 Fie setup The data from the egacy system are dispayed in the foo$ing tae

Fied name Fied type Fied ength escription

N5 2 8B etor numer

NA7 2 Name

STamp77T 2 Street

2ITC 2 2ityPace of residence

MIP 2 80 Posta code

T7+ 2 8B Teephone numer

191 aintain the fied mapping 4se the automatic fied mapping (via menu item

7tras)

19 Specify the fies 5ny maintain the fie name of the source fie

Name of the fie 21099IFI+7

2odepage 8800

19 Import the data and convert them ispay the data in each caseQ

19 2reate a atch input session

19B ampun the atch input session

copy SAP AG BC420 12-80

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 8188

ercise 3

nit $ransaction -ecorder

$opic -ecording ith the $ -ecorder

bull ltenerate a recording using the TA recorder

bull Test the recording

2hange the address data of detors in the amp system

Name recording $+

Name of the file +2055+F9

8 2reate the recording TA37I3 using the transaction recorder ampecord the

transaction F01 (change detor)

898 4se detor M9980008 for the recording 5n the F01 initia screen ony

maintain the foo$ing fieds

etor etor M9980008

2ompany 2ode 0008

Address data seect

Note $he data record must e saved hen recording

eete a fieds that do not eist in the source fie 21099IFI+7 from screen

880 in the recording (eg 6NA89S5ampT+ 6NA89+AN8 6ANNQ9SPampAS) Note o not deete fieds ampF01946ampS and ampF0190880

Save the recording no$

1 S$itch to the recordings overvie$

198 Process the recording $ith the processing mode A (dispay a)

191 Process the recording $ith the processing mode RN (no dispay)

19 If the recording has een tested and no error has occurred generate a I session

and run it using the I monitor If an error shoud occur generate the recordingagainQ

copy SAP AG BC420 12-81

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 8288

From the recording generate the program M21037I3 in your deveopment cass

2109 Seect the foo$ing

bull ampead fied contents from fie

bull 2reate test data in the fie 2103dei3test3tt

98 Save this program and eecute it ltenerate one I session each and process it

2arry out the same steps again using the ca transaction

The generated program shoud no$ e changed so that fie 21099IFI+7 can e

read and processed

98 2hange the defaut vaue of the fie name (parameter dataset) in 21099

IFI+7

91 2hange the structure definition eete the company code fied and the address

data checo from the structure

9 2hange the su9routine ca perform dc3fied for the company code (KampF019

46ampSK) so that the vaue 0008 is transferred

9 2hange the su9routine ca perform dc3fied for the address data checo

(KampF0190880K) so that the vaue G is transferred

9 Start the program again and read the data from the fie 21099IFI+7 $ith

detor data ltenerate a I session $ith it and run it

copy SAP AG BC420 12-82

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 8388

033 Include DR16INCLUDE BDCRECX1

SELECTION-SCREEN BEGIN OF LINE

PARAMETERS SESSION RADIOBUTTON GROUP CTU create sessi SELECTION-SCREEN COMMENT $amp TEXT-S FOR FIELD SESSION

se(ecti-scree )siti +

PARAMETERS CTU RADIOBUTTON GROUP CTU ca(( trasacti

SELECTION-SCREEN COMMENT $amp TEXT-S FOR FIELD CTU

SELECTION-SCREEN END OF LINE

SELECTION-SCREEN BEGIN OF LINE

SELECTION-SCREEN COMMENT $amp TEXT-S1 FOR FIELD GROUP

se(ecti-scree )siti $+

PARAMETERS GROUP1$amp r) ae 0 sessi

SELECTION-SCREEN COMMENT $amp TEXT-S+ FOR FIELD CTUMODE

se(ecti-scree )siti

PARAMETERS CTUMODE LIE CTU2PARAMS-DISMODE DEFAULT 3N3

A4 s56 a(( 78)rs

E4 s56 78)r errr (8

N4 7 t 7is)(a8 78)r

SELECTION-SCREEN END OF LINE

SELECTION-SCREEN BEGIN OF LINE

SELECTION-SCREEN COMMENT $amp TEXT-S$ FOR FIELD USER

se(ecti-scree )siti $+

PARAMETERS4 USER1$amp DEFAULT S9-UNAME ser 0r sessi i atc5

SELECTION-SCREEN COMMENT $amp TEXT-S FOR FIELD CUPDATE

se(ecti-scree )siti

PARAMETERS CUPDATE LIE CTU2PARAMS-UPDMODE DEFAULT 3L3

S4 s8c5rs(8

A4 as8c5rs(8

L4 (ca(

SELECTION-SCREEN END OF LINE

SELECTION-SCREEN BEGIN OF LINE

SELECTION-SCREEN COMMENT $amp TEXT-S FOR FIELD EEP

se(ecti-scree )siti $+

PARAMETERS4 EEP AS CltECBOX 3 3 = 7e(ete sessi i0 0iis5e7

3X3 = gtee) sessi i0 0iis5e7

SELECTION-SCREEN COMMENT $amp TEXT-S FOR FIELD E2GROUP

copy SAP AG BC420 12-83

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 8488

se(ecti-scree )siti

)araeters E2GROUP1$amp r) ae 0 errr-sessi

SELECTION-SCREEN END OF LINE

SELECTION-SCREEN BEGIN OF LINE

SELECTION-SCREEN COMMENT $amp TEXT-S FOR FIELD ltOLDDATE

se(ecti-scree )siti $+

PARAMETERS4 ltOLDDATE LIE S9-DATUM

SELECTION-SCREEN COMMENT +11amp TEXT-S$ FOR FIELD E2USER

se(ecti-scree )siti

PARAMETERS4 E2USER1$amp DEFAULT S9-UNAME ser 0r errr-sessi

SELECTION-SCREEN END OF LINE

SELECTION-SCREEN BEGIN OF LINE

SELECTION-SCREEN COMMENT +11amp TEXT-S FOR FIELD E2EEP

se(ecti-scree )siti

PARAMETERS4 E2EEP AS CltECBOX 3 3 = 7e(ete sessi i0 0iis5e7

3X3 = gtee) sessi i0 0iis5e7

SELECTION-SCREEN END OF LINE

SELECTION-SCREEN BEGIN OF LINE

SELECTION-SCREEN COMMENT +11amp TEXT-S FOR FIELD E2ltDATE

se(ecti-scree )siti

PARAMETERS4 E2ltDATE LIE S9-DATUM

SELECTION-SCREEN END OF LINE

SELECTION-SCREEN SIP

SELECTION-SCREEN BEGIN OF LINE

SELECTION-SCREEN COMMENT 1amp TEXT-S1 FOR FIELD NODATA

PARAMETERS4 NODATA DEFAULT 33 LOER CASE 7ata

SELECTION-SCREEN END OF LINE

----------------------------------------------------------------------

Batc5i)t7ata 0 si(e trasacti

DATA4 BDCDATA LIE BDCDATA OCCURS ITlt ltEADER LINE

essaes 0 ca(( trasacti

DATA4 MESSTAB LIE BDCMSGCOLL OCCURS ITlt ltEADER LINE

errr sessi )ee7 3 3 r 3X3amp

DATA4 E2GROUP2OPENED

essae tets

TABLES4 T1

copy SAP AG BC420 12-84

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 8588

----------------------------------------------------------------------

at se(ecti scree

----------------------------------------------------------------------

AT SELECTION-SCREEN

r) a7 ser st e 0i((e7 0r create sessi

IF SESSION = 3X3 AND

GROUP = SPACE OR USER = SPACE

MESSAGE E1MSamp

ENDIF

----------------------------------------------------------------------

)e 7ataset

----------------------------------------------------------------------

FORM OPEN2DATASET USING P2DATASET

OPEN DATASET P2DATASET IN TEXT MODE

IF S9-SUBRC

RITE4 TEXT-E S9-SUBRC

STOP

ENDIF

ENDFORM

----------------------------------------------------------------------

c(se 7ataset

----------------------------------------------------------------------

FORM CLOSE2DATASET USING P2DATASET

CLOSE DATASET P2DATASET

ENDFORM

----------------------------------------------------------------------

create atc5i)t sessi

t 0r ca(( trasacti siamp

----------------------------------------------------------------------

FORM OPEN2GROUP

IF SESSION = 3X3

SIP

RITE4 $amp 3Create r)3I1amp GROUP

SIP

)e atc5i)t r)

CALL FUNCTION 3BDC2OPEN2GROUP3

EXPORTING CLIENT = S9-MANDT

copy SAP AG BC420 12-85

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 8688

GROUP = GROUP

USER = USER

EEP = EEP

ltOLDDATE = ltOLDDATE

RITE4 amp 3BDC2OPEN2GROUP3I$amp

1$amp 3retrc7e43I+amp

S9-SUBRC

ENDIF

ENDFORM

----------------------------------------------------------------------

e7 atc5i)t sessi

ca(( trasacti si4 errr sessiamp

----------------------------------------------------------------------

FORM CLOSE2GROUP

IF SESSION = 3X3

c(se atc5i)t r)

CALL FUNCTION 3BDC2CLOSE2GROUP3

RITE4 amp 3BDC2CLOSE2GROUP3Iamp

1$amp 3retrc7e43I+amp

S9-SUBRC

ELSE

IF E2GROUP2OPENED = 3X3

CALL FUNCTION 3BDC2CLOSE2GROUP3

RITE4

RITE4 amp 3Fe5(era))e 6r7e eret3Iamp

ENDIF

ENDIF

ENDFORM

----------------------------------------------------------------------

Start e6 trasacti accr7i t )araeters

----------------------------------------------------------------------

FORM BDC2TRANSACTION USING TCODE

DATA4 L2MSTRINGamp

DATA4 L2SUBRC LIE S9-SUBRC

atc5 i)t sessi

IF SESSION = 3X3

CALL FUNCTION 3BDC2INSERT3

EXPORTING TCODE = TCODE

TABLES D9NPROTAB = BDCDATA

RITE4 3BDC2INSERT3Iamp

copy SAP AG BC420 12-86

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 8788

TCODE

3retrc7e43I+amp

S9-SUBRC

3RECORD43

S9-INDEX

ca(( trasacti si

ELSE

REFRESlt MESSTAB

CALL TRANSACTION TCODE USING BDCDATA

MODE CTUMODE

UPDATE CUPDATE

MESSAGES INTO MESSTAB

L2SUBRC = S9-SUBRC

RITE4 3CALL2TRANSACTION3

TCODE

3retrc7e43I+amp

L2SUBRC

3RECORD43

S9-INDEX

LOOP AT MESSTAB

SELECT SINGLE FROM T1 ltERE SPRSL = MESSTAB-MSGSPRA

AND ARBGB = MESSTAB-MSGID

AND MSGNR = MESSTAB-MSGNR

IF S9-SUBRC =

L2MSTRING = T1-TEXT

IF L2MSTRING CS 313

REPLACE 313 ITlt MESSTAB-MSGH1 INTO L2MSTRING

REPLACE 3$3 ITlt MESSTAB-MSGH$ INTO L2MSTRING

REPLACE 33 ITlt MESSTAB-MSGH INTO L2MSTRING

REPLACE 33 ITlt MESSTAB-MSGH INTO L2MSTRING

ELSE

REPLACE 33 ITlt MESSTAB-MSGH1 INTO L2MSTRING

REPLACE 33 ITlt MESSTAB-MSGH$ INTO L2MSTRING

REPLACE 33 ITlt MESSTAB-MSGH INTO L2MSTRING

REPLACE 33 ITlt MESSTAB-MSGH INTO L2MSTRING

ENDIF

CONDENSE L2MSTRING

RITE4 MESSTAB-MSGT9P L2MSTRING$+amp

ELSE

RITE4 MESSTAB

ENDIF

ENDLOOP

copy SAP AG BC420 12-87

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 8888

SIP

Eree 0e5(era))e

IF L2SUBRC AND E2GROUP SPACE

IF E2GROUP2OPENED = 3 3

CALL FUNCTION 3BDC2OPEN2GROUP3

EXPORTING CLIENT = S9-MANDT

GROUP = E2GROUP

USER = E2USER

EEP = E2EEP

ltOLDDATE = E2ltDATE

E2GROUP2OPENED = 3X3

ENDIF

CALL FUNCTION 3BDC2INSERT3

EXPORTING TCODE = TCODE

TABLES D9NPROTAB = BDCDATA

ENDIF

ENDIF

REFRESlt BDCDATA

ENDFORM

----------------------------------------------------------------------

Start e6 scree

----------------------------------------------------------------------

FORM BDC2D9NPRO USING PROGRAM D9NPRO

CLEAR BDCDATA

BDCDATA-PROGRAM = PROGRAM

BDCDATA-D9NPRO = D9NPRO

BDCDATA-D9NBEGIN = 3X3

APPEND BDCDATA

ENDFORM

----------------------------------------------------------------------

Isert 0ie(7

Page 62: BC420_46C - 012The Transaction Recorder

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 6288

08amp

983209 SAP AG 1999

erie)

SAPDatabase

SeJuential9ile

SAPDatabase

ALL TRASATIALL TRASATI

SeJuential9ile

ATE IPUTATE IPUT

D TableD TableD TableD Table

I Monitor

T

In contrast to atch input you can use ca transaction to directy pass data to the diaog interface

$ithout using a atch input session Cou use an interna tae (2 tae same structure and ayout

as atch input) to temporariy store your screen data Then you ca the desired transaction in your

program

Note 5n average the 2a Transaction method is 8 to times faster than using atch Input

copy SAP AG BC420 12-62

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 6388

08

983209 SAP AG 1999

all Transaction Program$ 1ample

RE)ORT abcbdcdcdeb9ct-

)ARA(ETERS d9mode DEFAUT A

udmode DEFAUT S-FOR( calltranact9on-2A TRANSA2TION FD

USING bdcdata (ODE d9mode

U)DATE udmode-

IF lt1ubrc NE - 5RITE 6 ---

ENDIF-ENDFOR(-

Screen

00

Screen

100

Screen

An additiona system ro area is added for the caed transaction The system uses this area for

processing the individua screens in the transactionH the data from the tae is added here After the

transaction is processed the second ro area is reeasedH the system continues processing in the first

ro area

Notes

In contrast to atch input there is no error ogging (error sessions) here For processing the caed

transaction the system uses the authoriDations of the user that caed the transaction The 2 tae

can ony hod data for one transaction run at a time efore another transaction is caed and its data

can e added you must eecute a amp7Famp7S= for the 2 tae

copy SAP AG BC420 12-63

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 6488

084

983209 SAP AG 1999

ALL TRASATI C6

RE)ORT 777-

2A TRANSA2TION FD USING bdcdata (ODE E-

Default for MD1 is A

2A TRANSA2TION 3tranact9oncode4 USING 3bdc1table4 C (ODE A E N C-

-ith the parameter 57 you can seect a specific dispay mode for processing the transaction The

foo$ing three modes are avaiae

A (ispay a)

If you eecute the program a the screens and a their data are dispayed This is the defaut vaue

for the 57 in 2A++ TampANSA2TI5N

N (ispay nothing)

The screens are not dispayed at a regardess of $hether any of them contained errors As soon as

the transaction has een fuy processed contro is returned to your program (The vaue of the

parameter 4PAT7 determines $hether dataase updates are eecuted or not)

7 (ispay errors ony)As soon as an error occurs in a screen the transaction is s$itched to dispay mode so that you can

correct the errors

These dispay modes are the same as those in the atch input session processing

copy SAP AG BC420 12-64

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 6588

082

983209 SAP AG 1999

RE)ORT 777-

2A TRANSA2TION FD USING BD2DATA U)DATE -

ALL TRASATI Camp

RE)ORT 777-

2A TRANSA2TION FD USING bdcdata U)DATE -

2A TRANSA2TION 3tranact9oncode4 USING 3bdc1table4 C (ODE A E N C U)DATE A S C -

Default for UPDAT1 is A

-ith the parameter 4PAT7 you can contro ho$ dataase updates arising from a transaction are

carried out There are three options

A (asynchronous updating) The caed transaction does not $ait unti the dataase has een

updated it simpy for$ard the updates to the SAP update service This usuay speeds up the 2T

program This processing mode is N5T recommended for arge data sets as the caed transaction

does not receive a competion message from the update modue

The caing 2T program therefore cannot te if the transaction has een successfuy competed Cou

shoud use the updating administration function (transaction S8) to determine $hether updating

$as terminated eary The error anaysis correction functions for are ess hepfu than $ith

synchronous updating

S (synchronous updating) -ith synchronous updating the caed transaction $aits unti a the

updates have een competed So processing is so$er than $ith synchronous updating The caed

transaction can ho$ever report any updating errors to the program $hich maes error

anaysiscorrection easier

+ (local updating) $ith oca updating the dataase is not updated in a separate process it is

updated in the caers process (see appication hep documentation for the AAP ey$ord S7T

4PAT7 TAS6 +52A+)

copy SAP AG BC420 12-65

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 6688

088

983209 SAP AG 1999

ALL TRASATI C

RE)ORT 777-DATA mtab T0)E TABE OF bdcm8coll-

2A TRANSA2TION FD USING bdcdata (ESSAGES INTO mtab-

2A TRANSA2TION 3tranact9oncode4 USING 3bdc1table4 C (ODE A E N C U)DATE A S C (ESSAGES INTO 3metab4 C -

7SSAlt7S specifies that a system messages that are output during the eecution of a 2A++

TampANSA2TI5N are $ritten to the interna tae L7SSTA The interna tae must have the

structure 2Slt25++

4nie the cassica atch input processing $ith sessions 2A++ TampANSA2TI5N does not offer any

specia processing procedures for transactions containing errors There are no restart functions for

transactions that contain errors or that cause updating terminations

copy SAP AG BC420 12-66

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 6788

083

983209 SAP AG 1999

ALL TRASATI C4

RE)ORT 777-DATA mltot T0)E ctuaram-

2A TRANSA2TION FD USING BD2DATA

O)TIONS FRO( mltot-

2A TRANSA2TION 3tranact9oncode4 USING 3bdc1table4 C (ODE A E N C U)DATE A S C (ESSAGES INTO 3metab4 C O)TIONS FRO( ot C -

RE)ORT 777-DATA mltot T0)E ctuaram-2A TRANSA2TION FD USING bdcdata

O)TIONS FRO( mltot-

The addition 5PTI5NS enaes the ca transaction statement to e controed through a structure

The structure must have the dictionary type 2T43PAampAS

The addition 5PTI5NS Famp5 must not e comined either $ith the addition 57 or $ith

4PAT7 ore information on the net side

copy SAP AG BC420 12-67

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 6888

085

983209 SAP AG 1999

Structure TUltPARAMS

DISMD1 Procen mode anaoo o addon amp

UPDMD1 $pdae mode anaoo o addon $PA

ATTMD1 CA mode CA conro

D19SI1 orce de=a EndoE e drn procen

RAMMIT +o eD a Camp amp(

IPT +o a ac np eonF a F S-B+P SPAC

I1D +o a ac np eon a=er end o= BC daa

The components are defined as foo$s

The components 7FSIM7 ampA25IT N5INPT and N5I7N can have the foo$ing

vaues KGK E Ces or K K E No

If the addition 5PTI5NS Famp5 is not specified the foo$ing settings appy to the contro

parameters

IS57 from addition 57

4P57 from addition 4PAT7

2ATT57 2ATT not active

7FSIM7 o not not use defaut $indo$s siDe

ampA25IT Successfu eit at 25IT -5amp6

N5INPT atch input session active (SC9INPT E G)

N5I7N atch input session sti active after end of 2 data

copy SAP AG BC420 12-68

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 6988

087

983209 SAP AG 1999

SMSBID Message ID

SMSBT Message T(pe C1GIGWGSGA

SMSB Message umber

SMSB6 Message ariable 6

SMSBamp Message ariable amp

SMSB Message ariable

SMSB4 Message ariable 4

SMSBID Message ID

SMSBT Message T(pe C1GIGWGSGA

SMSB Message umber

SMSB6 Message ariable 6

SMSBamp Message ariable amp

SMSB Message ariable

SMSB4 Message ariable 4

Return code$

S(stem fields$

alue Meaning

0 Successful

6000 1rror in transaction

6000 1rror in processing call transaction

see also the s(stem fields specified

alue Meaning

0 Successful

6000 1rror in transaction

6000 1rror in processing call transaction

see also the s(stem fields specified

9ield name Meaning9ield name9ield name MeaningMeaning

Return ode and S(stem 9ields

The return code is used to specify $hether the caed transaction $as processed successfuy In

addition severa system fieds are fied The numer I type and variaes of the diaog message

output y the caed transaction Cou need this information to output the message tet

copy SAP AG BC420 12-69

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 7088

030

983209 SAP AG 1999

Benerated Program of the TA Recorder

REFRES= (ESSTAB-

2A TRANSA2TION tcode USING bdcdata (ODE ctumode U)DATE cudate (ESSAGES INTO metab-OO) AT metab- ENDOO)-IF lubrc 34 AND e8rou 34 S)A2E- IF e8rouoenend - 2A FUN2TION BD2O)ENGROU) E)ORTING ---------

--------- E8rouoened - ENDIF- 2A FUN2TION BD2INSERT E)ORTING T2ODE tcode TABES D0N)ROTAB bdcdata-ENDIF-REFRES= bdcdata-

Message table output

pen error session

Insert data record that

has errors into error

session

If you have seected ca transaction on the seection screen the generated program runs as foo$s

The onine transaction is caed $ith ca transaction and passed to tae 2ATA A the

messages arising during the ca transaction are put in the interna tae 7SSTA

7SSTA is output as a ist

If you have specified an error session ( 73ltamp54P L SPA27) on the seection screen and the

ca transaction comes across an error (+3S4amp2 L 0) the error session is opened The error

session is ho$ever ony opened once Then the data record is paced in the session

A the other data records that have errors $ith ca transaction are paced in the same session

copy SAP AG BC420 12-70

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 7188

036

983209 SAP AG 1999

The Transaction Recorder

PrinciplesPrinciples

Recording )ith the LSMWRecording )ith the LSMW

Principles of atch Input and all TransactionPrinciples of atch Input and all Transaction

Integrating the TA Program into the DWIntegrating the TA Program into the DW

Using the TA Recorder Using the TA Recorder

copy SAP AG BC420 12-71

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 7288

03amp

983209 SAP AG 1999

Integrating into the DW

Transfer program

AAP Dictionar(

Integrate

SDA0

SDA6

SDAamp

SDA

Cou can integrate the generated program into the G9- The structure of the fie must e created

in the AAP ictionary The taes SGA0 SGA8 SGA1 and SGA $i e fied

copy SAP AG BC420 12-72

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 7388

03

983209 SAP AG 1999

DW Release 42

Goo

-B eeae 45

aa ran=er ogtec

Int customer data transfer ob-ect

ecord =ed

Dece daa ran=er

d Goo

The ampunction ampor interatin TA recorder prora$s is

i$ple$ented in the

D+-B in Release

The recorder can e integrated as of ampeease and it is provided in the G9- ampeease

ltot to the G9- ampeease 5n the initia screen you can integrate programs y choosing ampoto

( +nt customer ata transfer o-ect

copy SAP AG BC420 12-73

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 7488

034

983209 SAP AG 1999

reating Program as D b-ect

Comer ran=er ogtec

ampgtec ype

Sor eD =or ogtec

aa ran=er proram

Srcre name

9900

(+A1

Cane comer

ZBCA+G

ZB

ustomer transfer ob-ect

umber bet)een 7000 and 7777

b-ect t(pe

Assignment to R ob-ect

Short tet for D ob-ectShort description

Data transfer program

ame of generated program

Structure name

A structure Cstructure la(out )ith this name is created in

the AAP Dictionar(

For ampeease transfer oects $ere not organiDed y 5amp oects ut y a G numer (00089

OOOO) The numer range O0009OOOO is reserved for customers

To create a connection to the ne$ G 9- you must assign the program to a 5amp oect

2reate a short tet for the G oect This tet $i appear in the method seection ist

Specify the program to e incuded

Specify a name for the structure to e created in the AAP ictionary

Note $he generated program appears under program type +N and not under program type

-

copy SAP AG BC420 12-74

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 7588

032

983209 SAP AG 1999

Adantages

Automatic program registration in the DW in

Release 48

ou can use all the functions defined for

standard ob-ects

1ception$ The (reate ampile ith data

function

If you incuded the oect in the ampeease $orench it is automaticay avaiae in the ampeease

B $orench

A the $orench functions are avaiae for your oect ecept for Create files ith transfer ata

copy SAP AG BC420 12-75

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 7688

038

983209 SAP AG 1999

ou are no) able to$

The Transaction Recorder$ Unit Summar(

Use the recording function in the LSMW to create

a batch input session )ith the data from the

eternal s(stem

Use the TA Recorder to create (our o)n data

transfer program

Anal(e programs that )or+ )ith batch input or

call transaction

Integrate the TA Recorder programs into the

DW

copy SAP AG BC420 12-76

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 7788

ercise 1

nit $ -ecorder

$opic 2reating etors

$ransaction -ecorder ercise 1

bull 2reating detors $ith eterna numer assignment

bull etor numers M9980008 to M9980080

Address data for detors $ith eterna numer assignment is to

e transferred using program ampFI700

ro4ect F5

Supro4ect +5

-un +575

$as)s 85 95 8S25

9oad program -F+00

8 In the foo$ing eercises eisting data is to e changed Therefore these detors $ith

eterna numer assignment have to first e created

898 4nder suproect 79 create run 797G9 $ith the name Detors ith

eternal numers

copy SAP AG BC420 12-77

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 7888

891 2reate the foo$ing three tass The tass map the foo$ing process steps

convert data create + session and process + session

89198 In run 797G9 create the foo$ing tas

9 Tas AP9

9 Name 2onvert data 9 Tas type AP

9 Program type +S-

Seect the foo$ing +S- oect

+S- proect 2109

+S- suproect 7I9

+S- oect I997GT

89191 In run 797G9 create the foo$ing tas 9 Tas +5A9

9 Name 2reate I session

Tas type +5A

9 Program type INP

Seect program ampFI700 $ith the variant

I97G9

8919 In run 797G9 create the foo$ing tas

9 Tas S29

9 Name Process I session Tas type S2

9 Program type amp7P5

Seect program ampS2S4 $ith the variant

S497G9

Note that you have to correct the seuence of the tass 2onvert data

create + session and process + session

4se the uttons

89 Start the run

The detors $i e created $ith eterna numer assignments

89 2hec in transaction F0 that the detors M9980008 to M9980080 have een

created

copy SAP AG BC420 12-78

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 7988

ercise

nit $ransaction -ecorder

$opic -ecording function in the 9S8(

bull 2reate a recording using the +S-

bull ltenerate a atch input session

2hange the detor address data in the amp System

Name of the recording +

Name of the file +2055+F9

8 2reate the recording 7I3 using the +S- ampecord the transaction F01 (2hange

detor)

898 efore you create the recording first test the transaction onineQ

For the recording use detor M9980008 5n the initia screen of the F01

maintain the foo$ing fieds ony

etor etor M9980008

2ompany code 0008

Address data seect

Note $he data record must e saved hile recording

891 aintain the names and the descriptions for the foo$ing fieds

Name city street posta code and teephone numereete a other fieds in screen 880 from the recording (eg S5ampT+ +AN8

SPampAS)

4se the same technica names as sho$n in the tae eo$ (automatic fied

mapping)

copy SAP AG BC420 12-79

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 8088

1 2reate the suproect 7I9 and the ne$ oect TA3 in your proect 2109

aintain the oect attriutes and seect the item atch input recording Seect your

recording 7I3

2reate the source structure address

2reate the source fieds according to the tae eo$ 5r copy them from proect 2109S37N suproect 7I900 oect TA900

198 Fie setup The data from the egacy system are dispayed in the foo$ing tae

Fied name Fied type Fied ength escription

N5 2 8B etor numer

NA7 2 Name

STamp77T 2 Street

2ITC 2 2ityPace of residence

MIP 2 80 Posta code

T7+ 2 8B Teephone numer

191 aintain the fied mapping 4se the automatic fied mapping (via menu item

7tras)

19 Specify the fies 5ny maintain the fie name of the source fie

Name of the fie 21099IFI+7

2odepage 8800

19 Import the data and convert them ispay the data in each caseQ

19 2reate a atch input session

19B ampun the atch input session

copy SAP AG BC420 12-80

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 8188

ercise 3

nit $ransaction -ecorder

$opic -ecording ith the $ -ecorder

bull ltenerate a recording using the TA recorder

bull Test the recording

2hange the address data of detors in the amp system

Name recording $+

Name of the file +2055+F9

8 2reate the recording TA37I3 using the transaction recorder ampecord the

transaction F01 (change detor)

898 4se detor M9980008 for the recording 5n the F01 initia screen ony

maintain the foo$ing fieds

etor etor M9980008

2ompany 2ode 0008

Address data seect

Note $he data record must e saved hen recording

eete a fieds that do not eist in the source fie 21099IFI+7 from screen

880 in the recording (eg 6NA89S5ampT+ 6NA89+AN8 6ANNQ9SPampAS) Note o not deete fieds ampF01946ampS and ampF0190880

Save the recording no$

1 S$itch to the recordings overvie$

198 Process the recording $ith the processing mode A (dispay a)

191 Process the recording $ith the processing mode RN (no dispay)

19 If the recording has een tested and no error has occurred generate a I session

and run it using the I monitor If an error shoud occur generate the recordingagainQ

copy SAP AG BC420 12-81

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 8288

From the recording generate the program M21037I3 in your deveopment cass

2109 Seect the foo$ing

bull ampead fied contents from fie

bull 2reate test data in the fie 2103dei3test3tt

98 Save this program and eecute it ltenerate one I session each and process it

2arry out the same steps again using the ca transaction

The generated program shoud no$ e changed so that fie 21099IFI+7 can e

read and processed

98 2hange the defaut vaue of the fie name (parameter dataset) in 21099

IFI+7

91 2hange the structure definition eete the company code fied and the address

data checo from the structure

9 2hange the su9routine ca perform dc3fied for the company code (KampF019

46ampSK) so that the vaue 0008 is transferred

9 2hange the su9routine ca perform dc3fied for the address data checo

(KampF0190880K) so that the vaue G is transferred

9 Start the program again and read the data from the fie 21099IFI+7 $ith

detor data ltenerate a I session $ith it and run it

copy SAP AG BC420 12-82

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 8388

033 Include DR16INCLUDE BDCRECX1

SELECTION-SCREEN BEGIN OF LINE

PARAMETERS SESSION RADIOBUTTON GROUP CTU create sessi SELECTION-SCREEN COMMENT $amp TEXT-S FOR FIELD SESSION

se(ecti-scree )siti +

PARAMETERS CTU RADIOBUTTON GROUP CTU ca(( trasacti

SELECTION-SCREEN COMMENT $amp TEXT-S FOR FIELD CTU

SELECTION-SCREEN END OF LINE

SELECTION-SCREEN BEGIN OF LINE

SELECTION-SCREEN COMMENT $amp TEXT-S1 FOR FIELD GROUP

se(ecti-scree )siti $+

PARAMETERS GROUP1$amp r) ae 0 sessi

SELECTION-SCREEN COMMENT $amp TEXT-S+ FOR FIELD CTUMODE

se(ecti-scree )siti

PARAMETERS CTUMODE LIE CTU2PARAMS-DISMODE DEFAULT 3N3

A4 s56 a(( 78)rs

E4 s56 78)r errr (8

N4 7 t 7is)(a8 78)r

SELECTION-SCREEN END OF LINE

SELECTION-SCREEN BEGIN OF LINE

SELECTION-SCREEN COMMENT $amp TEXT-S$ FOR FIELD USER

se(ecti-scree )siti $+

PARAMETERS4 USER1$amp DEFAULT S9-UNAME ser 0r sessi i atc5

SELECTION-SCREEN COMMENT $amp TEXT-S FOR FIELD CUPDATE

se(ecti-scree )siti

PARAMETERS CUPDATE LIE CTU2PARAMS-UPDMODE DEFAULT 3L3

S4 s8c5rs(8

A4 as8c5rs(8

L4 (ca(

SELECTION-SCREEN END OF LINE

SELECTION-SCREEN BEGIN OF LINE

SELECTION-SCREEN COMMENT $amp TEXT-S FOR FIELD EEP

se(ecti-scree )siti $+

PARAMETERS4 EEP AS CltECBOX 3 3 = 7e(ete sessi i0 0iis5e7

3X3 = gtee) sessi i0 0iis5e7

SELECTION-SCREEN COMMENT $amp TEXT-S FOR FIELD E2GROUP

copy SAP AG BC420 12-83

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 8488

se(ecti-scree )siti

)araeters E2GROUP1$amp r) ae 0 errr-sessi

SELECTION-SCREEN END OF LINE

SELECTION-SCREEN BEGIN OF LINE

SELECTION-SCREEN COMMENT $amp TEXT-S FOR FIELD ltOLDDATE

se(ecti-scree )siti $+

PARAMETERS4 ltOLDDATE LIE S9-DATUM

SELECTION-SCREEN COMMENT +11amp TEXT-S$ FOR FIELD E2USER

se(ecti-scree )siti

PARAMETERS4 E2USER1$amp DEFAULT S9-UNAME ser 0r errr-sessi

SELECTION-SCREEN END OF LINE

SELECTION-SCREEN BEGIN OF LINE

SELECTION-SCREEN COMMENT +11amp TEXT-S FOR FIELD E2EEP

se(ecti-scree )siti

PARAMETERS4 E2EEP AS CltECBOX 3 3 = 7e(ete sessi i0 0iis5e7

3X3 = gtee) sessi i0 0iis5e7

SELECTION-SCREEN END OF LINE

SELECTION-SCREEN BEGIN OF LINE

SELECTION-SCREEN COMMENT +11amp TEXT-S FOR FIELD E2ltDATE

se(ecti-scree )siti

PARAMETERS4 E2ltDATE LIE S9-DATUM

SELECTION-SCREEN END OF LINE

SELECTION-SCREEN SIP

SELECTION-SCREEN BEGIN OF LINE

SELECTION-SCREEN COMMENT 1amp TEXT-S1 FOR FIELD NODATA

PARAMETERS4 NODATA DEFAULT 33 LOER CASE 7ata

SELECTION-SCREEN END OF LINE

----------------------------------------------------------------------

Batc5i)t7ata 0 si(e trasacti

DATA4 BDCDATA LIE BDCDATA OCCURS ITlt ltEADER LINE

essaes 0 ca(( trasacti

DATA4 MESSTAB LIE BDCMSGCOLL OCCURS ITlt ltEADER LINE

errr sessi )ee7 3 3 r 3X3amp

DATA4 E2GROUP2OPENED

essae tets

TABLES4 T1

copy SAP AG BC420 12-84

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 8588

----------------------------------------------------------------------

at se(ecti scree

----------------------------------------------------------------------

AT SELECTION-SCREEN

r) a7 ser st e 0i((e7 0r create sessi

IF SESSION = 3X3 AND

GROUP = SPACE OR USER = SPACE

MESSAGE E1MSamp

ENDIF

----------------------------------------------------------------------

)e 7ataset

----------------------------------------------------------------------

FORM OPEN2DATASET USING P2DATASET

OPEN DATASET P2DATASET IN TEXT MODE

IF S9-SUBRC

RITE4 TEXT-E S9-SUBRC

STOP

ENDIF

ENDFORM

----------------------------------------------------------------------

c(se 7ataset

----------------------------------------------------------------------

FORM CLOSE2DATASET USING P2DATASET

CLOSE DATASET P2DATASET

ENDFORM

----------------------------------------------------------------------

create atc5i)t sessi

t 0r ca(( trasacti siamp

----------------------------------------------------------------------

FORM OPEN2GROUP

IF SESSION = 3X3

SIP

RITE4 $amp 3Create r)3I1amp GROUP

SIP

)e atc5i)t r)

CALL FUNCTION 3BDC2OPEN2GROUP3

EXPORTING CLIENT = S9-MANDT

copy SAP AG BC420 12-85

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 8688

GROUP = GROUP

USER = USER

EEP = EEP

ltOLDDATE = ltOLDDATE

RITE4 amp 3BDC2OPEN2GROUP3I$amp

1$amp 3retrc7e43I+amp

S9-SUBRC

ENDIF

ENDFORM

----------------------------------------------------------------------

e7 atc5i)t sessi

ca(( trasacti si4 errr sessiamp

----------------------------------------------------------------------

FORM CLOSE2GROUP

IF SESSION = 3X3

c(se atc5i)t r)

CALL FUNCTION 3BDC2CLOSE2GROUP3

RITE4 amp 3BDC2CLOSE2GROUP3Iamp

1$amp 3retrc7e43I+amp

S9-SUBRC

ELSE

IF E2GROUP2OPENED = 3X3

CALL FUNCTION 3BDC2CLOSE2GROUP3

RITE4

RITE4 amp 3Fe5(era))e 6r7e eret3Iamp

ENDIF

ENDIF

ENDFORM

----------------------------------------------------------------------

Start e6 trasacti accr7i t )araeters

----------------------------------------------------------------------

FORM BDC2TRANSACTION USING TCODE

DATA4 L2MSTRINGamp

DATA4 L2SUBRC LIE S9-SUBRC

atc5 i)t sessi

IF SESSION = 3X3

CALL FUNCTION 3BDC2INSERT3

EXPORTING TCODE = TCODE

TABLES D9NPROTAB = BDCDATA

RITE4 3BDC2INSERT3Iamp

copy SAP AG BC420 12-86

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 8788

TCODE

3retrc7e43I+amp

S9-SUBRC

3RECORD43

S9-INDEX

ca(( trasacti si

ELSE

REFRESlt MESSTAB

CALL TRANSACTION TCODE USING BDCDATA

MODE CTUMODE

UPDATE CUPDATE

MESSAGES INTO MESSTAB

L2SUBRC = S9-SUBRC

RITE4 3CALL2TRANSACTION3

TCODE

3retrc7e43I+amp

L2SUBRC

3RECORD43

S9-INDEX

LOOP AT MESSTAB

SELECT SINGLE FROM T1 ltERE SPRSL = MESSTAB-MSGSPRA

AND ARBGB = MESSTAB-MSGID

AND MSGNR = MESSTAB-MSGNR

IF S9-SUBRC =

L2MSTRING = T1-TEXT

IF L2MSTRING CS 313

REPLACE 313 ITlt MESSTAB-MSGH1 INTO L2MSTRING

REPLACE 3$3 ITlt MESSTAB-MSGH$ INTO L2MSTRING

REPLACE 33 ITlt MESSTAB-MSGH INTO L2MSTRING

REPLACE 33 ITlt MESSTAB-MSGH INTO L2MSTRING

ELSE

REPLACE 33 ITlt MESSTAB-MSGH1 INTO L2MSTRING

REPLACE 33 ITlt MESSTAB-MSGH$ INTO L2MSTRING

REPLACE 33 ITlt MESSTAB-MSGH INTO L2MSTRING

REPLACE 33 ITlt MESSTAB-MSGH INTO L2MSTRING

ENDIF

CONDENSE L2MSTRING

RITE4 MESSTAB-MSGT9P L2MSTRING$+amp

ELSE

RITE4 MESSTAB

ENDIF

ENDLOOP

copy SAP AG BC420 12-87

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 8888

SIP

Eree 0e5(era))e

IF L2SUBRC AND E2GROUP SPACE

IF E2GROUP2OPENED = 3 3

CALL FUNCTION 3BDC2OPEN2GROUP3

EXPORTING CLIENT = S9-MANDT

GROUP = E2GROUP

USER = E2USER

EEP = E2EEP

ltOLDDATE = E2ltDATE

E2GROUP2OPENED = 3X3

ENDIF

CALL FUNCTION 3BDC2INSERT3

EXPORTING TCODE = TCODE

TABLES D9NPROTAB = BDCDATA

ENDIF

ENDIF

REFRESlt BDCDATA

ENDFORM

----------------------------------------------------------------------

Start e6 scree

----------------------------------------------------------------------

FORM BDC2D9NPRO USING PROGRAM D9NPRO

CLEAR BDCDATA

BDCDATA-PROGRAM = PROGRAM

BDCDATA-D9NPRO = D9NPRO

BDCDATA-D9NBEGIN = 3X3

APPEND BDCDATA

ENDFORM

----------------------------------------------------------------------

Isert 0ie(7

Page 63: BC420_46C - 012The Transaction Recorder

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 6388

08

983209 SAP AG 1999

all Transaction Program$ 1ample

RE)ORT abcbdcdcdeb9ct-

)ARA(ETERS d9mode DEFAUT A

udmode DEFAUT S-FOR( calltranact9on-2A TRANSA2TION FD

USING bdcdata (ODE d9mode

U)DATE udmode-

IF lt1ubrc NE - 5RITE 6 ---

ENDIF-ENDFOR(-

Screen

00

Screen

100

Screen

An additiona system ro area is added for the caed transaction The system uses this area for

processing the individua screens in the transactionH the data from the tae is added here After the

transaction is processed the second ro area is reeasedH the system continues processing in the first

ro area

Notes

In contrast to atch input there is no error ogging (error sessions) here For processing the caed

transaction the system uses the authoriDations of the user that caed the transaction The 2 tae

can ony hod data for one transaction run at a time efore another transaction is caed and its data

can e added you must eecute a amp7Famp7S= for the 2 tae

copy SAP AG BC420 12-63

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 6488

084

983209 SAP AG 1999

ALL TRASATI C6

RE)ORT 777-

2A TRANSA2TION FD USING bdcdata (ODE E-

Default for MD1 is A

2A TRANSA2TION 3tranact9oncode4 USING 3bdc1table4 C (ODE A E N C-

-ith the parameter 57 you can seect a specific dispay mode for processing the transaction The

foo$ing three modes are avaiae

A (ispay a)

If you eecute the program a the screens and a their data are dispayed This is the defaut vaue

for the 57 in 2A++ TampANSA2TI5N

N (ispay nothing)

The screens are not dispayed at a regardess of $hether any of them contained errors As soon as

the transaction has een fuy processed contro is returned to your program (The vaue of the

parameter 4PAT7 determines $hether dataase updates are eecuted or not)

7 (ispay errors ony)As soon as an error occurs in a screen the transaction is s$itched to dispay mode so that you can

correct the errors

These dispay modes are the same as those in the atch input session processing

copy SAP AG BC420 12-64

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 6588

082

983209 SAP AG 1999

RE)ORT 777-

2A TRANSA2TION FD USING BD2DATA U)DATE -

ALL TRASATI Camp

RE)ORT 777-

2A TRANSA2TION FD USING bdcdata U)DATE -

2A TRANSA2TION 3tranact9oncode4 USING 3bdc1table4 C (ODE A E N C U)DATE A S C -

Default for UPDAT1 is A

-ith the parameter 4PAT7 you can contro ho$ dataase updates arising from a transaction are

carried out There are three options

A (asynchronous updating) The caed transaction does not $ait unti the dataase has een

updated it simpy for$ard the updates to the SAP update service This usuay speeds up the 2T

program This processing mode is N5T recommended for arge data sets as the caed transaction

does not receive a competion message from the update modue

The caing 2T program therefore cannot te if the transaction has een successfuy competed Cou

shoud use the updating administration function (transaction S8) to determine $hether updating

$as terminated eary The error anaysis correction functions for are ess hepfu than $ith

synchronous updating

S (synchronous updating) -ith synchronous updating the caed transaction $aits unti a the

updates have een competed So processing is so$er than $ith synchronous updating The caed

transaction can ho$ever report any updating errors to the program $hich maes error

anaysiscorrection easier

+ (local updating) $ith oca updating the dataase is not updated in a separate process it is

updated in the caers process (see appication hep documentation for the AAP ey$ord S7T

4PAT7 TAS6 +52A+)

copy SAP AG BC420 12-65

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 6688

088

983209 SAP AG 1999

ALL TRASATI C

RE)ORT 777-DATA mtab T0)E TABE OF bdcm8coll-

2A TRANSA2TION FD USING bdcdata (ESSAGES INTO mtab-

2A TRANSA2TION 3tranact9oncode4 USING 3bdc1table4 C (ODE A E N C U)DATE A S C (ESSAGES INTO 3metab4 C -

7SSAlt7S specifies that a system messages that are output during the eecution of a 2A++

TampANSA2TI5N are $ritten to the interna tae L7SSTA The interna tae must have the

structure 2Slt25++

4nie the cassica atch input processing $ith sessions 2A++ TampANSA2TI5N does not offer any

specia processing procedures for transactions containing errors There are no restart functions for

transactions that contain errors or that cause updating terminations

copy SAP AG BC420 12-66

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 6788

083

983209 SAP AG 1999

ALL TRASATI C4

RE)ORT 777-DATA mltot T0)E ctuaram-

2A TRANSA2TION FD USING BD2DATA

O)TIONS FRO( mltot-

2A TRANSA2TION 3tranact9oncode4 USING 3bdc1table4 C (ODE A E N C U)DATE A S C (ESSAGES INTO 3metab4 C O)TIONS FRO( ot C -

RE)ORT 777-DATA mltot T0)E ctuaram-2A TRANSA2TION FD USING bdcdata

O)TIONS FRO( mltot-

The addition 5PTI5NS enaes the ca transaction statement to e controed through a structure

The structure must have the dictionary type 2T43PAampAS

The addition 5PTI5NS Famp5 must not e comined either $ith the addition 57 or $ith

4PAT7 ore information on the net side

copy SAP AG BC420 12-67

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 6888

085

983209 SAP AG 1999

Structure TUltPARAMS

DISMD1 Procen mode anaoo o addon amp

UPDMD1 $pdae mode anaoo o addon $PA

ATTMD1 CA mode CA conro

D19SI1 orce de=a EndoE e drn procen

RAMMIT +o eD a Camp amp(

IPT +o a ac np eonF a F S-B+P SPAC

I1D +o a ac np eon a=er end o= BC daa

The components are defined as foo$s

The components 7FSIM7 ampA25IT N5INPT and N5I7N can have the foo$ing

vaues KGK E Ces or K K E No

If the addition 5PTI5NS Famp5 is not specified the foo$ing settings appy to the contro

parameters

IS57 from addition 57

4P57 from addition 4PAT7

2ATT57 2ATT not active

7FSIM7 o not not use defaut $indo$s siDe

ampA25IT Successfu eit at 25IT -5amp6

N5INPT atch input session active (SC9INPT E G)

N5I7N atch input session sti active after end of 2 data

copy SAP AG BC420 12-68

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 6988

087

983209 SAP AG 1999

SMSBID Message ID

SMSBT Message T(pe C1GIGWGSGA

SMSB Message umber

SMSB6 Message ariable 6

SMSBamp Message ariable amp

SMSB Message ariable

SMSB4 Message ariable 4

SMSBID Message ID

SMSBT Message T(pe C1GIGWGSGA

SMSB Message umber

SMSB6 Message ariable 6

SMSBamp Message ariable amp

SMSB Message ariable

SMSB4 Message ariable 4

Return code$

S(stem fields$

alue Meaning

0 Successful

6000 1rror in transaction

6000 1rror in processing call transaction

see also the s(stem fields specified

alue Meaning

0 Successful

6000 1rror in transaction

6000 1rror in processing call transaction

see also the s(stem fields specified

9ield name Meaning9ield name9ield name MeaningMeaning

Return ode and S(stem 9ields

The return code is used to specify $hether the caed transaction $as processed successfuy In

addition severa system fieds are fied The numer I type and variaes of the diaog message

output y the caed transaction Cou need this information to output the message tet

copy SAP AG BC420 12-69

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 7088

030

983209 SAP AG 1999

Benerated Program of the TA Recorder

REFRES= (ESSTAB-

2A TRANSA2TION tcode USING bdcdata (ODE ctumode U)DATE cudate (ESSAGES INTO metab-OO) AT metab- ENDOO)-IF lubrc 34 AND e8rou 34 S)A2E- IF e8rouoenend - 2A FUN2TION BD2O)ENGROU) E)ORTING ---------

--------- E8rouoened - ENDIF- 2A FUN2TION BD2INSERT E)ORTING T2ODE tcode TABES D0N)ROTAB bdcdata-ENDIF-REFRES= bdcdata-

Message table output

pen error session

Insert data record that

has errors into error

session

If you have seected ca transaction on the seection screen the generated program runs as foo$s

The onine transaction is caed $ith ca transaction and passed to tae 2ATA A the

messages arising during the ca transaction are put in the interna tae 7SSTA

7SSTA is output as a ist

If you have specified an error session ( 73ltamp54P L SPA27) on the seection screen and the

ca transaction comes across an error (+3S4amp2 L 0) the error session is opened The error

session is ho$ever ony opened once Then the data record is paced in the session

A the other data records that have errors $ith ca transaction are paced in the same session

copy SAP AG BC420 12-70

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 7188

036

983209 SAP AG 1999

The Transaction Recorder

PrinciplesPrinciples

Recording )ith the LSMWRecording )ith the LSMW

Principles of atch Input and all TransactionPrinciples of atch Input and all Transaction

Integrating the TA Program into the DWIntegrating the TA Program into the DW

Using the TA Recorder Using the TA Recorder

copy SAP AG BC420 12-71

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 7288

03amp

983209 SAP AG 1999

Integrating into the DW

Transfer program

AAP Dictionar(

Integrate

SDA0

SDA6

SDAamp

SDA

Cou can integrate the generated program into the G9- The structure of the fie must e created

in the AAP ictionary The taes SGA0 SGA8 SGA1 and SGA $i e fied

copy SAP AG BC420 12-72

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 7388

03

983209 SAP AG 1999

DW Release 42

Goo

-B eeae 45

aa ran=er ogtec

Int customer data transfer ob-ect

ecord =ed

Dece daa ran=er

d Goo

The ampunction ampor interatin TA recorder prora$s is

i$ple$ented in the

D+-B in Release

The recorder can e integrated as of ampeease and it is provided in the G9- ampeease

ltot to the G9- ampeease 5n the initia screen you can integrate programs y choosing ampoto

( +nt customer ata transfer o-ect

copy SAP AG BC420 12-73

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 7488

034

983209 SAP AG 1999

reating Program as D b-ect

Comer ran=er ogtec

ampgtec ype

Sor eD =or ogtec

aa ran=er proram

Srcre name

9900

(+A1

Cane comer

ZBCA+G

ZB

ustomer transfer ob-ect

umber bet)een 7000 and 7777

b-ect t(pe

Assignment to R ob-ect

Short tet for D ob-ectShort description

Data transfer program

ame of generated program

Structure name

A structure Cstructure la(out )ith this name is created in

the AAP Dictionar(

For ampeease transfer oects $ere not organiDed y 5amp oects ut y a G numer (00089

OOOO) The numer range O0009OOOO is reserved for customers

To create a connection to the ne$ G 9- you must assign the program to a 5amp oect

2reate a short tet for the G oect This tet $i appear in the method seection ist

Specify the program to e incuded

Specify a name for the structure to e created in the AAP ictionary

Note $he generated program appears under program type +N and not under program type

-

copy SAP AG BC420 12-74

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 7588

032

983209 SAP AG 1999

Adantages

Automatic program registration in the DW in

Release 48

ou can use all the functions defined for

standard ob-ects

1ception$ The (reate ampile ith data

function

If you incuded the oect in the ampeease $orench it is automaticay avaiae in the ampeease

B $orench

A the $orench functions are avaiae for your oect ecept for Create files ith transfer ata

copy SAP AG BC420 12-75

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 7688

038

983209 SAP AG 1999

ou are no) able to$

The Transaction Recorder$ Unit Summar(

Use the recording function in the LSMW to create

a batch input session )ith the data from the

eternal s(stem

Use the TA Recorder to create (our o)n data

transfer program

Anal(e programs that )or+ )ith batch input or

call transaction

Integrate the TA Recorder programs into the

DW

copy SAP AG BC420 12-76

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 7788

ercise 1

nit $ -ecorder

$opic 2reating etors

$ransaction -ecorder ercise 1

bull 2reating detors $ith eterna numer assignment

bull etor numers M9980008 to M9980080

Address data for detors $ith eterna numer assignment is to

e transferred using program ampFI700

ro4ect F5

Supro4ect +5

-un +575

$as)s 85 95 8S25

9oad program -F+00

8 In the foo$ing eercises eisting data is to e changed Therefore these detors $ith

eterna numer assignment have to first e created

898 4nder suproect 79 create run 797G9 $ith the name Detors ith

eternal numers

copy SAP AG BC420 12-77

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 7888

891 2reate the foo$ing three tass The tass map the foo$ing process steps

convert data create + session and process + session

89198 In run 797G9 create the foo$ing tas

9 Tas AP9

9 Name 2onvert data 9 Tas type AP

9 Program type +S-

Seect the foo$ing +S- oect

+S- proect 2109

+S- suproect 7I9

+S- oect I997GT

89191 In run 797G9 create the foo$ing tas 9 Tas +5A9

9 Name 2reate I session

Tas type +5A

9 Program type INP

Seect program ampFI700 $ith the variant

I97G9

8919 In run 797G9 create the foo$ing tas

9 Tas S29

9 Name Process I session Tas type S2

9 Program type amp7P5

Seect program ampS2S4 $ith the variant

S497G9

Note that you have to correct the seuence of the tass 2onvert data

create + session and process + session

4se the uttons

89 Start the run

The detors $i e created $ith eterna numer assignments

89 2hec in transaction F0 that the detors M9980008 to M9980080 have een

created

copy SAP AG BC420 12-78

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 7988

ercise

nit $ransaction -ecorder

$opic -ecording function in the 9S8(

bull 2reate a recording using the +S-

bull ltenerate a atch input session

2hange the detor address data in the amp System

Name of the recording +

Name of the file +2055+F9

8 2reate the recording 7I3 using the +S- ampecord the transaction F01 (2hange

detor)

898 efore you create the recording first test the transaction onineQ

For the recording use detor M9980008 5n the initia screen of the F01

maintain the foo$ing fieds ony

etor etor M9980008

2ompany code 0008

Address data seect

Note $he data record must e saved hile recording

891 aintain the names and the descriptions for the foo$ing fieds

Name city street posta code and teephone numereete a other fieds in screen 880 from the recording (eg S5ampT+ +AN8

SPampAS)

4se the same technica names as sho$n in the tae eo$ (automatic fied

mapping)

copy SAP AG BC420 12-79

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 8088

1 2reate the suproect 7I9 and the ne$ oect TA3 in your proect 2109

aintain the oect attriutes and seect the item atch input recording Seect your

recording 7I3

2reate the source structure address

2reate the source fieds according to the tae eo$ 5r copy them from proect 2109S37N suproect 7I900 oect TA900

198 Fie setup The data from the egacy system are dispayed in the foo$ing tae

Fied name Fied type Fied ength escription

N5 2 8B etor numer

NA7 2 Name

STamp77T 2 Street

2ITC 2 2ityPace of residence

MIP 2 80 Posta code

T7+ 2 8B Teephone numer

191 aintain the fied mapping 4se the automatic fied mapping (via menu item

7tras)

19 Specify the fies 5ny maintain the fie name of the source fie

Name of the fie 21099IFI+7

2odepage 8800

19 Import the data and convert them ispay the data in each caseQ

19 2reate a atch input session

19B ampun the atch input session

copy SAP AG BC420 12-80

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 8188

ercise 3

nit $ransaction -ecorder

$opic -ecording ith the $ -ecorder

bull ltenerate a recording using the TA recorder

bull Test the recording

2hange the address data of detors in the amp system

Name recording $+

Name of the file +2055+F9

8 2reate the recording TA37I3 using the transaction recorder ampecord the

transaction F01 (change detor)

898 4se detor M9980008 for the recording 5n the F01 initia screen ony

maintain the foo$ing fieds

etor etor M9980008

2ompany 2ode 0008

Address data seect

Note $he data record must e saved hen recording

eete a fieds that do not eist in the source fie 21099IFI+7 from screen

880 in the recording (eg 6NA89S5ampT+ 6NA89+AN8 6ANNQ9SPampAS) Note o not deete fieds ampF01946ampS and ampF0190880

Save the recording no$

1 S$itch to the recordings overvie$

198 Process the recording $ith the processing mode A (dispay a)

191 Process the recording $ith the processing mode RN (no dispay)

19 If the recording has een tested and no error has occurred generate a I session

and run it using the I monitor If an error shoud occur generate the recordingagainQ

copy SAP AG BC420 12-81

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 8288

From the recording generate the program M21037I3 in your deveopment cass

2109 Seect the foo$ing

bull ampead fied contents from fie

bull 2reate test data in the fie 2103dei3test3tt

98 Save this program and eecute it ltenerate one I session each and process it

2arry out the same steps again using the ca transaction

The generated program shoud no$ e changed so that fie 21099IFI+7 can e

read and processed

98 2hange the defaut vaue of the fie name (parameter dataset) in 21099

IFI+7

91 2hange the structure definition eete the company code fied and the address

data checo from the structure

9 2hange the su9routine ca perform dc3fied for the company code (KampF019

46ampSK) so that the vaue 0008 is transferred

9 2hange the su9routine ca perform dc3fied for the address data checo

(KampF0190880K) so that the vaue G is transferred

9 Start the program again and read the data from the fie 21099IFI+7 $ith

detor data ltenerate a I session $ith it and run it

copy SAP AG BC420 12-82

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 8388

033 Include DR16INCLUDE BDCRECX1

SELECTION-SCREEN BEGIN OF LINE

PARAMETERS SESSION RADIOBUTTON GROUP CTU create sessi SELECTION-SCREEN COMMENT $amp TEXT-S FOR FIELD SESSION

se(ecti-scree )siti +

PARAMETERS CTU RADIOBUTTON GROUP CTU ca(( trasacti

SELECTION-SCREEN COMMENT $amp TEXT-S FOR FIELD CTU

SELECTION-SCREEN END OF LINE

SELECTION-SCREEN BEGIN OF LINE

SELECTION-SCREEN COMMENT $amp TEXT-S1 FOR FIELD GROUP

se(ecti-scree )siti $+

PARAMETERS GROUP1$amp r) ae 0 sessi

SELECTION-SCREEN COMMENT $amp TEXT-S+ FOR FIELD CTUMODE

se(ecti-scree )siti

PARAMETERS CTUMODE LIE CTU2PARAMS-DISMODE DEFAULT 3N3

A4 s56 a(( 78)rs

E4 s56 78)r errr (8

N4 7 t 7is)(a8 78)r

SELECTION-SCREEN END OF LINE

SELECTION-SCREEN BEGIN OF LINE

SELECTION-SCREEN COMMENT $amp TEXT-S$ FOR FIELD USER

se(ecti-scree )siti $+

PARAMETERS4 USER1$amp DEFAULT S9-UNAME ser 0r sessi i atc5

SELECTION-SCREEN COMMENT $amp TEXT-S FOR FIELD CUPDATE

se(ecti-scree )siti

PARAMETERS CUPDATE LIE CTU2PARAMS-UPDMODE DEFAULT 3L3

S4 s8c5rs(8

A4 as8c5rs(8

L4 (ca(

SELECTION-SCREEN END OF LINE

SELECTION-SCREEN BEGIN OF LINE

SELECTION-SCREEN COMMENT $amp TEXT-S FOR FIELD EEP

se(ecti-scree )siti $+

PARAMETERS4 EEP AS CltECBOX 3 3 = 7e(ete sessi i0 0iis5e7

3X3 = gtee) sessi i0 0iis5e7

SELECTION-SCREEN COMMENT $amp TEXT-S FOR FIELD E2GROUP

copy SAP AG BC420 12-83

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 8488

se(ecti-scree )siti

)araeters E2GROUP1$amp r) ae 0 errr-sessi

SELECTION-SCREEN END OF LINE

SELECTION-SCREEN BEGIN OF LINE

SELECTION-SCREEN COMMENT $amp TEXT-S FOR FIELD ltOLDDATE

se(ecti-scree )siti $+

PARAMETERS4 ltOLDDATE LIE S9-DATUM

SELECTION-SCREEN COMMENT +11amp TEXT-S$ FOR FIELD E2USER

se(ecti-scree )siti

PARAMETERS4 E2USER1$amp DEFAULT S9-UNAME ser 0r errr-sessi

SELECTION-SCREEN END OF LINE

SELECTION-SCREEN BEGIN OF LINE

SELECTION-SCREEN COMMENT +11amp TEXT-S FOR FIELD E2EEP

se(ecti-scree )siti

PARAMETERS4 E2EEP AS CltECBOX 3 3 = 7e(ete sessi i0 0iis5e7

3X3 = gtee) sessi i0 0iis5e7

SELECTION-SCREEN END OF LINE

SELECTION-SCREEN BEGIN OF LINE

SELECTION-SCREEN COMMENT +11amp TEXT-S FOR FIELD E2ltDATE

se(ecti-scree )siti

PARAMETERS4 E2ltDATE LIE S9-DATUM

SELECTION-SCREEN END OF LINE

SELECTION-SCREEN SIP

SELECTION-SCREEN BEGIN OF LINE

SELECTION-SCREEN COMMENT 1amp TEXT-S1 FOR FIELD NODATA

PARAMETERS4 NODATA DEFAULT 33 LOER CASE 7ata

SELECTION-SCREEN END OF LINE

----------------------------------------------------------------------

Batc5i)t7ata 0 si(e trasacti

DATA4 BDCDATA LIE BDCDATA OCCURS ITlt ltEADER LINE

essaes 0 ca(( trasacti

DATA4 MESSTAB LIE BDCMSGCOLL OCCURS ITlt ltEADER LINE

errr sessi )ee7 3 3 r 3X3amp

DATA4 E2GROUP2OPENED

essae tets

TABLES4 T1

copy SAP AG BC420 12-84

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 8588

----------------------------------------------------------------------

at se(ecti scree

----------------------------------------------------------------------

AT SELECTION-SCREEN

r) a7 ser st e 0i((e7 0r create sessi

IF SESSION = 3X3 AND

GROUP = SPACE OR USER = SPACE

MESSAGE E1MSamp

ENDIF

----------------------------------------------------------------------

)e 7ataset

----------------------------------------------------------------------

FORM OPEN2DATASET USING P2DATASET

OPEN DATASET P2DATASET IN TEXT MODE

IF S9-SUBRC

RITE4 TEXT-E S9-SUBRC

STOP

ENDIF

ENDFORM

----------------------------------------------------------------------

c(se 7ataset

----------------------------------------------------------------------

FORM CLOSE2DATASET USING P2DATASET

CLOSE DATASET P2DATASET

ENDFORM

----------------------------------------------------------------------

create atc5i)t sessi

t 0r ca(( trasacti siamp

----------------------------------------------------------------------

FORM OPEN2GROUP

IF SESSION = 3X3

SIP

RITE4 $amp 3Create r)3I1amp GROUP

SIP

)e atc5i)t r)

CALL FUNCTION 3BDC2OPEN2GROUP3

EXPORTING CLIENT = S9-MANDT

copy SAP AG BC420 12-85

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 8688

GROUP = GROUP

USER = USER

EEP = EEP

ltOLDDATE = ltOLDDATE

RITE4 amp 3BDC2OPEN2GROUP3I$amp

1$amp 3retrc7e43I+amp

S9-SUBRC

ENDIF

ENDFORM

----------------------------------------------------------------------

e7 atc5i)t sessi

ca(( trasacti si4 errr sessiamp

----------------------------------------------------------------------

FORM CLOSE2GROUP

IF SESSION = 3X3

c(se atc5i)t r)

CALL FUNCTION 3BDC2CLOSE2GROUP3

RITE4 amp 3BDC2CLOSE2GROUP3Iamp

1$amp 3retrc7e43I+amp

S9-SUBRC

ELSE

IF E2GROUP2OPENED = 3X3

CALL FUNCTION 3BDC2CLOSE2GROUP3

RITE4

RITE4 amp 3Fe5(era))e 6r7e eret3Iamp

ENDIF

ENDIF

ENDFORM

----------------------------------------------------------------------

Start e6 trasacti accr7i t )araeters

----------------------------------------------------------------------

FORM BDC2TRANSACTION USING TCODE

DATA4 L2MSTRINGamp

DATA4 L2SUBRC LIE S9-SUBRC

atc5 i)t sessi

IF SESSION = 3X3

CALL FUNCTION 3BDC2INSERT3

EXPORTING TCODE = TCODE

TABLES D9NPROTAB = BDCDATA

RITE4 3BDC2INSERT3Iamp

copy SAP AG BC420 12-86

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 8788

TCODE

3retrc7e43I+amp

S9-SUBRC

3RECORD43

S9-INDEX

ca(( trasacti si

ELSE

REFRESlt MESSTAB

CALL TRANSACTION TCODE USING BDCDATA

MODE CTUMODE

UPDATE CUPDATE

MESSAGES INTO MESSTAB

L2SUBRC = S9-SUBRC

RITE4 3CALL2TRANSACTION3

TCODE

3retrc7e43I+amp

L2SUBRC

3RECORD43

S9-INDEX

LOOP AT MESSTAB

SELECT SINGLE FROM T1 ltERE SPRSL = MESSTAB-MSGSPRA

AND ARBGB = MESSTAB-MSGID

AND MSGNR = MESSTAB-MSGNR

IF S9-SUBRC =

L2MSTRING = T1-TEXT

IF L2MSTRING CS 313

REPLACE 313 ITlt MESSTAB-MSGH1 INTO L2MSTRING

REPLACE 3$3 ITlt MESSTAB-MSGH$ INTO L2MSTRING

REPLACE 33 ITlt MESSTAB-MSGH INTO L2MSTRING

REPLACE 33 ITlt MESSTAB-MSGH INTO L2MSTRING

ELSE

REPLACE 33 ITlt MESSTAB-MSGH1 INTO L2MSTRING

REPLACE 33 ITlt MESSTAB-MSGH$ INTO L2MSTRING

REPLACE 33 ITlt MESSTAB-MSGH INTO L2MSTRING

REPLACE 33 ITlt MESSTAB-MSGH INTO L2MSTRING

ENDIF

CONDENSE L2MSTRING

RITE4 MESSTAB-MSGT9P L2MSTRING$+amp

ELSE

RITE4 MESSTAB

ENDIF

ENDLOOP

copy SAP AG BC420 12-87

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 8888

SIP

Eree 0e5(era))e

IF L2SUBRC AND E2GROUP SPACE

IF E2GROUP2OPENED = 3 3

CALL FUNCTION 3BDC2OPEN2GROUP3

EXPORTING CLIENT = S9-MANDT

GROUP = E2GROUP

USER = E2USER

EEP = E2EEP

ltOLDDATE = E2ltDATE

E2GROUP2OPENED = 3X3

ENDIF

CALL FUNCTION 3BDC2INSERT3

EXPORTING TCODE = TCODE

TABLES D9NPROTAB = BDCDATA

ENDIF

ENDIF

REFRESlt BDCDATA

ENDFORM

----------------------------------------------------------------------

Start e6 scree

----------------------------------------------------------------------

FORM BDC2D9NPRO USING PROGRAM D9NPRO

CLEAR BDCDATA

BDCDATA-PROGRAM = PROGRAM

BDCDATA-D9NPRO = D9NPRO

BDCDATA-D9NBEGIN = 3X3

APPEND BDCDATA

ENDFORM

----------------------------------------------------------------------

Isert 0ie(7

Page 64: BC420_46C - 012The Transaction Recorder

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 6488

084

983209 SAP AG 1999

ALL TRASATI C6

RE)ORT 777-

2A TRANSA2TION FD USING bdcdata (ODE E-

Default for MD1 is A

2A TRANSA2TION 3tranact9oncode4 USING 3bdc1table4 C (ODE A E N C-

-ith the parameter 57 you can seect a specific dispay mode for processing the transaction The

foo$ing three modes are avaiae

A (ispay a)

If you eecute the program a the screens and a their data are dispayed This is the defaut vaue

for the 57 in 2A++ TampANSA2TI5N

N (ispay nothing)

The screens are not dispayed at a regardess of $hether any of them contained errors As soon as

the transaction has een fuy processed contro is returned to your program (The vaue of the

parameter 4PAT7 determines $hether dataase updates are eecuted or not)

7 (ispay errors ony)As soon as an error occurs in a screen the transaction is s$itched to dispay mode so that you can

correct the errors

These dispay modes are the same as those in the atch input session processing

copy SAP AG BC420 12-64

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 6588

082

983209 SAP AG 1999

RE)ORT 777-

2A TRANSA2TION FD USING BD2DATA U)DATE -

ALL TRASATI Camp

RE)ORT 777-

2A TRANSA2TION FD USING bdcdata U)DATE -

2A TRANSA2TION 3tranact9oncode4 USING 3bdc1table4 C (ODE A E N C U)DATE A S C -

Default for UPDAT1 is A

-ith the parameter 4PAT7 you can contro ho$ dataase updates arising from a transaction are

carried out There are three options

A (asynchronous updating) The caed transaction does not $ait unti the dataase has een

updated it simpy for$ard the updates to the SAP update service This usuay speeds up the 2T

program This processing mode is N5T recommended for arge data sets as the caed transaction

does not receive a competion message from the update modue

The caing 2T program therefore cannot te if the transaction has een successfuy competed Cou

shoud use the updating administration function (transaction S8) to determine $hether updating

$as terminated eary The error anaysis correction functions for are ess hepfu than $ith

synchronous updating

S (synchronous updating) -ith synchronous updating the caed transaction $aits unti a the

updates have een competed So processing is so$er than $ith synchronous updating The caed

transaction can ho$ever report any updating errors to the program $hich maes error

anaysiscorrection easier

+ (local updating) $ith oca updating the dataase is not updated in a separate process it is

updated in the caers process (see appication hep documentation for the AAP ey$ord S7T

4PAT7 TAS6 +52A+)

copy SAP AG BC420 12-65

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 6688

088

983209 SAP AG 1999

ALL TRASATI C

RE)ORT 777-DATA mtab T0)E TABE OF bdcm8coll-

2A TRANSA2TION FD USING bdcdata (ESSAGES INTO mtab-

2A TRANSA2TION 3tranact9oncode4 USING 3bdc1table4 C (ODE A E N C U)DATE A S C (ESSAGES INTO 3metab4 C -

7SSAlt7S specifies that a system messages that are output during the eecution of a 2A++

TampANSA2TI5N are $ritten to the interna tae L7SSTA The interna tae must have the

structure 2Slt25++

4nie the cassica atch input processing $ith sessions 2A++ TampANSA2TI5N does not offer any

specia processing procedures for transactions containing errors There are no restart functions for

transactions that contain errors or that cause updating terminations

copy SAP AG BC420 12-66

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 6788

083

983209 SAP AG 1999

ALL TRASATI C4

RE)ORT 777-DATA mltot T0)E ctuaram-

2A TRANSA2TION FD USING BD2DATA

O)TIONS FRO( mltot-

2A TRANSA2TION 3tranact9oncode4 USING 3bdc1table4 C (ODE A E N C U)DATE A S C (ESSAGES INTO 3metab4 C O)TIONS FRO( ot C -

RE)ORT 777-DATA mltot T0)E ctuaram-2A TRANSA2TION FD USING bdcdata

O)TIONS FRO( mltot-

The addition 5PTI5NS enaes the ca transaction statement to e controed through a structure

The structure must have the dictionary type 2T43PAampAS

The addition 5PTI5NS Famp5 must not e comined either $ith the addition 57 or $ith

4PAT7 ore information on the net side

copy SAP AG BC420 12-67

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 6888

085

983209 SAP AG 1999

Structure TUltPARAMS

DISMD1 Procen mode anaoo o addon amp

UPDMD1 $pdae mode anaoo o addon $PA

ATTMD1 CA mode CA conro

D19SI1 orce de=a EndoE e drn procen

RAMMIT +o eD a Camp amp(

IPT +o a ac np eonF a F S-B+P SPAC

I1D +o a ac np eon a=er end o= BC daa

The components are defined as foo$s

The components 7FSIM7 ampA25IT N5INPT and N5I7N can have the foo$ing

vaues KGK E Ces or K K E No

If the addition 5PTI5NS Famp5 is not specified the foo$ing settings appy to the contro

parameters

IS57 from addition 57

4P57 from addition 4PAT7

2ATT57 2ATT not active

7FSIM7 o not not use defaut $indo$s siDe

ampA25IT Successfu eit at 25IT -5amp6

N5INPT atch input session active (SC9INPT E G)

N5I7N atch input session sti active after end of 2 data

copy SAP AG BC420 12-68

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 6988

087

983209 SAP AG 1999

SMSBID Message ID

SMSBT Message T(pe C1GIGWGSGA

SMSB Message umber

SMSB6 Message ariable 6

SMSBamp Message ariable amp

SMSB Message ariable

SMSB4 Message ariable 4

SMSBID Message ID

SMSBT Message T(pe C1GIGWGSGA

SMSB Message umber

SMSB6 Message ariable 6

SMSBamp Message ariable amp

SMSB Message ariable

SMSB4 Message ariable 4

Return code$

S(stem fields$

alue Meaning

0 Successful

6000 1rror in transaction

6000 1rror in processing call transaction

see also the s(stem fields specified

alue Meaning

0 Successful

6000 1rror in transaction

6000 1rror in processing call transaction

see also the s(stem fields specified

9ield name Meaning9ield name9ield name MeaningMeaning

Return ode and S(stem 9ields

The return code is used to specify $hether the caed transaction $as processed successfuy In

addition severa system fieds are fied The numer I type and variaes of the diaog message

output y the caed transaction Cou need this information to output the message tet

copy SAP AG BC420 12-69

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 7088

030

983209 SAP AG 1999

Benerated Program of the TA Recorder

REFRES= (ESSTAB-

2A TRANSA2TION tcode USING bdcdata (ODE ctumode U)DATE cudate (ESSAGES INTO metab-OO) AT metab- ENDOO)-IF lubrc 34 AND e8rou 34 S)A2E- IF e8rouoenend - 2A FUN2TION BD2O)ENGROU) E)ORTING ---------

--------- E8rouoened - ENDIF- 2A FUN2TION BD2INSERT E)ORTING T2ODE tcode TABES D0N)ROTAB bdcdata-ENDIF-REFRES= bdcdata-

Message table output

pen error session

Insert data record that

has errors into error

session

If you have seected ca transaction on the seection screen the generated program runs as foo$s

The onine transaction is caed $ith ca transaction and passed to tae 2ATA A the

messages arising during the ca transaction are put in the interna tae 7SSTA

7SSTA is output as a ist

If you have specified an error session ( 73ltamp54P L SPA27) on the seection screen and the

ca transaction comes across an error (+3S4amp2 L 0) the error session is opened The error

session is ho$ever ony opened once Then the data record is paced in the session

A the other data records that have errors $ith ca transaction are paced in the same session

copy SAP AG BC420 12-70

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 7188

036

983209 SAP AG 1999

The Transaction Recorder

PrinciplesPrinciples

Recording )ith the LSMWRecording )ith the LSMW

Principles of atch Input and all TransactionPrinciples of atch Input and all Transaction

Integrating the TA Program into the DWIntegrating the TA Program into the DW

Using the TA Recorder Using the TA Recorder

copy SAP AG BC420 12-71

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 7288

03amp

983209 SAP AG 1999

Integrating into the DW

Transfer program

AAP Dictionar(

Integrate

SDA0

SDA6

SDAamp

SDA

Cou can integrate the generated program into the G9- The structure of the fie must e created

in the AAP ictionary The taes SGA0 SGA8 SGA1 and SGA $i e fied

copy SAP AG BC420 12-72

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 7388

03

983209 SAP AG 1999

DW Release 42

Goo

-B eeae 45

aa ran=er ogtec

Int customer data transfer ob-ect

ecord =ed

Dece daa ran=er

d Goo

The ampunction ampor interatin TA recorder prora$s is

i$ple$ented in the

D+-B in Release

The recorder can e integrated as of ampeease and it is provided in the G9- ampeease

ltot to the G9- ampeease 5n the initia screen you can integrate programs y choosing ampoto

( +nt customer ata transfer o-ect

copy SAP AG BC420 12-73

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 7488

034

983209 SAP AG 1999

reating Program as D b-ect

Comer ran=er ogtec

ampgtec ype

Sor eD =or ogtec

aa ran=er proram

Srcre name

9900

(+A1

Cane comer

ZBCA+G

ZB

ustomer transfer ob-ect

umber bet)een 7000 and 7777

b-ect t(pe

Assignment to R ob-ect

Short tet for D ob-ectShort description

Data transfer program

ame of generated program

Structure name

A structure Cstructure la(out )ith this name is created in

the AAP Dictionar(

For ampeease transfer oects $ere not organiDed y 5amp oects ut y a G numer (00089

OOOO) The numer range O0009OOOO is reserved for customers

To create a connection to the ne$ G 9- you must assign the program to a 5amp oect

2reate a short tet for the G oect This tet $i appear in the method seection ist

Specify the program to e incuded

Specify a name for the structure to e created in the AAP ictionary

Note $he generated program appears under program type +N and not under program type

-

copy SAP AG BC420 12-74

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 7588

032

983209 SAP AG 1999

Adantages

Automatic program registration in the DW in

Release 48

ou can use all the functions defined for

standard ob-ects

1ception$ The (reate ampile ith data

function

If you incuded the oect in the ampeease $orench it is automaticay avaiae in the ampeease

B $orench

A the $orench functions are avaiae for your oect ecept for Create files ith transfer ata

copy SAP AG BC420 12-75

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 7688

038

983209 SAP AG 1999

ou are no) able to$

The Transaction Recorder$ Unit Summar(

Use the recording function in the LSMW to create

a batch input session )ith the data from the

eternal s(stem

Use the TA Recorder to create (our o)n data

transfer program

Anal(e programs that )or+ )ith batch input or

call transaction

Integrate the TA Recorder programs into the

DW

copy SAP AG BC420 12-76

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 7788

ercise 1

nit $ -ecorder

$opic 2reating etors

$ransaction -ecorder ercise 1

bull 2reating detors $ith eterna numer assignment

bull etor numers M9980008 to M9980080

Address data for detors $ith eterna numer assignment is to

e transferred using program ampFI700

ro4ect F5

Supro4ect +5

-un +575

$as)s 85 95 8S25

9oad program -F+00

8 In the foo$ing eercises eisting data is to e changed Therefore these detors $ith

eterna numer assignment have to first e created

898 4nder suproect 79 create run 797G9 $ith the name Detors ith

eternal numers

copy SAP AG BC420 12-77

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 7888

891 2reate the foo$ing three tass The tass map the foo$ing process steps

convert data create + session and process + session

89198 In run 797G9 create the foo$ing tas

9 Tas AP9

9 Name 2onvert data 9 Tas type AP

9 Program type +S-

Seect the foo$ing +S- oect

+S- proect 2109

+S- suproect 7I9

+S- oect I997GT

89191 In run 797G9 create the foo$ing tas 9 Tas +5A9

9 Name 2reate I session

Tas type +5A

9 Program type INP

Seect program ampFI700 $ith the variant

I97G9

8919 In run 797G9 create the foo$ing tas

9 Tas S29

9 Name Process I session Tas type S2

9 Program type amp7P5

Seect program ampS2S4 $ith the variant

S497G9

Note that you have to correct the seuence of the tass 2onvert data

create + session and process + session

4se the uttons

89 Start the run

The detors $i e created $ith eterna numer assignments

89 2hec in transaction F0 that the detors M9980008 to M9980080 have een

created

copy SAP AG BC420 12-78

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 7988

ercise

nit $ransaction -ecorder

$opic -ecording function in the 9S8(

bull 2reate a recording using the +S-

bull ltenerate a atch input session

2hange the detor address data in the amp System

Name of the recording +

Name of the file +2055+F9

8 2reate the recording 7I3 using the +S- ampecord the transaction F01 (2hange

detor)

898 efore you create the recording first test the transaction onineQ

For the recording use detor M9980008 5n the initia screen of the F01

maintain the foo$ing fieds ony

etor etor M9980008

2ompany code 0008

Address data seect

Note $he data record must e saved hile recording

891 aintain the names and the descriptions for the foo$ing fieds

Name city street posta code and teephone numereete a other fieds in screen 880 from the recording (eg S5ampT+ +AN8

SPampAS)

4se the same technica names as sho$n in the tae eo$ (automatic fied

mapping)

copy SAP AG BC420 12-79

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 8088

1 2reate the suproect 7I9 and the ne$ oect TA3 in your proect 2109

aintain the oect attriutes and seect the item atch input recording Seect your

recording 7I3

2reate the source structure address

2reate the source fieds according to the tae eo$ 5r copy them from proect 2109S37N suproect 7I900 oect TA900

198 Fie setup The data from the egacy system are dispayed in the foo$ing tae

Fied name Fied type Fied ength escription

N5 2 8B etor numer

NA7 2 Name

STamp77T 2 Street

2ITC 2 2ityPace of residence

MIP 2 80 Posta code

T7+ 2 8B Teephone numer

191 aintain the fied mapping 4se the automatic fied mapping (via menu item

7tras)

19 Specify the fies 5ny maintain the fie name of the source fie

Name of the fie 21099IFI+7

2odepage 8800

19 Import the data and convert them ispay the data in each caseQ

19 2reate a atch input session

19B ampun the atch input session

copy SAP AG BC420 12-80

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 8188

ercise 3

nit $ransaction -ecorder

$opic -ecording ith the $ -ecorder

bull ltenerate a recording using the TA recorder

bull Test the recording

2hange the address data of detors in the amp system

Name recording $+

Name of the file +2055+F9

8 2reate the recording TA37I3 using the transaction recorder ampecord the

transaction F01 (change detor)

898 4se detor M9980008 for the recording 5n the F01 initia screen ony

maintain the foo$ing fieds

etor etor M9980008

2ompany 2ode 0008

Address data seect

Note $he data record must e saved hen recording

eete a fieds that do not eist in the source fie 21099IFI+7 from screen

880 in the recording (eg 6NA89S5ampT+ 6NA89+AN8 6ANNQ9SPampAS) Note o not deete fieds ampF01946ampS and ampF0190880

Save the recording no$

1 S$itch to the recordings overvie$

198 Process the recording $ith the processing mode A (dispay a)

191 Process the recording $ith the processing mode RN (no dispay)

19 If the recording has een tested and no error has occurred generate a I session

and run it using the I monitor If an error shoud occur generate the recordingagainQ

copy SAP AG BC420 12-81

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 8288

From the recording generate the program M21037I3 in your deveopment cass

2109 Seect the foo$ing

bull ampead fied contents from fie

bull 2reate test data in the fie 2103dei3test3tt

98 Save this program and eecute it ltenerate one I session each and process it

2arry out the same steps again using the ca transaction

The generated program shoud no$ e changed so that fie 21099IFI+7 can e

read and processed

98 2hange the defaut vaue of the fie name (parameter dataset) in 21099

IFI+7

91 2hange the structure definition eete the company code fied and the address

data checo from the structure

9 2hange the su9routine ca perform dc3fied for the company code (KampF019

46ampSK) so that the vaue 0008 is transferred

9 2hange the su9routine ca perform dc3fied for the address data checo

(KampF0190880K) so that the vaue G is transferred

9 Start the program again and read the data from the fie 21099IFI+7 $ith

detor data ltenerate a I session $ith it and run it

copy SAP AG BC420 12-82

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 8388

033 Include DR16INCLUDE BDCRECX1

SELECTION-SCREEN BEGIN OF LINE

PARAMETERS SESSION RADIOBUTTON GROUP CTU create sessi SELECTION-SCREEN COMMENT $amp TEXT-S FOR FIELD SESSION

se(ecti-scree )siti +

PARAMETERS CTU RADIOBUTTON GROUP CTU ca(( trasacti

SELECTION-SCREEN COMMENT $amp TEXT-S FOR FIELD CTU

SELECTION-SCREEN END OF LINE

SELECTION-SCREEN BEGIN OF LINE

SELECTION-SCREEN COMMENT $amp TEXT-S1 FOR FIELD GROUP

se(ecti-scree )siti $+

PARAMETERS GROUP1$amp r) ae 0 sessi

SELECTION-SCREEN COMMENT $amp TEXT-S+ FOR FIELD CTUMODE

se(ecti-scree )siti

PARAMETERS CTUMODE LIE CTU2PARAMS-DISMODE DEFAULT 3N3

A4 s56 a(( 78)rs

E4 s56 78)r errr (8

N4 7 t 7is)(a8 78)r

SELECTION-SCREEN END OF LINE

SELECTION-SCREEN BEGIN OF LINE

SELECTION-SCREEN COMMENT $amp TEXT-S$ FOR FIELD USER

se(ecti-scree )siti $+

PARAMETERS4 USER1$amp DEFAULT S9-UNAME ser 0r sessi i atc5

SELECTION-SCREEN COMMENT $amp TEXT-S FOR FIELD CUPDATE

se(ecti-scree )siti

PARAMETERS CUPDATE LIE CTU2PARAMS-UPDMODE DEFAULT 3L3

S4 s8c5rs(8

A4 as8c5rs(8

L4 (ca(

SELECTION-SCREEN END OF LINE

SELECTION-SCREEN BEGIN OF LINE

SELECTION-SCREEN COMMENT $amp TEXT-S FOR FIELD EEP

se(ecti-scree )siti $+

PARAMETERS4 EEP AS CltECBOX 3 3 = 7e(ete sessi i0 0iis5e7

3X3 = gtee) sessi i0 0iis5e7

SELECTION-SCREEN COMMENT $amp TEXT-S FOR FIELD E2GROUP

copy SAP AG BC420 12-83

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 8488

se(ecti-scree )siti

)araeters E2GROUP1$amp r) ae 0 errr-sessi

SELECTION-SCREEN END OF LINE

SELECTION-SCREEN BEGIN OF LINE

SELECTION-SCREEN COMMENT $amp TEXT-S FOR FIELD ltOLDDATE

se(ecti-scree )siti $+

PARAMETERS4 ltOLDDATE LIE S9-DATUM

SELECTION-SCREEN COMMENT +11amp TEXT-S$ FOR FIELD E2USER

se(ecti-scree )siti

PARAMETERS4 E2USER1$amp DEFAULT S9-UNAME ser 0r errr-sessi

SELECTION-SCREEN END OF LINE

SELECTION-SCREEN BEGIN OF LINE

SELECTION-SCREEN COMMENT +11amp TEXT-S FOR FIELD E2EEP

se(ecti-scree )siti

PARAMETERS4 E2EEP AS CltECBOX 3 3 = 7e(ete sessi i0 0iis5e7

3X3 = gtee) sessi i0 0iis5e7

SELECTION-SCREEN END OF LINE

SELECTION-SCREEN BEGIN OF LINE

SELECTION-SCREEN COMMENT +11amp TEXT-S FOR FIELD E2ltDATE

se(ecti-scree )siti

PARAMETERS4 E2ltDATE LIE S9-DATUM

SELECTION-SCREEN END OF LINE

SELECTION-SCREEN SIP

SELECTION-SCREEN BEGIN OF LINE

SELECTION-SCREEN COMMENT 1amp TEXT-S1 FOR FIELD NODATA

PARAMETERS4 NODATA DEFAULT 33 LOER CASE 7ata

SELECTION-SCREEN END OF LINE

----------------------------------------------------------------------

Batc5i)t7ata 0 si(e trasacti

DATA4 BDCDATA LIE BDCDATA OCCURS ITlt ltEADER LINE

essaes 0 ca(( trasacti

DATA4 MESSTAB LIE BDCMSGCOLL OCCURS ITlt ltEADER LINE

errr sessi )ee7 3 3 r 3X3amp

DATA4 E2GROUP2OPENED

essae tets

TABLES4 T1

copy SAP AG BC420 12-84

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 8588

----------------------------------------------------------------------

at se(ecti scree

----------------------------------------------------------------------

AT SELECTION-SCREEN

r) a7 ser st e 0i((e7 0r create sessi

IF SESSION = 3X3 AND

GROUP = SPACE OR USER = SPACE

MESSAGE E1MSamp

ENDIF

----------------------------------------------------------------------

)e 7ataset

----------------------------------------------------------------------

FORM OPEN2DATASET USING P2DATASET

OPEN DATASET P2DATASET IN TEXT MODE

IF S9-SUBRC

RITE4 TEXT-E S9-SUBRC

STOP

ENDIF

ENDFORM

----------------------------------------------------------------------

c(se 7ataset

----------------------------------------------------------------------

FORM CLOSE2DATASET USING P2DATASET

CLOSE DATASET P2DATASET

ENDFORM

----------------------------------------------------------------------

create atc5i)t sessi

t 0r ca(( trasacti siamp

----------------------------------------------------------------------

FORM OPEN2GROUP

IF SESSION = 3X3

SIP

RITE4 $amp 3Create r)3I1amp GROUP

SIP

)e atc5i)t r)

CALL FUNCTION 3BDC2OPEN2GROUP3

EXPORTING CLIENT = S9-MANDT

copy SAP AG BC420 12-85

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 8688

GROUP = GROUP

USER = USER

EEP = EEP

ltOLDDATE = ltOLDDATE

RITE4 amp 3BDC2OPEN2GROUP3I$amp

1$amp 3retrc7e43I+amp

S9-SUBRC

ENDIF

ENDFORM

----------------------------------------------------------------------

e7 atc5i)t sessi

ca(( trasacti si4 errr sessiamp

----------------------------------------------------------------------

FORM CLOSE2GROUP

IF SESSION = 3X3

c(se atc5i)t r)

CALL FUNCTION 3BDC2CLOSE2GROUP3

RITE4 amp 3BDC2CLOSE2GROUP3Iamp

1$amp 3retrc7e43I+amp

S9-SUBRC

ELSE

IF E2GROUP2OPENED = 3X3

CALL FUNCTION 3BDC2CLOSE2GROUP3

RITE4

RITE4 amp 3Fe5(era))e 6r7e eret3Iamp

ENDIF

ENDIF

ENDFORM

----------------------------------------------------------------------

Start e6 trasacti accr7i t )araeters

----------------------------------------------------------------------

FORM BDC2TRANSACTION USING TCODE

DATA4 L2MSTRINGamp

DATA4 L2SUBRC LIE S9-SUBRC

atc5 i)t sessi

IF SESSION = 3X3

CALL FUNCTION 3BDC2INSERT3

EXPORTING TCODE = TCODE

TABLES D9NPROTAB = BDCDATA

RITE4 3BDC2INSERT3Iamp

copy SAP AG BC420 12-86

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 8788

TCODE

3retrc7e43I+amp

S9-SUBRC

3RECORD43

S9-INDEX

ca(( trasacti si

ELSE

REFRESlt MESSTAB

CALL TRANSACTION TCODE USING BDCDATA

MODE CTUMODE

UPDATE CUPDATE

MESSAGES INTO MESSTAB

L2SUBRC = S9-SUBRC

RITE4 3CALL2TRANSACTION3

TCODE

3retrc7e43I+amp

L2SUBRC

3RECORD43

S9-INDEX

LOOP AT MESSTAB

SELECT SINGLE FROM T1 ltERE SPRSL = MESSTAB-MSGSPRA

AND ARBGB = MESSTAB-MSGID

AND MSGNR = MESSTAB-MSGNR

IF S9-SUBRC =

L2MSTRING = T1-TEXT

IF L2MSTRING CS 313

REPLACE 313 ITlt MESSTAB-MSGH1 INTO L2MSTRING

REPLACE 3$3 ITlt MESSTAB-MSGH$ INTO L2MSTRING

REPLACE 33 ITlt MESSTAB-MSGH INTO L2MSTRING

REPLACE 33 ITlt MESSTAB-MSGH INTO L2MSTRING

ELSE

REPLACE 33 ITlt MESSTAB-MSGH1 INTO L2MSTRING

REPLACE 33 ITlt MESSTAB-MSGH$ INTO L2MSTRING

REPLACE 33 ITlt MESSTAB-MSGH INTO L2MSTRING

REPLACE 33 ITlt MESSTAB-MSGH INTO L2MSTRING

ENDIF

CONDENSE L2MSTRING

RITE4 MESSTAB-MSGT9P L2MSTRING$+amp

ELSE

RITE4 MESSTAB

ENDIF

ENDLOOP

copy SAP AG BC420 12-87

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 8888

SIP

Eree 0e5(era))e

IF L2SUBRC AND E2GROUP SPACE

IF E2GROUP2OPENED = 3 3

CALL FUNCTION 3BDC2OPEN2GROUP3

EXPORTING CLIENT = S9-MANDT

GROUP = E2GROUP

USER = E2USER

EEP = E2EEP

ltOLDDATE = E2ltDATE

E2GROUP2OPENED = 3X3

ENDIF

CALL FUNCTION 3BDC2INSERT3

EXPORTING TCODE = TCODE

TABLES D9NPROTAB = BDCDATA

ENDIF

ENDIF

REFRESlt BDCDATA

ENDFORM

----------------------------------------------------------------------

Start e6 scree

----------------------------------------------------------------------

FORM BDC2D9NPRO USING PROGRAM D9NPRO

CLEAR BDCDATA

BDCDATA-PROGRAM = PROGRAM

BDCDATA-D9NPRO = D9NPRO

BDCDATA-D9NBEGIN = 3X3

APPEND BDCDATA

ENDFORM

----------------------------------------------------------------------

Isert 0ie(7

Page 65: BC420_46C - 012The Transaction Recorder

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 6588

082

983209 SAP AG 1999

RE)ORT 777-

2A TRANSA2TION FD USING BD2DATA U)DATE -

ALL TRASATI Camp

RE)ORT 777-

2A TRANSA2TION FD USING bdcdata U)DATE -

2A TRANSA2TION 3tranact9oncode4 USING 3bdc1table4 C (ODE A E N C U)DATE A S C -

Default for UPDAT1 is A

-ith the parameter 4PAT7 you can contro ho$ dataase updates arising from a transaction are

carried out There are three options

A (asynchronous updating) The caed transaction does not $ait unti the dataase has een

updated it simpy for$ard the updates to the SAP update service This usuay speeds up the 2T

program This processing mode is N5T recommended for arge data sets as the caed transaction

does not receive a competion message from the update modue

The caing 2T program therefore cannot te if the transaction has een successfuy competed Cou

shoud use the updating administration function (transaction S8) to determine $hether updating

$as terminated eary The error anaysis correction functions for are ess hepfu than $ith

synchronous updating

S (synchronous updating) -ith synchronous updating the caed transaction $aits unti a the

updates have een competed So processing is so$er than $ith synchronous updating The caed

transaction can ho$ever report any updating errors to the program $hich maes error

anaysiscorrection easier

+ (local updating) $ith oca updating the dataase is not updated in a separate process it is

updated in the caers process (see appication hep documentation for the AAP ey$ord S7T

4PAT7 TAS6 +52A+)

copy SAP AG BC420 12-65

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 6688

088

983209 SAP AG 1999

ALL TRASATI C

RE)ORT 777-DATA mtab T0)E TABE OF bdcm8coll-

2A TRANSA2TION FD USING bdcdata (ESSAGES INTO mtab-

2A TRANSA2TION 3tranact9oncode4 USING 3bdc1table4 C (ODE A E N C U)DATE A S C (ESSAGES INTO 3metab4 C -

7SSAlt7S specifies that a system messages that are output during the eecution of a 2A++

TampANSA2TI5N are $ritten to the interna tae L7SSTA The interna tae must have the

structure 2Slt25++

4nie the cassica atch input processing $ith sessions 2A++ TampANSA2TI5N does not offer any

specia processing procedures for transactions containing errors There are no restart functions for

transactions that contain errors or that cause updating terminations

copy SAP AG BC420 12-66

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 6788

083

983209 SAP AG 1999

ALL TRASATI C4

RE)ORT 777-DATA mltot T0)E ctuaram-

2A TRANSA2TION FD USING BD2DATA

O)TIONS FRO( mltot-

2A TRANSA2TION 3tranact9oncode4 USING 3bdc1table4 C (ODE A E N C U)DATE A S C (ESSAGES INTO 3metab4 C O)TIONS FRO( ot C -

RE)ORT 777-DATA mltot T0)E ctuaram-2A TRANSA2TION FD USING bdcdata

O)TIONS FRO( mltot-

The addition 5PTI5NS enaes the ca transaction statement to e controed through a structure

The structure must have the dictionary type 2T43PAampAS

The addition 5PTI5NS Famp5 must not e comined either $ith the addition 57 or $ith

4PAT7 ore information on the net side

copy SAP AG BC420 12-67

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 6888

085

983209 SAP AG 1999

Structure TUltPARAMS

DISMD1 Procen mode anaoo o addon amp

UPDMD1 $pdae mode anaoo o addon $PA

ATTMD1 CA mode CA conro

D19SI1 orce de=a EndoE e drn procen

RAMMIT +o eD a Camp amp(

IPT +o a ac np eonF a F S-B+P SPAC

I1D +o a ac np eon a=er end o= BC daa

The components are defined as foo$s

The components 7FSIM7 ampA25IT N5INPT and N5I7N can have the foo$ing

vaues KGK E Ces or K K E No

If the addition 5PTI5NS Famp5 is not specified the foo$ing settings appy to the contro

parameters

IS57 from addition 57

4P57 from addition 4PAT7

2ATT57 2ATT not active

7FSIM7 o not not use defaut $indo$s siDe

ampA25IT Successfu eit at 25IT -5amp6

N5INPT atch input session active (SC9INPT E G)

N5I7N atch input session sti active after end of 2 data

copy SAP AG BC420 12-68

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 6988

087

983209 SAP AG 1999

SMSBID Message ID

SMSBT Message T(pe C1GIGWGSGA

SMSB Message umber

SMSB6 Message ariable 6

SMSBamp Message ariable amp

SMSB Message ariable

SMSB4 Message ariable 4

SMSBID Message ID

SMSBT Message T(pe C1GIGWGSGA

SMSB Message umber

SMSB6 Message ariable 6

SMSBamp Message ariable amp

SMSB Message ariable

SMSB4 Message ariable 4

Return code$

S(stem fields$

alue Meaning

0 Successful

6000 1rror in transaction

6000 1rror in processing call transaction

see also the s(stem fields specified

alue Meaning

0 Successful

6000 1rror in transaction

6000 1rror in processing call transaction

see also the s(stem fields specified

9ield name Meaning9ield name9ield name MeaningMeaning

Return ode and S(stem 9ields

The return code is used to specify $hether the caed transaction $as processed successfuy In

addition severa system fieds are fied The numer I type and variaes of the diaog message

output y the caed transaction Cou need this information to output the message tet

copy SAP AG BC420 12-69

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 7088

030

983209 SAP AG 1999

Benerated Program of the TA Recorder

REFRES= (ESSTAB-

2A TRANSA2TION tcode USING bdcdata (ODE ctumode U)DATE cudate (ESSAGES INTO metab-OO) AT metab- ENDOO)-IF lubrc 34 AND e8rou 34 S)A2E- IF e8rouoenend - 2A FUN2TION BD2O)ENGROU) E)ORTING ---------

--------- E8rouoened - ENDIF- 2A FUN2TION BD2INSERT E)ORTING T2ODE tcode TABES D0N)ROTAB bdcdata-ENDIF-REFRES= bdcdata-

Message table output

pen error session

Insert data record that

has errors into error

session

If you have seected ca transaction on the seection screen the generated program runs as foo$s

The onine transaction is caed $ith ca transaction and passed to tae 2ATA A the

messages arising during the ca transaction are put in the interna tae 7SSTA

7SSTA is output as a ist

If you have specified an error session ( 73ltamp54P L SPA27) on the seection screen and the

ca transaction comes across an error (+3S4amp2 L 0) the error session is opened The error

session is ho$ever ony opened once Then the data record is paced in the session

A the other data records that have errors $ith ca transaction are paced in the same session

copy SAP AG BC420 12-70

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 7188

036

983209 SAP AG 1999

The Transaction Recorder

PrinciplesPrinciples

Recording )ith the LSMWRecording )ith the LSMW

Principles of atch Input and all TransactionPrinciples of atch Input and all Transaction

Integrating the TA Program into the DWIntegrating the TA Program into the DW

Using the TA Recorder Using the TA Recorder

copy SAP AG BC420 12-71

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 7288

03amp

983209 SAP AG 1999

Integrating into the DW

Transfer program

AAP Dictionar(

Integrate

SDA0

SDA6

SDAamp

SDA

Cou can integrate the generated program into the G9- The structure of the fie must e created

in the AAP ictionary The taes SGA0 SGA8 SGA1 and SGA $i e fied

copy SAP AG BC420 12-72

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 7388

03

983209 SAP AG 1999

DW Release 42

Goo

-B eeae 45

aa ran=er ogtec

Int customer data transfer ob-ect

ecord =ed

Dece daa ran=er

d Goo

The ampunction ampor interatin TA recorder prora$s is

i$ple$ented in the

D+-B in Release

The recorder can e integrated as of ampeease and it is provided in the G9- ampeease

ltot to the G9- ampeease 5n the initia screen you can integrate programs y choosing ampoto

( +nt customer ata transfer o-ect

copy SAP AG BC420 12-73

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 7488

034

983209 SAP AG 1999

reating Program as D b-ect

Comer ran=er ogtec

ampgtec ype

Sor eD =or ogtec

aa ran=er proram

Srcre name

9900

(+A1

Cane comer

ZBCA+G

ZB

ustomer transfer ob-ect

umber bet)een 7000 and 7777

b-ect t(pe

Assignment to R ob-ect

Short tet for D ob-ectShort description

Data transfer program

ame of generated program

Structure name

A structure Cstructure la(out )ith this name is created in

the AAP Dictionar(

For ampeease transfer oects $ere not organiDed y 5amp oects ut y a G numer (00089

OOOO) The numer range O0009OOOO is reserved for customers

To create a connection to the ne$ G 9- you must assign the program to a 5amp oect

2reate a short tet for the G oect This tet $i appear in the method seection ist

Specify the program to e incuded

Specify a name for the structure to e created in the AAP ictionary

Note $he generated program appears under program type +N and not under program type

-

copy SAP AG BC420 12-74

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 7588

032

983209 SAP AG 1999

Adantages

Automatic program registration in the DW in

Release 48

ou can use all the functions defined for

standard ob-ects

1ception$ The (reate ampile ith data

function

If you incuded the oect in the ampeease $orench it is automaticay avaiae in the ampeease

B $orench

A the $orench functions are avaiae for your oect ecept for Create files ith transfer ata

copy SAP AG BC420 12-75

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 7688

038

983209 SAP AG 1999

ou are no) able to$

The Transaction Recorder$ Unit Summar(

Use the recording function in the LSMW to create

a batch input session )ith the data from the

eternal s(stem

Use the TA Recorder to create (our o)n data

transfer program

Anal(e programs that )or+ )ith batch input or

call transaction

Integrate the TA Recorder programs into the

DW

copy SAP AG BC420 12-76

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 7788

ercise 1

nit $ -ecorder

$opic 2reating etors

$ransaction -ecorder ercise 1

bull 2reating detors $ith eterna numer assignment

bull etor numers M9980008 to M9980080

Address data for detors $ith eterna numer assignment is to

e transferred using program ampFI700

ro4ect F5

Supro4ect +5

-un +575

$as)s 85 95 8S25

9oad program -F+00

8 In the foo$ing eercises eisting data is to e changed Therefore these detors $ith

eterna numer assignment have to first e created

898 4nder suproect 79 create run 797G9 $ith the name Detors ith

eternal numers

copy SAP AG BC420 12-77

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 7888

891 2reate the foo$ing three tass The tass map the foo$ing process steps

convert data create + session and process + session

89198 In run 797G9 create the foo$ing tas

9 Tas AP9

9 Name 2onvert data 9 Tas type AP

9 Program type +S-

Seect the foo$ing +S- oect

+S- proect 2109

+S- suproect 7I9

+S- oect I997GT

89191 In run 797G9 create the foo$ing tas 9 Tas +5A9

9 Name 2reate I session

Tas type +5A

9 Program type INP

Seect program ampFI700 $ith the variant

I97G9

8919 In run 797G9 create the foo$ing tas

9 Tas S29

9 Name Process I session Tas type S2

9 Program type amp7P5

Seect program ampS2S4 $ith the variant

S497G9

Note that you have to correct the seuence of the tass 2onvert data

create + session and process + session

4se the uttons

89 Start the run

The detors $i e created $ith eterna numer assignments

89 2hec in transaction F0 that the detors M9980008 to M9980080 have een

created

copy SAP AG BC420 12-78

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 7988

ercise

nit $ransaction -ecorder

$opic -ecording function in the 9S8(

bull 2reate a recording using the +S-

bull ltenerate a atch input session

2hange the detor address data in the amp System

Name of the recording +

Name of the file +2055+F9

8 2reate the recording 7I3 using the +S- ampecord the transaction F01 (2hange

detor)

898 efore you create the recording first test the transaction onineQ

For the recording use detor M9980008 5n the initia screen of the F01

maintain the foo$ing fieds ony

etor etor M9980008

2ompany code 0008

Address data seect

Note $he data record must e saved hile recording

891 aintain the names and the descriptions for the foo$ing fieds

Name city street posta code and teephone numereete a other fieds in screen 880 from the recording (eg S5ampT+ +AN8

SPampAS)

4se the same technica names as sho$n in the tae eo$ (automatic fied

mapping)

copy SAP AG BC420 12-79

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 8088

1 2reate the suproect 7I9 and the ne$ oect TA3 in your proect 2109

aintain the oect attriutes and seect the item atch input recording Seect your

recording 7I3

2reate the source structure address

2reate the source fieds according to the tae eo$ 5r copy them from proect 2109S37N suproect 7I900 oect TA900

198 Fie setup The data from the egacy system are dispayed in the foo$ing tae

Fied name Fied type Fied ength escription

N5 2 8B etor numer

NA7 2 Name

STamp77T 2 Street

2ITC 2 2ityPace of residence

MIP 2 80 Posta code

T7+ 2 8B Teephone numer

191 aintain the fied mapping 4se the automatic fied mapping (via menu item

7tras)

19 Specify the fies 5ny maintain the fie name of the source fie

Name of the fie 21099IFI+7

2odepage 8800

19 Import the data and convert them ispay the data in each caseQ

19 2reate a atch input session

19B ampun the atch input session

copy SAP AG BC420 12-80

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 8188

ercise 3

nit $ransaction -ecorder

$opic -ecording ith the $ -ecorder

bull ltenerate a recording using the TA recorder

bull Test the recording

2hange the address data of detors in the amp system

Name recording $+

Name of the file +2055+F9

8 2reate the recording TA37I3 using the transaction recorder ampecord the

transaction F01 (change detor)

898 4se detor M9980008 for the recording 5n the F01 initia screen ony

maintain the foo$ing fieds

etor etor M9980008

2ompany 2ode 0008

Address data seect

Note $he data record must e saved hen recording

eete a fieds that do not eist in the source fie 21099IFI+7 from screen

880 in the recording (eg 6NA89S5ampT+ 6NA89+AN8 6ANNQ9SPampAS) Note o not deete fieds ampF01946ampS and ampF0190880

Save the recording no$

1 S$itch to the recordings overvie$

198 Process the recording $ith the processing mode A (dispay a)

191 Process the recording $ith the processing mode RN (no dispay)

19 If the recording has een tested and no error has occurred generate a I session

and run it using the I monitor If an error shoud occur generate the recordingagainQ

copy SAP AG BC420 12-81

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 8288

From the recording generate the program M21037I3 in your deveopment cass

2109 Seect the foo$ing

bull ampead fied contents from fie

bull 2reate test data in the fie 2103dei3test3tt

98 Save this program and eecute it ltenerate one I session each and process it

2arry out the same steps again using the ca transaction

The generated program shoud no$ e changed so that fie 21099IFI+7 can e

read and processed

98 2hange the defaut vaue of the fie name (parameter dataset) in 21099

IFI+7

91 2hange the structure definition eete the company code fied and the address

data checo from the structure

9 2hange the su9routine ca perform dc3fied for the company code (KampF019

46ampSK) so that the vaue 0008 is transferred

9 2hange the su9routine ca perform dc3fied for the address data checo

(KampF0190880K) so that the vaue G is transferred

9 Start the program again and read the data from the fie 21099IFI+7 $ith

detor data ltenerate a I session $ith it and run it

copy SAP AG BC420 12-82

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 8388

033 Include DR16INCLUDE BDCRECX1

SELECTION-SCREEN BEGIN OF LINE

PARAMETERS SESSION RADIOBUTTON GROUP CTU create sessi SELECTION-SCREEN COMMENT $amp TEXT-S FOR FIELD SESSION

se(ecti-scree )siti +

PARAMETERS CTU RADIOBUTTON GROUP CTU ca(( trasacti

SELECTION-SCREEN COMMENT $amp TEXT-S FOR FIELD CTU

SELECTION-SCREEN END OF LINE

SELECTION-SCREEN BEGIN OF LINE

SELECTION-SCREEN COMMENT $amp TEXT-S1 FOR FIELD GROUP

se(ecti-scree )siti $+

PARAMETERS GROUP1$amp r) ae 0 sessi

SELECTION-SCREEN COMMENT $amp TEXT-S+ FOR FIELD CTUMODE

se(ecti-scree )siti

PARAMETERS CTUMODE LIE CTU2PARAMS-DISMODE DEFAULT 3N3

A4 s56 a(( 78)rs

E4 s56 78)r errr (8

N4 7 t 7is)(a8 78)r

SELECTION-SCREEN END OF LINE

SELECTION-SCREEN BEGIN OF LINE

SELECTION-SCREEN COMMENT $amp TEXT-S$ FOR FIELD USER

se(ecti-scree )siti $+

PARAMETERS4 USER1$amp DEFAULT S9-UNAME ser 0r sessi i atc5

SELECTION-SCREEN COMMENT $amp TEXT-S FOR FIELD CUPDATE

se(ecti-scree )siti

PARAMETERS CUPDATE LIE CTU2PARAMS-UPDMODE DEFAULT 3L3

S4 s8c5rs(8

A4 as8c5rs(8

L4 (ca(

SELECTION-SCREEN END OF LINE

SELECTION-SCREEN BEGIN OF LINE

SELECTION-SCREEN COMMENT $amp TEXT-S FOR FIELD EEP

se(ecti-scree )siti $+

PARAMETERS4 EEP AS CltECBOX 3 3 = 7e(ete sessi i0 0iis5e7

3X3 = gtee) sessi i0 0iis5e7

SELECTION-SCREEN COMMENT $amp TEXT-S FOR FIELD E2GROUP

copy SAP AG BC420 12-83

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 8488

se(ecti-scree )siti

)araeters E2GROUP1$amp r) ae 0 errr-sessi

SELECTION-SCREEN END OF LINE

SELECTION-SCREEN BEGIN OF LINE

SELECTION-SCREEN COMMENT $amp TEXT-S FOR FIELD ltOLDDATE

se(ecti-scree )siti $+

PARAMETERS4 ltOLDDATE LIE S9-DATUM

SELECTION-SCREEN COMMENT +11amp TEXT-S$ FOR FIELD E2USER

se(ecti-scree )siti

PARAMETERS4 E2USER1$amp DEFAULT S9-UNAME ser 0r errr-sessi

SELECTION-SCREEN END OF LINE

SELECTION-SCREEN BEGIN OF LINE

SELECTION-SCREEN COMMENT +11amp TEXT-S FOR FIELD E2EEP

se(ecti-scree )siti

PARAMETERS4 E2EEP AS CltECBOX 3 3 = 7e(ete sessi i0 0iis5e7

3X3 = gtee) sessi i0 0iis5e7

SELECTION-SCREEN END OF LINE

SELECTION-SCREEN BEGIN OF LINE

SELECTION-SCREEN COMMENT +11amp TEXT-S FOR FIELD E2ltDATE

se(ecti-scree )siti

PARAMETERS4 E2ltDATE LIE S9-DATUM

SELECTION-SCREEN END OF LINE

SELECTION-SCREEN SIP

SELECTION-SCREEN BEGIN OF LINE

SELECTION-SCREEN COMMENT 1amp TEXT-S1 FOR FIELD NODATA

PARAMETERS4 NODATA DEFAULT 33 LOER CASE 7ata

SELECTION-SCREEN END OF LINE

----------------------------------------------------------------------

Batc5i)t7ata 0 si(e trasacti

DATA4 BDCDATA LIE BDCDATA OCCURS ITlt ltEADER LINE

essaes 0 ca(( trasacti

DATA4 MESSTAB LIE BDCMSGCOLL OCCURS ITlt ltEADER LINE

errr sessi )ee7 3 3 r 3X3amp

DATA4 E2GROUP2OPENED

essae tets

TABLES4 T1

copy SAP AG BC420 12-84

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 8588

----------------------------------------------------------------------

at se(ecti scree

----------------------------------------------------------------------

AT SELECTION-SCREEN

r) a7 ser st e 0i((e7 0r create sessi

IF SESSION = 3X3 AND

GROUP = SPACE OR USER = SPACE

MESSAGE E1MSamp

ENDIF

----------------------------------------------------------------------

)e 7ataset

----------------------------------------------------------------------

FORM OPEN2DATASET USING P2DATASET

OPEN DATASET P2DATASET IN TEXT MODE

IF S9-SUBRC

RITE4 TEXT-E S9-SUBRC

STOP

ENDIF

ENDFORM

----------------------------------------------------------------------

c(se 7ataset

----------------------------------------------------------------------

FORM CLOSE2DATASET USING P2DATASET

CLOSE DATASET P2DATASET

ENDFORM

----------------------------------------------------------------------

create atc5i)t sessi

t 0r ca(( trasacti siamp

----------------------------------------------------------------------

FORM OPEN2GROUP

IF SESSION = 3X3

SIP

RITE4 $amp 3Create r)3I1amp GROUP

SIP

)e atc5i)t r)

CALL FUNCTION 3BDC2OPEN2GROUP3

EXPORTING CLIENT = S9-MANDT

copy SAP AG BC420 12-85

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 8688

GROUP = GROUP

USER = USER

EEP = EEP

ltOLDDATE = ltOLDDATE

RITE4 amp 3BDC2OPEN2GROUP3I$amp

1$amp 3retrc7e43I+amp

S9-SUBRC

ENDIF

ENDFORM

----------------------------------------------------------------------

e7 atc5i)t sessi

ca(( trasacti si4 errr sessiamp

----------------------------------------------------------------------

FORM CLOSE2GROUP

IF SESSION = 3X3

c(se atc5i)t r)

CALL FUNCTION 3BDC2CLOSE2GROUP3

RITE4 amp 3BDC2CLOSE2GROUP3Iamp

1$amp 3retrc7e43I+amp

S9-SUBRC

ELSE

IF E2GROUP2OPENED = 3X3

CALL FUNCTION 3BDC2CLOSE2GROUP3

RITE4

RITE4 amp 3Fe5(era))e 6r7e eret3Iamp

ENDIF

ENDIF

ENDFORM

----------------------------------------------------------------------

Start e6 trasacti accr7i t )araeters

----------------------------------------------------------------------

FORM BDC2TRANSACTION USING TCODE

DATA4 L2MSTRINGamp

DATA4 L2SUBRC LIE S9-SUBRC

atc5 i)t sessi

IF SESSION = 3X3

CALL FUNCTION 3BDC2INSERT3

EXPORTING TCODE = TCODE

TABLES D9NPROTAB = BDCDATA

RITE4 3BDC2INSERT3Iamp

copy SAP AG BC420 12-86

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 8788

TCODE

3retrc7e43I+amp

S9-SUBRC

3RECORD43

S9-INDEX

ca(( trasacti si

ELSE

REFRESlt MESSTAB

CALL TRANSACTION TCODE USING BDCDATA

MODE CTUMODE

UPDATE CUPDATE

MESSAGES INTO MESSTAB

L2SUBRC = S9-SUBRC

RITE4 3CALL2TRANSACTION3

TCODE

3retrc7e43I+amp

L2SUBRC

3RECORD43

S9-INDEX

LOOP AT MESSTAB

SELECT SINGLE FROM T1 ltERE SPRSL = MESSTAB-MSGSPRA

AND ARBGB = MESSTAB-MSGID

AND MSGNR = MESSTAB-MSGNR

IF S9-SUBRC =

L2MSTRING = T1-TEXT

IF L2MSTRING CS 313

REPLACE 313 ITlt MESSTAB-MSGH1 INTO L2MSTRING

REPLACE 3$3 ITlt MESSTAB-MSGH$ INTO L2MSTRING

REPLACE 33 ITlt MESSTAB-MSGH INTO L2MSTRING

REPLACE 33 ITlt MESSTAB-MSGH INTO L2MSTRING

ELSE

REPLACE 33 ITlt MESSTAB-MSGH1 INTO L2MSTRING

REPLACE 33 ITlt MESSTAB-MSGH$ INTO L2MSTRING

REPLACE 33 ITlt MESSTAB-MSGH INTO L2MSTRING

REPLACE 33 ITlt MESSTAB-MSGH INTO L2MSTRING

ENDIF

CONDENSE L2MSTRING

RITE4 MESSTAB-MSGT9P L2MSTRING$+amp

ELSE

RITE4 MESSTAB

ENDIF

ENDLOOP

copy SAP AG BC420 12-87

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 8888

SIP

Eree 0e5(era))e

IF L2SUBRC AND E2GROUP SPACE

IF E2GROUP2OPENED = 3 3

CALL FUNCTION 3BDC2OPEN2GROUP3

EXPORTING CLIENT = S9-MANDT

GROUP = E2GROUP

USER = E2USER

EEP = E2EEP

ltOLDDATE = E2ltDATE

E2GROUP2OPENED = 3X3

ENDIF

CALL FUNCTION 3BDC2INSERT3

EXPORTING TCODE = TCODE

TABLES D9NPROTAB = BDCDATA

ENDIF

ENDIF

REFRESlt BDCDATA

ENDFORM

----------------------------------------------------------------------

Start e6 scree

----------------------------------------------------------------------

FORM BDC2D9NPRO USING PROGRAM D9NPRO

CLEAR BDCDATA

BDCDATA-PROGRAM = PROGRAM

BDCDATA-D9NPRO = D9NPRO

BDCDATA-D9NBEGIN = 3X3

APPEND BDCDATA

ENDFORM

----------------------------------------------------------------------

Isert 0ie(7

Page 66: BC420_46C - 012The Transaction Recorder

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 6688

088

983209 SAP AG 1999

ALL TRASATI C

RE)ORT 777-DATA mtab T0)E TABE OF bdcm8coll-

2A TRANSA2TION FD USING bdcdata (ESSAGES INTO mtab-

2A TRANSA2TION 3tranact9oncode4 USING 3bdc1table4 C (ODE A E N C U)DATE A S C (ESSAGES INTO 3metab4 C -

7SSAlt7S specifies that a system messages that are output during the eecution of a 2A++

TampANSA2TI5N are $ritten to the interna tae L7SSTA The interna tae must have the

structure 2Slt25++

4nie the cassica atch input processing $ith sessions 2A++ TampANSA2TI5N does not offer any

specia processing procedures for transactions containing errors There are no restart functions for

transactions that contain errors or that cause updating terminations

copy SAP AG BC420 12-66

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 6788

083

983209 SAP AG 1999

ALL TRASATI C4

RE)ORT 777-DATA mltot T0)E ctuaram-

2A TRANSA2TION FD USING BD2DATA

O)TIONS FRO( mltot-

2A TRANSA2TION 3tranact9oncode4 USING 3bdc1table4 C (ODE A E N C U)DATE A S C (ESSAGES INTO 3metab4 C O)TIONS FRO( ot C -

RE)ORT 777-DATA mltot T0)E ctuaram-2A TRANSA2TION FD USING bdcdata

O)TIONS FRO( mltot-

The addition 5PTI5NS enaes the ca transaction statement to e controed through a structure

The structure must have the dictionary type 2T43PAampAS

The addition 5PTI5NS Famp5 must not e comined either $ith the addition 57 or $ith

4PAT7 ore information on the net side

copy SAP AG BC420 12-67

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 6888

085

983209 SAP AG 1999

Structure TUltPARAMS

DISMD1 Procen mode anaoo o addon amp

UPDMD1 $pdae mode anaoo o addon $PA

ATTMD1 CA mode CA conro

D19SI1 orce de=a EndoE e drn procen

RAMMIT +o eD a Camp amp(

IPT +o a ac np eonF a F S-B+P SPAC

I1D +o a ac np eon a=er end o= BC daa

The components are defined as foo$s

The components 7FSIM7 ampA25IT N5INPT and N5I7N can have the foo$ing

vaues KGK E Ces or K K E No

If the addition 5PTI5NS Famp5 is not specified the foo$ing settings appy to the contro

parameters

IS57 from addition 57

4P57 from addition 4PAT7

2ATT57 2ATT not active

7FSIM7 o not not use defaut $indo$s siDe

ampA25IT Successfu eit at 25IT -5amp6

N5INPT atch input session active (SC9INPT E G)

N5I7N atch input session sti active after end of 2 data

copy SAP AG BC420 12-68

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 6988

087

983209 SAP AG 1999

SMSBID Message ID

SMSBT Message T(pe C1GIGWGSGA

SMSB Message umber

SMSB6 Message ariable 6

SMSBamp Message ariable amp

SMSB Message ariable

SMSB4 Message ariable 4

SMSBID Message ID

SMSBT Message T(pe C1GIGWGSGA

SMSB Message umber

SMSB6 Message ariable 6

SMSBamp Message ariable amp

SMSB Message ariable

SMSB4 Message ariable 4

Return code$

S(stem fields$

alue Meaning

0 Successful

6000 1rror in transaction

6000 1rror in processing call transaction

see also the s(stem fields specified

alue Meaning

0 Successful

6000 1rror in transaction

6000 1rror in processing call transaction

see also the s(stem fields specified

9ield name Meaning9ield name9ield name MeaningMeaning

Return ode and S(stem 9ields

The return code is used to specify $hether the caed transaction $as processed successfuy In

addition severa system fieds are fied The numer I type and variaes of the diaog message

output y the caed transaction Cou need this information to output the message tet

copy SAP AG BC420 12-69

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 7088

030

983209 SAP AG 1999

Benerated Program of the TA Recorder

REFRES= (ESSTAB-

2A TRANSA2TION tcode USING bdcdata (ODE ctumode U)DATE cudate (ESSAGES INTO metab-OO) AT metab- ENDOO)-IF lubrc 34 AND e8rou 34 S)A2E- IF e8rouoenend - 2A FUN2TION BD2O)ENGROU) E)ORTING ---------

--------- E8rouoened - ENDIF- 2A FUN2TION BD2INSERT E)ORTING T2ODE tcode TABES D0N)ROTAB bdcdata-ENDIF-REFRES= bdcdata-

Message table output

pen error session

Insert data record that

has errors into error

session

If you have seected ca transaction on the seection screen the generated program runs as foo$s

The onine transaction is caed $ith ca transaction and passed to tae 2ATA A the

messages arising during the ca transaction are put in the interna tae 7SSTA

7SSTA is output as a ist

If you have specified an error session ( 73ltamp54P L SPA27) on the seection screen and the

ca transaction comes across an error (+3S4amp2 L 0) the error session is opened The error

session is ho$ever ony opened once Then the data record is paced in the session

A the other data records that have errors $ith ca transaction are paced in the same session

copy SAP AG BC420 12-70

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 7188

036

983209 SAP AG 1999

The Transaction Recorder

PrinciplesPrinciples

Recording )ith the LSMWRecording )ith the LSMW

Principles of atch Input and all TransactionPrinciples of atch Input and all Transaction

Integrating the TA Program into the DWIntegrating the TA Program into the DW

Using the TA Recorder Using the TA Recorder

copy SAP AG BC420 12-71

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 7288

03amp

983209 SAP AG 1999

Integrating into the DW

Transfer program

AAP Dictionar(

Integrate

SDA0

SDA6

SDAamp

SDA

Cou can integrate the generated program into the G9- The structure of the fie must e created

in the AAP ictionary The taes SGA0 SGA8 SGA1 and SGA $i e fied

copy SAP AG BC420 12-72

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 7388

03

983209 SAP AG 1999

DW Release 42

Goo

-B eeae 45

aa ran=er ogtec

Int customer data transfer ob-ect

ecord =ed

Dece daa ran=er

d Goo

The ampunction ampor interatin TA recorder prora$s is

i$ple$ented in the

D+-B in Release

The recorder can e integrated as of ampeease and it is provided in the G9- ampeease

ltot to the G9- ampeease 5n the initia screen you can integrate programs y choosing ampoto

( +nt customer ata transfer o-ect

copy SAP AG BC420 12-73

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 7488

034

983209 SAP AG 1999

reating Program as D b-ect

Comer ran=er ogtec

ampgtec ype

Sor eD =or ogtec

aa ran=er proram

Srcre name

9900

(+A1

Cane comer

ZBCA+G

ZB

ustomer transfer ob-ect

umber bet)een 7000 and 7777

b-ect t(pe

Assignment to R ob-ect

Short tet for D ob-ectShort description

Data transfer program

ame of generated program

Structure name

A structure Cstructure la(out )ith this name is created in

the AAP Dictionar(

For ampeease transfer oects $ere not organiDed y 5amp oects ut y a G numer (00089

OOOO) The numer range O0009OOOO is reserved for customers

To create a connection to the ne$ G 9- you must assign the program to a 5amp oect

2reate a short tet for the G oect This tet $i appear in the method seection ist

Specify the program to e incuded

Specify a name for the structure to e created in the AAP ictionary

Note $he generated program appears under program type +N and not under program type

-

copy SAP AG BC420 12-74

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 7588

032

983209 SAP AG 1999

Adantages

Automatic program registration in the DW in

Release 48

ou can use all the functions defined for

standard ob-ects

1ception$ The (reate ampile ith data

function

If you incuded the oect in the ampeease $orench it is automaticay avaiae in the ampeease

B $orench

A the $orench functions are avaiae for your oect ecept for Create files ith transfer ata

copy SAP AG BC420 12-75

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 7688

038

983209 SAP AG 1999

ou are no) able to$

The Transaction Recorder$ Unit Summar(

Use the recording function in the LSMW to create

a batch input session )ith the data from the

eternal s(stem

Use the TA Recorder to create (our o)n data

transfer program

Anal(e programs that )or+ )ith batch input or

call transaction

Integrate the TA Recorder programs into the

DW

copy SAP AG BC420 12-76

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 7788

ercise 1

nit $ -ecorder

$opic 2reating etors

$ransaction -ecorder ercise 1

bull 2reating detors $ith eterna numer assignment

bull etor numers M9980008 to M9980080

Address data for detors $ith eterna numer assignment is to

e transferred using program ampFI700

ro4ect F5

Supro4ect +5

-un +575

$as)s 85 95 8S25

9oad program -F+00

8 In the foo$ing eercises eisting data is to e changed Therefore these detors $ith

eterna numer assignment have to first e created

898 4nder suproect 79 create run 797G9 $ith the name Detors ith

eternal numers

copy SAP AG BC420 12-77

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 7888

891 2reate the foo$ing three tass The tass map the foo$ing process steps

convert data create + session and process + session

89198 In run 797G9 create the foo$ing tas

9 Tas AP9

9 Name 2onvert data 9 Tas type AP

9 Program type +S-

Seect the foo$ing +S- oect

+S- proect 2109

+S- suproect 7I9

+S- oect I997GT

89191 In run 797G9 create the foo$ing tas 9 Tas +5A9

9 Name 2reate I session

Tas type +5A

9 Program type INP

Seect program ampFI700 $ith the variant

I97G9

8919 In run 797G9 create the foo$ing tas

9 Tas S29

9 Name Process I session Tas type S2

9 Program type amp7P5

Seect program ampS2S4 $ith the variant

S497G9

Note that you have to correct the seuence of the tass 2onvert data

create + session and process + session

4se the uttons

89 Start the run

The detors $i e created $ith eterna numer assignments

89 2hec in transaction F0 that the detors M9980008 to M9980080 have een

created

copy SAP AG BC420 12-78

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 7988

ercise

nit $ransaction -ecorder

$opic -ecording function in the 9S8(

bull 2reate a recording using the +S-

bull ltenerate a atch input session

2hange the detor address data in the amp System

Name of the recording +

Name of the file +2055+F9

8 2reate the recording 7I3 using the +S- ampecord the transaction F01 (2hange

detor)

898 efore you create the recording first test the transaction onineQ

For the recording use detor M9980008 5n the initia screen of the F01

maintain the foo$ing fieds ony

etor etor M9980008

2ompany code 0008

Address data seect

Note $he data record must e saved hile recording

891 aintain the names and the descriptions for the foo$ing fieds

Name city street posta code and teephone numereete a other fieds in screen 880 from the recording (eg S5ampT+ +AN8

SPampAS)

4se the same technica names as sho$n in the tae eo$ (automatic fied

mapping)

copy SAP AG BC420 12-79

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 8088

1 2reate the suproect 7I9 and the ne$ oect TA3 in your proect 2109

aintain the oect attriutes and seect the item atch input recording Seect your

recording 7I3

2reate the source structure address

2reate the source fieds according to the tae eo$ 5r copy them from proect 2109S37N suproect 7I900 oect TA900

198 Fie setup The data from the egacy system are dispayed in the foo$ing tae

Fied name Fied type Fied ength escription

N5 2 8B etor numer

NA7 2 Name

STamp77T 2 Street

2ITC 2 2ityPace of residence

MIP 2 80 Posta code

T7+ 2 8B Teephone numer

191 aintain the fied mapping 4se the automatic fied mapping (via menu item

7tras)

19 Specify the fies 5ny maintain the fie name of the source fie

Name of the fie 21099IFI+7

2odepage 8800

19 Import the data and convert them ispay the data in each caseQ

19 2reate a atch input session

19B ampun the atch input session

copy SAP AG BC420 12-80

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 8188

ercise 3

nit $ransaction -ecorder

$opic -ecording ith the $ -ecorder

bull ltenerate a recording using the TA recorder

bull Test the recording

2hange the address data of detors in the amp system

Name recording $+

Name of the file +2055+F9

8 2reate the recording TA37I3 using the transaction recorder ampecord the

transaction F01 (change detor)

898 4se detor M9980008 for the recording 5n the F01 initia screen ony

maintain the foo$ing fieds

etor etor M9980008

2ompany 2ode 0008

Address data seect

Note $he data record must e saved hen recording

eete a fieds that do not eist in the source fie 21099IFI+7 from screen

880 in the recording (eg 6NA89S5ampT+ 6NA89+AN8 6ANNQ9SPampAS) Note o not deete fieds ampF01946ampS and ampF0190880

Save the recording no$

1 S$itch to the recordings overvie$

198 Process the recording $ith the processing mode A (dispay a)

191 Process the recording $ith the processing mode RN (no dispay)

19 If the recording has een tested and no error has occurred generate a I session

and run it using the I monitor If an error shoud occur generate the recordingagainQ

copy SAP AG BC420 12-81

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 8288

From the recording generate the program M21037I3 in your deveopment cass

2109 Seect the foo$ing

bull ampead fied contents from fie

bull 2reate test data in the fie 2103dei3test3tt

98 Save this program and eecute it ltenerate one I session each and process it

2arry out the same steps again using the ca transaction

The generated program shoud no$ e changed so that fie 21099IFI+7 can e

read and processed

98 2hange the defaut vaue of the fie name (parameter dataset) in 21099

IFI+7

91 2hange the structure definition eete the company code fied and the address

data checo from the structure

9 2hange the su9routine ca perform dc3fied for the company code (KampF019

46ampSK) so that the vaue 0008 is transferred

9 2hange the su9routine ca perform dc3fied for the address data checo

(KampF0190880K) so that the vaue G is transferred

9 Start the program again and read the data from the fie 21099IFI+7 $ith

detor data ltenerate a I session $ith it and run it

copy SAP AG BC420 12-82

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 8388

033 Include DR16INCLUDE BDCRECX1

SELECTION-SCREEN BEGIN OF LINE

PARAMETERS SESSION RADIOBUTTON GROUP CTU create sessi SELECTION-SCREEN COMMENT $amp TEXT-S FOR FIELD SESSION

se(ecti-scree )siti +

PARAMETERS CTU RADIOBUTTON GROUP CTU ca(( trasacti

SELECTION-SCREEN COMMENT $amp TEXT-S FOR FIELD CTU

SELECTION-SCREEN END OF LINE

SELECTION-SCREEN BEGIN OF LINE

SELECTION-SCREEN COMMENT $amp TEXT-S1 FOR FIELD GROUP

se(ecti-scree )siti $+

PARAMETERS GROUP1$amp r) ae 0 sessi

SELECTION-SCREEN COMMENT $amp TEXT-S+ FOR FIELD CTUMODE

se(ecti-scree )siti

PARAMETERS CTUMODE LIE CTU2PARAMS-DISMODE DEFAULT 3N3

A4 s56 a(( 78)rs

E4 s56 78)r errr (8

N4 7 t 7is)(a8 78)r

SELECTION-SCREEN END OF LINE

SELECTION-SCREEN BEGIN OF LINE

SELECTION-SCREEN COMMENT $amp TEXT-S$ FOR FIELD USER

se(ecti-scree )siti $+

PARAMETERS4 USER1$amp DEFAULT S9-UNAME ser 0r sessi i atc5

SELECTION-SCREEN COMMENT $amp TEXT-S FOR FIELD CUPDATE

se(ecti-scree )siti

PARAMETERS CUPDATE LIE CTU2PARAMS-UPDMODE DEFAULT 3L3

S4 s8c5rs(8

A4 as8c5rs(8

L4 (ca(

SELECTION-SCREEN END OF LINE

SELECTION-SCREEN BEGIN OF LINE

SELECTION-SCREEN COMMENT $amp TEXT-S FOR FIELD EEP

se(ecti-scree )siti $+

PARAMETERS4 EEP AS CltECBOX 3 3 = 7e(ete sessi i0 0iis5e7

3X3 = gtee) sessi i0 0iis5e7

SELECTION-SCREEN COMMENT $amp TEXT-S FOR FIELD E2GROUP

copy SAP AG BC420 12-83

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 8488

se(ecti-scree )siti

)araeters E2GROUP1$amp r) ae 0 errr-sessi

SELECTION-SCREEN END OF LINE

SELECTION-SCREEN BEGIN OF LINE

SELECTION-SCREEN COMMENT $amp TEXT-S FOR FIELD ltOLDDATE

se(ecti-scree )siti $+

PARAMETERS4 ltOLDDATE LIE S9-DATUM

SELECTION-SCREEN COMMENT +11amp TEXT-S$ FOR FIELD E2USER

se(ecti-scree )siti

PARAMETERS4 E2USER1$amp DEFAULT S9-UNAME ser 0r errr-sessi

SELECTION-SCREEN END OF LINE

SELECTION-SCREEN BEGIN OF LINE

SELECTION-SCREEN COMMENT +11amp TEXT-S FOR FIELD E2EEP

se(ecti-scree )siti

PARAMETERS4 E2EEP AS CltECBOX 3 3 = 7e(ete sessi i0 0iis5e7

3X3 = gtee) sessi i0 0iis5e7

SELECTION-SCREEN END OF LINE

SELECTION-SCREEN BEGIN OF LINE

SELECTION-SCREEN COMMENT +11amp TEXT-S FOR FIELD E2ltDATE

se(ecti-scree )siti

PARAMETERS4 E2ltDATE LIE S9-DATUM

SELECTION-SCREEN END OF LINE

SELECTION-SCREEN SIP

SELECTION-SCREEN BEGIN OF LINE

SELECTION-SCREEN COMMENT 1amp TEXT-S1 FOR FIELD NODATA

PARAMETERS4 NODATA DEFAULT 33 LOER CASE 7ata

SELECTION-SCREEN END OF LINE

----------------------------------------------------------------------

Batc5i)t7ata 0 si(e trasacti

DATA4 BDCDATA LIE BDCDATA OCCURS ITlt ltEADER LINE

essaes 0 ca(( trasacti

DATA4 MESSTAB LIE BDCMSGCOLL OCCURS ITlt ltEADER LINE

errr sessi )ee7 3 3 r 3X3amp

DATA4 E2GROUP2OPENED

essae tets

TABLES4 T1

copy SAP AG BC420 12-84

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 8588

----------------------------------------------------------------------

at se(ecti scree

----------------------------------------------------------------------

AT SELECTION-SCREEN

r) a7 ser st e 0i((e7 0r create sessi

IF SESSION = 3X3 AND

GROUP = SPACE OR USER = SPACE

MESSAGE E1MSamp

ENDIF

----------------------------------------------------------------------

)e 7ataset

----------------------------------------------------------------------

FORM OPEN2DATASET USING P2DATASET

OPEN DATASET P2DATASET IN TEXT MODE

IF S9-SUBRC

RITE4 TEXT-E S9-SUBRC

STOP

ENDIF

ENDFORM

----------------------------------------------------------------------

c(se 7ataset

----------------------------------------------------------------------

FORM CLOSE2DATASET USING P2DATASET

CLOSE DATASET P2DATASET

ENDFORM

----------------------------------------------------------------------

create atc5i)t sessi

t 0r ca(( trasacti siamp

----------------------------------------------------------------------

FORM OPEN2GROUP

IF SESSION = 3X3

SIP

RITE4 $amp 3Create r)3I1amp GROUP

SIP

)e atc5i)t r)

CALL FUNCTION 3BDC2OPEN2GROUP3

EXPORTING CLIENT = S9-MANDT

copy SAP AG BC420 12-85

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 8688

GROUP = GROUP

USER = USER

EEP = EEP

ltOLDDATE = ltOLDDATE

RITE4 amp 3BDC2OPEN2GROUP3I$amp

1$amp 3retrc7e43I+amp

S9-SUBRC

ENDIF

ENDFORM

----------------------------------------------------------------------

e7 atc5i)t sessi

ca(( trasacti si4 errr sessiamp

----------------------------------------------------------------------

FORM CLOSE2GROUP

IF SESSION = 3X3

c(se atc5i)t r)

CALL FUNCTION 3BDC2CLOSE2GROUP3

RITE4 amp 3BDC2CLOSE2GROUP3Iamp

1$amp 3retrc7e43I+amp

S9-SUBRC

ELSE

IF E2GROUP2OPENED = 3X3

CALL FUNCTION 3BDC2CLOSE2GROUP3

RITE4

RITE4 amp 3Fe5(era))e 6r7e eret3Iamp

ENDIF

ENDIF

ENDFORM

----------------------------------------------------------------------

Start e6 trasacti accr7i t )araeters

----------------------------------------------------------------------

FORM BDC2TRANSACTION USING TCODE

DATA4 L2MSTRINGamp

DATA4 L2SUBRC LIE S9-SUBRC

atc5 i)t sessi

IF SESSION = 3X3

CALL FUNCTION 3BDC2INSERT3

EXPORTING TCODE = TCODE

TABLES D9NPROTAB = BDCDATA

RITE4 3BDC2INSERT3Iamp

copy SAP AG BC420 12-86

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 8788

TCODE

3retrc7e43I+amp

S9-SUBRC

3RECORD43

S9-INDEX

ca(( trasacti si

ELSE

REFRESlt MESSTAB

CALL TRANSACTION TCODE USING BDCDATA

MODE CTUMODE

UPDATE CUPDATE

MESSAGES INTO MESSTAB

L2SUBRC = S9-SUBRC

RITE4 3CALL2TRANSACTION3

TCODE

3retrc7e43I+amp

L2SUBRC

3RECORD43

S9-INDEX

LOOP AT MESSTAB

SELECT SINGLE FROM T1 ltERE SPRSL = MESSTAB-MSGSPRA

AND ARBGB = MESSTAB-MSGID

AND MSGNR = MESSTAB-MSGNR

IF S9-SUBRC =

L2MSTRING = T1-TEXT

IF L2MSTRING CS 313

REPLACE 313 ITlt MESSTAB-MSGH1 INTO L2MSTRING

REPLACE 3$3 ITlt MESSTAB-MSGH$ INTO L2MSTRING

REPLACE 33 ITlt MESSTAB-MSGH INTO L2MSTRING

REPLACE 33 ITlt MESSTAB-MSGH INTO L2MSTRING

ELSE

REPLACE 33 ITlt MESSTAB-MSGH1 INTO L2MSTRING

REPLACE 33 ITlt MESSTAB-MSGH$ INTO L2MSTRING

REPLACE 33 ITlt MESSTAB-MSGH INTO L2MSTRING

REPLACE 33 ITlt MESSTAB-MSGH INTO L2MSTRING

ENDIF

CONDENSE L2MSTRING

RITE4 MESSTAB-MSGT9P L2MSTRING$+amp

ELSE

RITE4 MESSTAB

ENDIF

ENDLOOP

copy SAP AG BC420 12-87

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 8888

SIP

Eree 0e5(era))e

IF L2SUBRC AND E2GROUP SPACE

IF E2GROUP2OPENED = 3 3

CALL FUNCTION 3BDC2OPEN2GROUP3

EXPORTING CLIENT = S9-MANDT

GROUP = E2GROUP

USER = E2USER

EEP = E2EEP

ltOLDDATE = E2ltDATE

E2GROUP2OPENED = 3X3

ENDIF

CALL FUNCTION 3BDC2INSERT3

EXPORTING TCODE = TCODE

TABLES D9NPROTAB = BDCDATA

ENDIF

ENDIF

REFRESlt BDCDATA

ENDFORM

----------------------------------------------------------------------

Start e6 scree

----------------------------------------------------------------------

FORM BDC2D9NPRO USING PROGRAM D9NPRO

CLEAR BDCDATA

BDCDATA-PROGRAM = PROGRAM

BDCDATA-D9NPRO = D9NPRO

BDCDATA-D9NBEGIN = 3X3

APPEND BDCDATA

ENDFORM

----------------------------------------------------------------------

Isert 0ie(7

Page 67: BC420_46C - 012The Transaction Recorder

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 6788

083

983209 SAP AG 1999

ALL TRASATI C4

RE)ORT 777-DATA mltot T0)E ctuaram-

2A TRANSA2TION FD USING BD2DATA

O)TIONS FRO( mltot-

2A TRANSA2TION 3tranact9oncode4 USING 3bdc1table4 C (ODE A E N C U)DATE A S C (ESSAGES INTO 3metab4 C O)TIONS FRO( ot C -

RE)ORT 777-DATA mltot T0)E ctuaram-2A TRANSA2TION FD USING bdcdata

O)TIONS FRO( mltot-

The addition 5PTI5NS enaes the ca transaction statement to e controed through a structure

The structure must have the dictionary type 2T43PAampAS

The addition 5PTI5NS Famp5 must not e comined either $ith the addition 57 or $ith

4PAT7 ore information on the net side

copy SAP AG BC420 12-67

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 6888

085

983209 SAP AG 1999

Structure TUltPARAMS

DISMD1 Procen mode anaoo o addon amp

UPDMD1 $pdae mode anaoo o addon $PA

ATTMD1 CA mode CA conro

D19SI1 orce de=a EndoE e drn procen

RAMMIT +o eD a Camp amp(

IPT +o a ac np eonF a F S-B+P SPAC

I1D +o a ac np eon a=er end o= BC daa

The components are defined as foo$s

The components 7FSIM7 ampA25IT N5INPT and N5I7N can have the foo$ing

vaues KGK E Ces or K K E No

If the addition 5PTI5NS Famp5 is not specified the foo$ing settings appy to the contro

parameters

IS57 from addition 57

4P57 from addition 4PAT7

2ATT57 2ATT not active

7FSIM7 o not not use defaut $indo$s siDe

ampA25IT Successfu eit at 25IT -5amp6

N5INPT atch input session active (SC9INPT E G)

N5I7N atch input session sti active after end of 2 data

copy SAP AG BC420 12-68

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 6988

087

983209 SAP AG 1999

SMSBID Message ID

SMSBT Message T(pe C1GIGWGSGA

SMSB Message umber

SMSB6 Message ariable 6

SMSBamp Message ariable amp

SMSB Message ariable

SMSB4 Message ariable 4

SMSBID Message ID

SMSBT Message T(pe C1GIGWGSGA

SMSB Message umber

SMSB6 Message ariable 6

SMSBamp Message ariable amp

SMSB Message ariable

SMSB4 Message ariable 4

Return code$

S(stem fields$

alue Meaning

0 Successful

6000 1rror in transaction

6000 1rror in processing call transaction

see also the s(stem fields specified

alue Meaning

0 Successful

6000 1rror in transaction

6000 1rror in processing call transaction

see also the s(stem fields specified

9ield name Meaning9ield name9ield name MeaningMeaning

Return ode and S(stem 9ields

The return code is used to specify $hether the caed transaction $as processed successfuy In

addition severa system fieds are fied The numer I type and variaes of the diaog message

output y the caed transaction Cou need this information to output the message tet

copy SAP AG BC420 12-69

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 7088

030

983209 SAP AG 1999

Benerated Program of the TA Recorder

REFRES= (ESSTAB-

2A TRANSA2TION tcode USING bdcdata (ODE ctumode U)DATE cudate (ESSAGES INTO metab-OO) AT metab- ENDOO)-IF lubrc 34 AND e8rou 34 S)A2E- IF e8rouoenend - 2A FUN2TION BD2O)ENGROU) E)ORTING ---------

--------- E8rouoened - ENDIF- 2A FUN2TION BD2INSERT E)ORTING T2ODE tcode TABES D0N)ROTAB bdcdata-ENDIF-REFRES= bdcdata-

Message table output

pen error session

Insert data record that

has errors into error

session

If you have seected ca transaction on the seection screen the generated program runs as foo$s

The onine transaction is caed $ith ca transaction and passed to tae 2ATA A the

messages arising during the ca transaction are put in the interna tae 7SSTA

7SSTA is output as a ist

If you have specified an error session ( 73ltamp54P L SPA27) on the seection screen and the

ca transaction comes across an error (+3S4amp2 L 0) the error session is opened The error

session is ho$ever ony opened once Then the data record is paced in the session

A the other data records that have errors $ith ca transaction are paced in the same session

copy SAP AG BC420 12-70

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 7188

036

983209 SAP AG 1999

The Transaction Recorder

PrinciplesPrinciples

Recording )ith the LSMWRecording )ith the LSMW

Principles of atch Input and all TransactionPrinciples of atch Input and all Transaction

Integrating the TA Program into the DWIntegrating the TA Program into the DW

Using the TA Recorder Using the TA Recorder

copy SAP AG BC420 12-71

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 7288

03amp

983209 SAP AG 1999

Integrating into the DW

Transfer program

AAP Dictionar(

Integrate

SDA0

SDA6

SDAamp

SDA

Cou can integrate the generated program into the G9- The structure of the fie must e created

in the AAP ictionary The taes SGA0 SGA8 SGA1 and SGA $i e fied

copy SAP AG BC420 12-72

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 7388

03

983209 SAP AG 1999

DW Release 42

Goo

-B eeae 45

aa ran=er ogtec

Int customer data transfer ob-ect

ecord =ed

Dece daa ran=er

d Goo

The ampunction ampor interatin TA recorder prora$s is

i$ple$ented in the

D+-B in Release

The recorder can e integrated as of ampeease and it is provided in the G9- ampeease

ltot to the G9- ampeease 5n the initia screen you can integrate programs y choosing ampoto

( +nt customer ata transfer o-ect

copy SAP AG BC420 12-73

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 7488

034

983209 SAP AG 1999

reating Program as D b-ect

Comer ran=er ogtec

ampgtec ype

Sor eD =or ogtec

aa ran=er proram

Srcre name

9900

(+A1

Cane comer

ZBCA+G

ZB

ustomer transfer ob-ect

umber bet)een 7000 and 7777

b-ect t(pe

Assignment to R ob-ect

Short tet for D ob-ectShort description

Data transfer program

ame of generated program

Structure name

A structure Cstructure la(out )ith this name is created in

the AAP Dictionar(

For ampeease transfer oects $ere not organiDed y 5amp oects ut y a G numer (00089

OOOO) The numer range O0009OOOO is reserved for customers

To create a connection to the ne$ G 9- you must assign the program to a 5amp oect

2reate a short tet for the G oect This tet $i appear in the method seection ist

Specify the program to e incuded

Specify a name for the structure to e created in the AAP ictionary

Note $he generated program appears under program type +N and not under program type

-

copy SAP AG BC420 12-74

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 7588

032

983209 SAP AG 1999

Adantages

Automatic program registration in the DW in

Release 48

ou can use all the functions defined for

standard ob-ects

1ception$ The (reate ampile ith data

function

If you incuded the oect in the ampeease $orench it is automaticay avaiae in the ampeease

B $orench

A the $orench functions are avaiae for your oect ecept for Create files ith transfer ata

copy SAP AG BC420 12-75

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 7688

038

983209 SAP AG 1999

ou are no) able to$

The Transaction Recorder$ Unit Summar(

Use the recording function in the LSMW to create

a batch input session )ith the data from the

eternal s(stem

Use the TA Recorder to create (our o)n data

transfer program

Anal(e programs that )or+ )ith batch input or

call transaction

Integrate the TA Recorder programs into the

DW

copy SAP AG BC420 12-76

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 7788

ercise 1

nit $ -ecorder

$opic 2reating etors

$ransaction -ecorder ercise 1

bull 2reating detors $ith eterna numer assignment

bull etor numers M9980008 to M9980080

Address data for detors $ith eterna numer assignment is to

e transferred using program ampFI700

ro4ect F5

Supro4ect +5

-un +575

$as)s 85 95 8S25

9oad program -F+00

8 In the foo$ing eercises eisting data is to e changed Therefore these detors $ith

eterna numer assignment have to first e created

898 4nder suproect 79 create run 797G9 $ith the name Detors ith

eternal numers

copy SAP AG BC420 12-77

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 7888

891 2reate the foo$ing three tass The tass map the foo$ing process steps

convert data create + session and process + session

89198 In run 797G9 create the foo$ing tas

9 Tas AP9

9 Name 2onvert data 9 Tas type AP

9 Program type +S-

Seect the foo$ing +S- oect

+S- proect 2109

+S- suproect 7I9

+S- oect I997GT

89191 In run 797G9 create the foo$ing tas 9 Tas +5A9

9 Name 2reate I session

Tas type +5A

9 Program type INP

Seect program ampFI700 $ith the variant

I97G9

8919 In run 797G9 create the foo$ing tas

9 Tas S29

9 Name Process I session Tas type S2

9 Program type amp7P5

Seect program ampS2S4 $ith the variant

S497G9

Note that you have to correct the seuence of the tass 2onvert data

create + session and process + session

4se the uttons

89 Start the run

The detors $i e created $ith eterna numer assignments

89 2hec in transaction F0 that the detors M9980008 to M9980080 have een

created

copy SAP AG BC420 12-78

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 7988

ercise

nit $ransaction -ecorder

$opic -ecording function in the 9S8(

bull 2reate a recording using the +S-

bull ltenerate a atch input session

2hange the detor address data in the amp System

Name of the recording +

Name of the file +2055+F9

8 2reate the recording 7I3 using the +S- ampecord the transaction F01 (2hange

detor)

898 efore you create the recording first test the transaction onineQ

For the recording use detor M9980008 5n the initia screen of the F01

maintain the foo$ing fieds ony

etor etor M9980008

2ompany code 0008

Address data seect

Note $he data record must e saved hile recording

891 aintain the names and the descriptions for the foo$ing fieds

Name city street posta code and teephone numereete a other fieds in screen 880 from the recording (eg S5ampT+ +AN8

SPampAS)

4se the same technica names as sho$n in the tae eo$ (automatic fied

mapping)

copy SAP AG BC420 12-79

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 8088

1 2reate the suproect 7I9 and the ne$ oect TA3 in your proect 2109

aintain the oect attriutes and seect the item atch input recording Seect your

recording 7I3

2reate the source structure address

2reate the source fieds according to the tae eo$ 5r copy them from proect 2109S37N suproect 7I900 oect TA900

198 Fie setup The data from the egacy system are dispayed in the foo$ing tae

Fied name Fied type Fied ength escription

N5 2 8B etor numer

NA7 2 Name

STamp77T 2 Street

2ITC 2 2ityPace of residence

MIP 2 80 Posta code

T7+ 2 8B Teephone numer

191 aintain the fied mapping 4se the automatic fied mapping (via menu item

7tras)

19 Specify the fies 5ny maintain the fie name of the source fie

Name of the fie 21099IFI+7

2odepage 8800

19 Import the data and convert them ispay the data in each caseQ

19 2reate a atch input session

19B ampun the atch input session

copy SAP AG BC420 12-80

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 8188

ercise 3

nit $ransaction -ecorder

$opic -ecording ith the $ -ecorder

bull ltenerate a recording using the TA recorder

bull Test the recording

2hange the address data of detors in the amp system

Name recording $+

Name of the file +2055+F9

8 2reate the recording TA37I3 using the transaction recorder ampecord the

transaction F01 (change detor)

898 4se detor M9980008 for the recording 5n the F01 initia screen ony

maintain the foo$ing fieds

etor etor M9980008

2ompany 2ode 0008

Address data seect

Note $he data record must e saved hen recording

eete a fieds that do not eist in the source fie 21099IFI+7 from screen

880 in the recording (eg 6NA89S5ampT+ 6NA89+AN8 6ANNQ9SPampAS) Note o not deete fieds ampF01946ampS and ampF0190880

Save the recording no$

1 S$itch to the recordings overvie$

198 Process the recording $ith the processing mode A (dispay a)

191 Process the recording $ith the processing mode RN (no dispay)

19 If the recording has een tested and no error has occurred generate a I session

and run it using the I monitor If an error shoud occur generate the recordingagainQ

copy SAP AG BC420 12-81

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 8288

From the recording generate the program M21037I3 in your deveopment cass

2109 Seect the foo$ing

bull ampead fied contents from fie

bull 2reate test data in the fie 2103dei3test3tt

98 Save this program and eecute it ltenerate one I session each and process it

2arry out the same steps again using the ca transaction

The generated program shoud no$ e changed so that fie 21099IFI+7 can e

read and processed

98 2hange the defaut vaue of the fie name (parameter dataset) in 21099

IFI+7

91 2hange the structure definition eete the company code fied and the address

data checo from the structure

9 2hange the su9routine ca perform dc3fied for the company code (KampF019

46ampSK) so that the vaue 0008 is transferred

9 2hange the su9routine ca perform dc3fied for the address data checo

(KampF0190880K) so that the vaue G is transferred

9 Start the program again and read the data from the fie 21099IFI+7 $ith

detor data ltenerate a I session $ith it and run it

copy SAP AG BC420 12-82

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 8388

033 Include DR16INCLUDE BDCRECX1

SELECTION-SCREEN BEGIN OF LINE

PARAMETERS SESSION RADIOBUTTON GROUP CTU create sessi SELECTION-SCREEN COMMENT $amp TEXT-S FOR FIELD SESSION

se(ecti-scree )siti +

PARAMETERS CTU RADIOBUTTON GROUP CTU ca(( trasacti

SELECTION-SCREEN COMMENT $amp TEXT-S FOR FIELD CTU

SELECTION-SCREEN END OF LINE

SELECTION-SCREEN BEGIN OF LINE

SELECTION-SCREEN COMMENT $amp TEXT-S1 FOR FIELD GROUP

se(ecti-scree )siti $+

PARAMETERS GROUP1$amp r) ae 0 sessi

SELECTION-SCREEN COMMENT $amp TEXT-S+ FOR FIELD CTUMODE

se(ecti-scree )siti

PARAMETERS CTUMODE LIE CTU2PARAMS-DISMODE DEFAULT 3N3

A4 s56 a(( 78)rs

E4 s56 78)r errr (8

N4 7 t 7is)(a8 78)r

SELECTION-SCREEN END OF LINE

SELECTION-SCREEN BEGIN OF LINE

SELECTION-SCREEN COMMENT $amp TEXT-S$ FOR FIELD USER

se(ecti-scree )siti $+

PARAMETERS4 USER1$amp DEFAULT S9-UNAME ser 0r sessi i atc5

SELECTION-SCREEN COMMENT $amp TEXT-S FOR FIELD CUPDATE

se(ecti-scree )siti

PARAMETERS CUPDATE LIE CTU2PARAMS-UPDMODE DEFAULT 3L3

S4 s8c5rs(8

A4 as8c5rs(8

L4 (ca(

SELECTION-SCREEN END OF LINE

SELECTION-SCREEN BEGIN OF LINE

SELECTION-SCREEN COMMENT $amp TEXT-S FOR FIELD EEP

se(ecti-scree )siti $+

PARAMETERS4 EEP AS CltECBOX 3 3 = 7e(ete sessi i0 0iis5e7

3X3 = gtee) sessi i0 0iis5e7

SELECTION-SCREEN COMMENT $amp TEXT-S FOR FIELD E2GROUP

copy SAP AG BC420 12-83

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 8488

se(ecti-scree )siti

)araeters E2GROUP1$amp r) ae 0 errr-sessi

SELECTION-SCREEN END OF LINE

SELECTION-SCREEN BEGIN OF LINE

SELECTION-SCREEN COMMENT $amp TEXT-S FOR FIELD ltOLDDATE

se(ecti-scree )siti $+

PARAMETERS4 ltOLDDATE LIE S9-DATUM

SELECTION-SCREEN COMMENT +11amp TEXT-S$ FOR FIELD E2USER

se(ecti-scree )siti

PARAMETERS4 E2USER1$amp DEFAULT S9-UNAME ser 0r errr-sessi

SELECTION-SCREEN END OF LINE

SELECTION-SCREEN BEGIN OF LINE

SELECTION-SCREEN COMMENT +11amp TEXT-S FOR FIELD E2EEP

se(ecti-scree )siti

PARAMETERS4 E2EEP AS CltECBOX 3 3 = 7e(ete sessi i0 0iis5e7

3X3 = gtee) sessi i0 0iis5e7

SELECTION-SCREEN END OF LINE

SELECTION-SCREEN BEGIN OF LINE

SELECTION-SCREEN COMMENT +11amp TEXT-S FOR FIELD E2ltDATE

se(ecti-scree )siti

PARAMETERS4 E2ltDATE LIE S9-DATUM

SELECTION-SCREEN END OF LINE

SELECTION-SCREEN SIP

SELECTION-SCREEN BEGIN OF LINE

SELECTION-SCREEN COMMENT 1amp TEXT-S1 FOR FIELD NODATA

PARAMETERS4 NODATA DEFAULT 33 LOER CASE 7ata

SELECTION-SCREEN END OF LINE

----------------------------------------------------------------------

Batc5i)t7ata 0 si(e trasacti

DATA4 BDCDATA LIE BDCDATA OCCURS ITlt ltEADER LINE

essaes 0 ca(( trasacti

DATA4 MESSTAB LIE BDCMSGCOLL OCCURS ITlt ltEADER LINE

errr sessi )ee7 3 3 r 3X3amp

DATA4 E2GROUP2OPENED

essae tets

TABLES4 T1

copy SAP AG BC420 12-84

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 8588

----------------------------------------------------------------------

at se(ecti scree

----------------------------------------------------------------------

AT SELECTION-SCREEN

r) a7 ser st e 0i((e7 0r create sessi

IF SESSION = 3X3 AND

GROUP = SPACE OR USER = SPACE

MESSAGE E1MSamp

ENDIF

----------------------------------------------------------------------

)e 7ataset

----------------------------------------------------------------------

FORM OPEN2DATASET USING P2DATASET

OPEN DATASET P2DATASET IN TEXT MODE

IF S9-SUBRC

RITE4 TEXT-E S9-SUBRC

STOP

ENDIF

ENDFORM

----------------------------------------------------------------------

c(se 7ataset

----------------------------------------------------------------------

FORM CLOSE2DATASET USING P2DATASET

CLOSE DATASET P2DATASET

ENDFORM

----------------------------------------------------------------------

create atc5i)t sessi

t 0r ca(( trasacti siamp

----------------------------------------------------------------------

FORM OPEN2GROUP

IF SESSION = 3X3

SIP

RITE4 $amp 3Create r)3I1amp GROUP

SIP

)e atc5i)t r)

CALL FUNCTION 3BDC2OPEN2GROUP3

EXPORTING CLIENT = S9-MANDT

copy SAP AG BC420 12-85

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 8688

GROUP = GROUP

USER = USER

EEP = EEP

ltOLDDATE = ltOLDDATE

RITE4 amp 3BDC2OPEN2GROUP3I$amp

1$amp 3retrc7e43I+amp

S9-SUBRC

ENDIF

ENDFORM

----------------------------------------------------------------------

e7 atc5i)t sessi

ca(( trasacti si4 errr sessiamp

----------------------------------------------------------------------

FORM CLOSE2GROUP

IF SESSION = 3X3

c(se atc5i)t r)

CALL FUNCTION 3BDC2CLOSE2GROUP3

RITE4 amp 3BDC2CLOSE2GROUP3Iamp

1$amp 3retrc7e43I+amp

S9-SUBRC

ELSE

IF E2GROUP2OPENED = 3X3

CALL FUNCTION 3BDC2CLOSE2GROUP3

RITE4

RITE4 amp 3Fe5(era))e 6r7e eret3Iamp

ENDIF

ENDIF

ENDFORM

----------------------------------------------------------------------

Start e6 trasacti accr7i t )araeters

----------------------------------------------------------------------

FORM BDC2TRANSACTION USING TCODE

DATA4 L2MSTRINGamp

DATA4 L2SUBRC LIE S9-SUBRC

atc5 i)t sessi

IF SESSION = 3X3

CALL FUNCTION 3BDC2INSERT3

EXPORTING TCODE = TCODE

TABLES D9NPROTAB = BDCDATA

RITE4 3BDC2INSERT3Iamp

copy SAP AG BC420 12-86

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 8788

TCODE

3retrc7e43I+amp

S9-SUBRC

3RECORD43

S9-INDEX

ca(( trasacti si

ELSE

REFRESlt MESSTAB

CALL TRANSACTION TCODE USING BDCDATA

MODE CTUMODE

UPDATE CUPDATE

MESSAGES INTO MESSTAB

L2SUBRC = S9-SUBRC

RITE4 3CALL2TRANSACTION3

TCODE

3retrc7e43I+amp

L2SUBRC

3RECORD43

S9-INDEX

LOOP AT MESSTAB

SELECT SINGLE FROM T1 ltERE SPRSL = MESSTAB-MSGSPRA

AND ARBGB = MESSTAB-MSGID

AND MSGNR = MESSTAB-MSGNR

IF S9-SUBRC =

L2MSTRING = T1-TEXT

IF L2MSTRING CS 313

REPLACE 313 ITlt MESSTAB-MSGH1 INTO L2MSTRING

REPLACE 3$3 ITlt MESSTAB-MSGH$ INTO L2MSTRING

REPLACE 33 ITlt MESSTAB-MSGH INTO L2MSTRING

REPLACE 33 ITlt MESSTAB-MSGH INTO L2MSTRING

ELSE

REPLACE 33 ITlt MESSTAB-MSGH1 INTO L2MSTRING

REPLACE 33 ITlt MESSTAB-MSGH$ INTO L2MSTRING

REPLACE 33 ITlt MESSTAB-MSGH INTO L2MSTRING

REPLACE 33 ITlt MESSTAB-MSGH INTO L2MSTRING

ENDIF

CONDENSE L2MSTRING

RITE4 MESSTAB-MSGT9P L2MSTRING$+amp

ELSE

RITE4 MESSTAB

ENDIF

ENDLOOP

copy SAP AG BC420 12-87

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 8888

SIP

Eree 0e5(era))e

IF L2SUBRC AND E2GROUP SPACE

IF E2GROUP2OPENED = 3 3

CALL FUNCTION 3BDC2OPEN2GROUP3

EXPORTING CLIENT = S9-MANDT

GROUP = E2GROUP

USER = E2USER

EEP = E2EEP

ltOLDDATE = E2ltDATE

E2GROUP2OPENED = 3X3

ENDIF

CALL FUNCTION 3BDC2INSERT3

EXPORTING TCODE = TCODE

TABLES D9NPROTAB = BDCDATA

ENDIF

ENDIF

REFRESlt BDCDATA

ENDFORM

----------------------------------------------------------------------

Start e6 scree

----------------------------------------------------------------------

FORM BDC2D9NPRO USING PROGRAM D9NPRO

CLEAR BDCDATA

BDCDATA-PROGRAM = PROGRAM

BDCDATA-D9NPRO = D9NPRO

BDCDATA-D9NBEGIN = 3X3

APPEND BDCDATA

ENDFORM

----------------------------------------------------------------------

Isert 0ie(7

Page 68: BC420_46C - 012The Transaction Recorder

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 6888

085

983209 SAP AG 1999

Structure TUltPARAMS

DISMD1 Procen mode anaoo o addon amp

UPDMD1 $pdae mode anaoo o addon $PA

ATTMD1 CA mode CA conro

D19SI1 orce de=a EndoE e drn procen

RAMMIT +o eD a Camp amp(

IPT +o a ac np eonF a F S-B+P SPAC

I1D +o a ac np eon a=er end o= BC daa

The components are defined as foo$s

The components 7FSIM7 ampA25IT N5INPT and N5I7N can have the foo$ing

vaues KGK E Ces or K K E No

If the addition 5PTI5NS Famp5 is not specified the foo$ing settings appy to the contro

parameters

IS57 from addition 57

4P57 from addition 4PAT7

2ATT57 2ATT not active

7FSIM7 o not not use defaut $indo$s siDe

ampA25IT Successfu eit at 25IT -5amp6

N5INPT atch input session active (SC9INPT E G)

N5I7N atch input session sti active after end of 2 data

copy SAP AG BC420 12-68

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 6988

087

983209 SAP AG 1999

SMSBID Message ID

SMSBT Message T(pe C1GIGWGSGA

SMSB Message umber

SMSB6 Message ariable 6

SMSBamp Message ariable amp

SMSB Message ariable

SMSB4 Message ariable 4

SMSBID Message ID

SMSBT Message T(pe C1GIGWGSGA

SMSB Message umber

SMSB6 Message ariable 6

SMSBamp Message ariable amp

SMSB Message ariable

SMSB4 Message ariable 4

Return code$

S(stem fields$

alue Meaning

0 Successful

6000 1rror in transaction

6000 1rror in processing call transaction

see also the s(stem fields specified

alue Meaning

0 Successful

6000 1rror in transaction

6000 1rror in processing call transaction

see also the s(stem fields specified

9ield name Meaning9ield name9ield name MeaningMeaning

Return ode and S(stem 9ields

The return code is used to specify $hether the caed transaction $as processed successfuy In

addition severa system fieds are fied The numer I type and variaes of the diaog message

output y the caed transaction Cou need this information to output the message tet

copy SAP AG BC420 12-69

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 7088

030

983209 SAP AG 1999

Benerated Program of the TA Recorder

REFRES= (ESSTAB-

2A TRANSA2TION tcode USING bdcdata (ODE ctumode U)DATE cudate (ESSAGES INTO metab-OO) AT metab- ENDOO)-IF lubrc 34 AND e8rou 34 S)A2E- IF e8rouoenend - 2A FUN2TION BD2O)ENGROU) E)ORTING ---------

--------- E8rouoened - ENDIF- 2A FUN2TION BD2INSERT E)ORTING T2ODE tcode TABES D0N)ROTAB bdcdata-ENDIF-REFRES= bdcdata-

Message table output

pen error session

Insert data record that

has errors into error

session

If you have seected ca transaction on the seection screen the generated program runs as foo$s

The onine transaction is caed $ith ca transaction and passed to tae 2ATA A the

messages arising during the ca transaction are put in the interna tae 7SSTA

7SSTA is output as a ist

If you have specified an error session ( 73ltamp54P L SPA27) on the seection screen and the

ca transaction comes across an error (+3S4amp2 L 0) the error session is opened The error

session is ho$ever ony opened once Then the data record is paced in the session

A the other data records that have errors $ith ca transaction are paced in the same session

copy SAP AG BC420 12-70

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 7188

036

983209 SAP AG 1999

The Transaction Recorder

PrinciplesPrinciples

Recording )ith the LSMWRecording )ith the LSMW

Principles of atch Input and all TransactionPrinciples of atch Input and all Transaction

Integrating the TA Program into the DWIntegrating the TA Program into the DW

Using the TA Recorder Using the TA Recorder

copy SAP AG BC420 12-71

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 7288

03amp

983209 SAP AG 1999

Integrating into the DW

Transfer program

AAP Dictionar(

Integrate

SDA0

SDA6

SDAamp

SDA

Cou can integrate the generated program into the G9- The structure of the fie must e created

in the AAP ictionary The taes SGA0 SGA8 SGA1 and SGA $i e fied

copy SAP AG BC420 12-72

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 7388

03

983209 SAP AG 1999

DW Release 42

Goo

-B eeae 45

aa ran=er ogtec

Int customer data transfer ob-ect

ecord =ed

Dece daa ran=er

d Goo

The ampunction ampor interatin TA recorder prora$s is

i$ple$ented in the

D+-B in Release

The recorder can e integrated as of ampeease and it is provided in the G9- ampeease

ltot to the G9- ampeease 5n the initia screen you can integrate programs y choosing ampoto

( +nt customer ata transfer o-ect

copy SAP AG BC420 12-73

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 7488

034

983209 SAP AG 1999

reating Program as D b-ect

Comer ran=er ogtec

ampgtec ype

Sor eD =or ogtec

aa ran=er proram

Srcre name

9900

(+A1

Cane comer

ZBCA+G

ZB

ustomer transfer ob-ect

umber bet)een 7000 and 7777

b-ect t(pe

Assignment to R ob-ect

Short tet for D ob-ectShort description

Data transfer program

ame of generated program

Structure name

A structure Cstructure la(out )ith this name is created in

the AAP Dictionar(

For ampeease transfer oects $ere not organiDed y 5amp oects ut y a G numer (00089

OOOO) The numer range O0009OOOO is reserved for customers

To create a connection to the ne$ G 9- you must assign the program to a 5amp oect

2reate a short tet for the G oect This tet $i appear in the method seection ist

Specify the program to e incuded

Specify a name for the structure to e created in the AAP ictionary

Note $he generated program appears under program type +N and not under program type

-

copy SAP AG BC420 12-74

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 7588

032

983209 SAP AG 1999

Adantages

Automatic program registration in the DW in

Release 48

ou can use all the functions defined for

standard ob-ects

1ception$ The (reate ampile ith data

function

If you incuded the oect in the ampeease $orench it is automaticay avaiae in the ampeease

B $orench

A the $orench functions are avaiae for your oect ecept for Create files ith transfer ata

copy SAP AG BC420 12-75

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 7688

038

983209 SAP AG 1999

ou are no) able to$

The Transaction Recorder$ Unit Summar(

Use the recording function in the LSMW to create

a batch input session )ith the data from the

eternal s(stem

Use the TA Recorder to create (our o)n data

transfer program

Anal(e programs that )or+ )ith batch input or

call transaction

Integrate the TA Recorder programs into the

DW

copy SAP AG BC420 12-76

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 7788

ercise 1

nit $ -ecorder

$opic 2reating etors

$ransaction -ecorder ercise 1

bull 2reating detors $ith eterna numer assignment

bull etor numers M9980008 to M9980080

Address data for detors $ith eterna numer assignment is to

e transferred using program ampFI700

ro4ect F5

Supro4ect +5

-un +575

$as)s 85 95 8S25

9oad program -F+00

8 In the foo$ing eercises eisting data is to e changed Therefore these detors $ith

eterna numer assignment have to first e created

898 4nder suproect 79 create run 797G9 $ith the name Detors ith

eternal numers

copy SAP AG BC420 12-77

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 7888

891 2reate the foo$ing three tass The tass map the foo$ing process steps

convert data create + session and process + session

89198 In run 797G9 create the foo$ing tas

9 Tas AP9

9 Name 2onvert data 9 Tas type AP

9 Program type +S-

Seect the foo$ing +S- oect

+S- proect 2109

+S- suproect 7I9

+S- oect I997GT

89191 In run 797G9 create the foo$ing tas 9 Tas +5A9

9 Name 2reate I session

Tas type +5A

9 Program type INP

Seect program ampFI700 $ith the variant

I97G9

8919 In run 797G9 create the foo$ing tas

9 Tas S29

9 Name Process I session Tas type S2

9 Program type amp7P5

Seect program ampS2S4 $ith the variant

S497G9

Note that you have to correct the seuence of the tass 2onvert data

create + session and process + session

4se the uttons

89 Start the run

The detors $i e created $ith eterna numer assignments

89 2hec in transaction F0 that the detors M9980008 to M9980080 have een

created

copy SAP AG BC420 12-78

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 7988

ercise

nit $ransaction -ecorder

$opic -ecording function in the 9S8(

bull 2reate a recording using the +S-

bull ltenerate a atch input session

2hange the detor address data in the amp System

Name of the recording +

Name of the file +2055+F9

8 2reate the recording 7I3 using the +S- ampecord the transaction F01 (2hange

detor)

898 efore you create the recording first test the transaction onineQ

For the recording use detor M9980008 5n the initia screen of the F01

maintain the foo$ing fieds ony

etor etor M9980008

2ompany code 0008

Address data seect

Note $he data record must e saved hile recording

891 aintain the names and the descriptions for the foo$ing fieds

Name city street posta code and teephone numereete a other fieds in screen 880 from the recording (eg S5ampT+ +AN8

SPampAS)

4se the same technica names as sho$n in the tae eo$ (automatic fied

mapping)

copy SAP AG BC420 12-79

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 8088

1 2reate the suproect 7I9 and the ne$ oect TA3 in your proect 2109

aintain the oect attriutes and seect the item atch input recording Seect your

recording 7I3

2reate the source structure address

2reate the source fieds according to the tae eo$ 5r copy them from proect 2109S37N suproect 7I900 oect TA900

198 Fie setup The data from the egacy system are dispayed in the foo$ing tae

Fied name Fied type Fied ength escription

N5 2 8B etor numer

NA7 2 Name

STamp77T 2 Street

2ITC 2 2ityPace of residence

MIP 2 80 Posta code

T7+ 2 8B Teephone numer

191 aintain the fied mapping 4se the automatic fied mapping (via menu item

7tras)

19 Specify the fies 5ny maintain the fie name of the source fie

Name of the fie 21099IFI+7

2odepage 8800

19 Import the data and convert them ispay the data in each caseQ

19 2reate a atch input session

19B ampun the atch input session

copy SAP AG BC420 12-80

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 8188

ercise 3

nit $ransaction -ecorder

$opic -ecording ith the $ -ecorder

bull ltenerate a recording using the TA recorder

bull Test the recording

2hange the address data of detors in the amp system

Name recording $+

Name of the file +2055+F9

8 2reate the recording TA37I3 using the transaction recorder ampecord the

transaction F01 (change detor)

898 4se detor M9980008 for the recording 5n the F01 initia screen ony

maintain the foo$ing fieds

etor etor M9980008

2ompany 2ode 0008

Address data seect

Note $he data record must e saved hen recording

eete a fieds that do not eist in the source fie 21099IFI+7 from screen

880 in the recording (eg 6NA89S5ampT+ 6NA89+AN8 6ANNQ9SPampAS) Note o not deete fieds ampF01946ampS and ampF0190880

Save the recording no$

1 S$itch to the recordings overvie$

198 Process the recording $ith the processing mode A (dispay a)

191 Process the recording $ith the processing mode RN (no dispay)

19 If the recording has een tested and no error has occurred generate a I session

and run it using the I monitor If an error shoud occur generate the recordingagainQ

copy SAP AG BC420 12-81

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 8288

From the recording generate the program M21037I3 in your deveopment cass

2109 Seect the foo$ing

bull ampead fied contents from fie

bull 2reate test data in the fie 2103dei3test3tt

98 Save this program and eecute it ltenerate one I session each and process it

2arry out the same steps again using the ca transaction

The generated program shoud no$ e changed so that fie 21099IFI+7 can e

read and processed

98 2hange the defaut vaue of the fie name (parameter dataset) in 21099

IFI+7

91 2hange the structure definition eete the company code fied and the address

data checo from the structure

9 2hange the su9routine ca perform dc3fied for the company code (KampF019

46ampSK) so that the vaue 0008 is transferred

9 2hange the su9routine ca perform dc3fied for the address data checo

(KampF0190880K) so that the vaue G is transferred

9 Start the program again and read the data from the fie 21099IFI+7 $ith

detor data ltenerate a I session $ith it and run it

copy SAP AG BC420 12-82

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 8388

033 Include DR16INCLUDE BDCRECX1

SELECTION-SCREEN BEGIN OF LINE

PARAMETERS SESSION RADIOBUTTON GROUP CTU create sessi SELECTION-SCREEN COMMENT $amp TEXT-S FOR FIELD SESSION

se(ecti-scree )siti +

PARAMETERS CTU RADIOBUTTON GROUP CTU ca(( trasacti

SELECTION-SCREEN COMMENT $amp TEXT-S FOR FIELD CTU

SELECTION-SCREEN END OF LINE

SELECTION-SCREEN BEGIN OF LINE

SELECTION-SCREEN COMMENT $amp TEXT-S1 FOR FIELD GROUP

se(ecti-scree )siti $+

PARAMETERS GROUP1$amp r) ae 0 sessi

SELECTION-SCREEN COMMENT $amp TEXT-S+ FOR FIELD CTUMODE

se(ecti-scree )siti

PARAMETERS CTUMODE LIE CTU2PARAMS-DISMODE DEFAULT 3N3

A4 s56 a(( 78)rs

E4 s56 78)r errr (8

N4 7 t 7is)(a8 78)r

SELECTION-SCREEN END OF LINE

SELECTION-SCREEN BEGIN OF LINE

SELECTION-SCREEN COMMENT $amp TEXT-S$ FOR FIELD USER

se(ecti-scree )siti $+

PARAMETERS4 USER1$amp DEFAULT S9-UNAME ser 0r sessi i atc5

SELECTION-SCREEN COMMENT $amp TEXT-S FOR FIELD CUPDATE

se(ecti-scree )siti

PARAMETERS CUPDATE LIE CTU2PARAMS-UPDMODE DEFAULT 3L3

S4 s8c5rs(8

A4 as8c5rs(8

L4 (ca(

SELECTION-SCREEN END OF LINE

SELECTION-SCREEN BEGIN OF LINE

SELECTION-SCREEN COMMENT $amp TEXT-S FOR FIELD EEP

se(ecti-scree )siti $+

PARAMETERS4 EEP AS CltECBOX 3 3 = 7e(ete sessi i0 0iis5e7

3X3 = gtee) sessi i0 0iis5e7

SELECTION-SCREEN COMMENT $amp TEXT-S FOR FIELD E2GROUP

copy SAP AG BC420 12-83

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 8488

se(ecti-scree )siti

)araeters E2GROUP1$amp r) ae 0 errr-sessi

SELECTION-SCREEN END OF LINE

SELECTION-SCREEN BEGIN OF LINE

SELECTION-SCREEN COMMENT $amp TEXT-S FOR FIELD ltOLDDATE

se(ecti-scree )siti $+

PARAMETERS4 ltOLDDATE LIE S9-DATUM

SELECTION-SCREEN COMMENT +11amp TEXT-S$ FOR FIELD E2USER

se(ecti-scree )siti

PARAMETERS4 E2USER1$amp DEFAULT S9-UNAME ser 0r errr-sessi

SELECTION-SCREEN END OF LINE

SELECTION-SCREEN BEGIN OF LINE

SELECTION-SCREEN COMMENT +11amp TEXT-S FOR FIELD E2EEP

se(ecti-scree )siti

PARAMETERS4 E2EEP AS CltECBOX 3 3 = 7e(ete sessi i0 0iis5e7

3X3 = gtee) sessi i0 0iis5e7

SELECTION-SCREEN END OF LINE

SELECTION-SCREEN BEGIN OF LINE

SELECTION-SCREEN COMMENT +11amp TEXT-S FOR FIELD E2ltDATE

se(ecti-scree )siti

PARAMETERS4 E2ltDATE LIE S9-DATUM

SELECTION-SCREEN END OF LINE

SELECTION-SCREEN SIP

SELECTION-SCREEN BEGIN OF LINE

SELECTION-SCREEN COMMENT 1amp TEXT-S1 FOR FIELD NODATA

PARAMETERS4 NODATA DEFAULT 33 LOER CASE 7ata

SELECTION-SCREEN END OF LINE

----------------------------------------------------------------------

Batc5i)t7ata 0 si(e trasacti

DATA4 BDCDATA LIE BDCDATA OCCURS ITlt ltEADER LINE

essaes 0 ca(( trasacti

DATA4 MESSTAB LIE BDCMSGCOLL OCCURS ITlt ltEADER LINE

errr sessi )ee7 3 3 r 3X3amp

DATA4 E2GROUP2OPENED

essae tets

TABLES4 T1

copy SAP AG BC420 12-84

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 8588

----------------------------------------------------------------------

at se(ecti scree

----------------------------------------------------------------------

AT SELECTION-SCREEN

r) a7 ser st e 0i((e7 0r create sessi

IF SESSION = 3X3 AND

GROUP = SPACE OR USER = SPACE

MESSAGE E1MSamp

ENDIF

----------------------------------------------------------------------

)e 7ataset

----------------------------------------------------------------------

FORM OPEN2DATASET USING P2DATASET

OPEN DATASET P2DATASET IN TEXT MODE

IF S9-SUBRC

RITE4 TEXT-E S9-SUBRC

STOP

ENDIF

ENDFORM

----------------------------------------------------------------------

c(se 7ataset

----------------------------------------------------------------------

FORM CLOSE2DATASET USING P2DATASET

CLOSE DATASET P2DATASET

ENDFORM

----------------------------------------------------------------------

create atc5i)t sessi

t 0r ca(( trasacti siamp

----------------------------------------------------------------------

FORM OPEN2GROUP

IF SESSION = 3X3

SIP

RITE4 $amp 3Create r)3I1amp GROUP

SIP

)e atc5i)t r)

CALL FUNCTION 3BDC2OPEN2GROUP3

EXPORTING CLIENT = S9-MANDT

copy SAP AG BC420 12-85

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 8688

GROUP = GROUP

USER = USER

EEP = EEP

ltOLDDATE = ltOLDDATE

RITE4 amp 3BDC2OPEN2GROUP3I$amp

1$amp 3retrc7e43I+amp

S9-SUBRC

ENDIF

ENDFORM

----------------------------------------------------------------------

e7 atc5i)t sessi

ca(( trasacti si4 errr sessiamp

----------------------------------------------------------------------

FORM CLOSE2GROUP

IF SESSION = 3X3

c(se atc5i)t r)

CALL FUNCTION 3BDC2CLOSE2GROUP3

RITE4 amp 3BDC2CLOSE2GROUP3Iamp

1$amp 3retrc7e43I+amp

S9-SUBRC

ELSE

IF E2GROUP2OPENED = 3X3

CALL FUNCTION 3BDC2CLOSE2GROUP3

RITE4

RITE4 amp 3Fe5(era))e 6r7e eret3Iamp

ENDIF

ENDIF

ENDFORM

----------------------------------------------------------------------

Start e6 trasacti accr7i t )araeters

----------------------------------------------------------------------

FORM BDC2TRANSACTION USING TCODE

DATA4 L2MSTRINGamp

DATA4 L2SUBRC LIE S9-SUBRC

atc5 i)t sessi

IF SESSION = 3X3

CALL FUNCTION 3BDC2INSERT3

EXPORTING TCODE = TCODE

TABLES D9NPROTAB = BDCDATA

RITE4 3BDC2INSERT3Iamp

copy SAP AG BC420 12-86

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 8788

TCODE

3retrc7e43I+amp

S9-SUBRC

3RECORD43

S9-INDEX

ca(( trasacti si

ELSE

REFRESlt MESSTAB

CALL TRANSACTION TCODE USING BDCDATA

MODE CTUMODE

UPDATE CUPDATE

MESSAGES INTO MESSTAB

L2SUBRC = S9-SUBRC

RITE4 3CALL2TRANSACTION3

TCODE

3retrc7e43I+amp

L2SUBRC

3RECORD43

S9-INDEX

LOOP AT MESSTAB

SELECT SINGLE FROM T1 ltERE SPRSL = MESSTAB-MSGSPRA

AND ARBGB = MESSTAB-MSGID

AND MSGNR = MESSTAB-MSGNR

IF S9-SUBRC =

L2MSTRING = T1-TEXT

IF L2MSTRING CS 313

REPLACE 313 ITlt MESSTAB-MSGH1 INTO L2MSTRING

REPLACE 3$3 ITlt MESSTAB-MSGH$ INTO L2MSTRING

REPLACE 33 ITlt MESSTAB-MSGH INTO L2MSTRING

REPLACE 33 ITlt MESSTAB-MSGH INTO L2MSTRING

ELSE

REPLACE 33 ITlt MESSTAB-MSGH1 INTO L2MSTRING

REPLACE 33 ITlt MESSTAB-MSGH$ INTO L2MSTRING

REPLACE 33 ITlt MESSTAB-MSGH INTO L2MSTRING

REPLACE 33 ITlt MESSTAB-MSGH INTO L2MSTRING

ENDIF

CONDENSE L2MSTRING

RITE4 MESSTAB-MSGT9P L2MSTRING$+amp

ELSE

RITE4 MESSTAB

ENDIF

ENDLOOP

copy SAP AG BC420 12-87

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 8888

SIP

Eree 0e5(era))e

IF L2SUBRC AND E2GROUP SPACE

IF E2GROUP2OPENED = 3 3

CALL FUNCTION 3BDC2OPEN2GROUP3

EXPORTING CLIENT = S9-MANDT

GROUP = E2GROUP

USER = E2USER

EEP = E2EEP

ltOLDDATE = E2ltDATE

E2GROUP2OPENED = 3X3

ENDIF

CALL FUNCTION 3BDC2INSERT3

EXPORTING TCODE = TCODE

TABLES D9NPROTAB = BDCDATA

ENDIF

ENDIF

REFRESlt BDCDATA

ENDFORM

----------------------------------------------------------------------

Start e6 scree

----------------------------------------------------------------------

FORM BDC2D9NPRO USING PROGRAM D9NPRO

CLEAR BDCDATA

BDCDATA-PROGRAM = PROGRAM

BDCDATA-D9NPRO = D9NPRO

BDCDATA-D9NBEGIN = 3X3

APPEND BDCDATA

ENDFORM

----------------------------------------------------------------------

Isert 0ie(7

Page 69: BC420_46C - 012The Transaction Recorder

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 6988

087

983209 SAP AG 1999

SMSBID Message ID

SMSBT Message T(pe C1GIGWGSGA

SMSB Message umber

SMSB6 Message ariable 6

SMSBamp Message ariable amp

SMSB Message ariable

SMSB4 Message ariable 4

SMSBID Message ID

SMSBT Message T(pe C1GIGWGSGA

SMSB Message umber

SMSB6 Message ariable 6

SMSBamp Message ariable amp

SMSB Message ariable

SMSB4 Message ariable 4

Return code$

S(stem fields$

alue Meaning

0 Successful

6000 1rror in transaction

6000 1rror in processing call transaction

see also the s(stem fields specified

alue Meaning

0 Successful

6000 1rror in transaction

6000 1rror in processing call transaction

see also the s(stem fields specified

9ield name Meaning9ield name9ield name MeaningMeaning

Return ode and S(stem 9ields

The return code is used to specify $hether the caed transaction $as processed successfuy In

addition severa system fieds are fied The numer I type and variaes of the diaog message

output y the caed transaction Cou need this information to output the message tet

copy SAP AG BC420 12-69

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 7088

030

983209 SAP AG 1999

Benerated Program of the TA Recorder

REFRES= (ESSTAB-

2A TRANSA2TION tcode USING bdcdata (ODE ctumode U)DATE cudate (ESSAGES INTO metab-OO) AT metab- ENDOO)-IF lubrc 34 AND e8rou 34 S)A2E- IF e8rouoenend - 2A FUN2TION BD2O)ENGROU) E)ORTING ---------

--------- E8rouoened - ENDIF- 2A FUN2TION BD2INSERT E)ORTING T2ODE tcode TABES D0N)ROTAB bdcdata-ENDIF-REFRES= bdcdata-

Message table output

pen error session

Insert data record that

has errors into error

session

If you have seected ca transaction on the seection screen the generated program runs as foo$s

The onine transaction is caed $ith ca transaction and passed to tae 2ATA A the

messages arising during the ca transaction are put in the interna tae 7SSTA

7SSTA is output as a ist

If you have specified an error session ( 73ltamp54P L SPA27) on the seection screen and the

ca transaction comes across an error (+3S4amp2 L 0) the error session is opened The error

session is ho$ever ony opened once Then the data record is paced in the session

A the other data records that have errors $ith ca transaction are paced in the same session

copy SAP AG BC420 12-70

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 7188

036

983209 SAP AG 1999

The Transaction Recorder

PrinciplesPrinciples

Recording )ith the LSMWRecording )ith the LSMW

Principles of atch Input and all TransactionPrinciples of atch Input and all Transaction

Integrating the TA Program into the DWIntegrating the TA Program into the DW

Using the TA Recorder Using the TA Recorder

copy SAP AG BC420 12-71

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 7288

03amp

983209 SAP AG 1999

Integrating into the DW

Transfer program

AAP Dictionar(

Integrate

SDA0

SDA6

SDAamp

SDA

Cou can integrate the generated program into the G9- The structure of the fie must e created

in the AAP ictionary The taes SGA0 SGA8 SGA1 and SGA $i e fied

copy SAP AG BC420 12-72

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 7388

03

983209 SAP AG 1999

DW Release 42

Goo

-B eeae 45

aa ran=er ogtec

Int customer data transfer ob-ect

ecord =ed

Dece daa ran=er

d Goo

The ampunction ampor interatin TA recorder prora$s is

i$ple$ented in the

D+-B in Release

The recorder can e integrated as of ampeease and it is provided in the G9- ampeease

ltot to the G9- ampeease 5n the initia screen you can integrate programs y choosing ampoto

( +nt customer ata transfer o-ect

copy SAP AG BC420 12-73

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 7488

034

983209 SAP AG 1999

reating Program as D b-ect

Comer ran=er ogtec

ampgtec ype

Sor eD =or ogtec

aa ran=er proram

Srcre name

9900

(+A1

Cane comer

ZBCA+G

ZB

ustomer transfer ob-ect

umber bet)een 7000 and 7777

b-ect t(pe

Assignment to R ob-ect

Short tet for D ob-ectShort description

Data transfer program

ame of generated program

Structure name

A structure Cstructure la(out )ith this name is created in

the AAP Dictionar(

For ampeease transfer oects $ere not organiDed y 5amp oects ut y a G numer (00089

OOOO) The numer range O0009OOOO is reserved for customers

To create a connection to the ne$ G 9- you must assign the program to a 5amp oect

2reate a short tet for the G oect This tet $i appear in the method seection ist

Specify the program to e incuded

Specify a name for the structure to e created in the AAP ictionary

Note $he generated program appears under program type +N and not under program type

-

copy SAP AG BC420 12-74

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 7588

032

983209 SAP AG 1999

Adantages

Automatic program registration in the DW in

Release 48

ou can use all the functions defined for

standard ob-ects

1ception$ The (reate ampile ith data

function

If you incuded the oect in the ampeease $orench it is automaticay avaiae in the ampeease

B $orench

A the $orench functions are avaiae for your oect ecept for Create files ith transfer ata

copy SAP AG BC420 12-75

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 7688

038

983209 SAP AG 1999

ou are no) able to$

The Transaction Recorder$ Unit Summar(

Use the recording function in the LSMW to create

a batch input session )ith the data from the

eternal s(stem

Use the TA Recorder to create (our o)n data

transfer program

Anal(e programs that )or+ )ith batch input or

call transaction

Integrate the TA Recorder programs into the

DW

copy SAP AG BC420 12-76

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 7788

ercise 1

nit $ -ecorder

$opic 2reating etors

$ransaction -ecorder ercise 1

bull 2reating detors $ith eterna numer assignment

bull etor numers M9980008 to M9980080

Address data for detors $ith eterna numer assignment is to

e transferred using program ampFI700

ro4ect F5

Supro4ect +5

-un +575

$as)s 85 95 8S25

9oad program -F+00

8 In the foo$ing eercises eisting data is to e changed Therefore these detors $ith

eterna numer assignment have to first e created

898 4nder suproect 79 create run 797G9 $ith the name Detors ith

eternal numers

copy SAP AG BC420 12-77

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 7888

891 2reate the foo$ing three tass The tass map the foo$ing process steps

convert data create + session and process + session

89198 In run 797G9 create the foo$ing tas

9 Tas AP9

9 Name 2onvert data 9 Tas type AP

9 Program type +S-

Seect the foo$ing +S- oect

+S- proect 2109

+S- suproect 7I9

+S- oect I997GT

89191 In run 797G9 create the foo$ing tas 9 Tas +5A9

9 Name 2reate I session

Tas type +5A

9 Program type INP

Seect program ampFI700 $ith the variant

I97G9

8919 In run 797G9 create the foo$ing tas

9 Tas S29

9 Name Process I session Tas type S2

9 Program type amp7P5

Seect program ampS2S4 $ith the variant

S497G9

Note that you have to correct the seuence of the tass 2onvert data

create + session and process + session

4se the uttons

89 Start the run

The detors $i e created $ith eterna numer assignments

89 2hec in transaction F0 that the detors M9980008 to M9980080 have een

created

copy SAP AG BC420 12-78

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 7988

ercise

nit $ransaction -ecorder

$opic -ecording function in the 9S8(

bull 2reate a recording using the +S-

bull ltenerate a atch input session

2hange the detor address data in the amp System

Name of the recording +

Name of the file +2055+F9

8 2reate the recording 7I3 using the +S- ampecord the transaction F01 (2hange

detor)

898 efore you create the recording first test the transaction onineQ

For the recording use detor M9980008 5n the initia screen of the F01

maintain the foo$ing fieds ony

etor etor M9980008

2ompany code 0008

Address data seect

Note $he data record must e saved hile recording

891 aintain the names and the descriptions for the foo$ing fieds

Name city street posta code and teephone numereete a other fieds in screen 880 from the recording (eg S5ampT+ +AN8

SPampAS)

4se the same technica names as sho$n in the tae eo$ (automatic fied

mapping)

copy SAP AG BC420 12-79

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 8088

1 2reate the suproect 7I9 and the ne$ oect TA3 in your proect 2109

aintain the oect attriutes and seect the item atch input recording Seect your

recording 7I3

2reate the source structure address

2reate the source fieds according to the tae eo$ 5r copy them from proect 2109S37N suproect 7I900 oect TA900

198 Fie setup The data from the egacy system are dispayed in the foo$ing tae

Fied name Fied type Fied ength escription

N5 2 8B etor numer

NA7 2 Name

STamp77T 2 Street

2ITC 2 2ityPace of residence

MIP 2 80 Posta code

T7+ 2 8B Teephone numer

191 aintain the fied mapping 4se the automatic fied mapping (via menu item

7tras)

19 Specify the fies 5ny maintain the fie name of the source fie

Name of the fie 21099IFI+7

2odepage 8800

19 Import the data and convert them ispay the data in each caseQ

19 2reate a atch input session

19B ampun the atch input session

copy SAP AG BC420 12-80

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 8188

ercise 3

nit $ransaction -ecorder

$opic -ecording ith the $ -ecorder

bull ltenerate a recording using the TA recorder

bull Test the recording

2hange the address data of detors in the amp system

Name recording $+

Name of the file +2055+F9

8 2reate the recording TA37I3 using the transaction recorder ampecord the

transaction F01 (change detor)

898 4se detor M9980008 for the recording 5n the F01 initia screen ony

maintain the foo$ing fieds

etor etor M9980008

2ompany 2ode 0008

Address data seect

Note $he data record must e saved hen recording

eete a fieds that do not eist in the source fie 21099IFI+7 from screen

880 in the recording (eg 6NA89S5ampT+ 6NA89+AN8 6ANNQ9SPampAS) Note o not deete fieds ampF01946ampS and ampF0190880

Save the recording no$

1 S$itch to the recordings overvie$

198 Process the recording $ith the processing mode A (dispay a)

191 Process the recording $ith the processing mode RN (no dispay)

19 If the recording has een tested and no error has occurred generate a I session

and run it using the I monitor If an error shoud occur generate the recordingagainQ

copy SAP AG BC420 12-81

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 8288

From the recording generate the program M21037I3 in your deveopment cass

2109 Seect the foo$ing

bull ampead fied contents from fie

bull 2reate test data in the fie 2103dei3test3tt

98 Save this program and eecute it ltenerate one I session each and process it

2arry out the same steps again using the ca transaction

The generated program shoud no$ e changed so that fie 21099IFI+7 can e

read and processed

98 2hange the defaut vaue of the fie name (parameter dataset) in 21099

IFI+7

91 2hange the structure definition eete the company code fied and the address

data checo from the structure

9 2hange the su9routine ca perform dc3fied for the company code (KampF019

46ampSK) so that the vaue 0008 is transferred

9 2hange the su9routine ca perform dc3fied for the address data checo

(KampF0190880K) so that the vaue G is transferred

9 Start the program again and read the data from the fie 21099IFI+7 $ith

detor data ltenerate a I session $ith it and run it

copy SAP AG BC420 12-82

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 8388

033 Include DR16INCLUDE BDCRECX1

SELECTION-SCREEN BEGIN OF LINE

PARAMETERS SESSION RADIOBUTTON GROUP CTU create sessi SELECTION-SCREEN COMMENT $amp TEXT-S FOR FIELD SESSION

se(ecti-scree )siti +

PARAMETERS CTU RADIOBUTTON GROUP CTU ca(( trasacti

SELECTION-SCREEN COMMENT $amp TEXT-S FOR FIELD CTU

SELECTION-SCREEN END OF LINE

SELECTION-SCREEN BEGIN OF LINE

SELECTION-SCREEN COMMENT $amp TEXT-S1 FOR FIELD GROUP

se(ecti-scree )siti $+

PARAMETERS GROUP1$amp r) ae 0 sessi

SELECTION-SCREEN COMMENT $amp TEXT-S+ FOR FIELD CTUMODE

se(ecti-scree )siti

PARAMETERS CTUMODE LIE CTU2PARAMS-DISMODE DEFAULT 3N3

A4 s56 a(( 78)rs

E4 s56 78)r errr (8

N4 7 t 7is)(a8 78)r

SELECTION-SCREEN END OF LINE

SELECTION-SCREEN BEGIN OF LINE

SELECTION-SCREEN COMMENT $amp TEXT-S$ FOR FIELD USER

se(ecti-scree )siti $+

PARAMETERS4 USER1$amp DEFAULT S9-UNAME ser 0r sessi i atc5

SELECTION-SCREEN COMMENT $amp TEXT-S FOR FIELD CUPDATE

se(ecti-scree )siti

PARAMETERS CUPDATE LIE CTU2PARAMS-UPDMODE DEFAULT 3L3

S4 s8c5rs(8

A4 as8c5rs(8

L4 (ca(

SELECTION-SCREEN END OF LINE

SELECTION-SCREEN BEGIN OF LINE

SELECTION-SCREEN COMMENT $amp TEXT-S FOR FIELD EEP

se(ecti-scree )siti $+

PARAMETERS4 EEP AS CltECBOX 3 3 = 7e(ete sessi i0 0iis5e7

3X3 = gtee) sessi i0 0iis5e7

SELECTION-SCREEN COMMENT $amp TEXT-S FOR FIELD E2GROUP

copy SAP AG BC420 12-83

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 8488

se(ecti-scree )siti

)araeters E2GROUP1$amp r) ae 0 errr-sessi

SELECTION-SCREEN END OF LINE

SELECTION-SCREEN BEGIN OF LINE

SELECTION-SCREEN COMMENT $amp TEXT-S FOR FIELD ltOLDDATE

se(ecti-scree )siti $+

PARAMETERS4 ltOLDDATE LIE S9-DATUM

SELECTION-SCREEN COMMENT +11amp TEXT-S$ FOR FIELD E2USER

se(ecti-scree )siti

PARAMETERS4 E2USER1$amp DEFAULT S9-UNAME ser 0r errr-sessi

SELECTION-SCREEN END OF LINE

SELECTION-SCREEN BEGIN OF LINE

SELECTION-SCREEN COMMENT +11amp TEXT-S FOR FIELD E2EEP

se(ecti-scree )siti

PARAMETERS4 E2EEP AS CltECBOX 3 3 = 7e(ete sessi i0 0iis5e7

3X3 = gtee) sessi i0 0iis5e7

SELECTION-SCREEN END OF LINE

SELECTION-SCREEN BEGIN OF LINE

SELECTION-SCREEN COMMENT +11amp TEXT-S FOR FIELD E2ltDATE

se(ecti-scree )siti

PARAMETERS4 E2ltDATE LIE S9-DATUM

SELECTION-SCREEN END OF LINE

SELECTION-SCREEN SIP

SELECTION-SCREEN BEGIN OF LINE

SELECTION-SCREEN COMMENT 1amp TEXT-S1 FOR FIELD NODATA

PARAMETERS4 NODATA DEFAULT 33 LOER CASE 7ata

SELECTION-SCREEN END OF LINE

----------------------------------------------------------------------

Batc5i)t7ata 0 si(e trasacti

DATA4 BDCDATA LIE BDCDATA OCCURS ITlt ltEADER LINE

essaes 0 ca(( trasacti

DATA4 MESSTAB LIE BDCMSGCOLL OCCURS ITlt ltEADER LINE

errr sessi )ee7 3 3 r 3X3amp

DATA4 E2GROUP2OPENED

essae tets

TABLES4 T1

copy SAP AG BC420 12-84

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 8588

----------------------------------------------------------------------

at se(ecti scree

----------------------------------------------------------------------

AT SELECTION-SCREEN

r) a7 ser st e 0i((e7 0r create sessi

IF SESSION = 3X3 AND

GROUP = SPACE OR USER = SPACE

MESSAGE E1MSamp

ENDIF

----------------------------------------------------------------------

)e 7ataset

----------------------------------------------------------------------

FORM OPEN2DATASET USING P2DATASET

OPEN DATASET P2DATASET IN TEXT MODE

IF S9-SUBRC

RITE4 TEXT-E S9-SUBRC

STOP

ENDIF

ENDFORM

----------------------------------------------------------------------

c(se 7ataset

----------------------------------------------------------------------

FORM CLOSE2DATASET USING P2DATASET

CLOSE DATASET P2DATASET

ENDFORM

----------------------------------------------------------------------

create atc5i)t sessi

t 0r ca(( trasacti siamp

----------------------------------------------------------------------

FORM OPEN2GROUP

IF SESSION = 3X3

SIP

RITE4 $amp 3Create r)3I1amp GROUP

SIP

)e atc5i)t r)

CALL FUNCTION 3BDC2OPEN2GROUP3

EXPORTING CLIENT = S9-MANDT

copy SAP AG BC420 12-85

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 8688

GROUP = GROUP

USER = USER

EEP = EEP

ltOLDDATE = ltOLDDATE

RITE4 amp 3BDC2OPEN2GROUP3I$amp

1$amp 3retrc7e43I+amp

S9-SUBRC

ENDIF

ENDFORM

----------------------------------------------------------------------

e7 atc5i)t sessi

ca(( trasacti si4 errr sessiamp

----------------------------------------------------------------------

FORM CLOSE2GROUP

IF SESSION = 3X3

c(se atc5i)t r)

CALL FUNCTION 3BDC2CLOSE2GROUP3

RITE4 amp 3BDC2CLOSE2GROUP3Iamp

1$amp 3retrc7e43I+amp

S9-SUBRC

ELSE

IF E2GROUP2OPENED = 3X3

CALL FUNCTION 3BDC2CLOSE2GROUP3

RITE4

RITE4 amp 3Fe5(era))e 6r7e eret3Iamp

ENDIF

ENDIF

ENDFORM

----------------------------------------------------------------------

Start e6 trasacti accr7i t )araeters

----------------------------------------------------------------------

FORM BDC2TRANSACTION USING TCODE

DATA4 L2MSTRINGamp

DATA4 L2SUBRC LIE S9-SUBRC

atc5 i)t sessi

IF SESSION = 3X3

CALL FUNCTION 3BDC2INSERT3

EXPORTING TCODE = TCODE

TABLES D9NPROTAB = BDCDATA

RITE4 3BDC2INSERT3Iamp

copy SAP AG BC420 12-86

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 8788

TCODE

3retrc7e43I+amp

S9-SUBRC

3RECORD43

S9-INDEX

ca(( trasacti si

ELSE

REFRESlt MESSTAB

CALL TRANSACTION TCODE USING BDCDATA

MODE CTUMODE

UPDATE CUPDATE

MESSAGES INTO MESSTAB

L2SUBRC = S9-SUBRC

RITE4 3CALL2TRANSACTION3

TCODE

3retrc7e43I+amp

L2SUBRC

3RECORD43

S9-INDEX

LOOP AT MESSTAB

SELECT SINGLE FROM T1 ltERE SPRSL = MESSTAB-MSGSPRA

AND ARBGB = MESSTAB-MSGID

AND MSGNR = MESSTAB-MSGNR

IF S9-SUBRC =

L2MSTRING = T1-TEXT

IF L2MSTRING CS 313

REPLACE 313 ITlt MESSTAB-MSGH1 INTO L2MSTRING

REPLACE 3$3 ITlt MESSTAB-MSGH$ INTO L2MSTRING

REPLACE 33 ITlt MESSTAB-MSGH INTO L2MSTRING

REPLACE 33 ITlt MESSTAB-MSGH INTO L2MSTRING

ELSE

REPLACE 33 ITlt MESSTAB-MSGH1 INTO L2MSTRING

REPLACE 33 ITlt MESSTAB-MSGH$ INTO L2MSTRING

REPLACE 33 ITlt MESSTAB-MSGH INTO L2MSTRING

REPLACE 33 ITlt MESSTAB-MSGH INTO L2MSTRING

ENDIF

CONDENSE L2MSTRING

RITE4 MESSTAB-MSGT9P L2MSTRING$+amp

ELSE

RITE4 MESSTAB

ENDIF

ENDLOOP

copy SAP AG BC420 12-87

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 8888

SIP

Eree 0e5(era))e

IF L2SUBRC AND E2GROUP SPACE

IF E2GROUP2OPENED = 3 3

CALL FUNCTION 3BDC2OPEN2GROUP3

EXPORTING CLIENT = S9-MANDT

GROUP = E2GROUP

USER = E2USER

EEP = E2EEP

ltOLDDATE = E2ltDATE

E2GROUP2OPENED = 3X3

ENDIF

CALL FUNCTION 3BDC2INSERT3

EXPORTING TCODE = TCODE

TABLES D9NPROTAB = BDCDATA

ENDIF

ENDIF

REFRESlt BDCDATA

ENDFORM

----------------------------------------------------------------------

Start e6 scree

----------------------------------------------------------------------

FORM BDC2D9NPRO USING PROGRAM D9NPRO

CLEAR BDCDATA

BDCDATA-PROGRAM = PROGRAM

BDCDATA-D9NPRO = D9NPRO

BDCDATA-D9NBEGIN = 3X3

APPEND BDCDATA

ENDFORM

----------------------------------------------------------------------

Isert 0ie(7

Page 70: BC420_46C - 012The Transaction Recorder

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 7088

030

983209 SAP AG 1999

Benerated Program of the TA Recorder

REFRES= (ESSTAB-

2A TRANSA2TION tcode USING bdcdata (ODE ctumode U)DATE cudate (ESSAGES INTO metab-OO) AT metab- ENDOO)-IF lubrc 34 AND e8rou 34 S)A2E- IF e8rouoenend - 2A FUN2TION BD2O)ENGROU) E)ORTING ---------

--------- E8rouoened - ENDIF- 2A FUN2TION BD2INSERT E)ORTING T2ODE tcode TABES D0N)ROTAB bdcdata-ENDIF-REFRES= bdcdata-

Message table output

pen error session

Insert data record that

has errors into error

session

If you have seected ca transaction on the seection screen the generated program runs as foo$s

The onine transaction is caed $ith ca transaction and passed to tae 2ATA A the

messages arising during the ca transaction are put in the interna tae 7SSTA

7SSTA is output as a ist

If you have specified an error session ( 73ltamp54P L SPA27) on the seection screen and the

ca transaction comes across an error (+3S4amp2 L 0) the error session is opened The error

session is ho$ever ony opened once Then the data record is paced in the session

A the other data records that have errors $ith ca transaction are paced in the same session

copy SAP AG BC420 12-70

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 7188

036

983209 SAP AG 1999

The Transaction Recorder

PrinciplesPrinciples

Recording )ith the LSMWRecording )ith the LSMW

Principles of atch Input and all TransactionPrinciples of atch Input and all Transaction

Integrating the TA Program into the DWIntegrating the TA Program into the DW

Using the TA Recorder Using the TA Recorder

copy SAP AG BC420 12-71

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 7288

03amp

983209 SAP AG 1999

Integrating into the DW

Transfer program

AAP Dictionar(

Integrate

SDA0

SDA6

SDAamp

SDA

Cou can integrate the generated program into the G9- The structure of the fie must e created

in the AAP ictionary The taes SGA0 SGA8 SGA1 and SGA $i e fied

copy SAP AG BC420 12-72

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 7388

03

983209 SAP AG 1999

DW Release 42

Goo

-B eeae 45

aa ran=er ogtec

Int customer data transfer ob-ect

ecord =ed

Dece daa ran=er

d Goo

The ampunction ampor interatin TA recorder prora$s is

i$ple$ented in the

D+-B in Release

The recorder can e integrated as of ampeease and it is provided in the G9- ampeease

ltot to the G9- ampeease 5n the initia screen you can integrate programs y choosing ampoto

( +nt customer ata transfer o-ect

copy SAP AG BC420 12-73

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 7488

034

983209 SAP AG 1999

reating Program as D b-ect

Comer ran=er ogtec

ampgtec ype

Sor eD =or ogtec

aa ran=er proram

Srcre name

9900

(+A1

Cane comer

ZBCA+G

ZB

ustomer transfer ob-ect

umber bet)een 7000 and 7777

b-ect t(pe

Assignment to R ob-ect

Short tet for D ob-ectShort description

Data transfer program

ame of generated program

Structure name

A structure Cstructure la(out )ith this name is created in

the AAP Dictionar(

For ampeease transfer oects $ere not organiDed y 5amp oects ut y a G numer (00089

OOOO) The numer range O0009OOOO is reserved for customers

To create a connection to the ne$ G 9- you must assign the program to a 5amp oect

2reate a short tet for the G oect This tet $i appear in the method seection ist

Specify the program to e incuded

Specify a name for the structure to e created in the AAP ictionary

Note $he generated program appears under program type +N and not under program type

-

copy SAP AG BC420 12-74

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 7588

032

983209 SAP AG 1999

Adantages

Automatic program registration in the DW in

Release 48

ou can use all the functions defined for

standard ob-ects

1ception$ The (reate ampile ith data

function

If you incuded the oect in the ampeease $orench it is automaticay avaiae in the ampeease

B $orench

A the $orench functions are avaiae for your oect ecept for Create files ith transfer ata

copy SAP AG BC420 12-75

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 7688

038

983209 SAP AG 1999

ou are no) able to$

The Transaction Recorder$ Unit Summar(

Use the recording function in the LSMW to create

a batch input session )ith the data from the

eternal s(stem

Use the TA Recorder to create (our o)n data

transfer program

Anal(e programs that )or+ )ith batch input or

call transaction

Integrate the TA Recorder programs into the

DW

copy SAP AG BC420 12-76

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 7788

ercise 1

nit $ -ecorder

$opic 2reating etors

$ransaction -ecorder ercise 1

bull 2reating detors $ith eterna numer assignment

bull etor numers M9980008 to M9980080

Address data for detors $ith eterna numer assignment is to

e transferred using program ampFI700

ro4ect F5

Supro4ect +5

-un +575

$as)s 85 95 8S25

9oad program -F+00

8 In the foo$ing eercises eisting data is to e changed Therefore these detors $ith

eterna numer assignment have to first e created

898 4nder suproect 79 create run 797G9 $ith the name Detors ith

eternal numers

copy SAP AG BC420 12-77

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 7888

891 2reate the foo$ing three tass The tass map the foo$ing process steps

convert data create + session and process + session

89198 In run 797G9 create the foo$ing tas

9 Tas AP9

9 Name 2onvert data 9 Tas type AP

9 Program type +S-

Seect the foo$ing +S- oect

+S- proect 2109

+S- suproect 7I9

+S- oect I997GT

89191 In run 797G9 create the foo$ing tas 9 Tas +5A9

9 Name 2reate I session

Tas type +5A

9 Program type INP

Seect program ampFI700 $ith the variant

I97G9

8919 In run 797G9 create the foo$ing tas

9 Tas S29

9 Name Process I session Tas type S2

9 Program type amp7P5

Seect program ampS2S4 $ith the variant

S497G9

Note that you have to correct the seuence of the tass 2onvert data

create + session and process + session

4se the uttons

89 Start the run

The detors $i e created $ith eterna numer assignments

89 2hec in transaction F0 that the detors M9980008 to M9980080 have een

created

copy SAP AG BC420 12-78

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 7988

ercise

nit $ransaction -ecorder

$opic -ecording function in the 9S8(

bull 2reate a recording using the +S-

bull ltenerate a atch input session

2hange the detor address data in the amp System

Name of the recording +

Name of the file +2055+F9

8 2reate the recording 7I3 using the +S- ampecord the transaction F01 (2hange

detor)

898 efore you create the recording first test the transaction onineQ

For the recording use detor M9980008 5n the initia screen of the F01

maintain the foo$ing fieds ony

etor etor M9980008

2ompany code 0008

Address data seect

Note $he data record must e saved hile recording

891 aintain the names and the descriptions for the foo$ing fieds

Name city street posta code and teephone numereete a other fieds in screen 880 from the recording (eg S5ampT+ +AN8

SPampAS)

4se the same technica names as sho$n in the tae eo$ (automatic fied

mapping)

copy SAP AG BC420 12-79

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 8088

1 2reate the suproect 7I9 and the ne$ oect TA3 in your proect 2109

aintain the oect attriutes and seect the item atch input recording Seect your

recording 7I3

2reate the source structure address

2reate the source fieds according to the tae eo$ 5r copy them from proect 2109S37N suproect 7I900 oect TA900

198 Fie setup The data from the egacy system are dispayed in the foo$ing tae

Fied name Fied type Fied ength escription

N5 2 8B etor numer

NA7 2 Name

STamp77T 2 Street

2ITC 2 2ityPace of residence

MIP 2 80 Posta code

T7+ 2 8B Teephone numer

191 aintain the fied mapping 4se the automatic fied mapping (via menu item

7tras)

19 Specify the fies 5ny maintain the fie name of the source fie

Name of the fie 21099IFI+7

2odepage 8800

19 Import the data and convert them ispay the data in each caseQ

19 2reate a atch input session

19B ampun the atch input session

copy SAP AG BC420 12-80

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 8188

ercise 3

nit $ransaction -ecorder

$opic -ecording ith the $ -ecorder

bull ltenerate a recording using the TA recorder

bull Test the recording

2hange the address data of detors in the amp system

Name recording $+

Name of the file +2055+F9

8 2reate the recording TA37I3 using the transaction recorder ampecord the

transaction F01 (change detor)

898 4se detor M9980008 for the recording 5n the F01 initia screen ony

maintain the foo$ing fieds

etor etor M9980008

2ompany 2ode 0008

Address data seect

Note $he data record must e saved hen recording

eete a fieds that do not eist in the source fie 21099IFI+7 from screen

880 in the recording (eg 6NA89S5ampT+ 6NA89+AN8 6ANNQ9SPampAS) Note o not deete fieds ampF01946ampS and ampF0190880

Save the recording no$

1 S$itch to the recordings overvie$

198 Process the recording $ith the processing mode A (dispay a)

191 Process the recording $ith the processing mode RN (no dispay)

19 If the recording has een tested and no error has occurred generate a I session

and run it using the I monitor If an error shoud occur generate the recordingagainQ

copy SAP AG BC420 12-81

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 8288

From the recording generate the program M21037I3 in your deveopment cass

2109 Seect the foo$ing

bull ampead fied contents from fie

bull 2reate test data in the fie 2103dei3test3tt

98 Save this program and eecute it ltenerate one I session each and process it

2arry out the same steps again using the ca transaction

The generated program shoud no$ e changed so that fie 21099IFI+7 can e

read and processed

98 2hange the defaut vaue of the fie name (parameter dataset) in 21099

IFI+7

91 2hange the structure definition eete the company code fied and the address

data checo from the structure

9 2hange the su9routine ca perform dc3fied for the company code (KampF019

46ampSK) so that the vaue 0008 is transferred

9 2hange the su9routine ca perform dc3fied for the address data checo

(KampF0190880K) so that the vaue G is transferred

9 Start the program again and read the data from the fie 21099IFI+7 $ith

detor data ltenerate a I session $ith it and run it

copy SAP AG BC420 12-82

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 8388

033 Include DR16INCLUDE BDCRECX1

SELECTION-SCREEN BEGIN OF LINE

PARAMETERS SESSION RADIOBUTTON GROUP CTU create sessi SELECTION-SCREEN COMMENT $amp TEXT-S FOR FIELD SESSION

se(ecti-scree )siti +

PARAMETERS CTU RADIOBUTTON GROUP CTU ca(( trasacti

SELECTION-SCREEN COMMENT $amp TEXT-S FOR FIELD CTU

SELECTION-SCREEN END OF LINE

SELECTION-SCREEN BEGIN OF LINE

SELECTION-SCREEN COMMENT $amp TEXT-S1 FOR FIELD GROUP

se(ecti-scree )siti $+

PARAMETERS GROUP1$amp r) ae 0 sessi

SELECTION-SCREEN COMMENT $amp TEXT-S+ FOR FIELD CTUMODE

se(ecti-scree )siti

PARAMETERS CTUMODE LIE CTU2PARAMS-DISMODE DEFAULT 3N3

A4 s56 a(( 78)rs

E4 s56 78)r errr (8

N4 7 t 7is)(a8 78)r

SELECTION-SCREEN END OF LINE

SELECTION-SCREEN BEGIN OF LINE

SELECTION-SCREEN COMMENT $amp TEXT-S$ FOR FIELD USER

se(ecti-scree )siti $+

PARAMETERS4 USER1$amp DEFAULT S9-UNAME ser 0r sessi i atc5

SELECTION-SCREEN COMMENT $amp TEXT-S FOR FIELD CUPDATE

se(ecti-scree )siti

PARAMETERS CUPDATE LIE CTU2PARAMS-UPDMODE DEFAULT 3L3

S4 s8c5rs(8

A4 as8c5rs(8

L4 (ca(

SELECTION-SCREEN END OF LINE

SELECTION-SCREEN BEGIN OF LINE

SELECTION-SCREEN COMMENT $amp TEXT-S FOR FIELD EEP

se(ecti-scree )siti $+

PARAMETERS4 EEP AS CltECBOX 3 3 = 7e(ete sessi i0 0iis5e7

3X3 = gtee) sessi i0 0iis5e7

SELECTION-SCREEN COMMENT $amp TEXT-S FOR FIELD E2GROUP

copy SAP AG BC420 12-83

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 8488

se(ecti-scree )siti

)araeters E2GROUP1$amp r) ae 0 errr-sessi

SELECTION-SCREEN END OF LINE

SELECTION-SCREEN BEGIN OF LINE

SELECTION-SCREEN COMMENT $amp TEXT-S FOR FIELD ltOLDDATE

se(ecti-scree )siti $+

PARAMETERS4 ltOLDDATE LIE S9-DATUM

SELECTION-SCREEN COMMENT +11amp TEXT-S$ FOR FIELD E2USER

se(ecti-scree )siti

PARAMETERS4 E2USER1$amp DEFAULT S9-UNAME ser 0r errr-sessi

SELECTION-SCREEN END OF LINE

SELECTION-SCREEN BEGIN OF LINE

SELECTION-SCREEN COMMENT +11amp TEXT-S FOR FIELD E2EEP

se(ecti-scree )siti

PARAMETERS4 E2EEP AS CltECBOX 3 3 = 7e(ete sessi i0 0iis5e7

3X3 = gtee) sessi i0 0iis5e7

SELECTION-SCREEN END OF LINE

SELECTION-SCREEN BEGIN OF LINE

SELECTION-SCREEN COMMENT +11amp TEXT-S FOR FIELD E2ltDATE

se(ecti-scree )siti

PARAMETERS4 E2ltDATE LIE S9-DATUM

SELECTION-SCREEN END OF LINE

SELECTION-SCREEN SIP

SELECTION-SCREEN BEGIN OF LINE

SELECTION-SCREEN COMMENT 1amp TEXT-S1 FOR FIELD NODATA

PARAMETERS4 NODATA DEFAULT 33 LOER CASE 7ata

SELECTION-SCREEN END OF LINE

----------------------------------------------------------------------

Batc5i)t7ata 0 si(e trasacti

DATA4 BDCDATA LIE BDCDATA OCCURS ITlt ltEADER LINE

essaes 0 ca(( trasacti

DATA4 MESSTAB LIE BDCMSGCOLL OCCURS ITlt ltEADER LINE

errr sessi )ee7 3 3 r 3X3amp

DATA4 E2GROUP2OPENED

essae tets

TABLES4 T1

copy SAP AG BC420 12-84

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 8588

----------------------------------------------------------------------

at se(ecti scree

----------------------------------------------------------------------

AT SELECTION-SCREEN

r) a7 ser st e 0i((e7 0r create sessi

IF SESSION = 3X3 AND

GROUP = SPACE OR USER = SPACE

MESSAGE E1MSamp

ENDIF

----------------------------------------------------------------------

)e 7ataset

----------------------------------------------------------------------

FORM OPEN2DATASET USING P2DATASET

OPEN DATASET P2DATASET IN TEXT MODE

IF S9-SUBRC

RITE4 TEXT-E S9-SUBRC

STOP

ENDIF

ENDFORM

----------------------------------------------------------------------

c(se 7ataset

----------------------------------------------------------------------

FORM CLOSE2DATASET USING P2DATASET

CLOSE DATASET P2DATASET

ENDFORM

----------------------------------------------------------------------

create atc5i)t sessi

t 0r ca(( trasacti siamp

----------------------------------------------------------------------

FORM OPEN2GROUP

IF SESSION = 3X3

SIP

RITE4 $amp 3Create r)3I1amp GROUP

SIP

)e atc5i)t r)

CALL FUNCTION 3BDC2OPEN2GROUP3

EXPORTING CLIENT = S9-MANDT

copy SAP AG BC420 12-85

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 8688

GROUP = GROUP

USER = USER

EEP = EEP

ltOLDDATE = ltOLDDATE

RITE4 amp 3BDC2OPEN2GROUP3I$amp

1$amp 3retrc7e43I+amp

S9-SUBRC

ENDIF

ENDFORM

----------------------------------------------------------------------

e7 atc5i)t sessi

ca(( trasacti si4 errr sessiamp

----------------------------------------------------------------------

FORM CLOSE2GROUP

IF SESSION = 3X3

c(se atc5i)t r)

CALL FUNCTION 3BDC2CLOSE2GROUP3

RITE4 amp 3BDC2CLOSE2GROUP3Iamp

1$amp 3retrc7e43I+amp

S9-SUBRC

ELSE

IF E2GROUP2OPENED = 3X3

CALL FUNCTION 3BDC2CLOSE2GROUP3

RITE4

RITE4 amp 3Fe5(era))e 6r7e eret3Iamp

ENDIF

ENDIF

ENDFORM

----------------------------------------------------------------------

Start e6 trasacti accr7i t )araeters

----------------------------------------------------------------------

FORM BDC2TRANSACTION USING TCODE

DATA4 L2MSTRINGamp

DATA4 L2SUBRC LIE S9-SUBRC

atc5 i)t sessi

IF SESSION = 3X3

CALL FUNCTION 3BDC2INSERT3

EXPORTING TCODE = TCODE

TABLES D9NPROTAB = BDCDATA

RITE4 3BDC2INSERT3Iamp

copy SAP AG BC420 12-86

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 8788

TCODE

3retrc7e43I+amp

S9-SUBRC

3RECORD43

S9-INDEX

ca(( trasacti si

ELSE

REFRESlt MESSTAB

CALL TRANSACTION TCODE USING BDCDATA

MODE CTUMODE

UPDATE CUPDATE

MESSAGES INTO MESSTAB

L2SUBRC = S9-SUBRC

RITE4 3CALL2TRANSACTION3

TCODE

3retrc7e43I+amp

L2SUBRC

3RECORD43

S9-INDEX

LOOP AT MESSTAB

SELECT SINGLE FROM T1 ltERE SPRSL = MESSTAB-MSGSPRA

AND ARBGB = MESSTAB-MSGID

AND MSGNR = MESSTAB-MSGNR

IF S9-SUBRC =

L2MSTRING = T1-TEXT

IF L2MSTRING CS 313

REPLACE 313 ITlt MESSTAB-MSGH1 INTO L2MSTRING

REPLACE 3$3 ITlt MESSTAB-MSGH$ INTO L2MSTRING

REPLACE 33 ITlt MESSTAB-MSGH INTO L2MSTRING

REPLACE 33 ITlt MESSTAB-MSGH INTO L2MSTRING

ELSE

REPLACE 33 ITlt MESSTAB-MSGH1 INTO L2MSTRING

REPLACE 33 ITlt MESSTAB-MSGH$ INTO L2MSTRING

REPLACE 33 ITlt MESSTAB-MSGH INTO L2MSTRING

REPLACE 33 ITlt MESSTAB-MSGH INTO L2MSTRING

ENDIF

CONDENSE L2MSTRING

RITE4 MESSTAB-MSGT9P L2MSTRING$+amp

ELSE

RITE4 MESSTAB

ENDIF

ENDLOOP

copy SAP AG BC420 12-87

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 8888

SIP

Eree 0e5(era))e

IF L2SUBRC AND E2GROUP SPACE

IF E2GROUP2OPENED = 3 3

CALL FUNCTION 3BDC2OPEN2GROUP3

EXPORTING CLIENT = S9-MANDT

GROUP = E2GROUP

USER = E2USER

EEP = E2EEP

ltOLDDATE = E2ltDATE

E2GROUP2OPENED = 3X3

ENDIF

CALL FUNCTION 3BDC2INSERT3

EXPORTING TCODE = TCODE

TABLES D9NPROTAB = BDCDATA

ENDIF

ENDIF

REFRESlt BDCDATA

ENDFORM

----------------------------------------------------------------------

Start e6 scree

----------------------------------------------------------------------

FORM BDC2D9NPRO USING PROGRAM D9NPRO

CLEAR BDCDATA

BDCDATA-PROGRAM = PROGRAM

BDCDATA-D9NPRO = D9NPRO

BDCDATA-D9NBEGIN = 3X3

APPEND BDCDATA

ENDFORM

----------------------------------------------------------------------

Isert 0ie(7

Page 71: BC420_46C - 012The Transaction Recorder

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 7188

036

983209 SAP AG 1999

The Transaction Recorder

PrinciplesPrinciples

Recording )ith the LSMWRecording )ith the LSMW

Principles of atch Input and all TransactionPrinciples of atch Input and all Transaction

Integrating the TA Program into the DWIntegrating the TA Program into the DW

Using the TA Recorder Using the TA Recorder

copy SAP AG BC420 12-71

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 7288

03amp

983209 SAP AG 1999

Integrating into the DW

Transfer program

AAP Dictionar(

Integrate

SDA0

SDA6

SDAamp

SDA

Cou can integrate the generated program into the G9- The structure of the fie must e created

in the AAP ictionary The taes SGA0 SGA8 SGA1 and SGA $i e fied

copy SAP AG BC420 12-72

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 7388

03

983209 SAP AG 1999

DW Release 42

Goo

-B eeae 45

aa ran=er ogtec

Int customer data transfer ob-ect

ecord =ed

Dece daa ran=er

d Goo

The ampunction ampor interatin TA recorder prora$s is

i$ple$ented in the

D+-B in Release

The recorder can e integrated as of ampeease and it is provided in the G9- ampeease

ltot to the G9- ampeease 5n the initia screen you can integrate programs y choosing ampoto

( +nt customer ata transfer o-ect

copy SAP AG BC420 12-73

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 7488

034

983209 SAP AG 1999

reating Program as D b-ect

Comer ran=er ogtec

ampgtec ype

Sor eD =or ogtec

aa ran=er proram

Srcre name

9900

(+A1

Cane comer

ZBCA+G

ZB

ustomer transfer ob-ect

umber bet)een 7000 and 7777

b-ect t(pe

Assignment to R ob-ect

Short tet for D ob-ectShort description

Data transfer program

ame of generated program

Structure name

A structure Cstructure la(out )ith this name is created in

the AAP Dictionar(

For ampeease transfer oects $ere not organiDed y 5amp oects ut y a G numer (00089

OOOO) The numer range O0009OOOO is reserved for customers

To create a connection to the ne$ G 9- you must assign the program to a 5amp oect

2reate a short tet for the G oect This tet $i appear in the method seection ist

Specify the program to e incuded

Specify a name for the structure to e created in the AAP ictionary

Note $he generated program appears under program type +N and not under program type

-

copy SAP AG BC420 12-74

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 7588

032

983209 SAP AG 1999

Adantages

Automatic program registration in the DW in

Release 48

ou can use all the functions defined for

standard ob-ects

1ception$ The (reate ampile ith data

function

If you incuded the oect in the ampeease $orench it is automaticay avaiae in the ampeease

B $orench

A the $orench functions are avaiae for your oect ecept for Create files ith transfer ata

copy SAP AG BC420 12-75

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 7688

038

983209 SAP AG 1999

ou are no) able to$

The Transaction Recorder$ Unit Summar(

Use the recording function in the LSMW to create

a batch input session )ith the data from the

eternal s(stem

Use the TA Recorder to create (our o)n data

transfer program

Anal(e programs that )or+ )ith batch input or

call transaction

Integrate the TA Recorder programs into the

DW

copy SAP AG BC420 12-76

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 7788

ercise 1

nit $ -ecorder

$opic 2reating etors

$ransaction -ecorder ercise 1

bull 2reating detors $ith eterna numer assignment

bull etor numers M9980008 to M9980080

Address data for detors $ith eterna numer assignment is to

e transferred using program ampFI700

ro4ect F5

Supro4ect +5

-un +575

$as)s 85 95 8S25

9oad program -F+00

8 In the foo$ing eercises eisting data is to e changed Therefore these detors $ith

eterna numer assignment have to first e created

898 4nder suproect 79 create run 797G9 $ith the name Detors ith

eternal numers

copy SAP AG BC420 12-77

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 7888

891 2reate the foo$ing three tass The tass map the foo$ing process steps

convert data create + session and process + session

89198 In run 797G9 create the foo$ing tas

9 Tas AP9

9 Name 2onvert data 9 Tas type AP

9 Program type +S-

Seect the foo$ing +S- oect

+S- proect 2109

+S- suproect 7I9

+S- oect I997GT

89191 In run 797G9 create the foo$ing tas 9 Tas +5A9

9 Name 2reate I session

Tas type +5A

9 Program type INP

Seect program ampFI700 $ith the variant

I97G9

8919 In run 797G9 create the foo$ing tas

9 Tas S29

9 Name Process I session Tas type S2

9 Program type amp7P5

Seect program ampS2S4 $ith the variant

S497G9

Note that you have to correct the seuence of the tass 2onvert data

create + session and process + session

4se the uttons

89 Start the run

The detors $i e created $ith eterna numer assignments

89 2hec in transaction F0 that the detors M9980008 to M9980080 have een

created

copy SAP AG BC420 12-78

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 7988

ercise

nit $ransaction -ecorder

$opic -ecording function in the 9S8(

bull 2reate a recording using the +S-

bull ltenerate a atch input session

2hange the detor address data in the amp System

Name of the recording +

Name of the file +2055+F9

8 2reate the recording 7I3 using the +S- ampecord the transaction F01 (2hange

detor)

898 efore you create the recording first test the transaction onineQ

For the recording use detor M9980008 5n the initia screen of the F01

maintain the foo$ing fieds ony

etor etor M9980008

2ompany code 0008

Address data seect

Note $he data record must e saved hile recording

891 aintain the names and the descriptions for the foo$ing fieds

Name city street posta code and teephone numereete a other fieds in screen 880 from the recording (eg S5ampT+ +AN8

SPampAS)

4se the same technica names as sho$n in the tae eo$ (automatic fied

mapping)

copy SAP AG BC420 12-79

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 8088

1 2reate the suproect 7I9 and the ne$ oect TA3 in your proect 2109

aintain the oect attriutes and seect the item atch input recording Seect your

recording 7I3

2reate the source structure address

2reate the source fieds according to the tae eo$ 5r copy them from proect 2109S37N suproect 7I900 oect TA900

198 Fie setup The data from the egacy system are dispayed in the foo$ing tae

Fied name Fied type Fied ength escription

N5 2 8B etor numer

NA7 2 Name

STamp77T 2 Street

2ITC 2 2ityPace of residence

MIP 2 80 Posta code

T7+ 2 8B Teephone numer

191 aintain the fied mapping 4se the automatic fied mapping (via menu item

7tras)

19 Specify the fies 5ny maintain the fie name of the source fie

Name of the fie 21099IFI+7

2odepage 8800

19 Import the data and convert them ispay the data in each caseQ

19 2reate a atch input session

19B ampun the atch input session

copy SAP AG BC420 12-80

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 8188

ercise 3

nit $ransaction -ecorder

$opic -ecording ith the $ -ecorder

bull ltenerate a recording using the TA recorder

bull Test the recording

2hange the address data of detors in the amp system

Name recording $+

Name of the file +2055+F9

8 2reate the recording TA37I3 using the transaction recorder ampecord the

transaction F01 (change detor)

898 4se detor M9980008 for the recording 5n the F01 initia screen ony

maintain the foo$ing fieds

etor etor M9980008

2ompany 2ode 0008

Address data seect

Note $he data record must e saved hen recording

eete a fieds that do not eist in the source fie 21099IFI+7 from screen

880 in the recording (eg 6NA89S5ampT+ 6NA89+AN8 6ANNQ9SPampAS) Note o not deete fieds ampF01946ampS and ampF0190880

Save the recording no$

1 S$itch to the recordings overvie$

198 Process the recording $ith the processing mode A (dispay a)

191 Process the recording $ith the processing mode RN (no dispay)

19 If the recording has een tested and no error has occurred generate a I session

and run it using the I monitor If an error shoud occur generate the recordingagainQ

copy SAP AG BC420 12-81

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 8288

From the recording generate the program M21037I3 in your deveopment cass

2109 Seect the foo$ing

bull ampead fied contents from fie

bull 2reate test data in the fie 2103dei3test3tt

98 Save this program and eecute it ltenerate one I session each and process it

2arry out the same steps again using the ca transaction

The generated program shoud no$ e changed so that fie 21099IFI+7 can e

read and processed

98 2hange the defaut vaue of the fie name (parameter dataset) in 21099

IFI+7

91 2hange the structure definition eete the company code fied and the address

data checo from the structure

9 2hange the su9routine ca perform dc3fied for the company code (KampF019

46ampSK) so that the vaue 0008 is transferred

9 2hange the su9routine ca perform dc3fied for the address data checo

(KampF0190880K) so that the vaue G is transferred

9 Start the program again and read the data from the fie 21099IFI+7 $ith

detor data ltenerate a I session $ith it and run it

copy SAP AG BC420 12-82

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 8388

033 Include DR16INCLUDE BDCRECX1

SELECTION-SCREEN BEGIN OF LINE

PARAMETERS SESSION RADIOBUTTON GROUP CTU create sessi SELECTION-SCREEN COMMENT $amp TEXT-S FOR FIELD SESSION

se(ecti-scree )siti +

PARAMETERS CTU RADIOBUTTON GROUP CTU ca(( trasacti

SELECTION-SCREEN COMMENT $amp TEXT-S FOR FIELD CTU

SELECTION-SCREEN END OF LINE

SELECTION-SCREEN BEGIN OF LINE

SELECTION-SCREEN COMMENT $amp TEXT-S1 FOR FIELD GROUP

se(ecti-scree )siti $+

PARAMETERS GROUP1$amp r) ae 0 sessi

SELECTION-SCREEN COMMENT $amp TEXT-S+ FOR FIELD CTUMODE

se(ecti-scree )siti

PARAMETERS CTUMODE LIE CTU2PARAMS-DISMODE DEFAULT 3N3

A4 s56 a(( 78)rs

E4 s56 78)r errr (8

N4 7 t 7is)(a8 78)r

SELECTION-SCREEN END OF LINE

SELECTION-SCREEN BEGIN OF LINE

SELECTION-SCREEN COMMENT $amp TEXT-S$ FOR FIELD USER

se(ecti-scree )siti $+

PARAMETERS4 USER1$amp DEFAULT S9-UNAME ser 0r sessi i atc5

SELECTION-SCREEN COMMENT $amp TEXT-S FOR FIELD CUPDATE

se(ecti-scree )siti

PARAMETERS CUPDATE LIE CTU2PARAMS-UPDMODE DEFAULT 3L3

S4 s8c5rs(8

A4 as8c5rs(8

L4 (ca(

SELECTION-SCREEN END OF LINE

SELECTION-SCREEN BEGIN OF LINE

SELECTION-SCREEN COMMENT $amp TEXT-S FOR FIELD EEP

se(ecti-scree )siti $+

PARAMETERS4 EEP AS CltECBOX 3 3 = 7e(ete sessi i0 0iis5e7

3X3 = gtee) sessi i0 0iis5e7

SELECTION-SCREEN COMMENT $amp TEXT-S FOR FIELD E2GROUP

copy SAP AG BC420 12-83

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 8488

se(ecti-scree )siti

)araeters E2GROUP1$amp r) ae 0 errr-sessi

SELECTION-SCREEN END OF LINE

SELECTION-SCREEN BEGIN OF LINE

SELECTION-SCREEN COMMENT $amp TEXT-S FOR FIELD ltOLDDATE

se(ecti-scree )siti $+

PARAMETERS4 ltOLDDATE LIE S9-DATUM

SELECTION-SCREEN COMMENT +11amp TEXT-S$ FOR FIELD E2USER

se(ecti-scree )siti

PARAMETERS4 E2USER1$amp DEFAULT S9-UNAME ser 0r errr-sessi

SELECTION-SCREEN END OF LINE

SELECTION-SCREEN BEGIN OF LINE

SELECTION-SCREEN COMMENT +11amp TEXT-S FOR FIELD E2EEP

se(ecti-scree )siti

PARAMETERS4 E2EEP AS CltECBOX 3 3 = 7e(ete sessi i0 0iis5e7

3X3 = gtee) sessi i0 0iis5e7

SELECTION-SCREEN END OF LINE

SELECTION-SCREEN BEGIN OF LINE

SELECTION-SCREEN COMMENT +11amp TEXT-S FOR FIELD E2ltDATE

se(ecti-scree )siti

PARAMETERS4 E2ltDATE LIE S9-DATUM

SELECTION-SCREEN END OF LINE

SELECTION-SCREEN SIP

SELECTION-SCREEN BEGIN OF LINE

SELECTION-SCREEN COMMENT 1amp TEXT-S1 FOR FIELD NODATA

PARAMETERS4 NODATA DEFAULT 33 LOER CASE 7ata

SELECTION-SCREEN END OF LINE

----------------------------------------------------------------------

Batc5i)t7ata 0 si(e trasacti

DATA4 BDCDATA LIE BDCDATA OCCURS ITlt ltEADER LINE

essaes 0 ca(( trasacti

DATA4 MESSTAB LIE BDCMSGCOLL OCCURS ITlt ltEADER LINE

errr sessi )ee7 3 3 r 3X3amp

DATA4 E2GROUP2OPENED

essae tets

TABLES4 T1

copy SAP AG BC420 12-84

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 8588

----------------------------------------------------------------------

at se(ecti scree

----------------------------------------------------------------------

AT SELECTION-SCREEN

r) a7 ser st e 0i((e7 0r create sessi

IF SESSION = 3X3 AND

GROUP = SPACE OR USER = SPACE

MESSAGE E1MSamp

ENDIF

----------------------------------------------------------------------

)e 7ataset

----------------------------------------------------------------------

FORM OPEN2DATASET USING P2DATASET

OPEN DATASET P2DATASET IN TEXT MODE

IF S9-SUBRC

RITE4 TEXT-E S9-SUBRC

STOP

ENDIF

ENDFORM

----------------------------------------------------------------------

c(se 7ataset

----------------------------------------------------------------------

FORM CLOSE2DATASET USING P2DATASET

CLOSE DATASET P2DATASET

ENDFORM

----------------------------------------------------------------------

create atc5i)t sessi

t 0r ca(( trasacti siamp

----------------------------------------------------------------------

FORM OPEN2GROUP

IF SESSION = 3X3

SIP

RITE4 $amp 3Create r)3I1amp GROUP

SIP

)e atc5i)t r)

CALL FUNCTION 3BDC2OPEN2GROUP3

EXPORTING CLIENT = S9-MANDT

copy SAP AG BC420 12-85

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 8688

GROUP = GROUP

USER = USER

EEP = EEP

ltOLDDATE = ltOLDDATE

RITE4 amp 3BDC2OPEN2GROUP3I$amp

1$amp 3retrc7e43I+amp

S9-SUBRC

ENDIF

ENDFORM

----------------------------------------------------------------------

e7 atc5i)t sessi

ca(( trasacti si4 errr sessiamp

----------------------------------------------------------------------

FORM CLOSE2GROUP

IF SESSION = 3X3

c(se atc5i)t r)

CALL FUNCTION 3BDC2CLOSE2GROUP3

RITE4 amp 3BDC2CLOSE2GROUP3Iamp

1$amp 3retrc7e43I+amp

S9-SUBRC

ELSE

IF E2GROUP2OPENED = 3X3

CALL FUNCTION 3BDC2CLOSE2GROUP3

RITE4

RITE4 amp 3Fe5(era))e 6r7e eret3Iamp

ENDIF

ENDIF

ENDFORM

----------------------------------------------------------------------

Start e6 trasacti accr7i t )araeters

----------------------------------------------------------------------

FORM BDC2TRANSACTION USING TCODE

DATA4 L2MSTRINGamp

DATA4 L2SUBRC LIE S9-SUBRC

atc5 i)t sessi

IF SESSION = 3X3

CALL FUNCTION 3BDC2INSERT3

EXPORTING TCODE = TCODE

TABLES D9NPROTAB = BDCDATA

RITE4 3BDC2INSERT3Iamp

copy SAP AG BC420 12-86

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 8788

TCODE

3retrc7e43I+amp

S9-SUBRC

3RECORD43

S9-INDEX

ca(( trasacti si

ELSE

REFRESlt MESSTAB

CALL TRANSACTION TCODE USING BDCDATA

MODE CTUMODE

UPDATE CUPDATE

MESSAGES INTO MESSTAB

L2SUBRC = S9-SUBRC

RITE4 3CALL2TRANSACTION3

TCODE

3retrc7e43I+amp

L2SUBRC

3RECORD43

S9-INDEX

LOOP AT MESSTAB

SELECT SINGLE FROM T1 ltERE SPRSL = MESSTAB-MSGSPRA

AND ARBGB = MESSTAB-MSGID

AND MSGNR = MESSTAB-MSGNR

IF S9-SUBRC =

L2MSTRING = T1-TEXT

IF L2MSTRING CS 313

REPLACE 313 ITlt MESSTAB-MSGH1 INTO L2MSTRING

REPLACE 3$3 ITlt MESSTAB-MSGH$ INTO L2MSTRING

REPLACE 33 ITlt MESSTAB-MSGH INTO L2MSTRING

REPLACE 33 ITlt MESSTAB-MSGH INTO L2MSTRING

ELSE

REPLACE 33 ITlt MESSTAB-MSGH1 INTO L2MSTRING

REPLACE 33 ITlt MESSTAB-MSGH$ INTO L2MSTRING

REPLACE 33 ITlt MESSTAB-MSGH INTO L2MSTRING

REPLACE 33 ITlt MESSTAB-MSGH INTO L2MSTRING

ENDIF

CONDENSE L2MSTRING

RITE4 MESSTAB-MSGT9P L2MSTRING$+amp

ELSE

RITE4 MESSTAB

ENDIF

ENDLOOP

copy SAP AG BC420 12-87

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 8888

SIP

Eree 0e5(era))e

IF L2SUBRC AND E2GROUP SPACE

IF E2GROUP2OPENED = 3 3

CALL FUNCTION 3BDC2OPEN2GROUP3

EXPORTING CLIENT = S9-MANDT

GROUP = E2GROUP

USER = E2USER

EEP = E2EEP

ltOLDDATE = E2ltDATE

E2GROUP2OPENED = 3X3

ENDIF

CALL FUNCTION 3BDC2INSERT3

EXPORTING TCODE = TCODE

TABLES D9NPROTAB = BDCDATA

ENDIF

ENDIF

REFRESlt BDCDATA

ENDFORM

----------------------------------------------------------------------

Start e6 scree

----------------------------------------------------------------------

FORM BDC2D9NPRO USING PROGRAM D9NPRO

CLEAR BDCDATA

BDCDATA-PROGRAM = PROGRAM

BDCDATA-D9NPRO = D9NPRO

BDCDATA-D9NBEGIN = 3X3

APPEND BDCDATA

ENDFORM

----------------------------------------------------------------------

Isert 0ie(7

Page 72: BC420_46C - 012The Transaction Recorder

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 7288

03amp

983209 SAP AG 1999

Integrating into the DW

Transfer program

AAP Dictionar(

Integrate

SDA0

SDA6

SDAamp

SDA

Cou can integrate the generated program into the G9- The structure of the fie must e created

in the AAP ictionary The taes SGA0 SGA8 SGA1 and SGA $i e fied

copy SAP AG BC420 12-72

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 7388

03

983209 SAP AG 1999

DW Release 42

Goo

-B eeae 45

aa ran=er ogtec

Int customer data transfer ob-ect

ecord =ed

Dece daa ran=er

d Goo

The ampunction ampor interatin TA recorder prora$s is

i$ple$ented in the

D+-B in Release

The recorder can e integrated as of ampeease and it is provided in the G9- ampeease

ltot to the G9- ampeease 5n the initia screen you can integrate programs y choosing ampoto

( +nt customer ata transfer o-ect

copy SAP AG BC420 12-73

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 7488

034

983209 SAP AG 1999

reating Program as D b-ect

Comer ran=er ogtec

ampgtec ype

Sor eD =or ogtec

aa ran=er proram

Srcre name

9900

(+A1

Cane comer

ZBCA+G

ZB

ustomer transfer ob-ect

umber bet)een 7000 and 7777

b-ect t(pe

Assignment to R ob-ect

Short tet for D ob-ectShort description

Data transfer program

ame of generated program

Structure name

A structure Cstructure la(out )ith this name is created in

the AAP Dictionar(

For ampeease transfer oects $ere not organiDed y 5amp oects ut y a G numer (00089

OOOO) The numer range O0009OOOO is reserved for customers

To create a connection to the ne$ G 9- you must assign the program to a 5amp oect

2reate a short tet for the G oect This tet $i appear in the method seection ist

Specify the program to e incuded

Specify a name for the structure to e created in the AAP ictionary

Note $he generated program appears under program type +N and not under program type

-

copy SAP AG BC420 12-74

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 7588

032

983209 SAP AG 1999

Adantages

Automatic program registration in the DW in

Release 48

ou can use all the functions defined for

standard ob-ects

1ception$ The (reate ampile ith data

function

If you incuded the oect in the ampeease $orench it is automaticay avaiae in the ampeease

B $orench

A the $orench functions are avaiae for your oect ecept for Create files ith transfer ata

copy SAP AG BC420 12-75

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 7688

038

983209 SAP AG 1999

ou are no) able to$

The Transaction Recorder$ Unit Summar(

Use the recording function in the LSMW to create

a batch input session )ith the data from the

eternal s(stem

Use the TA Recorder to create (our o)n data

transfer program

Anal(e programs that )or+ )ith batch input or

call transaction

Integrate the TA Recorder programs into the

DW

copy SAP AG BC420 12-76

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 7788

ercise 1

nit $ -ecorder

$opic 2reating etors

$ransaction -ecorder ercise 1

bull 2reating detors $ith eterna numer assignment

bull etor numers M9980008 to M9980080

Address data for detors $ith eterna numer assignment is to

e transferred using program ampFI700

ro4ect F5

Supro4ect +5

-un +575

$as)s 85 95 8S25

9oad program -F+00

8 In the foo$ing eercises eisting data is to e changed Therefore these detors $ith

eterna numer assignment have to first e created

898 4nder suproect 79 create run 797G9 $ith the name Detors ith

eternal numers

copy SAP AG BC420 12-77

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 7888

891 2reate the foo$ing three tass The tass map the foo$ing process steps

convert data create + session and process + session

89198 In run 797G9 create the foo$ing tas

9 Tas AP9

9 Name 2onvert data 9 Tas type AP

9 Program type +S-

Seect the foo$ing +S- oect

+S- proect 2109

+S- suproect 7I9

+S- oect I997GT

89191 In run 797G9 create the foo$ing tas 9 Tas +5A9

9 Name 2reate I session

Tas type +5A

9 Program type INP

Seect program ampFI700 $ith the variant

I97G9

8919 In run 797G9 create the foo$ing tas

9 Tas S29

9 Name Process I session Tas type S2

9 Program type amp7P5

Seect program ampS2S4 $ith the variant

S497G9

Note that you have to correct the seuence of the tass 2onvert data

create + session and process + session

4se the uttons

89 Start the run

The detors $i e created $ith eterna numer assignments

89 2hec in transaction F0 that the detors M9980008 to M9980080 have een

created

copy SAP AG BC420 12-78

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 7988

ercise

nit $ransaction -ecorder

$opic -ecording function in the 9S8(

bull 2reate a recording using the +S-

bull ltenerate a atch input session

2hange the detor address data in the amp System

Name of the recording +

Name of the file +2055+F9

8 2reate the recording 7I3 using the +S- ampecord the transaction F01 (2hange

detor)

898 efore you create the recording first test the transaction onineQ

For the recording use detor M9980008 5n the initia screen of the F01

maintain the foo$ing fieds ony

etor etor M9980008

2ompany code 0008

Address data seect

Note $he data record must e saved hile recording

891 aintain the names and the descriptions for the foo$ing fieds

Name city street posta code and teephone numereete a other fieds in screen 880 from the recording (eg S5ampT+ +AN8

SPampAS)

4se the same technica names as sho$n in the tae eo$ (automatic fied

mapping)

copy SAP AG BC420 12-79

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 8088

1 2reate the suproect 7I9 and the ne$ oect TA3 in your proect 2109

aintain the oect attriutes and seect the item atch input recording Seect your

recording 7I3

2reate the source structure address

2reate the source fieds according to the tae eo$ 5r copy them from proect 2109S37N suproect 7I900 oect TA900

198 Fie setup The data from the egacy system are dispayed in the foo$ing tae

Fied name Fied type Fied ength escription

N5 2 8B etor numer

NA7 2 Name

STamp77T 2 Street

2ITC 2 2ityPace of residence

MIP 2 80 Posta code

T7+ 2 8B Teephone numer

191 aintain the fied mapping 4se the automatic fied mapping (via menu item

7tras)

19 Specify the fies 5ny maintain the fie name of the source fie

Name of the fie 21099IFI+7

2odepage 8800

19 Import the data and convert them ispay the data in each caseQ

19 2reate a atch input session

19B ampun the atch input session

copy SAP AG BC420 12-80

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 8188

ercise 3

nit $ransaction -ecorder

$opic -ecording ith the $ -ecorder

bull ltenerate a recording using the TA recorder

bull Test the recording

2hange the address data of detors in the amp system

Name recording $+

Name of the file +2055+F9

8 2reate the recording TA37I3 using the transaction recorder ampecord the

transaction F01 (change detor)

898 4se detor M9980008 for the recording 5n the F01 initia screen ony

maintain the foo$ing fieds

etor etor M9980008

2ompany 2ode 0008

Address data seect

Note $he data record must e saved hen recording

eete a fieds that do not eist in the source fie 21099IFI+7 from screen

880 in the recording (eg 6NA89S5ampT+ 6NA89+AN8 6ANNQ9SPampAS) Note o not deete fieds ampF01946ampS and ampF0190880

Save the recording no$

1 S$itch to the recordings overvie$

198 Process the recording $ith the processing mode A (dispay a)

191 Process the recording $ith the processing mode RN (no dispay)

19 If the recording has een tested and no error has occurred generate a I session

and run it using the I monitor If an error shoud occur generate the recordingagainQ

copy SAP AG BC420 12-81

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 8288

From the recording generate the program M21037I3 in your deveopment cass

2109 Seect the foo$ing

bull ampead fied contents from fie

bull 2reate test data in the fie 2103dei3test3tt

98 Save this program and eecute it ltenerate one I session each and process it

2arry out the same steps again using the ca transaction

The generated program shoud no$ e changed so that fie 21099IFI+7 can e

read and processed

98 2hange the defaut vaue of the fie name (parameter dataset) in 21099

IFI+7

91 2hange the structure definition eete the company code fied and the address

data checo from the structure

9 2hange the su9routine ca perform dc3fied for the company code (KampF019

46ampSK) so that the vaue 0008 is transferred

9 2hange the su9routine ca perform dc3fied for the address data checo

(KampF0190880K) so that the vaue G is transferred

9 Start the program again and read the data from the fie 21099IFI+7 $ith

detor data ltenerate a I session $ith it and run it

copy SAP AG BC420 12-82

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 8388

033 Include DR16INCLUDE BDCRECX1

SELECTION-SCREEN BEGIN OF LINE

PARAMETERS SESSION RADIOBUTTON GROUP CTU create sessi SELECTION-SCREEN COMMENT $amp TEXT-S FOR FIELD SESSION

se(ecti-scree )siti +

PARAMETERS CTU RADIOBUTTON GROUP CTU ca(( trasacti

SELECTION-SCREEN COMMENT $amp TEXT-S FOR FIELD CTU

SELECTION-SCREEN END OF LINE

SELECTION-SCREEN BEGIN OF LINE

SELECTION-SCREEN COMMENT $amp TEXT-S1 FOR FIELD GROUP

se(ecti-scree )siti $+

PARAMETERS GROUP1$amp r) ae 0 sessi

SELECTION-SCREEN COMMENT $amp TEXT-S+ FOR FIELD CTUMODE

se(ecti-scree )siti

PARAMETERS CTUMODE LIE CTU2PARAMS-DISMODE DEFAULT 3N3

A4 s56 a(( 78)rs

E4 s56 78)r errr (8

N4 7 t 7is)(a8 78)r

SELECTION-SCREEN END OF LINE

SELECTION-SCREEN BEGIN OF LINE

SELECTION-SCREEN COMMENT $amp TEXT-S$ FOR FIELD USER

se(ecti-scree )siti $+

PARAMETERS4 USER1$amp DEFAULT S9-UNAME ser 0r sessi i atc5

SELECTION-SCREEN COMMENT $amp TEXT-S FOR FIELD CUPDATE

se(ecti-scree )siti

PARAMETERS CUPDATE LIE CTU2PARAMS-UPDMODE DEFAULT 3L3

S4 s8c5rs(8

A4 as8c5rs(8

L4 (ca(

SELECTION-SCREEN END OF LINE

SELECTION-SCREEN BEGIN OF LINE

SELECTION-SCREEN COMMENT $amp TEXT-S FOR FIELD EEP

se(ecti-scree )siti $+

PARAMETERS4 EEP AS CltECBOX 3 3 = 7e(ete sessi i0 0iis5e7

3X3 = gtee) sessi i0 0iis5e7

SELECTION-SCREEN COMMENT $amp TEXT-S FOR FIELD E2GROUP

copy SAP AG BC420 12-83

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 8488

se(ecti-scree )siti

)araeters E2GROUP1$amp r) ae 0 errr-sessi

SELECTION-SCREEN END OF LINE

SELECTION-SCREEN BEGIN OF LINE

SELECTION-SCREEN COMMENT $amp TEXT-S FOR FIELD ltOLDDATE

se(ecti-scree )siti $+

PARAMETERS4 ltOLDDATE LIE S9-DATUM

SELECTION-SCREEN COMMENT +11amp TEXT-S$ FOR FIELD E2USER

se(ecti-scree )siti

PARAMETERS4 E2USER1$amp DEFAULT S9-UNAME ser 0r errr-sessi

SELECTION-SCREEN END OF LINE

SELECTION-SCREEN BEGIN OF LINE

SELECTION-SCREEN COMMENT +11amp TEXT-S FOR FIELD E2EEP

se(ecti-scree )siti

PARAMETERS4 E2EEP AS CltECBOX 3 3 = 7e(ete sessi i0 0iis5e7

3X3 = gtee) sessi i0 0iis5e7

SELECTION-SCREEN END OF LINE

SELECTION-SCREEN BEGIN OF LINE

SELECTION-SCREEN COMMENT +11amp TEXT-S FOR FIELD E2ltDATE

se(ecti-scree )siti

PARAMETERS4 E2ltDATE LIE S9-DATUM

SELECTION-SCREEN END OF LINE

SELECTION-SCREEN SIP

SELECTION-SCREEN BEGIN OF LINE

SELECTION-SCREEN COMMENT 1amp TEXT-S1 FOR FIELD NODATA

PARAMETERS4 NODATA DEFAULT 33 LOER CASE 7ata

SELECTION-SCREEN END OF LINE

----------------------------------------------------------------------

Batc5i)t7ata 0 si(e trasacti

DATA4 BDCDATA LIE BDCDATA OCCURS ITlt ltEADER LINE

essaes 0 ca(( trasacti

DATA4 MESSTAB LIE BDCMSGCOLL OCCURS ITlt ltEADER LINE

errr sessi )ee7 3 3 r 3X3amp

DATA4 E2GROUP2OPENED

essae tets

TABLES4 T1

copy SAP AG BC420 12-84

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 8588

----------------------------------------------------------------------

at se(ecti scree

----------------------------------------------------------------------

AT SELECTION-SCREEN

r) a7 ser st e 0i((e7 0r create sessi

IF SESSION = 3X3 AND

GROUP = SPACE OR USER = SPACE

MESSAGE E1MSamp

ENDIF

----------------------------------------------------------------------

)e 7ataset

----------------------------------------------------------------------

FORM OPEN2DATASET USING P2DATASET

OPEN DATASET P2DATASET IN TEXT MODE

IF S9-SUBRC

RITE4 TEXT-E S9-SUBRC

STOP

ENDIF

ENDFORM

----------------------------------------------------------------------

c(se 7ataset

----------------------------------------------------------------------

FORM CLOSE2DATASET USING P2DATASET

CLOSE DATASET P2DATASET

ENDFORM

----------------------------------------------------------------------

create atc5i)t sessi

t 0r ca(( trasacti siamp

----------------------------------------------------------------------

FORM OPEN2GROUP

IF SESSION = 3X3

SIP

RITE4 $amp 3Create r)3I1amp GROUP

SIP

)e atc5i)t r)

CALL FUNCTION 3BDC2OPEN2GROUP3

EXPORTING CLIENT = S9-MANDT

copy SAP AG BC420 12-85

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 8688

GROUP = GROUP

USER = USER

EEP = EEP

ltOLDDATE = ltOLDDATE

RITE4 amp 3BDC2OPEN2GROUP3I$amp

1$amp 3retrc7e43I+amp

S9-SUBRC

ENDIF

ENDFORM

----------------------------------------------------------------------

e7 atc5i)t sessi

ca(( trasacti si4 errr sessiamp

----------------------------------------------------------------------

FORM CLOSE2GROUP

IF SESSION = 3X3

c(se atc5i)t r)

CALL FUNCTION 3BDC2CLOSE2GROUP3

RITE4 amp 3BDC2CLOSE2GROUP3Iamp

1$amp 3retrc7e43I+amp

S9-SUBRC

ELSE

IF E2GROUP2OPENED = 3X3

CALL FUNCTION 3BDC2CLOSE2GROUP3

RITE4

RITE4 amp 3Fe5(era))e 6r7e eret3Iamp

ENDIF

ENDIF

ENDFORM

----------------------------------------------------------------------

Start e6 trasacti accr7i t )araeters

----------------------------------------------------------------------

FORM BDC2TRANSACTION USING TCODE

DATA4 L2MSTRINGamp

DATA4 L2SUBRC LIE S9-SUBRC

atc5 i)t sessi

IF SESSION = 3X3

CALL FUNCTION 3BDC2INSERT3

EXPORTING TCODE = TCODE

TABLES D9NPROTAB = BDCDATA

RITE4 3BDC2INSERT3Iamp

copy SAP AG BC420 12-86

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 8788

TCODE

3retrc7e43I+amp

S9-SUBRC

3RECORD43

S9-INDEX

ca(( trasacti si

ELSE

REFRESlt MESSTAB

CALL TRANSACTION TCODE USING BDCDATA

MODE CTUMODE

UPDATE CUPDATE

MESSAGES INTO MESSTAB

L2SUBRC = S9-SUBRC

RITE4 3CALL2TRANSACTION3

TCODE

3retrc7e43I+amp

L2SUBRC

3RECORD43

S9-INDEX

LOOP AT MESSTAB

SELECT SINGLE FROM T1 ltERE SPRSL = MESSTAB-MSGSPRA

AND ARBGB = MESSTAB-MSGID

AND MSGNR = MESSTAB-MSGNR

IF S9-SUBRC =

L2MSTRING = T1-TEXT

IF L2MSTRING CS 313

REPLACE 313 ITlt MESSTAB-MSGH1 INTO L2MSTRING

REPLACE 3$3 ITlt MESSTAB-MSGH$ INTO L2MSTRING

REPLACE 33 ITlt MESSTAB-MSGH INTO L2MSTRING

REPLACE 33 ITlt MESSTAB-MSGH INTO L2MSTRING

ELSE

REPLACE 33 ITlt MESSTAB-MSGH1 INTO L2MSTRING

REPLACE 33 ITlt MESSTAB-MSGH$ INTO L2MSTRING

REPLACE 33 ITlt MESSTAB-MSGH INTO L2MSTRING

REPLACE 33 ITlt MESSTAB-MSGH INTO L2MSTRING

ENDIF

CONDENSE L2MSTRING

RITE4 MESSTAB-MSGT9P L2MSTRING$+amp

ELSE

RITE4 MESSTAB

ENDIF

ENDLOOP

copy SAP AG BC420 12-87

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 8888

SIP

Eree 0e5(era))e

IF L2SUBRC AND E2GROUP SPACE

IF E2GROUP2OPENED = 3 3

CALL FUNCTION 3BDC2OPEN2GROUP3

EXPORTING CLIENT = S9-MANDT

GROUP = E2GROUP

USER = E2USER

EEP = E2EEP

ltOLDDATE = E2ltDATE

E2GROUP2OPENED = 3X3

ENDIF

CALL FUNCTION 3BDC2INSERT3

EXPORTING TCODE = TCODE

TABLES D9NPROTAB = BDCDATA

ENDIF

ENDIF

REFRESlt BDCDATA

ENDFORM

----------------------------------------------------------------------

Start e6 scree

----------------------------------------------------------------------

FORM BDC2D9NPRO USING PROGRAM D9NPRO

CLEAR BDCDATA

BDCDATA-PROGRAM = PROGRAM

BDCDATA-D9NPRO = D9NPRO

BDCDATA-D9NBEGIN = 3X3

APPEND BDCDATA

ENDFORM

----------------------------------------------------------------------

Isert 0ie(7

Page 73: BC420_46C - 012The Transaction Recorder

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 7388

03

983209 SAP AG 1999

DW Release 42

Goo

-B eeae 45

aa ran=er ogtec

Int customer data transfer ob-ect

ecord =ed

Dece daa ran=er

d Goo

The ampunction ampor interatin TA recorder prora$s is

i$ple$ented in the

D+-B in Release

The recorder can e integrated as of ampeease and it is provided in the G9- ampeease

ltot to the G9- ampeease 5n the initia screen you can integrate programs y choosing ampoto

( +nt customer ata transfer o-ect

copy SAP AG BC420 12-73

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 7488

034

983209 SAP AG 1999

reating Program as D b-ect

Comer ran=er ogtec

ampgtec ype

Sor eD =or ogtec

aa ran=er proram

Srcre name

9900

(+A1

Cane comer

ZBCA+G

ZB

ustomer transfer ob-ect

umber bet)een 7000 and 7777

b-ect t(pe

Assignment to R ob-ect

Short tet for D ob-ectShort description

Data transfer program

ame of generated program

Structure name

A structure Cstructure la(out )ith this name is created in

the AAP Dictionar(

For ampeease transfer oects $ere not organiDed y 5amp oects ut y a G numer (00089

OOOO) The numer range O0009OOOO is reserved for customers

To create a connection to the ne$ G 9- you must assign the program to a 5amp oect

2reate a short tet for the G oect This tet $i appear in the method seection ist

Specify the program to e incuded

Specify a name for the structure to e created in the AAP ictionary

Note $he generated program appears under program type +N and not under program type

-

copy SAP AG BC420 12-74

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 7588

032

983209 SAP AG 1999

Adantages

Automatic program registration in the DW in

Release 48

ou can use all the functions defined for

standard ob-ects

1ception$ The (reate ampile ith data

function

If you incuded the oect in the ampeease $orench it is automaticay avaiae in the ampeease

B $orench

A the $orench functions are avaiae for your oect ecept for Create files ith transfer ata

copy SAP AG BC420 12-75

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 7688

038

983209 SAP AG 1999

ou are no) able to$

The Transaction Recorder$ Unit Summar(

Use the recording function in the LSMW to create

a batch input session )ith the data from the

eternal s(stem

Use the TA Recorder to create (our o)n data

transfer program

Anal(e programs that )or+ )ith batch input or

call transaction

Integrate the TA Recorder programs into the

DW

copy SAP AG BC420 12-76

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 7788

ercise 1

nit $ -ecorder

$opic 2reating etors

$ransaction -ecorder ercise 1

bull 2reating detors $ith eterna numer assignment

bull etor numers M9980008 to M9980080

Address data for detors $ith eterna numer assignment is to

e transferred using program ampFI700

ro4ect F5

Supro4ect +5

-un +575

$as)s 85 95 8S25

9oad program -F+00

8 In the foo$ing eercises eisting data is to e changed Therefore these detors $ith

eterna numer assignment have to first e created

898 4nder suproect 79 create run 797G9 $ith the name Detors ith

eternal numers

copy SAP AG BC420 12-77

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 7888

891 2reate the foo$ing three tass The tass map the foo$ing process steps

convert data create + session and process + session

89198 In run 797G9 create the foo$ing tas

9 Tas AP9

9 Name 2onvert data 9 Tas type AP

9 Program type +S-

Seect the foo$ing +S- oect

+S- proect 2109

+S- suproect 7I9

+S- oect I997GT

89191 In run 797G9 create the foo$ing tas 9 Tas +5A9

9 Name 2reate I session

Tas type +5A

9 Program type INP

Seect program ampFI700 $ith the variant

I97G9

8919 In run 797G9 create the foo$ing tas

9 Tas S29

9 Name Process I session Tas type S2

9 Program type amp7P5

Seect program ampS2S4 $ith the variant

S497G9

Note that you have to correct the seuence of the tass 2onvert data

create + session and process + session

4se the uttons

89 Start the run

The detors $i e created $ith eterna numer assignments

89 2hec in transaction F0 that the detors M9980008 to M9980080 have een

created

copy SAP AG BC420 12-78

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 7988

ercise

nit $ransaction -ecorder

$opic -ecording function in the 9S8(

bull 2reate a recording using the +S-

bull ltenerate a atch input session

2hange the detor address data in the amp System

Name of the recording +

Name of the file +2055+F9

8 2reate the recording 7I3 using the +S- ampecord the transaction F01 (2hange

detor)

898 efore you create the recording first test the transaction onineQ

For the recording use detor M9980008 5n the initia screen of the F01

maintain the foo$ing fieds ony

etor etor M9980008

2ompany code 0008

Address data seect

Note $he data record must e saved hile recording

891 aintain the names and the descriptions for the foo$ing fieds

Name city street posta code and teephone numereete a other fieds in screen 880 from the recording (eg S5ampT+ +AN8

SPampAS)

4se the same technica names as sho$n in the tae eo$ (automatic fied

mapping)

copy SAP AG BC420 12-79

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 8088

1 2reate the suproect 7I9 and the ne$ oect TA3 in your proect 2109

aintain the oect attriutes and seect the item atch input recording Seect your

recording 7I3

2reate the source structure address

2reate the source fieds according to the tae eo$ 5r copy them from proect 2109S37N suproect 7I900 oect TA900

198 Fie setup The data from the egacy system are dispayed in the foo$ing tae

Fied name Fied type Fied ength escription

N5 2 8B etor numer

NA7 2 Name

STamp77T 2 Street

2ITC 2 2ityPace of residence

MIP 2 80 Posta code

T7+ 2 8B Teephone numer

191 aintain the fied mapping 4se the automatic fied mapping (via menu item

7tras)

19 Specify the fies 5ny maintain the fie name of the source fie

Name of the fie 21099IFI+7

2odepage 8800

19 Import the data and convert them ispay the data in each caseQ

19 2reate a atch input session

19B ampun the atch input session

copy SAP AG BC420 12-80

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 8188

ercise 3

nit $ransaction -ecorder

$opic -ecording ith the $ -ecorder

bull ltenerate a recording using the TA recorder

bull Test the recording

2hange the address data of detors in the amp system

Name recording $+

Name of the file +2055+F9

8 2reate the recording TA37I3 using the transaction recorder ampecord the

transaction F01 (change detor)

898 4se detor M9980008 for the recording 5n the F01 initia screen ony

maintain the foo$ing fieds

etor etor M9980008

2ompany 2ode 0008

Address data seect

Note $he data record must e saved hen recording

eete a fieds that do not eist in the source fie 21099IFI+7 from screen

880 in the recording (eg 6NA89S5ampT+ 6NA89+AN8 6ANNQ9SPampAS) Note o not deete fieds ampF01946ampS and ampF0190880

Save the recording no$

1 S$itch to the recordings overvie$

198 Process the recording $ith the processing mode A (dispay a)

191 Process the recording $ith the processing mode RN (no dispay)

19 If the recording has een tested and no error has occurred generate a I session

and run it using the I monitor If an error shoud occur generate the recordingagainQ

copy SAP AG BC420 12-81

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 8288

From the recording generate the program M21037I3 in your deveopment cass

2109 Seect the foo$ing

bull ampead fied contents from fie

bull 2reate test data in the fie 2103dei3test3tt

98 Save this program and eecute it ltenerate one I session each and process it

2arry out the same steps again using the ca transaction

The generated program shoud no$ e changed so that fie 21099IFI+7 can e

read and processed

98 2hange the defaut vaue of the fie name (parameter dataset) in 21099

IFI+7

91 2hange the structure definition eete the company code fied and the address

data checo from the structure

9 2hange the su9routine ca perform dc3fied for the company code (KampF019

46ampSK) so that the vaue 0008 is transferred

9 2hange the su9routine ca perform dc3fied for the address data checo

(KampF0190880K) so that the vaue G is transferred

9 Start the program again and read the data from the fie 21099IFI+7 $ith

detor data ltenerate a I session $ith it and run it

copy SAP AG BC420 12-82

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 8388

033 Include DR16INCLUDE BDCRECX1

SELECTION-SCREEN BEGIN OF LINE

PARAMETERS SESSION RADIOBUTTON GROUP CTU create sessi SELECTION-SCREEN COMMENT $amp TEXT-S FOR FIELD SESSION

se(ecti-scree )siti +

PARAMETERS CTU RADIOBUTTON GROUP CTU ca(( trasacti

SELECTION-SCREEN COMMENT $amp TEXT-S FOR FIELD CTU

SELECTION-SCREEN END OF LINE

SELECTION-SCREEN BEGIN OF LINE

SELECTION-SCREEN COMMENT $amp TEXT-S1 FOR FIELD GROUP

se(ecti-scree )siti $+

PARAMETERS GROUP1$amp r) ae 0 sessi

SELECTION-SCREEN COMMENT $amp TEXT-S+ FOR FIELD CTUMODE

se(ecti-scree )siti

PARAMETERS CTUMODE LIE CTU2PARAMS-DISMODE DEFAULT 3N3

A4 s56 a(( 78)rs

E4 s56 78)r errr (8

N4 7 t 7is)(a8 78)r

SELECTION-SCREEN END OF LINE

SELECTION-SCREEN BEGIN OF LINE

SELECTION-SCREEN COMMENT $amp TEXT-S$ FOR FIELD USER

se(ecti-scree )siti $+

PARAMETERS4 USER1$amp DEFAULT S9-UNAME ser 0r sessi i atc5

SELECTION-SCREEN COMMENT $amp TEXT-S FOR FIELD CUPDATE

se(ecti-scree )siti

PARAMETERS CUPDATE LIE CTU2PARAMS-UPDMODE DEFAULT 3L3

S4 s8c5rs(8

A4 as8c5rs(8

L4 (ca(

SELECTION-SCREEN END OF LINE

SELECTION-SCREEN BEGIN OF LINE

SELECTION-SCREEN COMMENT $amp TEXT-S FOR FIELD EEP

se(ecti-scree )siti $+

PARAMETERS4 EEP AS CltECBOX 3 3 = 7e(ete sessi i0 0iis5e7

3X3 = gtee) sessi i0 0iis5e7

SELECTION-SCREEN COMMENT $amp TEXT-S FOR FIELD E2GROUP

copy SAP AG BC420 12-83

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 8488

se(ecti-scree )siti

)araeters E2GROUP1$amp r) ae 0 errr-sessi

SELECTION-SCREEN END OF LINE

SELECTION-SCREEN BEGIN OF LINE

SELECTION-SCREEN COMMENT $amp TEXT-S FOR FIELD ltOLDDATE

se(ecti-scree )siti $+

PARAMETERS4 ltOLDDATE LIE S9-DATUM

SELECTION-SCREEN COMMENT +11amp TEXT-S$ FOR FIELD E2USER

se(ecti-scree )siti

PARAMETERS4 E2USER1$amp DEFAULT S9-UNAME ser 0r errr-sessi

SELECTION-SCREEN END OF LINE

SELECTION-SCREEN BEGIN OF LINE

SELECTION-SCREEN COMMENT +11amp TEXT-S FOR FIELD E2EEP

se(ecti-scree )siti

PARAMETERS4 E2EEP AS CltECBOX 3 3 = 7e(ete sessi i0 0iis5e7

3X3 = gtee) sessi i0 0iis5e7

SELECTION-SCREEN END OF LINE

SELECTION-SCREEN BEGIN OF LINE

SELECTION-SCREEN COMMENT +11amp TEXT-S FOR FIELD E2ltDATE

se(ecti-scree )siti

PARAMETERS4 E2ltDATE LIE S9-DATUM

SELECTION-SCREEN END OF LINE

SELECTION-SCREEN SIP

SELECTION-SCREEN BEGIN OF LINE

SELECTION-SCREEN COMMENT 1amp TEXT-S1 FOR FIELD NODATA

PARAMETERS4 NODATA DEFAULT 33 LOER CASE 7ata

SELECTION-SCREEN END OF LINE

----------------------------------------------------------------------

Batc5i)t7ata 0 si(e trasacti

DATA4 BDCDATA LIE BDCDATA OCCURS ITlt ltEADER LINE

essaes 0 ca(( trasacti

DATA4 MESSTAB LIE BDCMSGCOLL OCCURS ITlt ltEADER LINE

errr sessi )ee7 3 3 r 3X3amp

DATA4 E2GROUP2OPENED

essae tets

TABLES4 T1

copy SAP AG BC420 12-84

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 8588

----------------------------------------------------------------------

at se(ecti scree

----------------------------------------------------------------------

AT SELECTION-SCREEN

r) a7 ser st e 0i((e7 0r create sessi

IF SESSION = 3X3 AND

GROUP = SPACE OR USER = SPACE

MESSAGE E1MSamp

ENDIF

----------------------------------------------------------------------

)e 7ataset

----------------------------------------------------------------------

FORM OPEN2DATASET USING P2DATASET

OPEN DATASET P2DATASET IN TEXT MODE

IF S9-SUBRC

RITE4 TEXT-E S9-SUBRC

STOP

ENDIF

ENDFORM

----------------------------------------------------------------------

c(se 7ataset

----------------------------------------------------------------------

FORM CLOSE2DATASET USING P2DATASET

CLOSE DATASET P2DATASET

ENDFORM

----------------------------------------------------------------------

create atc5i)t sessi

t 0r ca(( trasacti siamp

----------------------------------------------------------------------

FORM OPEN2GROUP

IF SESSION = 3X3

SIP

RITE4 $amp 3Create r)3I1amp GROUP

SIP

)e atc5i)t r)

CALL FUNCTION 3BDC2OPEN2GROUP3

EXPORTING CLIENT = S9-MANDT

copy SAP AG BC420 12-85

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 8688

GROUP = GROUP

USER = USER

EEP = EEP

ltOLDDATE = ltOLDDATE

RITE4 amp 3BDC2OPEN2GROUP3I$amp

1$amp 3retrc7e43I+amp

S9-SUBRC

ENDIF

ENDFORM

----------------------------------------------------------------------

e7 atc5i)t sessi

ca(( trasacti si4 errr sessiamp

----------------------------------------------------------------------

FORM CLOSE2GROUP

IF SESSION = 3X3

c(se atc5i)t r)

CALL FUNCTION 3BDC2CLOSE2GROUP3

RITE4 amp 3BDC2CLOSE2GROUP3Iamp

1$amp 3retrc7e43I+amp

S9-SUBRC

ELSE

IF E2GROUP2OPENED = 3X3

CALL FUNCTION 3BDC2CLOSE2GROUP3

RITE4

RITE4 amp 3Fe5(era))e 6r7e eret3Iamp

ENDIF

ENDIF

ENDFORM

----------------------------------------------------------------------

Start e6 trasacti accr7i t )araeters

----------------------------------------------------------------------

FORM BDC2TRANSACTION USING TCODE

DATA4 L2MSTRINGamp

DATA4 L2SUBRC LIE S9-SUBRC

atc5 i)t sessi

IF SESSION = 3X3

CALL FUNCTION 3BDC2INSERT3

EXPORTING TCODE = TCODE

TABLES D9NPROTAB = BDCDATA

RITE4 3BDC2INSERT3Iamp

copy SAP AG BC420 12-86

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 8788

TCODE

3retrc7e43I+amp

S9-SUBRC

3RECORD43

S9-INDEX

ca(( trasacti si

ELSE

REFRESlt MESSTAB

CALL TRANSACTION TCODE USING BDCDATA

MODE CTUMODE

UPDATE CUPDATE

MESSAGES INTO MESSTAB

L2SUBRC = S9-SUBRC

RITE4 3CALL2TRANSACTION3

TCODE

3retrc7e43I+amp

L2SUBRC

3RECORD43

S9-INDEX

LOOP AT MESSTAB

SELECT SINGLE FROM T1 ltERE SPRSL = MESSTAB-MSGSPRA

AND ARBGB = MESSTAB-MSGID

AND MSGNR = MESSTAB-MSGNR

IF S9-SUBRC =

L2MSTRING = T1-TEXT

IF L2MSTRING CS 313

REPLACE 313 ITlt MESSTAB-MSGH1 INTO L2MSTRING

REPLACE 3$3 ITlt MESSTAB-MSGH$ INTO L2MSTRING

REPLACE 33 ITlt MESSTAB-MSGH INTO L2MSTRING

REPLACE 33 ITlt MESSTAB-MSGH INTO L2MSTRING

ELSE

REPLACE 33 ITlt MESSTAB-MSGH1 INTO L2MSTRING

REPLACE 33 ITlt MESSTAB-MSGH$ INTO L2MSTRING

REPLACE 33 ITlt MESSTAB-MSGH INTO L2MSTRING

REPLACE 33 ITlt MESSTAB-MSGH INTO L2MSTRING

ENDIF

CONDENSE L2MSTRING

RITE4 MESSTAB-MSGT9P L2MSTRING$+amp

ELSE

RITE4 MESSTAB

ENDIF

ENDLOOP

copy SAP AG BC420 12-87

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 8888

SIP

Eree 0e5(era))e

IF L2SUBRC AND E2GROUP SPACE

IF E2GROUP2OPENED = 3 3

CALL FUNCTION 3BDC2OPEN2GROUP3

EXPORTING CLIENT = S9-MANDT

GROUP = E2GROUP

USER = E2USER

EEP = E2EEP

ltOLDDATE = E2ltDATE

E2GROUP2OPENED = 3X3

ENDIF

CALL FUNCTION 3BDC2INSERT3

EXPORTING TCODE = TCODE

TABLES D9NPROTAB = BDCDATA

ENDIF

ENDIF

REFRESlt BDCDATA

ENDFORM

----------------------------------------------------------------------

Start e6 scree

----------------------------------------------------------------------

FORM BDC2D9NPRO USING PROGRAM D9NPRO

CLEAR BDCDATA

BDCDATA-PROGRAM = PROGRAM

BDCDATA-D9NPRO = D9NPRO

BDCDATA-D9NBEGIN = 3X3

APPEND BDCDATA

ENDFORM

----------------------------------------------------------------------

Isert 0ie(7

Page 74: BC420_46C - 012The Transaction Recorder

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 7488

034

983209 SAP AG 1999

reating Program as D b-ect

Comer ran=er ogtec

ampgtec ype

Sor eD =or ogtec

aa ran=er proram

Srcre name

9900

(+A1

Cane comer

ZBCA+G

ZB

ustomer transfer ob-ect

umber bet)een 7000 and 7777

b-ect t(pe

Assignment to R ob-ect

Short tet for D ob-ectShort description

Data transfer program

ame of generated program

Structure name

A structure Cstructure la(out )ith this name is created in

the AAP Dictionar(

For ampeease transfer oects $ere not organiDed y 5amp oects ut y a G numer (00089

OOOO) The numer range O0009OOOO is reserved for customers

To create a connection to the ne$ G 9- you must assign the program to a 5amp oect

2reate a short tet for the G oect This tet $i appear in the method seection ist

Specify the program to e incuded

Specify a name for the structure to e created in the AAP ictionary

Note $he generated program appears under program type +N and not under program type

-

copy SAP AG BC420 12-74

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 7588

032

983209 SAP AG 1999

Adantages

Automatic program registration in the DW in

Release 48

ou can use all the functions defined for

standard ob-ects

1ception$ The (reate ampile ith data

function

If you incuded the oect in the ampeease $orench it is automaticay avaiae in the ampeease

B $orench

A the $orench functions are avaiae for your oect ecept for Create files ith transfer ata

copy SAP AG BC420 12-75

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 7688

038

983209 SAP AG 1999

ou are no) able to$

The Transaction Recorder$ Unit Summar(

Use the recording function in the LSMW to create

a batch input session )ith the data from the

eternal s(stem

Use the TA Recorder to create (our o)n data

transfer program

Anal(e programs that )or+ )ith batch input or

call transaction

Integrate the TA Recorder programs into the

DW

copy SAP AG BC420 12-76

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 7788

ercise 1

nit $ -ecorder

$opic 2reating etors

$ransaction -ecorder ercise 1

bull 2reating detors $ith eterna numer assignment

bull etor numers M9980008 to M9980080

Address data for detors $ith eterna numer assignment is to

e transferred using program ampFI700

ro4ect F5

Supro4ect +5

-un +575

$as)s 85 95 8S25

9oad program -F+00

8 In the foo$ing eercises eisting data is to e changed Therefore these detors $ith

eterna numer assignment have to first e created

898 4nder suproect 79 create run 797G9 $ith the name Detors ith

eternal numers

copy SAP AG BC420 12-77

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 7888

891 2reate the foo$ing three tass The tass map the foo$ing process steps

convert data create + session and process + session

89198 In run 797G9 create the foo$ing tas

9 Tas AP9

9 Name 2onvert data 9 Tas type AP

9 Program type +S-

Seect the foo$ing +S- oect

+S- proect 2109

+S- suproect 7I9

+S- oect I997GT

89191 In run 797G9 create the foo$ing tas 9 Tas +5A9

9 Name 2reate I session

Tas type +5A

9 Program type INP

Seect program ampFI700 $ith the variant

I97G9

8919 In run 797G9 create the foo$ing tas

9 Tas S29

9 Name Process I session Tas type S2

9 Program type amp7P5

Seect program ampS2S4 $ith the variant

S497G9

Note that you have to correct the seuence of the tass 2onvert data

create + session and process + session

4se the uttons

89 Start the run

The detors $i e created $ith eterna numer assignments

89 2hec in transaction F0 that the detors M9980008 to M9980080 have een

created

copy SAP AG BC420 12-78

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 7988

ercise

nit $ransaction -ecorder

$opic -ecording function in the 9S8(

bull 2reate a recording using the +S-

bull ltenerate a atch input session

2hange the detor address data in the amp System

Name of the recording +

Name of the file +2055+F9

8 2reate the recording 7I3 using the +S- ampecord the transaction F01 (2hange

detor)

898 efore you create the recording first test the transaction onineQ

For the recording use detor M9980008 5n the initia screen of the F01

maintain the foo$ing fieds ony

etor etor M9980008

2ompany code 0008

Address data seect

Note $he data record must e saved hile recording

891 aintain the names and the descriptions for the foo$ing fieds

Name city street posta code and teephone numereete a other fieds in screen 880 from the recording (eg S5ampT+ +AN8

SPampAS)

4se the same technica names as sho$n in the tae eo$ (automatic fied

mapping)

copy SAP AG BC420 12-79

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 8088

1 2reate the suproect 7I9 and the ne$ oect TA3 in your proect 2109

aintain the oect attriutes and seect the item atch input recording Seect your

recording 7I3

2reate the source structure address

2reate the source fieds according to the tae eo$ 5r copy them from proect 2109S37N suproect 7I900 oect TA900

198 Fie setup The data from the egacy system are dispayed in the foo$ing tae

Fied name Fied type Fied ength escription

N5 2 8B etor numer

NA7 2 Name

STamp77T 2 Street

2ITC 2 2ityPace of residence

MIP 2 80 Posta code

T7+ 2 8B Teephone numer

191 aintain the fied mapping 4se the automatic fied mapping (via menu item

7tras)

19 Specify the fies 5ny maintain the fie name of the source fie

Name of the fie 21099IFI+7

2odepage 8800

19 Import the data and convert them ispay the data in each caseQ

19 2reate a atch input session

19B ampun the atch input session

copy SAP AG BC420 12-80

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 8188

ercise 3

nit $ransaction -ecorder

$opic -ecording ith the $ -ecorder

bull ltenerate a recording using the TA recorder

bull Test the recording

2hange the address data of detors in the amp system

Name recording $+

Name of the file +2055+F9

8 2reate the recording TA37I3 using the transaction recorder ampecord the

transaction F01 (change detor)

898 4se detor M9980008 for the recording 5n the F01 initia screen ony

maintain the foo$ing fieds

etor etor M9980008

2ompany 2ode 0008

Address data seect

Note $he data record must e saved hen recording

eete a fieds that do not eist in the source fie 21099IFI+7 from screen

880 in the recording (eg 6NA89S5ampT+ 6NA89+AN8 6ANNQ9SPampAS) Note o not deete fieds ampF01946ampS and ampF0190880

Save the recording no$

1 S$itch to the recordings overvie$

198 Process the recording $ith the processing mode A (dispay a)

191 Process the recording $ith the processing mode RN (no dispay)

19 If the recording has een tested and no error has occurred generate a I session

and run it using the I monitor If an error shoud occur generate the recordingagainQ

copy SAP AG BC420 12-81

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 8288

From the recording generate the program M21037I3 in your deveopment cass

2109 Seect the foo$ing

bull ampead fied contents from fie

bull 2reate test data in the fie 2103dei3test3tt

98 Save this program and eecute it ltenerate one I session each and process it

2arry out the same steps again using the ca transaction

The generated program shoud no$ e changed so that fie 21099IFI+7 can e

read and processed

98 2hange the defaut vaue of the fie name (parameter dataset) in 21099

IFI+7

91 2hange the structure definition eete the company code fied and the address

data checo from the structure

9 2hange the su9routine ca perform dc3fied for the company code (KampF019

46ampSK) so that the vaue 0008 is transferred

9 2hange the su9routine ca perform dc3fied for the address data checo

(KampF0190880K) so that the vaue G is transferred

9 Start the program again and read the data from the fie 21099IFI+7 $ith

detor data ltenerate a I session $ith it and run it

copy SAP AG BC420 12-82

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 8388

033 Include DR16INCLUDE BDCRECX1

SELECTION-SCREEN BEGIN OF LINE

PARAMETERS SESSION RADIOBUTTON GROUP CTU create sessi SELECTION-SCREEN COMMENT $amp TEXT-S FOR FIELD SESSION

se(ecti-scree )siti +

PARAMETERS CTU RADIOBUTTON GROUP CTU ca(( trasacti

SELECTION-SCREEN COMMENT $amp TEXT-S FOR FIELD CTU

SELECTION-SCREEN END OF LINE

SELECTION-SCREEN BEGIN OF LINE

SELECTION-SCREEN COMMENT $amp TEXT-S1 FOR FIELD GROUP

se(ecti-scree )siti $+

PARAMETERS GROUP1$amp r) ae 0 sessi

SELECTION-SCREEN COMMENT $amp TEXT-S+ FOR FIELD CTUMODE

se(ecti-scree )siti

PARAMETERS CTUMODE LIE CTU2PARAMS-DISMODE DEFAULT 3N3

A4 s56 a(( 78)rs

E4 s56 78)r errr (8

N4 7 t 7is)(a8 78)r

SELECTION-SCREEN END OF LINE

SELECTION-SCREEN BEGIN OF LINE

SELECTION-SCREEN COMMENT $amp TEXT-S$ FOR FIELD USER

se(ecti-scree )siti $+

PARAMETERS4 USER1$amp DEFAULT S9-UNAME ser 0r sessi i atc5

SELECTION-SCREEN COMMENT $amp TEXT-S FOR FIELD CUPDATE

se(ecti-scree )siti

PARAMETERS CUPDATE LIE CTU2PARAMS-UPDMODE DEFAULT 3L3

S4 s8c5rs(8

A4 as8c5rs(8

L4 (ca(

SELECTION-SCREEN END OF LINE

SELECTION-SCREEN BEGIN OF LINE

SELECTION-SCREEN COMMENT $amp TEXT-S FOR FIELD EEP

se(ecti-scree )siti $+

PARAMETERS4 EEP AS CltECBOX 3 3 = 7e(ete sessi i0 0iis5e7

3X3 = gtee) sessi i0 0iis5e7

SELECTION-SCREEN COMMENT $amp TEXT-S FOR FIELD E2GROUP

copy SAP AG BC420 12-83

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 8488

se(ecti-scree )siti

)araeters E2GROUP1$amp r) ae 0 errr-sessi

SELECTION-SCREEN END OF LINE

SELECTION-SCREEN BEGIN OF LINE

SELECTION-SCREEN COMMENT $amp TEXT-S FOR FIELD ltOLDDATE

se(ecti-scree )siti $+

PARAMETERS4 ltOLDDATE LIE S9-DATUM

SELECTION-SCREEN COMMENT +11amp TEXT-S$ FOR FIELD E2USER

se(ecti-scree )siti

PARAMETERS4 E2USER1$amp DEFAULT S9-UNAME ser 0r errr-sessi

SELECTION-SCREEN END OF LINE

SELECTION-SCREEN BEGIN OF LINE

SELECTION-SCREEN COMMENT +11amp TEXT-S FOR FIELD E2EEP

se(ecti-scree )siti

PARAMETERS4 E2EEP AS CltECBOX 3 3 = 7e(ete sessi i0 0iis5e7

3X3 = gtee) sessi i0 0iis5e7

SELECTION-SCREEN END OF LINE

SELECTION-SCREEN BEGIN OF LINE

SELECTION-SCREEN COMMENT +11amp TEXT-S FOR FIELD E2ltDATE

se(ecti-scree )siti

PARAMETERS4 E2ltDATE LIE S9-DATUM

SELECTION-SCREEN END OF LINE

SELECTION-SCREEN SIP

SELECTION-SCREEN BEGIN OF LINE

SELECTION-SCREEN COMMENT 1amp TEXT-S1 FOR FIELD NODATA

PARAMETERS4 NODATA DEFAULT 33 LOER CASE 7ata

SELECTION-SCREEN END OF LINE

----------------------------------------------------------------------

Batc5i)t7ata 0 si(e trasacti

DATA4 BDCDATA LIE BDCDATA OCCURS ITlt ltEADER LINE

essaes 0 ca(( trasacti

DATA4 MESSTAB LIE BDCMSGCOLL OCCURS ITlt ltEADER LINE

errr sessi )ee7 3 3 r 3X3amp

DATA4 E2GROUP2OPENED

essae tets

TABLES4 T1

copy SAP AG BC420 12-84

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 8588

----------------------------------------------------------------------

at se(ecti scree

----------------------------------------------------------------------

AT SELECTION-SCREEN

r) a7 ser st e 0i((e7 0r create sessi

IF SESSION = 3X3 AND

GROUP = SPACE OR USER = SPACE

MESSAGE E1MSamp

ENDIF

----------------------------------------------------------------------

)e 7ataset

----------------------------------------------------------------------

FORM OPEN2DATASET USING P2DATASET

OPEN DATASET P2DATASET IN TEXT MODE

IF S9-SUBRC

RITE4 TEXT-E S9-SUBRC

STOP

ENDIF

ENDFORM

----------------------------------------------------------------------

c(se 7ataset

----------------------------------------------------------------------

FORM CLOSE2DATASET USING P2DATASET

CLOSE DATASET P2DATASET

ENDFORM

----------------------------------------------------------------------

create atc5i)t sessi

t 0r ca(( trasacti siamp

----------------------------------------------------------------------

FORM OPEN2GROUP

IF SESSION = 3X3

SIP

RITE4 $amp 3Create r)3I1amp GROUP

SIP

)e atc5i)t r)

CALL FUNCTION 3BDC2OPEN2GROUP3

EXPORTING CLIENT = S9-MANDT

copy SAP AG BC420 12-85

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 8688

GROUP = GROUP

USER = USER

EEP = EEP

ltOLDDATE = ltOLDDATE

RITE4 amp 3BDC2OPEN2GROUP3I$amp

1$amp 3retrc7e43I+amp

S9-SUBRC

ENDIF

ENDFORM

----------------------------------------------------------------------

e7 atc5i)t sessi

ca(( trasacti si4 errr sessiamp

----------------------------------------------------------------------

FORM CLOSE2GROUP

IF SESSION = 3X3

c(se atc5i)t r)

CALL FUNCTION 3BDC2CLOSE2GROUP3

RITE4 amp 3BDC2CLOSE2GROUP3Iamp

1$amp 3retrc7e43I+amp

S9-SUBRC

ELSE

IF E2GROUP2OPENED = 3X3

CALL FUNCTION 3BDC2CLOSE2GROUP3

RITE4

RITE4 amp 3Fe5(era))e 6r7e eret3Iamp

ENDIF

ENDIF

ENDFORM

----------------------------------------------------------------------

Start e6 trasacti accr7i t )araeters

----------------------------------------------------------------------

FORM BDC2TRANSACTION USING TCODE

DATA4 L2MSTRINGamp

DATA4 L2SUBRC LIE S9-SUBRC

atc5 i)t sessi

IF SESSION = 3X3

CALL FUNCTION 3BDC2INSERT3

EXPORTING TCODE = TCODE

TABLES D9NPROTAB = BDCDATA

RITE4 3BDC2INSERT3Iamp

copy SAP AG BC420 12-86

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 8788

TCODE

3retrc7e43I+amp

S9-SUBRC

3RECORD43

S9-INDEX

ca(( trasacti si

ELSE

REFRESlt MESSTAB

CALL TRANSACTION TCODE USING BDCDATA

MODE CTUMODE

UPDATE CUPDATE

MESSAGES INTO MESSTAB

L2SUBRC = S9-SUBRC

RITE4 3CALL2TRANSACTION3

TCODE

3retrc7e43I+amp

L2SUBRC

3RECORD43

S9-INDEX

LOOP AT MESSTAB

SELECT SINGLE FROM T1 ltERE SPRSL = MESSTAB-MSGSPRA

AND ARBGB = MESSTAB-MSGID

AND MSGNR = MESSTAB-MSGNR

IF S9-SUBRC =

L2MSTRING = T1-TEXT

IF L2MSTRING CS 313

REPLACE 313 ITlt MESSTAB-MSGH1 INTO L2MSTRING

REPLACE 3$3 ITlt MESSTAB-MSGH$ INTO L2MSTRING

REPLACE 33 ITlt MESSTAB-MSGH INTO L2MSTRING

REPLACE 33 ITlt MESSTAB-MSGH INTO L2MSTRING

ELSE

REPLACE 33 ITlt MESSTAB-MSGH1 INTO L2MSTRING

REPLACE 33 ITlt MESSTAB-MSGH$ INTO L2MSTRING

REPLACE 33 ITlt MESSTAB-MSGH INTO L2MSTRING

REPLACE 33 ITlt MESSTAB-MSGH INTO L2MSTRING

ENDIF

CONDENSE L2MSTRING

RITE4 MESSTAB-MSGT9P L2MSTRING$+amp

ELSE

RITE4 MESSTAB

ENDIF

ENDLOOP

copy SAP AG BC420 12-87

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 8888

SIP

Eree 0e5(era))e

IF L2SUBRC AND E2GROUP SPACE

IF E2GROUP2OPENED = 3 3

CALL FUNCTION 3BDC2OPEN2GROUP3

EXPORTING CLIENT = S9-MANDT

GROUP = E2GROUP

USER = E2USER

EEP = E2EEP

ltOLDDATE = E2ltDATE

E2GROUP2OPENED = 3X3

ENDIF

CALL FUNCTION 3BDC2INSERT3

EXPORTING TCODE = TCODE

TABLES D9NPROTAB = BDCDATA

ENDIF

ENDIF

REFRESlt BDCDATA

ENDFORM

----------------------------------------------------------------------

Start e6 scree

----------------------------------------------------------------------

FORM BDC2D9NPRO USING PROGRAM D9NPRO

CLEAR BDCDATA

BDCDATA-PROGRAM = PROGRAM

BDCDATA-D9NPRO = D9NPRO

BDCDATA-D9NBEGIN = 3X3

APPEND BDCDATA

ENDFORM

----------------------------------------------------------------------

Isert 0ie(7

Page 75: BC420_46C - 012The Transaction Recorder

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 7588

032

983209 SAP AG 1999

Adantages

Automatic program registration in the DW in

Release 48

ou can use all the functions defined for

standard ob-ects

1ception$ The (reate ampile ith data

function

If you incuded the oect in the ampeease $orench it is automaticay avaiae in the ampeease

B $orench

A the $orench functions are avaiae for your oect ecept for Create files ith transfer ata

copy SAP AG BC420 12-75

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 7688

038

983209 SAP AG 1999

ou are no) able to$

The Transaction Recorder$ Unit Summar(

Use the recording function in the LSMW to create

a batch input session )ith the data from the

eternal s(stem

Use the TA Recorder to create (our o)n data

transfer program

Anal(e programs that )or+ )ith batch input or

call transaction

Integrate the TA Recorder programs into the

DW

copy SAP AG BC420 12-76

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 7788

ercise 1

nit $ -ecorder

$opic 2reating etors

$ransaction -ecorder ercise 1

bull 2reating detors $ith eterna numer assignment

bull etor numers M9980008 to M9980080

Address data for detors $ith eterna numer assignment is to

e transferred using program ampFI700

ro4ect F5

Supro4ect +5

-un +575

$as)s 85 95 8S25

9oad program -F+00

8 In the foo$ing eercises eisting data is to e changed Therefore these detors $ith

eterna numer assignment have to first e created

898 4nder suproect 79 create run 797G9 $ith the name Detors ith

eternal numers

copy SAP AG BC420 12-77

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 7888

891 2reate the foo$ing three tass The tass map the foo$ing process steps

convert data create + session and process + session

89198 In run 797G9 create the foo$ing tas

9 Tas AP9

9 Name 2onvert data 9 Tas type AP

9 Program type +S-

Seect the foo$ing +S- oect

+S- proect 2109

+S- suproect 7I9

+S- oect I997GT

89191 In run 797G9 create the foo$ing tas 9 Tas +5A9

9 Name 2reate I session

Tas type +5A

9 Program type INP

Seect program ampFI700 $ith the variant

I97G9

8919 In run 797G9 create the foo$ing tas

9 Tas S29

9 Name Process I session Tas type S2

9 Program type amp7P5

Seect program ampS2S4 $ith the variant

S497G9

Note that you have to correct the seuence of the tass 2onvert data

create + session and process + session

4se the uttons

89 Start the run

The detors $i e created $ith eterna numer assignments

89 2hec in transaction F0 that the detors M9980008 to M9980080 have een

created

copy SAP AG BC420 12-78

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 7988

ercise

nit $ransaction -ecorder

$opic -ecording function in the 9S8(

bull 2reate a recording using the +S-

bull ltenerate a atch input session

2hange the detor address data in the amp System

Name of the recording +

Name of the file +2055+F9

8 2reate the recording 7I3 using the +S- ampecord the transaction F01 (2hange

detor)

898 efore you create the recording first test the transaction onineQ

For the recording use detor M9980008 5n the initia screen of the F01

maintain the foo$ing fieds ony

etor etor M9980008

2ompany code 0008

Address data seect

Note $he data record must e saved hile recording

891 aintain the names and the descriptions for the foo$ing fieds

Name city street posta code and teephone numereete a other fieds in screen 880 from the recording (eg S5ampT+ +AN8

SPampAS)

4se the same technica names as sho$n in the tae eo$ (automatic fied

mapping)

copy SAP AG BC420 12-79

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 8088

1 2reate the suproect 7I9 and the ne$ oect TA3 in your proect 2109

aintain the oect attriutes and seect the item atch input recording Seect your

recording 7I3

2reate the source structure address

2reate the source fieds according to the tae eo$ 5r copy them from proect 2109S37N suproect 7I900 oect TA900

198 Fie setup The data from the egacy system are dispayed in the foo$ing tae

Fied name Fied type Fied ength escription

N5 2 8B etor numer

NA7 2 Name

STamp77T 2 Street

2ITC 2 2ityPace of residence

MIP 2 80 Posta code

T7+ 2 8B Teephone numer

191 aintain the fied mapping 4se the automatic fied mapping (via menu item

7tras)

19 Specify the fies 5ny maintain the fie name of the source fie

Name of the fie 21099IFI+7

2odepage 8800

19 Import the data and convert them ispay the data in each caseQ

19 2reate a atch input session

19B ampun the atch input session

copy SAP AG BC420 12-80

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 8188

ercise 3

nit $ransaction -ecorder

$opic -ecording ith the $ -ecorder

bull ltenerate a recording using the TA recorder

bull Test the recording

2hange the address data of detors in the amp system

Name recording $+

Name of the file +2055+F9

8 2reate the recording TA37I3 using the transaction recorder ampecord the

transaction F01 (change detor)

898 4se detor M9980008 for the recording 5n the F01 initia screen ony

maintain the foo$ing fieds

etor etor M9980008

2ompany 2ode 0008

Address data seect

Note $he data record must e saved hen recording

eete a fieds that do not eist in the source fie 21099IFI+7 from screen

880 in the recording (eg 6NA89S5ampT+ 6NA89+AN8 6ANNQ9SPampAS) Note o not deete fieds ampF01946ampS and ampF0190880

Save the recording no$

1 S$itch to the recordings overvie$

198 Process the recording $ith the processing mode A (dispay a)

191 Process the recording $ith the processing mode RN (no dispay)

19 If the recording has een tested and no error has occurred generate a I session

and run it using the I monitor If an error shoud occur generate the recordingagainQ

copy SAP AG BC420 12-81

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 8288

From the recording generate the program M21037I3 in your deveopment cass

2109 Seect the foo$ing

bull ampead fied contents from fie

bull 2reate test data in the fie 2103dei3test3tt

98 Save this program and eecute it ltenerate one I session each and process it

2arry out the same steps again using the ca transaction

The generated program shoud no$ e changed so that fie 21099IFI+7 can e

read and processed

98 2hange the defaut vaue of the fie name (parameter dataset) in 21099

IFI+7

91 2hange the structure definition eete the company code fied and the address

data checo from the structure

9 2hange the su9routine ca perform dc3fied for the company code (KampF019

46ampSK) so that the vaue 0008 is transferred

9 2hange the su9routine ca perform dc3fied for the address data checo

(KampF0190880K) so that the vaue G is transferred

9 Start the program again and read the data from the fie 21099IFI+7 $ith

detor data ltenerate a I session $ith it and run it

copy SAP AG BC420 12-82

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 8388

033 Include DR16INCLUDE BDCRECX1

SELECTION-SCREEN BEGIN OF LINE

PARAMETERS SESSION RADIOBUTTON GROUP CTU create sessi SELECTION-SCREEN COMMENT $amp TEXT-S FOR FIELD SESSION

se(ecti-scree )siti +

PARAMETERS CTU RADIOBUTTON GROUP CTU ca(( trasacti

SELECTION-SCREEN COMMENT $amp TEXT-S FOR FIELD CTU

SELECTION-SCREEN END OF LINE

SELECTION-SCREEN BEGIN OF LINE

SELECTION-SCREEN COMMENT $amp TEXT-S1 FOR FIELD GROUP

se(ecti-scree )siti $+

PARAMETERS GROUP1$amp r) ae 0 sessi

SELECTION-SCREEN COMMENT $amp TEXT-S+ FOR FIELD CTUMODE

se(ecti-scree )siti

PARAMETERS CTUMODE LIE CTU2PARAMS-DISMODE DEFAULT 3N3

A4 s56 a(( 78)rs

E4 s56 78)r errr (8

N4 7 t 7is)(a8 78)r

SELECTION-SCREEN END OF LINE

SELECTION-SCREEN BEGIN OF LINE

SELECTION-SCREEN COMMENT $amp TEXT-S$ FOR FIELD USER

se(ecti-scree )siti $+

PARAMETERS4 USER1$amp DEFAULT S9-UNAME ser 0r sessi i atc5

SELECTION-SCREEN COMMENT $amp TEXT-S FOR FIELD CUPDATE

se(ecti-scree )siti

PARAMETERS CUPDATE LIE CTU2PARAMS-UPDMODE DEFAULT 3L3

S4 s8c5rs(8

A4 as8c5rs(8

L4 (ca(

SELECTION-SCREEN END OF LINE

SELECTION-SCREEN BEGIN OF LINE

SELECTION-SCREEN COMMENT $amp TEXT-S FOR FIELD EEP

se(ecti-scree )siti $+

PARAMETERS4 EEP AS CltECBOX 3 3 = 7e(ete sessi i0 0iis5e7

3X3 = gtee) sessi i0 0iis5e7

SELECTION-SCREEN COMMENT $amp TEXT-S FOR FIELD E2GROUP

copy SAP AG BC420 12-83

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 8488

se(ecti-scree )siti

)araeters E2GROUP1$amp r) ae 0 errr-sessi

SELECTION-SCREEN END OF LINE

SELECTION-SCREEN BEGIN OF LINE

SELECTION-SCREEN COMMENT $amp TEXT-S FOR FIELD ltOLDDATE

se(ecti-scree )siti $+

PARAMETERS4 ltOLDDATE LIE S9-DATUM

SELECTION-SCREEN COMMENT +11amp TEXT-S$ FOR FIELD E2USER

se(ecti-scree )siti

PARAMETERS4 E2USER1$amp DEFAULT S9-UNAME ser 0r errr-sessi

SELECTION-SCREEN END OF LINE

SELECTION-SCREEN BEGIN OF LINE

SELECTION-SCREEN COMMENT +11amp TEXT-S FOR FIELD E2EEP

se(ecti-scree )siti

PARAMETERS4 E2EEP AS CltECBOX 3 3 = 7e(ete sessi i0 0iis5e7

3X3 = gtee) sessi i0 0iis5e7

SELECTION-SCREEN END OF LINE

SELECTION-SCREEN BEGIN OF LINE

SELECTION-SCREEN COMMENT +11amp TEXT-S FOR FIELD E2ltDATE

se(ecti-scree )siti

PARAMETERS4 E2ltDATE LIE S9-DATUM

SELECTION-SCREEN END OF LINE

SELECTION-SCREEN SIP

SELECTION-SCREEN BEGIN OF LINE

SELECTION-SCREEN COMMENT 1amp TEXT-S1 FOR FIELD NODATA

PARAMETERS4 NODATA DEFAULT 33 LOER CASE 7ata

SELECTION-SCREEN END OF LINE

----------------------------------------------------------------------

Batc5i)t7ata 0 si(e trasacti

DATA4 BDCDATA LIE BDCDATA OCCURS ITlt ltEADER LINE

essaes 0 ca(( trasacti

DATA4 MESSTAB LIE BDCMSGCOLL OCCURS ITlt ltEADER LINE

errr sessi )ee7 3 3 r 3X3amp

DATA4 E2GROUP2OPENED

essae tets

TABLES4 T1

copy SAP AG BC420 12-84

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 8588

----------------------------------------------------------------------

at se(ecti scree

----------------------------------------------------------------------

AT SELECTION-SCREEN

r) a7 ser st e 0i((e7 0r create sessi

IF SESSION = 3X3 AND

GROUP = SPACE OR USER = SPACE

MESSAGE E1MSamp

ENDIF

----------------------------------------------------------------------

)e 7ataset

----------------------------------------------------------------------

FORM OPEN2DATASET USING P2DATASET

OPEN DATASET P2DATASET IN TEXT MODE

IF S9-SUBRC

RITE4 TEXT-E S9-SUBRC

STOP

ENDIF

ENDFORM

----------------------------------------------------------------------

c(se 7ataset

----------------------------------------------------------------------

FORM CLOSE2DATASET USING P2DATASET

CLOSE DATASET P2DATASET

ENDFORM

----------------------------------------------------------------------

create atc5i)t sessi

t 0r ca(( trasacti siamp

----------------------------------------------------------------------

FORM OPEN2GROUP

IF SESSION = 3X3

SIP

RITE4 $amp 3Create r)3I1amp GROUP

SIP

)e atc5i)t r)

CALL FUNCTION 3BDC2OPEN2GROUP3

EXPORTING CLIENT = S9-MANDT

copy SAP AG BC420 12-85

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 8688

GROUP = GROUP

USER = USER

EEP = EEP

ltOLDDATE = ltOLDDATE

RITE4 amp 3BDC2OPEN2GROUP3I$amp

1$amp 3retrc7e43I+amp

S9-SUBRC

ENDIF

ENDFORM

----------------------------------------------------------------------

e7 atc5i)t sessi

ca(( trasacti si4 errr sessiamp

----------------------------------------------------------------------

FORM CLOSE2GROUP

IF SESSION = 3X3

c(se atc5i)t r)

CALL FUNCTION 3BDC2CLOSE2GROUP3

RITE4 amp 3BDC2CLOSE2GROUP3Iamp

1$amp 3retrc7e43I+amp

S9-SUBRC

ELSE

IF E2GROUP2OPENED = 3X3

CALL FUNCTION 3BDC2CLOSE2GROUP3

RITE4

RITE4 amp 3Fe5(era))e 6r7e eret3Iamp

ENDIF

ENDIF

ENDFORM

----------------------------------------------------------------------

Start e6 trasacti accr7i t )araeters

----------------------------------------------------------------------

FORM BDC2TRANSACTION USING TCODE

DATA4 L2MSTRINGamp

DATA4 L2SUBRC LIE S9-SUBRC

atc5 i)t sessi

IF SESSION = 3X3

CALL FUNCTION 3BDC2INSERT3

EXPORTING TCODE = TCODE

TABLES D9NPROTAB = BDCDATA

RITE4 3BDC2INSERT3Iamp

copy SAP AG BC420 12-86

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 8788

TCODE

3retrc7e43I+amp

S9-SUBRC

3RECORD43

S9-INDEX

ca(( trasacti si

ELSE

REFRESlt MESSTAB

CALL TRANSACTION TCODE USING BDCDATA

MODE CTUMODE

UPDATE CUPDATE

MESSAGES INTO MESSTAB

L2SUBRC = S9-SUBRC

RITE4 3CALL2TRANSACTION3

TCODE

3retrc7e43I+amp

L2SUBRC

3RECORD43

S9-INDEX

LOOP AT MESSTAB

SELECT SINGLE FROM T1 ltERE SPRSL = MESSTAB-MSGSPRA

AND ARBGB = MESSTAB-MSGID

AND MSGNR = MESSTAB-MSGNR

IF S9-SUBRC =

L2MSTRING = T1-TEXT

IF L2MSTRING CS 313

REPLACE 313 ITlt MESSTAB-MSGH1 INTO L2MSTRING

REPLACE 3$3 ITlt MESSTAB-MSGH$ INTO L2MSTRING

REPLACE 33 ITlt MESSTAB-MSGH INTO L2MSTRING

REPLACE 33 ITlt MESSTAB-MSGH INTO L2MSTRING

ELSE

REPLACE 33 ITlt MESSTAB-MSGH1 INTO L2MSTRING

REPLACE 33 ITlt MESSTAB-MSGH$ INTO L2MSTRING

REPLACE 33 ITlt MESSTAB-MSGH INTO L2MSTRING

REPLACE 33 ITlt MESSTAB-MSGH INTO L2MSTRING

ENDIF

CONDENSE L2MSTRING

RITE4 MESSTAB-MSGT9P L2MSTRING$+amp

ELSE

RITE4 MESSTAB

ENDIF

ENDLOOP

copy SAP AG BC420 12-87

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 8888

SIP

Eree 0e5(era))e

IF L2SUBRC AND E2GROUP SPACE

IF E2GROUP2OPENED = 3 3

CALL FUNCTION 3BDC2OPEN2GROUP3

EXPORTING CLIENT = S9-MANDT

GROUP = E2GROUP

USER = E2USER

EEP = E2EEP

ltOLDDATE = E2ltDATE

E2GROUP2OPENED = 3X3

ENDIF

CALL FUNCTION 3BDC2INSERT3

EXPORTING TCODE = TCODE

TABLES D9NPROTAB = BDCDATA

ENDIF

ENDIF

REFRESlt BDCDATA

ENDFORM

----------------------------------------------------------------------

Start e6 scree

----------------------------------------------------------------------

FORM BDC2D9NPRO USING PROGRAM D9NPRO

CLEAR BDCDATA

BDCDATA-PROGRAM = PROGRAM

BDCDATA-D9NPRO = D9NPRO

BDCDATA-D9NBEGIN = 3X3

APPEND BDCDATA

ENDFORM

----------------------------------------------------------------------

Isert 0ie(7

Page 76: BC420_46C - 012The Transaction Recorder

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 7688

038

983209 SAP AG 1999

ou are no) able to$

The Transaction Recorder$ Unit Summar(

Use the recording function in the LSMW to create

a batch input session )ith the data from the

eternal s(stem

Use the TA Recorder to create (our o)n data

transfer program

Anal(e programs that )or+ )ith batch input or

call transaction

Integrate the TA Recorder programs into the

DW

copy SAP AG BC420 12-76

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 7788

ercise 1

nit $ -ecorder

$opic 2reating etors

$ransaction -ecorder ercise 1

bull 2reating detors $ith eterna numer assignment

bull etor numers M9980008 to M9980080

Address data for detors $ith eterna numer assignment is to

e transferred using program ampFI700

ro4ect F5

Supro4ect +5

-un +575

$as)s 85 95 8S25

9oad program -F+00

8 In the foo$ing eercises eisting data is to e changed Therefore these detors $ith

eterna numer assignment have to first e created

898 4nder suproect 79 create run 797G9 $ith the name Detors ith

eternal numers

copy SAP AG BC420 12-77

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 7888

891 2reate the foo$ing three tass The tass map the foo$ing process steps

convert data create + session and process + session

89198 In run 797G9 create the foo$ing tas

9 Tas AP9

9 Name 2onvert data 9 Tas type AP

9 Program type +S-

Seect the foo$ing +S- oect

+S- proect 2109

+S- suproect 7I9

+S- oect I997GT

89191 In run 797G9 create the foo$ing tas 9 Tas +5A9

9 Name 2reate I session

Tas type +5A

9 Program type INP

Seect program ampFI700 $ith the variant

I97G9

8919 In run 797G9 create the foo$ing tas

9 Tas S29

9 Name Process I session Tas type S2

9 Program type amp7P5

Seect program ampS2S4 $ith the variant

S497G9

Note that you have to correct the seuence of the tass 2onvert data

create + session and process + session

4se the uttons

89 Start the run

The detors $i e created $ith eterna numer assignments

89 2hec in transaction F0 that the detors M9980008 to M9980080 have een

created

copy SAP AG BC420 12-78

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 7988

ercise

nit $ransaction -ecorder

$opic -ecording function in the 9S8(

bull 2reate a recording using the +S-

bull ltenerate a atch input session

2hange the detor address data in the amp System

Name of the recording +

Name of the file +2055+F9

8 2reate the recording 7I3 using the +S- ampecord the transaction F01 (2hange

detor)

898 efore you create the recording first test the transaction onineQ

For the recording use detor M9980008 5n the initia screen of the F01

maintain the foo$ing fieds ony

etor etor M9980008

2ompany code 0008

Address data seect

Note $he data record must e saved hile recording

891 aintain the names and the descriptions for the foo$ing fieds

Name city street posta code and teephone numereete a other fieds in screen 880 from the recording (eg S5ampT+ +AN8

SPampAS)

4se the same technica names as sho$n in the tae eo$ (automatic fied

mapping)

copy SAP AG BC420 12-79

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 8088

1 2reate the suproect 7I9 and the ne$ oect TA3 in your proect 2109

aintain the oect attriutes and seect the item atch input recording Seect your

recording 7I3

2reate the source structure address

2reate the source fieds according to the tae eo$ 5r copy them from proect 2109S37N suproect 7I900 oect TA900

198 Fie setup The data from the egacy system are dispayed in the foo$ing tae

Fied name Fied type Fied ength escription

N5 2 8B etor numer

NA7 2 Name

STamp77T 2 Street

2ITC 2 2ityPace of residence

MIP 2 80 Posta code

T7+ 2 8B Teephone numer

191 aintain the fied mapping 4se the automatic fied mapping (via menu item

7tras)

19 Specify the fies 5ny maintain the fie name of the source fie

Name of the fie 21099IFI+7

2odepage 8800

19 Import the data and convert them ispay the data in each caseQ

19 2reate a atch input session

19B ampun the atch input session

copy SAP AG BC420 12-80

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 8188

ercise 3

nit $ransaction -ecorder

$opic -ecording ith the $ -ecorder

bull ltenerate a recording using the TA recorder

bull Test the recording

2hange the address data of detors in the amp system

Name recording $+

Name of the file +2055+F9

8 2reate the recording TA37I3 using the transaction recorder ampecord the

transaction F01 (change detor)

898 4se detor M9980008 for the recording 5n the F01 initia screen ony

maintain the foo$ing fieds

etor etor M9980008

2ompany 2ode 0008

Address data seect

Note $he data record must e saved hen recording

eete a fieds that do not eist in the source fie 21099IFI+7 from screen

880 in the recording (eg 6NA89S5ampT+ 6NA89+AN8 6ANNQ9SPampAS) Note o not deete fieds ampF01946ampS and ampF0190880

Save the recording no$

1 S$itch to the recordings overvie$

198 Process the recording $ith the processing mode A (dispay a)

191 Process the recording $ith the processing mode RN (no dispay)

19 If the recording has een tested and no error has occurred generate a I session

and run it using the I monitor If an error shoud occur generate the recordingagainQ

copy SAP AG BC420 12-81

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 8288

From the recording generate the program M21037I3 in your deveopment cass

2109 Seect the foo$ing

bull ampead fied contents from fie

bull 2reate test data in the fie 2103dei3test3tt

98 Save this program and eecute it ltenerate one I session each and process it

2arry out the same steps again using the ca transaction

The generated program shoud no$ e changed so that fie 21099IFI+7 can e

read and processed

98 2hange the defaut vaue of the fie name (parameter dataset) in 21099

IFI+7

91 2hange the structure definition eete the company code fied and the address

data checo from the structure

9 2hange the su9routine ca perform dc3fied for the company code (KampF019

46ampSK) so that the vaue 0008 is transferred

9 2hange the su9routine ca perform dc3fied for the address data checo

(KampF0190880K) so that the vaue G is transferred

9 Start the program again and read the data from the fie 21099IFI+7 $ith

detor data ltenerate a I session $ith it and run it

copy SAP AG BC420 12-82

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 8388

033 Include DR16INCLUDE BDCRECX1

SELECTION-SCREEN BEGIN OF LINE

PARAMETERS SESSION RADIOBUTTON GROUP CTU create sessi SELECTION-SCREEN COMMENT $amp TEXT-S FOR FIELD SESSION

se(ecti-scree )siti +

PARAMETERS CTU RADIOBUTTON GROUP CTU ca(( trasacti

SELECTION-SCREEN COMMENT $amp TEXT-S FOR FIELD CTU

SELECTION-SCREEN END OF LINE

SELECTION-SCREEN BEGIN OF LINE

SELECTION-SCREEN COMMENT $amp TEXT-S1 FOR FIELD GROUP

se(ecti-scree )siti $+

PARAMETERS GROUP1$amp r) ae 0 sessi

SELECTION-SCREEN COMMENT $amp TEXT-S+ FOR FIELD CTUMODE

se(ecti-scree )siti

PARAMETERS CTUMODE LIE CTU2PARAMS-DISMODE DEFAULT 3N3

A4 s56 a(( 78)rs

E4 s56 78)r errr (8

N4 7 t 7is)(a8 78)r

SELECTION-SCREEN END OF LINE

SELECTION-SCREEN BEGIN OF LINE

SELECTION-SCREEN COMMENT $amp TEXT-S$ FOR FIELD USER

se(ecti-scree )siti $+

PARAMETERS4 USER1$amp DEFAULT S9-UNAME ser 0r sessi i atc5

SELECTION-SCREEN COMMENT $amp TEXT-S FOR FIELD CUPDATE

se(ecti-scree )siti

PARAMETERS CUPDATE LIE CTU2PARAMS-UPDMODE DEFAULT 3L3

S4 s8c5rs(8

A4 as8c5rs(8

L4 (ca(

SELECTION-SCREEN END OF LINE

SELECTION-SCREEN BEGIN OF LINE

SELECTION-SCREEN COMMENT $amp TEXT-S FOR FIELD EEP

se(ecti-scree )siti $+

PARAMETERS4 EEP AS CltECBOX 3 3 = 7e(ete sessi i0 0iis5e7

3X3 = gtee) sessi i0 0iis5e7

SELECTION-SCREEN COMMENT $amp TEXT-S FOR FIELD E2GROUP

copy SAP AG BC420 12-83

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 8488

se(ecti-scree )siti

)araeters E2GROUP1$amp r) ae 0 errr-sessi

SELECTION-SCREEN END OF LINE

SELECTION-SCREEN BEGIN OF LINE

SELECTION-SCREEN COMMENT $amp TEXT-S FOR FIELD ltOLDDATE

se(ecti-scree )siti $+

PARAMETERS4 ltOLDDATE LIE S9-DATUM

SELECTION-SCREEN COMMENT +11amp TEXT-S$ FOR FIELD E2USER

se(ecti-scree )siti

PARAMETERS4 E2USER1$amp DEFAULT S9-UNAME ser 0r errr-sessi

SELECTION-SCREEN END OF LINE

SELECTION-SCREEN BEGIN OF LINE

SELECTION-SCREEN COMMENT +11amp TEXT-S FOR FIELD E2EEP

se(ecti-scree )siti

PARAMETERS4 E2EEP AS CltECBOX 3 3 = 7e(ete sessi i0 0iis5e7

3X3 = gtee) sessi i0 0iis5e7

SELECTION-SCREEN END OF LINE

SELECTION-SCREEN BEGIN OF LINE

SELECTION-SCREEN COMMENT +11amp TEXT-S FOR FIELD E2ltDATE

se(ecti-scree )siti

PARAMETERS4 E2ltDATE LIE S9-DATUM

SELECTION-SCREEN END OF LINE

SELECTION-SCREEN SIP

SELECTION-SCREEN BEGIN OF LINE

SELECTION-SCREEN COMMENT 1amp TEXT-S1 FOR FIELD NODATA

PARAMETERS4 NODATA DEFAULT 33 LOER CASE 7ata

SELECTION-SCREEN END OF LINE

----------------------------------------------------------------------

Batc5i)t7ata 0 si(e trasacti

DATA4 BDCDATA LIE BDCDATA OCCURS ITlt ltEADER LINE

essaes 0 ca(( trasacti

DATA4 MESSTAB LIE BDCMSGCOLL OCCURS ITlt ltEADER LINE

errr sessi )ee7 3 3 r 3X3amp

DATA4 E2GROUP2OPENED

essae tets

TABLES4 T1

copy SAP AG BC420 12-84

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 8588

----------------------------------------------------------------------

at se(ecti scree

----------------------------------------------------------------------

AT SELECTION-SCREEN

r) a7 ser st e 0i((e7 0r create sessi

IF SESSION = 3X3 AND

GROUP = SPACE OR USER = SPACE

MESSAGE E1MSamp

ENDIF

----------------------------------------------------------------------

)e 7ataset

----------------------------------------------------------------------

FORM OPEN2DATASET USING P2DATASET

OPEN DATASET P2DATASET IN TEXT MODE

IF S9-SUBRC

RITE4 TEXT-E S9-SUBRC

STOP

ENDIF

ENDFORM

----------------------------------------------------------------------

c(se 7ataset

----------------------------------------------------------------------

FORM CLOSE2DATASET USING P2DATASET

CLOSE DATASET P2DATASET

ENDFORM

----------------------------------------------------------------------

create atc5i)t sessi

t 0r ca(( trasacti siamp

----------------------------------------------------------------------

FORM OPEN2GROUP

IF SESSION = 3X3

SIP

RITE4 $amp 3Create r)3I1amp GROUP

SIP

)e atc5i)t r)

CALL FUNCTION 3BDC2OPEN2GROUP3

EXPORTING CLIENT = S9-MANDT

copy SAP AG BC420 12-85

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 8688

GROUP = GROUP

USER = USER

EEP = EEP

ltOLDDATE = ltOLDDATE

RITE4 amp 3BDC2OPEN2GROUP3I$amp

1$amp 3retrc7e43I+amp

S9-SUBRC

ENDIF

ENDFORM

----------------------------------------------------------------------

e7 atc5i)t sessi

ca(( trasacti si4 errr sessiamp

----------------------------------------------------------------------

FORM CLOSE2GROUP

IF SESSION = 3X3

c(se atc5i)t r)

CALL FUNCTION 3BDC2CLOSE2GROUP3

RITE4 amp 3BDC2CLOSE2GROUP3Iamp

1$amp 3retrc7e43I+amp

S9-SUBRC

ELSE

IF E2GROUP2OPENED = 3X3

CALL FUNCTION 3BDC2CLOSE2GROUP3

RITE4

RITE4 amp 3Fe5(era))e 6r7e eret3Iamp

ENDIF

ENDIF

ENDFORM

----------------------------------------------------------------------

Start e6 trasacti accr7i t )araeters

----------------------------------------------------------------------

FORM BDC2TRANSACTION USING TCODE

DATA4 L2MSTRINGamp

DATA4 L2SUBRC LIE S9-SUBRC

atc5 i)t sessi

IF SESSION = 3X3

CALL FUNCTION 3BDC2INSERT3

EXPORTING TCODE = TCODE

TABLES D9NPROTAB = BDCDATA

RITE4 3BDC2INSERT3Iamp

copy SAP AG BC420 12-86

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 8788

TCODE

3retrc7e43I+amp

S9-SUBRC

3RECORD43

S9-INDEX

ca(( trasacti si

ELSE

REFRESlt MESSTAB

CALL TRANSACTION TCODE USING BDCDATA

MODE CTUMODE

UPDATE CUPDATE

MESSAGES INTO MESSTAB

L2SUBRC = S9-SUBRC

RITE4 3CALL2TRANSACTION3

TCODE

3retrc7e43I+amp

L2SUBRC

3RECORD43

S9-INDEX

LOOP AT MESSTAB

SELECT SINGLE FROM T1 ltERE SPRSL = MESSTAB-MSGSPRA

AND ARBGB = MESSTAB-MSGID

AND MSGNR = MESSTAB-MSGNR

IF S9-SUBRC =

L2MSTRING = T1-TEXT

IF L2MSTRING CS 313

REPLACE 313 ITlt MESSTAB-MSGH1 INTO L2MSTRING

REPLACE 3$3 ITlt MESSTAB-MSGH$ INTO L2MSTRING

REPLACE 33 ITlt MESSTAB-MSGH INTO L2MSTRING

REPLACE 33 ITlt MESSTAB-MSGH INTO L2MSTRING

ELSE

REPLACE 33 ITlt MESSTAB-MSGH1 INTO L2MSTRING

REPLACE 33 ITlt MESSTAB-MSGH$ INTO L2MSTRING

REPLACE 33 ITlt MESSTAB-MSGH INTO L2MSTRING

REPLACE 33 ITlt MESSTAB-MSGH INTO L2MSTRING

ENDIF

CONDENSE L2MSTRING

RITE4 MESSTAB-MSGT9P L2MSTRING$+amp

ELSE

RITE4 MESSTAB

ENDIF

ENDLOOP

copy SAP AG BC420 12-87

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 8888

SIP

Eree 0e5(era))e

IF L2SUBRC AND E2GROUP SPACE

IF E2GROUP2OPENED = 3 3

CALL FUNCTION 3BDC2OPEN2GROUP3

EXPORTING CLIENT = S9-MANDT

GROUP = E2GROUP

USER = E2USER

EEP = E2EEP

ltOLDDATE = E2ltDATE

E2GROUP2OPENED = 3X3

ENDIF

CALL FUNCTION 3BDC2INSERT3

EXPORTING TCODE = TCODE

TABLES D9NPROTAB = BDCDATA

ENDIF

ENDIF

REFRESlt BDCDATA

ENDFORM

----------------------------------------------------------------------

Start e6 scree

----------------------------------------------------------------------

FORM BDC2D9NPRO USING PROGRAM D9NPRO

CLEAR BDCDATA

BDCDATA-PROGRAM = PROGRAM

BDCDATA-D9NPRO = D9NPRO

BDCDATA-D9NBEGIN = 3X3

APPEND BDCDATA

ENDFORM

----------------------------------------------------------------------

Isert 0ie(7

Page 77: BC420_46C - 012The Transaction Recorder

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 7788

ercise 1

nit $ -ecorder

$opic 2reating etors

$ransaction -ecorder ercise 1

bull 2reating detors $ith eterna numer assignment

bull etor numers M9980008 to M9980080

Address data for detors $ith eterna numer assignment is to

e transferred using program ampFI700

ro4ect F5

Supro4ect +5

-un +575

$as)s 85 95 8S25

9oad program -F+00

8 In the foo$ing eercises eisting data is to e changed Therefore these detors $ith

eterna numer assignment have to first e created

898 4nder suproect 79 create run 797G9 $ith the name Detors ith

eternal numers

copy SAP AG BC420 12-77

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 7888

891 2reate the foo$ing three tass The tass map the foo$ing process steps

convert data create + session and process + session

89198 In run 797G9 create the foo$ing tas

9 Tas AP9

9 Name 2onvert data 9 Tas type AP

9 Program type +S-

Seect the foo$ing +S- oect

+S- proect 2109

+S- suproect 7I9

+S- oect I997GT

89191 In run 797G9 create the foo$ing tas 9 Tas +5A9

9 Name 2reate I session

Tas type +5A

9 Program type INP

Seect program ampFI700 $ith the variant

I97G9

8919 In run 797G9 create the foo$ing tas

9 Tas S29

9 Name Process I session Tas type S2

9 Program type amp7P5

Seect program ampS2S4 $ith the variant

S497G9

Note that you have to correct the seuence of the tass 2onvert data

create + session and process + session

4se the uttons

89 Start the run

The detors $i e created $ith eterna numer assignments

89 2hec in transaction F0 that the detors M9980008 to M9980080 have een

created

copy SAP AG BC420 12-78

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 7988

ercise

nit $ransaction -ecorder

$opic -ecording function in the 9S8(

bull 2reate a recording using the +S-

bull ltenerate a atch input session

2hange the detor address data in the amp System

Name of the recording +

Name of the file +2055+F9

8 2reate the recording 7I3 using the +S- ampecord the transaction F01 (2hange

detor)

898 efore you create the recording first test the transaction onineQ

For the recording use detor M9980008 5n the initia screen of the F01

maintain the foo$ing fieds ony

etor etor M9980008

2ompany code 0008

Address data seect

Note $he data record must e saved hile recording

891 aintain the names and the descriptions for the foo$ing fieds

Name city street posta code and teephone numereete a other fieds in screen 880 from the recording (eg S5ampT+ +AN8

SPampAS)

4se the same technica names as sho$n in the tae eo$ (automatic fied

mapping)

copy SAP AG BC420 12-79

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 8088

1 2reate the suproect 7I9 and the ne$ oect TA3 in your proect 2109

aintain the oect attriutes and seect the item atch input recording Seect your

recording 7I3

2reate the source structure address

2reate the source fieds according to the tae eo$ 5r copy them from proect 2109S37N suproect 7I900 oect TA900

198 Fie setup The data from the egacy system are dispayed in the foo$ing tae

Fied name Fied type Fied ength escription

N5 2 8B etor numer

NA7 2 Name

STamp77T 2 Street

2ITC 2 2ityPace of residence

MIP 2 80 Posta code

T7+ 2 8B Teephone numer

191 aintain the fied mapping 4se the automatic fied mapping (via menu item

7tras)

19 Specify the fies 5ny maintain the fie name of the source fie

Name of the fie 21099IFI+7

2odepage 8800

19 Import the data and convert them ispay the data in each caseQ

19 2reate a atch input session

19B ampun the atch input session

copy SAP AG BC420 12-80

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 8188

ercise 3

nit $ransaction -ecorder

$opic -ecording ith the $ -ecorder

bull ltenerate a recording using the TA recorder

bull Test the recording

2hange the address data of detors in the amp system

Name recording $+

Name of the file +2055+F9

8 2reate the recording TA37I3 using the transaction recorder ampecord the

transaction F01 (change detor)

898 4se detor M9980008 for the recording 5n the F01 initia screen ony

maintain the foo$ing fieds

etor etor M9980008

2ompany 2ode 0008

Address data seect

Note $he data record must e saved hen recording

eete a fieds that do not eist in the source fie 21099IFI+7 from screen

880 in the recording (eg 6NA89S5ampT+ 6NA89+AN8 6ANNQ9SPampAS) Note o not deete fieds ampF01946ampS and ampF0190880

Save the recording no$

1 S$itch to the recordings overvie$

198 Process the recording $ith the processing mode A (dispay a)

191 Process the recording $ith the processing mode RN (no dispay)

19 If the recording has een tested and no error has occurred generate a I session

and run it using the I monitor If an error shoud occur generate the recordingagainQ

copy SAP AG BC420 12-81

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 8288

From the recording generate the program M21037I3 in your deveopment cass

2109 Seect the foo$ing

bull ampead fied contents from fie

bull 2reate test data in the fie 2103dei3test3tt

98 Save this program and eecute it ltenerate one I session each and process it

2arry out the same steps again using the ca transaction

The generated program shoud no$ e changed so that fie 21099IFI+7 can e

read and processed

98 2hange the defaut vaue of the fie name (parameter dataset) in 21099

IFI+7

91 2hange the structure definition eete the company code fied and the address

data checo from the structure

9 2hange the su9routine ca perform dc3fied for the company code (KampF019

46ampSK) so that the vaue 0008 is transferred

9 2hange the su9routine ca perform dc3fied for the address data checo

(KampF0190880K) so that the vaue G is transferred

9 Start the program again and read the data from the fie 21099IFI+7 $ith

detor data ltenerate a I session $ith it and run it

copy SAP AG BC420 12-82

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 8388

033 Include DR16INCLUDE BDCRECX1

SELECTION-SCREEN BEGIN OF LINE

PARAMETERS SESSION RADIOBUTTON GROUP CTU create sessi SELECTION-SCREEN COMMENT $amp TEXT-S FOR FIELD SESSION

se(ecti-scree )siti +

PARAMETERS CTU RADIOBUTTON GROUP CTU ca(( trasacti

SELECTION-SCREEN COMMENT $amp TEXT-S FOR FIELD CTU

SELECTION-SCREEN END OF LINE

SELECTION-SCREEN BEGIN OF LINE

SELECTION-SCREEN COMMENT $amp TEXT-S1 FOR FIELD GROUP

se(ecti-scree )siti $+

PARAMETERS GROUP1$amp r) ae 0 sessi

SELECTION-SCREEN COMMENT $amp TEXT-S+ FOR FIELD CTUMODE

se(ecti-scree )siti

PARAMETERS CTUMODE LIE CTU2PARAMS-DISMODE DEFAULT 3N3

A4 s56 a(( 78)rs

E4 s56 78)r errr (8

N4 7 t 7is)(a8 78)r

SELECTION-SCREEN END OF LINE

SELECTION-SCREEN BEGIN OF LINE

SELECTION-SCREEN COMMENT $amp TEXT-S$ FOR FIELD USER

se(ecti-scree )siti $+

PARAMETERS4 USER1$amp DEFAULT S9-UNAME ser 0r sessi i atc5

SELECTION-SCREEN COMMENT $amp TEXT-S FOR FIELD CUPDATE

se(ecti-scree )siti

PARAMETERS CUPDATE LIE CTU2PARAMS-UPDMODE DEFAULT 3L3

S4 s8c5rs(8

A4 as8c5rs(8

L4 (ca(

SELECTION-SCREEN END OF LINE

SELECTION-SCREEN BEGIN OF LINE

SELECTION-SCREEN COMMENT $amp TEXT-S FOR FIELD EEP

se(ecti-scree )siti $+

PARAMETERS4 EEP AS CltECBOX 3 3 = 7e(ete sessi i0 0iis5e7

3X3 = gtee) sessi i0 0iis5e7

SELECTION-SCREEN COMMENT $amp TEXT-S FOR FIELD E2GROUP

copy SAP AG BC420 12-83

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 8488

se(ecti-scree )siti

)araeters E2GROUP1$amp r) ae 0 errr-sessi

SELECTION-SCREEN END OF LINE

SELECTION-SCREEN BEGIN OF LINE

SELECTION-SCREEN COMMENT $amp TEXT-S FOR FIELD ltOLDDATE

se(ecti-scree )siti $+

PARAMETERS4 ltOLDDATE LIE S9-DATUM

SELECTION-SCREEN COMMENT +11amp TEXT-S$ FOR FIELD E2USER

se(ecti-scree )siti

PARAMETERS4 E2USER1$amp DEFAULT S9-UNAME ser 0r errr-sessi

SELECTION-SCREEN END OF LINE

SELECTION-SCREEN BEGIN OF LINE

SELECTION-SCREEN COMMENT +11amp TEXT-S FOR FIELD E2EEP

se(ecti-scree )siti

PARAMETERS4 E2EEP AS CltECBOX 3 3 = 7e(ete sessi i0 0iis5e7

3X3 = gtee) sessi i0 0iis5e7

SELECTION-SCREEN END OF LINE

SELECTION-SCREEN BEGIN OF LINE

SELECTION-SCREEN COMMENT +11amp TEXT-S FOR FIELD E2ltDATE

se(ecti-scree )siti

PARAMETERS4 E2ltDATE LIE S9-DATUM

SELECTION-SCREEN END OF LINE

SELECTION-SCREEN SIP

SELECTION-SCREEN BEGIN OF LINE

SELECTION-SCREEN COMMENT 1amp TEXT-S1 FOR FIELD NODATA

PARAMETERS4 NODATA DEFAULT 33 LOER CASE 7ata

SELECTION-SCREEN END OF LINE

----------------------------------------------------------------------

Batc5i)t7ata 0 si(e trasacti

DATA4 BDCDATA LIE BDCDATA OCCURS ITlt ltEADER LINE

essaes 0 ca(( trasacti

DATA4 MESSTAB LIE BDCMSGCOLL OCCURS ITlt ltEADER LINE

errr sessi )ee7 3 3 r 3X3amp

DATA4 E2GROUP2OPENED

essae tets

TABLES4 T1

copy SAP AG BC420 12-84

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 8588

----------------------------------------------------------------------

at se(ecti scree

----------------------------------------------------------------------

AT SELECTION-SCREEN

r) a7 ser st e 0i((e7 0r create sessi

IF SESSION = 3X3 AND

GROUP = SPACE OR USER = SPACE

MESSAGE E1MSamp

ENDIF

----------------------------------------------------------------------

)e 7ataset

----------------------------------------------------------------------

FORM OPEN2DATASET USING P2DATASET

OPEN DATASET P2DATASET IN TEXT MODE

IF S9-SUBRC

RITE4 TEXT-E S9-SUBRC

STOP

ENDIF

ENDFORM

----------------------------------------------------------------------

c(se 7ataset

----------------------------------------------------------------------

FORM CLOSE2DATASET USING P2DATASET

CLOSE DATASET P2DATASET

ENDFORM

----------------------------------------------------------------------

create atc5i)t sessi

t 0r ca(( trasacti siamp

----------------------------------------------------------------------

FORM OPEN2GROUP

IF SESSION = 3X3

SIP

RITE4 $amp 3Create r)3I1amp GROUP

SIP

)e atc5i)t r)

CALL FUNCTION 3BDC2OPEN2GROUP3

EXPORTING CLIENT = S9-MANDT

copy SAP AG BC420 12-85

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 8688

GROUP = GROUP

USER = USER

EEP = EEP

ltOLDDATE = ltOLDDATE

RITE4 amp 3BDC2OPEN2GROUP3I$amp

1$amp 3retrc7e43I+amp

S9-SUBRC

ENDIF

ENDFORM

----------------------------------------------------------------------

e7 atc5i)t sessi

ca(( trasacti si4 errr sessiamp

----------------------------------------------------------------------

FORM CLOSE2GROUP

IF SESSION = 3X3

c(se atc5i)t r)

CALL FUNCTION 3BDC2CLOSE2GROUP3

RITE4 amp 3BDC2CLOSE2GROUP3Iamp

1$amp 3retrc7e43I+amp

S9-SUBRC

ELSE

IF E2GROUP2OPENED = 3X3

CALL FUNCTION 3BDC2CLOSE2GROUP3

RITE4

RITE4 amp 3Fe5(era))e 6r7e eret3Iamp

ENDIF

ENDIF

ENDFORM

----------------------------------------------------------------------

Start e6 trasacti accr7i t )araeters

----------------------------------------------------------------------

FORM BDC2TRANSACTION USING TCODE

DATA4 L2MSTRINGamp

DATA4 L2SUBRC LIE S9-SUBRC

atc5 i)t sessi

IF SESSION = 3X3

CALL FUNCTION 3BDC2INSERT3

EXPORTING TCODE = TCODE

TABLES D9NPROTAB = BDCDATA

RITE4 3BDC2INSERT3Iamp

copy SAP AG BC420 12-86

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 8788

TCODE

3retrc7e43I+amp

S9-SUBRC

3RECORD43

S9-INDEX

ca(( trasacti si

ELSE

REFRESlt MESSTAB

CALL TRANSACTION TCODE USING BDCDATA

MODE CTUMODE

UPDATE CUPDATE

MESSAGES INTO MESSTAB

L2SUBRC = S9-SUBRC

RITE4 3CALL2TRANSACTION3

TCODE

3retrc7e43I+amp

L2SUBRC

3RECORD43

S9-INDEX

LOOP AT MESSTAB

SELECT SINGLE FROM T1 ltERE SPRSL = MESSTAB-MSGSPRA

AND ARBGB = MESSTAB-MSGID

AND MSGNR = MESSTAB-MSGNR

IF S9-SUBRC =

L2MSTRING = T1-TEXT

IF L2MSTRING CS 313

REPLACE 313 ITlt MESSTAB-MSGH1 INTO L2MSTRING

REPLACE 3$3 ITlt MESSTAB-MSGH$ INTO L2MSTRING

REPLACE 33 ITlt MESSTAB-MSGH INTO L2MSTRING

REPLACE 33 ITlt MESSTAB-MSGH INTO L2MSTRING

ELSE

REPLACE 33 ITlt MESSTAB-MSGH1 INTO L2MSTRING

REPLACE 33 ITlt MESSTAB-MSGH$ INTO L2MSTRING

REPLACE 33 ITlt MESSTAB-MSGH INTO L2MSTRING

REPLACE 33 ITlt MESSTAB-MSGH INTO L2MSTRING

ENDIF

CONDENSE L2MSTRING

RITE4 MESSTAB-MSGT9P L2MSTRING$+amp

ELSE

RITE4 MESSTAB

ENDIF

ENDLOOP

copy SAP AG BC420 12-87

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 8888

SIP

Eree 0e5(era))e

IF L2SUBRC AND E2GROUP SPACE

IF E2GROUP2OPENED = 3 3

CALL FUNCTION 3BDC2OPEN2GROUP3

EXPORTING CLIENT = S9-MANDT

GROUP = E2GROUP

USER = E2USER

EEP = E2EEP

ltOLDDATE = E2ltDATE

E2GROUP2OPENED = 3X3

ENDIF

CALL FUNCTION 3BDC2INSERT3

EXPORTING TCODE = TCODE

TABLES D9NPROTAB = BDCDATA

ENDIF

ENDIF

REFRESlt BDCDATA

ENDFORM

----------------------------------------------------------------------

Start e6 scree

----------------------------------------------------------------------

FORM BDC2D9NPRO USING PROGRAM D9NPRO

CLEAR BDCDATA

BDCDATA-PROGRAM = PROGRAM

BDCDATA-D9NPRO = D9NPRO

BDCDATA-D9NBEGIN = 3X3

APPEND BDCDATA

ENDFORM

----------------------------------------------------------------------

Isert 0ie(7

Page 78: BC420_46C - 012The Transaction Recorder

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 7888

891 2reate the foo$ing three tass The tass map the foo$ing process steps

convert data create + session and process + session

89198 In run 797G9 create the foo$ing tas

9 Tas AP9

9 Name 2onvert data 9 Tas type AP

9 Program type +S-

Seect the foo$ing +S- oect

+S- proect 2109

+S- suproect 7I9

+S- oect I997GT

89191 In run 797G9 create the foo$ing tas 9 Tas +5A9

9 Name 2reate I session

Tas type +5A

9 Program type INP

Seect program ampFI700 $ith the variant

I97G9

8919 In run 797G9 create the foo$ing tas

9 Tas S29

9 Name Process I session Tas type S2

9 Program type amp7P5

Seect program ampS2S4 $ith the variant

S497G9

Note that you have to correct the seuence of the tass 2onvert data

create + session and process + session

4se the uttons

89 Start the run

The detors $i e created $ith eterna numer assignments

89 2hec in transaction F0 that the detors M9980008 to M9980080 have een

created

copy SAP AG BC420 12-78

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 7988

ercise

nit $ransaction -ecorder

$opic -ecording function in the 9S8(

bull 2reate a recording using the +S-

bull ltenerate a atch input session

2hange the detor address data in the amp System

Name of the recording +

Name of the file +2055+F9

8 2reate the recording 7I3 using the +S- ampecord the transaction F01 (2hange

detor)

898 efore you create the recording first test the transaction onineQ

For the recording use detor M9980008 5n the initia screen of the F01

maintain the foo$ing fieds ony

etor etor M9980008

2ompany code 0008

Address data seect

Note $he data record must e saved hile recording

891 aintain the names and the descriptions for the foo$ing fieds

Name city street posta code and teephone numereete a other fieds in screen 880 from the recording (eg S5ampT+ +AN8

SPampAS)

4se the same technica names as sho$n in the tae eo$ (automatic fied

mapping)

copy SAP AG BC420 12-79

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 8088

1 2reate the suproect 7I9 and the ne$ oect TA3 in your proect 2109

aintain the oect attriutes and seect the item atch input recording Seect your

recording 7I3

2reate the source structure address

2reate the source fieds according to the tae eo$ 5r copy them from proect 2109S37N suproect 7I900 oect TA900

198 Fie setup The data from the egacy system are dispayed in the foo$ing tae

Fied name Fied type Fied ength escription

N5 2 8B etor numer

NA7 2 Name

STamp77T 2 Street

2ITC 2 2ityPace of residence

MIP 2 80 Posta code

T7+ 2 8B Teephone numer

191 aintain the fied mapping 4se the automatic fied mapping (via menu item

7tras)

19 Specify the fies 5ny maintain the fie name of the source fie

Name of the fie 21099IFI+7

2odepage 8800

19 Import the data and convert them ispay the data in each caseQ

19 2reate a atch input session

19B ampun the atch input session

copy SAP AG BC420 12-80

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 8188

ercise 3

nit $ransaction -ecorder

$opic -ecording ith the $ -ecorder

bull ltenerate a recording using the TA recorder

bull Test the recording

2hange the address data of detors in the amp system

Name recording $+

Name of the file +2055+F9

8 2reate the recording TA37I3 using the transaction recorder ampecord the

transaction F01 (change detor)

898 4se detor M9980008 for the recording 5n the F01 initia screen ony

maintain the foo$ing fieds

etor etor M9980008

2ompany 2ode 0008

Address data seect

Note $he data record must e saved hen recording

eete a fieds that do not eist in the source fie 21099IFI+7 from screen

880 in the recording (eg 6NA89S5ampT+ 6NA89+AN8 6ANNQ9SPampAS) Note o not deete fieds ampF01946ampS and ampF0190880

Save the recording no$

1 S$itch to the recordings overvie$

198 Process the recording $ith the processing mode A (dispay a)

191 Process the recording $ith the processing mode RN (no dispay)

19 If the recording has een tested and no error has occurred generate a I session

and run it using the I monitor If an error shoud occur generate the recordingagainQ

copy SAP AG BC420 12-81

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 8288

From the recording generate the program M21037I3 in your deveopment cass

2109 Seect the foo$ing

bull ampead fied contents from fie

bull 2reate test data in the fie 2103dei3test3tt

98 Save this program and eecute it ltenerate one I session each and process it

2arry out the same steps again using the ca transaction

The generated program shoud no$ e changed so that fie 21099IFI+7 can e

read and processed

98 2hange the defaut vaue of the fie name (parameter dataset) in 21099

IFI+7

91 2hange the structure definition eete the company code fied and the address

data checo from the structure

9 2hange the su9routine ca perform dc3fied for the company code (KampF019

46ampSK) so that the vaue 0008 is transferred

9 2hange the su9routine ca perform dc3fied for the address data checo

(KampF0190880K) so that the vaue G is transferred

9 Start the program again and read the data from the fie 21099IFI+7 $ith

detor data ltenerate a I session $ith it and run it

copy SAP AG BC420 12-82

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 8388

033 Include DR16INCLUDE BDCRECX1

SELECTION-SCREEN BEGIN OF LINE

PARAMETERS SESSION RADIOBUTTON GROUP CTU create sessi SELECTION-SCREEN COMMENT $amp TEXT-S FOR FIELD SESSION

se(ecti-scree )siti +

PARAMETERS CTU RADIOBUTTON GROUP CTU ca(( trasacti

SELECTION-SCREEN COMMENT $amp TEXT-S FOR FIELD CTU

SELECTION-SCREEN END OF LINE

SELECTION-SCREEN BEGIN OF LINE

SELECTION-SCREEN COMMENT $amp TEXT-S1 FOR FIELD GROUP

se(ecti-scree )siti $+

PARAMETERS GROUP1$amp r) ae 0 sessi

SELECTION-SCREEN COMMENT $amp TEXT-S+ FOR FIELD CTUMODE

se(ecti-scree )siti

PARAMETERS CTUMODE LIE CTU2PARAMS-DISMODE DEFAULT 3N3

A4 s56 a(( 78)rs

E4 s56 78)r errr (8

N4 7 t 7is)(a8 78)r

SELECTION-SCREEN END OF LINE

SELECTION-SCREEN BEGIN OF LINE

SELECTION-SCREEN COMMENT $amp TEXT-S$ FOR FIELD USER

se(ecti-scree )siti $+

PARAMETERS4 USER1$amp DEFAULT S9-UNAME ser 0r sessi i atc5

SELECTION-SCREEN COMMENT $amp TEXT-S FOR FIELD CUPDATE

se(ecti-scree )siti

PARAMETERS CUPDATE LIE CTU2PARAMS-UPDMODE DEFAULT 3L3

S4 s8c5rs(8

A4 as8c5rs(8

L4 (ca(

SELECTION-SCREEN END OF LINE

SELECTION-SCREEN BEGIN OF LINE

SELECTION-SCREEN COMMENT $amp TEXT-S FOR FIELD EEP

se(ecti-scree )siti $+

PARAMETERS4 EEP AS CltECBOX 3 3 = 7e(ete sessi i0 0iis5e7

3X3 = gtee) sessi i0 0iis5e7

SELECTION-SCREEN COMMENT $amp TEXT-S FOR FIELD E2GROUP

copy SAP AG BC420 12-83

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 8488

se(ecti-scree )siti

)araeters E2GROUP1$amp r) ae 0 errr-sessi

SELECTION-SCREEN END OF LINE

SELECTION-SCREEN BEGIN OF LINE

SELECTION-SCREEN COMMENT $amp TEXT-S FOR FIELD ltOLDDATE

se(ecti-scree )siti $+

PARAMETERS4 ltOLDDATE LIE S9-DATUM

SELECTION-SCREEN COMMENT +11amp TEXT-S$ FOR FIELD E2USER

se(ecti-scree )siti

PARAMETERS4 E2USER1$amp DEFAULT S9-UNAME ser 0r errr-sessi

SELECTION-SCREEN END OF LINE

SELECTION-SCREEN BEGIN OF LINE

SELECTION-SCREEN COMMENT +11amp TEXT-S FOR FIELD E2EEP

se(ecti-scree )siti

PARAMETERS4 E2EEP AS CltECBOX 3 3 = 7e(ete sessi i0 0iis5e7

3X3 = gtee) sessi i0 0iis5e7

SELECTION-SCREEN END OF LINE

SELECTION-SCREEN BEGIN OF LINE

SELECTION-SCREEN COMMENT +11amp TEXT-S FOR FIELD E2ltDATE

se(ecti-scree )siti

PARAMETERS4 E2ltDATE LIE S9-DATUM

SELECTION-SCREEN END OF LINE

SELECTION-SCREEN SIP

SELECTION-SCREEN BEGIN OF LINE

SELECTION-SCREEN COMMENT 1amp TEXT-S1 FOR FIELD NODATA

PARAMETERS4 NODATA DEFAULT 33 LOER CASE 7ata

SELECTION-SCREEN END OF LINE

----------------------------------------------------------------------

Batc5i)t7ata 0 si(e trasacti

DATA4 BDCDATA LIE BDCDATA OCCURS ITlt ltEADER LINE

essaes 0 ca(( trasacti

DATA4 MESSTAB LIE BDCMSGCOLL OCCURS ITlt ltEADER LINE

errr sessi )ee7 3 3 r 3X3amp

DATA4 E2GROUP2OPENED

essae tets

TABLES4 T1

copy SAP AG BC420 12-84

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 8588

----------------------------------------------------------------------

at se(ecti scree

----------------------------------------------------------------------

AT SELECTION-SCREEN

r) a7 ser st e 0i((e7 0r create sessi

IF SESSION = 3X3 AND

GROUP = SPACE OR USER = SPACE

MESSAGE E1MSamp

ENDIF

----------------------------------------------------------------------

)e 7ataset

----------------------------------------------------------------------

FORM OPEN2DATASET USING P2DATASET

OPEN DATASET P2DATASET IN TEXT MODE

IF S9-SUBRC

RITE4 TEXT-E S9-SUBRC

STOP

ENDIF

ENDFORM

----------------------------------------------------------------------

c(se 7ataset

----------------------------------------------------------------------

FORM CLOSE2DATASET USING P2DATASET

CLOSE DATASET P2DATASET

ENDFORM

----------------------------------------------------------------------

create atc5i)t sessi

t 0r ca(( trasacti siamp

----------------------------------------------------------------------

FORM OPEN2GROUP

IF SESSION = 3X3

SIP

RITE4 $amp 3Create r)3I1amp GROUP

SIP

)e atc5i)t r)

CALL FUNCTION 3BDC2OPEN2GROUP3

EXPORTING CLIENT = S9-MANDT

copy SAP AG BC420 12-85

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 8688

GROUP = GROUP

USER = USER

EEP = EEP

ltOLDDATE = ltOLDDATE

RITE4 amp 3BDC2OPEN2GROUP3I$amp

1$amp 3retrc7e43I+amp

S9-SUBRC

ENDIF

ENDFORM

----------------------------------------------------------------------

e7 atc5i)t sessi

ca(( trasacti si4 errr sessiamp

----------------------------------------------------------------------

FORM CLOSE2GROUP

IF SESSION = 3X3

c(se atc5i)t r)

CALL FUNCTION 3BDC2CLOSE2GROUP3

RITE4 amp 3BDC2CLOSE2GROUP3Iamp

1$amp 3retrc7e43I+amp

S9-SUBRC

ELSE

IF E2GROUP2OPENED = 3X3

CALL FUNCTION 3BDC2CLOSE2GROUP3

RITE4

RITE4 amp 3Fe5(era))e 6r7e eret3Iamp

ENDIF

ENDIF

ENDFORM

----------------------------------------------------------------------

Start e6 trasacti accr7i t )araeters

----------------------------------------------------------------------

FORM BDC2TRANSACTION USING TCODE

DATA4 L2MSTRINGamp

DATA4 L2SUBRC LIE S9-SUBRC

atc5 i)t sessi

IF SESSION = 3X3

CALL FUNCTION 3BDC2INSERT3

EXPORTING TCODE = TCODE

TABLES D9NPROTAB = BDCDATA

RITE4 3BDC2INSERT3Iamp

copy SAP AG BC420 12-86

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 8788

TCODE

3retrc7e43I+amp

S9-SUBRC

3RECORD43

S9-INDEX

ca(( trasacti si

ELSE

REFRESlt MESSTAB

CALL TRANSACTION TCODE USING BDCDATA

MODE CTUMODE

UPDATE CUPDATE

MESSAGES INTO MESSTAB

L2SUBRC = S9-SUBRC

RITE4 3CALL2TRANSACTION3

TCODE

3retrc7e43I+amp

L2SUBRC

3RECORD43

S9-INDEX

LOOP AT MESSTAB

SELECT SINGLE FROM T1 ltERE SPRSL = MESSTAB-MSGSPRA

AND ARBGB = MESSTAB-MSGID

AND MSGNR = MESSTAB-MSGNR

IF S9-SUBRC =

L2MSTRING = T1-TEXT

IF L2MSTRING CS 313

REPLACE 313 ITlt MESSTAB-MSGH1 INTO L2MSTRING

REPLACE 3$3 ITlt MESSTAB-MSGH$ INTO L2MSTRING

REPLACE 33 ITlt MESSTAB-MSGH INTO L2MSTRING

REPLACE 33 ITlt MESSTAB-MSGH INTO L2MSTRING

ELSE

REPLACE 33 ITlt MESSTAB-MSGH1 INTO L2MSTRING

REPLACE 33 ITlt MESSTAB-MSGH$ INTO L2MSTRING

REPLACE 33 ITlt MESSTAB-MSGH INTO L2MSTRING

REPLACE 33 ITlt MESSTAB-MSGH INTO L2MSTRING

ENDIF

CONDENSE L2MSTRING

RITE4 MESSTAB-MSGT9P L2MSTRING$+amp

ELSE

RITE4 MESSTAB

ENDIF

ENDLOOP

copy SAP AG BC420 12-87

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 8888

SIP

Eree 0e5(era))e

IF L2SUBRC AND E2GROUP SPACE

IF E2GROUP2OPENED = 3 3

CALL FUNCTION 3BDC2OPEN2GROUP3

EXPORTING CLIENT = S9-MANDT

GROUP = E2GROUP

USER = E2USER

EEP = E2EEP

ltOLDDATE = E2ltDATE

E2GROUP2OPENED = 3X3

ENDIF

CALL FUNCTION 3BDC2INSERT3

EXPORTING TCODE = TCODE

TABLES D9NPROTAB = BDCDATA

ENDIF

ENDIF

REFRESlt BDCDATA

ENDFORM

----------------------------------------------------------------------

Start e6 scree

----------------------------------------------------------------------

FORM BDC2D9NPRO USING PROGRAM D9NPRO

CLEAR BDCDATA

BDCDATA-PROGRAM = PROGRAM

BDCDATA-D9NPRO = D9NPRO

BDCDATA-D9NBEGIN = 3X3

APPEND BDCDATA

ENDFORM

----------------------------------------------------------------------

Isert 0ie(7

Page 79: BC420_46C - 012The Transaction Recorder

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 7988

ercise

nit $ransaction -ecorder

$opic -ecording function in the 9S8(

bull 2reate a recording using the +S-

bull ltenerate a atch input session

2hange the detor address data in the amp System

Name of the recording +

Name of the file +2055+F9

8 2reate the recording 7I3 using the +S- ampecord the transaction F01 (2hange

detor)

898 efore you create the recording first test the transaction onineQ

For the recording use detor M9980008 5n the initia screen of the F01

maintain the foo$ing fieds ony

etor etor M9980008

2ompany code 0008

Address data seect

Note $he data record must e saved hile recording

891 aintain the names and the descriptions for the foo$ing fieds

Name city street posta code and teephone numereete a other fieds in screen 880 from the recording (eg S5ampT+ +AN8

SPampAS)

4se the same technica names as sho$n in the tae eo$ (automatic fied

mapping)

copy SAP AG BC420 12-79

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 8088

1 2reate the suproect 7I9 and the ne$ oect TA3 in your proect 2109

aintain the oect attriutes and seect the item atch input recording Seect your

recording 7I3

2reate the source structure address

2reate the source fieds according to the tae eo$ 5r copy them from proect 2109S37N suproect 7I900 oect TA900

198 Fie setup The data from the egacy system are dispayed in the foo$ing tae

Fied name Fied type Fied ength escription

N5 2 8B etor numer

NA7 2 Name

STamp77T 2 Street

2ITC 2 2ityPace of residence

MIP 2 80 Posta code

T7+ 2 8B Teephone numer

191 aintain the fied mapping 4se the automatic fied mapping (via menu item

7tras)

19 Specify the fies 5ny maintain the fie name of the source fie

Name of the fie 21099IFI+7

2odepage 8800

19 Import the data and convert them ispay the data in each caseQ

19 2reate a atch input session

19B ampun the atch input session

copy SAP AG BC420 12-80

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 8188

ercise 3

nit $ransaction -ecorder

$opic -ecording ith the $ -ecorder

bull ltenerate a recording using the TA recorder

bull Test the recording

2hange the address data of detors in the amp system

Name recording $+

Name of the file +2055+F9

8 2reate the recording TA37I3 using the transaction recorder ampecord the

transaction F01 (change detor)

898 4se detor M9980008 for the recording 5n the F01 initia screen ony

maintain the foo$ing fieds

etor etor M9980008

2ompany 2ode 0008

Address data seect

Note $he data record must e saved hen recording

eete a fieds that do not eist in the source fie 21099IFI+7 from screen

880 in the recording (eg 6NA89S5ampT+ 6NA89+AN8 6ANNQ9SPampAS) Note o not deete fieds ampF01946ampS and ampF0190880

Save the recording no$

1 S$itch to the recordings overvie$

198 Process the recording $ith the processing mode A (dispay a)

191 Process the recording $ith the processing mode RN (no dispay)

19 If the recording has een tested and no error has occurred generate a I session

and run it using the I monitor If an error shoud occur generate the recordingagainQ

copy SAP AG BC420 12-81

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 8288

From the recording generate the program M21037I3 in your deveopment cass

2109 Seect the foo$ing

bull ampead fied contents from fie

bull 2reate test data in the fie 2103dei3test3tt

98 Save this program and eecute it ltenerate one I session each and process it

2arry out the same steps again using the ca transaction

The generated program shoud no$ e changed so that fie 21099IFI+7 can e

read and processed

98 2hange the defaut vaue of the fie name (parameter dataset) in 21099

IFI+7

91 2hange the structure definition eete the company code fied and the address

data checo from the structure

9 2hange the su9routine ca perform dc3fied for the company code (KampF019

46ampSK) so that the vaue 0008 is transferred

9 2hange the su9routine ca perform dc3fied for the address data checo

(KampF0190880K) so that the vaue G is transferred

9 Start the program again and read the data from the fie 21099IFI+7 $ith

detor data ltenerate a I session $ith it and run it

copy SAP AG BC420 12-82

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 8388

033 Include DR16INCLUDE BDCRECX1

SELECTION-SCREEN BEGIN OF LINE

PARAMETERS SESSION RADIOBUTTON GROUP CTU create sessi SELECTION-SCREEN COMMENT $amp TEXT-S FOR FIELD SESSION

se(ecti-scree )siti +

PARAMETERS CTU RADIOBUTTON GROUP CTU ca(( trasacti

SELECTION-SCREEN COMMENT $amp TEXT-S FOR FIELD CTU

SELECTION-SCREEN END OF LINE

SELECTION-SCREEN BEGIN OF LINE

SELECTION-SCREEN COMMENT $amp TEXT-S1 FOR FIELD GROUP

se(ecti-scree )siti $+

PARAMETERS GROUP1$amp r) ae 0 sessi

SELECTION-SCREEN COMMENT $amp TEXT-S+ FOR FIELD CTUMODE

se(ecti-scree )siti

PARAMETERS CTUMODE LIE CTU2PARAMS-DISMODE DEFAULT 3N3

A4 s56 a(( 78)rs

E4 s56 78)r errr (8

N4 7 t 7is)(a8 78)r

SELECTION-SCREEN END OF LINE

SELECTION-SCREEN BEGIN OF LINE

SELECTION-SCREEN COMMENT $amp TEXT-S$ FOR FIELD USER

se(ecti-scree )siti $+

PARAMETERS4 USER1$amp DEFAULT S9-UNAME ser 0r sessi i atc5

SELECTION-SCREEN COMMENT $amp TEXT-S FOR FIELD CUPDATE

se(ecti-scree )siti

PARAMETERS CUPDATE LIE CTU2PARAMS-UPDMODE DEFAULT 3L3

S4 s8c5rs(8

A4 as8c5rs(8

L4 (ca(

SELECTION-SCREEN END OF LINE

SELECTION-SCREEN BEGIN OF LINE

SELECTION-SCREEN COMMENT $amp TEXT-S FOR FIELD EEP

se(ecti-scree )siti $+

PARAMETERS4 EEP AS CltECBOX 3 3 = 7e(ete sessi i0 0iis5e7

3X3 = gtee) sessi i0 0iis5e7

SELECTION-SCREEN COMMENT $amp TEXT-S FOR FIELD E2GROUP

copy SAP AG BC420 12-83

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 8488

se(ecti-scree )siti

)araeters E2GROUP1$amp r) ae 0 errr-sessi

SELECTION-SCREEN END OF LINE

SELECTION-SCREEN BEGIN OF LINE

SELECTION-SCREEN COMMENT $amp TEXT-S FOR FIELD ltOLDDATE

se(ecti-scree )siti $+

PARAMETERS4 ltOLDDATE LIE S9-DATUM

SELECTION-SCREEN COMMENT +11amp TEXT-S$ FOR FIELD E2USER

se(ecti-scree )siti

PARAMETERS4 E2USER1$amp DEFAULT S9-UNAME ser 0r errr-sessi

SELECTION-SCREEN END OF LINE

SELECTION-SCREEN BEGIN OF LINE

SELECTION-SCREEN COMMENT +11amp TEXT-S FOR FIELD E2EEP

se(ecti-scree )siti

PARAMETERS4 E2EEP AS CltECBOX 3 3 = 7e(ete sessi i0 0iis5e7

3X3 = gtee) sessi i0 0iis5e7

SELECTION-SCREEN END OF LINE

SELECTION-SCREEN BEGIN OF LINE

SELECTION-SCREEN COMMENT +11amp TEXT-S FOR FIELD E2ltDATE

se(ecti-scree )siti

PARAMETERS4 E2ltDATE LIE S9-DATUM

SELECTION-SCREEN END OF LINE

SELECTION-SCREEN SIP

SELECTION-SCREEN BEGIN OF LINE

SELECTION-SCREEN COMMENT 1amp TEXT-S1 FOR FIELD NODATA

PARAMETERS4 NODATA DEFAULT 33 LOER CASE 7ata

SELECTION-SCREEN END OF LINE

----------------------------------------------------------------------

Batc5i)t7ata 0 si(e trasacti

DATA4 BDCDATA LIE BDCDATA OCCURS ITlt ltEADER LINE

essaes 0 ca(( trasacti

DATA4 MESSTAB LIE BDCMSGCOLL OCCURS ITlt ltEADER LINE

errr sessi )ee7 3 3 r 3X3amp

DATA4 E2GROUP2OPENED

essae tets

TABLES4 T1

copy SAP AG BC420 12-84

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 8588

----------------------------------------------------------------------

at se(ecti scree

----------------------------------------------------------------------

AT SELECTION-SCREEN

r) a7 ser st e 0i((e7 0r create sessi

IF SESSION = 3X3 AND

GROUP = SPACE OR USER = SPACE

MESSAGE E1MSamp

ENDIF

----------------------------------------------------------------------

)e 7ataset

----------------------------------------------------------------------

FORM OPEN2DATASET USING P2DATASET

OPEN DATASET P2DATASET IN TEXT MODE

IF S9-SUBRC

RITE4 TEXT-E S9-SUBRC

STOP

ENDIF

ENDFORM

----------------------------------------------------------------------

c(se 7ataset

----------------------------------------------------------------------

FORM CLOSE2DATASET USING P2DATASET

CLOSE DATASET P2DATASET

ENDFORM

----------------------------------------------------------------------

create atc5i)t sessi

t 0r ca(( trasacti siamp

----------------------------------------------------------------------

FORM OPEN2GROUP

IF SESSION = 3X3

SIP

RITE4 $amp 3Create r)3I1amp GROUP

SIP

)e atc5i)t r)

CALL FUNCTION 3BDC2OPEN2GROUP3

EXPORTING CLIENT = S9-MANDT

copy SAP AG BC420 12-85

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 8688

GROUP = GROUP

USER = USER

EEP = EEP

ltOLDDATE = ltOLDDATE

RITE4 amp 3BDC2OPEN2GROUP3I$amp

1$amp 3retrc7e43I+amp

S9-SUBRC

ENDIF

ENDFORM

----------------------------------------------------------------------

e7 atc5i)t sessi

ca(( trasacti si4 errr sessiamp

----------------------------------------------------------------------

FORM CLOSE2GROUP

IF SESSION = 3X3

c(se atc5i)t r)

CALL FUNCTION 3BDC2CLOSE2GROUP3

RITE4 amp 3BDC2CLOSE2GROUP3Iamp

1$amp 3retrc7e43I+amp

S9-SUBRC

ELSE

IF E2GROUP2OPENED = 3X3

CALL FUNCTION 3BDC2CLOSE2GROUP3

RITE4

RITE4 amp 3Fe5(era))e 6r7e eret3Iamp

ENDIF

ENDIF

ENDFORM

----------------------------------------------------------------------

Start e6 trasacti accr7i t )araeters

----------------------------------------------------------------------

FORM BDC2TRANSACTION USING TCODE

DATA4 L2MSTRINGamp

DATA4 L2SUBRC LIE S9-SUBRC

atc5 i)t sessi

IF SESSION = 3X3

CALL FUNCTION 3BDC2INSERT3

EXPORTING TCODE = TCODE

TABLES D9NPROTAB = BDCDATA

RITE4 3BDC2INSERT3Iamp

copy SAP AG BC420 12-86

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 8788

TCODE

3retrc7e43I+amp

S9-SUBRC

3RECORD43

S9-INDEX

ca(( trasacti si

ELSE

REFRESlt MESSTAB

CALL TRANSACTION TCODE USING BDCDATA

MODE CTUMODE

UPDATE CUPDATE

MESSAGES INTO MESSTAB

L2SUBRC = S9-SUBRC

RITE4 3CALL2TRANSACTION3

TCODE

3retrc7e43I+amp

L2SUBRC

3RECORD43

S9-INDEX

LOOP AT MESSTAB

SELECT SINGLE FROM T1 ltERE SPRSL = MESSTAB-MSGSPRA

AND ARBGB = MESSTAB-MSGID

AND MSGNR = MESSTAB-MSGNR

IF S9-SUBRC =

L2MSTRING = T1-TEXT

IF L2MSTRING CS 313

REPLACE 313 ITlt MESSTAB-MSGH1 INTO L2MSTRING

REPLACE 3$3 ITlt MESSTAB-MSGH$ INTO L2MSTRING

REPLACE 33 ITlt MESSTAB-MSGH INTO L2MSTRING

REPLACE 33 ITlt MESSTAB-MSGH INTO L2MSTRING

ELSE

REPLACE 33 ITlt MESSTAB-MSGH1 INTO L2MSTRING

REPLACE 33 ITlt MESSTAB-MSGH$ INTO L2MSTRING

REPLACE 33 ITlt MESSTAB-MSGH INTO L2MSTRING

REPLACE 33 ITlt MESSTAB-MSGH INTO L2MSTRING

ENDIF

CONDENSE L2MSTRING

RITE4 MESSTAB-MSGT9P L2MSTRING$+amp

ELSE

RITE4 MESSTAB

ENDIF

ENDLOOP

copy SAP AG BC420 12-87

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 8888

SIP

Eree 0e5(era))e

IF L2SUBRC AND E2GROUP SPACE

IF E2GROUP2OPENED = 3 3

CALL FUNCTION 3BDC2OPEN2GROUP3

EXPORTING CLIENT = S9-MANDT

GROUP = E2GROUP

USER = E2USER

EEP = E2EEP

ltOLDDATE = E2ltDATE

E2GROUP2OPENED = 3X3

ENDIF

CALL FUNCTION 3BDC2INSERT3

EXPORTING TCODE = TCODE

TABLES D9NPROTAB = BDCDATA

ENDIF

ENDIF

REFRESlt BDCDATA

ENDFORM

----------------------------------------------------------------------

Start e6 scree

----------------------------------------------------------------------

FORM BDC2D9NPRO USING PROGRAM D9NPRO

CLEAR BDCDATA

BDCDATA-PROGRAM = PROGRAM

BDCDATA-D9NPRO = D9NPRO

BDCDATA-D9NBEGIN = 3X3

APPEND BDCDATA

ENDFORM

----------------------------------------------------------------------

Isert 0ie(7

Page 80: BC420_46C - 012The Transaction Recorder

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 8088

1 2reate the suproect 7I9 and the ne$ oect TA3 in your proect 2109

aintain the oect attriutes and seect the item atch input recording Seect your

recording 7I3

2reate the source structure address

2reate the source fieds according to the tae eo$ 5r copy them from proect 2109S37N suproect 7I900 oect TA900

198 Fie setup The data from the egacy system are dispayed in the foo$ing tae

Fied name Fied type Fied ength escription

N5 2 8B etor numer

NA7 2 Name

STamp77T 2 Street

2ITC 2 2ityPace of residence

MIP 2 80 Posta code

T7+ 2 8B Teephone numer

191 aintain the fied mapping 4se the automatic fied mapping (via menu item

7tras)

19 Specify the fies 5ny maintain the fie name of the source fie

Name of the fie 21099IFI+7

2odepage 8800

19 Import the data and convert them ispay the data in each caseQ

19 2reate a atch input session

19B ampun the atch input session

copy SAP AG BC420 12-80

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 8188

ercise 3

nit $ransaction -ecorder

$opic -ecording ith the $ -ecorder

bull ltenerate a recording using the TA recorder

bull Test the recording

2hange the address data of detors in the amp system

Name recording $+

Name of the file +2055+F9

8 2reate the recording TA37I3 using the transaction recorder ampecord the

transaction F01 (change detor)

898 4se detor M9980008 for the recording 5n the F01 initia screen ony

maintain the foo$ing fieds

etor etor M9980008

2ompany 2ode 0008

Address data seect

Note $he data record must e saved hen recording

eete a fieds that do not eist in the source fie 21099IFI+7 from screen

880 in the recording (eg 6NA89S5ampT+ 6NA89+AN8 6ANNQ9SPampAS) Note o not deete fieds ampF01946ampS and ampF0190880

Save the recording no$

1 S$itch to the recordings overvie$

198 Process the recording $ith the processing mode A (dispay a)

191 Process the recording $ith the processing mode RN (no dispay)

19 If the recording has een tested and no error has occurred generate a I session

and run it using the I monitor If an error shoud occur generate the recordingagainQ

copy SAP AG BC420 12-81

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 8288

From the recording generate the program M21037I3 in your deveopment cass

2109 Seect the foo$ing

bull ampead fied contents from fie

bull 2reate test data in the fie 2103dei3test3tt

98 Save this program and eecute it ltenerate one I session each and process it

2arry out the same steps again using the ca transaction

The generated program shoud no$ e changed so that fie 21099IFI+7 can e

read and processed

98 2hange the defaut vaue of the fie name (parameter dataset) in 21099

IFI+7

91 2hange the structure definition eete the company code fied and the address

data checo from the structure

9 2hange the su9routine ca perform dc3fied for the company code (KampF019

46ampSK) so that the vaue 0008 is transferred

9 2hange the su9routine ca perform dc3fied for the address data checo

(KampF0190880K) so that the vaue G is transferred

9 Start the program again and read the data from the fie 21099IFI+7 $ith

detor data ltenerate a I session $ith it and run it

copy SAP AG BC420 12-82

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 8388

033 Include DR16INCLUDE BDCRECX1

SELECTION-SCREEN BEGIN OF LINE

PARAMETERS SESSION RADIOBUTTON GROUP CTU create sessi SELECTION-SCREEN COMMENT $amp TEXT-S FOR FIELD SESSION

se(ecti-scree )siti +

PARAMETERS CTU RADIOBUTTON GROUP CTU ca(( trasacti

SELECTION-SCREEN COMMENT $amp TEXT-S FOR FIELD CTU

SELECTION-SCREEN END OF LINE

SELECTION-SCREEN BEGIN OF LINE

SELECTION-SCREEN COMMENT $amp TEXT-S1 FOR FIELD GROUP

se(ecti-scree )siti $+

PARAMETERS GROUP1$amp r) ae 0 sessi

SELECTION-SCREEN COMMENT $amp TEXT-S+ FOR FIELD CTUMODE

se(ecti-scree )siti

PARAMETERS CTUMODE LIE CTU2PARAMS-DISMODE DEFAULT 3N3

A4 s56 a(( 78)rs

E4 s56 78)r errr (8

N4 7 t 7is)(a8 78)r

SELECTION-SCREEN END OF LINE

SELECTION-SCREEN BEGIN OF LINE

SELECTION-SCREEN COMMENT $amp TEXT-S$ FOR FIELD USER

se(ecti-scree )siti $+

PARAMETERS4 USER1$amp DEFAULT S9-UNAME ser 0r sessi i atc5

SELECTION-SCREEN COMMENT $amp TEXT-S FOR FIELD CUPDATE

se(ecti-scree )siti

PARAMETERS CUPDATE LIE CTU2PARAMS-UPDMODE DEFAULT 3L3

S4 s8c5rs(8

A4 as8c5rs(8

L4 (ca(

SELECTION-SCREEN END OF LINE

SELECTION-SCREEN BEGIN OF LINE

SELECTION-SCREEN COMMENT $amp TEXT-S FOR FIELD EEP

se(ecti-scree )siti $+

PARAMETERS4 EEP AS CltECBOX 3 3 = 7e(ete sessi i0 0iis5e7

3X3 = gtee) sessi i0 0iis5e7

SELECTION-SCREEN COMMENT $amp TEXT-S FOR FIELD E2GROUP

copy SAP AG BC420 12-83

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 8488

se(ecti-scree )siti

)araeters E2GROUP1$amp r) ae 0 errr-sessi

SELECTION-SCREEN END OF LINE

SELECTION-SCREEN BEGIN OF LINE

SELECTION-SCREEN COMMENT $amp TEXT-S FOR FIELD ltOLDDATE

se(ecti-scree )siti $+

PARAMETERS4 ltOLDDATE LIE S9-DATUM

SELECTION-SCREEN COMMENT +11amp TEXT-S$ FOR FIELD E2USER

se(ecti-scree )siti

PARAMETERS4 E2USER1$amp DEFAULT S9-UNAME ser 0r errr-sessi

SELECTION-SCREEN END OF LINE

SELECTION-SCREEN BEGIN OF LINE

SELECTION-SCREEN COMMENT +11amp TEXT-S FOR FIELD E2EEP

se(ecti-scree )siti

PARAMETERS4 E2EEP AS CltECBOX 3 3 = 7e(ete sessi i0 0iis5e7

3X3 = gtee) sessi i0 0iis5e7

SELECTION-SCREEN END OF LINE

SELECTION-SCREEN BEGIN OF LINE

SELECTION-SCREEN COMMENT +11amp TEXT-S FOR FIELD E2ltDATE

se(ecti-scree )siti

PARAMETERS4 E2ltDATE LIE S9-DATUM

SELECTION-SCREEN END OF LINE

SELECTION-SCREEN SIP

SELECTION-SCREEN BEGIN OF LINE

SELECTION-SCREEN COMMENT 1amp TEXT-S1 FOR FIELD NODATA

PARAMETERS4 NODATA DEFAULT 33 LOER CASE 7ata

SELECTION-SCREEN END OF LINE

----------------------------------------------------------------------

Batc5i)t7ata 0 si(e trasacti

DATA4 BDCDATA LIE BDCDATA OCCURS ITlt ltEADER LINE

essaes 0 ca(( trasacti

DATA4 MESSTAB LIE BDCMSGCOLL OCCURS ITlt ltEADER LINE

errr sessi )ee7 3 3 r 3X3amp

DATA4 E2GROUP2OPENED

essae tets

TABLES4 T1

copy SAP AG BC420 12-84

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 8588

----------------------------------------------------------------------

at se(ecti scree

----------------------------------------------------------------------

AT SELECTION-SCREEN

r) a7 ser st e 0i((e7 0r create sessi

IF SESSION = 3X3 AND

GROUP = SPACE OR USER = SPACE

MESSAGE E1MSamp

ENDIF

----------------------------------------------------------------------

)e 7ataset

----------------------------------------------------------------------

FORM OPEN2DATASET USING P2DATASET

OPEN DATASET P2DATASET IN TEXT MODE

IF S9-SUBRC

RITE4 TEXT-E S9-SUBRC

STOP

ENDIF

ENDFORM

----------------------------------------------------------------------

c(se 7ataset

----------------------------------------------------------------------

FORM CLOSE2DATASET USING P2DATASET

CLOSE DATASET P2DATASET

ENDFORM

----------------------------------------------------------------------

create atc5i)t sessi

t 0r ca(( trasacti siamp

----------------------------------------------------------------------

FORM OPEN2GROUP

IF SESSION = 3X3

SIP

RITE4 $amp 3Create r)3I1amp GROUP

SIP

)e atc5i)t r)

CALL FUNCTION 3BDC2OPEN2GROUP3

EXPORTING CLIENT = S9-MANDT

copy SAP AG BC420 12-85

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 8688

GROUP = GROUP

USER = USER

EEP = EEP

ltOLDDATE = ltOLDDATE

RITE4 amp 3BDC2OPEN2GROUP3I$amp

1$amp 3retrc7e43I+amp

S9-SUBRC

ENDIF

ENDFORM

----------------------------------------------------------------------

e7 atc5i)t sessi

ca(( trasacti si4 errr sessiamp

----------------------------------------------------------------------

FORM CLOSE2GROUP

IF SESSION = 3X3

c(se atc5i)t r)

CALL FUNCTION 3BDC2CLOSE2GROUP3

RITE4 amp 3BDC2CLOSE2GROUP3Iamp

1$amp 3retrc7e43I+amp

S9-SUBRC

ELSE

IF E2GROUP2OPENED = 3X3

CALL FUNCTION 3BDC2CLOSE2GROUP3

RITE4

RITE4 amp 3Fe5(era))e 6r7e eret3Iamp

ENDIF

ENDIF

ENDFORM

----------------------------------------------------------------------

Start e6 trasacti accr7i t )araeters

----------------------------------------------------------------------

FORM BDC2TRANSACTION USING TCODE

DATA4 L2MSTRINGamp

DATA4 L2SUBRC LIE S9-SUBRC

atc5 i)t sessi

IF SESSION = 3X3

CALL FUNCTION 3BDC2INSERT3

EXPORTING TCODE = TCODE

TABLES D9NPROTAB = BDCDATA

RITE4 3BDC2INSERT3Iamp

copy SAP AG BC420 12-86

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 8788

TCODE

3retrc7e43I+amp

S9-SUBRC

3RECORD43

S9-INDEX

ca(( trasacti si

ELSE

REFRESlt MESSTAB

CALL TRANSACTION TCODE USING BDCDATA

MODE CTUMODE

UPDATE CUPDATE

MESSAGES INTO MESSTAB

L2SUBRC = S9-SUBRC

RITE4 3CALL2TRANSACTION3

TCODE

3retrc7e43I+amp

L2SUBRC

3RECORD43

S9-INDEX

LOOP AT MESSTAB

SELECT SINGLE FROM T1 ltERE SPRSL = MESSTAB-MSGSPRA

AND ARBGB = MESSTAB-MSGID

AND MSGNR = MESSTAB-MSGNR

IF S9-SUBRC =

L2MSTRING = T1-TEXT

IF L2MSTRING CS 313

REPLACE 313 ITlt MESSTAB-MSGH1 INTO L2MSTRING

REPLACE 3$3 ITlt MESSTAB-MSGH$ INTO L2MSTRING

REPLACE 33 ITlt MESSTAB-MSGH INTO L2MSTRING

REPLACE 33 ITlt MESSTAB-MSGH INTO L2MSTRING

ELSE

REPLACE 33 ITlt MESSTAB-MSGH1 INTO L2MSTRING

REPLACE 33 ITlt MESSTAB-MSGH$ INTO L2MSTRING

REPLACE 33 ITlt MESSTAB-MSGH INTO L2MSTRING

REPLACE 33 ITlt MESSTAB-MSGH INTO L2MSTRING

ENDIF

CONDENSE L2MSTRING

RITE4 MESSTAB-MSGT9P L2MSTRING$+amp

ELSE

RITE4 MESSTAB

ENDIF

ENDLOOP

copy SAP AG BC420 12-87

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 8888

SIP

Eree 0e5(era))e

IF L2SUBRC AND E2GROUP SPACE

IF E2GROUP2OPENED = 3 3

CALL FUNCTION 3BDC2OPEN2GROUP3

EXPORTING CLIENT = S9-MANDT

GROUP = E2GROUP

USER = E2USER

EEP = E2EEP

ltOLDDATE = E2ltDATE

E2GROUP2OPENED = 3X3

ENDIF

CALL FUNCTION 3BDC2INSERT3

EXPORTING TCODE = TCODE

TABLES D9NPROTAB = BDCDATA

ENDIF

ENDIF

REFRESlt BDCDATA

ENDFORM

----------------------------------------------------------------------

Start e6 scree

----------------------------------------------------------------------

FORM BDC2D9NPRO USING PROGRAM D9NPRO

CLEAR BDCDATA

BDCDATA-PROGRAM = PROGRAM

BDCDATA-D9NPRO = D9NPRO

BDCDATA-D9NBEGIN = 3X3

APPEND BDCDATA

ENDFORM

----------------------------------------------------------------------

Isert 0ie(7

Page 81: BC420_46C - 012The Transaction Recorder

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 8188

ercise 3

nit $ransaction -ecorder

$opic -ecording ith the $ -ecorder

bull ltenerate a recording using the TA recorder

bull Test the recording

2hange the address data of detors in the amp system

Name recording $+

Name of the file +2055+F9

8 2reate the recording TA37I3 using the transaction recorder ampecord the

transaction F01 (change detor)

898 4se detor M9980008 for the recording 5n the F01 initia screen ony

maintain the foo$ing fieds

etor etor M9980008

2ompany 2ode 0008

Address data seect

Note $he data record must e saved hen recording

eete a fieds that do not eist in the source fie 21099IFI+7 from screen

880 in the recording (eg 6NA89S5ampT+ 6NA89+AN8 6ANNQ9SPampAS) Note o not deete fieds ampF01946ampS and ampF0190880

Save the recording no$

1 S$itch to the recordings overvie$

198 Process the recording $ith the processing mode A (dispay a)

191 Process the recording $ith the processing mode RN (no dispay)

19 If the recording has een tested and no error has occurred generate a I session

and run it using the I monitor If an error shoud occur generate the recordingagainQ

copy SAP AG BC420 12-81

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 8288

From the recording generate the program M21037I3 in your deveopment cass

2109 Seect the foo$ing

bull ampead fied contents from fie

bull 2reate test data in the fie 2103dei3test3tt

98 Save this program and eecute it ltenerate one I session each and process it

2arry out the same steps again using the ca transaction

The generated program shoud no$ e changed so that fie 21099IFI+7 can e

read and processed

98 2hange the defaut vaue of the fie name (parameter dataset) in 21099

IFI+7

91 2hange the structure definition eete the company code fied and the address

data checo from the structure

9 2hange the su9routine ca perform dc3fied for the company code (KampF019

46ampSK) so that the vaue 0008 is transferred

9 2hange the su9routine ca perform dc3fied for the address data checo

(KampF0190880K) so that the vaue G is transferred

9 Start the program again and read the data from the fie 21099IFI+7 $ith

detor data ltenerate a I session $ith it and run it

copy SAP AG BC420 12-82

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 8388

033 Include DR16INCLUDE BDCRECX1

SELECTION-SCREEN BEGIN OF LINE

PARAMETERS SESSION RADIOBUTTON GROUP CTU create sessi SELECTION-SCREEN COMMENT $amp TEXT-S FOR FIELD SESSION

se(ecti-scree )siti +

PARAMETERS CTU RADIOBUTTON GROUP CTU ca(( trasacti

SELECTION-SCREEN COMMENT $amp TEXT-S FOR FIELD CTU

SELECTION-SCREEN END OF LINE

SELECTION-SCREEN BEGIN OF LINE

SELECTION-SCREEN COMMENT $amp TEXT-S1 FOR FIELD GROUP

se(ecti-scree )siti $+

PARAMETERS GROUP1$amp r) ae 0 sessi

SELECTION-SCREEN COMMENT $amp TEXT-S+ FOR FIELD CTUMODE

se(ecti-scree )siti

PARAMETERS CTUMODE LIE CTU2PARAMS-DISMODE DEFAULT 3N3

A4 s56 a(( 78)rs

E4 s56 78)r errr (8

N4 7 t 7is)(a8 78)r

SELECTION-SCREEN END OF LINE

SELECTION-SCREEN BEGIN OF LINE

SELECTION-SCREEN COMMENT $amp TEXT-S$ FOR FIELD USER

se(ecti-scree )siti $+

PARAMETERS4 USER1$amp DEFAULT S9-UNAME ser 0r sessi i atc5

SELECTION-SCREEN COMMENT $amp TEXT-S FOR FIELD CUPDATE

se(ecti-scree )siti

PARAMETERS CUPDATE LIE CTU2PARAMS-UPDMODE DEFAULT 3L3

S4 s8c5rs(8

A4 as8c5rs(8

L4 (ca(

SELECTION-SCREEN END OF LINE

SELECTION-SCREEN BEGIN OF LINE

SELECTION-SCREEN COMMENT $amp TEXT-S FOR FIELD EEP

se(ecti-scree )siti $+

PARAMETERS4 EEP AS CltECBOX 3 3 = 7e(ete sessi i0 0iis5e7

3X3 = gtee) sessi i0 0iis5e7

SELECTION-SCREEN COMMENT $amp TEXT-S FOR FIELD E2GROUP

copy SAP AG BC420 12-83

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 8488

se(ecti-scree )siti

)araeters E2GROUP1$amp r) ae 0 errr-sessi

SELECTION-SCREEN END OF LINE

SELECTION-SCREEN BEGIN OF LINE

SELECTION-SCREEN COMMENT $amp TEXT-S FOR FIELD ltOLDDATE

se(ecti-scree )siti $+

PARAMETERS4 ltOLDDATE LIE S9-DATUM

SELECTION-SCREEN COMMENT +11amp TEXT-S$ FOR FIELD E2USER

se(ecti-scree )siti

PARAMETERS4 E2USER1$amp DEFAULT S9-UNAME ser 0r errr-sessi

SELECTION-SCREEN END OF LINE

SELECTION-SCREEN BEGIN OF LINE

SELECTION-SCREEN COMMENT +11amp TEXT-S FOR FIELD E2EEP

se(ecti-scree )siti

PARAMETERS4 E2EEP AS CltECBOX 3 3 = 7e(ete sessi i0 0iis5e7

3X3 = gtee) sessi i0 0iis5e7

SELECTION-SCREEN END OF LINE

SELECTION-SCREEN BEGIN OF LINE

SELECTION-SCREEN COMMENT +11amp TEXT-S FOR FIELD E2ltDATE

se(ecti-scree )siti

PARAMETERS4 E2ltDATE LIE S9-DATUM

SELECTION-SCREEN END OF LINE

SELECTION-SCREEN SIP

SELECTION-SCREEN BEGIN OF LINE

SELECTION-SCREEN COMMENT 1amp TEXT-S1 FOR FIELD NODATA

PARAMETERS4 NODATA DEFAULT 33 LOER CASE 7ata

SELECTION-SCREEN END OF LINE

----------------------------------------------------------------------

Batc5i)t7ata 0 si(e trasacti

DATA4 BDCDATA LIE BDCDATA OCCURS ITlt ltEADER LINE

essaes 0 ca(( trasacti

DATA4 MESSTAB LIE BDCMSGCOLL OCCURS ITlt ltEADER LINE

errr sessi )ee7 3 3 r 3X3amp

DATA4 E2GROUP2OPENED

essae tets

TABLES4 T1

copy SAP AG BC420 12-84

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 8588

----------------------------------------------------------------------

at se(ecti scree

----------------------------------------------------------------------

AT SELECTION-SCREEN

r) a7 ser st e 0i((e7 0r create sessi

IF SESSION = 3X3 AND

GROUP = SPACE OR USER = SPACE

MESSAGE E1MSamp

ENDIF

----------------------------------------------------------------------

)e 7ataset

----------------------------------------------------------------------

FORM OPEN2DATASET USING P2DATASET

OPEN DATASET P2DATASET IN TEXT MODE

IF S9-SUBRC

RITE4 TEXT-E S9-SUBRC

STOP

ENDIF

ENDFORM

----------------------------------------------------------------------

c(se 7ataset

----------------------------------------------------------------------

FORM CLOSE2DATASET USING P2DATASET

CLOSE DATASET P2DATASET

ENDFORM

----------------------------------------------------------------------

create atc5i)t sessi

t 0r ca(( trasacti siamp

----------------------------------------------------------------------

FORM OPEN2GROUP

IF SESSION = 3X3

SIP

RITE4 $amp 3Create r)3I1amp GROUP

SIP

)e atc5i)t r)

CALL FUNCTION 3BDC2OPEN2GROUP3

EXPORTING CLIENT = S9-MANDT

copy SAP AG BC420 12-85

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 8688

GROUP = GROUP

USER = USER

EEP = EEP

ltOLDDATE = ltOLDDATE

RITE4 amp 3BDC2OPEN2GROUP3I$amp

1$amp 3retrc7e43I+amp

S9-SUBRC

ENDIF

ENDFORM

----------------------------------------------------------------------

e7 atc5i)t sessi

ca(( trasacti si4 errr sessiamp

----------------------------------------------------------------------

FORM CLOSE2GROUP

IF SESSION = 3X3

c(se atc5i)t r)

CALL FUNCTION 3BDC2CLOSE2GROUP3

RITE4 amp 3BDC2CLOSE2GROUP3Iamp

1$amp 3retrc7e43I+amp

S9-SUBRC

ELSE

IF E2GROUP2OPENED = 3X3

CALL FUNCTION 3BDC2CLOSE2GROUP3

RITE4

RITE4 amp 3Fe5(era))e 6r7e eret3Iamp

ENDIF

ENDIF

ENDFORM

----------------------------------------------------------------------

Start e6 trasacti accr7i t )araeters

----------------------------------------------------------------------

FORM BDC2TRANSACTION USING TCODE

DATA4 L2MSTRINGamp

DATA4 L2SUBRC LIE S9-SUBRC

atc5 i)t sessi

IF SESSION = 3X3

CALL FUNCTION 3BDC2INSERT3

EXPORTING TCODE = TCODE

TABLES D9NPROTAB = BDCDATA

RITE4 3BDC2INSERT3Iamp

copy SAP AG BC420 12-86

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 8788

TCODE

3retrc7e43I+amp

S9-SUBRC

3RECORD43

S9-INDEX

ca(( trasacti si

ELSE

REFRESlt MESSTAB

CALL TRANSACTION TCODE USING BDCDATA

MODE CTUMODE

UPDATE CUPDATE

MESSAGES INTO MESSTAB

L2SUBRC = S9-SUBRC

RITE4 3CALL2TRANSACTION3

TCODE

3retrc7e43I+amp

L2SUBRC

3RECORD43

S9-INDEX

LOOP AT MESSTAB

SELECT SINGLE FROM T1 ltERE SPRSL = MESSTAB-MSGSPRA

AND ARBGB = MESSTAB-MSGID

AND MSGNR = MESSTAB-MSGNR

IF S9-SUBRC =

L2MSTRING = T1-TEXT

IF L2MSTRING CS 313

REPLACE 313 ITlt MESSTAB-MSGH1 INTO L2MSTRING

REPLACE 3$3 ITlt MESSTAB-MSGH$ INTO L2MSTRING

REPLACE 33 ITlt MESSTAB-MSGH INTO L2MSTRING

REPLACE 33 ITlt MESSTAB-MSGH INTO L2MSTRING

ELSE

REPLACE 33 ITlt MESSTAB-MSGH1 INTO L2MSTRING

REPLACE 33 ITlt MESSTAB-MSGH$ INTO L2MSTRING

REPLACE 33 ITlt MESSTAB-MSGH INTO L2MSTRING

REPLACE 33 ITlt MESSTAB-MSGH INTO L2MSTRING

ENDIF

CONDENSE L2MSTRING

RITE4 MESSTAB-MSGT9P L2MSTRING$+amp

ELSE

RITE4 MESSTAB

ENDIF

ENDLOOP

copy SAP AG BC420 12-87

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 8888

SIP

Eree 0e5(era))e

IF L2SUBRC AND E2GROUP SPACE

IF E2GROUP2OPENED = 3 3

CALL FUNCTION 3BDC2OPEN2GROUP3

EXPORTING CLIENT = S9-MANDT

GROUP = E2GROUP

USER = E2USER

EEP = E2EEP

ltOLDDATE = E2ltDATE

E2GROUP2OPENED = 3X3

ENDIF

CALL FUNCTION 3BDC2INSERT3

EXPORTING TCODE = TCODE

TABLES D9NPROTAB = BDCDATA

ENDIF

ENDIF

REFRESlt BDCDATA

ENDFORM

----------------------------------------------------------------------

Start e6 scree

----------------------------------------------------------------------

FORM BDC2D9NPRO USING PROGRAM D9NPRO

CLEAR BDCDATA

BDCDATA-PROGRAM = PROGRAM

BDCDATA-D9NPRO = D9NPRO

BDCDATA-D9NBEGIN = 3X3

APPEND BDCDATA

ENDFORM

----------------------------------------------------------------------

Isert 0ie(7

Page 82: BC420_46C - 012The Transaction Recorder

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 8288

From the recording generate the program M21037I3 in your deveopment cass

2109 Seect the foo$ing

bull ampead fied contents from fie

bull 2reate test data in the fie 2103dei3test3tt

98 Save this program and eecute it ltenerate one I session each and process it

2arry out the same steps again using the ca transaction

The generated program shoud no$ e changed so that fie 21099IFI+7 can e

read and processed

98 2hange the defaut vaue of the fie name (parameter dataset) in 21099

IFI+7

91 2hange the structure definition eete the company code fied and the address

data checo from the structure

9 2hange the su9routine ca perform dc3fied for the company code (KampF019

46ampSK) so that the vaue 0008 is transferred

9 2hange the su9routine ca perform dc3fied for the address data checo

(KampF0190880K) so that the vaue G is transferred

9 Start the program again and read the data from the fie 21099IFI+7 $ith

detor data ltenerate a I session $ith it and run it

copy SAP AG BC420 12-82

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 8388

033 Include DR16INCLUDE BDCRECX1

SELECTION-SCREEN BEGIN OF LINE

PARAMETERS SESSION RADIOBUTTON GROUP CTU create sessi SELECTION-SCREEN COMMENT $amp TEXT-S FOR FIELD SESSION

se(ecti-scree )siti +

PARAMETERS CTU RADIOBUTTON GROUP CTU ca(( trasacti

SELECTION-SCREEN COMMENT $amp TEXT-S FOR FIELD CTU

SELECTION-SCREEN END OF LINE

SELECTION-SCREEN BEGIN OF LINE

SELECTION-SCREEN COMMENT $amp TEXT-S1 FOR FIELD GROUP

se(ecti-scree )siti $+

PARAMETERS GROUP1$amp r) ae 0 sessi

SELECTION-SCREEN COMMENT $amp TEXT-S+ FOR FIELD CTUMODE

se(ecti-scree )siti

PARAMETERS CTUMODE LIE CTU2PARAMS-DISMODE DEFAULT 3N3

A4 s56 a(( 78)rs

E4 s56 78)r errr (8

N4 7 t 7is)(a8 78)r

SELECTION-SCREEN END OF LINE

SELECTION-SCREEN BEGIN OF LINE

SELECTION-SCREEN COMMENT $amp TEXT-S$ FOR FIELD USER

se(ecti-scree )siti $+

PARAMETERS4 USER1$amp DEFAULT S9-UNAME ser 0r sessi i atc5

SELECTION-SCREEN COMMENT $amp TEXT-S FOR FIELD CUPDATE

se(ecti-scree )siti

PARAMETERS CUPDATE LIE CTU2PARAMS-UPDMODE DEFAULT 3L3

S4 s8c5rs(8

A4 as8c5rs(8

L4 (ca(

SELECTION-SCREEN END OF LINE

SELECTION-SCREEN BEGIN OF LINE

SELECTION-SCREEN COMMENT $amp TEXT-S FOR FIELD EEP

se(ecti-scree )siti $+

PARAMETERS4 EEP AS CltECBOX 3 3 = 7e(ete sessi i0 0iis5e7

3X3 = gtee) sessi i0 0iis5e7

SELECTION-SCREEN COMMENT $amp TEXT-S FOR FIELD E2GROUP

copy SAP AG BC420 12-83

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 8488

se(ecti-scree )siti

)araeters E2GROUP1$amp r) ae 0 errr-sessi

SELECTION-SCREEN END OF LINE

SELECTION-SCREEN BEGIN OF LINE

SELECTION-SCREEN COMMENT $amp TEXT-S FOR FIELD ltOLDDATE

se(ecti-scree )siti $+

PARAMETERS4 ltOLDDATE LIE S9-DATUM

SELECTION-SCREEN COMMENT +11amp TEXT-S$ FOR FIELD E2USER

se(ecti-scree )siti

PARAMETERS4 E2USER1$amp DEFAULT S9-UNAME ser 0r errr-sessi

SELECTION-SCREEN END OF LINE

SELECTION-SCREEN BEGIN OF LINE

SELECTION-SCREEN COMMENT +11amp TEXT-S FOR FIELD E2EEP

se(ecti-scree )siti

PARAMETERS4 E2EEP AS CltECBOX 3 3 = 7e(ete sessi i0 0iis5e7

3X3 = gtee) sessi i0 0iis5e7

SELECTION-SCREEN END OF LINE

SELECTION-SCREEN BEGIN OF LINE

SELECTION-SCREEN COMMENT +11amp TEXT-S FOR FIELD E2ltDATE

se(ecti-scree )siti

PARAMETERS4 E2ltDATE LIE S9-DATUM

SELECTION-SCREEN END OF LINE

SELECTION-SCREEN SIP

SELECTION-SCREEN BEGIN OF LINE

SELECTION-SCREEN COMMENT 1amp TEXT-S1 FOR FIELD NODATA

PARAMETERS4 NODATA DEFAULT 33 LOER CASE 7ata

SELECTION-SCREEN END OF LINE

----------------------------------------------------------------------

Batc5i)t7ata 0 si(e trasacti

DATA4 BDCDATA LIE BDCDATA OCCURS ITlt ltEADER LINE

essaes 0 ca(( trasacti

DATA4 MESSTAB LIE BDCMSGCOLL OCCURS ITlt ltEADER LINE

errr sessi )ee7 3 3 r 3X3amp

DATA4 E2GROUP2OPENED

essae tets

TABLES4 T1

copy SAP AG BC420 12-84

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 8588

----------------------------------------------------------------------

at se(ecti scree

----------------------------------------------------------------------

AT SELECTION-SCREEN

r) a7 ser st e 0i((e7 0r create sessi

IF SESSION = 3X3 AND

GROUP = SPACE OR USER = SPACE

MESSAGE E1MSamp

ENDIF

----------------------------------------------------------------------

)e 7ataset

----------------------------------------------------------------------

FORM OPEN2DATASET USING P2DATASET

OPEN DATASET P2DATASET IN TEXT MODE

IF S9-SUBRC

RITE4 TEXT-E S9-SUBRC

STOP

ENDIF

ENDFORM

----------------------------------------------------------------------

c(se 7ataset

----------------------------------------------------------------------

FORM CLOSE2DATASET USING P2DATASET

CLOSE DATASET P2DATASET

ENDFORM

----------------------------------------------------------------------

create atc5i)t sessi

t 0r ca(( trasacti siamp

----------------------------------------------------------------------

FORM OPEN2GROUP

IF SESSION = 3X3

SIP

RITE4 $amp 3Create r)3I1amp GROUP

SIP

)e atc5i)t r)

CALL FUNCTION 3BDC2OPEN2GROUP3

EXPORTING CLIENT = S9-MANDT

copy SAP AG BC420 12-85

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 8688

GROUP = GROUP

USER = USER

EEP = EEP

ltOLDDATE = ltOLDDATE

RITE4 amp 3BDC2OPEN2GROUP3I$amp

1$amp 3retrc7e43I+amp

S9-SUBRC

ENDIF

ENDFORM

----------------------------------------------------------------------

e7 atc5i)t sessi

ca(( trasacti si4 errr sessiamp

----------------------------------------------------------------------

FORM CLOSE2GROUP

IF SESSION = 3X3

c(se atc5i)t r)

CALL FUNCTION 3BDC2CLOSE2GROUP3

RITE4 amp 3BDC2CLOSE2GROUP3Iamp

1$amp 3retrc7e43I+amp

S9-SUBRC

ELSE

IF E2GROUP2OPENED = 3X3

CALL FUNCTION 3BDC2CLOSE2GROUP3

RITE4

RITE4 amp 3Fe5(era))e 6r7e eret3Iamp

ENDIF

ENDIF

ENDFORM

----------------------------------------------------------------------

Start e6 trasacti accr7i t )araeters

----------------------------------------------------------------------

FORM BDC2TRANSACTION USING TCODE

DATA4 L2MSTRINGamp

DATA4 L2SUBRC LIE S9-SUBRC

atc5 i)t sessi

IF SESSION = 3X3

CALL FUNCTION 3BDC2INSERT3

EXPORTING TCODE = TCODE

TABLES D9NPROTAB = BDCDATA

RITE4 3BDC2INSERT3Iamp

copy SAP AG BC420 12-86

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 8788

TCODE

3retrc7e43I+amp

S9-SUBRC

3RECORD43

S9-INDEX

ca(( trasacti si

ELSE

REFRESlt MESSTAB

CALL TRANSACTION TCODE USING BDCDATA

MODE CTUMODE

UPDATE CUPDATE

MESSAGES INTO MESSTAB

L2SUBRC = S9-SUBRC

RITE4 3CALL2TRANSACTION3

TCODE

3retrc7e43I+amp

L2SUBRC

3RECORD43

S9-INDEX

LOOP AT MESSTAB

SELECT SINGLE FROM T1 ltERE SPRSL = MESSTAB-MSGSPRA

AND ARBGB = MESSTAB-MSGID

AND MSGNR = MESSTAB-MSGNR

IF S9-SUBRC =

L2MSTRING = T1-TEXT

IF L2MSTRING CS 313

REPLACE 313 ITlt MESSTAB-MSGH1 INTO L2MSTRING

REPLACE 3$3 ITlt MESSTAB-MSGH$ INTO L2MSTRING

REPLACE 33 ITlt MESSTAB-MSGH INTO L2MSTRING

REPLACE 33 ITlt MESSTAB-MSGH INTO L2MSTRING

ELSE

REPLACE 33 ITlt MESSTAB-MSGH1 INTO L2MSTRING

REPLACE 33 ITlt MESSTAB-MSGH$ INTO L2MSTRING

REPLACE 33 ITlt MESSTAB-MSGH INTO L2MSTRING

REPLACE 33 ITlt MESSTAB-MSGH INTO L2MSTRING

ENDIF

CONDENSE L2MSTRING

RITE4 MESSTAB-MSGT9P L2MSTRING$+amp

ELSE

RITE4 MESSTAB

ENDIF

ENDLOOP

copy SAP AG BC420 12-87

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 8888

SIP

Eree 0e5(era))e

IF L2SUBRC AND E2GROUP SPACE

IF E2GROUP2OPENED = 3 3

CALL FUNCTION 3BDC2OPEN2GROUP3

EXPORTING CLIENT = S9-MANDT

GROUP = E2GROUP

USER = E2USER

EEP = E2EEP

ltOLDDATE = E2ltDATE

E2GROUP2OPENED = 3X3

ENDIF

CALL FUNCTION 3BDC2INSERT3

EXPORTING TCODE = TCODE

TABLES D9NPROTAB = BDCDATA

ENDIF

ENDIF

REFRESlt BDCDATA

ENDFORM

----------------------------------------------------------------------

Start e6 scree

----------------------------------------------------------------------

FORM BDC2D9NPRO USING PROGRAM D9NPRO

CLEAR BDCDATA

BDCDATA-PROGRAM = PROGRAM

BDCDATA-D9NPRO = D9NPRO

BDCDATA-D9NBEGIN = 3X3

APPEND BDCDATA

ENDFORM

----------------------------------------------------------------------

Isert 0ie(7

Page 83: BC420_46C - 012The Transaction Recorder

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 8388

033 Include DR16INCLUDE BDCRECX1

SELECTION-SCREEN BEGIN OF LINE

PARAMETERS SESSION RADIOBUTTON GROUP CTU create sessi SELECTION-SCREEN COMMENT $amp TEXT-S FOR FIELD SESSION

se(ecti-scree )siti +

PARAMETERS CTU RADIOBUTTON GROUP CTU ca(( trasacti

SELECTION-SCREEN COMMENT $amp TEXT-S FOR FIELD CTU

SELECTION-SCREEN END OF LINE

SELECTION-SCREEN BEGIN OF LINE

SELECTION-SCREEN COMMENT $amp TEXT-S1 FOR FIELD GROUP

se(ecti-scree )siti $+

PARAMETERS GROUP1$amp r) ae 0 sessi

SELECTION-SCREEN COMMENT $amp TEXT-S+ FOR FIELD CTUMODE

se(ecti-scree )siti

PARAMETERS CTUMODE LIE CTU2PARAMS-DISMODE DEFAULT 3N3

A4 s56 a(( 78)rs

E4 s56 78)r errr (8

N4 7 t 7is)(a8 78)r

SELECTION-SCREEN END OF LINE

SELECTION-SCREEN BEGIN OF LINE

SELECTION-SCREEN COMMENT $amp TEXT-S$ FOR FIELD USER

se(ecti-scree )siti $+

PARAMETERS4 USER1$amp DEFAULT S9-UNAME ser 0r sessi i atc5

SELECTION-SCREEN COMMENT $amp TEXT-S FOR FIELD CUPDATE

se(ecti-scree )siti

PARAMETERS CUPDATE LIE CTU2PARAMS-UPDMODE DEFAULT 3L3

S4 s8c5rs(8

A4 as8c5rs(8

L4 (ca(

SELECTION-SCREEN END OF LINE

SELECTION-SCREEN BEGIN OF LINE

SELECTION-SCREEN COMMENT $amp TEXT-S FOR FIELD EEP

se(ecti-scree )siti $+

PARAMETERS4 EEP AS CltECBOX 3 3 = 7e(ete sessi i0 0iis5e7

3X3 = gtee) sessi i0 0iis5e7

SELECTION-SCREEN COMMENT $amp TEXT-S FOR FIELD E2GROUP

copy SAP AG BC420 12-83

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 8488

se(ecti-scree )siti

)araeters E2GROUP1$amp r) ae 0 errr-sessi

SELECTION-SCREEN END OF LINE

SELECTION-SCREEN BEGIN OF LINE

SELECTION-SCREEN COMMENT $amp TEXT-S FOR FIELD ltOLDDATE

se(ecti-scree )siti $+

PARAMETERS4 ltOLDDATE LIE S9-DATUM

SELECTION-SCREEN COMMENT +11amp TEXT-S$ FOR FIELD E2USER

se(ecti-scree )siti

PARAMETERS4 E2USER1$amp DEFAULT S9-UNAME ser 0r errr-sessi

SELECTION-SCREEN END OF LINE

SELECTION-SCREEN BEGIN OF LINE

SELECTION-SCREEN COMMENT +11amp TEXT-S FOR FIELD E2EEP

se(ecti-scree )siti

PARAMETERS4 E2EEP AS CltECBOX 3 3 = 7e(ete sessi i0 0iis5e7

3X3 = gtee) sessi i0 0iis5e7

SELECTION-SCREEN END OF LINE

SELECTION-SCREEN BEGIN OF LINE

SELECTION-SCREEN COMMENT +11amp TEXT-S FOR FIELD E2ltDATE

se(ecti-scree )siti

PARAMETERS4 E2ltDATE LIE S9-DATUM

SELECTION-SCREEN END OF LINE

SELECTION-SCREEN SIP

SELECTION-SCREEN BEGIN OF LINE

SELECTION-SCREEN COMMENT 1amp TEXT-S1 FOR FIELD NODATA

PARAMETERS4 NODATA DEFAULT 33 LOER CASE 7ata

SELECTION-SCREEN END OF LINE

----------------------------------------------------------------------

Batc5i)t7ata 0 si(e trasacti

DATA4 BDCDATA LIE BDCDATA OCCURS ITlt ltEADER LINE

essaes 0 ca(( trasacti

DATA4 MESSTAB LIE BDCMSGCOLL OCCURS ITlt ltEADER LINE

errr sessi )ee7 3 3 r 3X3amp

DATA4 E2GROUP2OPENED

essae tets

TABLES4 T1

copy SAP AG BC420 12-84

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 8588

----------------------------------------------------------------------

at se(ecti scree

----------------------------------------------------------------------

AT SELECTION-SCREEN

r) a7 ser st e 0i((e7 0r create sessi

IF SESSION = 3X3 AND

GROUP = SPACE OR USER = SPACE

MESSAGE E1MSamp

ENDIF

----------------------------------------------------------------------

)e 7ataset

----------------------------------------------------------------------

FORM OPEN2DATASET USING P2DATASET

OPEN DATASET P2DATASET IN TEXT MODE

IF S9-SUBRC

RITE4 TEXT-E S9-SUBRC

STOP

ENDIF

ENDFORM

----------------------------------------------------------------------

c(se 7ataset

----------------------------------------------------------------------

FORM CLOSE2DATASET USING P2DATASET

CLOSE DATASET P2DATASET

ENDFORM

----------------------------------------------------------------------

create atc5i)t sessi

t 0r ca(( trasacti siamp

----------------------------------------------------------------------

FORM OPEN2GROUP

IF SESSION = 3X3

SIP

RITE4 $amp 3Create r)3I1amp GROUP

SIP

)e atc5i)t r)

CALL FUNCTION 3BDC2OPEN2GROUP3

EXPORTING CLIENT = S9-MANDT

copy SAP AG BC420 12-85

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 8688

GROUP = GROUP

USER = USER

EEP = EEP

ltOLDDATE = ltOLDDATE

RITE4 amp 3BDC2OPEN2GROUP3I$amp

1$amp 3retrc7e43I+amp

S9-SUBRC

ENDIF

ENDFORM

----------------------------------------------------------------------

e7 atc5i)t sessi

ca(( trasacti si4 errr sessiamp

----------------------------------------------------------------------

FORM CLOSE2GROUP

IF SESSION = 3X3

c(se atc5i)t r)

CALL FUNCTION 3BDC2CLOSE2GROUP3

RITE4 amp 3BDC2CLOSE2GROUP3Iamp

1$amp 3retrc7e43I+amp

S9-SUBRC

ELSE

IF E2GROUP2OPENED = 3X3

CALL FUNCTION 3BDC2CLOSE2GROUP3

RITE4

RITE4 amp 3Fe5(era))e 6r7e eret3Iamp

ENDIF

ENDIF

ENDFORM

----------------------------------------------------------------------

Start e6 trasacti accr7i t )araeters

----------------------------------------------------------------------

FORM BDC2TRANSACTION USING TCODE

DATA4 L2MSTRINGamp

DATA4 L2SUBRC LIE S9-SUBRC

atc5 i)t sessi

IF SESSION = 3X3

CALL FUNCTION 3BDC2INSERT3

EXPORTING TCODE = TCODE

TABLES D9NPROTAB = BDCDATA

RITE4 3BDC2INSERT3Iamp

copy SAP AG BC420 12-86

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 8788

TCODE

3retrc7e43I+amp

S9-SUBRC

3RECORD43

S9-INDEX

ca(( trasacti si

ELSE

REFRESlt MESSTAB

CALL TRANSACTION TCODE USING BDCDATA

MODE CTUMODE

UPDATE CUPDATE

MESSAGES INTO MESSTAB

L2SUBRC = S9-SUBRC

RITE4 3CALL2TRANSACTION3

TCODE

3retrc7e43I+amp

L2SUBRC

3RECORD43

S9-INDEX

LOOP AT MESSTAB

SELECT SINGLE FROM T1 ltERE SPRSL = MESSTAB-MSGSPRA

AND ARBGB = MESSTAB-MSGID

AND MSGNR = MESSTAB-MSGNR

IF S9-SUBRC =

L2MSTRING = T1-TEXT

IF L2MSTRING CS 313

REPLACE 313 ITlt MESSTAB-MSGH1 INTO L2MSTRING

REPLACE 3$3 ITlt MESSTAB-MSGH$ INTO L2MSTRING

REPLACE 33 ITlt MESSTAB-MSGH INTO L2MSTRING

REPLACE 33 ITlt MESSTAB-MSGH INTO L2MSTRING

ELSE

REPLACE 33 ITlt MESSTAB-MSGH1 INTO L2MSTRING

REPLACE 33 ITlt MESSTAB-MSGH$ INTO L2MSTRING

REPLACE 33 ITlt MESSTAB-MSGH INTO L2MSTRING

REPLACE 33 ITlt MESSTAB-MSGH INTO L2MSTRING

ENDIF

CONDENSE L2MSTRING

RITE4 MESSTAB-MSGT9P L2MSTRING$+amp

ELSE

RITE4 MESSTAB

ENDIF

ENDLOOP

copy SAP AG BC420 12-87

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 8888

SIP

Eree 0e5(era))e

IF L2SUBRC AND E2GROUP SPACE

IF E2GROUP2OPENED = 3 3

CALL FUNCTION 3BDC2OPEN2GROUP3

EXPORTING CLIENT = S9-MANDT

GROUP = E2GROUP

USER = E2USER

EEP = E2EEP

ltOLDDATE = E2ltDATE

E2GROUP2OPENED = 3X3

ENDIF

CALL FUNCTION 3BDC2INSERT3

EXPORTING TCODE = TCODE

TABLES D9NPROTAB = BDCDATA

ENDIF

ENDIF

REFRESlt BDCDATA

ENDFORM

----------------------------------------------------------------------

Start e6 scree

----------------------------------------------------------------------

FORM BDC2D9NPRO USING PROGRAM D9NPRO

CLEAR BDCDATA

BDCDATA-PROGRAM = PROGRAM

BDCDATA-D9NPRO = D9NPRO

BDCDATA-D9NBEGIN = 3X3

APPEND BDCDATA

ENDFORM

----------------------------------------------------------------------

Isert 0ie(7

Page 84: BC420_46C - 012The Transaction Recorder

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 8488

se(ecti-scree )siti

)araeters E2GROUP1$amp r) ae 0 errr-sessi

SELECTION-SCREEN END OF LINE

SELECTION-SCREEN BEGIN OF LINE

SELECTION-SCREEN COMMENT $amp TEXT-S FOR FIELD ltOLDDATE

se(ecti-scree )siti $+

PARAMETERS4 ltOLDDATE LIE S9-DATUM

SELECTION-SCREEN COMMENT +11amp TEXT-S$ FOR FIELD E2USER

se(ecti-scree )siti

PARAMETERS4 E2USER1$amp DEFAULT S9-UNAME ser 0r errr-sessi

SELECTION-SCREEN END OF LINE

SELECTION-SCREEN BEGIN OF LINE

SELECTION-SCREEN COMMENT +11amp TEXT-S FOR FIELD E2EEP

se(ecti-scree )siti

PARAMETERS4 E2EEP AS CltECBOX 3 3 = 7e(ete sessi i0 0iis5e7

3X3 = gtee) sessi i0 0iis5e7

SELECTION-SCREEN END OF LINE

SELECTION-SCREEN BEGIN OF LINE

SELECTION-SCREEN COMMENT +11amp TEXT-S FOR FIELD E2ltDATE

se(ecti-scree )siti

PARAMETERS4 E2ltDATE LIE S9-DATUM

SELECTION-SCREEN END OF LINE

SELECTION-SCREEN SIP

SELECTION-SCREEN BEGIN OF LINE

SELECTION-SCREEN COMMENT 1amp TEXT-S1 FOR FIELD NODATA

PARAMETERS4 NODATA DEFAULT 33 LOER CASE 7ata

SELECTION-SCREEN END OF LINE

----------------------------------------------------------------------

Batc5i)t7ata 0 si(e trasacti

DATA4 BDCDATA LIE BDCDATA OCCURS ITlt ltEADER LINE

essaes 0 ca(( trasacti

DATA4 MESSTAB LIE BDCMSGCOLL OCCURS ITlt ltEADER LINE

errr sessi )ee7 3 3 r 3X3amp

DATA4 E2GROUP2OPENED

essae tets

TABLES4 T1

copy SAP AG BC420 12-84

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 8588

----------------------------------------------------------------------

at se(ecti scree

----------------------------------------------------------------------

AT SELECTION-SCREEN

r) a7 ser st e 0i((e7 0r create sessi

IF SESSION = 3X3 AND

GROUP = SPACE OR USER = SPACE

MESSAGE E1MSamp

ENDIF

----------------------------------------------------------------------

)e 7ataset

----------------------------------------------------------------------

FORM OPEN2DATASET USING P2DATASET

OPEN DATASET P2DATASET IN TEXT MODE

IF S9-SUBRC

RITE4 TEXT-E S9-SUBRC

STOP

ENDIF

ENDFORM

----------------------------------------------------------------------

c(se 7ataset

----------------------------------------------------------------------

FORM CLOSE2DATASET USING P2DATASET

CLOSE DATASET P2DATASET

ENDFORM

----------------------------------------------------------------------

create atc5i)t sessi

t 0r ca(( trasacti siamp

----------------------------------------------------------------------

FORM OPEN2GROUP

IF SESSION = 3X3

SIP

RITE4 $amp 3Create r)3I1amp GROUP

SIP

)e atc5i)t r)

CALL FUNCTION 3BDC2OPEN2GROUP3

EXPORTING CLIENT = S9-MANDT

copy SAP AG BC420 12-85

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 8688

GROUP = GROUP

USER = USER

EEP = EEP

ltOLDDATE = ltOLDDATE

RITE4 amp 3BDC2OPEN2GROUP3I$amp

1$amp 3retrc7e43I+amp

S9-SUBRC

ENDIF

ENDFORM

----------------------------------------------------------------------

e7 atc5i)t sessi

ca(( trasacti si4 errr sessiamp

----------------------------------------------------------------------

FORM CLOSE2GROUP

IF SESSION = 3X3

c(se atc5i)t r)

CALL FUNCTION 3BDC2CLOSE2GROUP3

RITE4 amp 3BDC2CLOSE2GROUP3Iamp

1$amp 3retrc7e43I+amp

S9-SUBRC

ELSE

IF E2GROUP2OPENED = 3X3

CALL FUNCTION 3BDC2CLOSE2GROUP3

RITE4

RITE4 amp 3Fe5(era))e 6r7e eret3Iamp

ENDIF

ENDIF

ENDFORM

----------------------------------------------------------------------

Start e6 trasacti accr7i t )araeters

----------------------------------------------------------------------

FORM BDC2TRANSACTION USING TCODE

DATA4 L2MSTRINGamp

DATA4 L2SUBRC LIE S9-SUBRC

atc5 i)t sessi

IF SESSION = 3X3

CALL FUNCTION 3BDC2INSERT3

EXPORTING TCODE = TCODE

TABLES D9NPROTAB = BDCDATA

RITE4 3BDC2INSERT3Iamp

copy SAP AG BC420 12-86

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 8788

TCODE

3retrc7e43I+amp

S9-SUBRC

3RECORD43

S9-INDEX

ca(( trasacti si

ELSE

REFRESlt MESSTAB

CALL TRANSACTION TCODE USING BDCDATA

MODE CTUMODE

UPDATE CUPDATE

MESSAGES INTO MESSTAB

L2SUBRC = S9-SUBRC

RITE4 3CALL2TRANSACTION3

TCODE

3retrc7e43I+amp

L2SUBRC

3RECORD43

S9-INDEX

LOOP AT MESSTAB

SELECT SINGLE FROM T1 ltERE SPRSL = MESSTAB-MSGSPRA

AND ARBGB = MESSTAB-MSGID

AND MSGNR = MESSTAB-MSGNR

IF S9-SUBRC =

L2MSTRING = T1-TEXT

IF L2MSTRING CS 313

REPLACE 313 ITlt MESSTAB-MSGH1 INTO L2MSTRING

REPLACE 3$3 ITlt MESSTAB-MSGH$ INTO L2MSTRING

REPLACE 33 ITlt MESSTAB-MSGH INTO L2MSTRING

REPLACE 33 ITlt MESSTAB-MSGH INTO L2MSTRING

ELSE

REPLACE 33 ITlt MESSTAB-MSGH1 INTO L2MSTRING

REPLACE 33 ITlt MESSTAB-MSGH$ INTO L2MSTRING

REPLACE 33 ITlt MESSTAB-MSGH INTO L2MSTRING

REPLACE 33 ITlt MESSTAB-MSGH INTO L2MSTRING

ENDIF

CONDENSE L2MSTRING

RITE4 MESSTAB-MSGT9P L2MSTRING$+amp

ELSE

RITE4 MESSTAB

ENDIF

ENDLOOP

copy SAP AG BC420 12-87

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 8888

SIP

Eree 0e5(era))e

IF L2SUBRC AND E2GROUP SPACE

IF E2GROUP2OPENED = 3 3

CALL FUNCTION 3BDC2OPEN2GROUP3

EXPORTING CLIENT = S9-MANDT

GROUP = E2GROUP

USER = E2USER

EEP = E2EEP

ltOLDDATE = E2ltDATE

E2GROUP2OPENED = 3X3

ENDIF

CALL FUNCTION 3BDC2INSERT3

EXPORTING TCODE = TCODE

TABLES D9NPROTAB = BDCDATA

ENDIF

ENDIF

REFRESlt BDCDATA

ENDFORM

----------------------------------------------------------------------

Start e6 scree

----------------------------------------------------------------------

FORM BDC2D9NPRO USING PROGRAM D9NPRO

CLEAR BDCDATA

BDCDATA-PROGRAM = PROGRAM

BDCDATA-D9NPRO = D9NPRO

BDCDATA-D9NBEGIN = 3X3

APPEND BDCDATA

ENDFORM

----------------------------------------------------------------------

Isert 0ie(7

Page 85: BC420_46C - 012The Transaction Recorder

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 8588

----------------------------------------------------------------------

at se(ecti scree

----------------------------------------------------------------------

AT SELECTION-SCREEN

r) a7 ser st e 0i((e7 0r create sessi

IF SESSION = 3X3 AND

GROUP = SPACE OR USER = SPACE

MESSAGE E1MSamp

ENDIF

----------------------------------------------------------------------

)e 7ataset

----------------------------------------------------------------------

FORM OPEN2DATASET USING P2DATASET

OPEN DATASET P2DATASET IN TEXT MODE

IF S9-SUBRC

RITE4 TEXT-E S9-SUBRC

STOP

ENDIF

ENDFORM

----------------------------------------------------------------------

c(se 7ataset

----------------------------------------------------------------------

FORM CLOSE2DATASET USING P2DATASET

CLOSE DATASET P2DATASET

ENDFORM

----------------------------------------------------------------------

create atc5i)t sessi

t 0r ca(( trasacti siamp

----------------------------------------------------------------------

FORM OPEN2GROUP

IF SESSION = 3X3

SIP

RITE4 $amp 3Create r)3I1amp GROUP

SIP

)e atc5i)t r)

CALL FUNCTION 3BDC2OPEN2GROUP3

EXPORTING CLIENT = S9-MANDT

copy SAP AG BC420 12-85

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 8688

GROUP = GROUP

USER = USER

EEP = EEP

ltOLDDATE = ltOLDDATE

RITE4 amp 3BDC2OPEN2GROUP3I$amp

1$amp 3retrc7e43I+amp

S9-SUBRC

ENDIF

ENDFORM

----------------------------------------------------------------------

e7 atc5i)t sessi

ca(( trasacti si4 errr sessiamp

----------------------------------------------------------------------

FORM CLOSE2GROUP

IF SESSION = 3X3

c(se atc5i)t r)

CALL FUNCTION 3BDC2CLOSE2GROUP3

RITE4 amp 3BDC2CLOSE2GROUP3Iamp

1$amp 3retrc7e43I+amp

S9-SUBRC

ELSE

IF E2GROUP2OPENED = 3X3

CALL FUNCTION 3BDC2CLOSE2GROUP3

RITE4

RITE4 amp 3Fe5(era))e 6r7e eret3Iamp

ENDIF

ENDIF

ENDFORM

----------------------------------------------------------------------

Start e6 trasacti accr7i t )araeters

----------------------------------------------------------------------

FORM BDC2TRANSACTION USING TCODE

DATA4 L2MSTRINGamp

DATA4 L2SUBRC LIE S9-SUBRC

atc5 i)t sessi

IF SESSION = 3X3

CALL FUNCTION 3BDC2INSERT3

EXPORTING TCODE = TCODE

TABLES D9NPROTAB = BDCDATA

RITE4 3BDC2INSERT3Iamp

copy SAP AG BC420 12-86

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 8788

TCODE

3retrc7e43I+amp

S9-SUBRC

3RECORD43

S9-INDEX

ca(( trasacti si

ELSE

REFRESlt MESSTAB

CALL TRANSACTION TCODE USING BDCDATA

MODE CTUMODE

UPDATE CUPDATE

MESSAGES INTO MESSTAB

L2SUBRC = S9-SUBRC

RITE4 3CALL2TRANSACTION3

TCODE

3retrc7e43I+amp

L2SUBRC

3RECORD43

S9-INDEX

LOOP AT MESSTAB

SELECT SINGLE FROM T1 ltERE SPRSL = MESSTAB-MSGSPRA

AND ARBGB = MESSTAB-MSGID

AND MSGNR = MESSTAB-MSGNR

IF S9-SUBRC =

L2MSTRING = T1-TEXT

IF L2MSTRING CS 313

REPLACE 313 ITlt MESSTAB-MSGH1 INTO L2MSTRING

REPLACE 3$3 ITlt MESSTAB-MSGH$ INTO L2MSTRING

REPLACE 33 ITlt MESSTAB-MSGH INTO L2MSTRING

REPLACE 33 ITlt MESSTAB-MSGH INTO L2MSTRING

ELSE

REPLACE 33 ITlt MESSTAB-MSGH1 INTO L2MSTRING

REPLACE 33 ITlt MESSTAB-MSGH$ INTO L2MSTRING

REPLACE 33 ITlt MESSTAB-MSGH INTO L2MSTRING

REPLACE 33 ITlt MESSTAB-MSGH INTO L2MSTRING

ENDIF

CONDENSE L2MSTRING

RITE4 MESSTAB-MSGT9P L2MSTRING$+amp

ELSE

RITE4 MESSTAB

ENDIF

ENDLOOP

copy SAP AG BC420 12-87

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 8888

SIP

Eree 0e5(era))e

IF L2SUBRC AND E2GROUP SPACE

IF E2GROUP2OPENED = 3 3

CALL FUNCTION 3BDC2OPEN2GROUP3

EXPORTING CLIENT = S9-MANDT

GROUP = E2GROUP

USER = E2USER

EEP = E2EEP

ltOLDDATE = E2ltDATE

E2GROUP2OPENED = 3X3

ENDIF

CALL FUNCTION 3BDC2INSERT3

EXPORTING TCODE = TCODE

TABLES D9NPROTAB = BDCDATA

ENDIF

ENDIF

REFRESlt BDCDATA

ENDFORM

----------------------------------------------------------------------

Start e6 scree

----------------------------------------------------------------------

FORM BDC2D9NPRO USING PROGRAM D9NPRO

CLEAR BDCDATA

BDCDATA-PROGRAM = PROGRAM

BDCDATA-D9NPRO = D9NPRO

BDCDATA-D9NBEGIN = 3X3

APPEND BDCDATA

ENDFORM

----------------------------------------------------------------------

Isert 0ie(7

Page 86: BC420_46C - 012The Transaction Recorder

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 8688

GROUP = GROUP

USER = USER

EEP = EEP

ltOLDDATE = ltOLDDATE

RITE4 amp 3BDC2OPEN2GROUP3I$amp

1$amp 3retrc7e43I+amp

S9-SUBRC

ENDIF

ENDFORM

----------------------------------------------------------------------

e7 atc5i)t sessi

ca(( trasacti si4 errr sessiamp

----------------------------------------------------------------------

FORM CLOSE2GROUP

IF SESSION = 3X3

c(se atc5i)t r)

CALL FUNCTION 3BDC2CLOSE2GROUP3

RITE4 amp 3BDC2CLOSE2GROUP3Iamp

1$amp 3retrc7e43I+amp

S9-SUBRC

ELSE

IF E2GROUP2OPENED = 3X3

CALL FUNCTION 3BDC2CLOSE2GROUP3

RITE4

RITE4 amp 3Fe5(era))e 6r7e eret3Iamp

ENDIF

ENDIF

ENDFORM

----------------------------------------------------------------------

Start e6 trasacti accr7i t )araeters

----------------------------------------------------------------------

FORM BDC2TRANSACTION USING TCODE

DATA4 L2MSTRINGamp

DATA4 L2SUBRC LIE S9-SUBRC

atc5 i)t sessi

IF SESSION = 3X3

CALL FUNCTION 3BDC2INSERT3

EXPORTING TCODE = TCODE

TABLES D9NPROTAB = BDCDATA

RITE4 3BDC2INSERT3Iamp

copy SAP AG BC420 12-86

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 8788

TCODE

3retrc7e43I+amp

S9-SUBRC

3RECORD43

S9-INDEX

ca(( trasacti si

ELSE

REFRESlt MESSTAB

CALL TRANSACTION TCODE USING BDCDATA

MODE CTUMODE

UPDATE CUPDATE

MESSAGES INTO MESSTAB

L2SUBRC = S9-SUBRC

RITE4 3CALL2TRANSACTION3

TCODE

3retrc7e43I+amp

L2SUBRC

3RECORD43

S9-INDEX

LOOP AT MESSTAB

SELECT SINGLE FROM T1 ltERE SPRSL = MESSTAB-MSGSPRA

AND ARBGB = MESSTAB-MSGID

AND MSGNR = MESSTAB-MSGNR

IF S9-SUBRC =

L2MSTRING = T1-TEXT

IF L2MSTRING CS 313

REPLACE 313 ITlt MESSTAB-MSGH1 INTO L2MSTRING

REPLACE 3$3 ITlt MESSTAB-MSGH$ INTO L2MSTRING

REPLACE 33 ITlt MESSTAB-MSGH INTO L2MSTRING

REPLACE 33 ITlt MESSTAB-MSGH INTO L2MSTRING

ELSE

REPLACE 33 ITlt MESSTAB-MSGH1 INTO L2MSTRING

REPLACE 33 ITlt MESSTAB-MSGH$ INTO L2MSTRING

REPLACE 33 ITlt MESSTAB-MSGH INTO L2MSTRING

REPLACE 33 ITlt MESSTAB-MSGH INTO L2MSTRING

ENDIF

CONDENSE L2MSTRING

RITE4 MESSTAB-MSGT9P L2MSTRING$+amp

ELSE

RITE4 MESSTAB

ENDIF

ENDLOOP

copy SAP AG BC420 12-87

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 8888

SIP

Eree 0e5(era))e

IF L2SUBRC AND E2GROUP SPACE

IF E2GROUP2OPENED = 3 3

CALL FUNCTION 3BDC2OPEN2GROUP3

EXPORTING CLIENT = S9-MANDT

GROUP = E2GROUP

USER = E2USER

EEP = E2EEP

ltOLDDATE = E2ltDATE

E2GROUP2OPENED = 3X3

ENDIF

CALL FUNCTION 3BDC2INSERT3

EXPORTING TCODE = TCODE

TABLES D9NPROTAB = BDCDATA

ENDIF

ENDIF

REFRESlt BDCDATA

ENDFORM

----------------------------------------------------------------------

Start e6 scree

----------------------------------------------------------------------

FORM BDC2D9NPRO USING PROGRAM D9NPRO

CLEAR BDCDATA

BDCDATA-PROGRAM = PROGRAM

BDCDATA-D9NPRO = D9NPRO

BDCDATA-D9NBEGIN = 3X3

APPEND BDCDATA

ENDFORM

----------------------------------------------------------------------

Isert 0ie(7

Page 87: BC420_46C - 012The Transaction Recorder

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 8788

TCODE

3retrc7e43I+amp

S9-SUBRC

3RECORD43

S9-INDEX

ca(( trasacti si

ELSE

REFRESlt MESSTAB

CALL TRANSACTION TCODE USING BDCDATA

MODE CTUMODE

UPDATE CUPDATE

MESSAGES INTO MESSTAB

L2SUBRC = S9-SUBRC

RITE4 3CALL2TRANSACTION3

TCODE

3retrc7e43I+amp

L2SUBRC

3RECORD43

S9-INDEX

LOOP AT MESSTAB

SELECT SINGLE FROM T1 ltERE SPRSL = MESSTAB-MSGSPRA

AND ARBGB = MESSTAB-MSGID

AND MSGNR = MESSTAB-MSGNR

IF S9-SUBRC =

L2MSTRING = T1-TEXT

IF L2MSTRING CS 313

REPLACE 313 ITlt MESSTAB-MSGH1 INTO L2MSTRING

REPLACE 3$3 ITlt MESSTAB-MSGH$ INTO L2MSTRING

REPLACE 33 ITlt MESSTAB-MSGH INTO L2MSTRING

REPLACE 33 ITlt MESSTAB-MSGH INTO L2MSTRING

ELSE

REPLACE 33 ITlt MESSTAB-MSGH1 INTO L2MSTRING

REPLACE 33 ITlt MESSTAB-MSGH$ INTO L2MSTRING

REPLACE 33 ITlt MESSTAB-MSGH INTO L2MSTRING

REPLACE 33 ITlt MESSTAB-MSGH INTO L2MSTRING

ENDIF

CONDENSE L2MSTRING

RITE4 MESSTAB-MSGT9P L2MSTRING$+amp

ELSE

RITE4 MESSTAB

ENDIF

ENDLOOP

copy SAP AG BC420 12-87

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 8888

SIP

Eree 0e5(era))e

IF L2SUBRC AND E2GROUP SPACE

IF E2GROUP2OPENED = 3 3

CALL FUNCTION 3BDC2OPEN2GROUP3

EXPORTING CLIENT = S9-MANDT

GROUP = E2GROUP

USER = E2USER

EEP = E2EEP

ltOLDDATE = E2ltDATE

E2GROUP2OPENED = 3X3

ENDIF

CALL FUNCTION 3BDC2INSERT3

EXPORTING TCODE = TCODE

TABLES D9NPROTAB = BDCDATA

ENDIF

ENDIF

REFRESlt BDCDATA

ENDFORM

----------------------------------------------------------------------

Start e6 scree

----------------------------------------------------------------------

FORM BDC2D9NPRO USING PROGRAM D9NPRO

CLEAR BDCDATA

BDCDATA-PROGRAM = PROGRAM

BDCDATA-D9NPRO = D9NPRO

BDCDATA-D9NBEGIN = 3X3

APPEND BDCDATA

ENDFORM

----------------------------------------------------------------------

Isert 0ie(7

Page 88: BC420_46C - 012The Transaction Recorder

8112019 BC420_46C - 012The Transaction Recorder

httpslidepdfcomreaderfullbc42046c-012the-transaction-recorder 8888

SIP

Eree 0e5(era))e

IF L2SUBRC AND E2GROUP SPACE

IF E2GROUP2OPENED = 3 3

CALL FUNCTION 3BDC2OPEN2GROUP3

EXPORTING CLIENT = S9-MANDT

GROUP = E2GROUP

USER = E2USER

EEP = E2EEP

ltOLDDATE = E2ltDATE

E2GROUP2OPENED = 3X3

ENDIF

CALL FUNCTION 3BDC2INSERT3

EXPORTING TCODE = TCODE

TABLES D9NPROTAB = BDCDATA

ENDIF

ENDIF

REFRESlt BDCDATA

ENDFORM

----------------------------------------------------------------------

Start e6 scree

----------------------------------------------------------------------

FORM BDC2D9NPRO USING PROGRAM D9NPRO

CLEAR BDCDATA

BDCDATA-PROGRAM = PROGRAM

BDCDATA-D9NPRO = D9NPRO

BDCDATA-D9NBEGIN = 3X3

APPEND BDCDATA

ENDFORM

----------------------------------------------------------------------

Isert 0ie(7