Académique Documents
Professionnel Documents
Culture Documents
Objective:
presentation server.
Features :
BDC can be used primarily when installing the SAP system and when
transferring data from a legacy system (external system).
Types of BDC :
CALL TRANSACTION
Asynchronous processing.
BatchInput Processing
Sequential
file
B
a
ttc
h
p
u
ttp
rro
g
rra
m
B
a
c
hin
in
p
u
p
o
g
a
m
Q
ueuefile
B
a
ttc
h
p
u
ttffu
n
c
ttio
n
B
a
c
hin
in
p
u
u
n
c
io
n
S
A
P
/3
S
A
PR
R
/3
Custom
er
data
Flight
connections
Reservation
data
FunctionModules&ParametersforSessionMethod
B
D
C
_
O
P
E
N
_
G
R
O
U
P
B
D
C
_
O
P
E
N
_
G
R
O
U
P
C
lie
n
tt
C
lie
n
S
e
s
s
io
n
a
m
e
Sessio
nn
n
a
m
e
L
o
c
k
d
a
te
Lockdate
D
e
le
te
e
s
s
io
n
fte
rr
D
e
le
tes
s
e
s
s
io
na
a
fte
p
rro
c
e
s
s
in
g
p
o
c
e
s
s
in
g
B
D
C
u
s
e
r
n
a
m
e
BDCuserna
m
e
C
L
IE
N
T
C
L
IE
N
T
G
R
O
U
P
GROUP
H
O
L
D
H
O
L
D
K
E
E
P
KEEP
U
S
E
R
U
S
E
R
B
D
C
_
IN
S
E
R
T
B
D
C
_
IN
S
E
R
T
T
rra
n
s
a
c
tio
n
o
d
e
T
a
n
s
a
c
tio
nc
c
o
d
e
B
D
C
ta
b
le
BDCtable
B
D
C
_
C
L
O
S
E
_
G
R
O
U
P
B
D
C
_
C
L
O
S
E
_
G
R
O
U
P
T
C
O
D
E
T
C
O
D
E
D
Y
N
P
R
O
T
A
B
DYNPR
O
T
A
B
BDCTable
P
rro
g
rra
m
P
o
g
a
m
<
p
rro
g
rra
m
n
a
m
e
>
<
p
o
g
a
m
n
a
m
e
>
<
p
rro
g
rra
m
n
a
m
e
>
<
p
o
g
a
m
n
a
m
e
>
S
c
rre
e
n
S
c
e
e
n
S
tta
rrtt
S
a
<
n
u
m
b
e
rr1
>
<
n
u
m
b
e
1
>
x
x
<
n
u
m
b
e
rr2
>
<
n
u
m
b
e
2
>
F
ie
ld
a
m
e
F
ie
ldn
n
a
m
e
F
ie
ld
o
n
tte
n
tts
F
ie
ldc
c
o
n
e
n
s
<
ffie
ld
1
>
<
ie
ld1
1
1
>
<
ffie
ld
2
>
<
ie
ld1
1
2
>
...
...
<
v
a
lu
e
1
>
<
v
a
lu
e1
1
1
>
<
v
a
lu
e
2
>
<
v
a
lu
e1
1
2
>
...
...
<
ffie
ld
1
>
<
ie
ld2
2
1
>
<
ffie
ld
2
>
<
ie
ld2
2
2
>
...
...
...
...
<
v
a
lu
e
1
>
<
v
a
lu
e2
2
1
>
<
v
a
lu
e
2
>
<
v
a
lu
e2
2
2
>
...
...
...
...
x
x
TheCALLTRANSACTIONStatem
ent
CA
AL
L
RR
AN
S
A
CA
TIO
C
L
LTT
A
N
S
CN
TION
<tr
tra
s
aa
ctc
io
nc
od
>
<
an
n
s
tio
n
ce
o
de>
U
SIN
G
<BD
taC
ble
>ble>
U
S
IN
G
<C
BD
ta
M
OD
E
la
m
o
de
M
O
DE <disp
<
dy
is
p
la
y>m
ode>
U
PD
A
T
EE <up
d
ap
te
m
ode
>ode>
U
P
D
A
T
<
u
d
ate
m
M
ES
S
A
G
ES
INT
OT
<m
e<
ss
tae
bs
>stab>
M
E
S
S
A
G
ES
IN
O
m
<
d
is
p
la
y
m
o
d
e
>
::e>:
<
d
is
p
la
yy
m
o
d
e
>
<
d
is
p
la
m
o
d
A
A
E
E
N
N
Dis
isp
la
yy
all
D
p
la
all
Dis
isp
la
yy
on
ly
if th
ee
arre
rrr
o
rs
D
p
la
o
nly
iferth
eea
e
errors
Dis
isp
la
yy
no
to
hin
g
D
p
la
n
th
ing
<
u
p
d
a
tte
m
o
d
e
>
::e>:
<
p
d
a
e
m
o
d
e
>
<
u
p
d
a
te
m
o
d
S
S
Do
on
o
ttco
tn
in
ueu
pr
oc
e
sc
in
g
n
tilguntil
D
n
o
cn
o
tin
e
p
rs
o
e
su
s
in
up
pd
a
te
ha
s
infin
ishis
ed
(s
nc
hr
o
nc
oh
us
u
d
a
te
h
afs
h
ey
d
(s
y
n
r)onous)
A
A
Co
on
ttin
inuu
ee
prp
oc
es
s
in
g
dia
tee
ly
C
n
ro
c
e
s
sim
inm
ge
im
m
diately
ss
BatcS
he
in
pio
utn
R
e
tu
rrn
o
d
e
R
e
tu
nc
c
o
d
e
N
o
N
o
C
A
L
L
R
A
N
S
A
C
T
IO
N
C
A
L
LT
T
R
A
N
S
A
C
T
IO
N
Y
e
s
Y
e
s
D
a
ta
sg
eg
U
pg
date
E
rr
ob
ra
lo
in
SynchrY
o
n
ous
e
s
AsynchronoN
uo
s/Synchronous
P
rro
c
e
s
s
in
g
P
o
c
e
s
s
in
g
T
im
e
-d
e
la
y
e
d
T
im
e
-d
e
la
y
e
d
Im
m
e
d
ia
te
ly
Im
m
e
d
ia
te
ly
Transactions
Morethanone
OnlyOne
ErrorLog
W
ill becreated
W
ill not be
created
OPEN DATASET
CLOSE DATASET
DELETE DATASET
READ DATASET
TRANSFER
OPEN DATASET
Opens the specified file. If you do not use any additions, the file is
opened for reading in binary mode. It returns SY-SUBRC = 0 if the file
is opened successfully. Otherwise SY-SUBRC = 8.
Syntax
OPEN DATASET <dsn> [Additions].
Additions:
1.
2.
3.
4.
5.
6.
7.
8.
9.
This statement tries to open the file in 'append' mode. If the file is
already open, the system moves to the end of the file. When you open
a file using FOR APPENDING, attempting to read the file sets SYSUBRC to 4. The system display the end of the file.
Note :
You can only use one of the additions 1 to 3 in a single statement
The contents of the file are not structured in lines in the READ
DATASET or TRANSFER operations. Instead, they are input or output
as a stream. You do not have to specify the IN BINARY MODE addition
explicitly.
5. OPEN DATASET <dsn> IN TEXT MODE.
If you use this addition, the contents of the file are structured in lines.
Each time you use the READ DATASET or TRANSFER statement, the
system reads or writes a single line. If the data object to which you
are transferring the data is too big, it is padded with spaces. If it is too
small, the data record is truncated.
Note
You can only use one of additions 4 and 5 in a single statement.
Use this addition to specify the explicit starting position p in the file
(calculated in bytes from the start of the file). The next read or write
operation will start at this position. You cannot position before the
beginning of the file. Do not use this addition with the IN TEXT MODE
addition, since the physical representation of a text file depends
heavily on the underlying operating system.
If you use OPEN ... FOR OUTPUT AT POSITION ..., the contents of the
file are destroyed if the file already existed. To avoid this, use OPEN ...
FOR INPUT AT POSITION ... instead.
Note
OPEN ... AT POSITION p does not work for file positions where p >= 2
giga bytes.
FILE_WRITE_ERROR
INVALID_FILE_SIZE
To read data from the presentation server into an internal table we use
the function module WS_UPLOAD. The most important parameters
that are exported are as follows:
CODEPAGE
Only for download in DOS.
FILENAME
Name of the file
FILETYPE
The source file type. Valid values are:
BIN : Binary files.
ASC: ASCII files, text files with end-of-line markers.
DAT: The file is loaded line by line into the transferred table.
Tabs in the file mean a change of field.
And special function modules for reading and writing data files on
presentation server, WS_UPLOAD and WS_DOWNLOAD.
Material
Basic Data1
Group
(4)
(1)
BOH
Basic Data2
(1)
Description
(40)
Material1
Unit Of
Measure
(3)
KG