Professional Documents
Culture Documents
Objective:
By M.S.Muthukrishnan-ABAP-ATOZ
BDC can be used primarily when installing the SAP system and when
transferring data from a legacy system (external system).
By M.S.Muthukrishnan-ABAP-ATOZ
BDC Methods :
Batch Input Session Method
Sequential Dataset
Sequential Dataset
BDC Table
BDC Table
Queue Dataset
Application Function
Application Function
SAP Database
SAP Database
By M.S.Muthukrishnan-ABAP-ATOZ
Features:
By M.S.Muthukrishnan-ABAP-ATOZ
B a t c h In p u t P r o c e s s i n g
S e q u e n tia l
file
Q u e u e f il e
C u s to m e r
d a ta
F l ig h t
c o n n e c tio n s
R e s e rv a tio n
d a ta
By M.S.Muthukrishnan-ABAP-ATOZ
F u n c tio n M o d u le s & P a r a m e te r s fo r S e s s io n M e th o d
BBDDCC__OOPPEENN__GGRROOUUPP
CClie
lienntt
SSeessssio
ionn nnaammee
CCLLIE
IENNTT
GGRROOUUPP
LLoocckk ddaate
te
DDeele
te
s
e
le te s essssio
ionn aafte
fterr
HHOOLLDD
KKEEEEPP
pprroocceessssin
ingg
BBDDCC uusseerr nnaammee
UUSSEERR
BBDDCC__IN
INSSEERRTT
TTrraannssaacctio
tionn ccooddee
BBDDCC ta
tabble
le
TTCCOODDEE
DDYYNNPPRROOTTAABB
BBDDCC__CCLLOOSSEE__GGRROOUUPP
By M.S.Muthukrishnan-ABAP-ATOZ
B D C T a b le
PPrrooggrraam
m
<<pprrooggrraam
m nnaam
mee>>
SSccrreeeenn
SSta
tarrtt
<<nnuum
mbbeerr 11>>
xx
FFie
ield
ld nnaam
mee
FFie
ield
ld ccoonnte
tennts
ts
<<fie
field
ld 1111>>
<<fie
field
ld 1122>>
<<vvaalu
luee 1111>>
<<vvaalu
luee 1122>>
...
...
<<pprrooggrraam
m nnaam
mee>>
<<nnuum
mbbeerr 22>>
...
...
xx
<<fie
field
ld 2211>>
<<fie
field
ld 2222>>
...
...
...
...
By M.S.Muthukrishnan-ABAP-ATOZ
<<vvaalu
luee 2211>>
<<vvaalu
luee 2222>>
...
...
...
...
By M.S.Muthukrishnan-ABAP-ATOZ
By M.S.Muthukrishnan-ABAP-ATOZ
1. Type transaction Code SHDB ( Transaction Recorder ), this is used to record our transaction
Press New Recording, Give Recording name, Give Transaction, And Press Start
Recording.
By M.S.Muthukrishnan-ABAP-ATOZ
By M.S.Muthukrishnan-ABAP-ATOZ
2. You will get the following screen, Give the selection screen inputs as below, finally Save.
Screen 1 :
By M.S.Muthukrishnan-ABAP-ATOZ
Screen 2:
By M.S.Muthukrishnan-ABAP-ATOZ
Screen 3:
By M.S.Muthukrishnan-ABAP-ATOZ
3. The following screen comes when you save, this shows table name and filed name which stores
the data given in respected selection screen of transaction. Next Press F3 to come back.
By M.S.Muthukrishnan-ABAP-ATOZ
By M.S.Muthukrishnan-ABAP-ATOZ
By M.S.Muthukrishnan-ABAP-ATOZ
By M.S.Muthukrishnan-ABAP-ATOZ
By M.S.Muthukrishnan-ABAP-ATOZ
By M.S.Muthukrishnan-ABAP-ATOZ
By M.S.Muthukrishnan-ABAP-ATOZ
By M.S.Muthukrishnan-ABAP-ATOZ
By M.S.Muthukrishnan-ABAP-ATOZ
By M.S.Muthukrishnan-ABAP-ATOZ
By M.S.Muthukrishnan-ABAP-ATOZ
4. Now replace the constants in perform statement within loop by internal table name
With field name. Make the values used in recording in . Then Save, Activate
By M.S.Muthukrishnan-ABAP-ATOZ
By M.S.Muthukrishnan-ABAP-ATOZ
This is our data in MS-Excel. This order must be of the Internal table in ABAP report.
Unformatted Excel
By M.S.Muthukrishnan-ABAP-ATOZ
By M.S.Muthukrishnan-ABAP-ATOZ
By M.S.Muthukrishnan-ABAP-ATOZ
Now Give respected Length for each fields. By placing Cursor in each column, Right
Click, Select Column Width.
By M.S.Muthukrishnan-ABAP-ATOZ
By M.S.Muthukrishnan-ABAP-ATOZ
After Changing all column length, save the excel file. And save a copy as Formatted
text space delimited
While Saving, Give OK, Yes, Then Close Excel by giving No. The File Extension will be .PRN
By M.S.Muthukrishnan-ABAP-ATOZ
Now come to ABAP editor and run the report, you will get the screen.
Select Call transaction Radio Button, and run in a mode. Press F8
By M.S.Muthukrishnan-ABAP-ATOZ
Now in next screen Give the .prn file you saved previously. ( .prn must be selected )
Then press Transfer.
By M.S.Muthukrishnan-ABAP-ATOZ
You will get following screen, Just Check for correct order of data, if yes, Press Enter
By M.S.Muthukrishnan-ABAP-ATOZ
The vendor created. And system shows log. If small errors you can select that from F4
help and run the report.
By M.S.Muthukrishnan-ABAP-ATOZ
Testing
FK03 -> Give Vendor no, Comp code. Enter. Select desired radio button and enter
By M.S.Muthukrishnan-ABAP-ATOZ
By M.S.Muthukrishnan-ABAP-ATOZ
Features:
T h e C A L L T R A N S A C T IO N S t a te m e n t
A NASNAS
CA
T IO
CC A LLLL TTR R
CN
T IO N
<BD
ta C
b let>a b le >
UU S IN
INGG
<C
BD
MM
OD
< d is p<la
OED E
d yismpolad ey> m o d e >
< u p<duaptedm
UU P DDAATTE E
a toed em> o d e >
ME
E SSSSAA
GG
E SE SIN TIN
O T
<m
s sm
taeb s
> s ta b >
M
Oe <
yy y
m
ee>>
is
lala
m om
oddo
<<<dddis
ispppla
d::e > :
AA
DD is pplalay ya lla ll
EE
y ly
if thife tr eh e
a rree ear rroer se r r o r s
DD is pplalay yo nol n
NN
is ppla
DD is
lay yn onth
o in
t hgin g
m
ee>d
tet e
mom
oddo
>::e > :
<<<uuupppdddaaate
SS
eu
p reo cpersoscinegsusnin
tilg u n t il
DD o nnoot tc oc notin
n tuin
e dh(s
u sr )o n o u s )
uu p ddaatet eh ahsa fin
s fisinh is
e ydn c( sh ryonnco h
AA
e scseinsgs im
m eim
d iam
tee
l yd ia t e ly
CC o nntin
t inu ue ep rpo cr o
in g
s sp io
B a tc S
h ein
u tn
RReetu
turrnn ccooddee
NNoo
CCAALLLL TTRRAANNSSAACCTTIO
IONN
YYeess
S y n c h rYoenso u s
A s y n c h r o n oN
uo
s /S y n c h r o n o u s
PPrroocceessssin
ingg
TTim
imee-d
-deela
layyeedd
Im
Imm
meeddia
iate
tely
ly
T r a n s a c tio n s
M o r e th a n o n e
O n ly O n e
E rro r L o g
W ill b e c r e a te d
W ill n o t b e
c r e a te d
By M.S.Muthukrishnan-ABAP-ATOZ
ABAP/4 provides three statements for handling files and two statements
for processing files:
OPEN DATASET
CLOSE DATASET
DELETE DATASET
READ DATASET
TRANSFER
Handling Files
Processing Files
By M.S.Muthukrishnan-ABAP-ATOZ
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.
By M.S.Muthukrishnan-ABAP-ATOZ
By M.S.Muthukrishnan-ABAP-ATOZ
Note :
You can only use one of the additions 1 to 3 in a single statement
By M.S.Muthukrishnan-ABAP-ATOZ
Note
OPEN ... AT POSITION p does not work for file positions where p >= 2
giga bytes.
By M.S.Muthukrishnan-ABAP-ATOZ
Example
Under UNIX, the following statements opens the file dsn and writes
the data to the file in compressed form because of the UNIX command
'compress' :
DATA dsn(20) VALUE '/usr/test.dat'.
OPEN DATASET dsn FOR OUTPUT FILTER 'compress'.
By M.S.Muthukrishnan-ABAP-ATOZ
Syntax
CLOSE DATASET <dsn>.
DELETE DATASET
Deletes the file specified file. If it deletes the file successfully it
returns SY-SUBRC = 0. Otherwise returns SY-SUBRC = 4. The
possible reasons for failing are:
By M.S.Muthukrishnan-ABAP-ATOZ
FILELENGTH
The length of the generated file is returned.
By M.S.Muthukrishnan-ABAP-ATOZ
FILE_OPEN_ERROR
FILE_WRITE_ERROR
INVALID_FILE_SIZE
By M.S.Muthukrishnan-ABAP-ATOZ
By M.S.Muthukrishnan-ABAP-ATOZ
TRANSACTION method.
And special function modules for reading and writing data files on
presentation server, WS_UPLOAD and WS_DOWNLOAD.
By M.S.Muthukrishnan-ABAP-ATOZ
BOH
Basic Data2
Description
(40)
Unit Of
Measure
(3)
Material1
KG
(1)
By M.S.Muthukrishnan-ABAP-ATOZ