Вы находитесь на странице: 1из 62

, .

www.sapforum.biz,
: 1, Darth, Tav_48, Bdmalex .. , ,
, ,
, Dmitriy- -, .
,
uukrul@sapforum.biz.
1. .........................................................................................2
2. .............................................................................. 5
3. WHERE....................................................................7
4. ........................................................................ 11
5. ........................................................................................ 12
6. .................................................................................. 13
7. COMMIT WORK.............................................................................................................. 19
8. ................................................................................. 25
8.1. ............................................................................25
8.2. ...................................................................................28
8.3. ..........................................................................30
9. : LOOP, READ, DELETE .................................37
10. .............................................................................................. 44
10.1. . ...........................................44
10.2. SLIN .........................................................45
10.3. SCI / SCII SAP Code Inspector............................................................................55
, ABAP , -
//, , , ,
. ,
, ,
, .
, ABAP , . .
. , ,
, SELECT ,
.
,
, - , , .
, ,
.

ABAP, . ,
, . . , ,
, , ,
,
.
, , ,
, , ...
1 62 www.sapforum.biz

(: 1.2)

, , ,
, .
, ABAP,
SAP R/3"
.

1.

, , .
600
, , ,
, , - ,
. MKPF .
, SELECT.
ENDSELECT.,
LOOP AT < >. ENDLOOP.
.
.
DATA: lt_mkpf LIKE mkpf OCCURS 1 WITH HEADER LINE.

.
, , ,

: 1.355.738 .
a1)

SELECT * INTO TABLE lt_mkpf FROM mkpf.

, MKPF,
LT_MKPF,
. ,
INTO INTO CORRESPONDING FIELDS OF . .,
, ,
. ,
0,1%, .
: 1.369.663 .
b1)

SELECT * INTO CORRESPONDING FIELDS OF TABLE lt_mkpf


FROM mkpf.

, ,
, A1 , ,
.
, , ,
, , : MBLNR
, MJAHR , XBLNR , BKTXT
. .
2 62 www.sapforum.biz

(: 1.2)

: 360.492 .
c1)

SELECT MBLNR MJAHR XBLNR BKTXT


INTO CORRESPONDING FIELDS OF TABLE lt_mkpf
FROM mkpf.

4 .
,
, , , INTO TABLE , 15% 20%
DATA: BEGIN OF lt_mkpf_short OCCURS 0,
mblnr LIKE mkpf-mblnr,
mjahr LIKE mkpf-mjahr,
xblnr LIKE mkpf-xblnr,
bktxt LIKE mkpf-bktxt,
END OF lt_mkpf_short.

: 389.617 .
d1)

SELECT mblnr mjahr xblnr bktxt


INTO CORRESPONDING FIELDS OF TABLE lt_mkpf_short
FROM mkpf.

: 314.952 .
e1)

SELECT mblnr mjahr xblnr bktxt


INTO TABLE lt_mkpf_short
FROM mkpf.

, , .
, ,
, , . ,
MKPF.
DATA: lt_mkpf LIKE mkpf OCCURS 1 WITH HEADER LINE.

: 1.323.437 .
f1)

SELECT

MBLNR MJAHR VGART BLART BLAUM BLDAT BUDAT


CPUDT CPUTM AEDAT USNAM TCODE XBLNR BKTXT
FRATH FRBNR WEVER XABLN AWSYS BLA2D TCODE2
BFWMS EXNUM SPE_BUDAT_UHR SPE_BUDAT_ZONE
LE_VBELN SPE_LOGSYS SPE_MDNUM_EWM GTS_CUSREF_NO
KNUMV
INTO CORRESPONDING FIELDS OF TABLE lt_mkpf
FROM mkpf.

: 1.349.799 .
g1)

SELECT * INTO TABLE lt_mkpf FROM mkpf.

CORRESPONDING FIELDS,
, INTO TABLE, , ,
, .
, , .
: 1.348.756 .
h1)

SELECT

CPUDT
MBLNR
BFWMS
FRATH
KNUMV

CPUTM
MJAHR
EXNUM
FRBNR

AEDAT USNAM TCODE XBLNR BKTXT


VGART BLART BLAUM BLDAT BUDAT
SPE_BUDAT_UHR SPE_BUDAT_ZONE
WEVER XABLN AWSYS BLA2D TCODE2

3 62 www.sapforum.biz

(: 1.2)

LE_VBELN SPE_LOGSYS SPE_MDNUM_EWM GTS_CUSREF_NO


INTO CORRESPONDING FIELDS OF TABLE lt_mkpf
FROM mkpf.

H1,
G1.
, , ,
, .
,
. SELECT
<>. ENDSELECT.
: 1.590.766 .
I1)

SELECT * INTO lt_mkpf

FROM mkpf.

ENDSELECT.

: 1.611.237 .
k1)

SELECT * INTO CORRESPONDING FIELDS OF lt_mkpf FROM mkpf.


ENDSELECT.

,
10% 15%. , . ,
, , .
: 561.934 .
j1)

SELECT MBLNR
MJAHR
VGART
BLART
INTO CORRESPONDING FIELDS OF lt_mkpf
FROM mkpf.
ENDSELECT.

J1 , I1.
, ,
F1 H1, . . .
(): , ,
E1,
, . ,
.
(): ,
,
. ,
, . ,
, ,
, , ,
.

4 62 www.sapforum.biz

(: 1.2)

2.

SUM, COUNT, MAX . .


. , , . .
,
. , ,
. DB6, 1:
Database.png. , ,
.

1: Database.png

,
SELECT SUM( menge ) FROM mkpf WHERE xauto = 'X' AND meins = 'ST'.

. . , ,
. :
DATA: l_menge LIKE mseg-menge.
DATA: BEGIN OF lt_mseg OCCURS 0,
menge LIKE mseg-menge,
END OF lt_mseg.

: 1.764.975 .
a2)

SELECT SUM( menge ) INTO l_menge FROM mseg


WHERE xauto = 'X' AND meins = 'ST'.

: 1.524.474 .
b2)

SELECT menge INTO TABLE lt_mseg


FROM mseg WHERE xauto = 'X' AND meins = 'ST'.
CLEAR: l_menge.
LOOP AT lt_mseg.
l_menge = l_menge + lt_mseg-menge.
ENDLOOP.

B2, ,
,
A2. ,
B2 7% 15%. 10%
.
: , .
,
B2.
COUNT
DATA: l_menge LIKE mseg-menge,
l_count LIKE sy-tabix.

5 62 www.sapforum.biz

(: 1.2)

DATA: BEGIN OF lt_mseg OCCURS 0,


menge LIKE mseg-menge,
END OF lt_mseg.

: 2.880.489 .
c2)

SELECT COUNT( * ) INTO l_count FROM mseg


WHERE xauto = 'X' AND meins = 'ST'.

: 2.152.414 .
d2)

SELECT menge INTO TABLE lt_mseg


FROM mseg WHERE xauto = 'X' AND meins = 'ST'.
CLEAR: l_count.
LOOP AT lt_mseg.
l_count = l_count + 1.
ENDLOOP.

, D2 , C2. 50
, D2 2.
, 10% 15%
.
MIN MAX , . .
, .
DATA: l_menge LIKE mseg-menge,
DATA: BEGIN OF lt_mseg OCCURS 0,
menge LIKE mseg-menge,
END OF lt_mseg.

: 2.394.439 .
e2)

SELECT menge INTO TABLE lt_mseg


FROM mseg WHERE xauto = 'X' AND meins = 'ST'.
SORT lt_mseg BY menge DESCENDING.
READ TABLE lt_mseg INDEX 1.

: 2.332.711 .
f2)

SELECT MAX( menge ) INTO l_menge FROM mseg


WHERE xauto = 'X' AND meins = 'ST'.

: 2.335.711 .
G2)

SELECT menge INTO TABLE lt_mseg


FROM mseg WHERE xauto = 'X' AND meins = 'ST'
ORDER BY menge DESCENDING.
READ TABLE lt_mseg INDEX 1.

E2 , ORDER BY, . .
, G2,
, F2. ,
, . E2 F2,
3% 5%.
: Oracle 9,
COSS/COCP/COEP, ,

. , GROUP BY .

6 62 www.sapforum.biz

(: 1.2)

():
,
, .
,
COUNT SUM ,
, ,
MIN MAX, , ,
.
(): ,
,
.

3.

WHERE.

, - ,
. , , ,
, .
, ,
WHERE, ,
. , ,
, .
, ,
, . . WHERE,
, ,
, .
:
: 1.835.003 .
a3)

SELECT * FROM SBOOK INTO SBOOK_WA.


CHECK: SBOOK_WA-CARRID = 'LH' AND
SBOOK_WA-CONNID = '0400'.
ENDSELECT.

: 72.706 .
b3)

SELECT * FROM SBOOK INTO SBOOK_WA


WHERE CARRID = 'LH' AND
CONNID = '0400'.
ENDSELECT.

, WHERE, , . ,
FOR ALL ENTRIES IN,
, . ,
, ,
, .
DATA: BEGIN OF lt_mseg OCCURS 0,
menge LIKE mseg-menge,
END OF lt_mseg.
DATA: BEGIN OF lt_meins OCCURS 0,
meins LIKE mseg-meins,
END OF lt_meins.

: 2.190.261 .
7 62 www.sapforum.biz

(: 1.2)

3)

CLEAR: lt_meins[].
SELECT menge INTO TABLE lt_mseg
FROM mseg
FOR ALL ENTRIES IN lt_meins
WHERE meins = lt_meins-meins.

: 1.748.061 .
d3)

SELECT menge INTO TABLE lt_mseg


FROM mseg.

, , ,
FOR ALL ENTRIES. ,
.
, ,
lt_meins.
,
, , .
SE11.
, , 2: SE11-4.png.

2: SE11-4.png

, ,
0, ,
. , MKPF,
, .
.
, ,
WHERE , ,
,
. ,
WHERE , .. 1 2,
8 62 www.sapforum.biz

(: 1.2)

2 1, .
DB2 . ,
, ..
WHERE , , ,
. ,
, .
. , Estimated
Costs ,
() , , .
NOT ,
NOT
. .
<>, .
MSEG ST05.
U100 0001 0002.
, .
, , 0001.
:
data: lt_mseg like mseg occurs 1 with header line.

: 1.660 .
e3)

SELECT * INTO TABLE lt_mseg


FROM mseg WHERE werks = '1000' AND lgort = '0001'.

: 16.215 .
f3)

SELECT * INTO TABLE lt_mseg


FROM mseg WHERE werks = '1000' AND lgort <> '0002'.

, , 0002, ..
0001, .
.
E3 F3. E3
MSEG~TST, 3: ST05-TST-0.png.

9 62 www.sapforum.biz

(: 1.2)

3: ST05-TST-0.png

F3, , , MSEG~M,
, , ,
<> 0002, , 4: ST05-TST-2.png, ..
, .

4: ST05-TST-2.png

, ,
, , , 2200 IDES
30 0001,
, IN,
0001, 0001.
: 274 .
10 62 www.sapforum.biz

(: 1.2)

g3)

select * into table lt_mseg


from mseg where
werks = '2200' and
lgort IN ('0002', '0003', '0004', '0088', '0131', <
>, 'WL41', 'WL42').

: 9.981 .
h3)

select * into table lt_mseg


from mseg where werks = '2200' and lgort <> '0001'.

, ,
H3, , 4: ST05-TST-2.png.
G3 ,
RANGES 2200 , 0001.
(): , ,
, WHERE,
,
, .
WHERE NOT (<>),

IN. , ,
.
(): , WHERE,

,
. , ,
, WHERE , ..
,
.

4.

SAP, ,
.
. .
: 764 .
a4)

SELECT * FROM SBOOK INTO SBOOK_WA


WHERE CARRID = 'LH'.
EXIT.
ENDSELECT.

: 103 .
b4)

SELECT * FROM SBOOK INTO SBOOK_WA


UP TO 1 ROWS
WHERE CARRID = 'LH'.
ENDSELECT.

, , 6 8 ,
UP TO <x> ROWS
COUNT( * ), .
: 1.424 .
11 62 www.sapforum.biz

(: 1.2)

c4)

DATA l_count like sy-tabix.


SELECT COUNT( * ) INTO l_count
FROM SBOOK UP TO 1 ROWS
WHERE CARRID = 'LH'.

: 103 .
d4)

SELECT SINGLE * FROM sbook INTO sbook_wa


WHERE carrid = 'LH' .


SELECT SINGLE. D4, B4.
, B4 D4,
. , ,
SLIN, :
In "SELECT SINGLE ...", the WHERE condition for the key field "BOOKID" does not
test for equality. Therefore, the single record in question may not be unique.

, , SELECT SINGLE,
WHERE,
, WHERE , ,
, .
, ,
, .
(): ,
UP TO <X> ROWS. , SAP,
.
(): ,
, , ,
CARRID. , , ,
, B4 6-7
, D4 10-11 , .. D4 50
, 4-5 ,
.

5.

,
, .
, .
: 83 .
5)

SELECT SINGLE * FROM T100 INTO T100_WA


BYPASSING BUFFER
WHERE SPRSL = 'D' AND
ARBGB = '00' AND
MSGNR = '999'.

: 5 .
b5)

SELECT SINGLE * FROM T100


WHERE SPRSL = 'D' AND
ARBGB = '00' AND

INTO T100_WA

12 62 www.sapforum.biz

(: 1.2)

MSGNR = '999'.

(): ,
. , ,
, BYPASSING
BUFFER,
, ,
SE13, 3: SE13.png. MSEG
, T100, , MSEG
BYPASSING BUFFER .
():
. SAP
, .
table buffer,
. ,
, , ,
, .
, ,
. Z-
,
,
. SAP, .
.

5: SE13.png

6.

SQL, , ,
.
: 6.292 .
a6)

SELECT * FROM SPFLI INTO SPFLI_WA.


SELECT * FROM SFLIGHT INTO SFLIGHT_WA
WHERE CARRID = SPFLI_WA-CARRID AND
CONNID = SPFLI_WA-CONNID.

13 62 www.sapforum.biz

(: 1.2)

ENDSELECT.
ENDSELECT.

: 7.673 .
b6)

SELECT * INTO WA
FROM SPFLI AS P
INNER JOIN SFLIGHT AS F ON
P~CARRID = F~CARRID AND
P~CONNID = F~CONNID.
ENDSELECT.

, ,
, , .
: 28.083.839 .
c6)

TABLES: mkpf, mseg.

SELECT * FROM mkpf.


SELECT * FROM mseg
WHERE mblnr = mkpf-mblnr AND
mjahr = mkpf-mjahr.
ENDSELECT.
ENDSELECT.

: 16.145.212 .
d6)

DATA: lt_mseg LIKE mseg.


SELECT * INTO CORRESPONDING FIELDS OF lt_mseg
FROM mkpf AS m
INNER JOIN mseg AS s ON
m~mblnr = s~mblnr AND
m~mjahr = s~mjahr.
ENDSELECT.

, , ,
, , . ,
, ,
, , . .
MKPF , MSEG.
(): - ,
, , ,
. , ,

, 1,
.
,
. , ,
. ,
,
%_HINTS. Oracle
MARA, ,
, :
e6)

SELECT * UP TO 10 ROWS FROM mara


WHERE
MTART = 'HAWA' AND

14 62 www.sapforum.biz

(: 1.2)

MATKL = '100'
%_HINTS ORACLE 'index(mara"T")'.

, ,

. , ,
, ,
, , .
(): , , ,
%_HINTS,
,
, , , .
, , ,
. ,
.
,
, , > 1.000.000 ,
MSEG .
,
,
MSEG (SELECT SINGLE ...)
(sy-subrc = 0) , .
. , ,
, .
.
f6)

SELECT mseg~mblnr mseg~mjahr mseg~zeile mseg~bwart mseg~xauto


mseg~matnr mseg~werks mseg~lgort mseg~insmk mseg~shkzg
mseg~dmbtr mseg~bwtar mseg~menge mseg~bustm mkpf~budat
INTO TABLE lt_mseg
FROM mseg
JOIN mkpf ON mkpf~mblnr = mseg~mblnr AND
mkpf~mjahr = mseg~mjahr
WHERE mseg~matnr IN s_matnr
AND mseg~werks IN s_werks
AND mseg~lgort IN s_lgort
AND mseg~sobkz = ' '
AND mseg~smbln = ' '
AND mkpf~budat IN r_date
AND NOT EXISTS ( SELECT * FROM *mseg WHERE smbln = mseg~mblnr
AND sjahr = mseg~mjahr
AND smblp = mseg~zeile ).

.
, .
():
, , ,
. ,
,
.
15 62 www.sapforum.biz

(: 1.2)

(): , ,
,
, ..
.
.
. , ,
. . ,
.
.
*
DATA: BEGIN OF ls_t006a,
msehi LIKE t006a-msehi,
mseht LIKE t006a-mseht,
msehl LIKE t006a-msehl,
END OF ls_t006a.
DATA: BEGIN OF lt_t006a OCCURS 0,
INCLUDE STRUCTURE ls_t006a.
DATA: END OF lt_t006a.
DATA: BEGIN OF lt_mseg_short OCCURS 0,
mblnr LIKE mseg-mblnr,
mjahr LIKE mseg-mjahr,
zeile LIKE mseg-zeile,
bwart LIKE mseg-bwart,
matnr LIKE mseg-matnr,
menge LIKE mseg-menge,
meins LIKE mseg-meins,
mseht LIKE t006a-mseht,
msehl LIKE t006a-msehl,
END OF lt_mseg_short.

MSEG ,
,
.
: 10.677.944 .
g6)

CLEAR: lt_mseg_short[], lt_t006a[].


SELECT
mblnr
mjahr
zeile
bwart
matnr
menge
meins
INTO TABLE lt_mseg_short
FROM mseg.
LOOP AT lt_mseg_short.
SELECT SINGLE mseht msehl INTO CORRESPONDING FIELDS OF ls_t006a
FROM t006a WHERE spras = sy-langu AND
msehi = lt_mseg_short-meins.
lt_mseg_short-mseht = ls_t006a-mseht.
lt_mseg_short-msehl = ls_t006a-msehl.
MODIFY lt_mseg_short.

16 62 www.sapforum.biz

(: 1.2)

ENDLOOP.

, MSEG T006A,

: 6.795.740 .
h6)

CLEAR: lt_mseg_short[], lt_t006a[].


SELECT
m~mblnr
m~mjahr
m~zeile
m~bwart
m~matnr
m~menge
m~meins
t~mseht
t~msehl
INTO TABLE lt_mseg_short
FROM mseg AS m
JOIN t006a AS t ON t~spras = sy-langu AND
t~msehi = m~meins.

, ,
G6.
.
: 5.563.088 .
i6)

CLEAR: lt_mseg_short[], lt_t006a[].


SELECT
mblnr
mjahr
zeile
bwart
matnr
menge
meins
INTO TABLE lt_mseg_short
FROM mseg.
SELECT

msehi
mseht
msehl
INTO TABLE lt_t006a
FROM t006a
WHERE spras = sy-langu.
LOOP AT lt_mseg_short.
READ TABLE lt_t006a WITH KEY msehi = lt_mseg_short-meins.
lt_mseg_short-mseht = ls_t006a-mseht.
lt_mseg_short-msehl = ls_t006a-msehl.
MODIFY lt_mseg_short.
ENDLOOP.

.
, , G6 I6.
: 5.889.013 .
j6)

CLEAR: lt_mseg_short[], lt_t006a[].


SELECT
mblnr
mjahr
zeile
bwart

17 62 www.sapforum.biz

(: 1.2)

matnr
menge
meins
INTO TABLE lt_mseg_short
FROM mseg.
LOOP AT lt_mseg_short.
READ TABLE lt_t006a WITH KEY msehi = lt_mseg_short-meins.
IF sy-subrc <> 0.
CLEAR: ls_t006a.
SELECT SINGLE msehi mseht msehl INTO ls_t006a
FROM t006a WHERE spras = sy-langu AND
msehi = lt_mseg_short-meins.
APPEND ls_t006a TO lt_t006a.
lt_mseg_short-mseht = ls_t006a-mseht.
lt_mseg_short-msehl = ls_t006a-msehl.
ELSE.
lt_mseg_short-mseht = lt_t006a-mseht.
lt_mseg_short-msehl = lt_t006a-msehl.
ENDIF.
MODIFY lt_mseg_short.
ENDLOOP.

.. ,
, ,
. , I6,
, IDES
260 76. ,
, ,
SELECT SINGLE xxxx FROM T006A
, J6 .
, .
I6 , ,
/, ,
,
/.
: , READ TABLE
BINARY SEARCH, lt_t006a
, , .
, , ,
, .
(): ,
,

LOOP AT
<xxxx>. ENDLOOP. ,
, JOIN ,
, ,
.
SE13.
(): ,
,
18 62 www.sapforum.biz

(: 1.2)


, .
I6 J6, ,
.

7.

COMMIT WORK.

COMMIT WORK ,
. , COMMIT,
COMMIT WORK DB_COMMIT.

, , ,
:
EXEC SQL.
COMMIT WORK
ENDEXEC.

,
, .. , ,
ROLLBACK .
COMMIT WORK,
, :
,
PERFORM < > ON COMMIT
CALL FUNCTION < > IN
UPDATE TASK.
Object Services.
, ,
.
SAP ,
_SCOPE
, .
LUW .
TRANSACTION_FINISHED,
CL_SYSTEM_TRANSACTION_STATE COMMIT_WORK.
, COMMIT WORK,
.
COMMIT / . ,
/ 200-500-1000 ,
1% 3% . ,
BAPI, , . . ,
, (ROLLBACK)
. ,
, COMMIT.
: BAPI_GOODSMVT_CREATE.
, ,
BAPI_FIXEDASSET_CHANGE - , COMMIT
.

19 62 www.sapforum.biz

(: 1.2)

~20 000 ,
, COMMIT .
, -, ,
, , -, 400
COMMIT, , 3
COMMIT- , . ,
COMMIT 200 ~20 000
40.
():

COMMIT. , 20 000 ,
200 / , ..
, 1% 3% , COMMIT
WORK.
COMMIT
,
BAPI: BAPI_GOODSMVT_CREATE.
,
,
. , SAP,
, ,
. , ,
COMMIT- ,
.
, ,
COMMIT, ,
, . , 500
000 . 1 , ,
5 ,
15-20 .
5 7 ,
6. . , ?
, .
,
, - (
). ,
. ,
,
. ,
, . ,
,
, , .
,
. , .
, AS02, SM12.
,
20 62 www.sapforum.biz

(: 1.2)

, .
, 4: SM12V.png.

6: SM12V.png

, , .
SE11,
. , 5: SE11-1.png,
.

21 62 www.sapforum.biz

(: 1.2)

7: SE11-1.png

, 6: SE11-2.png : " "


" ", ,
, , 7: SE11-3.png.

22 62 www.sapforum.biz

(: 1.2)

8: SE11-2.png

23 62 www.sapforum.biz

(: 1.2)

9: SE11-3.png

. / ,
BAPIRET2 , ..
, :
CALL FUNCTION 'ENQUEUE_EANLA'
EXPORTING
bukrs
= l_bukrs
anln1
= l_anln1
anln2
= l_anln2
_wait
= 'X'
EXCEPTIONS
foreign_lock
= 1
system_failure = 2
OTHERS
= 3.
IF sy-subrc = 0.
* , .
CALL FUNCTION 'DEQUEUE_EANLA'
EXPORTING
bukrs = l_bukrs
anln1 = l_anln2
anln2 = l_anln3.
ELSE.
* , - .
ENDIF.

.. / ,
, ,
, ,
24 62 www.sapforum.biz

(: 1.2)

, , - .
_wait = 'X'? enque/delay_max,
. = 0005,
:
if waitflag is initial.
times = 1.
else.
delonrej = 1.
call 'C_ENQ_WILDCARD' id 'DELAY_MAX' field times.
endif.

:
DO time TIMES.
call 'C_ENQUEUE' < >
ENDDO.

.. 5 ,
, ,
1 ,
SAP, 5 .
, LSENAF01, - 230,
6.0
():
, ,
, .

8.

.
8.1.

, , ,
. ABAP,
, - . ,
,
, .. ,
-, .
,
,
, .
.
, ,
, DESCRIBE TABLE <tab_name>
LINES <lines> .. 4 ,
2,147,483,647 .
8
25 62 www.sapforum.biz

(: 1.2)

. 100 .
, ,
.
, .
.
, 3 . 1 2
, , ,
, .. 1 2
, 8 16 .
8 16 , ,
, 10: Easy-tbl-1.png.

10: EASY-TBL-1.png

, , ,
, .. ,
Z,
, .
-.
.
OCCURS
<size>, <size> ,
.
, ,
, , ,
,
. 4.6
,
, : INITIAL SIZE <max_rec>. ,
, , ,
26 62 www.sapforum.biz

(: 1.2)

, , . ,
, , ,
.
<max_rec>, , ,
. , ,

<max_rec>,
,
. .
, J6,
+
.
:
* ( )
DATA: BEGIN OF ls_t006a,
msehi LIKE t006a-msehi,
mseht LIKE t006a-mseht,
msehl LIKE t006a-msehl,
END OF ls_t006a.
* ( )
DATA: BEGIN OF lt_t006a OCCURS 0,
INCLUDE STRUCTURE ls_t006a.
DATA: END OF lt_t006a.

~43 ~86
, . 260
, ..
22 , , , 20
, 1,7 .
INITIAL SIZE 20, 1,7
, , 20 ,
. ,
,
20, 76,
6.4 ,
, 20 ,
1,7 . ,
, , .
40 3.4 , 16 76,
, 8 16 .
, 6.4 ,
, 1,7 + 3,4 + 8 (16) = 13,1 (21,1) , ..
2 3 . , ,
6 26 , ,
.
(): ,
,
, ,
INITIAL SIZE. ,
,
.
27 62 www.sapforum.biz

(: 1.2)

: , 20 50
, ,
, 20, . ,
, 20, ,
1-3 ,
, .

8.2.

,
, ,
,
. , ,
, .
:

INSERT .
, , APPEND,
.
DELETE ,
.
SORT
-, . ,
,
, .


, ,
.
.
:


10: EASY-TBL-1.png, -
, 11: INDEX-TBL1.png. - .
DELETE,
. ,
, ,
. . ,
, ,
,

.

28 62 www.sapforum.biz

(: 1.2)

11: INDEX-TBL-1.png

.
, , ,
,
. , - ,
. ,
, B-,
12: Index-Tree-1.png,
: , B-
http://ru.wikipedia.org/wiki/B-tree.
, , B-,
.
, ,
. , , 50% ,
. ABAP,
.
, , ,
-
.

29 62 www.sapforum.biz

(: 1.2)

12: Index-Tree-1.png

(): ,
.
INSERT DELETE
SORT, ..
.
,
.
, ,
,
.
(): ,
,
APPEND
,
.

8.3.


. , ,
, -.
,
,
30 62 www.sapforum.biz

(: 1.2)

. ,
, , SORT,
,
.
.
, , EKPO.
:
DATA: lt_ekpo_sort LIKE SORTED TABLE OF
lt_ekpo_hash LIKE HASHED TABLE OF
lt_ekpo_standart LIKE ekpo OCCURS
lt_ekpo_header LIKE ekpo OCCURS 0

ekpo WITH UNIQUE KEY ebeln ebelp,


ekpo WITH UNIQUE KEY ebeln ebelp,
0,
WITH HEADER LINE.

.
: 4.089.295 .
A8)

SELECT * INTO TABLE lt_ekpo_sort


FROM ekpo.

: 4.147.068 .
B8)

SELECT * INTO TABLE lt_ekpo_header


FROM ekpo.

: 4.022.872 .
C8)

SELECT * INTO TABLE lt_ekpo_standart


FROM ekpo.

: 4.203.968 .
D8)

SELECT * INTO TABLE lt_ekpo_hash


FROM ekpo.

100 , 10 50
. ,
, , , ..
, , ,
. EKPO,
30 000 . , MSEG,
125 000 , 50 100,
, ,
.
():
, , ,
,
,
.
,
, , , ,
,
APPEND, INSERT
. , INSERT
31 62 www.sapforum.biz

(: 1.2)

, .
, INSERT ,
.
/ ,
. ,
, , ,
, , BINARY SEARCH, ,
. ,
,
.
, ,
(BINARY SEARCH), .
,
,
, .
J6,
. , ,
, SY-TABIX,
, .
:
*
TYPES: BEGIN OF tp_t006a,
msehi LIKE t006a-msehi,
mseht LIKE t006a-mseht,
msehl LIKE t006a-msehl,
END OF tp_t006a.
DATA: ls_t006a TYPE tp_t006a,
lt_t006a TYPE TABLE OF tp_t006a,
lt_t006a_st TYPE SORTED TABLE OF tp_t006a WITH UNIQUE KEY msehi.
DATA: BEGIN OF lt_mseg_short OCCURS 0,
mblnr LIKE mseg-mblnr,
mjahr LIKE mseg-mjahr,
zeile LIKE mseg-zeile,
bwart LIKE mseg-bwart,
matnr LIKE mseg-matnr,
menge LIKE mseg-menge,
meins LIKE mseg-meins,
mseht LIKE t006a-mseht,
msehl LIKE t006a-msehl,
END OF lt_mseg_short.

157.575 .
e8)

LOOP AT lt_mseg_short.
READ TABLE lt_t006a INTO ls_t006a
WITH KEY msehi = lt_mseg_short-meins
BINARY SEARCH.
IF sy-subrc <> 0.
CLEAR: ls_t006a.
SELECT SINGLE msehi mseht msehl INTO ls_t006a
FROM t006a WHERE spras = sy-langu AND
msehi = lt_mseg_short-meins.
INSERT ls_t006a INTO lt_t006a INDEX sy-tabix.
ENDIF.
lt_mseg_short-mseht = ls_t006a-mseht.
lt_mseg_short-msehl = ls_t006a-msehl.

32 62 www.sapforum.biz

(: 1.2)

MODIFY lt_mseg_short.
ENDLOOP.

.. (
), , SY-TABIX ,
. , ,
, . ,
, F8, .
: 164.022 .
f8)

LOOP AT lt_mseg_short.
READ TABLE lt_t006a INTO ls_t006a
WITH KEY msehi = lt_mseg_short-meins.
IF sy-subrc <> 0.
CLEAR: ls_t006a.
SELECT SINGLE msehi mseht msehl INTO ls_t006a
FROM t006a WHERE spras = sy-langu AND
msehi = lt_mseg_short-meins.
APPEND ls_t006a TO lt_t006a.
ENDIF.
lt_mseg_short-mseht = ls_t006a-mseht.
lt_mseg_short-msehl = ls_t006a-msehl.
MODIFY lt_mseg_short.
ENDLOOP.

, ,
. ,
, ,
, ,
, .
: 164.925 .
g8)

LOOP AT lt_mseg_short.
READ TABLE lt_t006a_st INTO ls_t006a
WITH KEY msehi = lt_mseg_short-meins.
IF sy-subrc <> 0.
CLEAR: ls_t006a.
SELECT SINGLE msehi mseht msehl INTO ls_t006a
FROM t006a WHERE spras = sy-langu AND
msehi = lt_mseg_short-meins.
INSERT ls_t006a INTO lt_t006a_st INDEX sy-tabix.
ENDIF.
lt_mseg_short-mseht = ls_t006a-mseht.
lt_mseg_short-msehl = ls_t006a-msehl.
MODIFY lt_mseg_short.
ENDLOOP.

, ,
,
,
. 100 , ,
.
,
, ,
.
, ,
33 62 www.sapforum.biz

(: 1.2)

,
. ,

. SAP, ,
since the system always uses a binary search..

.
: , , ..
, ,
,
, 1. 14, 95.
, .. ( 14 / 2 ) + 1 = 8
, .. 8.
67, ,
, .. 9 14,
, 12.
89, , 95,
. 14, 100,
95, . ,
95, 13. ,
, , 90, ,
. ,
. , 4 ,
13 .
1

1
2
3
4
5
6
7
8
9
10
11
12
13

1
2
7
15
23
45
50
67
68
77
80
89
95

Aaaaaaaaaa
Ccccccccccc
Zzzzzzzzzzzzz
Yyyyyyyyyyy

Wwwwwww
Yyyyyyyyyy
Qqqqqqqqq
Rrrrrrrrrrrr
Bbbbbbbbb
Uuuuuuuuu
Ooooooooo
Vvvvvvvvvvv

14

100

Kkkkkkkkkk

4 (
)

- , ,
. -
, .. ,
.
,
, -.
34 62 www.sapforum.biz

(: 1.2)

, . , ,
- ( ,
,
). , , ,
- , The response
time for key access remains constant. ,
.
: - .
, , ,
, , ,
.
1 . , -
= . ,
:
2

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15

AA
AB

Aaaaaaaaaa
Ccccccccccc

CA

Zzzzzzzzzzzzz

CB

Yyyyyyyyyyy

16 22

23

DD

24 44

45

DF

Wwwwwww

46 49

50

FD

Yyyyyyyyyy

51 66

67
68

GH
HH

Qqqqqqqqq
Rrrrrrrrrrrr

69 76

77

HJ

Bbbbbbbbb

78 79

80

JJ

Uuuuuuuuu

81 88

89

KL

Ooooooooo

90 94

95

LL

Vvvvvvvvvvv

96 99

100

ZZ

Kkkkkkkkkk

35 62 www.sapforum.biz

(: 1.2)

, , 100
, 14,
. , ,
, 13: Index-hash-1.png.

13: Index-hash-1.png

,
- ,
, DF,
45. , ,
45, ,
.
( ): , .
, ,
:

, .. ,

. , , ,

, .
,
,
, ,
. ,
BINARY SEARCH
,
SY-TABIX, E8.
,
,
36 62 www.sapforum.biz

(: 1.2)

9.

,
. ,
,
, ,
.
,
,
space X, , 10 000 .
-,
,
, ,
. ,
, . ,
,
, -
.

: LOOP, READ,
DELETE ..

LOOP AT <xxx>. ENDLOOP. , ,


, , ,
. , G6,
J6 I6,
H6. FIELD-SYMBOLS.
*
DATA: lt_mseg_loop LIKE mseg OCCURS 1 WITH HEADER LINE,
FIELD-SYMBOLS: <fs> LIKE LINE OF lt_mseg_loop.

: 71.894 .
a8)

SELECT * INTO TABLE lt_mseg_loop


FROM mseg.
LOOP AT lt_mseg_loop.
ENDLOOP.

: 8.001 .
b8)

SELECT * INTO TABLE lt_mseg_loop


FROM mseg.
LOOP AT lt_mseg_loop ASSIGNING <fs>.
ENDLOOP.

, , FIELD-SYMBOLS,
9 . ,
- ,
MODIFY A8.
: 193.230
37 62 www.sapforum.biz

(: 1.2)

c8)

SELECT * INTO TABLE lt_mseg_loop


FROM mseg.
LOOP AT lt_mseg_loop.
lt_mseg_loop-bwart = '000'.
MODIFY lt_mseg_loop.
ENDLOOP.

: 11.722 .
d8)

SELECT * INTO TABLE lt_mseg_loop


FROM mseg.
LOOP AT lt_mseg_loop ASSIGNING <fs>.
<fs>-bwart = '000'.
ENDLOOP.

16 .
,
, .
MODIFY.
, ,
MODIFY.
,
.
():
, , FIELD-SYMBOLS,
. ,
, , ,
MODIFY ,
, , .
,
, .. , .
LOOP AT <xxx> WHERE <val>. ENDLOOP. ,
,
WHERE.
. ,
.
:

DATA: itab TYPE SORTED TABLE OF bkpf


WITH UNIQUE KEY bukrs belnr gjahr.
FIELD-SYMBOLS: <itab> LIKE LINE OF itab.

: 33.764 .
e8)
LOOP AT itab ASSIGNING <itab>

WHERE bukrs EQ '1000' AND belnr CP '55*'.

ENDLOOP.

: 24 .
f8)

READ TABLE itab

TRANSPORTING NO FIELDS
WITH KEY
bukrs = '1000'

38 62 www.sapforum.biz

(: 1.2)

belnr = '5500000000'
BINARY SEARCH.
LOOP AT itab ASSIGNING <itab> FROM sy-tabix.
IF <itab>-belnr+0(2) <> '55'.
EXIT.
ENDIF.
ENDLOOP.

: 45 .
g8)

READ TABLE itab

TRANSPORTING NO FIELDS
WITH KEY
bukrs = '1000'
belnr = '5500000000'
BINARY SEARCH.
LOOP AT itab ASSIGNING <itab> FROM sy-tabix
WHERE
bukrs EQ '1000' AND
belnr CP '55*'.
ENDLOOP.

: 11 .
h8)

READ TABLE itab

TRANSPORTING NO FIELDS
WITH KEY
bukrs = '1000'
belnr = '5500000000'
BINARY SEARCH.
LOOP AT itab ASSIGNING <itab> FROM sy-tabix
WHERE
bukrs EQ '1000' AND
Belnr(2) EQ '55'.
ENDLOOP.

(): , .
G8 H8, .. belnr CP '55*' Belnr(2) EQ '55',
H8 ,
F8, .
DELETE .
, ,
, , ,
.
, 115.528 . 22.106
, 1
IS_NULL , .
*

DATA: BEGIN OF gs_alvtab,


belnr TYPE bkpf-belnr,
is_null(1) TYPE c,
END OF gs_alvtab,
gt_alvtab LIKE STANDARD TABLE OF gs_alvtab,
tabix TYPE sy-tabix,
idx1 LIKE sy-tabix,
idx2 LIKE sy-tabix.
FIELD-SYMBOLS: <fs_alvtab> LIKE gs_alvtab.

: 30.944 .
e8)

LOOP AT gt_alvtab ASSIGNING <fs_alvtab> WHERE is_null = 1.

39 62 www.sapforum.biz

(: 1.2)

DELETE gt_alvtab INDEX sy-tabix.


ENDLOOP.

, . ,
LOOP AT gt_alvtab ASSIGNING
<fs_alvtab>, LOOP AT gt_alvtab INTO gs_alvtab,
1000 . ,
11 .
: 40.718 .
: 32.706 .
f8)

SORT gt_alvtab BY is_null.


LOOP AT gt_alvtab ASSIGNING <fs_alvtab> WHERE is_null = 1.
DELETE gt_alvtab INDEX sy-tabix.
ENDLOOP.

, .
, ,
. , .,
SORT gt_alvtab2 BY is_null ASCENDING,
31.628 , .. ,
E8 , .
: 40.718 .
: 38.970
g8)

READ TABLE gt_alvtab WITH KEY is_null = 1


BINARY SEARCH TRANSPORTING NO FIELDS.
tabix = sy-tabix.
WHILE sy-subrc = 0.
sy-subrc = 0.
READ TABLE gt_alvtab ASSIGNING <fs_alvtab> INDEX tabix.
IF sy-subrc <> 0. EXIT. ENDIF.
IF <fs_alvtab>-is_null <> 1.
sy-subrc = 4.
ELSE.
DELETE gt_alvtab INDEX tabix.
ENDIF.
ENDWHILE.

. ,
, .
,
BINARY SEARCH, , -.
: 151.734
h8)

READ TABLE gt_alvtab WITH KEY is_null = 1


TRANSPORTING NO FIELDS.
tabix = sy-tabix.
WHILE sy-subrc = 0.
sy-subrc = 0.
READ TABLE gt_alvtab ASSIGNING <fs_alvtab> INDEX tabix.
IF sy-subrc <> 0.
EXIT.
ENDIF.
IF <fs_alvtab>-is_null <> 1.
ADD 1 TO tabix.
ELSE.

40 62 www.sapforum.biz

(: 1.2)

DELETE gt_alvtab INDEX tabix.


ENDIF.
ENDWHILE.

+, ,
. , ,
, TRANSPORTING
NO FIELDS.
: 37.390
i8)

tabix = LINES( gt_alvtab ).


DO tabix TIMES.
READ TABLE gt_alvtab INDEX sy-index
TRANSPORTING NO FIELDS.
IF sy-subrc <> 0. EXIT. ENDIF.
ENDDO.

: 44.628
j8)

tabix = LINES( gt_alvtab ).


DO tabix TIMES.
READ TABLE gt_alvtab INTO gs_alvtab INDEX sy-index.
IF sy-subrc <> 0. EXIT. ENDIF.
ENDDO.

~115 000 ,
gt_alvtab, 5 ,
, .
DELETE < > WHERE
< >. ,
.
: 30.401 .
: 40.718 .
: 19.893 .
k8)

DELETE gt_alvtab WHERE is_null = 1.

115.528 is_null
, , 20% ,
.
: 40.718 .
: 5.350 .
l8)

SORT gt_alvtab BY is_null.


READ TABLE gt_alvtab WITH KEY is_null = 1
BINARY SEARCH TRANSPORTING NO FIELDS.
idx1 = sy-tabix.
READ TABLE gt_alvtab WITH KEY is_null = 2
BINARY SEARCH TRANSPORTING NO FIELDS.
idx2 = sy-tabix - 1.
CHECK idx2 >= idx1.
DELETE gt_alvtab FROM idx1 TO idx2.


, , 1, .. ,
:
41 62 www.sapforum.biz

(: 1.2)

: 40.718 .
: 5.768 .
m8)

READ TABLE gt_alvtab WITH KEY is_null = 1


BINARY SEARCH TRANSPORTING NO FIELDS.
idx1 = sy-tabix.
CHECK idx1 <= LINES( gt_alvtab ).
DELETE gt_alvtab FROM idx1.

: M8 80% ,
L8, 20%
, ,
,
.
, DELETE TABLE,
. 20% ,
.
: 80.131.915 .
n8)

LOOP AT gt_alvtab ASSIGNING <fs_alvtab> WHERE is_null = 1.


DELETE TABLE gt_alvtab FROM <fs_alvtab>.
ENDLOOP.

,
, , ?
CLEAR gt_alvtab.
, .
DELETE, , ,
, ,
REFRESH CLEAR.
. ,
,
.
REFRESH CLEAR ,
.

IT_DATA2[] = IT_DATA1[],
IT_DATA2.
IT_DATA2[] = IT_DATA1[], ,
, , .
, IT_DATA2[] = IT_DATA1[],
,
, IT_DATA1[], , 10%
. , DELETE,
, . ,
IT_DATA2[] = IT_DATA1[], IT_DATA2[],
10% IT_DATA1[],
REFRESH FREE
IT_DATA1[].
42 62 www.sapforum.biz

(: 1.2)

1 = 2
LOOP <> ENDLOOP.
: 4 .
o8)

gt_alvtab = gt_alvtab2.

: 32.226 .
p)

LOOP AT gt_alvtab2 ASSIGNING <fs_alvtab>.


APPEND <fs_alvtab> TO gt_alvtab.
ENDLOOP.

FREE.
REFRESH, .
REFRESH FREE .
SAP. SAP
, ,
(Extended Memory).
, ,
SAP
ABAP. ,
. REFRESH
,
, .
, ,
. FREE , ,
, , ..
, , ,
. ,

.
(): ,
DELETE <int_tab> WHERE <key> = <val>, , E8
K8, . K8,

. ,
L8 M8. ,
L8 M8 ,
, K8.
(): ,
, REFRESH.
,
.
REFRESH ,
. ,

,
, .
FREE
. ,
43 62 www.sapforum.biz

(: 1.2)

, ,
,
. ,
FREE, ,
- ,

.

10. .
,
, ,
. SAP
,
.

10.1.

,
SE38 :
, 14: SE38-0.png.

14: SE38-0.png

, ,
,
ABAP. ,
.
, ,
, : GET RUN TIME FIELD time<n>,
. time1 time2
. :
DATA: time2 TYPE i,

44 62 www.sapforum.biz

(: 1.2)

time1 TYPE i,
time_diff TYPE i.
GET RUN TIME FIELD time1.
SELECT * FROM sbook INTO sbook_wa UP TO 1 ROWS
WHERE carrid = 'LH'.
ENDSELECT.
GET RUN TIME FIELD time2.
time_diff = time2 - time1.
WRITE: / 'SELECT TIME:', time_diff.

10.2.

SLIN .

,
. ,
- ,
SAP. SLIN
, SE38 ABAP ,
:
. ,
. , ,
, ,
, . ,
, 15: SE38-1.png.

15: SE38-1.png

SLIN,
45 62 www.sapforum.biz

(: 1.2)

.
, 16: SLIN-0.png.
, , SAP, ,
, .

16: SLIN-0.png

, .
. ,
, 17: SLIN1.png. , ,
,
,
, .

.

46 62 www.sapforum.biz

(: 1.2)

17: SLIN-1.png


SAP,
, SAPMM07M
,
, , SAP
, , .

PERFORM/FORM-
, , ,
, ,
, , 18: SLIN-2.png.

18: SLIN-2.png

.. , , , ,
, . ,
,
, FORM ALV_PF_STATUS,
47 62 www.sapforum.biz

(: 1.2)

"#EC CALLED, . ,
:
FORM user_command USING ucomm
LIKE sy-ucomm
rs_selfield TYPE slis_selfield.
CASE ucomm.
WHEN 'DELETE'.

"#EC CALLED

.. FORM USER_COMMAND,
"#EC CALLED,
.
,
, , ,
.
,
, ..
:
FORM get_maktx_text

USING
p_matnr
CHANGING p_maktx.

, 19: SLIN-3.png.
TYPE ANY,
TYPE matnr, .. ,
. ,
, . ,
, ,

.

19: SLIN-3.png

"#EC *,
, .
: , .
,
.
, ,
.

CALL FUNCTION
. ,
,
SY-SUBRC
, , 20: SLIN4.png.

48 62 www.sapforum.biz

(: 1.2)

20: SLIN-4.png

"#EC *,
, : CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY' "#EC *.
. , ,
, ,
.
:
SY-SUBRC, ,
.


, , ,
SUBMIT ..
. , ,
,
.


.
.
,
, ,
, , , ,
.

,
,

.

GUI- TITLEBAR , GUI-


. , -
.

. SET/GET- ,
SET/GET .

MESSAGE ()
.

.
, .

49 62 www.sapforum.biz

(: 1.2)

, ..
: fieldcat_ln-seltext_m = ' ', .. .
TEXTxxx,
:
, 21: SLIN-5.png

21: SLIN-5.png

"#EC NOTEXT,
.
, , ,
, , 22: SLIN-6.png.
, , .. SAP ,
, TEXT-303.
,
. ,
.. ,
, .

22: SLIN-6.png


, ,
. , ,
, ,
.
,
, .
,
,
. ,
, .
:
TEXT-xxx.

.

CURR/QUAN- SAP
, ,
, , , ,
. , , ,
, ,
, ,

50 62 www.sapforum.biz

(: 1.2)

CURR

:
http://sapforum.biz/index.php/topic,1514.msg8659.html#msg8659.

. , , 23: SLIN-7.png.

23: SLIN-7.png

, : "#EC
UOM_IN_MES, , ,
, .
: , , ,
:
SELECT * INTO ls_mseg UP TO 1 ROWS
FROM mseg.
WRITE: / ls_mseg-menge.
ENDSELECT.


.
WRITE: / ls_mseg-menge UNIT ls_mseg-meins.

CURRENCY < >.

,
, ,
. 99% ,
, 1%
, , , ?
FIELD-SYMBOLS. ,
24: SLIN-.png.

24: SLIN-8.png

, ,
- . ,

:
FORM get_line_click USING grid TYPE cxtab_control
CHANGING p_count.
DATA: l_field TYPE scrfname,
l_stepl TYPE systepl,
l_value TYPE char50.
GET CURSOR FIELD l_field LINE l_stepl VALUE l_value.
p_count = l_stepl + grid-top_line - 1.
IF l_stepl = 0. p_count = 1. ENDIF.
ENDFORM.
" get_line_click

, L_VALUE
51 62 www.sapforum.biz

(: 1.2)

L_FIELD. , ,
, GET CURSOR FIELD,
, .
, ,
, "#EC NEEDED,
.
,
.
: , ,
. ,
, "#EC NEEDED,
.
,
.

, ,
,
, ,
, 25: SLIN-9.png.

25: SLIN-9.png


.
: ,
"#EC NEEDED, .
, .
.


, .
, -
, .. :

PARAMETERS: p_skun RADIOBUTTON GROUP 001 DEFAULT 'X',


p_slif RADIOBUTTON GROUP 001.

, 26: SLIN-10.png.

, .. .

52 62 www.sapforum.biz

(: 1.2)

, 001. ,
, SAP - .
:
, P01 001,
, "#EC *.

, ,
IS ( ) ,
, , ,
, ..
. ,
90% , 95%
, 98% .
:
2
097 152 , , ,
.
16 384 .
16 384 .
Literals 65 536 .
65 536 .
INCLUDE 4 000 .

90% , ,
10% , ,
.
: 2 ,
, ABAP-
, - ,
. ,
, SUBMIT,
.


/ ,
.
/ SET LOCALE
LANGUAGE, TRANSLATE data-txt TO
UPPER CASE.


MODULE.
, , 27: SLIN-11.png.
WHEN CASE,
FREE MEMORY,

53 62 www.sapforum.biz

(: 1.2)

, EXPORTING, , %_
,
.

26: SLIN-11.png

: MODULE /
ENDMODULE. - ,
"#EC *.

, ECC 5.0,
ECC 6.0 ,

/. ,

, ,

, .
, ,
. , ,
,
.

, 27: SLIN-12.png.

27: SLIN-12.png

: ,
.

,
, ,
SAP .
, ,
. ,
STRUCTURE LIKE
.. ,
. ,
, READ TABLE,
, SAP TRANSPORTING
NO FIELDS, , 28: SLIN-13.png

54 62 www.sapforum.biz

(: 1.2)

28: SLIN-13.png
: ,

ABAP.

,
ABAP-,
.

LOOP.. ASSIGNING
<structure>,
UNASSIGN . COMMIT
WORK, SELECT.
USING,
, ,
:
PERFORM get_line USING X.
FORM get_line USING p_test.
<>
p_test = Z.
<>
ENDFORM.

,
USING, ,
, .

10.3.

SCI / SCII SAP Code Inspector.

SLIN
, ,
, ,
,
. SAP
, SCI SAP
, ,
.. SCI
29: SCI-1.png. 6.0,
, 543359.

55 62 www.sapforum.biz

(: 1.2)

29: SCI-1.png
, ,
, .
, -
, ,
.
, , ,

SCII : , ,
.

30: SCI-2.png
,
, .. , . ,
, SLIN,
. ,
, , ,
, 31: SCI-3.png.

: , SLIN,
: ./ .
, SLIN.

56 62 www.sapforum.biz

(: 1.2)

31: SCI-3.png
,
,
, .

.
,
, 32: SCI-4.png.

32: SCI-4.png
,
SLIN, ,
,
57 62 www.sapforum.biz

(: 1.2)

, 33: SCI-5.png.

33: SCI-5.png
, SLIN, ,
,
, , .
, - .
SCI
, 34: SCI-12.png. ,
SELECT WHERE, , ,
.

34: SCI-12.png

,
. , ,
, 35: SCI-13.png. ,
, , WHERE
SELECT .

58 62 www.sapforum.biz

(: 1.2)

35: SCI-13.png
, , ,
, .
, SELECT.
,
,

.
, .
: ,
, ,
. , , 36: SCI-7.png.
SLIN, SCI,
.

36: SCI-7.png
, ,
PERFROM P_, ,
,
. ,
. , , P_,
PS_, PT_.
59 62 www.sapforum.biz

(: 1.2)

.
, ,
, 37: SCI-10.png.

37: SCI-10.png
, ,
, , 38: SCI-11.png. ,
USING / CHANGING / TABLES.
USING / CHANGING PS_*, TABLES
PT_*, - ,
FORM, ..
.

38: SCI-11.png

, ,
, .
: , .
,
,
, .. ,
, 39: SCI-7.png.

60 62 www.sapforum.biz

(: 1.2)

39: SCI-7.png
, ,
,
.
: , ,
. ,
.
, .

, 40: SCI-8.png.

40: SCI-8.png
, ,
. ,
. ,
, ,
61 62 www.sapforum.biz

(: 1.2)

.
. ,
, ,
, 41: SCI9.png.

41: SCI-9.png
.
,
.
, 42: SCI-14.png.
, ,
.
.
.

42^ SCI-14.png

: SLIN SCI .
, ,

, , ..
. ,
, ,
..

62 62 www.sapforum.biz

(: 1.2)