Sie sind auf Seite 1von 4890

HASH

INFOVERS1
INFODESC
CWBNTHEAD
NUMM
VERSNO
THEMK
INSTA
MNUMM
MYEAR
INCOMPLETE
INFODATA

9
h
u
N
N
C
C
C
N
C

7
10
4
24
10
10
4
1

8
1

0000980402
0059
MM-IV-LIV
0000
INFODESC
CWBNTSTXT
NUMM
VERSNO
LANGU
STEXT
INFODATA

6
h
u
N
N
C
C

4
10
4
1
80

16

3
0000980402
0059
D
KDM fr kontierte Bestellungen / V-Preis-M
aterial
0000980402
0059
E
KDM for POs with account assignment, MA pr
ice material
0000980402
0059
J
/ KDM
INFODESC
CWBNTDATA

10
h
v
u
N
N
C
h
u
C
C

NOTE
NUMM
VERSNO
LANGU
TEXT
TDFORMAT
TDLINE
INFODATA

2
3
10
4
1
2
2
132

1583
3

0000980402
0059

D
109
>1
UK&NOTE_SYMPTOM&

/
Im Bereich MM (Materialwirtschaft) werden
in der Bestandsfhrung und in

der Rechnungsprfung keine Kursdifferenzze


ilen (KDM) bei konti
/
erten Bestellungen und Bestellungen mit VPreis-Materialien (gleitender

Durchschnittspreis) erzeugt.

>4
UK&NOTE_DESCR&

/
GAAP, IAS, KDM, Kursdifferenz, V-Preis, Ko
ntierung, kontierte

Bestellung, Kostenstelle, Preisdifferenz,


PRD, MIRO, MIGO, MR8M
/

>3
UK&NOTE_SOLUTION&

/
Erledigt mit Support Package zu 6.0 and 6.
02.
/

/
SAP AG EMPFIEHLT DEN HINWEIS 980402 MIT DE
M ENTSPRECHENDEN SUPPORT

PACKAGE EINZUBAUEN:

/
SAP_APPL 600 SAPKH60012

/
SAP_APPL 602 SAPKH60202

/
Falls Sie den Hinweis manuell einbauen mc
hten, beachten Sie bitte

folgende Schritte:

/
4.6C, 4.7, 6.0 und 6.02:

/
Bauen Sie bitte den Hinweis wie unten besc
hrieben ein. Bitte beachten

Sie dass zuerst die manuellen nderungen d


ie unten beschrieben s
/
ind gemacht werden mssen, danach knnen S
ie die Korrektur mit der

Transaktion 'SNOTE' bernehmen. Unterschie


dliche Support Package St
/
nde knnen dazu fhren dass nicht alle Co
ding-nderungen mit 'SNOTE'

eingebaut werden knnen. In diesem Fall m


ssen Sie manuell die
/
nderungen bernehmen.

/
Nach dem Einbau des Hinweises wird es mgl
ich sein im Customizing mit

der Transaktion OMRW die Einstellungen fr


die neue Logik pro Bu
/
chungskreis und pro Whrung (1. Hauswhrun
g und zwei weitere

Material-Ledger-Whrung, falls ML aktiv is


t) zu setzen. Wird das Flag

BuK

/
rWhr (V_169P_PK-KDHW) gesetzt so wird die
neue Logik fr die Berechnung

der Kursdifferenz (KDM-Betrages) in der Bu


chungskreiswhrung (
/
1. Hauswhrung) aktiviert. Dadurch werden
Kursdifferenzenzeilen (KDM)

falls notwendig auch fr kontierte Bestell


ungen und fr Bestellu
/
ngen mit V-Preis-Materialien (gleitender D
urchnittspreis) in der

Bestandsfhrung und Rechnungsprfung erzeu


gt. Haben Sie ML (Material/
Ledger) aktiv so knnen Sie entsprechendes
Flag fr weitere ML-Whrungen

setzen.

/
Bitte beachten Sie da bei den Stornotrans
aktionen die KDM-Zeile 1:1

storniert wird.

/
Bitte beachten Sie dass mit der aktivierte
n Funktionalitt

Kursdifferenzen fr Bestellpositionen und


fr Nebenkosten erstellt

werden.

/
Die Bewertung der Bestnde oder der Verbr
uche erfolgt dann effektiv zum

Umrechnungskurs des Wareneingangs, und nic


ht zum Umrechnungsk
/
urs der Rechnung.

/
Der fixierte Kurs in der Bestellung (EKKOKUFIX) wird beim Buchen des

Wareneinganges nicht bercksichtigt und Be


stellwerte werden mit
/
dem Buchungsdatum des Wareneinganges in di
e Hauswhrung umgerechnet.
/

/
1. Mit der Transaktion SE11 legen Sie die
Domne XKUDIF mit der

Kurzbeschreibung 'Verrechnen von Kursdiffe


renzen in Bestand oder Verbr
/
auch' an.

/
Eigenschaften:

/
Entwicklungsklasse CKMC

/
Definition:

/
Datentyp CHAR

/
Zahl der Stellen 1

/
Dezimalstellen 0

/
Wertebereich:

/
Space 'Kursdifferenzen in Bestand / Verbra
uch verrechnen'
/
X
'Kursdifferenzen auf Kursdifferenzko
nto buchen'
/

/
Aktivieren Sie die nderung.

/
2. Mit der Transaktion SE11 legen Sie die
Domne CKML_ER_DIFF mit
/
der Kurzbeschreibung 'Kumulation von Kursd
ifferenzen' an.
/

/
Eigenschaften:

/
Entwicklungsklasse CKMLRUN

/
Definition:

/
Datentyp CHAR

/
Zahl der Stellen 1

/
Dezimalstellen 0

/
3. Mit der Transaktion SE11 legen Sie folg
ende Datentypen /

Datenelemente an:

/
a) Datentyp / Datenelement XKUDIF mit der
Kurzbeschreibung 'Ausweisen

von Kursdifferenzen'

/
Eigenschaften:

/
Paket CKMC

/
Datentyp:

/
Domne XKUDIF

/
Zusatzeigenschaften:

/
keine

/
Feldbezeichner:

>2
UK&NOTE_CAUSE&

/
Die Funktionalitt ist im Standard nicht v
orhanden.

AS

0000980402
0059
E
109
>1
UK&NOTE_SYMPTOM&

/
You are working in materials management (M
M). In inventory management

and in the invoice verification, the syste


m does not generate an
/
y exchange rate difference lines (KDM) for
purchase orders with account

assignment and for purchase orders with mo


ving average price (
/
MAP) materials.

>3
UK&NOTE_SOLUTION&

/
The problem is solved with the Support Pac
kage for Releases 6.0 and

6.02.

/
SAP recommends implementing Note 980402 wi
th the relevant Support

Package:

/
SAP_APPL 600 SAPKH60012

/
SAP_APPL 602 SAPKH60202

/
If you want to implement the note manually
, note the following:
/

/
4.6C, 4.7, 6.0 and 6.02:

/
Implement the note as described below. Not
e that you must implement the

manual changes that are described below fi


rst. Afterwards you
/
can then implement the corrections using t
ransaction SNOTE. Certain

Support Package levels may mean that you c


annot implement all of t
/
he source code changes with transaction SN
OTE. In these situations, you

must make the changes manually.

/
After you implement this note, you can use
Customizing transaction OMRW

to make settings for the new logic for eac


h company code and e
/
ach currency (the first local currency and
two other material ledger

currencies, if the material ledger is acti


ve). If the CCCurr indi
/
cator (V_169P_PK-KDHW) is set, this activa
tes a new logic for

calculating the exchange rate difference (


KDM amount) in the company cod

/
e currency (first local currency). As a re
sult, the system also

generates KDM lines for purchase orders wi


th account assignment and fo
/
r purchase orders with MAP materials in in
ventory management and in

invoice verification if required. If the m


aterial ledger (ML) is a
/
ctive, you can set a corresponding indica
tor for additional ML

currencies.

/
Bear in mind that the system performs a 1:
1 cancellation for the KDM

line in the cancellation transactions.

/
Note that exchange rate differences are cr
eated for purchase order items

and delivery costs with the activated func


tion. Stock or cons
/
umption valuation then takes place for the
exchange rate of the goods

receipt and not for the exchange rate of t


he invoice.
/
The fixed exchange rate in the purchase or
der (EKKO-KUFIX) is not taken

into account when posting the goods receip


t and order values a
/
re converted into the local currency with
the posting date of the goods

receipt.

/
1. Use transaction SE11 to create the doma
in XKUDIF with the short

description "Allocation of Exch. Rate Diff


erences in Inventory or U
/
sage".

/
Attributes:

/
Development class: CKMC

/
Definition:

/
Data type: CHAR

/
No. Characters: 1

/
Decimal places 0

/
Value Range:

/
Space 'Allocate Exchange Rate Differences
in Inventory/Usage'
/
X
'Post Exchange Rate Differences to E
xchange Rate Diff Account'
/

/
Activate the change.

/
2. Use transaction SE11 to create domain C
KML_ER_DIFF with the
/
short description "Cumulation of ER Differ
ences".
/

/
Attributes:

/
Development class CKMLRUN

/
Definition:

/
Data type: CHAR

/
No. Characters: 1

/
Decimal places 0

/
3. Using transaction SE11, create the foll
owing data types/data

elements:

/
a) Data type/data element XKUDIF with the
short description 'Display of

Exchange Rate Differences'

/
Attributes:

/
Package: CKMC

/
Data Type:

/
Domain: XKUDIF

/
Further Characteristics:

/
none

/
Field Label:

>4
UK&NOTE_DESCR&

/
GAAP, German Commercial Code, IAS, Interna
tional Accounting Standard,

exchange rate difference, moving average p


rice, account assignme
/
nt, purchase order with account assignment
, cost center, price

difference, PRD, MIRO, MIGO, MR8M

>2
UK&NOTE_CAUSE&

/
This function does not exist in the standa
rd SAP system.
AS

0000980402
0059
J
96
>1
UK&NOTE_SYMPTOM&

/
/ (MM)

/
(MAP)

/
(KDM)

>4
UK&NOTE_DESCR&

/
GAAP, German Commercial Code, IAS, Interna
tional Accounting
/
Standard, exchange rate difference, moving
average price, account
/
assignment, purchase order with account as
signment, cost center,
/
price difference, PRD, MIRO, MIGO, MR8M

/
, IAS, , , ,

/
, ,

>3
UK&NOTE_SOLUTION&

/
6.0 6.02

/
4.6C 6.0:

/
SNOTE

/
SNOTE

/
OMRW

/
( 1

/
2 )

/
' Cur' (V_169P_PK-KDHW)

/
( 1 ) (KDM

/
)

/
(ML)

/
''

/
1:1

/
(EKKO-KUFIX)

/
1. 4.6C:

/
SE11 '

/
' XKUDIF

/
CKMC

/
:

/
:

/
:

CHAR

/
: 0

/
:

/
'/'

/
X

''

/
2. SE11 ''

/
CKML_ER_DIFF

/
: CKMLRUN

/
:

/
:

/
:

CHAR

/
: 0

/
3. 4.6C:

/
SE11 /

/
a) / XKUDIF '

/
'

/
: CKMC

/
:

/
:

/
:

/
:

XKUDIF

>2
UK&NOTE_CAUSE&

/
SAP

AS

INFODESC
CWBNTVALID
NUMM
VERSNO
DEPAKID_V
DEALEID_V
INFODATA

6
h
u
N
N
C
N

4
10
4
10
10

9
2

0000980402
0059
1
0000000878
0000980402
0059
1
0000000936
INFODESC
CWBNTCI
NUMM
VERSNO
CIINSTA
CIPAKID
CIALEID
CIVERSNO
INFODATA

8
h
u
N
N
C
C
N
N

6
10
4
10
10
10
4

13
2

0000980402
0059
0120061532
1
0001043022
0001
0000980402
0059
0120061532
1
0000950570
0015

INFODESC
CWBNTGATTR
NUMM
VERSNO
ID
VALUE
INFODATA

6
h
u
N
N
C
C

4
10
4
10
64

106
21

0000980402
0059
MASTERLANG
D
0000980402
0059
NT_CATEG
A
0000980402
0059
NT_STATUS
00
0000980402
0059
SAP_STATUS
00
0000980402
0059
SIDEEFFECT
0001113065
0000980402
0059
SIDEEFFECT
0001134820
0000980402
0059
SIDEEFFECT
0001150316
0000980402
0059
SIDEEFFECT
0001249838
0000980402
0059
SIDEEFFECT
0001262966
0000980402
0059
SIDEEFFECT
0001305441
0000980402

0059
SIDEEFFECT
0001306508
0000980402
0059
SIDEEFFECT
0001306535
0000980402
0059
SIDEEFFECT
0001319201
0000980402
0059
SIDEEFFECT
0001328480
0000980402
0059
SIDEEFFECT
0001328636
0000980402
0059
SIDEEFFECT
0001381323
0000980402
0059
SIDEEFFECT
0001387559
0000980402
0059
SIDEEFFECT
0001702963
0000980402
0059
SIDEEFFECT
0001735800
0000980402
0059
SIDEEFFECT
0001744242
0000980402
0059
SIDEEFFECT
0001769199
INFODESC
CWBCIHEAD
INSTA
PAKID
ALEID

10
h
u
C
C
N

8
10
10
10

VERSNO
FORMAT_ID
INCOMPLETE
MANUAL_ACTIVITY
IS_TRANSPORTABLE
INFODATA
17

N
I
C
C
C

4
4
1
1
1
2

0120061532
1
0001043022
0001
3
C
0120061532
1
0000950570
0015
3
C
INFODESC
CWBCIDATA

41

CIHEAD
INSTA
PAKID
ALEID
VERSNO
DELTAS
HEADER
OLD
PGMID
OBJTYPE
OBJNAME
VERSNO
DESTINATION
NEW
PGMID
OBJTYPE
OBJNAME
VERSNO
DESTINATION
STATEMENT_PATTERNS
CODE_BLOCK_DELTAS
ID
ELEMENTARY_DELTAS
LINNO
CONTEXT
LINE
DELETE

h
v
u
C
C
N
N
h
v
u
u
C
C
C
N
C
u
C
C
C
N
C
h
h
C
h
v
h
C
h
v
I
h
u
C
h

2
4
10
10
10
4
3
2
5
4
4
120
5
72
5
4
4
120
5
72
30
2
30
4
4
1
255

u
C
h
u
C

LINE
INSERT
LINE
INFODATA

1
255
1
255

98048
2

0120061532
1
0001043022
0001
102
LIMU
DYNP
SAPLCKMD0201
00001
LIMU
DYNP
SAPLCKMD0201
00003
7
1
\\\\\no_empty_blocks/////
1
\\\\\comments_not_ignored/////
1
\\\\\delta_normalized/////
4
\\\\\allowed/////
PROCESS
BEFORE
OUTPUT
4
\\\\\allowed/////
PROCESS
AFTER
INPUT
4
\\\\\allowed/////
PROCESS
ON
HELP-REQUEST
4
\\\\\allowed/////
PROCESS
ON
VALUE-REQUEST
0
LIMU
DYNP
SAPLCKMD0203

00001
LIMU
DYNP
SAPLCKMD0203
00003
7
1
\\\\\no_empty_blocks/////
1
\\\\\comments_not_ignored/////
1
\\\\\delta_normalized/////
4
\\\\\allowed/////
PROCESS
BEFORE
OUTPUT
4
\\\\\allowed/////
PROCESS
AFTER
INPUT
4
\\\\\allowed/////
PROCESS
ON
HELP-REQUEST
4
\\\\\allowed/////
PROCESS
ON
VALUE-REQUEST
0
LIMU
DYNP
SAPLCKMD0204
00001
LIMU
DYNP
SAPLCKMD0204
00003
7
1
\\\\\no_empty_blocks/////
1

\\\\\comments_not_ignored/////
1
\\\\\delta_normalized/////
4
\\\\\allowed/////
PROCESS
BEFORE
OUTPUT
4
\\\\\allowed/////
PROCESS
AFTER
INPUT
4
\\\\\allowed/////
PROCESS
ON
HELP-REQUEST
4
\\\\\allowed/////
PROCESS
ON
VALUE-REQUEST
0
LIMU
DYNP
SAPLOMML0410
00001
LIMU
DYNP
SAPLOMML0410
00003
7
1
\\\\\no_empty_blocks/////
1
\\\\\comments_not_ignored/////
1
\\\\\delta_normalized/////
4
\\\\\allowed/////
PROCESS
BEFORE
OUTPUT
4
\\\\\allowed/////
PROCESS
AFTER
INPUT
4
\\\\\allowed/////
PROCESS

ON
HELP-REQUEST
4
\\\\\allowed/////
PROCESS
ON
VALUE-REQUEST
2
3
PROCESS
BEFORE
OUTPUT
1
6
3
LOOP AT EXTRACT WITH CONTROL

TCTRL_V_169P_PK
OR NEXTLINE.

CURS

MODULE LISTE_SHOW_LISTE.

1
ENDLOOP.

2
MODULE LIST_EXCHANGE_RATE. "N980402

ENDLOOP.

PROCESS
AFTER
INPUT
1
7
3
LOOP AT EXTRACT.

MODULE LISTE_INIT_WORKAREA.

CHAIN.

3
FIELD V_169P_PK-KURST.

FIELD V_169P_PK-XPLCU.

FIELD V_169P_PK-BUKRS.

7
FIELD V_169P_PK-KDHW.

"N980402

FIELD V_169P_PK-KDML1.

"N980402

FIELD V_169P_PK-KDML2.

"N980402

FIELD V_169P_PK-KURST.

FIELD V_169P_PK-XPLCU.

FIELD V_169P_PK-BUKRS.

MODULE CHECK_EXCHANGE_RATE. "N980402

LIMU
FUNC
CKMCD_MLCD_CREATE
00002
LIMU
FUNC
CKMCD_MLCD_CREATE
00004
37
1
\\\\\no_empty_blocks/////
1
\\\\\comments_ignored/////

1
\\\\\delta_normalized/////
1
\\\\\if_comments_ignored/////
3
\\\\\allowed/////
FORM
*
3
\\\\\allowed/////
FUNCTION
*
3
\\\\\allowed/////
MODULE
**
3
\\\\\allowed/////
REPORT
*
3
\\\\\allowed/////
PROGRAM
*
3
\\\\\allowed/////
FUNCTION-POOL
*
4
\\\\\allowed/////
CLASS
*
DEFINITION
4
\\\\\allowed/////
CLASS
*
IMPLEMENTATION
5
\\\\\forbidden/////
CLASS
*
DEFINITION
DEFERRED
5
\\\\\forbidden/////
CLASS
*
DEFINITION
LOAD
6
\\\\\forbidden/////
CLASS
*
DEFINITION
LOCAL
FRIENDS
3
\\\\\allowed/////
AT

LINE-SELECTION
3
\\\\\allowed/////
AT
USER-COMMAND
4
\\\\\allowed/////
AT
SELECTION-SCREEN
**
3
\\\\\allowed/////
AT
PF*
2
\\\\\allowed/////
INITIALIZATION
2
\\\\\allowed/////
START-OF-SELECTION
2
\\\\\allowed/////
END-OF-SELECTION
3
\\\\\allowed/////
TOP-OF-PAGE
**
2
\\\\\allowed/////
END-OF-PAGE
3
\\\\\allowed/////
GET
**
3
\\\\\forbidden/////
GET
BADI
3
\\\\\forbidden/////
GET
BIT
3
\\\\\forbidden/////
GET
CONNECTION
3
\\\\\forbidden/////
GET
CURSOR
3
\\\\\forbidden/////
GET
DATASET
3
\\\\\forbidden/////
GET
LOCALE
3
\\\\\forbidden/////

GET
PARAMETER
3
\\\\\forbidden/////
GET
PF-STATUS
3
\\\\\forbidden/////
GET
PROPERTY
3
\\\\\forbidden/////
GET
REFERENCE
3
\\\\\forbidden/////
GET
RUN
3
\\\\\forbidden/////
GET
TIME
2
2
FUNCTION
CKMCD_MLCD_CREATE
2
851
3
WHEN y_zugang_alte_abrec
h.

*
Die Abschluzeile wird in
die Fortschreibungszeile

integriert!

1
ENDCASE.

13
* Begin N980402

*
e differences

Statistical exchange rat

WHEN y_zugang_einst_auf_
st.

t_mlcd-categ = y_categ
_zugaenge.

t_mlcd-estkdm_st = it_
mlcrf-krdif.

WHEN y_verbr_preisb_eins
t_auf_st.

t_mlcd-categ = y_categ
_sonst_zugaenge.

t_mlcd-estkdm_st = it_
mlcrf-krdif.

WHEN y_verbr_nichtprsb_e
inst_auf_st.

t_mlcd-categ = y_categ
_verbraeuche.

t_mlcd-estkdm_st = it_
mlcrf-krdif.

* End N980402

ENDCASE.

908
3
WHEN y_zugang_alte_abr
ech.

*
Die Abschluzeile wird i
n die Fortschreibungszeile

integriert!

1
ENDCASE.

13
* Begin N980402

*
ate differences

Statistical exchange r

WHEN y_zugang_einst_au
f_st.

t_mlcd-categ = y_cat
eg_zugaenge.

t_mlcd-estkdm_st = i
t_mlcrf-krdif.

WHEN y_verbr_preisb_ei
nst_auf_st.

t_mlcd-categ = y_cat
eg_sonst_zugaenge.

t_mlcd-estkdm_st = i
t_mlcrf-krdif.

WHEN y_verbr_nichtprsb
_einst_auf_st.

t_mlcd-categ = y_cat
eg_verbraeuche.

t_mlcd-estkdm_st = i
t_mlcrf-krdif.

* End N980402

ENDCASE.

2
FORM
MLCD_FILL_MLAST3
1
164
3
pt_mlcd-salk3 = 0.

pt_mlcd-tpprd = pf_mlcrf-prdif.

COLLECT pt_mlcd.

1
WHEN OTHERS.

16
* Begin N980402

Statistical exchange rate differences

WHEN y_zugang_einst_auf_st.

pt_mlcd-categ = y_categ_zugaenge.

pt_mlcd-estkdm_st = pf_mlcrf-krdif.

COLLECT pt_mlcd.

WHEN y_verbr_preisb_einst_auf_st.

pt_mlcd-categ = y_categ_sonst_zugaen
ge.

pt_mlcd-estkdm_st = pf_mlcrf-krdif.

COLLECT pt_mlcd.

WHEN y_verbr_nichtprsb_einst_auf_st.

pt_mlcd-categ = y_categ_verbraeuche.

pt_mlcd-estkdm_st = pf_mlcrf-krdif.

COLLECT pt_mlcd.

* End N980402

WHEN OTHERS.

LIMU
FUNC
CKMCD_MLCD_POSTING
00002
LIMU
FUNC
CKMCD_MLCD_POSTING
00004
37
1
\\\\\no_empty_blocks/////
1
\\\\\comments_not_ignored/////
1
\\\\\delta_normalized/////
1
\\\\\if_comments_ignored/////
3
\\\\\allowed/////
FORM
*
3
\\\\\allowed/////
FUNCTION
*
3
\\\\\allowed/////
MODULE
**
3
\\\\\allowed/////
REPORT
*
3
\\\\\allowed/////
PROGRAM
*
3
\\\\\allowed/////
FUNCTION-POOL
*
4
\\\\\allowed/////
CLASS
*
DEFINITION
4
\\\\\allowed/////
CLASS
*
IMPLEMENTATION

5
\\\\\forbidden/////
CLASS
*
DEFINITION
DEFERRED
5
\\\\\forbidden/////
CLASS
*
DEFINITION
LOAD
6
\\\\\forbidden/////
CLASS
*
DEFINITION
LOCAL
FRIENDS
3
\\\\\allowed/////
AT
LINE-SELECTION
3
\\\\\allowed/////
AT
USER-COMMAND
4
\\\\\allowed/////
AT
SELECTION-SCREEN
**
3
\\\\\allowed/////
AT
PF*
2
\\\\\allowed/////
INITIALIZATION
2
\\\\\allowed/////
START-OF-SELECTION
2
\\\\\allowed/////
END-OF-SELECTION
3
\\\\\allowed/////
TOP-OF-PAGE
**
2
\\\\\allowed/////
END-OF-PAGE
3
\\\\\allowed/////
GET
**
3
\\\\\forbidden/////
GET
BADI

3
\\\\\forbidden/////
GET
BIT
3
\\\\\forbidden/////
GET
CONNECTION
3
\\\\\forbidden/////
GET
CURSOR
3
\\\\\forbidden/////
GET
DATASET
3
\\\\\forbidden/////
GET
LOCALE
3
\\\\\forbidden/////
GET
PARAMETER
3
\\\\\forbidden/////
GET
PF-STATUS
3
\\\\\forbidden/////
GET
PROPERTY
3
\\\\\forbidden/////
GET
REFERENCE
3
\\\\\forbidden/////
GET
RUN
3
\\\\\forbidden/////
GET
TIME
1
2
FUNCTION
CKMCD_MLCD_POSTING
3
42
6
UPDATE mlcd SET lbkum = lbkum + it
_mlcd-lbkum

salk3 = salk3 + it
_mlcd-salk3

estprd = it_mlcd-est
prd

estkdm = it_mlcd-est
kdm

mstprd = it_mlcd-mst
prd

mstkdm = it_mlcd-mst
kdm

1
WHERE kalnr = it_mlcd-k
alnr

estkdm_st

2
estkdm_st = it_mlcd"N980402

WHERE kalnr = it_mlcd-k


alnr

64
6
UPDATE mlcd SET lbkum = lbkum + it
_mlcd-lbkum

salk3 = salk3 + it
_mlcd-salk3

estprd = estprd + it
_mlcd-estprd

estkdm = estkdm + it
_mlcd-estkdm

mstprd = it_mlcd-mst
prd

mstkdm = it_mlcd-mst
kdm

1
WHERE kalnr = it_mlcd-k
alnr

t +

3
estkdm_st = estkdm_s
"N980402

estkdm_st

"N980402

it_mlcd-

WHERE kalnr = it_mlcd-k


alnr

80
7
UPDATE mlcd SET lbkum = lbkum + it
_mlcd-lbkum

salk3 = salk3 + it
_mlcd-salk3

estprd = estprd + it
_mlcd-estprd

estkdm = estkdm + it
_mlcd-estkdm

mstprd = mstprd + it
_mlcd-mstprd

mstkdm = mstkdm + it
_mlcd-mstkdm

tpprd = tpprd + it
_mlcd-tpprd

1
WHERE kalnr = it_mlcd-k
alnr

t +

3
estkdm_st = estkdm_s
"N980402

estkdm_st

"N980402

it_mlcd-

WHERE kalnr = it_mlcd-k


alnr

LIMU
FUNC
CKMD_DOCUMENT_REPORT
00002
LIMU
FUNC
CKMD_DOCUMENT_REPORT
00004
37
1
\\\\\no_empty_blocks/////
1
\\\\\comments_not_ignored/////
1
\\\\\delta_normalized/////
1
\\\\\if_comments_ignored/////
3
\\\\\allowed/////
FORM
*

3
\\\\\allowed/////
FUNCTION
*
3
\\\\\allowed/////
MODULE
**
3
\\\\\allowed/////
REPORT
*
3
\\\\\allowed/////
PROGRAM
*
3
\\\\\allowed/////
FUNCTION-POOL
*
4
\\\\\allowed/////
CLASS
*
DEFINITION
4
\\\\\allowed/////
CLASS
*
IMPLEMENTATION
5
\\\\\forbidden/////
CLASS
*
DEFINITION
DEFERRED
5
\\\\\forbidden/////
CLASS
*
DEFINITION
LOAD
6
\\\\\forbidden/////
CLASS
*
DEFINITION
LOCAL
FRIENDS
3
\\\\\allowed/////
AT
LINE-SELECTION
3
\\\\\allowed/////
AT
USER-COMMAND
4
\\\\\allowed/////
AT

SELECTION-SCREEN
**
3
\\\\\allowed/////
AT
PF*
2
\\\\\allowed/////
INITIALIZATION
2
\\\\\allowed/////
START-OF-SELECTION
2
\\\\\allowed/////
END-OF-SELECTION
3
\\\\\allowed/////
TOP-OF-PAGE
**
2
\\\\\allowed/////
END-OF-PAGE
3
\\\\\allowed/////
GET
**
3
\\\\\forbidden/////
GET
BADI
3
\\\\\forbidden/////
GET
BIT
3
\\\\\forbidden/////
GET
CONNECTION
3
\\\\\forbidden/////
GET
CURSOR
3
\\\\\forbidden/////
GET
DATASET
3
\\\\\forbidden/////
GET
LOCALE
3
\\\\\forbidden/////
GET
PARAMETER
3
\\\\\forbidden/////
GET
PF-STATUS
3
\\\\\forbidden/////

GET
PROPERTY
3
\\\\\forbidden/////
GET
REFERENCE
3
\\\\\forbidden/////
GET
RUN
3
\\\\\forbidden/////
GET
TIME
1
2
FUNCTION
CKMD_DOCUMENT_REPORT
11
133
3
lh_zu LIKE ckmlcr-zuprd_o,

lh_zu_prd LIKE ckmlcr-zuprd_o,

lh_zu_kdm LIKE ckmlcr-zukdm_o,

3
lh_all_diff LIKE ckmlcr-zuprd_o,

lh_prd LIKE ckmlcr-zuprd_o,

lh_kdm LIKE ckmlcr-zukdm_o,

5
lh_zu_kdm_st LIKE ckmlcr-zukdm_o,
"N980402

lh_all_diff LIKE ckmlcr-zuprd_o,

lh_prd LIKE ckmlcr-zuprd_o,

lh_kdm LIKE ckmlcr-zukdm_o,

lh_kdm_st LIKE ckmlcr-zukdm_o,


"N980402

1382
3
CLEAR: lt_report-curtp, lt
_report-salk3,

lt_report-estprd, l
t_report-estkdm,

lt_report-mstprd, l
t_report-mstkdm,

1
lt_report-waers.

1
lt_report-waers, l
t_report-estkdm_st."N980402

1534
5
lt_mlcd-cate
g = y_categ_verbraeuche.

lt_mlcd-estp
rd = t_mlcrf-prdif.

lt_mlcd-estk
dm = t_mlcrf-krdif.

lt_mlcd-salk
3 = 0 - t_mlcrf-prdif - t_mlcrf-krdif.

COLLECT lt_m
lcd.

1
ENDCASE.

15
* Begin N980402

WHEN y_zugang_
einst_auf_st.

lt_mlcd-cate
g = y_categ_zugaenge.

lt_mlcd-estk
dm_st = t_mlcrf-krdif.

COLLECT lt_m
lcd.

WHEN y_verbr_p
reisb_einst_auf_st.

lt_mlcd-cate
g = y_categ_sonst_zugaenge.

lt_mlcd-estk
dm_st = t_mlcrf-krdif.

COLLECT lt_m
lcd.

WHEN y_verbr_n
ichtprsb_einst_auf_st.

lt_mlcd-cate
g = y_categ_verbraeuche.

lt_mlcd-estk
dm_st = t_mlcrf-krdif.

COLLECT lt_m
lcd.

* End N980402

ENDCASE.

1915
3
CLEAR: lt_report-curtp, lt_r
eport-salk3,

lt_report-estprd, lt_

report-estkdm,

lt_report-mstprd, lt_
report-mstkdm,

1
lt_report-waers.

1
lt_report-waers, lt_
report-estkdm_st. "N980402

2066
4
lt_mlcd-categ
= y_categ_verbraeuche.

lt_mlcd-estprd
= t_mlcrf-prdif.

lt_mlcd-estkdm
= t_mlcrf-krdif.

lt_mlcd-salk3
= 0 - t_mlcrf-prdif - t_mlcrf-krdif.

COLLECT lt_mlc
d.

ENDCASE.

16
COLLECT lt_mlc
d.

* Begin N980402

WHEN y_zugang_ei
nst_auf_st.

lt_mlcd-categ
= y_categ_zugaenge.

lt_mlcd-estkdm
_st = t_mlcrf-krdif.

COLLECT lt_mlc
d.

WHEN y_verbr_pre
isb_einst_auf_st.

lt_mlcd-categ
= y_categ_sonst_zugaenge.

lt_mlcd-estkdm
_st = t_mlcrf-krdif.

COLLECT lt_mlc
d.

WHEN y_verbr_nic
htprsb_einst_auf_st.

lt_mlcd-categ
= y_categ_verbraeuche.

lt_mlcd-estkdm
_st = t_mlcrf-krdif.

COLLECT lt_mlc
d.

* End N980402

ENDCASE.

2665
3
CLEAR: lt_report-curtp, lt_rep
ort-salk3,

lt_report-estprd, lt_re
port-estkdm,

lt_report-mstprd, lt_re
port-mstkdm,

1
lt_report-waers.

port-estkdm_st.

1
lt_report-waers, lt_re
"N980402

2851
5
lt_report-lbkum = t_mlpp
f-menge.

WHEN y_zugang_alte_abrech.

*
f-menge.

lt_report-lbkum = t_mlpp

ENDCASE.

ENDLOOP.

1
CLEAR: lh_zu, lh_zu_prd, lh_zu
_kdm.

1
CLEAR: lh_zu, lh_zu_prd, lh_zu
_kdm, lh_zu_kdm_st."N980402

2902
5
lt_report-categ = y_cate
g_verbraeuche.

lt_report-estprd = t_mlc
rf-prdif.

lt_report-estkdm = t_mlc
rf-krdif.

lh_zu_prd = lh_zu_prd +
t_mlcrf-prdif.

lh_zu_kdm = lh_zu_kdm +
t_mlcrf-krdif.

1
WHEN y_umbew_alte_abrech.

15
* Begin N980402

WHEN y_zugang_einst_auf_st
.

lt_report-categ = y_cate
g_zugaenge.

lt_report-estkdm_st = t_
mlcrf-krdif.

lh_zu_kdm_st = lh_zu_kdm
_st + t_mlcrf-krdif.

WHEN y_verbr_preisb_einst_
auf_st.

lt_report-categ = y_cate
g_sonst_zugaenge.

lt_report-estkdm_st = t_
mlcrf-krdif.

lh_zu_kdm_st = lh_zu_kdm
_st + t_mlcrf-krdif.

WHEN y_verbr_nichtprsb_ein
st_auf_st.

lt_report-categ = y_cate
g_verbraeuche.

lt_report-estkdm_st = t_
mlcrf-krdif.

lh_zu_kdm_st = lh_zu_kdm
_st + t_mlcrf-krdif.

* End N980402

WHEN y_umbew_alte_abrech.

2937
3
WHEN y_verbr_nichtprsb_e
inst_aufgel.

lh_zu_prd = lh_zu_prd
+ lt_mlcrf_prev-prdif.

lh_zu_kdm = lh_zu_kdm
+ lt_mlcrf_prev-krdif.

1
ENDCASE.

9
* Begin N980402

WHEN y_zugang_einst_auf_
st.

lh_zu_kdm_st = lh_zu_k
dm_st + lt_mlcrf_prev-krdif.

WHEN y_verbr_preisb_eins
t_auf_st.

lh_zu_kdm_st = lh_zu_k
dm_st + lt_mlcrf_prev-krdif.

WHEN y_verbr_nichtprsb_e
inst_auf_st.

lh_zu_kdm_st = lh_zu_k
dm_st + lt_mlcrf_prev-krdif.

* End N980402

ENDCASE.

3055
3
lh_kdm = lf_mlcrfkrdif.

ENDIF.

ELSE.

1
CLEAR: lh_prd, lh_kd
m.

m, lh_kdm_st.

1
CLEAR: lh_prd, lh_kd
"N980402

3063
4
ELSE.

*
ach!

S-Preis, alles bleibt einf

lh_prd = lh_zu_prd.

lh_kdm = lh_zu_kdm.

3
ENDIF.

IF NOT lt_report-estprd IS I
NITIAL OR

NOT lt_report-estkdm IS I
NITIAL.

5
lh_kdm_st = lh_zu_kdm_st.
"N980402

ENDIF.

IF NOT lt_report-estprd IS I
NITIAL OR

NITIAL OR

NOT lt_report-estkdm IS I
"N980402

S INITIAL.

NOT lt_report-estkdm_st I
"N980402

LIMU
FUNC
CKMD_PRICE_HISTORY_READ
00001

LIMU
FUNC
CKMD_PRICE_HISTORY_READ
00003
37
1
\\\\\no_empty_blocks/////
1
\\\\\comments_ignored/////
1
\\\\\delta_normalized/////
1
\\\\\if_comments_ignored/////
3
\\\\\allowed/////
FORM
*
3
\\\\\allowed/////
FUNCTION
*
3
\\\\\allowed/////
MODULE
**
3
\\\\\allowed/////
REPORT
*
3
\\\\\allowed/////
PROGRAM
*
3
\\\\\allowed/////
FUNCTION-POOL
*
4
\\\\\allowed/////
CLASS
*
DEFINITION
4
\\\\\allowed/////
CLASS
*
IMPLEMENTATION
5
\\\\\forbidden/////
CLASS
*
DEFINITION
DEFERRED
5
\\\\\forbidden/////
CLASS

*
DEFINITION
LOAD
6
\\\\\forbidden/////
CLASS
*
DEFINITION
LOCAL
FRIENDS
3
\\\\\allowed/////
AT
LINE-SELECTION
3
\\\\\allowed/////
AT
USER-COMMAND
4
\\\\\allowed/////
AT
SELECTION-SCREEN
**
3
\\\\\allowed/////
AT
PF*
2
\\\\\allowed/////
INITIALIZATION
2
\\\\\allowed/////
START-OF-SELECTION
2
\\\\\allowed/////
END-OF-SELECTION
3
\\\\\allowed/////
TOP-OF-PAGE
**
2
\\\\\allowed/////
END-OF-PAGE
3
\\\\\allowed/////
GET
**
3
\\\\\forbidden/////
GET
BADI
3
\\\\\forbidden/////
GET
BIT
3
\\\\\forbidden/////
GET
CONNECTION
3

\\\\\forbidden/////
GET
CURSOR
3
\\\\\forbidden/////
GET
DATASET
3
\\\\\forbidden/////
GET
LOCALE
3
\\\\\forbidden/////
GET
PARAMETER
3
\\\\\forbidden/////
GET
PF-STATUS
3
\\\\\forbidden/////
GET
PROPERTY
3
\\\\\forbidden/////
GET
REFERENCE
3
\\\\\forbidden/////
GET
RUN
3
\\\\\forbidden/////
GET
TIME
1
2
FUNCTION
CKMD_PRICE_HISTORY_READ
6
943
8
READ TABLE lt_ckmlcr WITH
KEY kalnr = <mlit_ext>-kalnr

bdatj = t_mlpp-bdatj

poper = t_mlpp-poper

curtp = t_mlcr-curtp

BINARY SEARCH.

CLEAR: lf_ph-curtp, lf_phsalk3, lf_ph-salk3_old,

lf_ph-estprd, lf_ph
-estkdm,

1
lf_ph-mstprd, lf_ph
-mstkdm,

2
lf_ph-estkdm_st,
"N980402

lf_ph-mstprd, lf_ph
-mstkdm,

1419
7
READ TABLE lt_ckmlcr WITH KE
Y kalnr = <mlit_ext>-kalnr

bdatj = t_mlpp-bdatj

poper = t_mlpp-poper

curtp = t_mlcr-curtp

BINARY SEARCH.

CLEAR: lf_ph-curtp, lf_ph-sa


lk3, lf_ph-salk3_old,

lf_ph-estprd, lf_ph-e
stkdm,

1
lf_ph-mstprd, lf_ph-m
stkdm,

2
lf_ph-estkdm_st,
"N980402

lf_ph-mstprd, lf_ph-m
stkdm,

2225
5
t_ph-lbkum = 0 - t_mlppf
-menge.

t_ph-estprd = t_mlcrf-pr
dif.

t_ph-estkdm = t_mlcrf-kr
dif.

lh_zu_prd = lh_zu_prd +
t_mlcrf-prdif.

lh_zu_kdm = lh_zu_kdm +
t_mlcrf-krdif.

1
WHEN y_umbew_alte_abrech.

16
* Begin N980402

WHEN y_zugang_einst_auf_st
.

t_ph-categ = y_categ_zug
aenge.

t_ph-lbkum = t_mlppf-men
ge.

t_ph-estkdm_st = t_mlcrf
-krdif.

WHEN y_verbr_preisb_einst_
auf_st.

t_ph-categ = y_categ_son
st_zugaenge.

t_ph-lbkum = t_mlppf-men
ge.

t_ph-estkdm_st = t_mlcrf
-krdif.

WHEN y_verbr_nichtprsb_ein
st_auf_st.

t_ph-categ = y_categ_ver
braeuche.

*
Verbruche haben negativ
e Mengen (nicht so im Beleg)

t_ph-lbkum = 0 - t_mlppf
-menge.

t_ph-estkdm_st = t_mlcrf
-krdif.

* End N980402

WHEN y_umbew_alte_abrech.

2290
5
t_ph-categ = y_categ
_verbraeuche.

t_ph-estprd = t_mlcr
f-prdif.

t_ph-estkdm = t_mlcr
f-krdif.

lh_zu_prd = lh_zu_pr
d + t_mlcrf-prdif.

lh_zu_kdm = lh_zu_kd
m + t_mlcrf-krdif.

1
WHEN y_umbew_alte_abre
ch.

12
* Begin N980402

WHEN y_zugang_einst_au
f_st.

t_ph-categ = y_categ
_zugaenge.

t_ph-estkdm_st = t_m
lcrf-krdif.

WHEN y_verbr_preisb_ei
nst_auf_st.

t_ph-categ = y_categ
_sonst_zugaenge.

t_ph-estkdm_st = t_m
lcrf-krdif.

WHEN y_verbr_nichtprsb
_einst_auf_st.

t_ph-categ = y_categ
_verbraeuche.

t_ph-estkdm_st = t_m
lcrf-krdif.

* End N980402

WHEN y_umbew_alte_abre
ch.

2366
3
t_ph-estkdm = lt_values_pr
ev-krdif.

ELSE.

CLEAR: t_ph-salk3, t_ph-es


tprd, t_ph-estkdm,

1
t_ph-mstprd, t_ph-m
stkdm.

2
t_ph-estkdm_st,
"N980402

t_ph-mstprd, t_ph-m
stkdm.

2465
3
ENDIF.

IF NOT t_ph-estprd IS IN
ITIAL OR

NOT t_ph-estkdm IS IN
ITIAL.

1
CLEAR: t_ph-estprd, t_
ph-estkdm,

1
CLEAR: t_ph-estprd, t_
ph-estkdm, t_ph-estkdm_st, "N980402

LIMU
FUNC
CKML_F_DOCUMENT_CREATE_UPDATE
00001
LIMU
FUNC
CKML_F_DOCUMENT_CREATE_UPDATE
00003
37
1
\\\\\no_empty_blocks/////
1
\\\\\comments_ignored/////
1
\\\\\delta_normalized/////
1
\\\\\if_comments_ignored/////
3
\\\\\allowed/////
FORM
*
3
\\\\\allowed/////
FUNCTION

*
3
\\\\\allowed/////
MODULE
**
3
\\\\\allowed/////
REPORT
*
3
\\\\\allowed/////
PROGRAM
*
3
\\\\\allowed/////
FUNCTION-POOL
*
4
\\\\\allowed/////
CLASS
*
DEFINITION
4
\\\\\allowed/////
CLASS
*
IMPLEMENTATION
5
\\\\\forbidden/////
CLASS
*
DEFINITION
DEFERRED
5
\\\\\forbidden/////
CLASS
*
DEFINITION
LOAD
6
\\\\\forbidden/////
CLASS
*
DEFINITION
LOCAL
FRIENDS
3
\\\\\allowed/////
AT
LINE-SELECTION
3
\\\\\allowed/////
AT
USER-COMMAND
4
\\\\\allowed/////
AT
SELECTION-SCREEN
**
3

\\\\\allowed/////
AT
PF*
2
\\\\\allowed/////
INITIALIZATION
2
\\\\\allowed/////
START-OF-SELECTION
2
\\\\\allowed/////
END-OF-SELECTION
3
\\\\\allowed/////
TOP-OF-PAGE
**
2
\\\\\allowed/////
END-OF-PAGE
3
\\\\\allowed/////
GET
**
3
\\\\\forbidden/////
GET
BADI
3
\\\\\forbidden/////
GET
BIT
3
\\\\\forbidden/////
GET
CONNECTION
3
\\\\\forbidden/////
GET
CURSOR
3
\\\\\forbidden/////
GET
DATASET
3
\\\\\forbidden/////
GET
LOCALE
3
\\\\\forbidden/////
GET
PARAMETER
3
\\\\\forbidden/////
GET
PF-STATUS
3
\\\\\forbidden/////
GET
PROPERTY
3

\\\\\forbidden/////
GET
REFERENCE
3
\\\\\forbidden/////
GET
RUN
3
\\\\\forbidden/////
GET
TIME
1
2
FUNCTION
CKML_F_DOCUMENT_CREATE_UPDATE
3
17
8
DATA: l_last_kalnr LIKE ckmlpp-kalnr,

l_last_zeile TYPE ckm3_upd_ckmlpp


-zeile,

l_last_poper LIKE ckmlpp-poper,

l_last_bdatj LIKE ckmlpp-bdatj,

lh_subrc

LIKE sy-subrc,

lh_index

LIKE sy-tabix,

lh_mat_values(50) TYPE c.

* bergabetabellen richtig sortieren

* Bei CKMLPP Zeile vor Periode, da sonst f


r jede Periode evtl. eine

* neue MLIT-Zeile erzeugt wird!

SORT t_ckmlpp BY kalnr zeile bdatj poper


.

4
* bergabetabellen richtig sortieren

* Bei CKMLPP Zeile vor Periode, da sonst f


r jede Periode evtl. eine

* neue MLIT-Zeile erzeugt wird!

SORT t_ckmlpp BY kalnr zeile bdatj poper


.

t_mlcrf-curtp

561
3
= t_ckmlcr-curtp.

t_mlcrf-feldg
b_transfer.

= y_verbr_nichtprs

t_mlcrf-prdif

= t_ckmlcr-vnprd_t

p.

4
APPEND t_mlcrf.

ENDIF.

IF t_mlcr-peinh IS INITIAL.

85
APPEND t_mlcrf.

ENDIF.

* Begin N980402

* Statistical Exchange Rate Differences

IF NOT t_ckmlcr-zukdm_ost IS INITIAL


.

CLEAR t_mlcrf.

t_mlcrf-mandt

= t_mlpp-mandt.

t_mlcrf-belnr
Buchen vergeben

wird kurz vor

t_mlcrf-kjahr

= t_mlpp-kjahr.

t_mlcrf-posnr

= t_mlpp-posnr.

t_mlcrf-bdatj

= t_mlpp-bdatj.

t_mlcrf-poper

= t_mlpp-poper.

t_mlcrf-curtp

= t_ckmlcr-curtp.

t_mlcrf-feldg

= y_zugang_einst_a

t_mlcrf-krdif

= t_ckmlcr-zukdm_o

uf_st.

st.

APPEND t_mlcrf.

ENDIF.

IF NOT t_ckmlcr-ekkdm_ost IS INITIAL


.

CLEAR t_mlcrf.

t_mlcrf-mandt

t_mlcrf-belnr
Buchen vergeben

= t_mlpp-mandt.

wird kurz vor

t_mlcrf-kjahr

= t_mlpp-kjahr.

t_mlcrf-posnr

= t_mlpp-posnr.

t_mlcrf-bdatj

= t_mlpp-bdatj.

t_mlcrf-poper

= t_mlpp-poper.

t_mlcrf-curtp

= t_ckmlcr-curtp.

t_mlcrf-feldg

= y_einkauf_einst_

t_mlcrf-krdif

= t_ckmlcr-ekkdm_o

auf_st.

st.

APPEND t_mlcrf.

ENDIF.

IF NOT t_ckmlcr-pbkdm_ost IS INITIAL


.

CLEAR t_mlcrf.

t_mlcrf-mandt

= t_mlpp-mandt.

t_mlcrf-belnr
Buchen vergeben

wird kurz vor

t_mlcrf-kjahr

= t_mlpp-kjahr.

t_mlcrf-posnr

= t_mlpp-posnr.

t_mlcrf-bdatj

= t_mlpp-bdatj.

t_mlcrf-poper

= t_mlpp-poper.

t_mlcrf-curtp

= t_ckmlcr-curtp.

t_mlcrf-feldg
t_auf_st.

= y_preisbegr_eins

t_mlcrf-krdif

= t_ckmlcr-pbkdm_o

st.

APPEND t_mlcrf.

ENDIF.

IF NOT t_ckmlcr-vpkdm_ost IS INITIAL


.

CLEAR t_mlcrf.

t_mlcrf-mandt

t_mlcrf-belnr
Buchen vergeben

= t_mlpp-mandt.

wird kurz vor

t_mlcrf-kjahr

= t_mlpp-kjahr.

t_mlcrf-posnr

= t_mlpp-posnr.

t_mlcrf-bdatj

= t_mlpp-bdatj.

t_mlcrf-poper

= t_mlpp-poper.

t_mlcrf-curtp

= t_ckmlcr-curtp.

t_mlcrf-feldg
inst_auf_st.

= y_verbr_preisb_e

t_mlcrf-krdif

= t_ckmlcr-vpkdm_o

st.

APPEND t_mlcrf.

ENDIF.

IF NOT t_ckmlcr-vppbkdm_ost IS INITI


AL.

CLEAR t_mlcrf.

t_mlcrf-mandt

= t_mlpp-mandt.

t_mlcrf-belnr
Buchen vergeben

wird kurz vor

t_mlcrf-kjahr

= t_mlpp-kjahr.

t_mlcrf-posnr

= t_mlpp-posnr.

t_mlcrf-bdatj

= t_mlpp-bdatj.

t_mlcrf-poper

= t_mlpp-poper.

t_mlcrf-curtp

= t_ckmlcr-curtp.

t_mlcrf-feldg
r_prsb_auf_st.

= y_preisbegr_verb

t_mlcrf-krdif

= t_ckmlcr-vppbkdm

_ost.

APPEND t_mlcrf.

ENDIF.

IF NOT t_ckmlcr-vnkdm_ost IS INITIAL


.

CLEAR t_mlcrf.

t_mlcrf-mandt

t_mlcrf-belnr
Buchen vergeben

= t_mlpp-mandt.

wird kurz vor

t_mlcrf-kjahr

= t_mlpp-kjahr.

t_mlcrf-posnr

= t_mlpp-posnr.

t_mlcrf-bdatj

= t_mlpp-bdatj.

t_mlcrf-poper

= t_mlpp-poper.

t_mlcrf-curtp

= t_ckmlcr-curtp.

t_mlcrf-feldg
b_einst_auf_st.

= y_verbr_nichtprs

t_mlcrf-krdif

= t_ckmlcr-vnkdm_o

st.

APPEND t_mlcrf.

ENDIF.

* End N980402

IF t_mlcr-peinh IS INITIAL.

612
4
it_mlcrp = t_mlcrp.

* Verdichtungsstze erzeugen (Tabelle MLCD


)

* Abrechnungssteuerung 2 kommt erst in FB


CKML_F_DOCUMENT_CREATE_CLOSING

1
* dran!

1
* dran, wenn alte V-Preis-Logik (vorgangsb
ezogen) aktiv ist.

LIMU
FUNC
CKMS_POST_PERIOD_DELTA
00001

LIMU
FUNC
CKMS_POST_PERIOD_DELTA
00003
37
1
\\\\\no_empty_blocks/////
1
\\\\\comments_not_ignored/////
1
\\\\\delta_normalized/////
1
\\\\\if_comments_ignored/////
3
\\\\\allowed/////
FORM
*
3
\\\\\allowed/////
FUNCTION
*
3
\\\\\allowed/////
MODULE
**
3
\\\\\allowed/////
REPORT
*
3
\\\\\allowed/////
PROGRAM
*
3
\\\\\allowed/////
FUNCTION-POOL
*
4
\\\\\allowed/////
CLASS
*
DEFINITION
4
\\\\\allowed/////
CLASS
*
IMPLEMENTATION
5
\\\\\forbidden/////
CLASS
*
DEFINITION
DEFERRED
5
\\\\\forbidden/////

CLASS
*
DEFINITION
LOAD
6
\\\\\forbidden/////
CLASS
*
DEFINITION
LOCAL
FRIENDS
3
\\\\\allowed/////
AT
LINE-SELECTION
3
\\\\\allowed/////
AT
USER-COMMAND
4
\\\\\allowed/////
AT
SELECTION-SCREEN
**
3
\\\\\allowed/////
AT
PF*
2
\\\\\allowed/////
INITIALIZATION
2
\\\\\allowed/////
START-OF-SELECTION
2
\\\\\allowed/////
END-OF-SELECTION
3
\\\\\allowed/////
TOP-OF-PAGE
**
2
\\\\\allowed/////
END-OF-PAGE
3
\\\\\allowed/////
GET
**
3
\\\\\forbidden/////
GET
BADI
3
\\\\\forbidden/////
GET
BIT
3
\\\\\forbidden/////
GET
CONNECTION

3
\\\\\forbidden/////
GET
CURSOR
3
\\\\\forbidden/////
GET
DATASET
3
\\\\\forbidden/////
GET
LOCALE
3
\\\\\forbidden/////
GET
PARAMETER
3
\\\\\forbidden/////
GET
PF-STATUS
3
\\\\\forbidden/////
GET
PROPERTY
3
\\\\\forbidden/////
GET
REFERENCE
3
\\\\\forbidden/////
GET
RUN
3
\\\\\forbidden/////
GET
TIME
1
2
FUNCTION
CKMS_POST_PERIOD_DELTA
1
181
3
vnkdm_ma = vnkdm_ma + lf_
delta_ckmlcr-vnkdm_ma

ebprd_ma = ebprd_ma + lf_


delta_ckmlcr-ebprd_ma

ebkdm_ma = ebkdm_ma + lf_


delta_ckmlcr-ebkdm_ma

1
WHERE kalnr = in_new_ckmlcr-ka
lnr AND

9
* Begin N980402

zukdm_ost = zukdm_ost
+ lf_delta_ckmlcr-zukdm_ost

ekkdm_ost = ekkdm_ost
+ lf_delta_ckmlcr-ekkdm_ost

pbkdm_ost = pbkdm_ost
+ lf_delta_ckmlcr-pbkdm_ost

vpkdm_ost = vpkdm_ost
+ lf_delta_ckmlcr-vpkdm_ost

vppbkdm_ost = vppbkdm_ost
+ lf_delta_ckmlcr-vppbkdm_ost

vnkdm_ost = vnkdm_ost
+ lf_delta_ckmlcr-vnkdm_ost

* End N980402

WHERE kalnr = in_new_ckmlcr-kaln


r AND

LIMU
FUNC
CKMW_MODIFY_CONDENSED_POH_EKBE
00001
LIMU
FUNC
CKMW_MODIFY_CONDENSED_POH_EKBE
00003
37
1
\\\\\no_empty_blocks/////
1
\\\\\comments_not_ignored/////
1
\\\\\delta_normalized/////
1
\\\\\if_comments_ignored/////
3
\\\\\allowed/////
FORM
*
3
\\\\\allowed/////
FUNCTION
*
3
\\\\\allowed/////
MODULE
**
3
\\\\\allowed/////
REPORT
*
3
\\\\\allowed/////
PROGRAM

*
3
\\\\\allowed/////
FUNCTION-POOL
*
4
\\\\\allowed/////
CLASS
*
DEFINITION
4
\\\\\allowed/////
CLASS
*
IMPLEMENTATION
5
\\\\\forbidden/////
CLASS
*
DEFINITION
DEFERRED
5
\\\\\forbidden/////
CLASS
*
DEFINITION
LOAD
6
\\\\\forbidden/////
CLASS
*
DEFINITION
LOCAL
FRIENDS
3
\\\\\allowed/////
AT
LINE-SELECTION
3
\\\\\allowed/////
AT
USER-COMMAND
4
\\\\\allowed/////
AT
SELECTION-SCREEN
**
3
\\\\\allowed/////
AT
PF*
2
\\\\\allowed/////
INITIALIZATION
2
\\\\\allowed/////
START-OF-SELECTION
2
\\\\\allowed/////
END-OF-SELECTION

3
\\\\\allowed/////
TOP-OF-PAGE
**
2
\\\\\allowed/////
END-OF-PAGE
3
\\\\\allowed/////
GET
**
3
\\\\\forbidden/////
GET
BADI
3
\\\\\forbidden/////
GET
BIT
3
\\\\\forbidden/////
GET
CONNECTION
3
\\\\\forbidden/////
GET
CURSOR
3
\\\\\forbidden/////
GET
DATASET
3
\\\\\forbidden/////
GET
LOCALE
3
\\\\\forbidden/////
GET
PARAMETER
3
\\\\\forbidden/////
GET
PF-STATUS
3
\\\\\forbidden/////
GET
PROPERTY
3
\\\\\forbidden/////
GET
REFERENCE
3
\\\\\forbidden/////
GET
RUN
3
\\\\\forbidden/////
GET
TIME
1

2
FUNCTION
CKMW_MODIFY_CONDENSED_POH_EKBE
5
147
3
IF xekbe-shkzg = 'S'.

HT_CONDENSED_MLBECR-WRBTR =

HT_CONDENSED_MLBECR-WRBTR + T_
MLBECR-WRBTR.

3
ELSE.

HT_CONDENSED_MLBECR-WRBTR =

HT_CONDENSED_MLBECR-WRBTR - T_
MLBECR-WRBTR.

7
ht_condensed_mlbecr-kudif =

ht_condensed_mlbecr-kudif + t_
mlbecr-kudif.
"N980402

ELSE.

ht_condensed_mlbecr-wrbtr =

ht_condensed_mlbecr-wrbtr - t_
mlbecr-wrbtr.

ht_condensed_mlbecr-kudif =

ht_condensed_mlbecr-kudif - t_
mlbecr-kudif.
"N980402

162
4
HT_CONDENSED_MLBECR-AREWR =

HT_CONDENSED_MLBECR-AREWR + T
_MLBECR-AREWR.

HT_CONDENSED_MLBECR-REEWR =

HT_CONDENSED_MLBECR-REEWR + T
_MLBECR-REEWR.

1
ELSE.

3
ht_condensed_mlbecr-kudif =

ht_condensed_mlbecr-kudif + t_
mlbecr-kudif.
"N980402

ELSE.

169
4
HT_CONDENSED_MLBECR-AREWR =

HT_CONDENSED_MLBECR-AREWR - T
_MLBECR-AREWR.

HT_CONDENSED_MLBECR-REEWR =

HT_CONDENSED_MLBECR-REEWR - T
_MLBECR-REEWR.

3
ht_condensed_mlbecr-kudif =

ht_condensed_mlbecr-kudif - t_
mlbecr-kudif.
"N980402

186
4
HT_CONDENSED_MLBECR-AREWR =

HT_CONDENSED_MLBECR-AREWR + T
_MLBECR-AREWR.

HT_CONDENSED_MLBECR-REEWR =

HT_CONDENSED_MLBECR-REEWR + T
_MLBECR-REEWR.

1
ELSE.

3
ht_condensed_mlbecr-kudif =

ht_condensed_mlbecr-kudif + t_
mlbecr-kudif.
"N980402

ELSE.

193
4
HT_CONDENSED_MLBECR-AREWR =

HT_CONDENSED_MLBECR-AREWR - T
_MLBECR-AREWR.

HT_CONDENSED_MLBECR-REEWR =

HT_CONDENSED_MLBECR-REEWR - T
_MLBECR-REEWR.

3
ht_condensed_mlbecr-kudif =

ht_condensed_mlbecr-kudif - t_
mlbecr-kudif.
"N980402

LIMU
FUNC
CKMW_MODIFY_CONDENSED_POH_EKBZ
00001
LIMU
FUNC
CKMW_MODIFY_CONDENSED_POH_EKBZ
00003
37
1
\\\\\no_empty_blocks/////
1
\\\\\comments_not_ignored/////

1
\\\\\delta_normalized/////
1
\\\\\if_comments_ignored/////
3
\\\\\allowed/////
FORM
*
3
\\\\\allowed/////
FUNCTION
*
3
\\\\\allowed/////
MODULE
**
3
\\\\\allowed/////
REPORT
*
3
\\\\\allowed/////
PROGRAM
*
3
\\\\\allowed/////
FUNCTION-POOL
*
4
\\\\\allowed/////
CLASS
*
DEFINITION
4
\\\\\allowed/////
CLASS
*
IMPLEMENTATION
5
\\\\\forbidden/////
CLASS
*
DEFINITION
DEFERRED
5
\\\\\forbidden/////
CLASS
*
DEFINITION
LOAD
6
\\\\\forbidden/////
CLASS
*
DEFINITION
LOCAL
FRIENDS
3
\\\\\allowed/////
AT

LINE-SELECTION
3
\\\\\allowed/////
AT
USER-COMMAND
4
\\\\\allowed/////
AT
SELECTION-SCREEN
**
3
\\\\\allowed/////
AT
PF*
2
\\\\\allowed/////
INITIALIZATION
2
\\\\\allowed/////
START-OF-SELECTION
2
\\\\\allowed/////
END-OF-SELECTION
3
\\\\\allowed/////
TOP-OF-PAGE
**
2
\\\\\allowed/////
END-OF-PAGE
3
\\\\\allowed/////
GET
**
3
\\\\\forbidden/////
GET
BADI
3
\\\\\forbidden/////
GET
BIT
3
\\\\\forbidden/////
GET
CONNECTION
3
\\\\\forbidden/////
GET
CURSOR
3
\\\\\forbidden/////
GET
DATASET
3
\\\\\forbidden/////
GET
LOCALE
3
\\\\\forbidden/////

GET
PARAMETER
3
\\\\\forbidden/////
GET
PF-STATUS
3
\\\\\forbidden/////
GET
PROPERTY
3
\\\\\forbidden/////
GET
REFERENCE
3
\\\\\forbidden/////
GET
RUN
3
\\\\\forbidden/////
GET
TIME
1
2
FUNCTION
CKMW_MODIFY_CONDENSED_POH_EKBZ
3
95
3
IF xekbz-shkzg = 'H'.
"Note 322440

ht_condensed_mlbecr-wrbtr =

ht_condensed_mlbecr-wrbtr + t
_mlbecr-wrbtr.

3
ELSE.

ht_condensed_mlbecr-wrbtr =

ht_condensed_mlbecr-wrbtr - t
_mlbecr-wrbtr.

7
ht_condensed_mlbecr-kudif =

ht_condensed_mlbecr-kudif + t_
mlbecr-kudif.
"N980402

ELSE.

ht_condensed_mlbecr-wrbtr =

ht_condensed_mlbecr-wrbtr - t
_mlbecr-wrbtr.

ht_condensed_mlbecr-kudif =

ht_condensed_mlbecr-kudif - t_
mlbecr-kudif.
"N980402

109
4
HT_CONDENSED_MLBECR-AREWR =

HT_CONDENSED_MLBECR-AREWR + T_
MLBECR-AREWR.

HT_CONDENSED_MLBECR-REEWR =

HT_CONDENSED_MLBECR-REEWR + T_
MLBECR-REEWR.

1
ELSE.

3
ht_condensed_mlbecr-kudif =

ht_condensed_mlbecr-kudif + t_
mlbecr-kudif.
"N980402

ELSE.

116
4
HT_CONDENSED_MLBECR-AREWR =

HT_CONDENSED_MLBECR-AREWR - T_
MLBECR-AREWR.

HT_CONDENSED_MLBECR-REEWR =

HT_CONDENSED_MLBECR-REEWR - T_
MLBECR-REEWR.

3
ht_condensed_mlbecr-kudif =

ht_condensed_mlbecr-kudif - t_
mlbecr-kudif.
"N980402

LIMU
FUNC
CKMW_REPLACE_AND_POST_POH
00001
LIMU
FUNC
CKMW_REPLACE_AND_POST_POH
00003
37
1
\\\\\no_empty_blocks/////
1
\\\\\comments_not_ignored/////
1
\\\\\delta_normalized/////
1
\\\\\if_comments_ignored/////
3
\\\\\allowed/////
FORM
*
3
\\\\\allowed/////
FUNCTION
*
3
\\\\\allowed/////
MODULE
**
3
\\\\\allowed/////
REPORT
*
3
\\\\\allowed/////
PROGRAM
*
3
\\\\\allowed/////
FUNCTION-POOL
*
4
\\\\\allowed/////
CLASS
*
DEFINITION
4
\\\\\allowed/////
CLASS
*

IMPLEMENTATION
5
\\\\\forbidden/////
CLASS
*
DEFINITION
DEFERRED
5
\\\\\forbidden/////
CLASS
*
DEFINITION
LOAD
6
\\\\\forbidden/////
CLASS
*
DEFINITION
LOCAL
FRIENDS
3
\\\\\allowed/////
AT
LINE-SELECTION
3
\\\\\allowed/////
AT
USER-COMMAND
4
\\\\\allowed/////
AT
SELECTION-SCREEN
**
3
\\\\\allowed/////
AT
PF*
2
\\\\\allowed/////
INITIALIZATION
2
\\\\\allowed/////
START-OF-SELECTION
2
\\\\\allowed/////
END-OF-SELECTION
3
\\\\\allowed/////
TOP-OF-PAGE
**
2
\\\\\allowed/////
END-OF-PAGE
3
\\\\\allowed/////
GET
**
3
\\\\\forbidden/////
GET

BADI
3
\\\\\forbidden/////
GET
BIT
3
\\\\\forbidden/////
GET
CONNECTION
3
\\\\\forbidden/////
GET
CURSOR
3
\\\\\forbidden/////
GET
DATASET
3
\\\\\forbidden/////
GET
LOCALE
3
\\\\\forbidden/////
GET
PARAMETER
3
\\\\\forbidden/////
GET
PF-STATUS
3
\\\\\forbidden/////
GET
PROPERTY
3
\\\\\forbidden/////
GET
REFERENCE
3
\\\\\forbidden/////
GET
RUN
3
\\\\\forbidden/////
GET
TIME
1
2
FUNCTION
CKMW_REPLACE_AND_POST_POH
1
23
3
INSERT mlbecrh FROM TABLE t_mlbecr.

ELSE.

IF i_ebeln IS INITIAL.

1
MESSAGE e099 WITH 'ckmw_replace_and_
post_poh' '1' space space.

1
MESSAGE e099 WITH 'ckmw_replace_and_
post_poh' '1' space.

LIMU
FUNC
GET_BUKRS_ML_CURRENCY_INFO
99997
LIMU
FUNC
GET_BUKRS_ML_CURRENCY_INFO
00002
37
1
\\\\\no_empty_blocks/////
1
\\\\\comments_not_ignored/////
1
\\\\\delta_normalized/////
1
\\\\\if_comments_ignored/////
3
\\\\\allowed/////
FORM
*
3
\\\\\allowed/////

FUNCTION
*
3
\\\\\allowed/////
MODULE
**
3
\\\\\allowed/////
REPORT
*
3
\\\\\allowed/////
PROGRAM
*
3
\\\\\allowed/////
FUNCTION-POOL
*
4
\\\\\allowed/////
CLASS
*
DEFINITION
4
\\\\\allowed/////
CLASS
*
IMPLEMENTATION
5
\\\\\forbidden/////
CLASS
*
DEFINITION
DEFERRED
5
\\\\\forbidden/////
CLASS
*
DEFINITION
LOAD
6
\\\\\forbidden/////
CLASS
*
DEFINITION
LOCAL
FRIENDS
3
\\\\\allowed/////
AT
LINE-SELECTION
3
\\\\\allowed/////
AT
USER-COMMAND
4
\\\\\allowed/////
AT
SELECTION-SCREEN
**

3
\\\\\allowed/////
AT
PF*
2
\\\\\allowed/////
INITIALIZATION
2
\\\\\allowed/////
START-OF-SELECTION
2
\\\\\allowed/////
END-OF-SELECTION
3
\\\\\allowed/////
TOP-OF-PAGE
**
2
\\\\\allowed/////
END-OF-PAGE
3
\\\\\allowed/////
GET
**
3
\\\\\forbidden/////
GET
BADI
3
\\\\\forbidden/////
GET
BIT
3
\\\\\forbidden/////
GET
CONNECTION
3
\\\\\forbidden/////
GET
CURSOR
3
\\\\\forbidden/////
GET
DATASET
3
\\\\\forbidden/////
GET
LOCALE
3
\\\\\forbidden/////
GET
PARAMETER
3
\\\\\forbidden/////
GET
PF-STATUS
3
\\\\\forbidden/////
GET
PROPERTY

3
\\\\\forbidden/////
GET
REFERENCE
3
\\\\\forbidden/////
GET
RUN
3
\\\\\forbidden/////
GET
TIME
1
2
FUNCTION
GET_BUKRS_ML_CURRENCY_INFO
1
1
0
0
68
FUNCTION get_bukrs_ml_currency_info.

* Disclosure of Exchange Rate Diff.


Package 137003

Work

* N980402

DATA:

lt_t001k LIKE t001k OCCURS 0 WITH HEAD


ER LINE,

lt_curtp TYPE cki_t_ml_cty,

ls_curtp TYPE cki_ml_cty,

ld_tabix LIKE sy-tabix.

IF i_bukrs IS INITIAL.

MESSAGE e301 WITH i_bukrs RAISING wron


g_input.

ENDIF.

SELECT * FROM t001k INTO TABLE lt_t001k

WHERE bukrs = i_bukrs

AND mlbwa = y_x.

IF sy-subrc NE 0.

MESSAGE e044 RAISING ml_inactive.

ENDIF.

LOOP AT lt_t001k.

CALL FUNCTION 'GET_BWKEY_CURRENCY_INFO


'

EXPORTING

bwkey

= lt_t00

1k-bwkey

call_by_init_prog

= 'X'

I_CUSTOMIZING

= 'X'

I_RUN_ID

TABLES

t_curtp_for_va

= lt_cur

tp

EXCEPTIONS

bwkey_not_found

= 1

bwkey_not_active

= 2

matled_not_found

= 3

internal_error

= 4

more_than_3_curtp

= 5

customizing_changed

= 6

OTHERS

= 7.

IF sy-subrc <> 0 AND sy-subrc <> 2.

MESSAGE e099 WITH 'GET_BUKRS_ML_CURR


ENCY_INFO' '1' sy-subrc.

ENDIF.

SORT lt_curtp BY curtp.

IF et_curtp[] IS INITIAL.

et_curtp = lt_curtp.

ELSE.

*
check if all valuation areas have th
e same currency type

(CURTP) and currency (WAERS)

LOOP AT et_curtp INTO ls_curtp.

READ TABLE lt_curtp

WITH KEY curtp = ls_curtp-curtp

waers = ls_curtp-waers

TRANSPORTING NO FIELDS.

ld_tabix = sy-tabix.

IF sy-subrc = 0.

DELETE lt_curtp INDEX ld_tabix.

ELSE.

MESSAGE e332 WITH i_bukrs RAISIN


G currencies_not_unique.

ENDIF.

ENDLOOP.

IF NOT lt_curtp[] IS INITIAL.

*
If an entry finally remains, curre
ncies are also not unique

MESSAGE e332 WITH i_bukrs RAISING


currencies_not_unique.

ENDIF.

ENDIF.

ENDLOOP.

ENDFUNCTION.

LIMU
FUNC
GET_BWKEY_CURRENCY_INFO
00002
LIMU
FUNC
GET_BWKEY_CURRENCY_INFO
00004
37
1
\\\\\no_empty_blocks/////
1
\\\\\comments_ignored/////
1
\\\\\delta_normalized/////
1
\\\\\if_comments_ignored/////
3
\\\\\allowed/////
FORM
*
3
\\\\\allowed/////
FUNCTION
*
3
\\\\\allowed/////
MODULE
**
3
\\\\\allowed/////
REPORT
*
3
\\\\\allowed/////

PROGRAM
*
3
\\\\\allowed/////
FUNCTION-POOL
*
4
\\\\\allowed/////
CLASS
*
DEFINITION
4
\\\\\allowed/////
CLASS
*
IMPLEMENTATION
5
\\\\\forbidden/////
CLASS
*
DEFINITION
DEFERRED
5
\\\\\forbidden/////
CLASS
*
DEFINITION
LOAD
6
\\\\\forbidden/////
CLASS
*
DEFINITION
LOCAL
FRIENDS
3
\\\\\allowed/////
AT
LINE-SELECTION
3
\\\\\allowed/////
AT
USER-COMMAND
4
\\\\\allowed/////
AT
SELECTION-SCREEN
**
3
\\\\\allowed/////
AT
PF*
2
\\\\\allowed/////
INITIALIZATION
2
\\\\\allowed/////
START-OF-SELECTION
2
\\\\\allowed/////

END-OF-SELECTION
3
\\\\\allowed/////
TOP-OF-PAGE
**
2
\\\\\allowed/////
END-OF-PAGE
3
\\\\\allowed/////
GET
**
3
\\\\\forbidden/////
GET
BADI
3
\\\\\forbidden/////
GET
BIT
3
\\\\\forbidden/////
GET
CONNECTION
3
\\\\\forbidden/////
GET
CURSOR
3
\\\\\forbidden/////
GET
DATASET
3
\\\\\forbidden/////
GET
LOCALE
3
\\\\\forbidden/////
GET
PARAMETER
3
\\\\\forbidden/////
GET
PF-STATUS
3
\\\\\forbidden/////
GET
PROPERTY
3
\\\\\forbidden/////
GET
REFERENCE
3
\\\\\forbidden/////
GET
RUN
3
\\\\\forbidden/////
GET
TIME

1
2
FUNCTION
GET_BWKEY_CURRENCY_INFO
2
312
9
ENDLOOP.

ENDIF.

ENDIF.

ENDIF.

* ---------------------------------------------------------------

* Now all currencies are collected, add in


formation and make checks

* ---------------------------------------------------------------

2
* bergabetabelle aufbauen

LOOP AT t_curtp_for_va.

22
* Begin N980402

* Handling of exchange rate differences fr


om customizing in invoice veri

SELECT SINGLE * FROM t169p WHERE bukrs =


t001k-bukrs.

IF sy-subrc <> 0.

CLEAR t169p.

ENDIF.

* check if data is valid

IF NOT t169p-ctml1 IS INITIAL.

READ TABLE t_curtp_for_va WITH KEY t16


9p-ctml1.

IF sy-subrc NE 0.

MESSAGE e025 WITH t001k-bukrs RAISIN


G customizing_changed.

ENDIF.

ENDIF.

IF NOT t169p-ctml2 IS INITIAL.

READ TABLE t_curtp_for_va WITH KEY t16


9p-ctml2.

IF sy-subrc NE 0.

MESSAGE e025 WITH t001k-bukrs RAISIN


G customizing_changed.

ENDIF.

ENDIF.

* End N980402

* bergabetabelle aufbauen

LOOP AT t_curtp_for_va.

t_curtp_for_va-text10

321
3
= t_curtp-te

xt10.

t_curtp_for_va-currtyp = t_curtp-cu
rrtyp.

t_curtp_for_va-valutyp = t_curtp-va
lutyp.

1
MODIFY t_curtp_for_va.

10
* Begin N980402

IF t_curtp_for_va-curtp = y_curtp_lc
.

t_curtp_for_va-xkudif = t169p-kdhw
.

ELSEIF t_curtp_for_va-curtp = t169pctml1.

t_curtp_for_va-xkudif = t169p-kdml
1.

ELSEIF t_curtp_for_va-curtp = t169pctml2.

t_curtp_for_va-xkudif = t169p-kdml
2.

ENDIF.

* End N980402

MODIFY t_curtp_for_va.

LIMU
FUNC
ME_READ_COND_INVOICE
00001
LIMU
FUNC
ME_READ_COND_INVOICE
00003
37
1

\\\\\no_empty_blocks/////
1
\\\\\comments_not_ignored/////
1
\\\\\delta_normalized/////
1
\\\\\if_comments_ignored/////
3
\\\\\allowed/////
FORM
*
3
\\\\\allowed/////
FUNCTION
*
3
\\\\\allowed/////
MODULE
**
3
\\\\\allowed/////
REPORT
*
3
\\\\\allowed/////
PROGRAM
*
3
\\\\\allowed/////
FUNCTION-POOL
*
4
\\\\\allowed/////
CLASS
*
DEFINITION
4
\\\\\allowed/////
CLASS
*
IMPLEMENTATION
5
\\\\\forbidden/////
CLASS
*
DEFINITION
DEFERRED
5
\\\\\forbidden/////
CLASS
*
DEFINITION
LOAD
6
\\\\\forbidden/////
CLASS
*
DEFINITION
LOCAL
FRIENDS

3
\\\\\allowed/////
AT
LINE-SELECTION
3
\\\\\allowed/////
AT
USER-COMMAND
4
\\\\\allowed/////
AT
SELECTION-SCREEN
**
3
\\\\\allowed/////
AT
PF*
2
\\\\\allowed/////
INITIALIZATION
2
\\\\\allowed/////
START-OF-SELECTION
2
\\\\\allowed/////
END-OF-SELECTION
3
\\\\\allowed/////
TOP-OF-PAGE
**
2
\\\\\allowed/////
END-OF-PAGE
3
\\\\\allowed/////
GET
**
3
\\\\\forbidden/////
GET
BADI
3
\\\\\forbidden/////
GET
BIT
3
\\\\\forbidden/////
GET
CONNECTION
3
\\\\\forbidden/////
GET
CURSOR
3
\\\\\forbidden/////
GET
DATASET
3
\\\\\forbidden/////
GET

LOCALE
3
\\\\\forbidden/////
GET
PARAMETER
3
\\\\\forbidden/////
GET
PF-STATUS
3
\\\\\forbidden/////
GET
PROPERTY
3
\\\\\forbidden/////
GET
REFERENCE
3
\\\\\forbidden/////
GET
RUN
3
\\\\\forbidden/////
GET
TIME
1
2
FUNCTION
ME_READ_COND_INVOICE
2
33
3
IF BEWAE_LOGIC_ON NE SPACE.

SU_BEWAE = 'X'.

ENDIF.

1
IF xek08b_flag ne '1'.

2
gs_ekbe_key = i_ekbe_key.
"N980402

IF xek08b_flag ne '1'.

141
4
SORT bzt BY ebeln ebelp stunr zaehk lifn
r bwtar vgabe gjahr belnr.

* docu: fill IV-interface structure xek08b


n

*- Summen bilden -----------------------------------------------------*

1
PERFORM xek08b_fuellen.

1
PERFORM xek08b_fuellen USING i_ekbe_key.
"N980402

LIMU
FUNC
ME_READ_ITEM_GOODS_RECEIPT
00001
LIMU
FUNC
ME_READ_ITEM_GOODS_RECEIPT
00003
37
1
\\\\\no_empty_blocks/////
1
\\\\\comments_not_ignored/////
1
\\\\\delta_normalized/////
1
\\\\\if_comments_ignored/////
3
\\\\\allowed/////
FORM
*
3
\\\\\allowed/////
FUNCTION
*
3
\\\\\allowed/////
MODULE
**
3
\\\\\allowed/////
REPORT
*
3
\\\\\allowed/////
PROGRAM
*
3
\\\\\allowed/////
FUNCTION-POOL
*
4
\\\\\allowed/////
CLASS
*
DEFINITION
4
\\\\\allowed/////
CLASS
*

IMPLEMENTATION
5
\\\\\forbidden/////
CLASS
*
DEFINITION
DEFERRED
5
\\\\\forbidden/////
CLASS
*
DEFINITION
LOAD
6
\\\\\forbidden/////
CLASS
*
DEFINITION
LOCAL
FRIENDS
3
\\\\\allowed/////
AT
LINE-SELECTION
3
\\\\\allowed/////
AT
USER-COMMAND
4
\\\\\allowed/////
AT
SELECTION-SCREEN
**
3
\\\\\allowed/////
AT
PF*
2
\\\\\allowed/////
INITIALIZATION
2
\\\\\allowed/////
START-OF-SELECTION
2
\\\\\allowed/////
END-OF-SELECTION
3
\\\\\allowed/////
TOP-OF-PAGE
**
2
\\\\\allowed/////
END-OF-PAGE
3
\\\\\allowed/////
GET
**
3
\\\\\forbidden/////
GET

BADI
3
\\\\\forbidden/////
GET
BIT
3
\\\\\forbidden/////
GET
CONNECTION
3
\\\\\forbidden/////
GET
CURSOR
3
\\\\\forbidden/////
GET
DATASET
3
\\\\\forbidden/////
GET
LOCALE
3
\\\\\forbidden/////
GET
PARAMETER
3
\\\\\forbidden/////
GET
PF-STATUS
3
\\\\\forbidden/////
GET
PROPERTY
3
\\\\\forbidden/////
GET
REFERENCE
3
\\\\\forbidden/////
GET
RUN
3
\\\\\forbidden/////
GET
TIME
1
2
FUNCTION
ME_READ_ITEM_GOODS_RECEIPT

endif.

4
26
3
"215075

resb_en = 'X'.

"674587

x_ekbeh = 'X'.

"694091

4
gf_xstor = xstor.
"N980402

gf_smbln = i_smbln.
"N980402

gf_sjahr = i_sjahr.
"N980402

70
5
ENDIF.

*KKO-EBELN = EBELN.

ENHANCEMENT-POINT ME_READ_ITEM_GOODS_RECEI
PT_02 SPOTS ES_SAPLEINR.

* docu: get/check relevant data from ekpo


and ekbe

1
PERFORM bestellpos_lesen USING i_werks s
pace.

15

* Begin N980402

* Read customizing of exchange rate differ


ence handling.

* Used at document cancellation and fixed


exchange rate in PO.

IF ekko-bukrs NE t169p-bukrs.

CALL FUNCTION 'MRM_DBTAB_T169P_READ'

EXPORTING

i_bukrs

= ekko-bukrs

i_buffer_on = 'X'

IMPORTING

e_t169p

= t169p.

ENDIF.

* End N980402

PERFORM bestellpos_lesen USING i_werks s


pace.

113
3
xekbnk_wa-frawe = betb_wa-frawe.

xekbnk_wa-nawwr = betb_wa-nawwr.

xekbnk_wa-fnwwr = betb_wa-fnwwr.

1
*--------------------------------------------------------------"K003063

xekbnk_wa-kudif = betb_wa-kudif.
"N980402

r.

xekbnk_wa-kudif_gr = betb_wa-kudif_g
"N980402

r.

xekbnk_wa-kudif_ir = betb_wa-kudif_i
"N980402

*--------------------------------------------------------------"K003063

164
3
PERFORM ebefu_sort.

* docu: processing for return items with s


hipping processing

PERFORM returns_via_sd.

* docu: check, if valid data were found

15

* Begin N980402

* Document cancellation with exchange rate


difference handling needs

* the exchange rate difference amount of t


he original document.

IF ( gf_xstor = '2' OR gf_xstor = 'X' )


AND

not gf_smbln IS INITIAL


AND

zaehlsto = 0
AND

( not t169p-kdhw IS INITIAL OR

not t169p-kdml1 IS INITIAL OR

not t169p-kdml2 IS INITIAL ).

zaehlsel = 0.

ENDIF.

* End N980402

* docu: check, if valid data were found

LIMU
FUNC
ME_READ_ITEM_INVOICE
00001

LIMU
FUNC
ME_READ_ITEM_INVOICE
00003
37
1
\\\\\no_empty_blocks/////
1
\\\\\comments_not_ignored/////
1
\\\\\delta_normalized/////
1
\\\\\if_comments_ignored/////
3
\\\\\allowed/////
FORM
*
3
\\\\\allowed/////
FUNCTION
*
3
\\\\\allowed/////
MODULE
**
3
\\\\\allowed/////
REPORT
*
3
\\\\\allowed/////
PROGRAM
*
3
\\\\\allowed/////
FUNCTION-POOL
*
4
\\\\\allowed/////
CLASS
*
DEFINITION
4
\\\\\allowed/////
CLASS
*
IMPLEMENTATION
5
\\\\\forbidden/////
CLASS
*
DEFINITION
DEFERRED
5
\\\\\forbidden/////
CLASS

*
DEFINITION
LOAD
6
\\\\\forbidden/////
CLASS
*
DEFINITION
LOCAL
FRIENDS
3
\\\\\allowed/////
AT
LINE-SELECTION
3
\\\\\allowed/////
AT
USER-COMMAND
4
\\\\\allowed/////
AT
SELECTION-SCREEN
**
3
\\\\\allowed/////
AT
PF*
2
\\\\\allowed/////
INITIALIZATION
2
\\\\\allowed/////
START-OF-SELECTION
2
\\\\\allowed/////
END-OF-SELECTION
3
\\\\\allowed/////
TOP-OF-PAGE
**
2
\\\\\allowed/////
END-OF-PAGE
3
\\\\\allowed/////
GET
**
3
\\\\\forbidden/////
GET
BADI
3
\\\\\forbidden/////
GET
BIT
3
\\\\\forbidden/////
GET
CONNECTION
3

\\\\\forbidden/////
GET
CURSOR
3
\\\\\forbidden/////
GET
DATASET
3
\\\\\forbidden/////
GET
LOCALE
3
\\\\\forbidden/////
GET
PARAMETER
3
\\\\\forbidden/////
GET
PF-STATUS
3
\\\\\forbidden/////
GET
PROPERTY
3
\\\\\forbidden/////
GET
REFERENCE
3
\\\\\forbidden/////
GET
RUN
3
\\\\\forbidden/////
GET
TIME
1
2
FUNCTION
ME_READ_ITEM_INVOICE
2
31
3
SU_KONT_WAERS = RE_WAERS.

x_ekbeh = 'X'.

3
IF NOT EBELP IS INITIAL.

EINGABE_EBELP = 'X'.

ENDIF.

18
gs_ekbe_key = i_ekbe_key.
"N980402

IF NOT EBELP IS INITIAL.

EINGABE_EBELP = 'X'.

ENDIF.

* Begin N980402

* Read customizing of exchange rate differ


ence handling.

* Used at document cancellation and fixed


exchange rate in PO.

IF iekko-bukrs NE t169p-bukrs.

CALL FUNCTION 'MRM_DBTAB_T169P_READ'

EXPORTING

i_bukrs

= iekko-bukrs

i_buffer_on = 'X'

IMPORTING

e_t169p

= t169p.

ENDIF.

* End N980402

94
3
PERFORM ML_KONTEN_PFLEGE_CURR_BUFFERN
USING
"K003063

XEK08RN_CURR[].
"K003063

ENDIF.
"K003063

* docu: check, if valid data were found

14

* Begin N980402

* Document cancellation with exchange rate


difference handling needs

* the exchange rate difference amount of t


he original document.

IF not i_ekbe_key IS INITIAL

zaehlsto = 0

AND

AND

( not t169p-kdhw IS INITIAL OR

not t169p-kdml1 IS INITIAL OR

not t169p-kdml2 IS INITIAL ).

zaehlsel = 0.

ENDIF.

* End N980402

* docu: check, if valid data were found

LIMU
FUNC
ME_READ_ITEM_TRANSFER
00001
LIMU
FUNC
ME_READ_ITEM_TRANSFER

00003
37
1
\\\\\no_empty_blocks/////
1
\\\\\comments_not_ignored/////
1
\\\\\delta_normalized/////
1
\\\\\if_comments_ignored/////
3
\\\\\allowed/////
FORM
*
3
\\\\\allowed/////
FUNCTION
*
3
\\\\\allowed/////
MODULE
**
3
\\\\\allowed/////
REPORT
*
3
\\\\\allowed/////
PROGRAM
*
3
\\\\\allowed/////
FUNCTION-POOL
*
4
\\\\\allowed/////
CLASS
*
DEFINITION
4
\\\\\allowed/////
CLASS
*
IMPLEMENTATION
5
\\\\\forbidden/////
CLASS
*
DEFINITION
DEFERRED
5
\\\\\forbidden/////
CLASS
*
DEFINITION
LOAD

6
\\\\\forbidden/////
CLASS
*
DEFINITION
LOCAL
FRIENDS
3
\\\\\allowed/////
AT
LINE-SELECTION
3
\\\\\allowed/////
AT
USER-COMMAND
4
\\\\\allowed/////
AT
SELECTION-SCREEN
**
3
\\\\\allowed/////
AT
PF*
2
\\\\\allowed/////
INITIALIZATION
2
\\\\\allowed/////
START-OF-SELECTION
2
\\\\\allowed/////
END-OF-SELECTION
3
\\\\\allowed/////
TOP-OF-PAGE
**
2
\\\\\allowed/////
END-OF-PAGE
3
\\\\\allowed/////
GET
**
3
\\\\\forbidden/////
GET
BADI
3
\\\\\forbidden/////
GET
BIT
3
\\\\\forbidden/////
GET
CONNECTION
3
\\\\\forbidden/////
GET
CURSOR

3
\\\\\forbidden/////
GET
DATASET
3
\\\\\forbidden/////
GET
LOCALE
3
\\\\\forbidden/////
GET
PARAMETER
3
\\\\\forbidden/////
GET
PF-STATUS
3
\\\\\forbidden/////
GET
PROPERTY
3
\\\\\forbidden/////
GET
REFERENCE
3
\\\\\forbidden/////
GET
RUN
3
\\\\\forbidden/////
GET
TIME
1
2
FUNCTION
ME_READ_ITEM_TRANSFER
4
17
3
ENDIF.
"215075

CLEAR vorgang.

resb_en = 'X'.
"674587

4
gf_xstor = xstor.
"N980402

gf_smbln = i_smbln.
"N980402

gf_sjahr = i_sjahr.
"N980402

41
4
MESSAGE e723 WITH ekko-ebeln ekko-resw
k

RAISING wrong_delivery_plant.

ENDIF.

1
*- Lesen Bestellposition ----------------------------------------------

14
* Begin N980402

* Read customizing of exchange rate differ


ence handling.

* Used at document cancellation and fixed


exchange rate in PO.

IF ekko-bukrs NE t169p-bukrs.

CALL FUNCTION 'MRM_DBTAB_T169P_READ'

EXPORTING

i_bukrs

= ekko-bukrs

i_buffer_on = 'X'

IMPORTING

e_t169p

= t169p.

ENDIF.

* End N980402

*- Lesen Bestellposition ----------------------------------------------

79
3
xekbnk_wa-frawe = betb_wa-frawe.

xekbnk_wa-nawwr = betb_wa-nawwr.

xekbnk_wa-fnwwr = betb_wa-fnwwr.

1
*--------------------------------------------------------------"K003063

4
xekbnk_wa-kudif = betb_wa-kudif.
"N980402

xekbnk_wa-kudif_gr = betb_wa-kudif_gr.
"N980402

xekbnk_wa-kudif_ir = betb_wa-kudif_ir.
"N980402

*--------------------------------------------------------------"K003063

120
3
t_ekpo = pot

t_komv = tkomv.

ENDIF.
"AL0K063092

CHECK zaehlsel EQ 0.

15

* Begin N980402

* Document cancellation with exchange rate


difference handling needs

* the exchange rate difference amount of t


he original document.

IF ( gf_xstor = '2' OR gf_xstor = 'X' )


AND

not gf_smbln IS INITIAL


AND

zaehlsto = 0
AND

( not t169p-kdhw IS INITIAL OR

not t169p-kdml1 IS INITIAL OR

not t169p-kdml2 IS INITIAL ).

zaehlsel = 0.

ENDIF.

* End N980402

CHECK zaehlsel EQ 0.

LIMU
FUNC
MRM_ASSIGNMENT
00001
LIMU
FUNC
MRM_ASSIGNMENT
00003
37
1
\\\\\no_empty_blocks/////
1
\\\\\comments_not_ignored/////
1
\\\\\delta_normalized/////
1
\\\\\if_comments_ignored/////
3
\\\\\allowed/////
FORM
*
3
\\\\\allowed/////
FUNCTION
*
3
\\\\\allowed/////
MODULE
**
3
\\\\\allowed/////
REPORT
*
3

\\\\\allowed/////
PROGRAM
*
3
\\\\\allowed/////
FUNCTION-POOL
*
4
\\\\\allowed/////
CLASS
*
DEFINITION
4
\\\\\allowed/////
CLASS
*
IMPLEMENTATION
5
\\\\\forbidden/////
CLASS
*
DEFINITION
DEFERRED
5
\\\\\forbidden/////
CLASS
*
DEFINITION
LOAD
6
\\\\\forbidden/////
CLASS
*
DEFINITION
LOCAL
FRIENDS
3
\\\\\allowed/////
AT
LINE-SELECTION
3
\\\\\allowed/////
AT
USER-COMMAND
4
\\\\\allowed/////
AT
SELECTION-SCREEN
**
3
\\\\\allowed/////
AT
PF*
2
\\\\\allowed/////
INITIALIZATION
2
\\\\\allowed/////
START-OF-SELECTION
2

\\\\\allowed/////
END-OF-SELECTION
3
\\\\\allowed/////
TOP-OF-PAGE
**
2
\\\\\allowed/////
END-OF-PAGE
3
\\\\\allowed/////
GET
**
3
\\\\\forbidden/////
GET
BADI
3
\\\\\forbidden/////
GET
BIT
3
\\\\\forbidden/////
GET
CONNECTION
3
\\\\\forbidden/////
GET
CURSOR
3
\\\\\forbidden/////
GET
DATASET
3
\\\\\forbidden/////
GET
LOCALE
3
\\\\\forbidden/////
GET
PARAMETER
3
\\\\\forbidden/////
GET
PF-STATUS
3
\\\\\forbidden/////
GET
PROPERTY
3
\\\\\forbidden/////
GET
REFERENCE
3
\\\\\forbidden/////
GET
RUN
3
\\\\\forbidden/////
GET

TIME
1
2
FUNCTION
MRM_ASSIGNMENT
1
734
4
ENDIF.

CLEAR t_drseg-cr.
ch move-corresponding verhunzt

" dur

1
MOVE: xek08bnc-waers TO t_drseg-bw
aer,

2
* the field bewae has the currency of the
PO

MOVE: xek08bnc-bewae TO t_drseg-bw


aer, "N980402

LIMU

FUNC
MRM_DRSEG_CR_CREATE
00001
LIMU
FUNC
MRM_DRSEG_CR_CREATE
00003
37
1
\\\\\no_empty_blocks/////
1
\\\\\comments_not_ignored/////
1
\\\\\delta_normalized/////
1
\\\\\if_comments_ignored/////
3
\\\\\allowed/////
FORM
*
3
\\\\\allowed/////
FUNCTION
*
3
\\\\\allowed/////
MODULE
**
3
\\\\\allowed/////
REPORT
*
3
\\\\\allowed/////
PROGRAM
*
3
\\\\\allowed/////
FUNCTION-POOL
*
4
\\\\\allowed/////
CLASS
*
DEFINITION
4
\\\\\allowed/////
CLASS
*
IMPLEMENTATION
5
\\\\\forbidden/////

CLASS
*
DEFINITION
DEFERRED
5
\\\\\forbidden/////
CLASS
*
DEFINITION
LOAD
6
\\\\\forbidden/////
CLASS
*
DEFINITION
LOCAL
FRIENDS
3
\\\\\allowed/////
AT
LINE-SELECTION
3
\\\\\allowed/////
AT
USER-COMMAND
4
\\\\\allowed/////
AT
SELECTION-SCREEN
**
3
\\\\\allowed/////
AT
PF*
2
\\\\\allowed/////
INITIALIZATION
2
\\\\\allowed/////
START-OF-SELECTION
2
\\\\\allowed/////
END-OF-SELECTION
3
\\\\\allowed/////
TOP-OF-PAGE
**
2
\\\\\allowed/////
END-OF-PAGE
3
\\\\\allowed/////
GET
**
3
\\\\\forbidden/////
GET
BADI
3
\\\\\forbidden/////

GET
BIT
3
\\\\\forbidden/////
GET
CONNECTION
3
\\\\\forbidden/////
GET
CURSOR
3
\\\\\forbidden/////
GET
DATASET
3
\\\\\forbidden/////
GET
LOCALE
3
\\\\\forbidden/////
GET
PARAMETER
3
\\\\\forbidden/////
GET
PF-STATUS
3
\\\\\forbidden/////
GET
PROPERTY
3
\\\\\forbidden/////
GET
REFERENCE
3
\\\\\forbidden/////
GET
RUN
3
\\\\\forbidden/////
GET
TIME
1
2
FORM
DRSEG_CR_CREATE
2
64
3
drseg_cr_wa-rewrt = ek08rn_cr_wa-r
ewrt.

drseg_cr_wa-wewrt = ek08rn_cr_wa-w
ewrt.

drseg_cr_wa-arewr = ek08rn_cr_wa-a
rewr.

1
ELSE.

udif.

2
drseg_cr_wa-kudif = ek08rn_cr_wa-k
"N980402

ELSE.

88
3
drseg_cr_wa-rewrt = ek08bn_cr_wa-r
ewrt.

drseg_cr_wa-wewrt = ek08bn_cr_wa-w
ewrt.

drseg_cr_wa-arewr = ek08bn_cr_wa-a
rewr.

1
ELSE.

udif.

2
drseg_cr_wa-kudif = ek08bn_cr_wa-k
"N980402

ELSE.

LIMU
FUNC
MR_POSTING_GENERATE
00001
LIMU
FUNC
MR_POSTING_GENERATE
00003
37
1
\\\\\no_empty_blocks/////
1
\\\\\comments_not_ignored/////
1
\\\\\delta_normalized/////
1
\\\\\if_comments_ignored/////
3
\\\\\allowed/////
FORM
*
3
\\\\\allowed/////
FUNCTION
*
3
\\\\\allowed/////
MODULE
**
3
\\\\\allowed/////
REPORT
*

3
\\\\\allowed/////
PROGRAM
*
3
\\\\\allowed/////
FUNCTION-POOL
*
4
\\\\\allowed/////
CLASS
*
DEFINITION
4
\\\\\allowed/////
CLASS
*
IMPLEMENTATION
5
\\\\\forbidden/////
CLASS
*
DEFINITION
DEFERRED
5
\\\\\forbidden/////
CLASS
*
DEFINITION
LOAD
6
\\\\\forbidden/////
CLASS
*
DEFINITION
LOCAL
FRIENDS
3
\\\\\allowed/////
AT
LINE-SELECTION
3
\\\\\allowed/////
AT
USER-COMMAND
4
\\\\\allowed/////
AT
SELECTION-SCREEN
**
3
\\\\\allowed/////
AT
PF*
2
\\\\\allowed/////
INITIALIZATION
2
\\\\\allowed/////
START-OF-SELECTION

2
\\\\\allowed/////
END-OF-SELECTION
3
\\\\\allowed/////
TOP-OF-PAGE
**
2
\\\\\allowed/////
END-OF-PAGE
3
\\\\\allowed/////
GET
**
3
\\\\\forbidden/////
GET
BADI
3
\\\\\forbidden/////
GET
BIT
3
\\\\\forbidden/////
GET
CONNECTION
3
\\\\\forbidden/////
GET
CURSOR
3
\\\\\forbidden/////
GET
DATASET
3
\\\\\forbidden/////
GET
LOCALE
3
\\\\\forbidden/////
GET
PARAMETER
3
\\\\\forbidden/////
GET
PF-STATUS
3
\\\\\forbidden/////
GET
PROPERTY
3
\\\\\forbidden/////
GET
REFERENCE
3
\\\\\forbidden/////
GET
RUN
3
\\\\\forbidden/////

GET
TIME
0
LIMU
REPS
L0MB4F10
00001
LIMU
REPS
L0MB4F10
00003
36
1
\\\\\no_empty_blocks/////
1
\\\\\comments_not_ignored/////
1
\\\\\delta_normalized/////
3
\\\\\allowed/////
FORM
*
3
\\\\\allowed/////
FUNCTION
*
3
\\\\\allowed/////
MODULE
**
3
\\\\\allowed/////
REPORT
*
3
\\\\\allowed/////
PROGRAM
*
3
\\\\\allowed/////
FUNCTION-POOL
*
4
\\\\\allowed/////
CLASS
*
DEFINITION
4
\\\\\allowed/////
CLASS
*
IMPLEMENTATION

5
\\\\\forbidden/////
CLASS
*
DEFINITION
DEFERRED
5
\\\\\forbidden/////
CLASS
*
DEFINITION
LOAD
6
\\\\\forbidden/////
CLASS
*
DEFINITION
LOCAL
FRIENDS
3
\\\\\allowed/////
AT
LINE-SELECTION
3
\\\\\allowed/////
AT
USER-COMMAND
4
\\\\\allowed/////
AT
SELECTION-SCREEN
**
3
\\\\\allowed/////
AT
PF*
2
\\\\\allowed/////
INITIALIZATION
2
\\\\\allowed/////
START-OF-SELECTION
2
\\\\\allowed/////
END-OF-SELECTION
3
\\\\\allowed/////
TOP-OF-PAGE
**
2
\\\\\allowed/////
END-OF-PAGE
3
\\\\\allowed/////
GET
**
3
\\\\\forbidden/////
GET
BADI

3
\\\\\forbidden/////
GET
BIT
3
\\\\\forbidden/////
GET
CONNECTION
3
\\\\\forbidden/////
GET
CURSOR
3
\\\\\forbidden/////
GET
DATASET
3
\\\\\forbidden/////
GET
LOCALE
3
\\\\\forbidden/////
GET
PARAMETER
3
\\\\\forbidden/////
GET
PF-STATUS
3
\\\\\forbidden/////
GET
PROPERTY
3
\\\\\forbidden/////
GET
REFERENCE
3
\\\\\forbidden/////
GET
RUN
3
\\\\\forbidden/////
GET
TIME
5
2
FORM
DOMVAL
1
17
3

IF sy-subrc EQ 1.

ENDIF.

1
ENDFORM.

1
ENDFORM.

"domval

2
FORM
DYNPRO_MODIF_KOMOK
2
16
3
LOOP AT SCREEN.

IF screen-group1 = '003'.

IF t156w-vorsl NE 'GBB' AND t156w-vo


rsl NE 'PRD' AND

1
t156w-vorsl NE 'KON' AND t156w-vo
rsl NE 'AUM'.

2
t156w-vorsl NE 'KON' AND t156w-vo
rsl NE 'AUM'

AND t156w-vorsl NE 'KDM'.


"N980402

46
3
ENDIF.
"sdp462

ENDIF.
"sdp462

ENDLOOP.

1
ENDFORM.

ENDFORM.
komok

1
"dynpro_modif_

2
FORM
T030W_LESEN

1
27
3
IF sy-subrc IS INITIAL.

MOVE-CORRESPONDING b030w TO t030w.

ENDIF.

1
ENDFORM.

1
ENDFORM.

"t030w_lesen

2
FORM
SHOW_STRING
1
60
3
MODIFY SCREEN.

ENDLOOP.

ENDIF.

1
ENDFORM.

1
ENDFORM.

"show_string

3
MODULE
CHECK_CHSMM
INPUT
1
10
3
CLEAR v_156b_ss-kzchp.

ENDIF.

1
ENDMODULE.

ENDMODULE.
INPUT

"check_chsmm

LIMU
REPS
LCKM1F0D
00003
LIMU
REPS
LCKM1F0D
00005
36
1
\\\\\no_empty_blocks/////
1
\\\\\comments_not_ignored/////
1
\\\\\delta_normalized/////
3
\\\\\allowed/////
FORM
*
3
\\\\\allowed/////
FUNCTION
*
3
\\\\\allowed/////
MODULE
**
3
\\\\\allowed/////
REPORT
*
3
\\\\\allowed/////
PROGRAM
*
3
\\\\\allowed/////
FUNCTION-POOL
*
4
\\\\\allowed/////
CLASS
*
DEFINITION
4

\\\\\allowed/////
CLASS
*
IMPLEMENTATION
5
\\\\\forbidden/////
CLASS
*
DEFINITION
DEFERRED
5
\\\\\forbidden/////
CLASS
*
DEFINITION
LOAD
6
\\\\\forbidden/////
CLASS
*
DEFINITION
LOCAL
FRIENDS
3
\\\\\allowed/////
AT
LINE-SELECTION
3
\\\\\allowed/////
AT
USER-COMMAND
4
\\\\\allowed/////
AT
SELECTION-SCREEN
**
3
\\\\\allowed/////
AT
PF*
2
\\\\\allowed/////
INITIALIZATION
2
\\\\\allowed/////
START-OF-SELECTION
2
\\\\\allowed/////
END-OF-SELECTION
3
\\\\\allowed/////
TOP-OF-PAGE
**
2
\\\\\allowed/////
END-OF-PAGE
3
\\\\\allowed/////
GET
**

3
\\\\\forbidden/////
GET
BADI
3
\\\\\forbidden/////
GET
BIT
3
\\\\\forbidden/////
GET
CONNECTION
3
\\\\\forbidden/////
GET
CURSOR
3
\\\\\forbidden/////
GET
DATASET
3
\\\\\forbidden/////
GET
LOCALE
3
\\\\\forbidden/////
GET
PARAMETER
3
\\\\\forbidden/////
GET
PF-STATUS
3
\\\\\forbidden/////
GET
PROPERTY
3
\\\\\forbidden/////
GET
REFERENCE
3
\\\\\forbidden/////
GET
RUN
3
\\\\\forbidden/////
GET
TIME
1
2
FORM
CLOSE_AND_POST_DIFFERENCES
1
379
5
CALL FUNCTION 'CKML_F_SET_FIELD_DATA'

EXPORTING

curtp = t_curtp-curtp

wrbtr = krdif

feldn = y_feldn_krdif

1
waers = t_curtp-waers

2
komok = y_komok_kdmmat
"N980402

waers = t_curtp-waers

LIMU
REPS
LCKM1TOP
00003

LIMU
REPS
LCKM1TOP
00005
36
1
\\\\\no_empty_blocks/////
1
\\\\\comments_ignored/////
1
\\\\\delta_normalized/////
3
\\\\\allowed/////
FORM
*
3
\\\\\allowed/////
FUNCTION
*
3
\\\\\allowed/////
MODULE
**
3
\\\\\allowed/////
REPORT
*
3
\\\\\allowed/////
PROGRAM
*
3
\\\\\allowed/////
FUNCTION-POOL
*
4
\\\\\allowed/////
CLASS
*
DEFINITION
4
\\\\\allowed/////
CLASS
*
IMPLEMENTATION
5
\\\\\forbidden/////
CLASS
*
DEFINITION
DEFERRED
5
\\\\\forbidden/////
CLASS
*

DEFINITION
LOAD
6
\\\\\forbidden/////
CLASS
*
DEFINITION
LOCAL
FRIENDS
3
\\\\\allowed/////
AT
LINE-SELECTION
3
\\\\\allowed/////
AT
USER-COMMAND
4
\\\\\allowed/////
AT
SELECTION-SCREEN
**
3
\\\\\allowed/////
AT
PF*
2
\\\\\allowed/////
INITIALIZATION
2
\\\\\allowed/////
START-OF-SELECTION
2
\\\\\allowed/////
END-OF-SELECTION
3
\\\\\allowed/////
TOP-OF-PAGE
**
2
\\\\\allowed/////
END-OF-PAGE
3
\\\\\allowed/////
GET
**
3
\\\\\forbidden/////
GET
BADI
3
\\\\\forbidden/////
GET
BIT
3
\\\\\forbidden/////
GET
CONNECTION
3
\\\\\forbidden/////

GET
CURSOR
3
\\\\\forbidden/////
GET
DATASET
3
\\\\\forbidden/////
GET
LOCALE
3
\\\\\forbidden/////
GET
PARAMETER
3
\\\\\forbidden/////
GET
PF-STATUS
3
\\\\\forbidden/////
GET
PROPERTY
3
\\\\\forbidden/////
GET
REFERENCE
3
\\\\\forbidden/////
GET
RUN
3
\\\\\forbidden/////
GET
TIME
1
2
FUNCTION-POOL
CKM1

Y_OBJECT_ID
"Objekt-Id fr

1
198
3
LIKE TCMF5-OBJECT_I

VALUE 'CKML',
"Fehlersteuerung

Y_CURTP_10(2) VALUE '10'.


aehrungstyp
"S11K156502

',

1
"Hausw

3
Y_KOMOK_KDMMAT TYPE komok VALUE 'ERN
"N980402

Y_CURTP_10(2) VALUE '10'.


aehrungstyp
"S11K156502

"Hausw

LIMU
REPS
LCKM2TOP
00001
LIMU
REPS
LCKM2TOP
00003
36
1
\\\\\no_empty_blocks/////
1
\\\\\comments_not_ignored/////
1
\\\\\delta_normalized/////
3
\\\\\allowed/////
FORM
*
3

\\\\\allowed/////
FUNCTION
*
3
\\\\\allowed/////
MODULE
**
3
\\\\\allowed/////
REPORT
*
3
\\\\\allowed/////
PROGRAM
*
3
\\\\\allowed/////
FUNCTION-POOL
*
4
\\\\\allowed/////
CLASS
*
DEFINITION
4
\\\\\allowed/////
CLASS
*
IMPLEMENTATION
5
\\\\\forbidden/////
CLASS
*
DEFINITION
DEFERRED
5
\\\\\forbidden/////
CLASS
*
DEFINITION
LOAD
6
\\\\\forbidden/////
CLASS
*
DEFINITION
LOCAL
FRIENDS
3
\\\\\allowed/////
AT
LINE-SELECTION
3
\\\\\allowed/////
AT
USER-COMMAND
4
\\\\\allowed/////
AT
SELECTION-SCREEN

**
3
\\\\\allowed/////
AT
PF*
2
\\\\\allowed/////
INITIALIZATION
2
\\\\\allowed/////
START-OF-SELECTION
2
\\\\\allowed/////
END-OF-SELECTION
3
\\\\\allowed/////
TOP-OF-PAGE
**
2
\\\\\allowed/////
END-OF-PAGE
3
\\\\\allowed/////
GET
**
3
\\\\\forbidden/////
GET
BADI
3
\\\\\forbidden/////
GET
BIT
3
\\\\\forbidden/////
GET
CONNECTION
3
\\\\\forbidden/////
GET
CURSOR
3
\\\\\forbidden/////
GET
DATASET
3
\\\\\forbidden/////
GET
LOCALE
3
\\\\\forbidden/////
GET
PARAMETER
3
\\\\\forbidden/////
GET
PF-STATUS
3
\\\\\forbidden/////
GET

PROPERTY
3
\\\\\forbidden/////
GET
REFERENCE
3
\\\\\forbidden/////
GET
RUN
3
\\\\\forbidden/////
GET
TIME
1
2
FUNCTION-POOL
CKM2
1
22
3
TCKMHD,

T001,

T001A,

1
T001K.

2
T169P,
"N980402

T001K.

LIMU
REPS
LCKM3F0D
00007
LIMU
REPS
LCKM3F0D
00009
36
1
\\\\\no_empty_blocks/////
1
\\\\\comments_not_ignored/////
1
\\\\\delta_normalized/////
3
\\\\\allowed/////
FORM
*
3
\\\\\allowed/////
FUNCTION
*
3
\\\\\allowed/////
MODULE
**
3
\\\\\allowed/////
REPORT
*
3
\\\\\allowed/////
PROGRAM
*
3
\\\\\allowed/////
FUNCTION-POOL
*
4
\\\\\allowed/////
CLASS
*
DEFINITION
4
\\\\\allowed/////
CLASS
*

IMPLEMENTATION
5
\\\\\forbidden/////
CLASS
*
DEFINITION
DEFERRED
5
\\\\\forbidden/////
CLASS
*
DEFINITION
LOAD
6
\\\\\forbidden/////
CLASS
*
DEFINITION
LOCAL
FRIENDS
3
\\\\\allowed/////
AT
LINE-SELECTION
3
\\\\\allowed/////
AT
USER-COMMAND
4
\\\\\allowed/////
AT
SELECTION-SCREEN
**
3
\\\\\allowed/////
AT
PF*
2
\\\\\allowed/////
INITIALIZATION
2
\\\\\allowed/////
START-OF-SELECTION
2
\\\\\allowed/////
END-OF-SELECTION
3
\\\\\allowed/////
TOP-OF-PAGE
**
2
\\\\\allowed/////
END-OF-PAGE
3
\\\\\allowed/////
GET
**
3
\\\\\forbidden/////
GET

BADI
3
\\\\\forbidden/////
GET
BIT
3
\\\\\forbidden/////
GET
CONNECTION
3
\\\\\forbidden/////
GET
CURSOR
3
\\\\\forbidden/////
GET
DATASET
3
\\\\\forbidden/////
GET
LOCALE
3
\\\\\forbidden/////
GET
PARAMETER
3
\\\\\forbidden/////
GET
PF-STATUS
3
\\\\\forbidden/////
GET
PROPERTY
3
\\\\\forbidden/////
GET
REFERENCE
3
\\\\\forbidden/////
GET
RUN
3
\\\\\forbidden/////
GET
TIME
3
2
FORM
CKM3_UPDATE
2
899
5
LOOP AT t_acccr WHERE awtyp = t_ac
cit-awtyp AND

awref = t_ac

cit-awref AND

aworg = t_ac
cit-aworg AND

posnr = t_ac
cit-posnr AND

curtp NE y_c
urtp_tc.

1
k_poper = t_accit-monat.

6
READ TABLE t_curtp WITH KEY curt
p = t_acccr-curtp."N980402

IF sy-subrc NE 0.
"N980402

CLEAR t_curtp.
"N980402

ENDIF.
"N980402

k_poper = t_accit-monat.

954
5
PERFORM werte_setzen

TABLES

t_accit

USING

s_urz

s_pos

k_kategorie

1
CHANGING t_acccr

2
t_curtp-xkudif
"N980402

CHANGING t_acccr

2
FORM
WERTE_SETZEN
3
17
5
FORM werte_setzen

TABLES

USING
s_urz

t_accit

STRUCTURE accit

i_urz

TYPE

ckm3_

i_pos

TYPE

ckm3_

LIKE

ckmla

s_pos

i_kategorie
b01z-kategorie

CHANGING io_acccr

STRUCTURE acccr

2
i_xkudif
TYPE
"N980402

CHANGING io_acccr

STRUCTURE acccr

160
5
IF i_pos-we = y_x AND

i_urz-lv IS INITIAL.

ADD io_acccr-wrbtr TO io_delta_ckm


lcr-ekkdm_o.

ENDIF.

ENDIF.

20
* Begin N980402

* If XKUDIF is set, exchange rate differ


ences are updated as

'statistical' values

IF NOT i_xkudif IS INITIAL.

ADD io_delta_ckmlcr-zukdm_o
delta_ckmlcr-zukdm_ost.

TO io_

ADD io_delta_ckmlcr-ekkdm_o
delta_ckmlcr-ekkdm_ost.

TO io_

ADD io_delta_ckmlcr-pbkdm_o
delta_ckmlcr-pbkdm_ost.

TO io_

ADD io_delta_ckmlcr-vpkdm_o
delta_ckmlcr-vpkdm_ost.

TO io_

ADD io_delta_ckmlcr-vppbkdm_o TO io_


delta_ckmlcr-vppbkdm_ost.

ADD io_delta_ckmlcr-vnkdm_o
delta_ckmlcr-vnkdm_ost.

CLEAR:

io_delta_ckmlcr-zukdm_o,

io_delta_ckmlcr-ekkdm_o,

io_delta_ckmlcr-pbkdm_o,

io_delta_ckmlcr-vpkdm_o,

io_delta_ckmlcr-vppbkdm_o,

TO io_

io_delta_ckmlcr-vnkdm_o.

ENDIF.

* End N980402

172
3
IF i_kategorie = ckmv3_co_kat-vp.
"Note 301325

io_delta_ckmlcr-vppbprd_o = io_delta_c
kmlcr-pbprd_o. "Note 301325

io_delta_ckmlcr-vppbkdm_o = io_delta_c
kmlcr-pbkdm_o. "Note 301325

1
ENDIF.
"Note 301325

io_delta_ckmlcr-vppbkdm_ost = io_delta
_ckmlcr-pbkdm_ost."N980402

ENDIF.
"Note 301325

2
FORM
BESTANDSZEILENSCHALTER_SETZEN
1
21
3

DATA: ld_is_return TYPE char1,

ld_ret TYPE char1.

1
*

LIMU
REPS
LCKM8F0B

00001
LIMU
REPS
LCKM8F0B
00003
36
1
\\\\\no_empty_blocks/////
1
\\\\\comments_not_ignored/////
1
\\\\\delta_normalized/////
3
\\\\\allowed/////
FORM
*
3
\\\\\allowed/////
FUNCTION
*
3
\\\\\allowed/////
MODULE
**
3
\\\\\allowed/////
REPORT
*
3
\\\\\allowed/////
PROGRAM
*
3
\\\\\allowed/////
FUNCTION-POOL
*
4
\\\\\allowed/////
CLASS
*
DEFINITION
4
\\\\\allowed/////
CLASS
*
IMPLEMENTATION
5
\\\\\forbidden/////
CLASS
*
DEFINITION
DEFERRED

5
\\\\\forbidden/////
CLASS
*
DEFINITION
LOAD
6
\\\\\forbidden/////
CLASS
*
DEFINITION
LOCAL
FRIENDS
3
\\\\\allowed/////
AT
LINE-SELECTION
3
\\\\\allowed/////
AT
USER-COMMAND
4
\\\\\allowed/////
AT
SELECTION-SCREEN
**
3
\\\\\allowed/////
AT
PF*
2
\\\\\allowed/////
INITIALIZATION
2
\\\\\allowed/////
START-OF-SELECTION
2
\\\\\allowed/////
END-OF-SELECTION
3
\\\\\allowed/////
TOP-OF-PAGE
**
2
\\\\\allowed/////
END-OF-PAGE
3
\\\\\allowed/////
GET
**
3
\\\\\forbidden/////
GET
BADI
3
\\\\\forbidden/////
GET
BIT
3
\\\\\forbidden/////

GET
CONNECTION
3
\\\\\forbidden/////
GET
CURSOR
3
\\\\\forbidden/////
GET
DATASET
3
\\\\\forbidden/////
GET
LOCALE
3
\\\\\forbidden/////
GET
PARAMETER
3
\\\\\forbidden/////
GET
PF-STATUS
3
\\\\\forbidden/////
GET
PROPERTY
3
\\\\\forbidden/////
GET
REFERENCE
3
\\\\\forbidden/////
GET
RUN
3
\\\\\forbidden/////
GET
TIME
4
2
FORM
MLS_TREE_BUILD_FIELDCAT
1
121
5
ls_fcat-fieldname = 'KABWE_M'.

ls_fcat-ref_table = 'KKB_ML_POS'.

ls_fcat-cfieldname = 'WAERS'.

ls_fcat-no_out = 'X'.

APPEND ls_fcat TO et_fieldcat.

9
* Begin N980402

* Einstufige Statistische Kursdifferenzen

CLEAR ls_fcat.

ls_fcat-fieldname = 'KABWE_EST'.

ls_fcat-ref_table = 'KKB_ML_POS'.

ls_fcat-cfieldname = 'WAERS'.

ls_fcat-no_out

APPEND ls_fcat

= y_x.

TO et_fieldcat.

* End N980402

2
FORM
MLS_CONVERT_TOTALS
2
104
3
lf_mls-pabwe_e = lf_ckmlcr-zuprd_o.

lf_mls-pabwe_m = lf_ckmlcr-zuprd_mo.

lf_mls-kabwe_e = lf_ckmlcr-zukdm_o.

lf_mls-kabwe_m = lf_ckmlcr-zukdm_mo.

2
lf_mls-kabwe_est = lf_ckmlcr-zukdm_ost
"N980402

lf_mls-kabwe_m = lf_ckmlcr-zukdm_mo.

116
3
lf_mls-menge = lf_ckmlpp-vpkumo.

lf_mls-pabwe_e = lf_ckmlcr-vpprd_o.

lf_mls-kabwe_e = lf_ckmlcr-vpkdm_o.

1
PERFORM mls_line_complete USING gf_ckm
lhd lf_ckmlpp lf_ckmlcr

2
lf_mls-kabwe_est = lf_ckmlcr-vpkdm_ost
"N980402

perform mls_line_complete using gf_ckm


lhd lf_ckmlpp lf_ckmlcr

2
FORM
MLS_CONVERT_MLCD
2
61
3
lf_mls-pabwe_e = lf_mlcd-estprd.

lf_mls-pabwe_m = lf_mlcd-mstprd.

lf_mls-kabwe_e = lf_mlcd-estkdm.

1
lf_mls-kabwe_m = lf_mlcd-mstkdm.

2
lf_mls-kabwe_est = lf_mlcd-estkdm_st
"N980402

lf_mls-kabwe_m = lf_mlcd-mstkdm.

87
3

lf_mls-pabwe_e = lf_mlcd-estprd.

lf_mls-pabwe_m = lf_mlcd-mstprd.

lf_mls-kabwe_e = lf_mlcd-estkdm.

1
lf_mls-kabwe_m = lf_mlcd-mstkdm.

2
lf_mls-kabwe_est = lf_mlcd-estkdm_st
"N980402

lf_mls-kabwe_m = lf_mlcd-mstkdm.

2
FORM
MLS_READ_DOCS
1
80
3
lf_mls-pabwe_e = <docs>-estprd.

lf_mls-pabwe_m = <docs>-mstprd.

lf_mls-kabwe_e = <docs>-estkdm.

1
lf_mls-kabwe_m = <docs>-mstkdm.

2
lf_mls-kabwe_est = <docs>-estkdm_st.
"N980402

lf_mls-kabwe_m = <docs>-mstkdm.

LIMU
REPS
LCKM8F0C
00001
LIMU
REPS
LCKM8F0C
00003
36
1
\\\\\no_empty_blocks/////
1
\\\\\comments_not_ignored/////
1
\\\\\delta_normalized/////
3
\\\\\allowed/////
FORM

*
3
\\\\\allowed/////
FUNCTION
*
3
\\\\\allowed/////
MODULE
**
3
\\\\\allowed/////
REPORT
*
3
\\\\\allowed/////
PROGRAM
*
3
\\\\\allowed/////
FUNCTION-POOL
*
4
\\\\\allowed/////
CLASS
*
DEFINITION
4
\\\\\allowed/////
CLASS
*
IMPLEMENTATION
5
\\\\\forbidden/////
CLASS
*
DEFINITION
DEFERRED
5
\\\\\forbidden/////
CLASS
*
DEFINITION
LOAD
6
\\\\\forbidden/////
CLASS
*
DEFINITION
LOCAL
FRIENDS
3
\\\\\allowed/////
AT
LINE-SELECTION
3
\\\\\allowed/////
AT
USER-COMMAND
4
\\\\\allowed/////

AT
SELECTION-SCREEN
**
3
\\\\\allowed/////
AT
PF*
2
\\\\\allowed/////
INITIALIZATION
2
\\\\\allowed/////
START-OF-SELECTION
2
\\\\\allowed/////
END-OF-SELECTION
3
\\\\\allowed/////
TOP-OF-PAGE
**
2
\\\\\allowed/////
END-OF-PAGE
3
\\\\\allowed/////
GET
**
3
\\\\\forbidden/////
GET
BADI
3
\\\\\forbidden/////
GET
BIT
3
\\\\\forbidden/////
GET
CONNECTION
3
\\\\\forbidden/////
GET
CURSOR
3
\\\\\forbidden/////
GET
DATASET
3
\\\\\forbidden/////
GET
LOCALE
3
\\\\\forbidden/////
GET
PARAMETER
3
\\\\\forbidden/////
GET
PF-STATUS
3

\\\\\forbidden/////
GET
PROPERTY
3
\\\\\forbidden/////
GET
REFERENCE
3
\\\\\forbidden/////
GET
RUN
3
\\\\\forbidden/////
GET
TIME
1
2
FORM
FELDKATALOG_AUFBAUEN
1
217
7
afield-fieldname = 'ESTKDM'.

afield-ref_table = 'MLCD'.

afield-datatype

= 'CURR'.

afield-cfieldname = 'WAERS'.

afield-no_out

APPEND afield

= y_x.

TO xfield.

1
* Mehrstufige Preisdifferenzen

11
* Begin N980402

* Einstufige Statistische Kursdifferenzen

CLEAR afield.

afield-fieldname = 'ESTKDM_ST'.

afield-ref_table = 'MLCD'.

afield-datatype

= 'CURR'.

afield-cfieldname = 'WAERS'.

afield-no_out

APPEND afield

= y_x.

TO xfield.

* End N980402

* Mehrstufige Preisdifferenzen

LIMU
REPS
LCKM8TOB
00001
LIMU
REPS
LCKM8TOB
00003
36
1
\\\\\no_empty_blocks/////
1
\\\\\comments_not_ignored/////
1
\\\\\delta_normalized/////

3
\\\\\allowed/////
FORM
*
3
\\\\\allowed/////
FUNCTION
*
3
\\\\\allowed/////
MODULE
**
3
\\\\\allowed/////
REPORT
*
3
\\\\\allowed/////
PROGRAM
*
3
\\\\\allowed/////
FUNCTION-POOL
*
4
\\\\\allowed/////
CLASS
*
DEFINITION
4
\\\\\allowed/////
CLASS
*
IMPLEMENTATION
5
\\\\\forbidden/////
CLASS
*
DEFINITION
DEFERRED
5
\\\\\forbidden/////
CLASS
*
DEFINITION
LOAD
6
\\\\\forbidden/////
CLASS
*
DEFINITION
LOCAL
FRIENDS
3
\\\\\allowed/////
AT
LINE-SELECTION
3
\\\\\allowed/////
AT

USER-COMMAND
4
\\\\\allowed/////
AT
SELECTION-SCREEN
**
3
\\\\\allowed/////
AT
PF*
2
\\\\\allowed/////
INITIALIZATION
2
\\\\\allowed/////
START-OF-SELECTION
2
\\\\\allowed/////
END-OF-SELECTION
3
\\\\\allowed/////
TOP-OF-PAGE
**
2
\\\\\allowed/////
END-OF-PAGE
3
\\\\\allowed/////
GET
**
3
\\\\\forbidden/////
GET
BADI
3
\\\\\forbidden/////
GET
BIT
3
\\\\\forbidden/////
GET
CONNECTION
3
\\\\\forbidden/////
GET
CURSOR
3
\\\\\forbidden/////
GET
DATASET
3
\\\\\forbidden/////
GET
LOCALE
3
\\\\\forbidden/////
GET
PARAMETER
3
\\\\\forbidden/////

GET
PF-STATUS
3
\\\\\forbidden/////
GET
PROPERTY
3
\\\\\forbidden/////
GET
REFERENCE
3
\\\\\forbidden/////
GET
RUN
3
\\\\\forbidden/////
GET
TIME
1
0
1
60
3
pabwe_e TYPE kkb_ml_pabwe_e,

pabwe_m TYPE kkb_ml_pabwe_m,

kabwe_e TYPE kkb_ml_kabwe_e,

1
kabwe_m TYPE kkb_ml_kabwe_m,

2
kabwe_est TYPE kkb_ml_kabwe_est,
"N980402

kabwe_m TYPE kkb_ml_kabwe_m,

LIMU
REPS
LCKM8TOC
00001
LIMU
REPS
LCKM8TOC
00003
36
1
\\\\\no_empty_blocks/////
1
\\\\\comments_not_ignored/////
1
\\\\\delta_normalized/////
3
\\\\\allowed/////
FORM
*
3
\\\\\allowed/////
FUNCTION
*
3
\\\\\allowed/////
MODULE
**
3
\\\\\allowed/////
REPORT
*
3
\\\\\allowed/////
PROGRAM
*
3
\\\\\allowed/////
FUNCTION-POOL
*
4
\\\\\allowed/////
CLASS
*
DEFINITION
4

\\\\\allowed/////
CLASS
*
IMPLEMENTATION
5
\\\\\forbidden/////
CLASS
*
DEFINITION
DEFERRED
5
\\\\\forbidden/////
CLASS
*
DEFINITION
LOAD
6
\\\\\forbidden/////
CLASS
*
DEFINITION
LOCAL
FRIENDS
3
\\\\\allowed/////
AT
LINE-SELECTION
3
\\\\\allowed/////
AT
USER-COMMAND
4
\\\\\allowed/////
AT
SELECTION-SCREEN
**
3
\\\\\allowed/////
AT
PF*
2
\\\\\allowed/////
INITIALIZATION
2
\\\\\allowed/////
START-OF-SELECTION
2
\\\\\allowed/////
END-OF-SELECTION
3
\\\\\allowed/////
TOP-OF-PAGE
**
2
\\\\\allowed/////
END-OF-PAGE
3
\\\\\allowed/////
GET
**

3
\\\\\forbidden/////
GET
BADI
3
\\\\\forbidden/////
GET
BIT
3
\\\\\forbidden/////
GET
CONNECTION
3
\\\\\forbidden/////
GET
CURSOR
3
\\\\\forbidden/////
GET
DATASET
3
\\\\\forbidden/////
GET
LOCALE
3
\\\\\forbidden/////
GET
PARAMETER
3
\\\\\forbidden/////
GET
PF-STATUS
3
\\\\\forbidden/////
GET
PROPERTY
3
\\\\\forbidden/////
GET
REFERENCE
3
\\\\\forbidden/////
GET
RUN
3
\\\\\forbidden/////
GET
TIME
1
3
CLASS
LCL_EVENT_RECEIVER
DEFINITION
1
61
3
salk3_old TYPE ckml_salk3_vor,
"Wert vor der Bew.

estprd

LIKE mlcd-estprd,

estkdm

LIKE mlcd-estkdm,

mstprd

LIKE mlcd-mstprd,

2
LIKE mlcd-estkdm_st,
"N980402

estkdm_st

mstprd

like mlcd-mstprd,

LIMU
REPS
LCKMBF0A
00002
LIMU
REPS
LCKMBF0A
00004
36
1
\\\\\no_empty_blocks/////
1

\\\\\comments_not_ignored/////
1
\\\\\delta_normalized/////
3
\\\\\allowed/////
FORM
*
3
\\\\\allowed/////
FUNCTION
*
3
\\\\\allowed/////
MODULE
**
3
\\\\\allowed/////
REPORT
*
3
\\\\\allowed/////
PROGRAM
*
3
\\\\\allowed/////
FUNCTION-POOL
*
4
\\\\\allowed/////
CLASS
*
DEFINITION
4
\\\\\allowed/////
CLASS
*
IMPLEMENTATION
5
\\\\\forbidden/////
CLASS
*
DEFINITION
DEFERRED
5
\\\\\forbidden/////
CLASS
*
DEFINITION
LOAD
6
\\\\\forbidden/////
CLASS
*
DEFINITION
LOCAL
FRIENDS
3
\\\\\allowed/////
AT
LINE-SELECTION

3
\\\\\allowed/////
AT
USER-COMMAND
4
\\\\\allowed/////
AT
SELECTION-SCREEN
**
3
\\\\\allowed/////
AT
PF*
2
\\\\\allowed/////
INITIALIZATION
2
\\\\\allowed/////
START-OF-SELECTION
2
\\\\\allowed/////
END-OF-SELECTION
3
\\\\\allowed/////
TOP-OF-PAGE
**
2
\\\\\allowed/////
END-OF-PAGE
3
\\\\\allowed/////
GET
**
3
\\\\\forbidden/////
GET
BADI
3
\\\\\forbidden/////
GET
BIT
3
\\\\\forbidden/////
GET
CONNECTION
3
\\\\\forbidden/////
GET
CURSOR
3
\\\\\forbidden/////
GET
DATASET
3
\\\\\forbidden/////
GET
LOCALE
3
\\\\\forbidden/////
GET

PARAMETER
3
\\\\\forbidden/////
GET
PF-STATUS
3
\\\\\forbidden/////
GET
PROPERTY
3
\\\\\forbidden/////
GET
REFERENCE
3
\\\\\forbidden/////
GET
RUN
3
\\\\\forbidden/////
GET
TIME
1
2
FORM
ACCIT_FILL
1
121
3
not_found_t030r

= 3

not_found_t030s

= 4.

IF sy-subrc <> 0.

1
CALL FUNCTION 'CM_F_COLLECT_MESSAGE'
.

27
*

Begin N980402

*
If for exchange rate posting KOMOK i
s set, and no account is

found, try again without KOMOK.

IF f_gnbu_it-vorsl = y_kdm AND f_gnb


u_it-komok = y_komok_kdmmat.

CALL FUNCTION 'MR_ACCOUNT_ASSIGNME


NT'

EXPORTING

ert_klasse

bewertungsklasse
"P30K077560

= l_bew

bewertung_modif

= f_gnb

kontenplan

= f_gnb

u_it-bwmod

u_it-ktopl

soll_haben_kennzeichen = shkzg

vorgangsschluessel

= f_gnb

i_wrxmod

= f_wrx

u_it-vorsl

mod

IMPORTING

buchungsschluessel

= t_acc

konto

= t_acc

it-bschl

it-hkont

EXCEPTIONS

not_found_t030

= 1

not_found_t030b

= 2

not_found_t030r

= 3

not_found_t030s

= 4.

IF sy-subrc <> 0.

CALL FUNCTION 'CM_F_COLLECT_MESS


AGE'.

ENDIF.

ELSE.

End N980402

CALL FUNCTION 'CM_F_COLLECT_MESSAG


E'.

ENDIF.
"N980402

LIMU
REPS
LCKMBTOP
00002
LIMU
REPS
LCKMBTOP
00004
36
1
\\\\\no_empty_blocks/////
1
\\\\\comments_not_ignored/////
1
\\\\\delta_normalized/////
3
\\\\\allowed/////
FORM
*
3
\\\\\allowed/////
FUNCTION
*
3
\\\\\allowed/////
MODULE
**
3
\\\\\allowed/////
REPORT
*
3
\\\\\allowed/////
PROGRAM
*
3
\\\\\allowed/////
FUNCTION-POOL
*
4
\\\\\allowed/////
CLASS
*
DEFINITION
4

\\\\\allowed/////
CLASS
*
IMPLEMENTATION
5
\\\\\forbidden/////
CLASS
*
DEFINITION
DEFERRED
5
\\\\\forbidden/////
CLASS
*
DEFINITION
LOAD
6
\\\\\forbidden/////
CLASS
*
DEFINITION
LOCAL
FRIENDS
3
\\\\\allowed/////
AT
LINE-SELECTION
3
\\\\\allowed/////
AT
USER-COMMAND
4
\\\\\allowed/////
AT
SELECTION-SCREEN
**
3
\\\\\allowed/////
AT
PF*
2
\\\\\allowed/////
INITIALIZATION
2
\\\\\allowed/////
START-OF-SELECTION
2
\\\\\allowed/////
END-OF-SELECTION
3
\\\\\allowed/////
TOP-OF-PAGE
**
2
\\\\\allowed/////
END-OF-PAGE
3
\\\\\allowed/////
GET
**

3
\\\\\forbidden/////
GET
BADI
3
\\\\\forbidden/////
GET
BIT
3
\\\\\forbidden/////
GET
CONNECTION
3
\\\\\forbidden/////
GET
CURSOR
3
\\\\\forbidden/////
GET
DATASET
3
\\\\\forbidden/////
GET
LOCALE
3
\\\\\forbidden/////
GET
PARAMETER
3
\\\\\forbidden/////
GET
PF-STATUS
3
\\\\\forbidden/////
GET
PROPERTY
3
\\\\\forbidden/////
GET
REFERENCE
3
\\\\\forbidden/////
GET
RUN
3
\\\\\forbidden/////
GET
TIME
1
2
FUNCTION-POOL
CKMB
1
394
3
y_frx like t169a-vorsl value 'FRX',

y_fre like t169a-vorsl value 'FRE',

y_bsx like t169a-vorsl value 'BSX',

4
y_kdm like t169a-vorsl value 'KDM',
"N908402

',

y_komok_kdmmat type komok value 'ERN


"N980402

LIMU
REPS
LCKMDO0M
00001

LIMU
REPS
LCKMDO0M
00003
36
1
\\\\\no_empty_blocks/////
1
\\\\\comments_not_ignored/////
1
\\\\\delta_normalized/////
3
\\\\\allowed/////
FORM
*
3
\\\\\allowed/////
FUNCTION
*
3
\\\\\allowed/////
MODULE
**
3
\\\\\allowed/////
REPORT
*
3
\\\\\allowed/////
PROGRAM
*
3
\\\\\allowed/////
FUNCTION-POOL
*
4
\\\\\allowed/////
CLASS
*
DEFINITION
4
\\\\\allowed/////
CLASS
*
IMPLEMENTATION
5
\\\\\forbidden/////
CLASS
*
DEFINITION
DEFERRED
5
\\\\\forbidden/////
CLASS
*

DEFINITION
LOAD
6
\\\\\forbidden/////
CLASS
*
DEFINITION
LOCAL
FRIENDS
3
\\\\\allowed/////
AT
LINE-SELECTION
3
\\\\\allowed/////
AT
USER-COMMAND
4
\\\\\allowed/////
AT
SELECTION-SCREEN
**
3
\\\\\allowed/////
AT
PF*
2
\\\\\allowed/////
INITIALIZATION
2
\\\\\allowed/////
START-OF-SELECTION
2
\\\\\allowed/////
END-OF-SELECTION
3
\\\\\allowed/////
TOP-OF-PAGE
**
2
\\\\\allowed/////
END-OF-PAGE
3
\\\\\allowed/////
GET
**
3
\\\\\forbidden/////
GET
BADI
3
\\\\\forbidden/////
GET
BIT
3
\\\\\forbidden/////
GET
CONNECTION
3
\\\\\forbidden/////

GET
CURSOR
3
\\\\\forbidden/////
GET
DATASET
3
\\\\\forbidden/////
GET
LOCALE
3
\\\\\forbidden/////
GET
PARAMETER
3
\\\\\forbidden/////
GET
PF-STATUS
3
\\\\\forbidden/////
GET
PROPERTY
3
\\\\\forbidden/////
GET
REFERENCE
3
\\\\\forbidden/////
GET
RUN
3
\\\\\forbidden/////
GET
TIME
1
3
MODULE
MOVE_TABLES_TO_02_3_400
OUTPUT
1
111
3
WHEN y_verbr_nichtprsb_einst_aufgel.

ckmd_mlcr-vnprd_o = t_mlcrf-prdif.

ckmd_mlcr-vnkdm_o = t_mlcrf-krdif.

1
WHEN y_umbew_einst_aufgel.

9
* Begin N980402

WHEN y_zugang_einst_auf_st.

ckmd_mlcr-zukdm_ost = t_mlcrf-krdi
f.

WHEN y_verbr_preisb_einst_auf_st.

ckmd_mlcr-vpkdm_ost = t_mlcrf-krdi
f.

WHEN y_verbr_nichtprsb_einst_auf_st.

ckmd_mlcr-vnkdm_ost = t_mlcrf-krdi
f.

* End N980402

WHEN y_umbew_einst_aufgel.

LIMU
REPS
LCKMDO0T
00001
LIMU
REPS
LCKMDO0T
00003
36
1
\\\\\no_empty_blocks/////
1
\\\\\comments_not_ignored/////
1
\\\\\delta_normalized/////
3
\\\\\allowed/////
FORM
*
3
\\\\\allowed/////
FUNCTION
*
3
\\\\\allowed/////
MODULE
**
3
\\\\\allowed/////
REPORT
*
3
\\\\\allowed/////
PROGRAM
*
3
\\\\\allowed/////

FUNCTION-POOL
*
4
\\\\\allowed/////
CLASS
*
DEFINITION
4
\\\\\allowed/////
CLASS
*
IMPLEMENTATION
5
\\\\\forbidden/////
CLASS
*
DEFINITION
DEFERRED
5
\\\\\forbidden/////
CLASS
*
DEFINITION
LOAD
6
\\\\\forbidden/////
CLASS
*
DEFINITION
LOCAL
FRIENDS
3
\\\\\allowed/////
AT
LINE-SELECTION
3
\\\\\allowed/////
AT
USER-COMMAND
4
\\\\\allowed/////
AT
SELECTION-SCREEN
**
3
\\\\\allowed/////
AT
PF*
2
\\\\\allowed/////
INITIALIZATION
2
\\\\\allowed/////
START-OF-SELECTION
2
\\\\\allowed/////
END-OF-SELECTION
3
\\\\\allowed/////
TOP-OF-PAGE

**
2
\\\\\allowed/////
END-OF-PAGE
3
\\\\\allowed/////
GET
**
3
\\\\\forbidden/////
GET
BADI
3
\\\\\forbidden/////
GET
BIT
3
\\\\\forbidden/////
GET
CONNECTION
3
\\\\\forbidden/////
GET
CURSOR
3
\\\\\forbidden/////
GET
DATASET
3
\\\\\forbidden/////
GET
LOCALE
3
\\\\\forbidden/////
GET
PARAMETER
3
\\\\\forbidden/////
GET
PF-STATUS
3
\\\\\forbidden/////
GET
PROPERTY
3
\\\\\forbidden/////
GET
REFERENCE
3
\\\\\forbidden/////
GET
RUN
3
\\\\\forbidden/////
GET
TIME
1
3
MODULE
TABSTRIP_ACTIVATE_FORT

OUTPUT
5
38
4
CKMD_MLCR-ZUPRD_O = CKMD_MLCR-ZUPRD_O
+ CKMD_MLCR-VPPRD_O +

CKMD_MLCR-VNPRD_O.

CKMD_MLCR-ZUKDM_O = CKMD_MLCR-ZUKDM_O
+ CKMD_MLCR-VPKDM_O +

CKMD_MLCR-VNKDM_O.

1
LOOP AT SCREEN.

4
CKMD_MLCR-ZUKDM_OST = CKMD_MLCR-ZUKDM_
OST +
"N980402

CKMD_MLCR-VPKDM_
OST +

"N980402

OST.

"N980402

CKMD_MLCR-VNKDM_

LOOP AT SCREEN.

61
3
WHEN 'ZUOA'.

IF CKMD_MLPP-ZUKUMO IS INITIAL A
ND

CKMD_MLCR-ZUPRD_O IS INITIAL
AND

1
CKMD_MLCR-ZUKDM_O IS INITIAL.

3
CKMD_MLCR-ZUKDM_O IS INITIAL.
"N980402

AND

CKMD_MLCR-ZUKDM_O IS INITIAL
"N980402

L.

CKMD_MLCR-ZUKDM_OST IS INITIA
"N980402

89
3
WHEN Y_ZUGANG_EINST_AUFGEL.

IF CKMD_MLPP-ZUKUMO IS INITIAL A
ND

CKMD_MLCR-ZUPRD_O IS INITIAL
AND

1
CKMD_MLCR-ZUKDM_O IS INITIAL.

3
CKMD_MLCR-ZUKDM_O IS INITIAL.
"N980402

AND

CKMD_MLCR-ZUKDM_O IS INITIAL
"N980402

L.

CKMD_MLCR-ZUKDM_OST IS INITIA
"N980402

96
3
WHEN Y_VERBR_PREISB_EINST_AUFGEL.

IF CKMD_MLPP-VPKUMO IS INITIAL A
ND

CKMD_MLCR-VPPRD_O IS INITIAL
AND

1
CKMD_MLCR-VPKDM_O IS INITIAL.

3
CKMD_MLCR-VPKDM_O IS INITIAL.
"N980402

AND

CKMD_MLCR-VPKDM_O IS INITIAL
"N980402

L.

CKMD_MLCR-VPKDM_OST IS INITIA
"N980402

103
3
WHEN Y_VERBR_NICHTPRSB_EINST_AUFGE
L.

IF CKMD_MLPP-VNKUMO IS INITIAL A
ND

CKMD_MLCR-VNPRD_O IS INITIAL
AND

1
CKMD_MLCR-VNKDM_O IS INITIAL.

3
CKMD_MLCR-VNKDM_O IS INITIAL.
"N980402

AND

CKMD_MLCR-VNKDM_O IS INITIAL
"N980402

L.

CKMD_MLCR-VNKDM_OST IS INITIA
"N980402

LIMU
REPS
LCKMDTOP_FELDGRUPPEN
00001
LIMU
REPS
LCKMDTOP_FELDGRUPPEN
00003
36
1
\\\\\no_empty_blocks/////

1
\\\\\comments_not_ignored/////
1
\\\\\delta_normalized/////
3
\\\\\allowed/////
FORM
*
3
\\\\\allowed/////
FUNCTION
*
3
\\\\\allowed/////
MODULE
**
3
\\\\\allowed/////
REPORT
*
3
\\\\\allowed/////
PROGRAM
*
3
\\\\\allowed/////
FUNCTION-POOL
*
4
\\\\\allowed/////
CLASS
*
DEFINITION
4
\\\\\allowed/////
CLASS
*
IMPLEMENTATION
5
\\\\\forbidden/////
CLASS
*
DEFINITION
DEFERRED
5
\\\\\forbidden/////
CLASS
*
DEFINITION
LOAD
6
\\\\\forbidden/////
CLASS
*
DEFINITION
LOCAL
FRIENDS
3
\\\\\allowed/////
AT

LINE-SELECTION
3
\\\\\allowed/////
AT
USER-COMMAND
4
\\\\\allowed/////
AT
SELECTION-SCREEN
**
3
\\\\\allowed/////
AT
PF*
2
\\\\\allowed/////
INITIALIZATION
2
\\\\\allowed/////
START-OF-SELECTION
2
\\\\\allowed/////
END-OF-SELECTION
3
\\\\\allowed/////
TOP-OF-PAGE
**
2
\\\\\allowed/////
END-OF-PAGE
3
\\\\\allowed/////
GET
**
3
\\\\\forbidden/////
GET
BADI
3
\\\\\forbidden/////
GET
BIT
3
\\\\\forbidden/////
GET
CONNECTION
3
\\\\\forbidden/////
GET
CURSOR
3
\\\\\forbidden/////
GET
DATASET
3
\\\\\forbidden/////
GET
LOCALE
3
\\\\\forbidden/////

GET
PARAMETER
3
\\\\\forbidden/////
GET
PF-STATUS
3
\\\\\forbidden/////
GET
PROPERTY
3
\\\\\forbidden/////
GET
REFERENCE
3
\\\\\forbidden/////
GET
RUN
3
\\\\\forbidden/////
GET
TIME
1
0
1
46
3
y_verbr_nachbel_einst LIKE mlppf-feldg V
ALUE 'VNBE',

y_verbr_nachbel_mehrst LIKE mlppf-feldg


VALUE 'VNBM',

* ACHTUNG: Nur statistisch!

1
y_verbr_nichtprsb_stat LIKE mlppf-feldg
VALUE 'VNOS'.

8
y_verbr_nichtprsb_stat LIKE mlppf-feldg
VALUE 'VNOS',

* For statistical exchange rate difference


s

y_zugang_einst_auf_st LIKE mlppf-feldg V


ALUE 'ZUOS',
"N980402

y_verbr_preisb_einst_auf_st LIKE mlppf-f


eldg VALUE 'VPOS', "N980402

y_verbr_nichtprsb_einst_auf_st LIKE mlpp


f-feldg VALUE 'VNOS',"N980402

y_einkauf_einst_auf_st LIKE mlppf-feldg


VALUE 'EKOS',
"N980402

y_preisbegr_einst_auf_st LIKE mlppf-feld


g VALUE 'PBOS',
"N980402

y_preisbegr_verbr_prsb_auf_st LIKE mlppf


-feldg VALUE 'VPPS'. "N980402

LIMU
REPS
LEINRD01
00001

LIMU
REPS
LEINRD01
00003
36
1
\\\\\no_empty_blocks/////
1
\\\\\comments_ignored/////
1
\\\\\delta_normalized/////
3
\\\\\allowed/////
FORM
*
3
\\\\\allowed/////
FUNCTION
*
3
\\\\\allowed/////
MODULE
**
3
\\\\\allowed/////
REPORT
*
3
\\\\\allowed/////
PROGRAM
*
3
\\\\\allowed/////
FUNCTION-POOL
*
4
\\\\\allowed/////
CLASS
*
DEFINITION
4
\\\\\allowed/////
CLASS
*
IMPLEMENTATION
5
\\\\\forbidden/////
CLASS
*
DEFINITION
DEFERRED
5
\\\\\forbidden/////
CLASS
*

DEFINITION
LOAD
6
\\\\\forbidden/////
CLASS
*
DEFINITION
LOCAL
FRIENDS
3
\\\\\allowed/////
AT
LINE-SELECTION
3
\\\\\allowed/////
AT
USER-COMMAND
4
\\\\\allowed/////
AT
SELECTION-SCREEN
**
3
\\\\\allowed/////
AT
PF*
2
\\\\\allowed/////
INITIALIZATION
2
\\\\\allowed/////
START-OF-SELECTION
2
\\\\\allowed/////
END-OF-SELECTION
3
\\\\\allowed/////
TOP-OF-PAGE
**
2
\\\\\allowed/////
END-OF-PAGE
3
\\\\\allowed/////
GET
**
3
\\\\\forbidden/////
GET
BADI
3
\\\\\forbidden/////
GET
BIT
3
\\\\\forbidden/////
GET
CONNECTION
3
\\\\\forbidden/////

GET
CURSOR
3
\\\\\forbidden/////
GET
DATASET
3
\\\\\forbidden/////
GET
LOCALE
3
\\\\\forbidden/////
GET
PARAMETER
3
\\\\\forbidden/////
GET
PF-STATUS
3
\\\\\forbidden/////
GET
PROPERTY
3
\\\\\forbidden/////
GET
REFERENCE
3
\\\\\forbidden/////
GET
RUN
3
\\\\\forbidden/////
GET
TIME
1
0
9
71
3
wewrt type mlcr_curr_tbl,

rewrt type mlcr_curr_tbl,

arewr type mlcr_curr_tbl,

1
end of mlcr_ebefu_cr,

4
kudif TYPE mlcr_curr_tbl,
"N980402

kudif_gr TYPE mlcr_curr_tbl,


"N980402

kudif_ir TYPE mlcr_curr_tbl,


"N980402

end of mlcr_ebefu_cr,

81
3
frawe type mlcr_curr_tbl,

nawwr type mlcr_curr_tbl,

fnwwr type mlcr_curr_tbl,

1
end of mlcr_ekbnk_cr,

4
kudif TYPE mlcr_curr_tbl,
"N980402

kudif_gr TYPE mlcr_curr_tbl,


"N980402

kudif_ir TYPE mlcr_curr_tbl,


"N980402

end of mlcr_ekbnk_cr,

90
8

* EK08RN_CR ( parallele EK08RN-Tabelle )

begin of mlcr_ek08rn_cr,

key

type mlcr_ek08rn_key,

reewr type mlcr_curr_tbl,

rewrt type mlcr_curr_tbl,

wewrt type mlcr_curr_tbl,

arewr type mlcr_curr_tbl,

1
*

ANZAL TYPE MLCR_CURR_TBL,

2
kudif TYPE mlcr_curr_tbl,
"N980402

ANZAL TYPE MLCR_CURR_TBL,

100
3

reewr type mlcr_curr_tbl,

rewrt type mlcr_curr_tbl,

wewrt type mlcr_curr_tbl,

1
end of mlcr_ek08bn_cr,

2
kudif TYPE mlcr_curr_tbl,
"N980402

end of mlcr_ek08bn_cr,

153
3
dmbtr type mlcr_curr_tbl,

reewr type mlcr_curr_tbl,

arewr type mlcr_curr_tbl,

1
end of ty_bet_wa,

4
kudif TYPE mlcr_curr_tbl,
"N980402

kudif_gr TYPE mlcr_curr_tbl,


"N980402

kudif_ir TYPE mlcr_curr_tbl,


"N980402

end of ty_bet_wa,

163
3
rewrt type mlcr_curr_tbl,

wewrt type mlcr_curr_tbl,

anzal type mlcr_curr_tbl,

1
end of ty_bets_wa,

4
kudif TYPE mlcr_curr_tbl,
"N980402

kudif_gr TYPE mlcr_curr_tbl,


"N980402

kudif_ir TYPE mlcr_curr_tbl,


"N980402

end of ty_bets_wa,

172
8

* Interne whrungsgerechte Summentabellen


(BETZ-Erweiterung)

begin of ty_betz_wa,

key

like betzkey,

arewr type mlcr_curr_tbl,

reewr type mlcr_curr_tbl,

rewrt type mlcr_curr_tbl,

wewrt type mlcr_curr_tbl,

1
end of ty_betz_wa,

4
kudif TYPE mlcr_curr_tbl,
"N980402

kudif_gr TYPE mlcr_curr_tbl,


"N980402

kudif_ir TYPE mlcr_curr_tbl,


"N980402

end of ty_betz_wa,

180
7

* Interne whrungsgerechte Summentabellen


(BZT-Erweiterung)

begin of ty_bzt_wa,

key

like bzti_key,

dmbtr type mlcr_curr_tbl,

reewr type mlcr_curr_tbl,

arewr type mlcr_curr_tbl,

1
end of ty_bzt_wa,

4
kudif TYPE mlcr_curr_tbl,
"N980402

kudif_gr TYPE mlcr_curr_tbl,


"N980402

kudif_ir TYPE mlcr_curr_tbl,


"N980402

end of ty_bzt_wa,

190
3
frawe type mlcr_curr_tbl,

nawwr type mlcr_curr_tbl,

fnwwr type mlcr_curr_tbl,

1
end of ty_betb_wa,

4
kudif TYPE mlcr_curr_tbl,
"N980402

kudif_gr TYPE mlcr_curr_tbl,


"N980402

kudif_ir TYPE mlcr_curr_tbl,


"N980402

end of ty_betb_wa,

LIMU
REPS
LEINRF0D
00003
LIMU
REPS
LEINRF0D

00005
36
1
\\\\\no_empty_blocks/////
1
\\\\\comments_ignored/////
1
\\\\\delta_normalized/////
3
\\\\\allowed/////
FORM
*
3
\\\\\allowed/////
FUNCTION
*
3
\\\\\allowed/////
MODULE
**
3
\\\\\allowed/////
REPORT
*
3
\\\\\allowed/////
PROGRAM
*
3
\\\\\allowed/////
FUNCTION-POOL
*
4
\\\\\allowed/////
CLASS
*
DEFINITION
4
\\\\\allowed/////
CLASS
*
IMPLEMENTATION
5
\\\\\forbidden/////
CLASS
*
DEFINITION
DEFERRED
5
\\\\\forbidden/////
CLASS
*
DEFINITION
LOAD
6
\\\\\forbidden/////
CLASS
*

DEFINITION
LOCAL
FRIENDS
3
\\\\\allowed/////
AT
LINE-SELECTION
3
\\\\\allowed/////
AT
USER-COMMAND
4
\\\\\allowed/////
AT
SELECTION-SCREEN
**
3
\\\\\allowed/////
AT
PF*
2
\\\\\allowed/////
INITIALIZATION
2
\\\\\allowed/////
START-OF-SELECTION
2
\\\\\allowed/////
END-OF-SELECTION
3
\\\\\allowed/////
TOP-OF-PAGE
**
2
\\\\\allowed/////
END-OF-PAGE
3
\\\\\allowed/////
GET
**
3
\\\\\forbidden/////
GET
BADI
3
\\\\\forbidden/////
GET
BIT
3
\\\\\forbidden/////
GET
CONNECTION
3
\\\\\forbidden/////
GET
CURSOR
3
\\\\\forbidden/////
GET
DATASET

3
\\\\\forbidden/////
GET
LOCALE
3
\\\\\forbidden/////
GET
PARAMETER
3
\\\\\forbidden/////
GET
PF-STATUS
3
\\\\\forbidden/////
GET
PROPERTY
3
\\\\\forbidden/////
GET
REFERENCE
3
\\\\\forbidden/////
GET
RUN
3
\\\\\forbidden/////
GET
TIME
1
2
FORM
XEK08B_FUELLEN
4
5
4
*eject

*---------------------------------------------------------------------*

* Bezugsnebenkosten fr RE fuellen
*

*---------------------------------------------------------------------*

1
FORM XEK08B_FUELLEN.

1
FORM xek08b_fuellen USING i_ekbe_key TYPE
ekbe_key_document."N980402

9
3

DATA: BNK_LIFNR LIKE EKBZ-LIFNR.

DATA: BNK_BWTAR LIKE EKBZ-BWTAR.

1
DATA: SU_BEWAE_INIT TYPE XFELD.

2
data: lv_kudif type c.
"N980402

DATA: SU_BEWAE_INIT TYPE XFELD.

264
3
XEK08BN-REBEL = BZT-BELNR.

XEK08BN-REBUZ = BZT-BUZEI.

ENDIF.

2
*------- Frachtnachbelastung --> nur Werte
----------------------------

WHEN '3'.

19

* Begin N980402

* At document cancellation the exchange ra


te difference amount from

* the cancellation document with its origi


nal sign has to be used.

* For ML currency selection is implemented


in other subroutine.

PERFORM add_to USING:

xek08bn_wa-kudif bzt_wa-kudif.

* For CC currency document selection is do


ne here.

IF not i_ekbe_key-belnr IS INITIAL


AND

bzt-belnr = i_ekbe_key-belnr AN
D

bzt-gjahr = i_ekbe_key-gjahr.

xek08bn-kudif = xek08bn-kudif
+ bzt-kudif.

zaehlsto = zaehlsto + 1.

lv_kudif = 'X'.

ENDIF.

* End N980402

*------- Frachtnachbelastung --> nur Werte


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

WHEN '3'.

365
3
XEK08BN-REBEL = BZT-BELNR.

XEK08BN-REBUZ = BZT-BUZEI.

ENDIF.

1
ENDCASE.

18
* Begin N980402

* At document cancellation the exchange ra


te difference amount from

* the cancellation document with its origi


nal sign has to be used.

* For ML currency selection is implemented


in other subroutine.

PERFORM add_to USING:

xek08bn_wa-kudif bzt_wa-kudif.

* For CC currency document selection is do


ne here.

IF not i_ekbe_key-belnr IS INITIAL


AND

bzt-belnr = i_ekbe_key-belnr AN
D

bzt-gjahr = i_ekbe_key-gjahr.

xek08bn-kudif = xek08bn-kudif
+ bzt-kudif.

zaehlsto = zaehlsto + 1.

lv_kudif = 'X'.

ENDIF.

* End N980402

ENDCASE.

LIMU
REPS
LEINRF0J
00001
LIMU
REPS
LEINRF0J
00003
36
1
\\\\\no_empty_blocks/////
1
\\\\\comments_not_ignored/////
1
\\\\\delta_normalized/////
3
\\\\\allowed/////

FORM
*
3
\\\\\allowed/////
FUNCTION
*
3
\\\\\allowed/////
MODULE
**
3
\\\\\allowed/////
REPORT
*
3
\\\\\allowed/////
PROGRAM
*
3
\\\\\allowed/////
FUNCTION-POOL
*
4
\\\\\allowed/////
CLASS
*
DEFINITION
4
\\\\\allowed/////
CLASS
*
IMPLEMENTATION
5
\\\\\forbidden/////
CLASS
*
DEFINITION
DEFERRED
5
\\\\\forbidden/////
CLASS
*
DEFINITION
LOAD
6
\\\\\forbidden/////
CLASS
*
DEFINITION
LOCAL
FRIENDS
3
\\\\\allowed/////
AT
LINE-SELECTION
3
\\\\\allowed/////
AT
USER-COMMAND
4

\\\\\allowed/////
AT
SELECTION-SCREEN
**
3
\\\\\allowed/////
AT
PF*
2
\\\\\allowed/////
INITIALIZATION
2
\\\\\allowed/////
START-OF-SELECTION
2
\\\\\allowed/////
END-OF-SELECTION
3
\\\\\allowed/////
TOP-OF-PAGE
**
2
\\\\\allowed/////
END-OF-PAGE
3
\\\\\allowed/////
GET
**
3
\\\\\forbidden/////
GET
BADI
3
\\\\\forbidden/////
GET
BIT
3
\\\\\forbidden/////
GET
CONNECTION
3
\\\\\forbidden/////
GET
CURSOR
3
\\\\\forbidden/////
GET
DATASET
3
\\\\\forbidden/////
GET
LOCALE
3
\\\\\forbidden/////
GET
PARAMETER
3
\\\\\forbidden/////
GET
PF-STATUS

3
\\\\\forbidden/////
GET
PROPERTY
3
\\\\\forbidden/////
GET
REFERENCE
3
\\\\\forbidden/////
GET
RUN
3
\\\\\forbidden/////
GET
TIME
1
2
FORM
BZT_ANALYSE_CR
10
25
3
WHEN 'F'.

PERFORM SUB_FROM USING:

W1 = W1 - W2

1
BETB_WA-FRWWR BZT_WA-DMBTR.

3
BETB_WA-FRWWR BZT_WA-DMBTR,

gr,

betb_wa-kudif_gr bzt_wa-kudif_
"N980402

ir.

betb_wa-kudif_ir bzt_wa-kudif_
"N980402

29
3
WHEN 'B'.

PERFORM SUB_FROM USING:

W1 = W1 - W2

1
BETB_WA-NAWWR BZT_WA-DMBTR.

3
BETB_WA-NAWWR BZT_WA-DMBTR,

gr,

betb_wa-kudif_gr bzt_wa-kudif_
"N980402

ir.

betb_wa-kudif_ir bzt_wa-kudif_
"N980402

33
3
WHEN 'C'.

PERFORM SUB_FROM USING:

W1 = W1 - W2

1
BETB_WA-FNWWR BZT_WA-DMBTR.

3
BETB_WA-FNWWR BZT_WA-DMBTR,

gr,

betb_wa-kudif_gr bzt_wa-kudif_
"N980402

ir.

betb_wa-kudif_ir bzt_wa-kudif_
"N980402

40
3
WHEN 'F'.

PERFORM ADD_TO USING:

W1 = W1 + W2

1
BETB_WA-FRWWR BZT_WA-DMBTR.

3
BETB_WA-FRWWR BZT_WA-DMBTR,

gr,

betb_wa-kudif_gr bzt_wa-kudif_
"N980402

ir.

betb_wa-kudif_ir bzt_wa-kudif_
"N980402

44
3
WHEN 'B'.

PERFORM ADD_TO USING:

W1 = W1 + W2

1
BETB_WA-NAWWR BZT_WA-DMBTR.

3
BETB_WA-NAWWR BZT_WA-DMBTR,

gr,

betb_wa-kudif_gr bzt_wa-kudif_
"N980402

ir.

betb_wa-kudif_ir bzt_wa-kudif_
"N980402

48
3
WHEN 'C'.

PERFORM ADD_TO USING:

W1 = W1 + W2

3
BETB_WA-FNWWR BZT_WA-DMBTR.

ENDCASE.

ENDIF.

9
BETB_WA-FNWWR BZT_WA-DMBTR,

gr,

betb_wa-kudif_gr bzt_wa-kudif_
"N980402

ir.

betb_wa-kudif_ir bzt_wa-kudif_
"N980402

ENDCASE.

ENDIF.

*
At document cancellation the exchang
e rate difference amount from

*
the cancellation document with its o
riginal sign has to be used.

PERFORM add_to USING:


"N980402

betb_wa-kudif bzt_wa-kudif.
"N980402

57
3
PERFORM SUB_FROM USING:

W1 = W1 - W2

BETB_WA-FRRWR BZT_WA-DMBTR,

1
BETB_WA-FRAWE BZT_WA-AREWR.

3
BETB_WA-FRAWE BZT_WA-AREWR,

betb_wa-kudif_gr bzt_wa-kudif_gr,
"N980402

betb_wa-kudif_ir bzt_wa-kudif_ir.
"N980402

62
3
PERFORM ADD_TO USING:

W1 = W1 + W2

BETB_WA-FRRWR BZT_WA-DMBTR,

2
BETB_WA-FRAWE BZT_WA-AREWR.

ENDIF.

9
BETB_WA-FRAWE BZT_WA-AREWR,

betb_wa-kudif_gr bzt_wa-kudif_gr,
"N980402

betb_wa-kudif_ir bzt_wa-kudif_ir.
"N980402

ENDIF.

*
At document cancellation the exchang
e rate difference amount from

*
the cancellation document with its o
riginal sign has to be used.

PERFORM add_to USING:


"N980402

betb_wa-kudif bzt_wa-kudif.
"N980402

73
3
PERFORM SUB_FROM USING:

W1 = W1 - W2

BETB_WA-FRRWR BZT_WA-DMBTR,

1
BETB_WA-FRAWE BZT_WA-AREWR.

3
BETB_WA-FRAWE BZT_WA-AREWR,

betb_wa-kudif_gr bzt_wa-kudif_gr,
"N980402

betb_wa-kudif_ir bzt_wa-kudif_ir.
"N980402

78
3
PERFORM ADD_TO USING:

W1 = W1 + W2

BETB_WA-FRRWR BZT_WA-DMBTR,

2
BETB_WA-FRAWE BZT_WA-AREWR.

ENDIF.

8
BETB_WA-FRAWE BZT_WA-AREWR,

betb_wa-kudif_gr bzt_wa-kudif_gr,
"N980402

betb_wa-kudif_ir bzt_wa-kudif_ir.
"N980402

ENDIF.

*
At document cancellation the exchang
e rate difference amount from

*
the cancellation document with its o
riginal sign has to be used.

PERFORM add_to USING:


"N980402

betb_wa-kudif bzt_wa-kudif.
"N980402

LIMU
REPS
LEINRF0K
00001
LIMU
REPS
LEINRF0K
00003
36
1
\\\\\no_empty_blocks/////
1
\\\\\comments_not_ignored/////
1

\\\\\delta_normalized/////
3
\\\\\allowed/////
FORM
*
3
\\\\\allowed/////
FUNCTION
*
3
\\\\\allowed/////
MODULE
**
3
\\\\\allowed/////
REPORT
*
3
\\\\\allowed/////
PROGRAM
*
3
\\\\\allowed/////
FUNCTION-POOL
*
4
\\\\\allowed/////
CLASS
*
DEFINITION
4
\\\\\allowed/////
CLASS
*
IMPLEMENTATION
5
\\\\\forbidden/////
CLASS
*
DEFINITION
DEFERRED
5
\\\\\forbidden/////
CLASS
*
DEFINITION
LOAD
6
\\\\\forbidden/////
CLASS
*
DEFINITION
LOCAL
FRIENDS
3
\\\\\allowed/////
AT
LINE-SELECTION
3
\\\\\allowed/////

AT
USER-COMMAND
4
\\\\\allowed/////
AT
SELECTION-SCREEN
**
3
\\\\\allowed/////
AT
PF*
2
\\\\\allowed/////
INITIALIZATION
2
\\\\\allowed/////
START-OF-SELECTION
2
\\\\\allowed/////
END-OF-SELECTION
3
\\\\\allowed/////
TOP-OF-PAGE
**
2
\\\\\allowed/////
END-OF-PAGE
3
\\\\\allowed/////
GET
**
3
\\\\\forbidden/////
GET
BADI
3
\\\\\forbidden/////
GET
BIT
3
\\\\\forbidden/////
GET
CONNECTION
3
\\\\\forbidden/////
GET
CURSOR
3
\\\\\forbidden/////
GET
DATASET
3
\\\\\forbidden/////
GET
LOCALE
3
\\\\\forbidden/////
GET
PARAMETER
3

\\\\\forbidden/////
GET
PF-STATUS
3
\\\\\forbidden/////
GET
PROPERTY
3
\\\\\forbidden/////
GET
REFERENCE
3
\\\\\forbidden/////
GET
RUN
3
\\\\\forbidden/////
GET
TIME
1
2
FORM
BZT_ANALYSE
6
89
3
ENDIF.

ENDIF.

ENDCASE.

1
ELSE.

2
betb-kudif_gr = betb-kudif_gr - bz
t-kudif.
"N980402

ELSE.

124
3
ENDIF.

ENDIF.

ENDCASE.

1
ENDIF.

12
betb-kudif_gr = betb-kudif_gr + bz
t-kudif.
"N980402

ENDIF.

* Begin N980402

* At document cancellation the exchange ra


te difference amount from

* the cancellation document with its origi


nal sign has to be used.

IF ( gf_xstor = '2' OR gf_xstor = 'X


' ) AND

not gf_smbln IS INITIAL


AND

gf_smbln = bzt-belnr AND gf_sjahr


= bzt-gjahr.

betb-kudif = betb-kudif + bzt-ku


dif.

zaehlsto = zaehlsto + 1.

ENDIF.

*End N980402

166
3
betb-frawe = betb-frawe - bzt-arew
r.

betb-frawb = betb-frawb - bzt-arew


b.

betb-frrwb = betb-frrwb - bzt-rewr


b.

1
IF su_fwknz NE space.

2
betb-kudif_ir = betb-kudif_ir - bz
t-kudif.
"N980402

IF su_fwknz NE space.

183
3
betb-frawe = betb-frawe + bzt-arew
r.

betb-frawb = betb-frawb + bzt-arew


b.

betb-frrwb = betb-frrwb + bzt-rewr


b.

1
IF su_fwknz NE space.

2
betb-kudif_ir = betb-kudif_ir + bz
t-kudif.
"N980402

IF su_fwknz NE space.

r.

236
3
betb-frawe = betb-frawe - bzt-arew
"3.1G

betb-frawb = betb-frawb - bzt-arew


b.

betb-frrwb = betb-frrwb - bzt-rewr


b.

1
IF su_fwknz NE space.

2
betb-kudif_ir = betb-kudif_ir - bz
t-kudif.
"N980402

IF su_fwknz NE space.

r.

251
3
betb-frawe = betb-frawe + bzt-arew
"3.1G

betb-frawb = betb-frawb + bzt-arew


b.

betb-frrwb = betb-frrwb + bzt-rewr


b.

1
IF su_fwknz NE space.

2
betb-kudif_ir = betb-kudif_ir + bz
t-kudif.
"N980402

IF su_fwknz NE space.

LIMU
REPS
LEINRF0O
00001
LIMU
REPS
LEINRF0O
00003
36
1
\\\\\no_empty_blocks/////
1
\\\\\comments_not_ignored/////
1
\\\\\delta_normalized/////
3
\\\\\allowed/////
FORM
*
3
\\\\\allowed/////
FUNCTION
*
3
\\\\\allowed/////
MODULE
**
3
\\\\\allowed/////
REPORT
*
3
\\\\\allowed/////
PROGRAM
*
3
\\\\\allowed/////
FUNCTION-POOL
*
4
\\\\\allowed/////
CLASS

*
DEFINITION
4
\\\\\allowed/////
CLASS
*
IMPLEMENTATION
5
\\\\\forbidden/////
CLASS
*
DEFINITION
DEFERRED
5
\\\\\forbidden/////
CLASS
*
DEFINITION
LOAD
6
\\\\\forbidden/////
CLASS
*
DEFINITION
LOCAL
FRIENDS
3
\\\\\allowed/////
AT
LINE-SELECTION
3
\\\\\allowed/////
AT
USER-COMMAND
4
\\\\\allowed/////
AT
SELECTION-SCREEN
**
3
\\\\\allowed/////
AT
PF*
2
\\\\\allowed/////
INITIALIZATION
2
\\\\\allowed/////
START-OF-SELECTION
2
\\\\\allowed/////
END-OF-SELECTION
3
\\\\\allowed/////
TOP-OF-PAGE
**
2
\\\\\allowed/////
END-OF-PAGE
3

\\\\\allowed/////
GET
**
3
\\\\\forbidden/////
GET
BADI
3
\\\\\forbidden/////
GET
BIT
3
\\\\\forbidden/////
GET
CONNECTION
3
\\\\\forbidden/////
GET
CURSOR
3
\\\\\forbidden/////
GET
DATASET
3
\\\\\forbidden/////
GET
LOCALE
3
\\\\\forbidden/////
GET
PARAMETER
3
\\\\\forbidden/////
GET
PF-STATUS
3
\\\\\forbidden/////
GET
PROPERTY
3
\\\\\forbidden/////
GET
REFERENCE
3
\\\\\forbidden/////
GET
RUN
3
\\\\\forbidden/////
GET
TIME
1
2
FORM
BET_ANALYSE_CR
6
34
3
perform add_to using:

W1 = W1 + W2

bets_wa-wewrt bet_wa-dmbtr,

1
betz_wa-wewrt bet_wa-dmbtr.

3
betz_wa-wewrt bet_wa-dmbtr,

bets_wa-kudif_gr bet_wa-kudif_gr,
"N980402

betz_wa-kudif_gr bet_wa-kudif_gr.
"N980402

39
3
perform sub_from using:

W1 = W1 - W2

bets_wa-wewrt bet_wa-dmbtr,

3
betz_wa-wewrt bet_wa-dmbtr.

endif.

13
betz_wa-wewrt bet_wa-dmbtr,

bets_wa-kudif_gr bet_wa-kudif_gr,
"N980402

betz_wa-kudif_gr bet_wa-kudif_gr.
"N980402

endif.

*Begin N980402

*
At document cancellation the exchang
e rate difference amount from

*
the cancellation document with its o
riginal sign has to be used.

PERFORM add_to USING:


"N980402

bets_wa-kudif bet_wa-kudif,
"N980402

betz_wa-kudif bet_wa-kudif.
"N980402

*End N980402

52
7
perform add_to using:

W1 = W1 + W2

bets_wa-rewrt bet_wa-dmbtr,

betz_wa-rewrt bet_wa-dmbtr,

bets_wa-arewr bet_wa-arewr,

betz_wa-arewr bet_wa-arewr,

bets_wa-reewr bet_wa-reewr,

1
betz_wa-reewr bet_wa-reewr.

3
betz_wa-reewr bet_wa-reewr,

bets_wa-kudif_ir bet_wa-kudif_ir,
"N980402

betz_wa-kudif_ir bet_wa-kudif_ir.
"N980402

61
7
perform sub_from using:

W1 = W1 - W2

bets_wa-rewrt bet_wa-dmbtr,

betz_wa-rewrt bet_wa-dmbtr,

bets_wa-arewr bet_wa-arewr,

betz_wa-arewr bet_wa-arewr,

bets_wa-reewr bet_wa-reewr,

2
betz_wa-reewr bet_wa-reewr.

endif.

11
betz_wa-reewr bet_wa-reewr,

bets_wa-kudif_ir bet_wa-kudif_ir,
"N980402

betz_wa-kudif_ir bet_wa-kudif_ir.
"N980402

endif.

*Begin N980402

*
At document cancellation the exchang
e rate difference amount from

*
the cancellation document with its o
riginal sign has to be used.

PERFORM add_to USING:


"N980402

bets_wa-kudif bet_wa-kudif,
"N980402

betz_wa-kudif bet_wa-kudif.
"N980402

*End N980402

78
7
perform add_to using:

W1 = W1 + W2

bets_wa-rewrt bet_wa-dmbtr,

betz_wa-rewrt bet_wa-dmbtr,

bets_wa-arewr bet_wa-arewr,

betz_wa-arewr bet_wa-arewr,

bets_wa-reewr bet_wa-reewr,

1
betz_wa-reewr bet_wa-reewr.

3
betz_wa-reewr bet_wa-reewr,

bets_wa-kudif_ir bet_wa-kudif_ir
"N980402

betz_wa-kudif_ir bet_wa-kudif_ir
"N980402

87
7
perform sub_from using:

W1 = W1 - W2

bets_wa-rewrt bet_wa-dmbtr,

betz_wa-rewrt bet_wa-dmbtr,

bets_wa-arewr bet_wa-arewr,

betz_wa-arewr bet_wa-arewr,

bets_wa-reewr bet_wa-reewr,

2
betz_wa-reewr bet_wa-reewr.

endif.

12
betz_wa-reewr bet_wa-reewr,

bets_wa-kudif_ir bet_wa-kudif_ir
"N980402

betz_wa-kudif_ir bet_wa-kudif_ir
"N980402

endif.

*Begin N980402

*
At document cancellation the exchang
e rate difference amount from

*
the cancellation document with its o
riginal sign has to be used.

PERFORM add_to USING:


"N980402

bets_wa-kudif bet_wa-kudif,
"N980402

betz_wa-kudif bet_wa-kudif.
"N980402

*End N980402

LIMU
REPS
LEINRF0P
00002
LIMU
REPS
LEINRF0P
00004
36

1
\\\\\no_empty_blocks/////
1
\\\\\comments_not_ignored/////
1
\\\\\delta_normalized/////
3
\\\\\allowed/////
FORM
*
3
\\\\\allowed/////
FUNCTION
*
3
\\\\\allowed/////
MODULE
**
3
\\\\\allowed/////
REPORT
*
3
\\\\\allowed/////
PROGRAM
*
3
\\\\\allowed/////
FUNCTION-POOL
*
4
\\\\\allowed/////
CLASS
*
DEFINITION
4
\\\\\allowed/////
CLASS
*
IMPLEMENTATION
5
\\\\\forbidden/////
CLASS
*
DEFINITION
DEFERRED
5
\\\\\forbidden/////
CLASS
*
DEFINITION
LOAD
6
\\\\\forbidden/////
CLASS
*
DEFINITION
LOCAL
FRIENDS
3

\\\\\allowed/////
AT
LINE-SELECTION
3
\\\\\allowed/////
AT
USER-COMMAND
4
\\\\\allowed/////
AT
SELECTION-SCREEN
**
3
\\\\\allowed/////
AT
PF*
2
\\\\\allowed/////
INITIALIZATION
2
\\\\\allowed/////
START-OF-SELECTION
2
\\\\\allowed/////
END-OF-SELECTION
3
\\\\\allowed/////
TOP-OF-PAGE
**
2
\\\\\allowed/////
END-OF-PAGE
3
\\\\\allowed/////
GET
**
3
\\\\\forbidden/////
GET
BADI
3
\\\\\forbidden/////
GET
BIT
3
\\\\\forbidden/////
GET
CONNECTION
3
\\\\\forbidden/////
GET
CURSOR
3
\\\\\forbidden/////
GET
DATASET
3
\\\\\forbidden/////
GET
LOCALE

3
\\\\\forbidden/////
GET
PARAMETER
3
\\\\\forbidden/////
GET
PF-STATUS
3
\\\\\forbidden/////
GET
PROPERTY
3
\\\\\forbidden/////
GET
REFERENCE
3
\\\\\forbidden/////
GET
RUN
3
\\\\\forbidden/////
GET
TIME
2
2
FORM
BET_ANALYSE
10
193
3
betz-wewrt = betz-wewrt + bet-dmbt
r.

bets-wewwr = bets-wewwr + bet-wrbt


r.

betz-wewwr = betz-wewwr + bet-wrbt


r.

1
ENHANCEMENT-POINT LEINRF0P_01 SPOTS ES_SAP
LEINR.

3
bets-kudif_gr = bets-kudif_gr + be
t-kudif.
"N980402

betz-kudif_gr = betz-kudif_gr + be
"N980402

t-kudif.

ENHANCEMENT-POINT LEINRF0P_01 SPOTS ES_SAP


LEINR.

249
3
betz-wewrt = betz-wewrt - bet-dmbt
r.

bets-wewwr = bets-wewwr - bet-wrbt


r.

betz-wewwr = betz-wewwr - bet-wrbt


r.

1
ENHANCEMENT-POINT LEINRF0P_02 SPOTS ES_SAP
LEINR.

3
bets-kudif_gr = bets-kudif_gr - be
t-kudif.
"N980402

betz-kudif_gr = betz-kudif_gr - be
"N980402

t-kudif.

ENHANCEMENT-POINT LEINRF0P_02 SPOTS ES_SAP


LEINR.

266
3
betz-mblnr = bet-belnr.

betz-mblpo = bet-buzei.

betz-mjahr = bet-gjahr.

1
*------- Rechnung oder Kontenpflege ---( M
engen und Werte )-------------

14

* Begin N980402

* At document cancellation the exchange ra


te difference amount from

* the cancellation document with its origi


nal sign has to be used.

IF ( gf_xstor = '2' OR gf_xstor = 'X


' ) AND

not gf_smbln IS INITIAL AND

gf_smbln = bet-belnr AND gf_sjahr


= bet-gjahr.

bets-kudif = bets-kudif + bet-kudi


f.

betz-kudif = betz-kudif + bet-kudi


f.

zaehlsto = zaehlsto + 1.

ENDIF.

* End N980402

*------- Rechnung oder Kontenpflege ---( M


engen und Werte )-------------

307
3
betz-rewrb = betz-rewrb + bet-rewr
b.

bets-reewr = bets-reewr + bet-reew


r.

betz-reewr = betz-reewr + bet-reew


r.

1
ENHANCEMENT-POINT LEINRF0P_03 SPOTS ES_SAP
LEINR.

3
bets-kudif_ir = bets-kudif_ir + be
t-kudif.
"N980402

betz-kudif_ir = betz-kudif_ir + be
"N980402

t-kudif.

ENHANCEMENT-POINT LEINRF0P_03 SPOTS ES_SAP


LEINR.

357
3
betz-reewr = betz-reewr - bet-reew
r.

bets-rewrb = bets-rewrb - bet-rewr


b.

betz-rewrb = betz-rewrb - bet-rewr


b.

1
ENHANCEMENT-POINT LEINRF0P_04 SPOTS ES_SAP
LEINR.

3
bets-kudif_ir = bets-kudif_ir - be
t-kudif.
"N980402

betz-kudif_ir = betz-kudif_ir - be
"N980402

t-kudif.

ENHANCEMENT-POINT LEINRF0P_04 SPOTS ES_SAP


LEINR.

397
8
ENDIF.

*
PERFORM bet_doc_currency_fields USI
NG bet
"215075

*
ING bets-rewwb

CHANG

*
betz-rewwb

*
bets-arewb

*
betz-arewb.

betz-xunpl = bet-xunpl.
geplante Kontierung

"un

bets-xunpl = bet-xunpl.

1
*------- Nachbelastung ----- ( nur Werte )
------------------------------

14

* Begin N980402

* At document cancellation the exchange ra


te difference amount from

* the cancellation document with its origi


nal sign has to be used.

IF not gs_ekbe_key-belnr IS INITIAL


AND

gs_ekbe_key-belnr = bet-belnr
AND

gs_ekbe_key-gjahr = bet-gjahr.

bets-kudif = bets-kudif + bet-kudi


f.

betz-kudif = betz-kudif + bet-kudi


f.

zaehlsto = zaehlsto + 1.

ENDIF.

* End N980402

*------- Nachbelastung ----- ( nur Werte )


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

435
3
betz-reewr = betz-reewr + bet-re
ewr.

bets-rewrb = bets-rewrb + bet-re


wrb.

betz-rewrb = betz-rewrb + bet-re


wrb.

1
ENHANCEMENT-POINT LEINRF0P_05 SPOTS ES_SAP
LEINR.

4
bets-kudif_ir = bets-kudif_ir +
bet-kudif.
"N980402

betz-kudif_ir = betz-kudif_ir +
"N980402

bet-kudif.

ENHANCEMENT-POINT LEINRF0P_05 SPOTS ES_SAP


LEINR.

477
3
betz-reewr = betz-reewr - bet-re
ewr.

bets-rewrb = bets-rewrb - bet-re


wrb.

betz-rewrb = betz-rewrb - bet-re


wrb.

1
ENHANCEMENT-POINT LEINRF0P_06 SPOTS ES_SAP
LEINR.

3
bets-kudif_ir = bets-kudif_ir bet-kudif.
"N980402

betz-kudif_ir = betz-kudif_ir "N980402

bet-kudif.

ENHANCEMENT-POINT LEINRF0P_06 SPOTS ES_SAP


LEINR.

516
8
ENDIF.

*
PERFORM bet_doc_currency_fields U
SING bet
"215075

*
NGING bets-rewwb

CHA

*
betz-rewwb

*
bets-arewb

*
betz-arewb.

betz-xunpl = bet-xunpl.
geplante Kontierung

"un

bets-xunpl = bet-xunpl.

1
ELSE.
"tk 4.5b

14

* Begin N98042

* At document cancellation the exchange ra


te difference amount from

* the cancellation document with its origi


nal sign has to be used.

IF not gs_ekbe_key-belnr IS INITIA


L AND

gs_ekbe_key-belnr = bet-belnr
AND

gs_ekbe_key-gjahr = bet-gjahr.

bets-kudif = bets-kudif + bet-ku


dif.

betz-kudif = betz-kudif + bet-ku


dif.

zaehlsto = zaehlsto + 1.

ENDIF.

* End N980402

ELSE.
"tk 4.5b

610
3
betz-mblnr = bet-belnr.

betz-mblpo = bet-buzei.

betz-mjahr = bet-gjahr.

1
*-------Lieferung -- --------------------------------------------------

14

* Begin N980402

* At document cancellation of a GI for STO


, the counter for the

* exchange rate difference amount from the


freight costs has to be

* set here, because the freight costs are


optional.

IF ( gf_xstor = '2' OR gf_xstor = 'X


' ) AND

gf_smbln IS NOT INITIAL


AND

gf_smbln = bet-belnr
AND

gf_sjahr = bet-gjahr.

zaehlsto = zaehlsto + 1.

ENDIF.

* End N980402

*-------Lieferung -- --------------------------------------------------

2
FORM
BET_ANALYSE_L
2
148
3
ENDIF.

betsl-xunpl = bet-xunpl.

1
*------- Nachbelastung ----- ( nur Werte )
------------------------------

12
* Begin N980402

* At document cancellation the exchange ra


te difference amount from

* the cancellation document with its origi


nal sign has to be used.

IF gs_ekbe_key-belnr IS NOT INITIAL


AND

gs_ekbe_key-belnr = bet-belnr
AND

gs_ekbe_key-gjahr = bet-gjahr.

betsl-kudif = betsl-kudif + bet-ku


dif.

zaehlsto = zaehlsto + 1.

ENDIF.

* End N980402

*------- Nachbelastung ----- ( nur Werte )


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

241
3
ENDIF.

ENDIF.

betsl-xunpl = bet-xunpl.

2
ENDIF.

*------- Anzahlung ----------------------------------------------------

14
ENDIF.

* Begin N980402

* At document cancellation the exchange ra


te difference amount from

* the cancellation document with its origi


nal sign has to be used.

IF not gs_ekbe_key-belnr IS INITIAL


AND

gs_ekbe_key-belnr = bet-belnr
AND

gs_ekbe_key-gjahr = bet-gjahr.

betsl-kudif = betsl-kudif + bet-ku


dif.

zaehlsto = zaehlsto + 1.

ENDIF.

* End N980402

*------- Anzahlung ----------------------------------------------------

LIMU
REPS
LEINRF1C
00001
LIMU
REPS
LEINRF1C
00003
36
1
\\\\\no_empty_blocks/////
1
\\\\\comments_not_ignored/////
1
\\\\\delta_normalized/////
3
\\\\\allowed/////
FORM
*
3
\\\\\allowed/////
FUNCTION
*
3
\\\\\allowed/////
MODULE
**
3
\\\\\allowed/////
REPORT
*
3
\\\\\allowed/////
PROGRAM
*
3
\\\\\allowed/////
FUNCTION-POOL
*
4
\\\\\allowed/////
CLASS
*
DEFINITION
4
\\\\\allowed/////
CLASS
*
IMPLEMENTATION
5
\\\\\forbidden/////

CLASS
*
DEFINITION
DEFERRED
5
\\\\\forbidden/////
CLASS
*
DEFINITION
LOAD
6
\\\\\forbidden/////
CLASS
*
DEFINITION
LOCAL
FRIENDS
3
\\\\\allowed/////
AT
LINE-SELECTION
3
\\\\\allowed/////
AT
USER-COMMAND
4
\\\\\allowed/////
AT
SELECTION-SCREEN
**
3
\\\\\allowed/////
AT
PF*
2
\\\\\allowed/////
INITIALIZATION
2
\\\\\allowed/////
START-OF-SELECTION
2
\\\\\allowed/////
END-OF-SELECTION
3
\\\\\allowed/////
TOP-OF-PAGE
**
2
\\\\\allowed/////
END-OF-PAGE
3
\\\\\allowed/////
GET
**
3
\\\\\forbidden/////
GET
BADI
3
\\\\\forbidden/////

GET
BIT
3
\\\\\forbidden/////
GET
CONNECTION
3
\\\\\forbidden/////
GET
CURSOR
3
\\\\\forbidden/////
GET
DATASET
3
\\\\\forbidden/////
GET
LOCALE
3
\\\\\forbidden/////
GET
PARAMETER
3
\\\\\forbidden/////
GET
PF-STATUS
3
\\\\\forbidden/////
GET
PROPERTY
3
\\\\\forbidden/////
GET
REFERENCE
3
\\\\\forbidden/////
GET
RUN
3
\\\\\forbidden/////
GET
TIME
1
2
FORM
APPEND_XEK08BN_CR
2
42
3
XEK08BN_CR-AREWR = XEK08BN-AREWW.

ENDIF.

* XEK08BN_CR-KWERT = XEK08BN-KWRFW.

1
APPEND XEK08BN_CR.

3
* Currency rate difference value only in c
ompany code currency N980402

xek08bn_cr-kudif = 0.
"N980402

APPEND XEK08BN_CR.

60
3
XEK08BN_CR-REWRT = XEK08BN-REWRT.

XEK08BN_CR-AREWR = XEK08BN-AREWR.

XEK08BN_CR-WEWRT = XEK08BN-WEWRT.

1
* XEK08BN_CR-KWERT = XEK08BN-KWRFW.

2
xek08bn_cr-kudif = xek08bn-kudif.
"N980402

* XEK08BN_CR-KWERT = XEK08BN-KWRFW.

LIMU
REPS
LEINRF1D
00001
LIMU
REPS
LEINRF1D
00003
36
1
\\\\\no_empty_blocks/////
1
\\\\\comments_not_ignored/////
1
\\\\\delta_normalized/////
3
\\\\\allowed/////
FORM
*
3
\\\\\allowed/////
FUNCTION
*
3
\\\\\allowed/////
MODULE

**
3
\\\\\allowed/////
REPORT
*
3
\\\\\allowed/////
PROGRAM
*
3
\\\\\allowed/////
FUNCTION-POOL
*
4
\\\\\allowed/////
CLASS
*
DEFINITION
4
\\\\\allowed/////
CLASS
*
IMPLEMENTATION
5
\\\\\forbidden/////
CLASS
*
DEFINITION
DEFERRED
5
\\\\\forbidden/////
CLASS
*
DEFINITION
LOAD
6
\\\\\forbidden/////
CLASS
*
DEFINITION
LOCAL
FRIENDS
3
\\\\\allowed/////
AT
LINE-SELECTION
3
\\\\\allowed/////
AT
USER-COMMAND
4
\\\\\allowed/////
AT
SELECTION-SCREEN
**
3
\\\\\allowed/////
AT
PF*
2

\\\\\allowed/////
INITIALIZATION
2
\\\\\allowed/////
START-OF-SELECTION
2
\\\\\allowed/////
END-OF-SELECTION
3
\\\\\allowed/////
TOP-OF-PAGE
**
2
\\\\\allowed/////
END-OF-PAGE
3
\\\\\allowed/////
GET
**
3
\\\\\forbidden/////
GET
BADI
3
\\\\\forbidden/////
GET
BIT
3
\\\\\forbidden/////
GET
CONNECTION
3
\\\\\forbidden/////
GET
CURSOR
3
\\\\\forbidden/////
GET
DATASET
3
\\\\\forbidden/////
GET
LOCALE
3
\\\\\forbidden/////
GET
PARAMETER
3
\\\\\forbidden/////
GET
PF-STATUS
3
\\\\\forbidden/////
GET
PROPERTY
3
\\\\\forbidden/////
GET
REFERENCE
3

\\\\\forbidden/////
GET
RUN
3
\\\\\forbidden/////
GET
TIME
1
2
FORM
APPEND_XEK08RN_CR
2
42
3
XEK08RN_CR-AREWR = XEK08RN-AREWW.

ENDIF.

* XEK08RN_CR-NETWR = XEK08RN-NETWr.

1
APPEND XEK08RN_CR.

2
xek08rn_cr-kudif = 0.
"N980402

APPEND XEK08RN_CR.

60
3

XEK08RN_CR-REEWR = XEK08RN-REEWR.

XEK08RN_CR-AREWR = XEK08RN-AREWR.

* XEK08RN_CR-NETWR = XEK08RN-NETWR.

1
APPEND XEK08RN_CR.

2
xek08rn_cr-kudif = xek08rn-kudif.
"N980402

APPEND XEK08RN_CR.

LIMU
REPS
LEINRF1E
00001
LIMU
REPS
LEINRF1E
00003

36
1
\\\\\no_empty_blocks/////
1
\\\\\comments_not_ignored/////
1
\\\\\delta_normalized/////
3
\\\\\allowed/////
FORM
*
3
\\\\\allowed/////
FUNCTION
*
3
\\\\\allowed/////
MODULE
**
3
\\\\\allowed/////
REPORT
*
3
\\\\\allowed/////
PROGRAM
*
3
\\\\\allowed/////
FUNCTION-POOL
*
4
\\\\\allowed/////
CLASS
*
DEFINITION
4
\\\\\allowed/////
CLASS
*
IMPLEMENTATION
5
\\\\\forbidden/////
CLASS
*
DEFINITION
DEFERRED
5
\\\\\forbidden/////
CLASS
*
DEFINITION
LOAD
6
\\\\\forbidden/////
CLASS
*
DEFINITION
LOCAL
FRIENDS

3
\\\\\allowed/////
AT
LINE-SELECTION
3
\\\\\allowed/////
AT
USER-COMMAND
4
\\\\\allowed/////
AT
SELECTION-SCREEN
**
3
\\\\\allowed/////
AT
PF*
2
\\\\\allowed/////
INITIALIZATION
2
\\\\\allowed/////
START-OF-SELECTION
2
\\\\\allowed/////
END-OF-SELECTION
3
\\\\\allowed/////
TOP-OF-PAGE
**
2
\\\\\allowed/////
END-OF-PAGE
3
\\\\\allowed/////
GET
**
3
\\\\\forbidden/////
GET
BADI
3
\\\\\forbidden/////
GET
BIT
3
\\\\\forbidden/////
GET
CONNECTION
3
\\\\\forbidden/////
GET
CURSOR
3
\\\\\forbidden/////
GET
DATASET
3
\\\\\forbidden/////
GET

LOCALE
3
\\\\\forbidden/////
GET
PARAMETER
3
\\\\\forbidden/////
GET
PF-STATUS
3
\\\\\forbidden/////
GET
PROPERTY
3
\\\\\forbidden/////
GET
REFERENCE
3
\\\\\forbidden/////
GET
RUN
3
\\\\\forbidden/////
GET
TIME
1
2
FORM
APPEND_XEKBNK_CR
2
160
3
ENDIF.

ENDIF.

XEKBNK_CR-KWERT = XEKBNK-KWRFW.

1
APPEND XEKBNK_CR.

5
* Exchange rate difference occurs only in
company code and ML currency

xekbnk_cr-kudif = 0.
"N980402

xekbnk_cr-kudif_gr = 0.
"N980402

xekbnk_cr-kudif_ir = 0.
"N980402

APPEND XEKBNK_CR.

176
3
XEKBNK_CR-NAWWR = XEKBNK-NAWWR.

XEKBNK_CR-FNWWR = XEKBNK-FNWWR.

XEKBNK_CR-KWERT = XEKBNK-KWERT.

1
APPEND XEKBNK_CR.

5
xekbnk_cr-kudif = xekbnk-kudif.
"N980402

xekbnk_cr-kudif_gr = xekbnk-kudif_gr.
"N980402

xekbnk_cr-kudif_ir = xekbnk-kudif_ir.
"N980402

APPEND xekbnk_cr.

LIMU
REPS
LEINRF1F
00001
LIMU
REPS
LEINRF1F
00003

36
1
\\\\\no_empty_blocks/////
1
\\\\\comments_not_ignored/////
1
\\\\\delta_normalized/////
3
\\\\\allowed/////
FORM
*
3
\\\\\allowed/////
FUNCTION
*
3
\\\\\allowed/////
MODULE
**
3
\\\\\allowed/////
REPORT
*
3
\\\\\allowed/////
PROGRAM
*
3
\\\\\allowed/////
FUNCTION-POOL
*
4
\\\\\allowed/////
CLASS
*
DEFINITION
4
\\\\\allowed/////
CLASS
*
IMPLEMENTATION
5
\\\\\forbidden/////
CLASS
*
DEFINITION
DEFERRED
5
\\\\\forbidden/////
CLASS
*
DEFINITION
LOAD
6
\\\\\forbidden/////
CLASS
*
DEFINITION
LOCAL
FRIENDS

3
\\\\\allowed/////
AT
LINE-SELECTION
3
\\\\\allowed/////
AT
USER-COMMAND
4
\\\\\allowed/////
AT
SELECTION-SCREEN
**
3
\\\\\allowed/////
AT
PF*
2
\\\\\allowed/////
INITIALIZATION
2
\\\\\allowed/////
START-OF-SELECTION
2
\\\\\allowed/////
END-OF-SELECTION
3
\\\\\allowed/////
TOP-OF-PAGE
**
2
\\\\\allowed/////
END-OF-PAGE
3
\\\\\allowed/////
GET
**
3
\\\\\forbidden/////
GET
BADI
3
\\\\\forbidden/////
GET
BIT
3
\\\\\forbidden/////
GET
CONNECTION
3
\\\\\forbidden/////
GET
CURSOR
3
\\\\\forbidden/////
GET
DATASET
3
\\\\\forbidden/////
GET

LOCALE
3
\\\\\forbidden/////
GET
PARAMETER
3
\\\\\forbidden/////
GET
PF-STATUS
3
\\\\\forbidden/////
GET
PROPERTY
3
\\\\\forbidden/////
GET
REFERENCE
3
\\\\\forbidden/////
GET
RUN
3
\\\\\forbidden/////
GET
TIME
1
2
FORM
APPEND_XEBEFU_CR
2
110
3
ENDIF.

ENDIF.

xebefu_cr-netwr = xebefu-netww.

1
APPEND xebefu_cr.

4
xebefu_cr-kudif = 0.
"N980402

xebefu_cr-kudif_gr = 0.
"N980402

xebefu_cr-kudif_ir = 0.
"N980402

APPEND xebefu_cr.

124
3
xebefu_cr-rewrt = xebefu-rewrt.

xebefu_cr-arewr = xebefu-arewr.

xebefu_cr-netwr = xebefu-netwr.

1
APPEND xebefu_cr.

5
xebefu_cr-kudif = xebefu-kudif.
"N980402

xebefu_cr-kudif_gr = xebefu-kudif_gr.
"N980402

xebefu_cr-kudif_ir = xebefu-kudif_ir.
"N980402

APPEND xebefu_cr.

LIMU
REPS
LEINRF1J
00001
LIMU
REPS
LEINRF1J
00003
36
1
\\\\\no_empty_blocks/////
1
\\\\\comments_ignored/////
1
\\\\\delta_normalized/////

3
\\\\\allowed/////
FORM
*
3
\\\\\allowed/////
FUNCTION
*
3
\\\\\allowed/////
MODULE
**
3
\\\\\allowed/////
REPORT
*
3
\\\\\allowed/////
PROGRAM
*
3
\\\\\allowed/////
FUNCTION-POOL
*
4
\\\\\allowed/////
CLASS
*
DEFINITION
4
\\\\\allowed/////
CLASS
*
IMPLEMENTATION
5
\\\\\forbidden/////
CLASS
*
DEFINITION
DEFERRED
5
\\\\\forbidden/////
CLASS
*
DEFINITION
LOAD
6
\\\\\forbidden/////
CLASS
*
DEFINITION
LOCAL
FRIENDS
3
\\\\\allowed/////
AT
LINE-SELECTION
3
\\\\\allowed/////
AT

USER-COMMAND
4
\\\\\allowed/////
AT
SELECTION-SCREEN
**
3
\\\\\allowed/////
AT
PF*
2
\\\\\allowed/////
INITIALIZATION
2
\\\\\allowed/////
START-OF-SELECTION
2
\\\\\allowed/////
END-OF-SELECTION
3
\\\\\allowed/////
TOP-OF-PAGE
**
2
\\\\\allowed/////
END-OF-PAGE
3
\\\\\allowed/////
GET
**
3
\\\\\forbidden/////
GET
BADI
3
\\\\\forbidden/////
GET
BIT
3
\\\\\forbidden/////
GET
CONNECTION
3
\\\\\forbidden/////
GET
CURSOR
3
\\\\\forbidden/////
GET
DATASET
3
\\\\\forbidden/////
GET
LOCALE
3
\\\\\forbidden/////
GET
PARAMETER
3
\\\\\forbidden/////

GET
PF-STATUS
3
\\\\\forbidden/////
GET
PROPERTY
3
\\\\\forbidden/////
GET
REFERENCE
3
\\\\\forbidden/////
GET
RUN
3
\\\\\forbidden/////
GET
TIME
1
2
FORM
WE_BNK_RETOURE
2
36
3
XEKBNK-FRAWE = -1 * ( XEKBNK-FRAWE ). "
Rechnungsbetrag in Hauswhrung

XEKBNK-NAWWR = -1 * ( XEKBNK-NAWWR ). "


WE-Wert Nachtrgliche Abrechnu

XEKBNK-FNWWR = -1 * ( XEKBNK-FNWWR ). "


WE-Wert neutrale Rckstellunge

1
* Fremdwhrung

4
xekbnk-kudif_gr = -1 * ( xekbnk-kudif_gr
). "N980402

xekbnk-kudif_ir = -1 * ( xekbnk-kudif_ir
). "N980402

* Fremdwhrung

58
5
PERFORM CR_NORM_3 USING:

XEKBNK_WA-FRWWR,

XEKBNK_WA-FRRWR,

XEKBNK_WA-FRAWE,

XEKBNK_WA-NAWWR,

1
XEKBNK_WA-FNWWR.

4
XEKBNK_WA-FNWWR,

xekbnk_wa-kudif_gr,
"N980402

xekbnk_wa-kudif_ir.
"N980402

LIMU
REPS
LEINRF1L
00001
LIMU
REPS
LEINRF1L
00003
36
1
\\\\\no_empty_blocks/////
1
\\\\\comments_ignored/////
1
\\\\\delta_normalized/////

3
\\\\\allowed/////
FORM
*
3
\\\\\allowed/////
FUNCTION
*
3
\\\\\allowed/////
MODULE
**
3
\\\\\allowed/////
REPORT
*
3
\\\\\allowed/////
PROGRAM
*
3
\\\\\allowed/////
FUNCTION-POOL
*
4
\\\\\allowed/////
CLASS
*
DEFINITION
4
\\\\\allowed/////
CLASS
*
IMPLEMENTATION
5
\\\\\forbidden/////
CLASS
*
DEFINITION
DEFERRED
5
\\\\\forbidden/////
CLASS
*
DEFINITION
LOAD
6
\\\\\forbidden/////
CLASS
*
DEFINITION
LOCAL
FRIENDS
3
\\\\\allowed/////
AT
LINE-SELECTION
3
\\\\\allowed/////
AT

USER-COMMAND
4
\\\\\allowed/////
AT
SELECTION-SCREEN
**
3
\\\\\allowed/////
AT
PF*
2
\\\\\allowed/////
INITIALIZATION
2
\\\\\allowed/////
START-OF-SELECTION
2
\\\\\allowed/////
END-OF-SELECTION
3
\\\\\allowed/////
TOP-OF-PAGE
**
2
\\\\\allowed/////
END-OF-PAGE
3
\\\\\allowed/////
GET
**
3
\\\\\forbidden/////
GET
BADI
3
\\\\\forbidden/////
GET
BIT
3
\\\\\forbidden/////
GET
CONNECTION
3
\\\\\forbidden/////
GET
CURSOR
3
\\\\\forbidden/////
GET
DATASET
3
\\\\\forbidden/////
GET
LOCALE
3
\\\\\forbidden/////
GET
PARAMETER
3
\\\\\forbidden/////

GET
PF-STATUS
3
\\\\\forbidden/////
GET
PROPERTY
3
\\\\\forbidden/////
GET
REFERENCE
3
\\\\\forbidden/////
GET
RUN
3
\\\\\forbidden/////
GET
TIME
1
2
FORM
WE_RETOURE
2
28
3
XEBEFU-AREWW = ABS( XEBEFU-AREWW ).

XEBEFU-REWRT = ABS( XEBEFU-REWRT ).

XEBEFU-REWWR = ABS( XEBEFU-REWWR ).

1
* maintains algebraic sign relation for go
ods receipt value

4
xebefu-kudif_gr = ABS( xebefu-kudif_gr )
.
"N980402

xebefu-kudif_ir = ABS( xebefu-kudif_ir )


"N980402

* maintains algebraic sign relation for go


ods receipt value

42
5
ENDIF.

* Whrungsvektoren: W = ABS( W )
K003063

PERFORM CR_NORM_4 USING:

XEBEFU_WA-AREWR,

1
XEBEFU_WA-REWRT.

4
XEBEFU_WA-REWRT,

xebefu_wa-kudif_gr,
"N980402

xebefu_wa-kudif_ir.
"N980402

LIMU
REPS
LEINRF27
00001
LIMU
REPS
LEINRF27
00003
36
1
\\\\\no_empty_blocks/////
1
\\\\\comments_not_ignored/////
1
\\\\\delta_normalized/////

3
\\\\\allowed/////
FORM
*
3
\\\\\allowed/////
FUNCTION
*
3
\\\\\allowed/////
MODULE
**
3
\\\\\allowed/////
REPORT
*
3
\\\\\allowed/////
PROGRAM
*
3
\\\\\allowed/////
FUNCTION-POOL
*
4
\\\\\allowed/////
CLASS
*
DEFINITION
4
\\\\\allowed/////
CLASS
*
IMPLEMENTATION
5
\\\\\forbidden/////
CLASS
*
DEFINITION
DEFERRED
5
\\\\\forbidden/////
CLASS
*
DEFINITION
LOAD
6
\\\\\forbidden/////
CLASS
*
DEFINITION
LOCAL
FRIENDS
3
\\\\\allowed/////
AT
LINE-SELECTION
3
\\\\\allowed/////
AT

USER-COMMAND
4
\\\\\allowed/////
AT
SELECTION-SCREEN
**
3
\\\\\allowed/////
AT
PF*
2
\\\\\allowed/////
INITIALIZATION
2
\\\\\allowed/////
START-OF-SELECTION
2
\\\\\allowed/////
END-OF-SELECTION
3
\\\\\allowed/////
TOP-OF-PAGE
**
2
\\\\\allowed/////
END-OF-PAGE
3
\\\\\allowed/////
GET
**
3
\\\\\forbidden/////
GET
BADI
3
\\\\\forbidden/////
GET
BIT
3
\\\\\forbidden/////
GET
CONNECTION
3
\\\\\forbidden/////
GET
CURSOR
3
\\\\\forbidden/////
GET
DATASET
3
\\\\\forbidden/////
GET
LOCALE
3
\\\\\forbidden/////
GET
PARAMETER
3
\\\\\forbidden/////

GET
PF-STATUS
3
\\\\\forbidden/////
GET
PROPERTY
3
\\\\\forbidden/////
GET
REFERENCE
3
\\\\\forbidden/////
GET
RUN
3
\\\\\forbidden/////
GET
TIME
1
2
FORM
WE_AUS_POT
1
249
3
SELECT SINGLE * FROM T001 WHERE BUKRS
EQ POT-BUKRS.

endif.

IF EKKO-WAERS NE T001-WAERS.

1
IF EKKO-KUFIX NE SPACE.

1
IF EKKO-KUFIX NE SPACE AND t169p-kdhw
IS INITIAL. "N980402

LIMU
REPS
LEINRF2A
00001
LIMU
REPS
LEINRF2A
00003
36
1
\\\\\no_empty_blocks/////
1
\\\\\comments_not_ignored/////
1
\\\\\delta_normalized/////
3
\\\\\allowed/////
FORM
*
3
\\\\\allowed/////
FUNCTION
*
3
\\\\\allowed/////
MODULE
**
3
\\\\\allowed/////
REPORT
*
3
\\\\\allowed/////
PROGRAM
*
3
\\\\\allowed/////
FUNCTION-POOL
*
4
\\\\\allowed/////
CLASS
*
DEFINITION
4
\\\\\allowed/////
CLASS
*
IMPLEMENTATION
5

\\\\\forbidden/////
CLASS
*
DEFINITION
DEFERRED
5
\\\\\forbidden/////
CLASS
*
DEFINITION
LOAD
6
\\\\\forbidden/////
CLASS
*
DEFINITION
LOCAL
FRIENDS
3
\\\\\allowed/////
AT
LINE-SELECTION
3
\\\\\allowed/////
AT
USER-COMMAND
4
\\\\\allowed/////
AT
SELECTION-SCREEN
**
3
\\\\\allowed/////
AT
PF*
2
\\\\\allowed/////
INITIALIZATION
2
\\\\\allowed/////
START-OF-SELECTION
2
\\\\\allowed/////
END-OF-SELECTION
3
\\\\\allowed/////
TOP-OF-PAGE
**
2
\\\\\allowed/////
END-OF-PAGE
3
\\\\\allowed/////
GET
**
3
\\\\\forbidden/////
GET
BADI
3

\\\\\forbidden/////
GET
BIT
3
\\\\\forbidden/////
GET
CONNECTION
3
\\\\\forbidden/////
GET
CURSOR
3
\\\\\forbidden/////
GET
DATASET
3
\\\\\forbidden/////
GET
LOCALE
3
\\\\\forbidden/////
GET
PARAMETER
3
\\\\\forbidden/////
GET
PF-STATUS
3
\\\\\forbidden/////
GET
PROPERTY
3
\\\\\forbidden/////
GET
REFERENCE
3
\\\\\forbidden/////
GET
RUN
3
\\\\\forbidden/////
GET
TIME
1
2
FORM
WE_AUS_BETZ
1
86
3
xebefu-lfpos = betz-lfpos.

xebefu-bwtar = betz-bwtar.

xebefu-etens = betz-etens.

1
* die gesamte WE-Menge der Position (nicht
des Ursprungsbelegs)

4
xebefu-kudif = betz-kudif.
"N980402

xebefu-kudif_gr = betz-kudif_gr.
"N980402

xebefu-kudif_ir = betz-kudif_ir.
"N980402

* die gesamte WE-Menge der Position (nicht


des Ursprungsbelegs)

LIMU
REPS
LEINRF2B
00001
LIMU
REPS
LEINRF2B

00003
36
1
\\\\\no_empty_blocks/////
1
\\\\\comments_not_ignored/////
1
\\\\\delta_normalized/////
3
\\\\\allowed/////
FORM
*
3
\\\\\allowed/////
FUNCTION
*
3
\\\\\allowed/////
MODULE
**
3
\\\\\allowed/////
REPORT
*
3
\\\\\allowed/////
PROGRAM
*
3
\\\\\allowed/////
FUNCTION-POOL
*
4
\\\\\allowed/////
CLASS
*
DEFINITION
4
\\\\\allowed/////
CLASS
*
IMPLEMENTATION
5
\\\\\forbidden/////
CLASS
*
DEFINITION
DEFERRED
5
\\\\\forbidden/////
CLASS
*
DEFINITION
LOAD
6
\\\\\forbidden/////
CLASS

*
DEFINITION
LOCAL
FRIENDS
3
\\\\\allowed/////
AT
LINE-SELECTION
3
\\\\\allowed/////
AT
USER-COMMAND
4
\\\\\allowed/////
AT
SELECTION-SCREEN
**
3
\\\\\allowed/////
AT
PF*
2
\\\\\allowed/////
INITIALIZATION
2
\\\\\allowed/////
START-OF-SELECTION
2
\\\\\allowed/////
END-OF-SELECTION
3
\\\\\allowed/////
TOP-OF-PAGE
**
2
\\\\\allowed/////
END-OF-PAGE
3
\\\\\allowed/////
GET
**
3
\\\\\forbidden/////
GET
BADI
3
\\\\\forbidden/////
GET
BIT
3
\\\\\forbidden/////
GET
CONNECTION
3
\\\\\forbidden/////
GET
CURSOR
3
\\\\\forbidden/////
GET

DATASET
3
\\\\\forbidden/////
GET
LOCALE
3
\\\\\forbidden/////
GET
PARAMETER
3
\\\\\forbidden/////
GET
PF-STATUS
3
\\\\\forbidden/////
GET
PROPERTY
3
\\\\\forbidden/////
GET
REFERENCE
3
\\\\\forbidden/////
GET
RUN
3
\\\\\forbidden/////
GET
TIME
1
2
FORM
WE_AUS_BETS
2
40
3
xebefu-rewrt = bets-rewrt.

xebefu-wamng = bets-wamng.

xebefu-glmng = bets-glmng.

1
*--------------------------------------------------------------"K003063

4
xebefu-kudif = bets-kudif.
"N980402

xebefu-kudif_gr = bets-kudif_gr.
"N980402

xebefu-kudif_ir = bets-kudif_ir.
"N980402

*--------------------------------------------------------------"K003063

45
3
xebefu_wa-wewrt = bets_wa-wewrt.

xebefu_wa-arewr = bets_wa-arewr.

xebefu_wa-rewrt = bets_wa-rewrt.

1
*--------------------------------------------------------------"K003063

4
xebefu_wa-kudif = bets_wa-kudif.
"N980402

xebefu_wa-kudif_gr = bets_wa-kudif_gr.
"N980402

xebefu_wa-kudif_ir = bets_wa-kudif_ir.
"N980402

*--------------------------------------------------------------"K003063

LIMU
REPS
LEINRF2F
00001
LIMU
REPS
LEINRF2F
00003
36
1
\\\\\no_empty_blocks/////
1
\\\\\comments_not_ignored/////
1
\\\\\delta_normalized/////
3
\\\\\allowed/////
FORM

*
3
\\\\\allowed/////
FUNCTION
*
3
\\\\\allowed/////
MODULE
**
3
\\\\\allowed/////
REPORT
*
3
\\\\\allowed/////
PROGRAM
*
3
\\\\\allowed/////
FUNCTION-POOL
*
4
\\\\\allowed/////
CLASS
*
DEFINITION
4
\\\\\allowed/////
CLASS
*
IMPLEMENTATION
5
\\\\\forbidden/////
CLASS
*
DEFINITION
DEFERRED
5
\\\\\forbidden/////
CLASS
*
DEFINITION
LOAD
6
\\\\\forbidden/////
CLASS
*
DEFINITION
LOCAL
FRIENDS
3
\\\\\allowed/////
AT
LINE-SELECTION
3
\\\\\allowed/////
AT
USER-COMMAND
4
\\\\\allowed/////

AT
SELECTION-SCREEN
**
3
\\\\\allowed/////
AT
PF*
2
\\\\\allowed/////
INITIALIZATION
2
\\\\\allowed/////
START-OF-SELECTION
2
\\\\\allowed/////
END-OF-SELECTION
3
\\\\\allowed/////
TOP-OF-PAGE
**
2
\\\\\allowed/////
END-OF-PAGE
3
\\\\\allowed/////
GET
**
3
\\\\\forbidden/////
GET
BADI
3
\\\\\forbidden/////
GET
BIT
3
\\\\\forbidden/////
GET
CONNECTION
3
\\\\\forbidden/////
GET
CURSOR
3
\\\\\forbidden/////
GET
DATASET
3
\\\\\forbidden/////
GET
LOCALE
3
\\\\\forbidden/////
GET
PARAMETER
3
\\\\\forbidden/////
GET
PF-STATUS
3

\\\\\forbidden/////
GET
PROPERTY
3
\\\\\forbidden/////
GET
REFERENCE
3
\\\\\forbidden/////
GET
RUN
3
\\\\\forbidden/////
GET
TIME
1
2
FORM
RE_AUS_BETZ2
2
12
3
xek08rn_wa-arewr = betz_wa-arewr.

xek08rn_wa-rewrt = betz_wa-rewrt.

xek08rn_wa-reewr = betz_wa-reewr.

1
*--------------------------------------------------------------"K003063

2
xek08rn_wa-kudif = betz_wa-kudif.
"N980402

*-----------------------------------------

----------------------"K003063

28
3
xek08rn-reewr = betz-reewr.

xek08rn-refwr = betz-refwr.

xek08rn-xunpl = betz-xunpl.

1
IF ekpo-pstyp = '9'.
"424699

2
xek08rn-kudif = betz-kudif.
"N980402

IF ekpo-pstyp = '9'.
"424699

LIMU
REPS
LEINRF2H
00001

LIMU
REPS
LEINRF2H
00003
36
1
\\\\\no_empty_blocks/////
1
\\\\\comments_not_ignored/////
1
\\\\\delta_normalized/////
3
\\\\\allowed/////
FORM
*
3
\\\\\allowed/////
FUNCTION
*
3
\\\\\allowed/////
MODULE
**
3
\\\\\allowed/////
REPORT
*
3
\\\\\allowed/////
PROGRAM
*
3
\\\\\allowed/////
FUNCTION-POOL
*
4
\\\\\allowed/////
CLASS
*
DEFINITION
4
\\\\\allowed/////
CLASS
*
IMPLEMENTATION
5
\\\\\forbidden/////
CLASS
*
DEFINITION
DEFERRED
5
\\\\\forbidden/////
CLASS
*
DEFINITION

LOAD
6
\\\\\forbidden/////
CLASS
*
DEFINITION
LOCAL
FRIENDS
3
\\\\\allowed/////
AT
LINE-SELECTION
3
\\\\\allowed/////
AT
USER-COMMAND
4
\\\\\allowed/////
AT
SELECTION-SCREEN
**
3
\\\\\allowed/////
AT
PF*
2
\\\\\allowed/////
INITIALIZATION
2
\\\\\allowed/////
START-OF-SELECTION
2
\\\\\allowed/////
END-OF-SELECTION
3
\\\\\allowed/////
TOP-OF-PAGE
**
2
\\\\\allowed/////
END-OF-PAGE
3
\\\\\allowed/////
GET
**
3
\\\\\forbidden/////
GET
BADI
3
\\\\\forbidden/////
GET
BIT
3
\\\\\forbidden/////
GET
CONNECTION
3
\\\\\forbidden/////
GET

CURSOR
3
\\\\\forbidden/////
GET
DATASET
3
\\\\\forbidden/////
GET
LOCALE
3
\\\\\forbidden/////
GET
PARAMETER
3
\\\\\forbidden/////
GET
PF-STATUS
3
\\\\\forbidden/////
GET
PROPERTY
3
\\\\\forbidden/////
GET
REFERENCE
3
\\\\\forbidden/////
GET
RUN
3
\\\\\forbidden/////
GET
TIME
2
2
FORM
RE_AUS_BETS1
2
11
3
XEK08RN_WA-AREWR = BETS_WA-AREWR.

XEK08RN_WA-REWRT = BETS_WA-REWRT.

XEK08RN_WA-REEWR = BETS_WA-REEWR.

1
*--------------------------------------------------------------"K003063

2
xek08rn_wa-kudif = bets_wa-kudif.
"N980402

*--------------------------------------------------------------"K003063

27
3
XEK08RN-REEWR = BETS-REEWR.

XEK08RN-REFWR = BETS-REFWR.

XEK08RN-XUNPL = BETS-XUNPL.

1
xek08rn-kudif = bets-kudif.
"N980402

2
FORM
RE_AUS_BETSL
1
30
3
XEK08RN-REFWR = BETSL-REFWR.

XEK08RN-XUNPL = BETSL-XUNPL.

XEK08RN-WENAM = BETSL-WENAM.

1
xek08rn-kudif = betsl-kudif.
"N980402

LIMU
REPS
LEINRF2N
00001
LIMU
REPS
LEINRF2N
00003

36
1
\\\\\no_empty_blocks/////
1
\\\\\comments_ignored/////
1
\\\\\delta_normalized/////
3
\\\\\allowed/////
FORM
*
3
\\\\\allowed/////
FUNCTION
*
3
\\\\\allowed/////
MODULE
**
3
\\\\\allowed/////
REPORT
*
3
\\\\\allowed/////
PROGRAM
*
3
\\\\\allowed/////
FUNCTION-POOL
*
4
\\\\\allowed/////
CLASS
*
DEFINITION
4
\\\\\allowed/////
CLASS
*
IMPLEMENTATION
5
\\\\\forbidden/////
CLASS
*
DEFINITION
DEFERRED
5
\\\\\forbidden/////
CLASS
*
DEFINITION
LOAD
6
\\\\\forbidden/////
CLASS
*
DEFINITION

LOCAL
FRIENDS
3
\\\\\allowed/////
AT
LINE-SELECTION
3
\\\\\allowed/////
AT
USER-COMMAND
4
\\\\\allowed/////
AT
SELECTION-SCREEN
**
3
\\\\\allowed/////
AT
PF*
2
\\\\\allowed/////
INITIALIZATION
2
\\\\\allowed/////
START-OF-SELECTION
2
\\\\\allowed/////
END-OF-SELECTION
3
\\\\\allowed/////
TOP-OF-PAGE
**
2
\\\\\allowed/////
END-OF-PAGE
3
\\\\\allowed/////
GET
**
3
\\\\\forbidden/////
GET
BADI
3
\\\\\forbidden/////
GET
BIT
3
\\\\\forbidden/////
GET
CONNECTION
3
\\\\\forbidden/////
GET
CURSOR
3
\\\\\forbidden/////
GET
DATASET
3

\\\\\forbidden/////
GET
LOCALE
3
\\\\\forbidden/////
GET
PARAMETER
3
\\\\\forbidden/////
GET
PF-STATUS
3
\\\\\forbidden/////
GET
PROPERTY
3
\\\\\forbidden/////
GET
REFERENCE
3
\\\\\forbidden/////
GET
RUN
3
\\\\\forbidden/////
GET
TIME
1
2
FORM
BETB_ERGAENZEN
6
10
3
DATA:
"K003063

ld_tabix

LIKE sy-subrc,
"K003063

lo_tabix

LIKE sy-subrc.
"K003063

1
DATA: lf_bnk_check type xfeld.
"446831

2
DATA: lf_bnk_check type xfeld,
"446831

lf_kufix

TYPE ekko-kufix.
"N980402

110
8
LOOP AT xebefu WHERE ebelp EQ ebelp

AND

vbeln_vl NE space

AND

vbelp_vl NE space.

* gehe ber alle XEBEFU-Zeilen mit Liefe


ravisbezug;

* es mssen mehrere XEBEFU-Zeilen berck


sichtigt werden, da die

* Bezugsnebenkosten nicht pro XEBEFU-Zei


le an den WE bergeben werden

REFRESH te_vtfkla.

SELECT SINGLE * FROM t001 WHERE bukrs


EQ ekko-bukrs.
"<693957

1
CALL FUNCTION 'SD_SCD_PO_ITEM_DELIVERY
_COSTS'

12

* Begin N980402

* If exchange rate handling is active the


actual exchange rate

* has to be used for GR.

IF t169p-kdhw IS INITIAL.

lf_kufix = ekko-kufix.

ELSE.

CLEAR lf_kufix.

ENDIF.

* End N980402

CALL FUNCTION 'SD_SCD_PO_ITEM_DELIVERY


_COSTS'

117
6
EXPORTING

i_vbeln = xebefu-vbeln_vl

i_vbelp = xebefu-vbelp_vl

i_budat = budat

i_waers = xebefu-waers

i_wkurs = ekko-wkurs
conversion rate
<693957

i_kufix = ekko-kufix
fixed rate flag
<693957

"PO

1
"PO

1
i_kufix = lf_kufix
"N980402

159
3
LOOP AT xbbefu.

REFRESH te_vtfkla.

SELECT SINGLE * FROM t001 WHERE bukr


s EQ ekko-bukrs.
"<693957

1
CALL FUNCTION 'SD_SCD_PO_ITEM_DELIVE
RY_COSTS'

12

* Begin N980402

* If exchange rate handling is active the


actual exchange rate

* has to be used for GR.

IF t169p-kdhw IS INITIAL.

lf_kufix = ekko-kufix.

ELSE.

CLEAR lf_kufix.

ENDIF.

*End N980402

CALL FUNCTION 'SD_SCD_PO_ITEM_DELIVE


RY_COSTS'

166
6
EXPORTING

i_vbeln = i_vbeln

i_vbelp = i_vbelp

i_budat = budat

i_waers = ekko-waers

i_wkurs = ekko-wkurs
O conversion rate
<693957

i_kufix = ekko-kufix
O fixed rate flag
<693957

"P

1
"P

1
i_kufix = lf_kufix
"N980402

253
3
IF budat IS INITIAL.

budat = sy-datlo.

ENDIF.

1
IF ekko-kufix NE space.

3
*
If exchange rate handling is active
the actual exchange rate

has to be used for GR.

IF ekko-kufix NE space AND t169p-kdh


w IS INITIAL.
"N980402

LIMU
REPS
LEINRF2O
00001
LIMU
REPS
LEINRF2O
00003
36
1
\\\\\no_empty_blocks/////
1
\\\\\comments_ignored/////
1

\\\\\delta_normalized/////
3
\\\\\allowed/////
FORM
*
3
\\\\\allowed/////
FUNCTION
*
3
\\\\\allowed/////
MODULE
**
3
\\\\\allowed/////
REPORT
*
3
\\\\\allowed/////
PROGRAM
*
3
\\\\\allowed/////
FUNCTION-POOL
*
4
\\\\\allowed/////
CLASS
*
DEFINITION
4
\\\\\allowed/////
CLASS
*
IMPLEMENTATION
5
\\\\\forbidden/////
CLASS
*
DEFINITION
DEFERRED
5
\\\\\forbidden/////
CLASS
*
DEFINITION
LOAD
6
\\\\\forbidden/////
CLASS
*
DEFINITION
LOCAL
FRIENDS
3
\\\\\allowed/////
AT
LINE-SELECTION
3
\\\\\allowed/////

AT
USER-COMMAND
4
\\\\\allowed/////
AT
SELECTION-SCREEN
**
3
\\\\\allowed/////
AT
PF*
2
\\\\\allowed/////
INITIALIZATION
2
\\\\\allowed/////
START-OF-SELECTION
2
\\\\\allowed/////
END-OF-SELECTION
3
\\\\\allowed/////
TOP-OF-PAGE
**
2
\\\\\allowed/////
END-OF-PAGE
3
\\\\\allowed/////
GET
**
3
\\\\\forbidden/////
GET
BADI
3
\\\\\forbidden/////
GET
BIT
3
\\\\\forbidden/////
GET
CONNECTION
3
\\\\\forbidden/////
GET
CURSOR
3
\\\\\forbidden/////
GET
DATASET
3
\\\\\forbidden/////
GET
LOCALE
3
\\\\\forbidden/////
GET
PARAMETER
3

\\\\\forbidden/////
GET
PF-STATUS
3
\\\\\forbidden/////
GET
PROPERTY
3
\\\\\forbidden/////
GET
REFERENCE
3
\\\\\forbidden/////
GET
RUN
3
\\\\\forbidden/////
GET
TIME
1
2
FORM
BETB_AUFBAUEN
1
67
4
ENDIF.

*- Nettobestellwert in Hauswhrung -----------------------------------*

IF ekko-waers NE t001-waers.

2
* IF EKKO-KUFIX NE SPACE OR KONV-WAERS E
Q T001-WAERS. "4.6A

IF ekko-kufix NE space OR
7864 note

"11

3
* N980402 if exchange rate handling is act
ive the actual exchange rate

* has to be used for GR.

IF ekko-kufix NE space AND t169p-kdhw


IS INITIAL OR
"N980402

LIMU
REPS
LEINRF2V
00001
LIMU
REPS
LEINRF2V
00003
36
1
\\\\\no_empty_blocks/////
1
\\\\\comments_not_ignored/////
1
\\\\\delta_normalized/////
3
\\\\\allowed/////
FORM
*
3
\\\\\allowed/////

FUNCTION
*
3
\\\\\allowed/////
MODULE
**
3
\\\\\allowed/////
REPORT
*
3
\\\\\allowed/////
PROGRAM
*
3
\\\\\allowed/////
FUNCTION-POOL
*
4
\\\\\allowed/////
CLASS
*
DEFINITION
4
\\\\\allowed/////
CLASS
*
IMPLEMENTATION
5
\\\\\forbidden/////
CLASS
*
DEFINITION
DEFERRED
5
\\\\\forbidden/////
CLASS
*
DEFINITION
LOAD
6
\\\\\forbidden/////
CLASS
*
DEFINITION
LOCAL
FRIENDS
3
\\\\\allowed/////
AT
LINE-SELECTION
3
\\\\\allowed/////
AT
USER-COMMAND
4
\\\\\allowed/////
AT
SELECTION-SCREEN
**

3
\\\\\allowed/////
AT
PF*
2
\\\\\allowed/////
INITIALIZATION
2
\\\\\allowed/////
START-OF-SELECTION
2
\\\\\allowed/////
END-OF-SELECTION
3
\\\\\allowed/////
TOP-OF-PAGE
**
2
\\\\\allowed/////
END-OF-PAGE
3
\\\\\allowed/////
GET
**
3
\\\\\forbidden/////
GET
BADI
3
\\\\\forbidden/////
GET
BIT
3
\\\\\forbidden/////
GET
CONNECTION
3
\\\\\forbidden/////
GET
CURSOR
3
\\\\\forbidden/////
GET
DATASET
3
\\\\\forbidden/////
GET
LOCALE
3
\\\\\forbidden/////
GET
PARAMETER
3
\\\\\forbidden/////
GET
PF-STATUS
3
\\\\\forbidden/////
GET
PROPERTY

3
\\\\\forbidden/////
GET
REFERENCE
3
\\\\\forbidden/////
GET
RUN
3
\\\\\forbidden/////
GET
TIME
1
2
FORM
BESTELLPOS_LESEN
1
17
4
DATA: L_EKPO LIKE EKPO OCCURS 0 WITH HEA
DER LINE.

* ALRK013768 end insert.

REFRESH: POT, KNT, BET, BETS, BETZ, BETS


L, BZT, BETB, ETT.

1
CLEAR:

CLEAR:
ehlsto.

ZAEHLALL, ZAEHLSEL, XMATRIX.

1
zaehlall, zaehlsel, xmatrix, za
"N980402

LIMU
REPS
LEINRF44
00001
LIMU
REPS
LEINRF44
00003
36
1
\\\\\no_empty_blocks/////
1
\\\\\comments_not_ignored/////
1
\\\\\delta_normalized/////
3
\\\\\allowed/////
FORM
*
3
\\\\\allowed/////
FUNCTION
*
3
\\\\\allowed/////
MODULE
**
3
\\\\\allowed/////
REPORT
*
3
\\\\\allowed/////
PROGRAM
*
3
\\\\\allowed/////
FUNCTION-POOL
*
4
\\\\\allowed/////
CLASS
*
DEFINITION
4
\\\\\allowed/////
CLASS
*
IMPLEMENTATION

5
\\\\\forbidden/////
CLASS
*
DEFINITION
DEFERRED
5
\\\\\forbidden/////
CLASS
*
DEFINITION
LOAD
6
\\\\\forbidden/////
CLASS
*
DEFINITION
LOCAL
FRIENDS
3
\\\\\allowed/////
AT
LINE-SELECTION
3
\\\\\allowed/////
AT
USER-COMMAND
4
\\\\\allowed/////
AT
SELECTION-SCREEN
**
3
\\\\\allowed/////
AT
PF*
2
\\\\\allowed/////
INITIALIZATION
2
\\\\\allowed/////
START-OF-SELECTION
2
\\\\\allowed/////
END-OF-SELECTION
3
\\\\\allowed/////
TOP-OF-PAGE
**
2
\\\\\allowed/////
END-OF-PAGE
3
\\\\\allowed/////
GET
**
3
\\\\\forbidden/////
GET
BADI

3
\\\\\forbidden/////
GET
BIT
3
\\\\\forbidden/////
GET
CONNECTION
3
\\\\\forbidden/////
GET
CURSOR
3
\\\\\forbidden/////
GET
DATASET
3
\\\\\forbidden/////
GET
LOCALE
3
\\\\\forbidden/////
GET
PARAMETER
3
\\\\\forbidden/////
GET
PF-STATUS
3
\\\\\forbidden/////
GET
PROPERTY
3
\\\\\forbidden/////
GET
REFERENCE
3
\\\\\forbidden/////
GET
RUN
3
\\\\\forbidden/////
GET
TIME
1
2
FORM
XEKBNK_CR_ERGAENZEN
2
48
3
LD_XEKBNK_CR-FRAWE = 0.

LD_XEKBNK_CR-NAWWR = 0.

LD_XEKBNK_CR-FNWWR = 0.

1
APPEND LD_XEKBNK_CR TO R_XEKBNK_CR_TBL
.

4
ld_xekbnk_cr-kudif = 0.
"N980402

ld_xekbnk_cr-kudif_gr = 0.
"N980402

ld_xekbnk_cr-kudif_ir = 0.
"N980402

APPEND LD_XEKBNK_CR TO R_XEKBNK_CR_TBL


.

72
3
LD_XEKBNK_CR-FRAWE = XEKBNK-FRAWE.

LD_XEKBNK_CR-NAWWR = XEKBNK-NAWWR.

LD_XEKBNK_CR-FNWWR = XEKBNK-FNWWR.

1
APPEND LD_XEKBNK_CR TO R_XEKBNK_CR_TBL
.

4
ld_xekbnk_cr-kudif = xekbnk-kudif.
"N980402

r.

ld_xekbnk_cr-kudif_gr = xekbnk-kudif_g
"N980402

r.

ld_xekbnk_cr-kudif_ir = xekbnk-kudif_i
"N980402

APPEND LD_XEKBNK_CR TO R_XEKBNK_CR_TBL


.

LIMU
REPS
LEINRF45
00001
LIMU
REPS
LEINRF45

00003
36
1
\\\\\no_empty_blocks/////
1
\\\\\comments_ignored/////
1
\\\\\delta_normalized/////
3
\\\\\allowed/////
FORM
*
3
\\\\\allowed/////
FUNCTION
*
3
\\\\\allowed/////
MODULE
**
3
\\\\\allowed/////
REPORT
*
3
\\\\\allowed/////
PROGRAM
*
3
\\\\\allowed/////
FUNCTION-POOL
*
4
\\\\\allowed/////
CLASS
*
DEFINITION
4
\\\\\allowed/////
CLASS
*
IMPLEMENTATION
5
\\\\\forbidden/////
CLASS
*
DEFINITION
DEFERRED
5
\\\\\forbidden/////
CLASS
*
DEFINITION
LOAD
6
\\\\\forbidden/////

CLASS
*
DEFINITION
LOCAL
FRIENDS
3
\\\\\allowed/////
AT
LINE-SELECTION
3
\\\\\allowed/////
AT
USER-COMMAND
4
\\\\\allowed/////
AT
SELECTION-SCREEN
**
3
\\\\\allowed/////
AT
PF*
2
\\\\\allowed/////
INITIALIZATION
2
\\\\\allowed/////
START-OF-SELECTION
2
\\\\\allowed/////
END-OF-SELECTION
3
\\\\\allowed/////
TOP-OF-PAGE
**
2
\\\\\allowed/////
END-OF-PAGE
3
\\\\\allowed/////
GET
**
3
\\\\\forbidden/////
GET
BADI
3
\\\\\forbidden/////
GET
BIT
3
\\\\\forbidden/////
GET
CONNECTION
3
\\\\\forbidden/////
GET
CURSOR
3
\\\\\forbidden/////

GET
DATASET
3
\\\\\forbidden/////
GET
LOCALE
3
\\\\\forbidden/////
GET
PARAMETER
3
\\\\\forbidden/////
GET
PF-STATUS
3
\\\\\forbidden/////
GET
PROPERTY
3
\\\\\forbidden/////
GET
REFERENCE
3
\\\\\forbidden/////
GET
RUN
3
\\\\\forbidden/////
GET
TIME
1
2
FORM
XEKBNK_CR_AUFBAUEN
2
62
4
LD_EKBNK_CR_TBL-WAERS = LD_F_CURR-WA
ERS.

Werte abloopen und bertragen

COMPNR = 2.
"K029929

1
DO 5 TIMES

1
DO 9 TIMES
"N980402

67
4
*

VARYING LD_MASK_TBL
"K029929

*
FROM XEKBNK_WA-FRWWR NEXT XEKBNK_W
A-FRRWR
"K029929

VARYING LD_MASK_CURR

FROM LD_EKBNK_CR_TBL-FRWWR NEXT LD


_EKBNK_CR_TBL-FRRWR.

Anstelle von Do-Varying

"K029929

ASSIGN COMPONENT COMPNR OF STRUCTU


RE XEKBNK_WA TO <TAB>.

Disregard field kwert which is not


in table xekbnk_wa

IF sy-index = 6.
"N980402

CONTINUE.
"N980402

ENDIF.
"N980402

Anstelle von Do-Varying


"K029929

ASSIGN COMPONENT COMPNR OF STRUCTU


RE XEKBNK_WA TO <TAB>.

LIMU
REPS
LEINRF48
00001
LIMU
REPS
LEINRF48
00003
36
1
\\\\\no_empty_blocks/////
1
\\\\\comments_not_ignored/////
1
\\\\\delta_normalized/////
3
\\\\\allowed/////
FORM
*
3
\\\\\allowed/////
FUNCTION
*
3
\\\\\allowed/////
MODULE
**
3
\\\\\allowed/////
REPORT
*
3
\\\\\allowed/////
PROGRAM
*
3
\\\\\allowed/////
FUNCTION-POOL
*
4
\\\\\allowed/////
CLASS

*
DEFINITION
4
\\\\\allowed/////
CLASS
*
IMPLEMENTATION
5
\\\\\forbidden/////
CLASS
*
DEFINITION
DEFERRED
5
\\\\\forbidden/////
CLASS
*
DEFINITION
LOAD
6
\\\\\forbidden/////
CLASS
*
DEFINITION
LOCAL
FRIENDS
3
\\\\\allowed/////
AT
LINE-SELECTION
3
\\\\\allowed/////
AT
USER-COMMAND
4
\\\\\allowed/////
AT
SELECTION-SCREEN
**
3
\\\\\allowed/////
AT
PF*
2
\\\\\allowed/////
INITIALIZATION
2
\\\\\allowed/////
START-OF-SELECTION
2
\\\\\allowed/////
END-OF-SELECTION
3
\\\\\allowed/////
TOP-OF-PAGE
**
2
\\\\\allowed/////
END-OF-PAGE
3

\\\\\allowed/////
GET
**
3
\\\\\forbidden/////
GET
BADI
3
\\\\\forbidden/////
GET
BIT
3
\\\\\forbidden/////
GET
CONNECTION
3
\\\\\forbidden/////
GET
CURSOR
3
\\\\\forbidden/////
GET
DATASET
3
\\\\\forbidden/////
GET
LOCALE
3
\\\\\forbidden/////
GET
PARAMETER
3
\\\\\forbidden/////
GET
PF-STATUS
3
\\\\\forbidden/////
GET
PROPERTY
3
\\\\\forbidden/////
GET
REFERENCE
3
\\\\\forbidden/////
GET
RUN
3
\\\\\forbidden/////
GET
TIME
1
2
FORM
XEBEFU_CR_ERGAENZEN
2
46
3
LD_XEBEFU_CR-AREWR = 0.

LD_XEBEFU_CR-REWRT = 0.

LD_XEBEFU_CR-WEWRT = XEBEFU-WEWWR.

1
APPEND LD_XEBEFU_CR TO R_XEBEFU_CR_TBL
.

4
ld_xebefu_cr-kudif = 0.
"N980402

ld_xebefu_cr-kudif_gr = 0.
"N980402

ld_xebefu_cr-kudif_ir = 0.
"N980402

APPEND LD_XEBEFU_CR TO R_XEBEFU_CR_TBL


.

68
3
LD_XEBEFU_CR-AREWR = XEBEFU-AREWR.

LD_XEBEFU_CR-REWRT = XEBEFU-REWRT.

LD_XEBEFU_CR-WEWRT = XEBEFU-WEWRT.

1
APPEND LD_XEBEFU_CR TO R_XEBEFU_CR_TBL
.

4
ld_xebefu_cr-kudif = xebefu-kudif.
"N980402

r.

ld_xebefu_cr-kudif_gr = xebefu-kudif_g
"N980402

r.

ld_xebefu_cr-kudif_ir = xebefu-kudif_i
"N980402

APPEND LD_XEBEFU_CR TO R_XEBEFU_CR_TBL


.

LIMU
REPS
LEINRF49

00001
LIMU
REPS
LEINRF49
00003
36
1
\\\\\no_empty_blocks/////
1
\\\\\comments_ignored/////
1
\\\\\delta_normalized/////
3
\\\\\allowed/////
FORM
*
3
\\\\\allowed/////
FUNCTION
*
3
\\\\\allowed/////
MODULE
**
3
\\\\\allowed/////
REPORT
*
3
\\\\\allowed/////
PROGRAM
*
3
\\\\\allowed/////
FUNCTION-POOL
*
4
\\\\\allowed/////
CLASS
*
DEFINITION
4
\\\\\allowed/////
CLASS
*
IMPLEMENTATION
5
\\\\\forbidden/////
CLASS
*
DEFINITION
DEFERRED
5

\\\\\forbidden/////
CLASS
*
DEFINITION
LOAD
6
\\\\\forbidden/////
CLASS
*
DEFINITION
LOCAL
FRIENDS
3
\\\\\allowed/////
AT
LINE-SELECTION
3
\\\\\allowed/////
AT
USER-COMMAND
4
\\\\\allowed/////
AT
SELECTION-SCREEN
**
3
\\\\\allowed/////
AT
PF*
2
\\\\\allowed/////
INITIALIZATION
2
\\\\\allowed/////
START-OF-SELECTION
2
\\\\\allowed/////
END-OF-SELECTION
3
\\\\\allowed/////
TOP-OF-PAGE
**
2
\\\\\allowed/////
END-OF-PAGE
3
\\\\\allowed/////
GET
**
3
\\\\\forbidden/////
GET
BADI
3
\\\\\forbidden/////
GET
BIT
3
\\\\\forbidden/////
GET

CONNECTION
3
\\\\\forbidden/////
GET
CURSOR
3
\\\\\forbidden/////
GET
DATASET
3
\\\\\forbidden/////
GET
LOCALE
3
\\\\\forbidden/////
GET
PARAMETER
3
\\\\\forbidden/////
GET
PF-STATUS
3
\\\\\forbidden/////
GET
PROPERTY
3
\\\\\forbidden/////
GET
REFERENCE
3
\\\\\forbidden/////
GET
RUN
3
\\\\\forbidden/////
GET
TIME
1
2
FORM
XEBEFU_CR_AUFBAUEN
2
37
6
READ TABLE xebefu_wa

WITH KEY key = ld_key_ebefu BINAR


Y SEARCH.

* Suchen Whrungsvektor ungleich Null (R


eprsentant)

CLEAR ld_f_curr_tbl.

compnr = 2.
"K029929

1
DO 3 TIMES.
"K029929

1
DO 6 TIMES.
"N980402

78
3
ld_mask_curr = ld_curr-wert.

ENHANCEMENT-POINT XEBEFU_CR_AUFBAUEN_01 SP
OTS ES_SAPLEINR.

ENDDO.

1
APPEND ld_ebefu_cr_tbl.

19

* Begin N980402

* Transfer exchange rate difference values

compnr = 5.

DO 3 TIMES

VARYING ld_mask_curr

FROM ld_ebefu_cr_tbl-kudif NEXT ld


_ebefu_cr_tbl-kudif_gr.

ASSIGN COMPONENT compnr OF STRUCTU


RE xebefu_wa TO <tab>.

ADD 1 TO compnr.

ld_mask_tbl = <tab>.

READ TABLE ld_mask_tbl INTO ld_cur


r INDEX ld_tabix.

CHECK sy-subrc EQ 0.

ld_mask_curr = ld_curr-wert.

ENDDO.

* End N980402

APPEND ld_ebefu_cr_tbl.

LIMU
REPS
LEINRF4C
00001
LIMU
REPS
LEINRF4C
00003
36
1
\\\\\no_empty_blocks/////
1
\\\\\comments_not_ignored/////
1
\\\\\delta_normalized/////
3
\\\\\allowed/////
FORM
*
3
\\\\\allowed/////
FUNCTION
*
3
\\\\\allowed/////

MODULE
**
3
\\\\\allowed/////
REPORT
*
3
\\\\\allowed/////
PROGRAM
*
3
\\\\\allowed/////
FUNCTION-POOL
*
4
\\\\\allowed/////
CLASS
*
DEFINITION
4
\\\\\allowed/////
CLASS
*
IMPLEMENTATION
5
\\\\\forbidden/////
CLASS
*
DEFINITION
DEFERRED
5
\\\\\forbidden/////
CLASS
*
DEFINITION
LOAD
6
\\\\\forbidden/////
CLASS
*
DEFINITION
LOCAL
FRIENDS
3
\\\\\allowed/////
AT
LINE-SELECTION
3
\\\\\allowed/////
AT
USER-COMMAND
4
\\\\\allowed/////
AT
SELECTION-SCREEN
**
3
\\\\\allowed/////
AT
PF*

2
\\\\\allowed/////
INITIALIZATION
2
\\\\\allowed/////
START-OF-SELECTION
2
\\\\\allowed/////
END-OF-SELECTION
3
\\\\\allowed/////
TOP-OF-PAGE
**
2
\\\\\allowed/////
END-OF-PAGE
3
\\\\\allowed/////
GET
**
3
\\\\\forbidden/////
GET
BADI
3
\\\\\forbidden/////
GET
BIT
3
\\\\\forbidden/////
GET
CONNECTION
3
\\\\\forbidden/////
GET
CURSOR
3
\\\\\forbidden/////
GET
DATASET
3
\\\\\forbidden/////
GET
LOCALE
3
\\\\\forbidden/////
GET
PARAMETER
3
\\\\\forbidden/////
GET
PF-STATUS
3
\\\\\forbidden/////
GET
PROPERTY
3
\\\\\forbidden/////
GET
REFERENCE

3
\\\\\forbidden/////
GET
RUN
3
\\\\\forbidden/////
GET
TIME
1
2
FORM
XEK08RN_CR_ERGAENZEN
2
47
3
LD_XEK08RN_CR-REEWR = XEK08RN-REFWR.

LD_XEK08RN_CR-REWRT = XEK08RN-REWWR.

LD_XEK08RN_CR-WEWRT = XEK08RN-WEWWR.

1
APPEND LD_XEK08RN_CR TO R_XEK08RN_CR_T
BL.

2
ld_xek08rn_cr-kudif = 0.
"N980402

APPEND LD_XEK08RN_CR TO R_XEK08RN_CR_T


BL.

70

3
LD_XEK08RN_CR-REEWR = XEK08RN-REEWR.

LD_XEK08RN_CR-REWRT = XEK08RN-REWRT.

LD_XEK08RN_CR-WEWRT = XEK08RN-WEWRT.

1
APPEND LD_XEK08RN_CR TO R_XEK08RN_CR_T
BL.

2
ld_xek08rn_cr-kudif = xek08rn-kudif.
"N980402

APPEND LD_XEK08RN_CR TO R_XEK08RN_CR_T


BL.

LIMU
REPS
LEINRF4D
00001
LIMU
REPS
LEINRF4D
00003

36
1
\\\\\no_empty_blocks/////
1
\\\\\comments_ignored/////
1
\\\\\delta_normalized/////
3
\\\\\allowed/////
FORM
*
3
\\\\\allowed/////
FUNCTION
*
3
\\\\\allowed/////
MODULE
**
3
\\\\\allowed/////
REPORT
*
3
\\\\\allowed/////
PROGRAM
*
3
\\\\\allowed/////
FUNCTION-POOL
*
4
\\\\\allowed/////
CLASS
*
DEFINITION
4
\\\\\allowed/////
CLASS
*
IMPLEMENTATION
5
\\\\\forbidden/////
CLASS
*
DEFINITION
DEFERRED
5
\\\\\forbidden/////
CLASS
*
DEFINITION
LOAD
6
\\\\\forbidden/////
CLASS
*
DEFINITION
LOCAL

FRIENDS
3
\\\\\allowed/////
AT
LINE-SELECTION
3
\\\\\allowed/////
AT
USER-COMMAND
4
\\\\\allowed/////
AT
SELECTION-SCREEN
**
3
\\\\\allowed/////
AT
PF*
2
\\\\\allowed/////
INITIALIZATION
2
\\\\\allowed/////
START-OF-SELECTION
2
\\\\\allowed/////
END-OF-SELECTION
3
\\\\\allowed/////
TOP-OF-PAGE
**
2
\\\\\allowed/////
END-OF-PAGE
3
\\\\\allowed/////
GET
**
3
\\\\\forbidden/////
GET
BADI
3
\\\\\forbidden/////
GET
BIT
3
\\\\\forbidden/////
GET
CONNECTION
3
\\\\\forbidden/////
GET
CURSOR
3
\\\\\forbidden/////
GET
DATASET
3
\\\\\forbidden/////

GET
LOCALE
3
\\\\\forbidden/////
GET
PARAMETER
3
\\\\\forbidden/////
GET
PF-STATUS
3
\\\\\forbidden/////
GET
PROPERTY
3
\\\\\forbidden/////
GET
REFERENCE
3
\\\\\forbidden/////
GET
RUN
3
\\\\\forbidden/////
GET
TIME
1
2
FORM
XEK08RN_CR_AUFBAUEN
2
38
5
READ TABLE XEK08RN_WA

WITH KEY KEY = LD_KEY_EK08RN BINA


RY SEARCH.

* If no entries found, LD_F_CURR_TBL wil


l not be filled with ML-Data

CLEAR LD_F_CURR_TBL.

COMPNR = 2.
"K029929

1
DO 4 TIMES.
"K029929

1
DO 5 TIMES.
"N980402

63
4
LD_EK08RN_CR_TBL-WAERS = LD_F_CURR-W
AERS.

Werte abloopen und bertragen

COMPNR = 2.
"K029929

1
DO 4 TIMES

1
DO 5 TIMES
"N980402

LIMU
REPS
LEINRF4G
00001
LIMU
REPS
LEINRF4G
00003
36
1
\\\\\no_empty_blocks/////
1
\\\\\comments_not_ignored/////
1
\\\\\delta_normalized/////
3
\\\\\allowed/////
FORM
*
3
\\\\\allowed/////
FUNCTION
*
3
\\\\\allowed/////
MODULE
**
3
\\\\\allowed/////
REPORT
*
3
\\\\\allowed/////
PROGRAM
*
3
\\\\\allowed/////
FUNCTION-POOL
*
4
\\\\\allowed/////
CLASS

*
DEFINITION
4
\\\\\allowed/////
CLASS
*
IMPLEMENTATION
5
\\\\\forbidden/////
CLASS
*
DEFINITION
DEFERRED
5
\\\\\forbidden/////
CLASS
*
DEFINITION
LOAD
6
\\\\\forbidden/////
CLASS
*
DEFINITION
LOCAL
FRIENDS
3
\\\\\allowed/////
AT
LINE-SELECTION
3
\\\\\allowed/////
AT
USER-COMMAND
4
\\\\\allowed/////
AT
SELECTION-SCREEN
**
3
\\\\\allowed/////
AT
PF*
2
\\\\\allowed/////
INITIALIZATION
2
\\\\\allowed/////
START-OF-SELECTION
2
\\\\\allowed/////
END-OF-SELECTION
3
\\\\\allowed/////
TOP-OF-PAGE
**
2
\\\\\allowed/////
END-OF-PAGE
3

\\\\\allowed/////
GET
**
3
\\\\\forbidden/////
GET
BADI
3
\\\\\forbidden/////
GET
BIT
3
\\\\\forbidden/////
GET
CONNECTION
3
\\\\\forbidden/////
GET
CURSOR
3
\\\\\forbidden/////
GET
DATASET
3
\\\\\forbidden/////
GET
LOCALE
3
\\\\\forbidden/////
GET
PARAMETER
3
\\\\\forbidden/////
GET
PF-STATUS
3
\\\\\forbidden/////
GET
PROPERTY
3
\\\\\forbidden/////
GET
REFERENCE
3
\\\\\forbidden/////
GET
RUN
3
\\\\\forbidden/////
GET
TIME
1
2
FORM
XEK08BN_CR_ERGAENZEN
2
48
3
LD_XEK08BN_CR-REWRT = XEK08BN-REWWR.

LD_XEK08BN_CR-WEWRT = XEK08BN-WEWWR.

LD_XEK08BN_CR-KSCHL = XEK08BN-KSCHL.

1
APPEND LD_XEK08BN_CR TO R_XEK08BN_CR_T
BL.

2
ld_xek08bn_cr-kudif = 0.
"N980402

APPEND LD_XEK08BN_CR TO R_XEK08BN_CR_T


BL.

72
3
LD_XEK08BN_CR-REWRT = XEK08BN-REWRT.

LD_XEK08BN_CR-WEWRT = XEK08BN-WEWRT.

LD_XEK08BN_CR-KSCHL = XEK08BN-KSCHL.

1
APPEND LD_XEK08BN_CR TO R_XEK08BN_CR_T
BL.

2
ld_xek08bn_cr-kudif = xek08bn-kudif.
"N980402

APPEND LD_XEK08BN_CR TO R_XEK08BN_CR_T


BL.

LIMU
REPS
LEINRF4H
00001
LIMU
REPS
LEINRF4H
00003
36
1
\\\\\no_empty_blocks/////
1
\\\\\comments_not_ignored/////
1
\\\\\delta_normalized/////
3
\\\\\allowed/////
FORM
*
3
\\\\\allowed/////
FUNCTION
*
3

\\\\\allowed/////
MODULE
**
3
\\\\\allowed/////
REPORT
*
3
\\\\\allowed/////
PROGRAM
*
3
\\\\\allowed/////
FUNCTION-POOL
*
4
\\\\\allowed/////
CLASS
*
DEFINITION
4
\\\\\allowed/////
CLASS
*
IMPLEMENTATION
5
\\\\\forbidden/////
CLASS
*
DEFINITION
DEFERRED
5
\\\\\forbidden/////
CLASS
*
DEFINITION
LOAD
6
\\\\\forbidden/////
CLASS
*
DEFINITION
LOCAL
FRIENDS
3
\\\\\allowed/////
AT
LINE-SELECTION
3
\\\\\allowed/////
AT
USER-COMMAND
4
\\\\\allowed/////
AT
SELECTION-SCREEN
**
3
\\\\\allowed/////
AT

PF*
2
\\\\\allowed/////
INITIALIZATION
2
\\\\\allowed/////
START-OF-SELECTION
2
\\\\\allowed/////
END-OF-SELECTION
3
\\\\\allowed/////
TOP-OF-PAGE
**
2
\\\\\allowed/////
END-OF-PAGE
3
\\\\\allowed/////
GET
**
3
\\\\\forbidden/////
GET
BADI
3
\\\\\forbidden/////
GET
BIT
3
\\\\\forbidden/////
GET
CONNECTION
3
\\\\\forbidden/////
GET
CURSOR
3
\\\\\forbidden/////
GET
DATASET
3
\\\\\forbidden/////
GET
LOCALE
3
\\\\\forbidden/////
GET
PARAMETER
3
\\\\\forbidden/////
GET
PF-STATUS
3
\\\\\forbidden/////
GET
PROPERTY
3
\\\\\forbidden/////
GET

REFERENCE
3
\\\\\forbidden/////
GET
RUN
3
\\\\\forbidden/////
GET
TIME
1
2
FORM
XEK08BN_CR_AUFBAUEN
2
38
5
READ TABLE XEK08BN_WA

WITH KEY KEY = LD_KEY_EK08BN BINA


RY SEARCH.

* If no entries found, LD_F_CURR_TBL wil


l not be filled with ML-Data

CLEAR LD_F_CURR_TBL.

COMPNR = 2.
"K029929

1
DO 4 TIMES.
"K029929

DO 5 TIMES.
"N980402

78
3
CHECK SY-SUBRC EQ 0.

LD_MASK_CURR = LD_CURR-WERT.

ENDDO.

Zusatzinfo-Felder (Nicht-Key-Felder)

13

* Begin N980402

* Transfer exchange rate difference outsid


e of DO loop

* because there is a character field in be


tween.

ASSIGN COMPONENT 6 OF STRUCTURE xek0


8bn_wa TO <tab>.

ld_mask_tbl = <tab>.

READ TABLE ld_mask_tbl INTO ld_curr


INDEX ld_tabix.

IF sy-subrc EQ 0.

ld_ek08bn_cr_tbl-kudif = ld_curr-w
ert.

ENDIF.

* End N980402

Zusatzinfo-Felder (Nicht-Key-Felder)

LIMU
REPS
LEINRF50
00001
LIMU
REPS
LEINRF50
00003
36
1
\\\\\no_empty_blocks/////
1
\\\\\comments_ignored/////
1
\\\\\delta_normalized/////
3
\\\\\allowed/////
FORM
*
3
\\\\\allowed/////
FUNCTION
*
3
\\\\\allowed/////
MODULE
**
3
\\\\\allowed/////
REPORT
*
3
\\\\\allowed/////
PROGRAM
*

3
\\\\\allowed/////
FUNCTION-POOL
*
4
\\\\\allowed/////
CLASS
*
DEFINITION
4
\\\\\allowed/////
CLASS
*
IMPLEMENTATION
5
\\\\\forbidden/////
CLASS
*
DEFINITION
DEFERRED
5
\\\\\forbidden/////
CLASS
*
DEFINITION
LOAD
6
\\\\\forbidden/////
CLASS
*
DEFINITION
LOCAL
FRIENDS
3
\\\\\allowed/////
AT
LINE-SELECTION
3
\\\\\allowed/////
AT
USER-COMMAND
4
\\\\\allowed/////
AT
SELECTION-SCREEN
**
3
\\\\\allowed/////
AT
PF*
2
\\\\\allowed/////
INITIALIZATION
2
\\\\\allowed/////
START-OF-SELECTION
2
\\\\\allowed/////
END-OF-SELECTION
3

\\\\\allowed/////
TOP-OF-PAGE
**
2
\\\\\allowed/////
END-OF-PAGE
3
\\\\\allowed/////
GET
**
3
\\\\\forbidden/////
GET
BADI
3
\\\\\forbidden/////
GET
BIT
3
\\\\\forbidden/////
GET
CONNECTION
3
\\\\\forbidden/////
GET
CURSOR
3
\\\\\forbidden/////
GET
DATASET
3
\\\\\forbidden/////
GET
LOCALE
3
\\\\\forbidden/////
GET
PARAMETER
3
\\\\\forbidden/////
GET
PF-STATUS
3
\\\\\forbidden/////
GET
PROPERTY
3
\\\\\forbidden/////
GET
REFERENCE
3
\\\\\forbidden/////
GET
RUN
3
\\\\\forbidden/////
GET
TIME
1
2

FORM
BZT_WA_EINTRAG_BEREITEN
5
15
4
DATA:

LD_EKBZ_CR
CR_TBL,

TYPE LINE OF TY_EKBZ_

LD_DMBTR

TYPE MLCR_CURR,

LD_AREWR

TYPE MLCR_CURR,

LD_REEWR

TYPE MLCR_CURR.

LD_REEWR

TYPE MLCR_CURR,

ld_kudif

TYPE mlcr_curr,
"N980402

ld_kudif_gr

TYPE mlcr_curr,
"N980402

ld_kudif_ir

TYPE mlcr_curr.
"N980402

LD_DMBTR-CURTP

24
3
= LD_EKBZ_CR-CURTP.

LD_REEWR-CURTP

= LD_EKBZ_CR-CURTP.

LD_AREWR-CURTP

= LD_EKBZ_CR-CURTP.

4
= ld_ekbz_cr-curtp.
"N980402

ld_kudif-curtp

ld_kudif_gr-curtp = ld_ekbz_cr-curtp.
"N980402

ld_kudif_ir-curtp = ld_ekbz_cr-curtp.
"N980402

LD_DMBTR-WAERS

29
3
= LD_EKBZ_CR-WAERS.

LD_REEWR-WAERS

= LD_EKBZ_CR-WAERS.

LD_AREWR-WAERS

= LD_EKBZ_CR-WAERS.

4
= ld_ekbz_cr-waers.
"N980402

ld_kudif-waers

ld_kudif_gr-waers = ld_ekbz_cr-waers.
"N980402

ld_kudif_ir-waers = ld_ekbz_cr-waers.
"N980402

LD_REEWR-WERT

35
3
= LD_EKBZ_CR-REEWR.

LD_AREWR-WERT

= LD_EKBZ_CR-AREWR.

4
*

Hinzufgen

APPEND LD_DMBTR TO R_BZT_WA-DMBTR.

APPEND LD_REEWR TO R_BZT_WA-REEWR.

APPEND LD_AREWR TO R_BZT_WA-AREWR.

29
* Begin N980402

* Exchange rate difference is transferred


only for a specified

* document in case of cancellation.

IF not gs_ekbe_key-belnr IS INITIAL


AND "Cancel IR

gs_ekbe_key-belnr = ld_ekbz_cr-beln
r AND

gs_ekbe_key-gjahr = ld_ekbz_cr-gjah
r OR

( gf_xstor = '2' OR gf_xstor = 'X'


) AND "Cancel GR

not gf_smbln IS INITIAL


AND

gf_smbln = ld_ekbz_cr-belnr

AND

gf_sjahr = ld_ekbz_cr-gjahr.

ld_kudif-wert

= ld_ekbz_cr-kudif.

ELSE.

CLEAR ld_kudif-wert.

ENDIF.

CASE ld_ekbz_cr-vgabe.

WHEN 1.

ld_kudif_gr-wert
udif.

= ld_ekbz_cr-k

WHEN 2 OR 3.

ld_kudif_ir-wert

= ld_ekbz_cr-k

udif.

ENDCASE.

* End N980402

Hinzufgen

APPEND LD_DMBTR TO R_BZT_WA-DMBTR.

APPEND LD_REEWR TO R_BZT_WA-REEWR.

APPEND LD_AREWR TO R_BZT_WA-AREWR.

APPEND ld_kudif TO r_bzt_wa-kudif.


"N980402

r.

APPEND ld_kudif_gr TO r_bzt_wa-kudif_g


"N980402

r.

APPEND ld_kudif_ir TO r_bzt_wa-kudif_i


"N980402

49
3
SORT R_BZT_WA-DMBTR BY CURTP.

SORT R_BZT_WA-REEWR BY CURTP.

SORT R_BZT_WA-AREWR BY CURTP.

1
ENDFORM.

5
SORT r_bzt_wa-kudif BY curtp.
"N980402

SORT r_bzt_wa-kudif_gr BY curtp.


"N980402

SORT r_bzt_wa-kudif_ir BY curtp.


"N980402

ENDFORM.

LIMU
REPS
LEINRF54
00001
LIMU
REPS
LEINRF54
00003
36
1
\\\\\no_empty_blocks/////
1
\\\\\comments_ignored/////
1
\\\\\delta_normalized/////
3
\\\\\allowed/////
FORM
*

3
\\\\\allowed/////
FUNCTION
*
3
\\\\\allowed/////
MODULE
**
3
\\\\\allowed/////
REPORT
*
3
\\\\\allowed/////
PROGRAM
*
3
\\\\\allowed/////
FUNCTION-POOL
*
4
\\\\\allowed/////
CLASS
*
DEFINITION
4
\\\\\allowed/////
CLASS
*
IMPLEMENTATION
5
\\\\\forbidden/////
CLASS
*
DEFINITION
DEFERRED
5
\\\\\forbidden/////
CLASS
*
DEFINITION
LOAD
6
\\\\\forbidden/////
CLASS
*
DEFINITION
LOCAL
FRIENDS
3
\\\\\allowed/////
AT
LINE-SELECTION
3
\\\\\allowed/////
AT
USER-COMMAND
4
\\\\\allowed/////
AT

SELECTION-SCREEN
**
3
\\\\\allowed/////
AT
PF*
2
\\\\\allowed/////
INITIALIZATION
2
\\\\\allowed/////
START-OF-SELECTION
2
\\\\\allowed/////
END-OF-SELECTION
3
\\\\\allowed/////
TOP-OF-PAGE
**
2
\\\\\allowed/////
END-OF-PAGE
3
\\\\\allowed/////
GET
**
3
\\\\\forbidden/////
GET
BADI
3
\\\\\forbidden/////
GET
BIT
3
\\\\\forbidden/////
GET
CONNECTION
3
\\\\\forbidden/////
GET
CURSOR
3
\\\\\forbidden/////
GET
DATASET
3
\\\\\forbidden/////
GET
LOCALE
3
\\\\\forbidden/////
GET
PARAMETER
3
\\\\\forbidden/////
GET
PF-STATUS
3
\\\\\forbidden/////

GET
PROPERTY
3
\\\\\forbidden/////
GET
REFERENCE
3
\\\\\forbidden/////
GET
RUN
3
\\\\\forbidden/////
GET
TIME
1
2
FORM
BET_WA_EINTRAG_BEREITEN
5
15
4
DATA:

LD_EKBE_CR
CR_TBL,

TYPE LINE OF TY_EKBE_

LD_DMBTR

TYPE MLCR_CURR,

LD_AREWR

TYPE MLCR_CURR,

LD_REEWR

TYPE MLCR_CURR.

LD_REEWR

TYPE MLCR_CURR,

ld_kudif

TYPE mlcr_curr,
"N980402

ld_kudif_gr

TYPE mlcr_curr,
"N980402

ld_kudif_ir

TYPE mlcr_curr.
"N980402

LD_DMBTR-CURTP

24
3
= LD_EKBE_CR-CURTP.

LD_REEWR-CURTP

= LD_EKBE_CR-CURTP.

LD_AREWR-CURTP

= LD_EKBE_CR-CURTP.

4
= ld_ekbe_cr-curtp.
"N980402

ld_kudif-curtp

ld_kudif_gr-curtp = ld_ekbe_cr-curtp.
"N980402

ld_kudif_ir-curtp = ld_ekbe_cr-curtp.
"N980402

LD_DMBTR-WAERS

29
3
= LD_EKBE_CR-WAERS.

LD_REEWR-WAERS

= LD_EKBE_CR-WAERS.

LD_AREWR-WAERS

= LD_EKBE_CR-WAERS.

4
= ld_ekbe_cr-waers.
"N980402

ld_kudif-waers

ld_kudif_gr-waers = ld_ekbe_cr-waers.
"N980402

ld_kudif_ir-waers = ld_ekbe_cr-waers.
"N980402

LD_REEWR-WERT

35
3
= LD_EKBE_CR-REEWR.

LD_AREWR-WERT

= LD_EKBE_CR-AREWR.

4
*

Hinzufgen

APPEND LD_DMBTR TO R_BET_WA-DMBTR.

APPEND LD_REEWR TO R_BET_WA-REEWR.

APPEND LD_AREWR TO R_BET_WA-AREWR.

32
* Begin N980402

* Exchange rate difference values from

* GR in kudif_gr, IR in kudif_in and cance


lled document in kudif.

IF ld_ekbe_cr-vgabe = '1'.

CLEAR: ld_kudif-wert, ld_kudif_ir-we


rt.

ld_kudif_gr-wert = ld_ekbe_cr-kudif.

IF ( gf_xstor = '2' OR gf_xstor = 'X


' ) AND

not gf_smbln IS INITIAL


AND

gf_smbln = ld_ekbe_cr-belnr
AND

gf_sjahr = ld_ekbe_cr-gjahr.

ld_kudif-wert = ld_ekbe_cr-kudif.

ENDIF.

ELSEIF ld_ekbe_cr-vgabe = '2' OR ld_ek


be_cr-vgabe = '3'.

CLEAR: ld_kudif-wert, ld_kudif_gr-we


rt.

ld_kudif_ir-wert = ld_ekbe_cr-kudif.

IF not gs_ekbe_key-belnr IS INITIAL


AND

gs_ekbe_key-belnr = ld_ekbe_cr-be
lnr AND

gs_ekbe_key-gjahr = ld_ekbe_cr-gj
ahr.

ld_kudif-wert = ld_ekbe_cr-kudif.

ENDIF.

ELSE.

CLEAR: ld_kudif-wert, ld_kudif_gr-we


rt, ld_kudif_ir-wert.

ENDIF.

* End N980402

Hinzufgen

APPEND LD_DMBTR TO R_BET_WA-DMBTR.

APPEND LD_REEWR TO R_BET_WA-REEWR.

APPEND LD_AREWR TO R_BET_WA-AREWR.

APPEND ld_kudif TO r_bet_wa-kudif.


"N980402

r.

APPEND ld_kudif_gr TO r_bet_wa-kudif_g


"N980402

r.

APPEND ld_kudif_ir TO r_bet_wa-kudif_i


"N980402

49
3
SORT R_BET_WA-DMBTR BY CURTP.

SORT R_BET_WA-REEWR BY CURTP.

SORT R_BET_WA-AREWR BY CURTP.

1
ENDFORM.

5
SORT r_bet_wa-kudif BY curtp.
"N980402

SORT r_bet_wa-kudif_gr BY curtp.


"N980402

SORT r_bet_wa-kudif_ir BY curtp.


"N980402

ENDFORM.

LIMU
REPS
LEINRF5D
00001
LIMU
REPS
LEINRF5D
00003
36
1
\\\\\no_empty_blocks/////
1
\\\\\comments_not_ignored/////
1
\\\\\delta_normalized/////
3
\\\\\allowed/////
FORM
*
3
\\\\\allowed/////
FUNCTION
*
3
\\\\\allowed/////
MODULE
**
3
\\\\\allowed/////
REPORT
*
3
\\\\\allowed/////
PROGRAM
*
3
\\\\\allowed/////
FUNCTION-POOL
*
4
\\\\\allowed/////
CLASS

*
DEFINITION
4
\\\\\allowed/////
CLASS
*
IMPLEMENTATION
5
\\\\\forbidden/////
CLASS
*
DEFINITION
DEFERRED
5
\\\\\forbidden/////
CLASS
*
DEFINITION
LOAD
6
\\\\\forbidden/////
CLASS
*
DEFINITION
LOCAL
FRIENDS
3
\\\\\allowed/////
AT
LINE-SELECTION
3
\\\\\allowed/////
AT
USER-COMMAND
4
\\\\\allowed/////
AT
SELECTION-SCREEN
**
3
\\\\\allowed/////
AT
PF*
2
\\\\\allowed/////
INITIALIZATION
2
\\\\\allowed/////
START-OF-SELECTION
2
\\\\\allowed/////
END-OF-SELECTION
3
\\\\\allowed/////
TOP-OF-PAGE
**
2
\\\\\allowed/////
END-OF-PAGE
3

\\\\\allowed/////
GET
**
3
\\\\\forbidden/////
GET
BADI
3
\\\\\forbidden/////
GET
BIT
3
\\\\\forbidden/////
GET
CONNECTION
3
\\\\\forbidden/////
GET
CURSOR
3
\\\\\forbidden/////
GET
DATASET
3
\\\\\forbidden/////
GET
LOCALE
3
\\\\\forbidden/////
GET
PARAMETER
3
\\\\\forbidden/////
GET
PF-STATUS
3
\\\\\forbidden/////
GET
PROPERTY
3
\\\\\forbidden/////
GET
REFERENCE
3
\\\\\forbidden/////
GET
RUN
3
\\\\\forbidden/////
GET
TIME
1
2
FORM
COLLECT_BETS_WA
1
40
6
PERFORM ADD_TO USING:

W1 = W1 + W2

BETS_WA-WEWRT

LD_BETS_WA-WEWRT,

BETS_WA-REWRT

LD_BETS_WA-REWRT,

BETS_WA-AREWR

LD_BETS_WA-AREWR,

BETS_WA-ANZAL

LD_BETS_WA-ANZAL,

BETS_WA-REEWR

LD_BETS_WA-REEWR.

BETS_WA-REEWR

LD_BETS_WA-REEWR,

BETS_WA-kudif_ir LD_BETS_WA-kudif_ir.
"N980402

LIMU
REPS
LEINRF5M
00002
LIMU
REPS
LEINRF5M
00004
36
1
\\\\\no_empty_blocks/////
1
\\\\\comments_not_ignored/////
1
\\\\\delta_normalized/////
3
\\\\\allowed/////
FORM
*
3
\\\\\allowed/////
FUNCTION
*
3
\\\\\allowed/////
MODULE
**
3
\\\\\allowed/////
REPORT
*
3
\\\\\allowed/////
PROGRAM
*
3
\\\\\allowed/////
FUNCTION-POOL
*
4
\\\\\allowed/////
CLASS
*
DEFINITION
4
\\\\\allowed/////
CLASS
*
IMPLEMENTATION

5
\\\\\forbidden/////
CLASS
*
DEFINITION
DEFERRED
5
\\\\\forbidden/////
CLASS
*
DEFINITION
LOAD
6
\\\\\forbidden/////
CLASS
*
DEFINITION
LOCAL
FRIENDS
3
\\\\\allowed/////
AT
LINE-SELECTION
3
\\\\\allowed/////
AT
USER-COMMAND
4
\\\\\allowed/////
AT
SELECTION-SCREEN
**
3
\\\\\allowed/////
AT
PF*
2
\\\\\allowed/////
INITIALIZATION
2
\\\\\allowed/////
START-OF-SELECTION
2
\\\\\allowed/////
END-OF-SELECTION
3
\\\\\allowed/////
TOP-OF-PAGE
**
2
\\\\\allowed/////
END-OF-PAGE
3
\\\\\allowed/////
GET
**
3
\\\\\forbidden/////
GET
BADI

3
\\\\\forbidden/////
GET
BIT
3
\\\\\forbidden/////
GET
CONNECTION
3
\\\\\forbidden/////
GET
CURSOR
3
\\\\\forbidden/////
GET
DATASET
3
\\\\\forbidden/////
GET
LOCALE
3
\\\\\forbidden/////
GET
PARAMETER
3
\\\\\forbidden/////
GET
PF-STATUS
3
\\\\\forbidden/////
GET
PROPERTY
3
\\\\\forbidden/////
GET
REFERENCE
3
\\\\\forbidden/////
GET
RUN
3
\\\\\forbidden/////
GET
TIME
1
2
FORM
CONV_TO_LOCAL_CURRENCY
1
23
3
PERFORM buchungskreis_lesen USING potbukrs.

ENDIF.

IF ekko-waers ne t001-waers.

1
IF ekko-kufix ne space.

1
IF ekko-kufix ne space AND t169p-kdhw
IS INITIAL.
"N980402

LIMU
REPS
LEINRTOP
00001
LIMU
REPS
LEINRTOP
00003
36
1
\\\\\no_empty_blocks/////
1
\\\\\comments_not_ignored/////
1
\\\\\delta_normalized/////
3
\\\\\allowed/////
FORM
*
3
\\\\\allowed/////
FUNCTION
*
3

\\\\\allowed/////
MODULE
**
3
\\\\\allowed/////
REPORT
*
3
\\\\\allowed/////
PROGRAM
*
3
\\\\\allowed/////
FUNCTION-POOL
*
4
\\\\\allowed/////
CLASS
*
DEFINITION
4
\\\\\allowed/////
CLASS
*
IMPLEMENTATION
5
\\\\\forbidden/////
CLASS
*
DEFINITION
DEFERRED
5
\\\\\forbidden/////
CLASS
*
DEFINITION
LOAD
6
\\\\\forbidden/////
CLASS
*
DEFINITION
LOCAL
FRIENDS
3
\\\\\allowed/////
AT
LINE-SELECTION
3
\\\\\allowed/////
AT
USER-COMMAND
4
\\\\\allowed/////
AT
SELECTION-SCREEN
**
3
\\\\\allowed/////
AT

PF*
2
\\\\\allowed/////
INITIALIZATION
2
\\\\\allowed/////
START-OF-SELECTION
2
\\\\\allowed/////
END-OF-SELECTION
3
\\\\\allowed/////
TOP-OF-PAGE
**
2
\\\\\allowed/////
END-OF-PAGE
3
\\\\\allowed/////
GET
**
3
\\\\\forbidden/////
GET
BADI
3
\\\\\forbidden/////
GET
BIT
3
\\\\\forbidden/////
GET
CONNECTION
3
\\\\\forbidden/////
GET
CURSOR
3
\\\\\forbidden/////
GET
DATASET
3
\\\\\forbidden/////
GET
LOCALE
3
\\\\\forbidden/////
GET
PARAMETER
3
\\\\\forbidden/////
GET
PF-STATUS
3
\\\\\forbidden/////
GET
PROPERTY
3
\\\\\forbidden/////
GET

REFERENCE
3
\\\\\forbidden/////
GET
RUN
3
\\\\\forbidden/////
GET
TIME
1
2
FUNCTION-POOL
EINR
3
23
3
t160b,

t160s,

t161v,

t161w,

t163b,

t163k,

1
t052,

2
t169p,
"N980402

t052,

79
3
END OF vrt.

DATA: zaehlsel TYPE p,


ehler Selektierte Pos

zaehlall TYPE p.
ehler Positionen

zaehlall TYPE p,
ehler Positionen

"Za

1
"Za

2
"Za

zaehlsto TYPE p.
"Counter selec
ted cancel document N980402

100
3
DATA: h_betz_wemng(10) TYPE p DECIMALS 3.
"TK 4.5A

DATA: h_bets_bpmng(10) TYPE p DECIMALS 3.


"TK 4.5A

DATA: h_betz_bpmng(10) TYPE p DECIMALS 3.


"TK 4.5A

5
DATA: gs_ekbe_key TYPE ekbe_key_document,
"N980402

gf_xstor TYPE kzsto,


"N980402

gf_smbln TYPE mblnr,


"N980402

gf_sjahr TYPE mjahr.


"N980402

LIMU
REPS
LGNB8F03
00001

LIMU
REPS
LGNB8F03
00003
36
1
\\\\\no_empty_blocks/////
1
\\\\\comments_ignored/////
1
\\\\\delta_normalized/////
3
\\\\\allowed/////
FORM
*
3
\\\\\allowed/////
FUNCTION
*
3
\\\\\allowed/////
MODULE
**
3
\\\\\allowed/////
REPORT
*
3
\\\\\allowed/////
PROGRAM
*
3
\\\\\allowed/////
FUNCTION-POOL
*
4
\\\\\allowed/////
CLASS
*
DEFINITION
4
\\\\\allowed/////
CLASS
*
IMPLEMENTATION
5
\\\\\forbidden/////
CLASS
*
DEFINITION
DEFERRED
5
\\\\\forbidden/////
CLASS
*

DEFINITION
LOAD
6
\\\\\forbidden/////
CLASS
*
DEFINITION
LOCAL
FRIENDS
3
\\\\\allowed/////
AT
LINE-SELECTION
3
\\\\\allowed/////
AT
USER-COMMAND
4
\\\\\allowed/////
AT
SELECTION-SCREEN
**
3
\\\\\allowed/////
AT
PF*
2
\\\\\allowed/////
INITIALIZATION
2
\\\\\allowed/////
START-OF-SELECTION
2
\\\\\allowed/////
END-OF-SELECTION
3
\\\\\allowed/////
TOP-OF-PAGE
**
2
\\\\\allowed/////
END-OF-PAGE
3
\\\\\allowed/////
GET
**
3
\\\\\forbidden/////
GET
BADI
3
\\\\\forbidden/////
GET
BIT
3
\\\\\forbidden/////
GET
CONNECTION
3
\\\\\forbidden/////

GET
CURSOR
3
\\\\\forbidden/////
GET
DATASET
3
\\\\\forbidden/////
GET
LOCALE
3
\\\\\forbidden/////
GET
PARAMETER
3
\\\\\forbidden/////
GET
PF-STATUS
3
\\\\\forbidden/////
GET
PROPERTY
3
\\\\\forbidden/////
GET
REFERENCE
3
\\\\\forbidden/////
GET
RUN
3
\\\\\forbidden/////
GET
TIME
9
2
FORM
BESTAND_PRD_BUCHUNG_N
3
36
3
prdif = i_sgnbu-dmbtr - vwere - krdi
f.

ELSEIF lmeng <= lbkum.

*------- Bestand noch voll am Lager ---------------------------------*

1
bestd = i_sgnbu-dmbtr - vwere.

2
IF gf_kdm_active = ' '.
"N980402

bestd = i_sgnbu-dmbtr - vwere.

41
3
IF ( i_sgnbu-vprsv = vprsv-v ) AND (
i_sgnbu-mlmaa IS INITIAL ).

krdif = 0.

ENDIF.

3
ELSE.

*------- Bestand nicht mehr voll am Lager


----------------------------*

7
ELSE.
"N980402

bestd = i_sgnbu-dmbtr - vwere - kr


"N980402

dif.

ENDIF.
"N980402

ELSE.

*------- Bestand nicht mehr voll am Lager


----------------------------*

IF gf_kdm_active = ' '.


"N980402

51
3
IF ( i_sgnbu-vprsv = vprsv-v ) AND (
i_sgnbu-mlmaa IS INITIAL ).

krdif = betrag.

ENDIF.

1
ENDIF.

6
ELSE.
"N980402

krdif )

bestd = ( i_sgnbu-dmbtr - vwere "N980402

* lbkum / lmeng.
"N980402

prdif = i_sgnbu-dmbtr - vwere - be


std - krdif.
"N980402

ENDIF.
"N980402

ENDIF.

2
FORM
FELDER_INIT
2
12
5
CLEAR: vwere, shvwere, bestd, shbestd, b
estv, shbestv,

einkk, sheinkk, bestu, shbestu, u


mdif, shumdif,

einkg, sheinkg, prdif, shprdif, b


estg, shbestg,

krdif, shkrdif, verbr, shverbr, f


remd, shfremd,

kredt, shkredt, aufum, shaufum, c


odif, shcodif,

1
laufende_periode_fix.

1
laufende_periode_fix, gf_kdm_acti
"N980402

ve.

50
7
CALL FUNCTION 'T001K_SINGLE_READ'

EXPORTING

bwkey = i_sgnbu-bwkey

IMPORTING

wt001k = t001k.

ENDIF.

ENDIF.

ENDFORM.

"FELDER_INIT

25

* Begin N980402

* Nachsehen, ob Kursdifferenzen gegen eine


n vorgegebenen Plankurs

* berechnet werden sollen:

IF i_sgnbu-bukrs NE t169p-bukrs.

CALL FUNCTION 'MRM_DBTAB_T169P_READ'

EXPORTING

i_bukrs

= i_sgnbu-bukrs

i_buffer_on = 'X'

IMPORTING

e_t169p

ENDIF.

= t169p.

* Separate KDM lines

e_t169p = t169p.

IF i_sgnbu-curtp = '10' AND t169p-kdhw =


'X'.

gf_kdm_active = 'X'.

ELSEIF i_sgnbu-curtp = t169p-ctml1 AND t


169p-kdml1 = 'X'.

gf_kdm_active = 'X'.

ELSEIF i_sgnbu-curtp = t169p-ctml2 AND t


169p-kdml2 = 'X'.

gf_kdm_active = 'X'.

ENDIF.

* End N980402

ENDFORM.

"FELDER_INIT

2
FORM
KURSDIFFERENZ_STORNO_N
5
13
3
FORM kursdifferenz_storno_n.

DATA: pl_dmbtr LIKE sgnbu-dmbtr.

3
*------- Kursdifferenz nicht bei fixiertem
Kurs in der Bestellung ----*

aber nur relevant in Hauswhrung


*

IF i_sgnbu-curtp = '10'.

13
* Begin N980402

DATA: menge_re TYPE f,

menge_we TYPE f,

menge_we_open TYPE f,

krdif_faktor_re TYPE sgnbu-kudif,

krdif_faktor_we TYPE sgnbu-kudif,

f_kdm1 LIKE bseg-dmbtr,

f_kdm2 LIKE bseg-dmbtr.

* End N980402

*------- Kursdifferenz nicht bei fixiertem


Kurs in der Bestellung ----*

aber nur relevant in Hauswhrung


*

IF i_sgnbu-curtp = '10' AND gf_kdm_activ


e = ' '.
"N980402

19
3
CHECK: i_sgnbu-kufix IS INITIAL.

ENDIF.

2
*------- Kursdifferenz nicht bei geplanten
Bezugsnebenkosten -------*

CHECK: i_sgnbu-xekbz IS INITIAL.

4
IF gf_kdm_active = ' '.
"N980402

*------- Kursdifferenz nicht bei geplanten


Bezugsnebenkosten -------*

CHECK: i_sgnbu-xekbz IS INITIAL.

ENDIF.
"N980402

32
7
CALL FUNCTION 'MRM_DBTAB_T169P_READ'

EXPORTING

i_bukrs

= i_sgnbu-bukrs

i_buffer_on = 'X'

IMPORTING

e_t169p

= t169p.

ENDIF.

1
CASE t169p-xplcu.

IF gf_kdm_active = ' '.


"N980402

CASE t169p-xplcu.

42
3
CHECK: i_sgnbu-waers NE i_sgnbu-pwae
r,

i_sgnbu-waers = i_sgnbu-bwae
r,

i_sgnbu-rewwr NE 0.

1
IF i_sgnbu-curtp = '10'.

IF i_sgnbu-curtp = '10'.

105
4
WHEN 'N'.

* Grundstzlich keine Kursdifferenzen

krdif = 0.

ENDCASE.

2
*Ende Einschub "uw

146
* Begin N980402

ELSE.

* Cancellation: Use currency difference va


lue from original document

IF i_sgnbu-ivtyp = c_ivtyp_storno.

krdif = i_sgnbu-kudif.

ELSE.

CHECK: i_sgnbu-waers NE i_sgnbu-pwae


r,

i_sgnbu-waers = i_sgnbu-bwae
r,

i_sgnbu-wewwr NE 0,

i_sgnbu-rewwr NE 0.

IF i_sgnbu-curtp = '10'.

CALL FUNCTION 'CONVERT_TO_LOCAL_CU


RRENCY'

EXPORTING

foreign_amount

= i_sgnbu-wrb

tr

foreign_currency = i_sgnbu-wae
rs

local_currency

= i_sgnbu-pwa

rate

= i_sgnbu-kur

date

= i_sgnbu-rep

er

sf

dat

IMPORTING

local_amount

= rewrt.

ELSE.

* In anderen als der lokalen Whrung mu d


er Kurstyp geholt werden

READ TABLE t_currencies WITH KEY b


ukrs = i_sgnbu-bukrs

c
urtp = i_sgnbu-curtp.

IF sy-subrc = 0.

CALL FUNCTION 'CONVERT_TO_LOCAL_


CURRENCY'

EXPORTING

foreign_amount

= i_sgnbu-w

rbtr

foreign_currency = i_sgnbu-w
aers

local_currency

= i_sgnbu-p

type_of_rate

= t_currenc

date

= i_sgnbu-r

waer

ies-kurst

epdat

IMPORTING

local_amount

ENDIF.

ENDIF.

= rewrt.

menge_re = i_sgnbu-remng - i_sgnbu-w


emng.

menge_we = i_sgnbu-wemng.

menge_we_open = menge_re - i_sgnbu-m


enge.

menge_we_open = ABS( menge_we_open )


.

krdif_faktor_re = i_sgnbu-rewrt / i_
sgnbu-rewwr.

krdif_faktor_we = i_sgnbu-wewrt / i_
sgnbu-wewwr.

IF NOT i_sgnbu-tbtkz IS INITIAL.

IF i_sgnbu-menge <= i_sgnbu-wemng.

krdif = rewrt - ( i_sgnbu-wrbtr


*

( krdif_faktor_we ) ).

f_kdm1 = rewrt - ( i_sgnbu-wrbtr


*

( i_sgnbu-wewrt / i_sgnb
u-wewwr ) ).

f_kdm2 = rewrt - i_sgnbu-wrbtr *


i_sgnbu-wewrt / i_sgnbu-wewwr.

IF f_kdm1 = 0 OR f_kdm2 = 0.

krdif = 0.

ENDIF.

ELSE.

krdif = ( i_sgnbu-dmbtr * ( i_sg


nbu-wemng /

i_sgnbu-menge ) ) -

( i_sgnbu-wrbtr *

( krdif_faktor_we ) ) *

( i_sgnbu-wemng / i_sgnb
u-menge ).

f_kdm1 = ( i_sgnbu-dmbtr * ( i_s


gnbu-wemng /

i_sgnbu-menge ) ) -

( i_sgnbu-wrbtr *

( i_sgnbu-wewrt / i_sgnb
u-wewwr ) ) *

( i_sgnbu-wemng / i_sgnb
u-menge ).

f_kdm2 = ( i_sgnbu-dmbtr * ( i_s


gnbu-wemng /

i_sgnbu-menge ) ) -

( i_sgnbu-wrbtr * i_sgnb
u-wewrt / i_sgnbu-wewwr ) *

( i_sgnbu-wemng / i_sgnb
u-menge ).

IF f_kdm1 = 0 OR f_kdm2 = 0.

krdif = 0.

ENDIF.

ENDIF.

ELSE.

* Case invoice surplus

IF menge_re > 0 AND i_sgnbu-weunb


EQ space.

* Case 1: Quantity only in invoice surplus

IF i_sgnbu-menge <= menge_re.

krdif = ( rewrt * ( re_we_meng


e / i_sgnbu-menge ) ) -

( ( i_sgnbu-wrbtr * (
krdif_faktor_re ) ) *

( re_we_menge / i_sgnb
u-menge ) ).

f_kdm1 = ( rewrt * ( re_we_men


ge / i_sgnbu-menge ) ) -

( ( i_sgnbu-wrbtr * (
i_sgnbu-rewrt / i_sgnbu-rewwr ) ) *

( re_we_menge / i_sgnb
u-menge ) ).

f_kdm2 = ( rewrt * ( re_we_men


ge / i_sgnbu-menge ) ) -

( ( i_sgnbu-wrbtr * i_
sgnbu-rewrt / i_sgnbu-rewwr ) *

( re_we_menge / i_sgnb
u-menge ) ).

IF f_kdm1 = 0 OR f_kdm2 = 0.

krdif = 0.

ENDIF.

ELSE.

* Case 2: Quantity larger than invoice sur


plus

*
krdif (total) = krdif (invoice)
+ krdif (goods receipt)

krdif = ( ( rewrt * ( re_we_me


nge / i_sgnbu-menge ) ) -

( ( i_sgnbu-wrbtr *

( krdif_faktor_re ) )
*

( menge_re / i_sgnbu-m
enge ) ) ) +

( ( rewrt * ( menge_we
_open / i_sgnbu-menge ) ) -

( i_sgnbu-wrbtr *

( menge_we_open / i
_sgnbu-menge ) ) *

( krdif_faktor_we ) )
.

f_kdm1 = ( ( rewrt * ( re_we_m


enge / i_sgnbu-menge ) ) -

( ( i_sgnbu-wrbtr * (
i_sgnbu-rewrt / i_sgnbu-rewwr ) ) *

( menge_re / i_sgnbu-m
enge ) ) ) +

( ( rewrt * ( menge_we
_open / i_sgnbu-menge ) ) -

( i_sgnbu-wrbtr *

( menge_we_open / i

_sgnbu-menge ) ) *

( i_sgnbu-wewrt / i_s
gnbu-wewwr ) ).

f_kdm2 = ( ( rewrt * ( re_we_m


enge / i_sgnbu-menge ) ) -

( ( i_sgnbu-wrbtr * i_
sgnbu-rewrt / i_sgnbu-rewwr ) *

( menge_re / i_sgnbu-m
enge ) ) ) +

( ( rewrt * ( menge_we
_open / i_sgnbu-menge ) ) -

( i_sgnbu-wrbtr *

( menge_we_open / i
_sgnbu-menge ) ) *

( i_sgnbu-wewrt / i_s
gnbu-wewwr ) ).

IF f_kdm1 = 0 OR f_kdm2 = 0.

krdif = 0.

ENDIF.

ENDIF.

ELSE.

* Case delivery surplus

krdif = rewrt - ( i_sgnbu-wrbtr


* ( krdif_faktor_we ) ).

f_kdm1 = rewrt - i_sgnbu-wrbtr *


i_sgnbu-wewrt / i_sgnbu-wewwr.

f_kdm2 = rewrt - i_sgnbu-wrbtr *


( i_sgnbu-wewrt / i_sgnbu-wewwr ).

IF f_kdm1 = 0 OR f_kdm2 = 0.

krdif = 0.

ENDIF.

ENDIF.

ENDIF.

ENDIF.

ENDIF.

*End N980402

2
FORM
KURSDIFFERENZ_ZUGANG_N
2
14
3
FORM kursdifferenz_zugang_n.

DATA: pl_dmbtr LIKE sgnbu-dmbtr.

3
*------- Kursdifferenz nicht bei geplanten
Bezugsnebenkosten -------*

CHECK: i_sgnbu-xekbz IS INITIAL.

CLEAR krdif.

11
DATA: menge_we TYPE f,
"N980402

menge_re TYPE f,
"N980402

betrag_we TYPE sgnbu-wewwr.


"N980402

*------- Kursdifferenz nicht bei geplanten


Bezugsnebenkosten -------*

IF gf_kdm_active = ' '.


"N980402

CHECK: i_sgnbu-xekbz IS INITIAL.

ENDIF.
"N980402

CLEAR krdif.

IF gf_kdm_active = ' '.


"N980402

111
4
WHEN 'N'.

Grundstzlich keine Kursdifferenzen

krdif = 0.

ENDCASE.

ENDFORM.
_ZUGANG_N

1
"KURSDIFFERENZ

83

* Begin N980402

ELSE.

* New calculation logic for exchange rate


differences from customizing

* settings in transaction OMRW

IF i_sgnbu-ivtyp = c_ivtyp_storno.

* Cancellation: Use currency difference va


lue from original document

krdif = i_sgnbu-kudif.

ELSE.

* Exchange rate differences for every curr


ency, which is not invoice

* currency

CHECK: i_sgnbu-waers NE i_sgnbu-pwae


r.

* but only, if invoice currency = PO curre


ncy

CHECK i_sgnbu-waers = i_sgnbu-bwae


r.

* and a quantity is delivered already

CHECK i_sgnbu-wewwr > 0.

* If the goods receipt quantity has been f


ully invoiced

* -> no exchange rate

* Is there any goods receipt quantity open


( not for

* subsequent debit )?

IF i_sgnbu-tbtkz EQ space.

CHECK: we_re_menge > 0.

ENDIF.

IF i_sgnbu-curtp = '10'.

CALL FUNCTION 'CONVERT_TO_LOCAL_CU


RRENCY'

EXPORTING

foreign_amount

= i_sgnbu-wrb

tr

foreign_currency = i_sgnbu-wae
rs

local_currency

= i_sgnbu-pwa

er

rate

= i_sgnbu-kur

date

= i_sgnbu-rep

sf

dat

IMPORTING

local_amount

= wewrt.

ELSE.

* In other than local currency the exchang


e rate type has to be fetched

READ TABLE t_currencies WITH KEY b


ukrs = i_sgnbu-bukrs

c
urtp = i_sgnbu-curtp.

IF sy-subrc = 0.

CALL FUNCTION 'CONVERT_TO_LOCAL_


CURRENCY'

EXPORTING

foreign_amount

= i_sgnbu-w

rbtr

foreign_currency = i_sgnbu-w
aers

local_currency

= i_sgnbu-p

type_of_rate

= t_currenc

date

= i_sgnbu-r

waer

ies-kurst

epdat

IMPORTING

local_amount

= wewrt.

ENDIF.

ENDIF.

* Calculation of the exchange rate

menge_re = i_sgnbu-menge + i_sgnbu-r


emng.

menge_we = i_sgnbu-wemng.

IF NOT i_sgnbu-tbtkz IS INITIAL.

IF i_sgnbu-menge <= menge_we.

krdif = wewrt - ( i_sgnbu-wrbtr


*

( i_sgnbu-wewrt / i_
sgnbu-wewwr ) ).

ELSE.

krdif = wewrt * ( i_sgnbu-wemng


/ i_sgnbu-menge )

- ( i_sgnbu-wrbtr *

( i_sgnbu-wewrt / i_
sgnbu-wewwr ) ) *

( i_sgnbu-wemng / i_
sgnbu-menge ).

ENDIF.

ELSE.

* Case 1: Invoice quantity in the range of


delivered quantity

IF menge_re <= menge_we.

krdif = wewrt - ( i_sgnbu-wrbtr


*

( i_sgnbu-wewrt / i_sgnb
u-wewwr ) ).

ELSE.

krdif = wewrt * ( we_re_menge /


i_sgnbu-menge ) -

( i_sgnbu-wrbtr *

( i_sgnbu-wewrt / i_sgnbuwewwr ) ) *

( we_re_menge / i_sgnbu-me
nge ).

ENDIF.

ENDIF.

ENDIF.

ENDIF.

* End N980402

ENDFORM.
_ZUGANG_N

"KURSDIFFERENZ

2
FORM
PRDIF_KRDIF_VERRECHNEN
1
26
3
ENDIF.

* Verrechnung nur durchfhren, wenn KDM ni


cht gegen Plankurs gerechnet

CHECK t169p-xplcu NE 'X'.

2
CHECK gf_kdm_active NE 'X'.
"N980402

2
FORM
RE_STORNO_N
1
17
4
IF i_sgnbu-tbtkz EQ space.

*------- WE/RE Buchung ----------------------------------------------*

PERFORM vwere_stornobetrag_n.

*------- Menge geht in RE-Unterschuss -------------------------------*

IF i_sgnbu-menge > re_we_menge.

2
*------- Menge geht in RE-Unterschuss -------------------------------*

IF i_sgnbu-menge > re_we_menge.

2
FORM
RE_STORNO_KONTIERT_N
1
48
4
ENDIF.

verbr = i_sgnbu-dmbtr - vwere.

ENDIF.

ENDFORM.
TIERT_N

1
"RE_STORNO_KON

5
IF gf_kdm_active = 'X'.
"N980402

verbr = i_sgnbu-dmbtr - vwere - krdif.


"N980402

ENDIF.
"N980402

ENDFORM.
TIERT_N

"RE_STORNO_KON

2
FORM
RE_ZUGANG_N
1
52
4
vwere = i_sgnbu-dmbtr

* ( i_sgnbu-menge - i_sgnbu-we
mng ) / i_sgnbu-menge.

ENDIF.

ENDIF.

*------- Folgebuchung bei Lagermaterial mi


t Preissteuerung 'V' -------*

IF ( i_sgnbu-vprsv = vprsv-v ) AND ( i_s


gnbu-mlmaa IS INITIAL ).

2
*------- Folgebuchung bei Lagermaterial mi
t Preissteuerung 'V' -------*

IF ( i_sgnbu-vprsv = vprsv-v ) AND ( i_s


gnbu-mlmaa IS INITIAL ).

2
FORM
RE_ZUGANG_KONTIERT_N
1
78
4
ENDIF.

verbr = i_sgnbu-dmbtr - vwere.

ENDIF.

1
"RE_ZUGANG_KON

ENDFORM.
TIERT_N

5
IF gf_kdm_active = 'X'.
"N980402

verbr = i_sgnbu-dmbtr - vwere - krdif.


"N980402

ENDIF.
"N980402

ENDFORM.
TIERT_N

LIMU
REPS

"RE_ZUGANG_KON

LGNB8F04
00002
LIMU
REPS
LGNB8F04
00004
36
1
\\\\\no_empty_blocks/////
1
\\\\\comments_not_ignored/////
1
\\\\\delta_normalized/////
3
\\\\\allowed/////
FORM
*
3
\\\\\allowed/////
FUNCTION
*
3
\\\\\allowed/////
MODULE
**
3
\\\\\allowed/////
REPORT
*
3
\\\\\allowed/////
PROGRAM
*
3
\\\\\allowed/////
FUNCTION-POOL
*
4
\\\\\allowed/////
CLASS
*
DEFINITION
4
\\\\\allowed/////
CLASS
*
IMPLEMENTATION
5
\\\\\forbidden/////
CLASS
*
DEFINITION

DEFERRED
5
\\\\\forbidden/////
CLASS
*
DEFINITION
LOAD
6
\\\\\forbidden/////
CLASS
*
DEFINITION
LOCAL
FRIENDS
3
\\\\\allowed/////
AT
LINE-SELECTION
3
\\\\\allowed/////
AT
USER-COMMAND
4
\\\\\allowed/////
AT
SELECTION-SCREEN
**
3
\\\\\allowed/////
AT
PF*
2
\\\\\allowed/////
INITIALIZATION
2
\\\\\allowed/////
START-OF-SELECTION
2
\\\\\allowed/////
END-OF-SELECTION
3
\\\\\allowed/////
TOP-OF-PAGE
**
2
\\\\\allowed/////
END-OF-PAGE
3
\\\\\allowed/////
GET
**
3
\\\\\forbidden/////
GET
BADI
3
\\\\\forbidden/////
GET
BIT
3

\\\\\forbidden/////
GET
CONNECTION
3
\\\\\forbidden/////
GET
CURSOR
3
\\\\\forbidden/////
GET
DATASET
3
\\\\\forbidden/////
GET
LOCALE
3
\\\\\forbidden/////
GET
PARAMETER
3
\\\\\forbidden/////
GET
PF-STATUS
3
\\\\\forbidden/////
GET
PROPERTY
3
\\\\\forbidden/////
GET
REFERENCE
3
\\\\\forbidden/////
GET
RUN
3
\\\\\forbidden/////
GET
TIME
3
2
FORM
RE01

else.
ure-Position

1
49
5
"Reto

*--- bei einer Retoure-Position ist die Bu


chungslogik genau umgekehrt

*--- zur Lieferposition:

case i_sgnbu-shkzg.

when haben.

5
perform kursdifferenz_zugang_n.

perform re_zugang_n.

when soll.

perform kursdifferenz_storno_n.

perform re_storno_n.

15
IF i_sgnbu-xekbz = 'X' AND i_sgn
bu-ivtyp = '5'. "N980402

PERFORM kursdifferenz_storno_n
"N980402

PERFORM re_storno_n.
"N980402

ELSE.
"N980402

PERFORM kursdifferenz_zugang_n
.

PERFORM re_zugang_n.

ENDIF.
"N980402

WHEN soll.

IF i_sgnbu-xekbz = 'X' AND i_sgn


bu-ivtyp = space. "N980402

PERFORM kursdifferenz_zugang_n
"N980402

PERFORM re_zugang_n.
"N980402

ELSE.
"N980402

PERFORM kursdifferenz_storno_n
.

PERFORM re_storno_n.

ENDIF.
"N980402

2
FORM
RE02
3
15
3
form re02.

if i_sgnbu-menge ne 0.

5
"Li

if i_sgnbu-retpo = space.
efer-Position

case i_sgnbu-shkzg.

when soll.

perform re_zugang_kontiert_n.

when haben.

22
we_re_menge = i_sgnbu-wemng - i_sgnburemng.
"N980402

re_we_menge = 0 - we_re_menge.
"N980402

IF i_sgnbu-retpo = space.
efer-Position

"Li

CASE i_sgnbu-shkzg.

WHEN soll.

* separate KDM lines N980402 WP 140949

* Calculate any exchange rate differences


only if there is a

* valuated goods receipt expected.

IF gf_kdm_active = 'X' AND


"N980402

i_sgnbu-weunb = space AND


"N980402

i_sgnbu-wepos <> space.


"N980402

PERFORM kursdifferenz_zugang_n
"N980402

ENDIF.
"N980402

PERFORM re_zugang_kontiert_n.

WHEN haben.

IF gf_kdm_active = 'X' AND


"N980402

i_sgnbu-weunb = space AND


"N980402

i_sgnbu-wepos <> space.


"N980402

* For credit memos post the exchange rate


difference

* against the average exchange rate of the


invoices

PERFORM kursdifferenz_storno_n
"N980402

ENDIF.
"N980402

else.
toure-Position

27
5
"Re

*--- bei einer Retoure-Position ist die Bu


chungslogik genau umgekehrt

*--- zur Lieferposition:

case i_sgnbu-shkzg.

when haben.

3
perform re_zugang_kontiert_n.

when soll.

perform re_storno_kontiert_n.

31
IF i_sgnbu-xekbz = 'X' AND i_sgn
bu-ivtyp = '5'. "N980402

IF gf_kdm_active = 'X' AND


"N980402

i_sgnbu-weunb = space AND


"N980402

i_sgnbu-wepos <> space.


"N980402

_n.

PERFORM kursdifferenz_storno
"N980402

ENDIF.
"N980402

PERFORM re_storno_kontiert_n.
"N980402

ELSE.
"N980402

IF gf_kdm_active = 'X' AND

i_sgnbu-weunb = space AND

i_sgnbu-wepos <> space.


"N980402

PERFORM kursdifferenz_zugang
_n.

ENDIF.

PERFORM re_zugang_kontiert_n.

ENDIF.

"N980402

WHEN soll.

IF i_sgnbu-xekbz = 'X' AND i_sgn


bu-ivtyp = space. "N980402

IF gf_kdm_active = 'X' AND


"N980402

i_sgnbu-weunb = space AND


"N980402

i_sgnbu-wepos <> space.


"N980402

_n.

PERFORM kursdifferenz_zugang
"N980402

ENDIF.
"N980402

PERFORM re_zugang_kontiert_n.
"N980402

ELSE.
"N980402

IF gf_kdm_active = 'X' AND

i_sgnbu-weunb = space AND

i_sgnbu-wepos <> space.


"N980402

PERFORM kursdifferenz_storno
_n.

ENDIF.

PERFORM re_storno_kontiert_n.

ENDIF.
"N980402

35
4

endif.

perform sh_kzg_setzen_n using vwere ch


anging shvwere.

perform sh_kzg_setzen_n using verbr ch


anging shverbr.

1
endif.

4
IF gf_kdm_active = 'X'.
"N980402

PERFORM sh_kzg_setzen_n USING krdif


CHANGING shkrdif. "N980402

ENDIF.
"N980402

ENDIF.

2
FORM
RE21
4
29
3
re_we_menge = 0 - we_re_menge.

case i_sgnbu-shkzg.

when soll.

2
perform re_zugang_n.

when haben.

8
IF gf_kdm_active = 'X'.
"N980402

PERFORM kursdifferenz_zugang_n.
"N980402

ENDIF.
"N980402

PERFORM re_zugang_n.

WHEN haben.

IF gf_kdm_active = 'X'.
"N980402

PERFORM kursdifferenz_storno_n.
"N980402

ENDIF.
"N980402

34
3
perform re_storno_n.

endcase.

fremd = bestd + prdif.

1
* only for planned delivery costs for subc
ontract PO

4
IF gf_kdm_active = 'X'.
"N980402

fremd = bestd + prdif + krdif.


"N980402

ENDIF.
"N980402

* only for planned delivery costs for subc


ontract PO

44
4
ENDIF.

if t001k-xlbpd ne space or i_sgnbu-mlm


aa ne space.

bestg = 0 - prdif - bestd.

2
else.

prdif = 0.

8
IF gf_kdm_active = 'X'.
"N980402

bestg = 0 - prdif - bestd - krdif.


"N980402

ENDIF.
"N980402

ELSE.

prdif = 0.

IF gf_kdm_active = 'X'.
"N980402

krdif = 0.
"N980402

ENDIF.
"N980402

56
3
perform sh_kzg_setzen_n using bestg ch
anging shbestg.

PERFORM sh_kzg_setzen_n USING einkk CH


ANGING sheinkk.

perform sh_kzg_setzen_n using prdif ch


anging shprdif.

1
endif.

4
IF gf_kdm_active = 'X'.
"N980402

PERFORM sh_kzg_setzen_n USING krdif


CHANGING shkrdif. "N980402

ENDIF.
"N980402

ENDIF.

LIMU
REPS
LGNB8TOP
00001
LIMU
REPS
LGNB8TOP
00003
36
1
\\\\\no_empty_blocks/////
1
\\\\\comments_ignored/////
1
\\\\\delta_normalized/////
3
\\\\\allowed/////
FORM
*
3
\\\\\allowed/////
FUNCTION
*
3
\\\\\allowed/////
MODULE

**
3
\\\\\allowed/////
REPORT
*
3
\\\\\allowed/////
PROGRAM
*
3
\\\\\allowed/////
FUNCTION-POOL
*
4
\\\\\allowed/////
CLASS
*
DEFINITION
4
\\\\\allowed/////
CLASS
*
IMPLEMENTATION
5
\\\\\forbidden/////
CLASS
*
DEFINITION
DEFERRED
5
\\\\\forbidden/////
CLASS
*
DEFINITION
LOAD
6
\\\\\forbidden/////
CLASS
*
DEFINITION
LOCAL
FRIENDS
3
\\\\\allowed/////
AT
LINE-SELECTION
3
\\\\\allowed/////
AT
USER-COMMAND
4
\\\\\allowed/////
AT
SELECTION-SCREEN
**
3
\\\\\allowed/////
AT
PF*
2

\\\\\allowed/////
INITIALIZATION
2
\\\\\allowed/////
START-OF-SELECTION
2
\\\\\allowed/////
END-OF-SELECTION
3
\\\\\allowed/////
TOP-OF-PAGE
**
2
\\\\\allowed/////
END-OF-PAGE
3
\\\\\allowed/////
GET
**
3
\\\\\forbidden/////
GET
BADI
3
\\\\\forbidden/////
GET
BIT
3
\\\\\forbidden/////
GET
CONNECTION
3
\\\\\forbidden/////
GET
CURSOR
3
\\\\\forbidden/////
GET
DATASET
3
\\\\\forbidden/////
GET
LOCALE
3
\\\\\forbidden/////
GET
PARAMETER
3
\\\\\forbidden/////
GET
PF-STATUS
3
\\\\\forbidden/////
GET
PROPERTY
3
\\\\\forbidden/////
GET
REFERENCE
3

\\\\\forbidden/////
GET
RUN
3
\\\\\forbidden/////
GET
TIME
1
2
FUNCTION-POOL
GNB8

DATA: LAUFENDE_PERIODE_FIX,
r statistischen GLD

MESSAGES_ACTIVE,
lag Messagesammler aktiv

SMBEW_INDEX

2
132
7
" f

" F

LIKE SY-TABIX,

SH_KZG(16),
eldname S/H-KZ

X_NWALT LIKE DM08R-VWALT,

X_NWERR LIKE DM08R-VWERR,

X_NWERT LIKE DM08R-VWERT,

" F

1
X_NWREM LIKE DM08R-VWREM.

2
X_NWREM LIKE DM08R-VWREM,

gf_kdm_active TYPE boole-boole.


"N980402

143
6
VAL

DATA:
HABEN
UE 'H',

SOLL

VAL

UE 'S',

TOLSL-VP

LIKE T169E-TOLSL

VAL

VORSL-BSX LIKE T169A-VORSL

VAL

UE 'VP',

UE 'BSX',

VPRSV-S
UE 'S',

VAL

VPRSV-V

VAL

UE 'V',

BUSTW-RE05 LIKE T169A-BUSTW


UE 'RE05'.

BUSTW-RE05 LIKE T169A-BUSTW


UE 'RE05',

2
VAL

2
VAL

c_ivtyp_storno LIKE rbkp-ivtyp V


"N980402

ALUE '5'.

LIMU
REPS
LMBGBFBN
00001
LIMU
REPS
LMBGBFBN
00003
36
1
\\\\\no_empty_blocks/////
1

\\\\\comments_not_ignored/////
1
\\\\\delta_normalized/////
3
\\\\\allowed/////
FORM
*
3
\\\\\allowed/////
FUNCTION
*
3
\\\\\allowed/////
MODULE
**
3
\\\\\allowed/////
REPORT
*
3
\\\\\allowed/////
PROGRAM
*
3
\\\\\allowed/////
FUNCTION-POOL
*
4
\\\\\allowed/////
CLASS
*
DEFINITION
4
\\\\\allowed/////
CLASS
*
IMPLEMENTATION
5
\\\\\forbidden/////
CLASS
*
DEFINITION
DEFERRED
5
\\\\\forbidden/////
CLASS
*
DEFINITION
LOAD
6
\\\\\forbidden/////
CLASS
*
DEFINITION
LOCAL
FRIENDS
3
\\\\\allowed/////
AT
LINE-SELECTION

3
\\\\\allowed/////
AT
USER-COMMAND
4
\\\\\allowed/////
AT
SELECTION-SCREEN
**
3
\\\\\allowed/////
AT
PF*
2
\\\\\allowed/////
INITIALIZATION
2
\\\\\allowed/////
START-OF-SELECTION
2
\\\\\allowed/////
END-OF-SELECTION
3
\\\\\allowed/////
TOP-OF-PAGE
**
2
\\\\\allowed/////
END-OF-PAGE
3
\\\\\allowed/////
GET
**
3
\\\\\forbidden/////
GET
BADI
3
\\\\\forbidden/////
GET
BIT
3
\\\\\forbidden/////
GET
CONNECTION
3
\\\\\forbidden/////
GET
CURSOR
3
\\\\\forbidden/////
GET
DATASET
3
\\\\\forbidden/////
GET
LOCALE
3
\\\\\forbidden/////
GET

PARAMETER
3
\\\\\forbidden/////
GET
PF-STATUS
3
\\\\\forbidden/////
GET
PROPERTY
3
\\\\\forbidden/////
GET
REFERENCE
3
\\\\\forbidden/////
GET
RUN
3
\\\\\forbidden/////
GET
TIME
4
2
FORM
BEZUGSNEBENKOSTEN_RECHNEN
8
8
3
*--------------------------------------------------------------------*

FORM bezugsnebenkosten_rechnen USING b-bfl


ag TYPE c "PO with ACC.ASSIGN

b-xei
nk LIKE t001-xeink

6
b-waf
lg TYPE c. "GOODS ISSUE/WA04

DATA: l_curtp LIKE ycurtp-curtp.

CHECK NOT dm07m-bsmng IS INITIAL.

CHECK b-waflg IS INITIAL OR vm07m-kzbwa


NE '04'.

8
b_waf
lg TYPE c. "GOODS ISSUE/WA04 "N980402

DATA: l_curtp LIKE ycurtp-curtp,

lv_kudif_bnk LIKE bseg-dmbtr.


"N980402

CHECK NOT dm07m-bsmng IS INITIAL.

CHECK b_waflg IS INITIAL OR vm07m-kzbwa


NE '04'.
"N980402

19
3
PERFORM wertestring_puffern USING bust
w_bnkg.

flagbnk = x.

ENDIF.

1
IF b-waflg = space.

1
IF b_waflg = space.
"N980402

48
7
PERFORM wertesperrtab_ekbn_pruefen USI
NG mseg-zeile

ye
kbnk_cr-stunr

ye
kbnk_cr-zaehk

ye
kbnk_cr-curtp

space.

refe2 = xekbn-frwmg - erfmg.

we_re_menge = xekbn-frwmg - xekbn-frrm


g.

IF yekbnk-kwert < 0 AND NOT b-waflg IS


INITIAL.

1
IF yekbnk-kwert < 0 AND NOT b_waflg IS
INITIAL.
"N980402

57
4
CLEAR betrag.

IF mseg-weunb IS INITIAL.

DATA shkzg LIKE mseg-shkzg. shkzg =


mseg-shkzg.

1
IF NOT b-waflg IS INITIAL.

1
IF NOT b_waflg IS INITIAL.
"N980402

94
3
xzcxcb-lifnr = yekbnk-lifnr.

xzcxcb-dmbtr = betrag.

xzcxcb-dmbtr = 0 - xzcxcb-dmbtr.

1
betrag = fracht - xzcxcb-dmbtr.

CLEAR: lv_kudif_bnk.
"N980402

PERFORM kursdifferenz_bznk_rechnen
"N980402

USING
"N980402

b_waflg
"N980402

CHANGING
"N980402

lv_kudif_bnk.
"N980402

betrag = fracht - xzcxcb-dmbtr.

100
3
ENDIF.

fracht = betrag.

IF ( mseg-shkzg = h AND NOT mseg-kzzug


IS INITIAL ) OR

NOT b-waflg IS INITIAL.

1
NOT b_waflg IS INITIAL.
"N980402

105
3
xzcxcb-dmbtr = 0 - xzcxcb-dmbtr.

ENDIF.

DATA xleit. CLEAR xleit.

5
IF ( yekbnk_cr-kwert > 0 AND b-waflg I
S INITIAL ) OR

( yekbnk_cr-kwert < 0 AND NOT b-waf


lg IS INITIAL ).

xleit = k.

ELSEIF ( yekbnk_cr-kwert < 0 AND b-waf


lg IS INITIAL ) OR

( yekbnk_cr-kwert > 0 AND NOT b


-waflg IS INITIAL ).

5
IF ( yekbnk_cr-kwert > 0 AND b_waflg I
S INITIAL ) OR
"N980402

( yekbnk_cr-kwert < 0 AND NOT b_waf


lg IS INITIAL ). "N980402

xleit = k.

ELSEIF ( yekbnk_cr-kwert < 0 AND b_waf


lg IS INITIAL ) OR"N980402

( yekbnk_cr-kwert > 0 AND NOT b


_waflg IS INITIAL )."N980402

140
3
APPEND xzcxcb.

COLLECT XZCXCB-VORSL INTO GT_VORSL_F

PA.

"note 990492

ENDIF.

1
ENDLOOP.

8
* Begin N980402

PERFORM kursdifferenz_bznk_generieren

USING lv_kudif_bnk

b_waflg.

* accumulate the kdm amounts for all condi


tions which belong to the PO item

kudif_bnk = kudif_bnk + lv_kudif_bnk.

* End N980402

ENDLOOP.

2
FORM
CHECK_FREIGHT_PO_ACCT
1
16
3
ELSE.

O_PURCHASE_ACCT = SPACE.

ENDIF.

3
ENDFORM.

* end

of
note 990492

*eject

1
"CHECK_FREIGHT

ENDFORM.
_PO_ACCT

2
FORM
KURSDIFFERENZ_BZNK_GENERIEREN
1
1
0
0
43
* end

of
note 990492

*eject

*Begin N980402 WP140949

*eject

*&--------------------------------------------------------------------*

*&
n

Form kursdifferenz_bznk_generiere

*&--------------------------------------------------------------------*

*
Create posting lines for exchange
rate differences (KDM)

*
in table XZCXCB for planned delive
ry cost

*---------------------------------------------------------------------*

FORM kursdifferenz_bznk_generieren

USING

uv_kudif_bnk LIKE bseg-dmbtr

uv_waflg

TYPE c.

DATA:

lv_index TYPE syindex.

xzcxcb-stunr = yekbnk-stunr.

xzcxcb-zaehk = yekbnk-zaehk.

xzcxcb-xauto = x.

xzcxcb-lifnr = yekbnk-lifnr.

IF uv_waflg IS INITIAL.

xzcxcb-dmbtr = uv_kudif_bnk.

ELSEIF uv_waflg = 'X'.

xzcxcb-dmbtr = 0 - uv_kudif_bnk.

ENDIF.

IF betrag > maximum OR betrag < minimum.

MESSAGE e302 WITH 'BEZUGSNEBENKOSTEN_R


ECHNEN' 'FRACHT'.

ENDIF.

PERFORM shkzg_setzen USING xzcxcb-dmbtr


xzcxcb-shkzg space space.

xzcxcb-waers = yekbnk_cr-waers.

xzcxcb-vorsl = vorsl_kdm.

xzcxcb-bewtp = buzid_p.

xzcxcb-kschl = yekbnk-kschl.

xzcxcb-bustw = bustw_bnkr.

xzcxcb-curtp = yekbnk_cr-curtp.

APPEND xzcxcb.

ENDFORM.
z_bznk_generieren

" kursdifferen

2
FORM
KURSDIFFERENZ_BZNK_RECHNEN
1
1
0
0
98
*&--------------------------------------------------------------------*

*&

Form kursdifferenz_bznk_rechnen

*&--------------------------------------------------------------------*

*
calculate exchange rate difference
s for planned delivery cost

*---------------------------------------------------------------------*

FORM kursdifferenz_bznk_rechnen

USING

lf_waflg TYPE c
sue/WA04

"goods is

CHANGING

cv_kudif_bnk TYPE dmbtr.


exchange rate difference

"memorize

DATA: cs_bnkdm00 TYPE ty_bnkdm.

CHECK: yekbnk-bewtp NE 'C'.


for konv-kruek = 'X'

"no KDM

IF yekbnk_cr-curtp = curtp00.

* memorise delivery costs for transactio


n currency in gt_bnkdm

* to calculate the exchange rate differe


nce

MOVE-CORRESPONDING yekbnk_cr TO cs_bnk


dm00.

* see form wertesperrtab_ekbn_pruefen

cs_bnkdm00-frwwr = xekbn-frwwr.

* Use 'betrag' as TYPE f to avoid roundi


ng differences

IF xzcxcb-dmbtr > 0 AND NOT vm07m-ret


po = 'X'.

cs_bnkdm00-bnbtr = betrag.

ELSE.

cs_bnkdm00-bnbtr = 0 - betrag.

ENDIF.

APPEND cs_bnkdm00 TO gt_bnkdm.

CLEAR

ELSE.

cs_bnkdm00.

* read corresponding data of the transac


tion currency

READ TABLE gt_bnkdm

WITH KEY ebeln = yekbnk_cr-ebeln

ebelp = yekbnk_cr-ebelp

stunr = yekbnk_cr-stunr

zaehk = yekbnk_cr-zaehk

curtp = curtp00

INTO cs_bnkdm00.

* Calculate the exchange rate difference a


mount regarding the actual

* exchange rate;

* in case of goods receipt and goods issue


.

IF gf_kdm_active_im = 'X' AND vm07m-xs


tor NE '2'

AND ( gf_return_delivery NE 'X' OR


lf_waflg = 'X' ) .

* First translation of the condition value


to avoid rounding

* differences due to partial goods receipt


(wemng >= remng)

CLEAR fw_betrag.

IF we_re_menge GE 0.

betrag = cs_bnkdm00-kwert.

PERFORM wa04_currency

USING

betrag

fw_betrag

ycurtp-kurst

ycurtp-curdt

vm07m-bwaer

yekbnk_cr-waers

space.

ENDIF.

*exchange rate difference only, if IR


> GR before or after

*the posting or direct difference (fi


rst condition)

IF fw_betrag
wert OR

NE yekbnk_cr-k

we_re_menge

LT 0

OR

we_re_menge_final LT 0.

betrag = cs_bnkdm00-bnbtr.

PERFORM wa04_currency

USING

betrag

fw_betrag

ycurtp-kurst

ycurtp-curdt

vm07m-bwaer

yekbnk_cr-waers

space.

cv_kudif_bnk = fw_betrag.

cv_kudif_bnk = cv_kudif_bnk - xzcx


cb-dmbtr.

ENDIF.

* Calculate the exchange rate difference a

mount regarding the average

* exchange rate of previous goods receipts


;

* in case of return delivery.

ELSEIF gf_kdm_active_im = 'X' AND vm07


m-xstor NE '2'

AND gf_return_delivery = 'X'.

cv_kudif_bnk = cs_bnkdm00-bnbtr * ye
kbnk_cr-frwwr /

cs_bnkdm00-frwwr - xz
cxcb-dmbtr.

* Use the exchange rate difference amount


of the cancellation document which

* was calculated as kudif_bnk during the p


osting of GR

ELSEIF gf_kdm_active_im = 'X' AND vm07


m-xstor = '2'.

cv_kudif_bnk = yekbnk_cr-kudif.

ENDIF.

ENDIF.

ENDFORM.
z_bznk_rechnen

*eject

*End N980402

LIMU
REPS

" kursdifferen

LMBGBFSB
00001
LIMU
REPS
LMBGBFSB
00003
36
1
\\\\\no_empty_blocks/////
1
\\\\\comments_not_ignored/////
1
\\\\\delta_normalized/////
3
\\\\\allowed/////
FORM
*
3
\\\\\allowed/////
FUNCTION
*
3
\\\\\allowed/////
MODULE
**
3
\\\\\allowed/////
REPORT
*
3
\\\\\allowed/////
PROGRAM
*
3
\\\\\allowed/////
FUNCTION-POOL
*
4
\\\\\allowed/////
CLASS
*
DEFINITION
4
\\\\\allowed/////
CLASS
*
IMPLEMENTATION
5
\\\\\forbidden/////
CLASS
*
DEFINITION

DEFERRED
5
\\\\\forbidden/////
CLASS
*
DEFINITION
LOAD
6
\\\\\forbidden/////
CLASS
*
DEFINITION
LOCAL
FRIENDS
3
\\\\\allowed/////
AT
LINE-SELECTION
3
\\\\\allowed/////
AT
USER-COMMAND
4
\\\\\allowed/////
AT
SELECTION-SCREEN
**
3
\\\\\allowed/////
AT
PF*
2
\\\\\allowed/////
INITIALIZATION
2
\\\\\allowed/////
START-OF-SELECTION
2
\\\\\allowed/////
END-OF-SELECTION
3
\\\\\allowed/////
TOP-OF-PAGE
**
2
\\\\\allowed/////
END-OF-PAGE
3
\\\\\allowed/////
GET
**
3
\\\\\forbidden/////
GET
BADI
3
\\\\\forbidden/////
GET
BIT
3

\\\\\forbidden/////
GET
CONNECTION
3
\\\\\forbidden/////
GET
CURSOR
3
\\\\\forbidden/////
GET
DATASET
3
\\\\\forbidden/////
GET
LOCALE
3
\\\\\forbidden/////
GET
PARAMETER
3
\\\\\forbidden/////
GET
PF-STATUS
3
\\\\\forbidden/////
GET
PROPERTY
3
\\\\\forbidden/////
GET
REFERENCE
3
\\\\\forbidden/////
GET
RUN
3
\\\\\forbidden/////
GET
TIME
1
2
FORM
WERTESPERRTAB_EKBN_PRUEFEN
1
78
3
xekbn-frwwr = frwwr.

xekbn-frrmg = frrmg.

xekbn-frrwr = frrwr.

1
xekbn-frawe = frawe.

10
* Begin N980402

* the kdm amount of invoices should not ef


fect the posting of WRX

* kdm amount should not be a part of the I


nvoice value in local currency

* frrwr = ekbz-wrbtr for invoices, wrbtr i


ncludes also kudif for

* invoices, it should be deducted, this is


according IAS

IF gf_kdm_active_im = 'X'.

xekbn-frrwr = frrwr - yekbnk_cr-k


udif_ir.

ENDIF.

* End N980402

xekbn-frawe = frawe.

LIMU
REPS
LMBGBFSE
00001
LIMU
REPS
LMBGBFSE
00003
36
1
\\\\\no_empty_blocks/////
1
\\\\\comments_not_ignored/////
1
\\\\\delta_normalized/////
3
\\\\\allowed/////
FORM
*
3
\\\\\allowed/////
FUNCTION
*
3
\\\\\allowed/////
MODULE

**
3
\\\\\allowed/////
REPORT
*
3
\\\\\allowed/////
PROGRAM
*
3
\\\\\allowed/////
FUNCTION-POOL
*
4
\\\\\allowed/////
CLASS
*
DEFINITION
4
\\\\\allowed/////
CLASS
*
IMPLEMENTATION
5
\\\\\forbidden/////
CLASS
*
DEFINITION
DEFERRED
5
\\\\\forbidden/////
CLASS
*
DEFINITION
LOAD
6
\\\\\forbidden/////
CLASS
*
DEFINITION
LOCAL
FRIENDS
3
\\\\\allowed/////
AT
LINE-SELECTION
3
\\\\\allowed/////
AT
USER-COMMAND
4
\\\\\allowed/////
AT
SELECTION-SCREEN
**
3
\\\\\allowed/////
AT
PF*
2

\\\\\allowed/////
INITIALIZATION
2
\\\\\allowed/////
START-OF-SELECTION
2
\\\\\allowed/////
END-OF-SELECTION
3
\\\\\allowed/////
TOP-OF-PAGE
**
2
\\\\\allowed/////
END-OF-PAGE
3
\\\\\allowed/////
GET
**
3
\\\\\forbidden/////
GET
BADI
3
\\\\\forbidden/////
GET
BIT
3
\\\\\forbidden/////
GET
CONNECTION
3
\\\\\forbidden/////
GET
CURSOR
3
\\\\\forbidden/////
GET
DATASET
3
\\\\\forbidden/////
GET
LOCALE
3
\\\\\forbidden/////
GET
PARAMETER
3
\\\\\forbidden/////
GET
PF-STATUS
3
\\\\\forbidden/////
GET
PROPERTY
3
\\\\\forbidden/////
GET
REFERENCE
3

\\\\\forbidden/////
GET
RUN
3
\\\\\forbidden/////
GET
TIME
1
2
FORM
WERTESPERRTAB_EKWS_PRUEFEN
1
33
3
xekws-remng = dm07m-remng.

xekws-bprem = dm07m-bprem.

xekws-rewrt = yebefu_cr-rewrt.

1
xekws-arewr = yebefu_cr-arewr.

7
* Begin N980402

* the kdm amount of invoices should not ef


fect the posting of WRX

IF gf_kdm_active_im = 'X'.

xekws-rewrt = yebefu_cr-rewrt - y
ebefu_cr-kudif_ir.

ENDIF.

* End N980402

xekws-arewr = yebefu_cr-arewr.

LIMU
REPS
LMBGBFSU
00001
LIMU
REPS
LMBGBFSU
00003
36
1
\\\\\no_empty_blocks/////
1
\\\\\comments_not_ignored/////
1
\\\\\delta_normalized/////
3
\\\\\allowed/////
FORM
*

3
\\\\\allowed/////
FUNCTION
*
3
\\\\\allowed/////
MODULE
**
3
\\\\\allowed/////
REPORT
*
3
\\\\\allowed/////
PROGRAM
*
3
\\\\\allowed/////
FUNCTION-POOL
*
4
\\\\\allowed/////
CLASS
*
DEFINITION
4
\\\\\allowed/////
CLASS
*
IMPLEMENTATION
5
\\\\\forbidden/////
CLASS
*
DEFINITION
DEFERRED
5
\\\\\forbidden/////
CLASS
*
DEFINITION
LOAD
6
\\\\\forbidden/////
CLASS
*
DEFINITION
LOCAL
FRIENDS
3
\\\\\allowed/////
AT
LINE-SELECTION
3
\\\\\allowed/////
AT
USER-COMMAND
4
\\\\\allowed/////
AT

SELECTION-SCREEN
**
3
\\\\\allowed/////
AT
PF*
2
\\\\\allowed/////
INITIALIZATION
2
\\\\\allowed/////
START-OF-SELECTION
2
\\\\\allowed/////
END-OF-SELECTION
3
\\\\\allowed/////
TOP-OF-PAGE
**
2
\\\\\allowed/////
END-OF-PAGE
3
\\\\\allowed/////
GET
**
3
\\\\\forbidden/////
GET
BADI
3
\\\\\forbidden/////
GET
BIT
3
\\\\\forbidden/////
GET
CONNECTION
3
\\\\\forbidden/////
GET
CURSOR
3
\\\\\forbidden/////
GET
DATASET
3
\\\\\forbidden/////
GET
LOCALE
3
\\\\\forbidden/////
GET
PARAMETER
3
\\\\\forbidden/////
GET
PF-STATUS
3
\\\\\forbidden/////

GET
PROPERTY
3
\\\\\forbidden/////
GET
REFERENCE
3
\\\\\forbidden/////
GET
RUN
3
\\\\\forbidden/////
GET
TIME
3
2
FORM
FELDER_INIT
3
20
3
exbualt, exalt,

salk3, salkv, lbkum, vmsal, vmsav


, vmkum, bualt, buaum,

umsal, umlbk, umsav, umvsa, umvku


, umvsv, umbua, umbum,

1
fracht, lbwert, exwrt, umexw, ver
brauch.

3
fracht, lbwert, exwrt, umexw, ver
brauch,

gf_kdm_active_im, kudif_bnk.
"N980402

24
3
IF ycurtp-curtm = curtp00.

CLEAR: x_fwdif, x_shfwdif, vwere00.

umwae = mseg-waers.

1
ELSEIF ycurtp-umwae IS INITIAL.

2
CLEAR gt_bnkdm.
"N980402

ELSEIF ycurtp-umwae IS INITIAL.

48
3

shkzk = s.

ENDIF.

PERFORM jv_crp_fields_init.

ENHANCEMENT-POINT FELDER_INIT_01 SPOTS ES_


SAPLMBGB.

PERFORM check_t169p.
"N980402

PERFORM check_return_delivery.
"N980402

ENHANCEMENT-POINT felder_init_01 SPOTS es_


saplmbgb.

2
FORM
KALKULATIONSNUMMER_ERMITTELN
1
30
7
CALL FUNCTION 'CKMS_KALNR_GET'

EXPORTING

if_ckmlkalnr

= kalnr_

wa

IMPORTING

einzelkalkulationsnummer

= kalnr

erzeugniskalkulationsnummer = kaln1.

ENDFORM.
ummer_ermitteln

"kalkulationsn

1
*eject

0
2
FORM
CHECK_T169P
1
1
0
0
32
*eject

* Begin N980402

*&--------------------------------------------------------------------*

*&

Form check_t169p

*&----------------------------------------

-----------------------------*

text

*---------------------------------------------------------------------*

* --> p1

text

* <-- p2

text

*---------------------------------------------------------------------*

FORM check_t169p.

* check customizing settings in transactio


n OMRW

-> Table T169P

IF NOT t169p-bukrs = mseg-bukrs OR t169p


-bukrs IS INITIAL.

SELECT SINGLE * FROM t169p WHERE bukrs


= mseg-bukrs.

IF NOT sy-subrc IS INITIAL.

MESSAGE e001 WITH '169P' mseg-bukrs.

ENDIF.

ENDIF.

IF ycurtp-curtp = curtp10.

gf_kdm_active_im = t169p-kdhw.

ELSEIF ycurtp-curtp = t169p-ctml1.

gf_kdm_active_im = t169p-kdml1.

ELSEIF ycurtp-curtp = t169p-ctml2.

gf_kdm_active_im = t169p-kdml2.

ENDIF.

ENDFORM.

" check_t169p

* End N980402

LIMU
REPS
LMBGBFWE
00001
LIMU
REPS
LMBGBFWE
00003
36
1
\\\\\no_empty_blocks/////
1
\\\\\comments_not_ignored/////
1
\\\\\delta_normalized/////
3
\\\\\allowed/////
FORM
*
3
\\\\\allowed/////
FUNCTION
*
3
\\\\\allowed/////
MODULE
**
3
\\\\\allowed/////
REPORT
*
3
\\\\\allowed/////
PROGRAM
*
3
\\\\\allowed/////
FUNCTION-POOL
*
4
\\\\\allowed/////
CLASS
*
DEFINITION

4
\\\\\allowed/////
CLASS
*
IMPLEMENTATION
5
\\\\\forbidden/////
CLASS
*
DEFINITION
DEFERRED
5
\\\\\forbidden/////
CLASS
*
DEFINITION
LOAD
6
\\\\\forbidden/////
CLASS
*
DEFINITION
LOCAL
FRIENDS
3
\\\\\allowed/////
AT
LINE-SELECTION
3
\\\\\allowed/////
AT
USER-COMMAND
4
\\\\\allowed/////
AT
SELECTION-SCREEN
**
3
\\\\\allowed/////
AT
PF*
2
\\\\\allowed/////
INITIALIZATION
2
\\\\\allowed/////
START-OF-SELECTION
2
\\\\\allowed/////
END-OF-SELECTION
3
\\\\\allowed/////
TOP-OF-PAGE
**
2
\\\\\allowed/////
END-OF-PAGE
3
\\\\\allowed/////
GET

**
3
\\\\\forbidden/////
GET
BADI
3
\\\\\forbidden/////
GET
BIT
3
\\\\\forbidden/////
GET
CONNECTION
3
\\\\\forbidden/////
GET
CURSOR
3
\\\\\forbidden/////
GET
DATASET
3
\\\\\forbidden/////
GET
LOCALE
3
\\\\\forbidden/////
GET
PARAMETER
3
\\\\\forbidden/////
GET
PF-STATUS
3
\\\\\forbidden/////
GET
PROPERTY
3
\\\\\forbidden/////
GET
REFERENCE
3
\\\\\forbidden/////
GET
RUN
3
\\\\\forbidden/////
GET
TIME
4
2
FORM
WE01_RECHNEN
9
41
5
PERFORM were_betrag USING xekws-netwr

xekws-wwmng

xekws-wewrt

remng

xekws-rewrt.

1
exwrt = betrag.

PERFORM handle_return_delivery
"N980402

CHANGING betrag.
"N980402

exwrt = betrag.

45
3
IF ycurtp-curtm = curtp00.

vwere00 = vwere.

netwr00 = xekws-netwr.

1
ELSEIF t169p-xplcu IS INITIAL AND

2
wewrt00 = yebefu_cr-wewrt.
"N980402

ELSEIF t169p-xplcu IS INITIAL AND

65
4
ENDIF.

*exchange rate difference only, if IR


> GR before or after

*the posting or direct difference (fi


rst condition)

IF fw_betrag NE xekws-netwr OR we_re


_menge LT 0

1
OR we_re_menge_final LT 0.

2
OR we_re_menge_final LT 0 AND

gf_return_delivery NE 'X'.
"N980402

76
3
space.

kudif = fw_betrag.

kudif = kudif - vwere.

4
ELSE.

CLEAR kudif.

ENDIF.

ENDIF.

38
* Begin N980402

ELSEIF fw_betrag
etwr OR

we_re_menge

NE xekws-n

LT 0

OR

we_re_menge_final LT 0
AND

gf_return_delivery = 'X'.

*
Exchange rate difference for return
deliveries

kudif = vwere00 * yebefu_cr-wewrt


/

wewrt00 - vwere.

* End N980402

IF ycurtp-curtp = curtp10.

dm07m-kudif = kudif.

ENDIF.

ELSE.

CLEAR kudif.

ENDIF.

ENDIF.

* Begin N980402

IF gf_kdm_active_im = 'X' AND gf_retur


n_delivery NE 'X'.

* Cancellation: Use the original exchange


rate difference value.

* which was calculated as kudif during the


posting of GR

IF vm07m-xstor = '2'.

kudif = yebefu_cr-kudif.

ENDIF.

* dm07m-kudif contains the exchange rate d


ifference for curtp = 10.

* It shall only be filled if f_kdm_active_


im = 'X'.

* Otherwise the PO-History will be updated


incorrect.

* The PO-History will be updated with the


calculated value kudif

* before the form shkzg_setzen change the


value kudif

* otherwise the document cancellation cann


ot use the original value

* of the exhcnange rate differnce

IF ycurtp-curtm = curtp10.

dm07m-kudif = kudif.

ENDIF.

exwrt = exwrt - kudif - kudif_bnk.

ENDIF.

* End N980402

105
3
IF vm07m-mlmaa IS INITIAL AND dm07mxlbpd IS INITIAL.

verbr = 0 - bestd - kudif.

ELSE.

1
prdif = fracht + lbwert - vwere bestd - kudif.

1
prdif = fracht + lbwert - vwere bestd - kudif - kudif_bnk."N980402

116

3
ELSE.

*
PRD includes FRE for purchase accoun
t (note 184770)

IF dm07m-xefre EQ x AND mseg-gjahr G


E dm07m-efrej.

1
prdif = fracht - vwere - bestd - k
udif.

1
prdif = fracht - vwere - bestd - k
udif - kudif_bnk. "N980402

120
3
PRD without FRE for purchace account

ELSE.

IF dm07m-xeink IS INITIAL OR msegvprsv = v.

1
prdif = fracht - vwere - bestd kudif.

1
prdif = fracht - vwere - bestd kudif - kudif_bnk."N980402

159
3
PERFORM shkzg_setzen USING bestd shbes
td mseg-wertu l.

PERFORM shkzg_setzen USING vwere shvwe


re space space.

PERFORM shkzg_setzen USING prdif shprd


if space space.

2
PERFORM shkzg_setzen USING kudif shkud
if space space.

IF w-mb IS INITIAL.

1
IF w-mb IS INITIAL.

183
3
zekbe_cr-waers = ycurtp-waers.

zekbe_cr-shkzg = shvwere.

zekbe_cr-wrbtr = vwere.

2
APPEND zekbe_cr.

ENDIF.

19
* attention the calculated value kudif wil
l be update in ekbe

* and in mlbecr, it is needed for cancella


tion, it can happen

* that the shkzg for kudif in ekbe, mlbecr


and in bseg are

* not conform to each other, if you need c


orrect value

* which was posted go to bseg

IF gf_kdm_active_im = 'X'.
"N980402

zekbe_cr-kudif = kudif.
"N980402

ENDIF.
"N980402

APPEND zekbe_cr.

ENDIF.

* N980402

* FORM shkzg_setzen changes the value of K


UDIF always to positive

* that's why the form will be called when


the value was saved in PO

* history (zekbe_cr-kudif), it will be nee


ded for MBST.

* in the ekbe / ekbz and mlbecr the value


kudif should be

* considered without the shkzg, if you nee


d the correct data

* with value and shkzg then use bseg,

PERFORM shkzg_setzen USING kudif shkudif


space space.

2
FORM
WE06_RECHNEN
3
24

5
PERFORM were_betrag USING xekws-netw
r

xekws-wwmn
g

xekws-wewr
t

remn
g

xekws-rewr
t.

6
END-ENHANCEMENT-SECTION.

verbr = betrag.

ENDIF.

IF NOT dm07m-xbnsb IS INITIAL.

verbr = verbr - fracht.

ENDIF.

89
verbr = betrag.

END-ENHANCEMENT-SECTION.

* Begin N980402

PERFORM handle_return_delivery

CHANGING betrag.

verbr = betrag.

IF ycurtp-curtm = curtp00.

vwere00 = vwere.

netwr00 = xekws-netwr.

wewrt00 = yebefu_cr-wewrt.

ENDIF.

IF gf_kdm_active_im = 'X'.

IF xekws-kdiff_tp IS INITIAL
D NOT

AN

yebefu_cr-waers = vm07m-bwaer AN
D NOT

vwere00

IS INITIAL.

* First translation of the purchase order


value to avoid rounding

* differences due to partial goods receipt


(wemng >= remng)

CLEAR fw_betrag.

IF we_re_menge GE 0.

betrag = netwr00.

PERFORM wa04_currency

USING

betrag

fw_betrag

ycurtp-kurst

ycurtp-curdt

vm07m-bwaer

yebefu_cr-waers

space.

ENDIF.

*exchange rate difference only, if IR


> GR before or after

*the posting or direct difference (fi


rst condition)

IF fw_betrag

NE xekws-n

etwr OR

we_re_menge

LT 0

OR

we_re_menge_final LT 0
AND

gf_return_delivery NE 'X'.

betrag = vwere00.

PERFORM wa04_currency

USING

betrag

fw_betrag

ycurtp-kurst

ycurtp-curdt

vm07m-bwaer

yebefu_cr-waers

space.

kudif = fw_betrag.

kudif = kudif - vwere.

ELSEIF fw_betrag
ws-netwr OR

we_re_menge

NE xek

LT 0

OR

we_re_menge_final LT 0
AND

gf_return_delivery = 'X'.

*
Exchange rate difference for return
deliveries

kudif = vwere00 * yebefu_cr-we


wrt /

wewrt00 - vwere.

IF ycurtp-curtm = curtp10.

dm07m-kudif = kudif.

ENDIF.

ELSE.

CLEAR kudif.

ENDIF.

ENDIF.

* Cancellation: Use the original exchange


rate difference value

* which was calculated as kudif during the


posting of GR

IF vm07m-xstor = zwei.

kudif = yebefu_cr-kudif.

ENDIF.

*
dm07m-kudif contains the exchange ra
te difference for curtp = 10.

*
It shall only be filled if gf_kdm_ac
tive_im = 'X'.

*
Otherwise the PO-History will be upd
ated incorrect.

*
The PO-History must be updated with
the correct algebraic sign,

*
otherwise the document cancellation
cannot use the original value

of the exchange rate differnce

IF ycurtp-curtp = curtp10.

dm07m-kudif = kudif.

ENDIF.

ENDIF.

* End N980402

ENDIF.

IF NOT dm07m-xbnsb IS INITIAL.

verbr = verbr - fracht - kudif_bnk.


"N980402

ELSE.
"N980402

verbr = verbr - kudif - kudif_bnk.


"N980402

ENDIF.

68
3
zekbe_cr-waers = ycurtp-waers.

zekbe_cr-shkzg = shvwere.

zekbe_cr-wrbtr = vwere.

1
APPEND zekbe_cr.

10
* N980402

* attention the calculated value kudif wil


l be update in ekbe

* and in mlbecr, it is needed for cancella


tion, it can happen

* that the shkzg for kudif in ekbe, mlbecr


and in bseg are

* not conform to each other, if you need c


orrect value go to bseg

IF gf_kdm_active_im = 'X'.
"N980402

zekbe_cr-kudif = kudif.
"N980402

ENDIF.
"N980402

APPEND zekbe_cr.

79
3
zaufbe_cr-wrbtr = verbr.

APPEND zaufbe_cr.

ENDIF.

ENDFORM.

"WE06_RECHNEN

*eject

12

* N980402

* FORM shkzg_setzen changes the value of K


UDIF always to positive

* and set accordingly the shkzg that's why


the form will be called

* when the value was saved in PO history (


zekbe_cr-kudif),

* it will be needed for MBST as original v


alue

* in the ekbe / ekbz and mlbecr the value


kudif should be

* considered without the shkzg, if you nee


d the correct data

* with value and shkzg then use bseg,

PERFORM shkzg_setzen USING kudif shkudif


space space.

ENDFORM.

"WE06_RECHNEN

2
FORM
CHECK_RETURN_DELIVERY
1
1
0
0
28
*eject

*Begin N980402 WP140949

*&--------------------------------------------------------------------*

*&

Form check_return_delivery

*&--------------------------------------------------------------------*

*
The handling of exchange rate diff
erence and the calculation

*
of the stock value is differnt fro
m the normal logic if the

*
customizing in OMRW is set (gf_kdm
_active_im = 'X'). This

*
routine checks whether the movemen
t is a return delivery

(cv_return_delivery = 'X') or not

*---------------------------------------------------------------------*

<-- CV_RETURN_DELIVERY movement is


return delviery?

*---------------------------------------------------------------------*

FORM check_return_delivery.

CHECK gf_kdm_active_im = 'X'.

IF ( mseg-shkzg = h
"Return delivery?

vm07m-retpo IS INITIAL

AND

AND

vm07m-xstor IS INITIAL ) OR

vm07m-xstor = '1'.

gf_return_delivery = 'X'.

ELSE.

CLEAR gf_return_delivery.

ENDIF.

ENDFORM.
_delivery

" check_return

FORM
HANDLE_RETURN_DELIVERY
1
1
0
0
45
*&--------------------------------------------------------------------*

*&

Form handle_return_delivery

*&--------------------------------------------------------------------*

* If the customizing in OMRW is set (gf_kd


m_active_im = 'X') the

* valuation of return deliveries is differ


ent. In case of return

* deliveries the stock value shall be tran


slated with the average

* exchange rate of the already posted good


s receipts. For this the

* average exchange rate of the goods recei


pts has to be calculated

* using YEBFU_CR-WEWRT for the needed curr


encies, e.g.:

* average exchange rate = YEBEFU_CR-WEWR


T(curtp = 10) /

*
T(curtp = 00)

YEBEFU_CR-WEWR

* With this average exchange rate the exte


rnal value EXWRT has to be

* calculated:

* EXWRT = EXWRT(curtp = 00) * AVG_EXCHAN


GE_RATE_GR

*---------------------------------------------------------------------*

--> UV_RETURN_DELIVERY movement is


return delivery?

<-- CV_BETRAG

new calcula

ted external value

*---------------------------------------------------------------------*

FORM handle_return_delivery

CHANGING

cv_betrag

TYPE f.

CHECK gf_kdm_active_im

= 'X'.

CHECK gf_return_delivery = 'X'.

IF ycurtp-curtp NE curtp00.

* vwere00 is calculated WRX value in curtp


00

* wewrt00 is sum of all posted WRX values


in curtp 00

* yebefu_cr-wewrt is sum of all posted WRX


values in curtp

* 10 and ML currencies

cv_betrag = vwere00 * yebefu_cr-wewrt


/ wewrt00.

cv_betrag = ABS( cv_betrag ).

exbualt = cv_betrag + fracht + exalt.

IF exbualt > maximum OR exbualt < mini


mum.

MESSAGE e302 WITH 'HANDLE_RETURN_DEL


IVERY' 'EXBUALT'.

ENDIF.

cv_betrag = cv_betrag + fracht + lbwer


t.

IF cv_betrag > maximum OR cv_betrag <


minimum.

MESSAGE e302 WITH 'HANDLE_RETURN_DEL


IVERY' 'BETRAG2'.

ENDIF.

ENDIF.

ENDFORM.
n_delivery

" handle_retur

*End N980402 WP140949

LIMU
REPS
LMBGBTOP
00001
LIMU
REPS
LMBGBTOP
00003
36
1
\\\\\no_empty_blocks/////
1
\\\\\comments_ignored/////
1
\\\\\delta_normalized/////
3
\\\\\allowed/////
FORM
*
3
\\\\\allowed/////
FUNCTION
*
3
\\\\\allowed/////
MODULE
**
3
\\\\\allowed/////
REPORT

*
3
\\\\\allowed/////
PROGRAM
*
3
\\\\\allowed/////
FUNCTION-POOL
*
4
\\\\\allowed/////
CLASS
*
DEFINITION
4
\\\\\allowed/////
CLASS
*
IMPLEMENTATION
5
\\\\\forbidden/////
CLASS
*
DEFINITION
DEFERRED
5
\\\\\forbidden/////
CLASS
*
DEFINITION
LOAD
6
\\\\\forbidden/////
CLASS
*
DEFINITION
LOCAL
FRIENDS
3
\\\\\allowed/////
AT
LINE-SELECTION
3
\\\\\allowed/////
AT
USER-COMMAND
4
\\\\\allowed/////
AT
SELECTION-SCREEN
**
3
\\\\\allowed/////
AT
PF*
2
\\\\\allowed/////
INITIALIZATION
2
\\\\\allowed/////

START-OF-SELECTION
2
\\\\\allowed/////
END-OF-SELECTION
3
\\\\\allowed/////
TOP-OF-PAGE
**
2
\\\\\allowed/////
END-OF-PAGE
3
\\\\\allowed/////
GET
**
3
\\\\\forbidden/////
GET
BADI
3
\\\\\forbidden/////
GET
BIT
3
\\\\\forbidden/////
GET
CONNECTION
3
\\\\\forbidden/////
GET
CURSOR
3
\\\\\forbidden/////
GET
DATASET
3
\\\\\forbidden/////
GET
LOCALE
3
\\\\\forbidden/////
GET
PARAMETER
3
\\\\\forbidden/////
GET
PF-STATUS
3
\\\\\forbidden/////
GET
PROPERTY
3
\\\\\forbidden/////
GET
REFERENCE
3
\\\\\forbidden/////
GET
RUN
3

\\\\\forbidden/////
GET
TIME
1
2
FUNCTION-POOL
MBGB
1
148
3
" W

vwere00 like prdif,


E/RE in Transaktionswhr

netwr00 like prdif,


estellnettowert in "

" B

shkzl like mseg-shkzg,

1
shkzk like mseg-shkzg.

29
shkzk LIKE mseg-shkzg,

* Begin N980402

gf_kdm_active_im
e, "flag from T169P

TYPE boole-bool

gf_return_delivery TYPE boole-bool


e, "flag return delivery

bnbtr00

LIKE bseg-dmbtr

wewrt00

LIKE bseg-dmbtr

kudif_bnk

LIKE bseg-dmbtr

frkdm

LIKE bseg-dmbtr

* declarations for the calculation of exch


ange

* rate differencies for delivery costs

TYPES:

BEGIN OF ty_bnkdm,

ebeln

TYPE ebeln,

ebelp

TYPE ebelp,

stunr

TYPE stunr,

zaehk

TYPE dzaehk,

curtp

TYPE curtp,

waers

TYPE waers,

bnbtr

TYPE f,

frwwr

TYPE f,

kwert

TYPE kwert,

END OF ty_bnkdm,

tt_bnkdm TYPE TABLE OF ty_bnkdm.

DATA:

gt_bnkdm TYPE tt_bnkdm.

*End N980402

LIMU
REPS
LMLCCS_UPDATEF02
00001
LIMU
REPS
LMLCCS_UPDATEF02
00003
36
1
\\\\\no_empty_blocks/////
1
\\\\\comments_not_ignored/////
1
\\\\\delta_normalized/////
3
\\\\\allowed/////
FORM
*
3
\\\\\allowed/////
FUNCTION
*
3
\\\\\allowed/////
MODULE
**
3
\\\\\allowed/////
REPORT
*
3
\\\\\allowed/////
PROGRAM
*
3
\\\\\allowed/////
FUNCTION-POOL
*
4
\\\\\allowed/////
CLASS
*
DEFINITION
4
\\\\\allowed/////
CLASS
*
IMPLEMENTATION

5
\\\\\forbidden/////
CLASS
*
DEFINITION
DEFERRED
5
\\\\\forbidden/////
CLASS
*
DEFINITION
LOAD
6
\\\\\forbidden/////
CLASS
*
DEFINITION
LOCAL
FRIENDS
3
\\\\\allowed/////
AT
LINE-SELECTION
3
\\\\\allowed/////
AT
USER-COMMAND
4
\\\\\allowed/////
AT
SELECTION-SCREEN
**
3
\\\\\allowed/////
AT
PF*
2
\\\\\allowed/////
INITIALIZATION
2
\\\\\allowed/////
START-OF-SELECTION
2
\\\\\allowed/////
END-OF-SELECTION
3
\\\\\allowed/////
TOP-OF-PAGE
**
2
\\\\\allowed/////
END-OF-PAGE
3
\\\\\allowed/////
GET
**
3
\\\\\forbidden/////
GET
BADI

3
\\\\\forbidden/////
GET
BIT
3
\\\\\forbidden/////
GET
CONNECTION
3
\\\\\forbidden/////
GET
CURSOR
3
\\\\\forbidden/////
GET
DATASET
3
\\\\\forbidden/////
GET
LOCALE
3
\\\\\forbidden/////
GET
PARAMETER
3
\\\\\forbidden/////
GET
PF-STATUS
3
\\\\\forbidden/////
GET
PROPERTY
3
\\\\\forbidden/////
GET
REFERENCE
3
\\\\\forbidden/////
GET
RUN
3
\\\\\forbidden/////
GET
TIME
1
3
CLASS
LCL_GD
IMPLEMENTATION
1
1541
3
ed_sum = ed_sum +

ls_ckmlcr-zukdm_o + ls

_ckmlcr-vpkdm_o.

1
*

error case

7
* Begin N980402

statistical exchange differences

WHEN ccs00_mlcct-kdmsl_st.

ed_sum = ed_sum +

ls_ckmlcr-zukdm_ost +
ls_ckmlcr-vpkdm_ost.

* End N980402

error case

LIMU
REPS
LMLCCS_UPDATEF13
00001
LIMU
REPS
LMLCCS_UPDATEF13
00003
36
1
\\\\\no_empty_blocks/////
1
\\\\\comments_not_ignored/////
1
\\\\\delta_normalized/////
3
\\\\\allowed/////
FORM
*
3
\\\\\allowed/////
FUNCTION
*
3
\\\\\allowed/////
MODULE
**
3
\\\\\allowed/////
REPORT
*
3
\\\\\allowed/////
PROGRAM
*
3
\\\\\allowed/////
FUNCTION-POOL
*
4
\\\\\allowed/////

CLASS
*
DEFINITION
4
\\\\\allowed/////
CLASS
*
IMPLEMENTATION
5
\\\\\forbidden/////
CLASS
*
DEFINITION
DEFERRED
5
\\\\\forbidden/////
CLASS
*
DEFINITION
LOAD
6
\\\\\forbidden/////
CLASS
*
DEFINITION
LOCAL
FRIENDS
3
\\\\\allowed/////
AT
LINE-SELECTION
3
\\\\\allowed/////
AT
USER-COMMAND
4
\\\\\allowed/////
AT
SELECTION-SCREEN
**
3
\\\\\allowed/////
AT
PF*
2
\\\\\allowed/////
INITIALIZATION
2
\\\\\allowed/////
START-OF-SELECTION
2
\\\\\allowed/////
END-OF-SELECTION
3
\\\\\allowed/////
TOP-OF-PAGE
**
2
\\\\\allowed/////
END-OF-PAGE

3
\\\\\allowed/////
GET
**
3
\\\\\forbidden/////
GET
BADI
3
\\\\\forbidden/////
GET
BIT
3
\\\\\forbidden/////
GET
CONNECTION
3
\\\\\forbidden/////
GET
CURSOR
3
\\\\\forbidden/////
GET
DATASET
3
\\\\\forbidden/////
GET
LOCALE
3
\\\\\forbidden/////
GET
PARAMETER
3
\\\\\forbidden/////
GET
PF-STATUS
3
\\\\\forbidden/////
GET
PROPERTY
3
\\\\\forbidden/////
GET
REFERENCE
3
\\\\\forbidden/////
GET
RUN
3
\\\\\forbidden/////
GET
TIME
1
3
CLASS
LCL_BUSINESS_ORDER
IMPLEMENTATION
3
8
4

method class_constructor.

free gob_error.

create object gob_error

exporting
EF13'

1
id_repid = 'LMLCCS_UPDAT
"#EC NOTEXT

2
EXPORTING

id_repid = 'LMLCCS_UPDATEF13'
"#EC NOTEXT

264
3
id_elesm = ld_layershema.

ls_kdm_delta to buffer.

1
call method lcl_tool=>vector_to_bu
ffer

2
IF is_cty-xkudif IS INITIAL.
"N980402

CALL METHOD lcl_tool=>vector_to_


buffer

272
7
exporting

id_keart = id_keart

is_player = is_player

is_cty

= is_cty

is_vector = ls_kdm_delta

id_mlcct = ccs00_mlcct-kdmsl

id_elesm = ld_layershema.

11
ELSE.
"N980402

buffer

CALL METHOD lcl_tool=>vector_to_


"N980402

EXPORTING
"N980402

id_keart = id_keart
"N980402

is_player = is_player
"N980402

is_cty
= is_cty
"N980402

is_vector = ls_kdm_delta
"N980402

id_mlcct = ccs00_mlcct-kdms
"N980402

l_st

id_elesm = ld_layershema.
"N980402

ENDIF.
"N980402

LIMU
REPS
LMLCCS_UPDATEF20
00001

LIMU
REPS
LMLCCS_UPDATEF20
00003
36
1
\\\\\no_empty_blocks/////
1
\\\\\comments_not_ignored/////
1
\\\\\delta_normalized/////
3
\\\\\allowed/////
FORM
*
3
\\\\\allowed/////
FUNCTION
*
3
\\\\\allowed/////
MODULE
**
3
\\\\\allowed/////
REPORT
*
3
\\\\\allowed/////
PROGRAM
*
3
\\\\\allowed/////
FUNCTION-POOL
*
4
\\\\\allowed/////
CLASS
*
DEFINITION
4
\\\\\allowed/////
CLASS
*
IMPLEMENTATION
5
\\\\\forbidden/////
CLASS
*
DEFINITION
DEFERRED
5
\\\\\forbidden/////
CLASS

*
DEFINITION
LOAD
6
\\\\\forbidden/////
CLASS
*
DEFINITION
LOCAL
FRIENDS
3
\\\\\allowed/////
AT
LINE-SELECTION
3
\\\\\allowed/////
AT
USER-COMMAND
4
\\\\\allowed/////
AT
SELECTION-SCREEN
**
3
\\\\\allowed/////
AT
PF*
2
\\\\\allowed/////
INITIALIZATION
2
\\\\\allowed/////
START-OF-SELECTION
2
\\\\\allowed/////
END-OF-SELECTION
3
\\\\\allowed/////
TOP-OF-PAGE
**
2
\\\\\allowed/////
END-OF-PAGE
3
\\\\\allowed/////
GET
**
3
\\\\\forbidden/////
GET
BADI
3
\\\\\forbidden/////
GET
BIT
3
\\\\\forbidden/////
GET
CONNECTION
3

\\\\\forbidden/////
GET
CURSOR
3
\\\\\forbidden/////
GET
DATASET
3
\\\\\forbidden/////
GET
LOCALE
3
\\\\\forbidden/////
GET
PARAMETER
3
\\\\\forbidden/////
GET
PF-STATUS
3
\\\\\forbidden/////
GET
PROPERTY
3
\\\\\forbidden/////
GET
REFERENCE
3
\\\\\forbidden/////
GET
RUN
3
\\\\\forbidden/////
GET
TIME
1
3
CLASS
LCL_BUSINESS_INVOICE
IMPLEMENTATION
2
247
3
id_elesm = ld_layershema.

ls_kdm_delta to buffer.

1
CALL METHOD lcl_tool=>vector_to_bu
ffer

2
IF is_cty-xkudif IS INITIAL.
"N980402

CALL METHOD lcl_tool=>vector_to_


buffer

255
7
EXPORTING

id_keart = id_keart

is_player = is_player

is_cty

= is_cty

is_vector = ls_kdm_vector

id_mlcct = ccs00_mlcct-kdmsl

id_elesm = ld_layershema.

11
ELSE.
"N980402

buffer

CALL METHOD lcl_tool=>vector_to_


"N980402

EXPORTING
"N980402

id_keart = id_keart
"N980402

is_player = is_player
"N980402

is_cty
= is_cty
"N980402

is_vector = ls_kdm_vector
"N980402

id_mlcct = ccs00_mlcct-kdms
"N980402

l_st

id_elesm = ld_layershema.
"N980402

ENDIF.
"N980402

LIMU
REPS
LMR1MF5W
00001
LIMU
REPS
LMR1MF5W
00003

36
1
\\\\\no_empty_blocks/////
1
\\\\\comments_not_ignored/////
1
\\\\\delta_normalized/////
3
\\\\\allowed/////
FORM
*
3
\\\\\allowed/////
FUNCTION
*
3
\\\\\allowed/////
MODULE
**
3
\\\\\allowed/////
REPORT
*
3
\\\\\allowed/////
PROGRAM
*
3
\\\\\allowed/////
FUNCTION-POOL
*
4
\\\\\allowed/////
CLASS
*
DEFINITION
4
\\\\\allowed/////
CLASS
*
IMPLEMENTATION
5
\\\\\forbidden/////
CLASS
*
DEFINITION
DEFERRED
5
\\\\\forbidden/////
CLASS
*
DEFINITION
LOAD
6
\\\\\forbidden/////
CLASS
*
DEFINITION
LOCAL
FRIENDS

3
\\\\\allowed/////
AT
LINE-SELECTION
3
\\\\\allowed/////
AT
USER-COMMAND
4
\\\\\allowed/////
AT
SELECTION-SCREEN
**
3
\\\\\allowed/////
AT
PF*
2
\\\\\allowed/////
INITIALIZATION
2
\\\\\allowed/////
START-OF-SELECTION
2
\\\\\allowed/////
END-OF-SELECTION
3
\\\\\allowed/////
TOP-OF-PAGE
**
2
\\\\\allowed/////
END-OF-PAGE
3
\\\\\allowed/////
GET
**
3
\\\\\forbidden/////
GET
BADI
3
\\\\\forbidden/////
GET
BIT
3
\\\\\forbidden/////
GET
CONNECTION
3
\\\\\forbidden/////
GET
CURSOR
3
\\\\\forbidden/////
GET
DATASET
3
\\\\\forbidden/////
GET

LOCALE
3
\\\\\forbidden/////
GET
PARAMETER
3
\\\\\forbidden/////
GET
PF-STATUS
3
\\\\\forbidden/////
GET
PROPERTY
3
\\\\\forbidden/////
GET
REFERENCE
3
\\\\\forbidden/////
GET
RUN
3
\\\\\forbidden/////
GET
TIME
1
2
FORM
DRSEG_COMPLETE
7
40
3
s_ek08bn_flat

TYPE ek08bn,

s_rseg

TYPE rseg,

s_rbco

TYPE rbco,

s_eksel

TYPE eksel.

2
s_eksel

TYPE eksel,

s_ekbe_key

TYPE ekbe_key_doc
"N980402

ument.

139
4
ENDIF.

IF NOT ( i_trtyp = c_trtyp_a AND f_f


ast_display = c_x ).

1
IF s_drseg-pstyp EQ f_service AND
NOT s_drseg-webre IS INITIAL.

9
* Begin N980402

* At document cancellation fill document k


ey to get the exchange

* rate difference values of the original d


ocument from PO history

IF i_trtyp = c_trtyp_c.

MOVE-CORRESPONDING s_drseg TO s_
ekbe_key.

ENDIF.

* End N980402

IF s_drseg-pstyp EQ f_service AND


NOT s_drseg-webre IS INITIAL.

155
3

lfbnr

= s_drseg-lfbn

lfgja

= s_drseg-lfgj

lfpos

= s_drseg-lfpo

1
TABLES

2
i_ekbe_key
= s_ekbe_key
"N980402

TABLES

178
8
CALL FUNCTION 'ME_READ_ITEM_INVO
ICE'

EXPORTING

display

= f_display

ebelp

= s_drseg-ebel

iekko

= s_ekko

re_kursf

= i_rbkpv-kurs

re_waers

= i_rbkpv-waer

re_wwert

= i_rbkpv-buda

1
TABLES

2
i_ekbe_key
= s_ekbe_key
"N980402

TABLES

lfbnr

203
3
= s_drseg-lfbn

lfgja

= s_drseg-lfgj

lfpos

= s_drseg-lfpo

1
TABLES

2
i_ekbe_key
= s_ekbe_key
"N980402

TABLES

338
7
MOVE: s1_ek08rn-bsmng TO s_c
o-bsmng,

s1_ek08rn-netwr TO s_c
o-netwr,

s1_ek08rn-remng TO s_c
o-remng,

s1_ek08rn-bprem TO s_c
o-bprem,

s1_ek08rn-rewwr TO s_c
o-rewwr,

s1_ek08rn-refwr TO s_c
o-refwr,

s1_ek08rn-wemng TO s_c
o-wemng,

1
s1_ek08rn-bpwem TO s_c
o-bpwem.

5
s1_ek08rn-bpwem TO s_c
o-bpwem,

o-wewwr,

s1_ek08rn-wewwr TO s_c
"N980402

o-wewrb,

s1_ek08rn-wewrb TO s_c
"N980402

o-rewrb,

s1_ek08rn-rewrb TO s_c
"N980402

o-arewb.

s1_ek08rn-arewb TO s_c
"N980402

542
3
ENDIF.

MOVE-CORRESPONDING s_ek08bn TO s_ek


08bn_flat. " move without CR

MOVE-CORRESPONDING s_ek08bn_flat T
O s_drseg.

MOVE-CORRESPONDING s_rseg

1
TO s_d

rseg.

2
s_drseg-bwaer = s_ek08bn-bewae.
"N980402

MOVE-CORRESPONDING s_rseg

TO s_d

rseg.

LIMU
REPS
LMRMDF0H
00001
LIMU
REPS
LMRMDF0H
00003
36
1
\\\\\no_empty_blocks/////
1
\\\\\comments_not_ignored/////
1
\\\\\delta_normalized/////
3
\\\\\allowed/////
FORM
*
3
\\\\\allowed/////
FUNCTION
*
3
\\\\\allowed/////
MODULE
**
3
\\\\\allowed/////
REPORT
*
3
\\\\\allowed/////
PROGRAM
*
3
\\\\\allowed/////
FUNCTION-POOL
*
4

\\\\\allowed/////
CLASS
*
DEFINITION
4
\\\\\allowed/////
CLASS
*
IMPLEMENTATION
5
\\\\\forbidden/////
CLASS
*
DEFINITION
DEFERRED
5
\\\\\forbidden/////
CLASS
*
DEFINITION
LOAD
6
\\\\\forbidden/////
CLASS
*
DEFINITION
LOCAL
FRIENDS
3
\\\\\allowed/////
AT
LINE-SELECTION
3
\\\\\allowed/////
AT
USER-COMMAND
4
\\\\\allowed/////
AT
SELECTION-SCREEN
**
3
\\\\\allowed/////
AT
PF*
2
\\\\\allowed/////
INITIALIZATION
2
\\\\\allowed/////
START-OF-SELECTION
2
\\\\\allowed/////
END-OF-SELECTION
3
\\\\\allowed/////
TOP-OF-PAGE
**
2
\\\\\allowed/////

END-OF-PAGE
3
\\\\\allowed/////
GET
**
3
\\\\\forbidden/////
GET
BADI
3
\\\\\forbidden/////
GET
BIT
3
\\\\\forbidden/////
GET
CONNECTION
3
\\\\\forbidden/////
GET
CURSOR
3
\\\\\forbidden/////
GET
DATASET
3
\\\\\forbidden/////
GET
LOCALE
3
\\\\\forbidden/////
GET
PARAMETER
3
\\\\\forbidden/////
GET
PF-STATUS
3
\\\\\forbidden/////
GET
PROPERTY
3
\\\\\forbidden/////
GET
REFERENCE
3
\\\\\forbidden/////
GET
RUN
3
\\\\\forbidden/////
GET
TIME
1
2
FORM
T_DRSEG_AUFBAUEN_PRUEFEN_1
1
142
3

IF xek08rnc-kufix = 'X'.

i_rbkpv-wwert = xek08rnc-bedat.

ENDIF.

1
t_drseg-bwaer = xek08rnc-waers.

2
* the field bewae has the currency of the
PO
"N980402

t_drseg-bwaer = xek08rnc-bewae.
"N980402

LIMU
REPS
LMRMHF0A
00001
LIMU
REPS
LMRMHF0A
00003

36
1
\\\\\no_empty_blocks/////
1
\\\\\comments_not_ignored/////
1
\\\\\delta_normalized/////
3
\\\\\allowed/////
FORM
*
3
\\\\\allowed/////
FUNCTION
*
3
\\\\\allowed/////
MODULE
**
3
\\\\\allowed/////
REPORT
*
3
\\\\\allowed/////
PROGRAM
*
3
\\\\\allowed/////
FUNCTION-POOL
*
4
\\\\\allowed/////
CLASS
*
DEFINITION
4
\\\\\allowed/////
CLASS
*
IMPLEMENTATION
5
\\\\\forbidden/////
CLASS
*
DEFINITION
DEFERRED
5
\\\\\forbidden/////
CLASS
*
DEFINITION
LOAD
6
\\\\\forbidden/////
CLASS
*
DEFINITION
LOCAL
FRIENDS

3
\\\\\allowed/////
AT
LINE-SELECTION
3
\\\\\allowed/////
AT
USER-COMMAND
4
\\\\\allowed/////
AT
SELECTION-SCREEN
**
3
\\\\\allowed/////
AT
PF*
2
\\\\\allowed/////
INITIALIZATION
2
\\\\\allowed/////
START-OF-SELECTION
2
\\\\\allowed/////
END-OF-SELECTION
3
\\\\\allowed/////
TOP-OF-PAGE
**
2
\\\\\allowed/////
END-OF-PAGE
3
\\\\\allowed/////
GET
**
3
\\\\\forbidden/////
GET
BADI
3
\\\\\forbidden/////
GET
BIT
3
\\\\\forbidden/////
GET
CONNECTION
3
\\\\\forbidden/////
GET
CURSOR
3
\\\\\forbidden/////
GET
DATASET
3
\\\\\forbidden/////
GET

LOCALE
3
\\\\\forbidden/////
GET
PARAMETER
3
\\\\\forbidden/////
GET
PF-STATUS
3
\\\\\forbidden/////
GET
PROPERTY
3
\\\\\forbidden/////
GET
REFERENCE
3
\\\\\forbidden/////
GET
RUN
3
\\\\\forbidden/////
GET
TIME
1
2
FORM
MRM_DRSEG_FILL

f_shkzg

7
63
3
TYPE shkzg,

s_sako

LIKE xsako,

f_cond

TYPE i,

s_cond_cobl_mrm

1
TYPE cobl_mrm

s_cond_cobl_mrm

2
TYPE cobl_mrm

s_ekbe_key
TYPE ekbe_key
_document.
"N980402

198
3
ENHANCEMENT-POINT mrm_drseg_fill_08 SPOTS
es_saplmrmh.

ENHANCEMENT-POINT mrm_drseg_fill_09 SPOTS


es_saplmrmh.

1
*----- Daten der Input-Tabelle --------------------------------------*

9
* Begin N980402

* In case of IV-cancellation transfer docu


ment number to reading FM.

IF i_rbkpv-ivtyp = c_ivtyp_storno.

MOVE i_rbkpv-stjah TO s_ekbe_key-gjahr


.

MOVE i_rbkpv-stblg TO s_ekbe_key-belnr


.

ENDIF.

* End N980402

*----- Daten der Input-Tabelle --------------------------------------*

222
7
CALL FUNCTION 'ME_READ_ITEM_INVOIC
E'

EXPORTING

ebelp

= s_frseg-ebelp

iekko

= f_ekko

re_kursf

= i_rbkpv-kursf

re_waers

= i_rbkpv-waers

re_wwert

= i_rbkpv-budat

1
TABLES

2
i_ekbe_key
= s_ekbe_key
"N980402

TABLES

re_kursf

530
3
= i_rbkpv-kurs

re_waers

= i_rbkpv-waer

re_wwert

= i_rbkpv-buda

1
TABLES

2
i_ekbe_key
= s_ekbe_key
"N980402

TABLES

re_kursf
f

549
3
= i_rbkpv-kurs

re_waers

= i_rbkpv-waer

re_wwert

= i_rbkpv-buda

1
TABLES

2
i_ekbe_key
= s_ekbe_key
"N980402

TABLES

re_kursf

579
3
= i_rbkpv-kurs

re_waers

= i_rbkpv-waer

re_wwert

= i_rbkpv-buda

1
TABLES

2
i_ekbe_key
= s_ekbe_key
"N980402

TABLES

re_kursf

598
3
= i_rbkpv-kurs

re_waers

= i_rbkpv-waer

re_wwert

= i_rbkpv-buda

1
TABLES

2
i_ekbe_key
= s_ekbe_key
"N980402

TABLES

LIMU
REPS
LMRMPF04
00001
LIMU
REPS
LMRMPF04
00003
36
1
\\\\\no_empty_blocks/////
1
\\\\\comments_not_ignored/////
1
\\\\\delta_normalized/////
3
\\\\\allowed/////
FORM
*
3
\\\\\allowed/////
FUNCTION
*
3
\\\\\allowed/////
MODULE
**
3
\\\\\allowed/////
REPORT
*
3
\\\\\allowed/////
PROGRAM
*
3
\\\\\allowed/////
FUNCTION-POOL
*
4
\\\\\allowed/////
CLASS
*

DEFINITION
4
\\\\\allowed/////
CLASS
*
IMPLEMENTATION
5
\\\\\forbidden/////
CLASS
*
DEFINITION
DEFERRED
5
\\\\\forbidden/////
CLASS
*
DEFINITION
LOAD
6
\\\\\forbidden/////
CLASS
*
DEFINITION
LOCAL
FRIENDS
3
\\\\\allowed/////
AT
LINE-SELECTION
3
\\\\\allowed/////
AT
USER-COMMAND
4
\\\\\allowed/////
AT
SELECTION-SCREEN
**
3
\\\\\allowed/////
AT
PF*
2
\\\\\allowed/////
INITIALIZATION
2
\\\\\allowed/////
START-OF-SELECTION
2
\\\\\allowed/////
END-OF-SELECTION
3
\\\\\allowed/////
TOP-OF-PAGE
**
2
\\\\\allowed/////
END-OF-PAGE
3
\\\\\allowed/////

GET
**
3
\\\\\forbidden/////
GET
BADI
3
\\\\\forbidden/////
GET
BIT
3
\\\\\forbidden/////
GET
CONNECTION
3
\\\\\forbidden/////
GET
CURSOR
3
\\\\\forbidden/////
GET
DATASET
3
\\\\\forbidden/////
GET
LOCALE
3
\\\\\forbidden/////
GET
PARAMETER
3
\\\\\forbidden/////
GET
PF-STATUS
3
\\\\\forbidden/////
GET
PROPERTY
3
\\\\\forbidden/////
GET
REFERENCE
3
\\\\\forbidden/////
GET
RUN
3
\\\\\forbidden/////
GET
TIME
1
2
FORM
AUFBAU_CURRENCIES
2
22
6
DATA: F_BETRAG_FW LIKE DRSEG-WRBTR,

f_arewr_fw LIKE drseg-arewr,

f_rewrt_fw LIKE drseg-rewrt,

f_wewrt_fw LIKE drseg-wewrt,

f_cr LIKE drseg_cr,

tab_co TYPE mmcr_drseg_co OCCURS 1


WITH HEADER LINE,

1
tab_cr TYPE mmcr_tdrseg_cr.

2
tab_cr TYPE mmcr_tdrseg_cr,

f_awkey LIKE bkpf-awkey.


"N980402

203
3
ENDIF.

ENDIF.

ENDLOOP.

ENDFORM.
UFBAU_CURRENCIES

" A

21

* Begin N980402

* Cancelling wwert = budat for ML currenci


es from the original

* document, since the kursf for ML currenc


ies won't

* Be saved in rbkp and for big amounts and


not exact kursf

* the convert_to_local_currency need to ha


ve the same wwert

* as during the posting of invoice to get


the same amounts

IF pi_rbkpv-ivtyp = c_ivtyp_storno.

f_awkey+00(10) = pi_rbkpv-stblg.

f_awkey+10(10) = pi_rbkpv-stjah.

SELECT SINGLE * FROM bkpf WHERE awkey


= f_awkey

AND awtyp
= c_awtyp_rmrp

AND blart
<> 'ML'.

LOOP AT pto_rcurr WHERE curtp NE '00'.

pto_rcurr-datum = bkpf-wwert.

MODIFY pto_rcurr.

ENDLOOP.

ENDIF.

* End N980402

ENDFORM.
UFBAU_CURRENCIES

" A

LIMU
REPS
LMRMPF08
00003
LIMU
REPS
LMRMPF08
00005
36
1
\\\\\no_empty_blocks/////
1
\\\\\comments_not_ignored/////
1
\\\\\delta_normalized/////
3
\\\\\allowed/////
FORM
*
3
\\\\\allowed/////
FUNCTION
*
3
\\\\\allowed/////
MODULE
**
3
\\\\\allowed/////
REPORT
*
3
\\\\\allowed/////
PROGRAM
*
3
\\\\\allowed/////
FUNCTION-POOL
*
4
\\\\\allowed/////
CLASS
*
DEFINITION

4
\\\\\allowed/////
CLASS
*
IMPLEMENTATION
5
\\\\\forbidden/////
CLASS
*
DEFINITION
DEFERRED
5
\\\\\forbidden/////
CLASS
*
DEFINITION
LOAD
6
\\\\\forbidden/////
CLASS
*
DEFINITION
LOCAL
FRIENDS
3
\\\\\allowed/////
AT
LINE-SELECTION
3
\\\\\allowed/////
AT
USER-COMMAND
4
\\\\\allowed/////
AT
SELECTION-SCREEN
**
3
\\\\\allowed/////
AT
PF*
2
\\\\\allowed/////
INITIALIZATION
2
\\\\\allowed/////
START-OF-SELECTION
2
\\\\\allowed/////
END-OF-SELECTION
3
\\\\\allowed/////
TOP-OF-PAGE
**
2
\\\\\allowed/////
END-OF-PAGE
3
\\\\\allowed/////
GET

**
3
\\\\\forbidden/////
GET
BADI
3
\\\\\forbidden/////
GET
BIT
3
\\\\\forbidden/////
GET
CONNECTION
3
\\\\\forbidden/////
GET
CURSOR
3
\\\\\forbidden/////
GET
DATASET
3
\\\\\forbidden/////
GET
LOCALE
3
\\\\\forbidden/////
GET
PARAMETER
3
\\\\\forbidden/////
GET
PF-STATUS
3
\\\\\forbidden/////
GET
PROPERTY
3
\\\\\forbidden/////
GET
REFERENCE
3
\\\\\forbidden/////
GET
RUN
3
\\\\\forbidden/////
GET
TIME
1
2
FORM
ACCIT_KRED_AUFBAUEN_HW
2
119
4
READ TABLE pt_acccr WITH KEY posnr = k
red_posnr

waers = p
i_rbkpv-waers.

MOVE sy-tabix TO kred_fw_idx.

2
CALL FUNCTION 'CONVERT_TO_LOCAL_CURREN
CY'

EXPORTING

27
* Begin N980402

IF pi_rbkpv-ivtyp = c_ivtyp_storno.

READ TABLE t_currencies WITH KEY buk


rs = xrbkp_t001-bukrs

cur
tp = '10'.

* to get exact the same amounts as during


the posting of invoice

* the original wwert and kursf should be f


illed here

CALL FUNCTION 'CONVERT_TO_LOCAL_CURR


ENCY'

EXPORTING

date

= t_currencies-

foreign_amount

= pt_acccr-wrbt

datum

foreign_currency = pi_rbkpv-waer
s

local_currency
ers

= xrbkp_t001-wa

rate

= pi_rbkpv-kurs

IMPORTING

local_amount

= betrag_fw

EXCEPTIONS

error_message

= 01

OTHERS

= 02.

IF sy-subrc <> 0.

MESSAGE ID sy-msgid TYPE sy-msgty


NUMBER sy-msgno

WITH sy-msgv1 sy-msgv2 sy-msgv3


sy-msgv4

RAISING currency_error.

ENDIF.

ELSE.

* End N980402

CALL FUNCTION 'CONVERT_TO_LOCAL_CURR


ENCY'

EXPORTING

135
3
MESSAGE ID sy-msgid TYPE sy-msgty NU
MBER sy-msgno

WITH sy-msgv1 sy-msgv2 sy-msgv3 s


y-msgv4

RAISING currency_error.

2
ENDIF.

2
ENDIF.

ENDIF.

LIMU
REPS
LMRMPF0T
00002
LIMU
REPS
LMRMPF0T
00004
36
1

\\\\\no_empty_blocks/////
1
\\\\\comments_ignored/////
1
\\\\\delta_normalized/////
3
\\\\\allowed/////
FORM
*
3
\\\\\allowed/////
FUNCTION
*
3
\\\\\allowed/////
MODULE
**
3
\\\\\allowed/////
REPORT
*
3
\\\\\allowed/////
PROGRAM
*
3
\\\\\allowed/////
FUNCTION-POOL
*
4
\\\\\allowed/////
CLASS
*
DEFINITION
4
\\\\\allowed/////
CLASS
*
IMPLEMENTATION
5
\\\\\forbidden/////
CLASS
*
DEFINITION
DEFERRED
5
\\\\\forbidden/////
CLASS
*
DEFINITION
LOAD
6
\\\\\forbidden/////
CLASS
*
DEFINITION
LOCAL
FRIENDS
3
\\\\\allowed/////

AT
LINE-SELECTION
3
\\\\\allowed/////
AT
USER-COMMAND
4
\\\\\allowed/////
AT
SELECTION-SCREEN
**
3
\\\\\allowed/////
AT
PF*
2
\\\\\allowed/////
INITIALIZATION
2
\\\\\allowed/////
START-OF-SELECTION
2
\\\\\allowed/////
END-OF-SELECTION
3
\\\\\allowed/////
TOP-OF-PAGE
**
2
\\\\\allowed/////
END-OF-PAGE
3
\\\\\allowed/////
GET
**
3
\\\\\forbidden/////
GET
BADI
3
\\\\\forbidden/////
GET
BIT
3
\\\\\forbidden/////
GET
CONNECTION
3
\\\\\forbidden/////
GET
CURSOR
3
\\\\\forbidden/////
GET
DATASET
3
\\\\\forbidden/////
GET
LOCALE
3

\\\\\forbidden/////
GET
PARAMETER
3
\\\\\forbidden/////
GET
PF-STATUS
3
\\\\\forbidden/////
GET
PROPERTY
3
\\\\\forbidden/////
GET
REFERENCE
3
\\\\\forbidden/////
GET
RUN
3
\\\\\forbidden/////
GET
TIME
1
2
FORM
EKBZ_AUFBAUEN

IF ydrseg_cr-curtp = '10' OR
auswhrung

2
107
4
" H

( ydrseg_cr-curtp = '00' AND pi_rbkpv


-waers = pi_drseg-hswae ).

MOVE: ydrseg_cr-dmbtr
z-reewr,

TO ptx_ekb

ydrseg_cr-arewr_neu TO ptx_ekb
z-arewr,

1
ydrseg_cr-basis_dm TO ptx_ekb

z-dmbtr.

2
ydrseg_cr-basis_dm TO ptx_ekb
z-dmbtr,

z-kudif.

ydrseg_cr-kudif_neu TO ptx_ekb
"N980402

MOVE: ydrseg_cr-curtp
z_cr-curtp,

122
5
TO ptx_ekb

ydrseg_cr-waers

TO ptx_ekb

pi_drseg-shkzg

TO ptx_ekb

ydrseg_cr-dmbtr

TO ptx_ekb

z_cr-waers,

z_cr-shkzg,

z_cr-reewr,

ydrseg_cr-arewr_neu TO ptx_ekb
z_cr-arewr,

1
ydrseg_cr-basis_dm TO ptx_ekb

z_cr-wrbtr.

3
ydrseg_cr-basis_dm TO ptx_ekb
z_cr-wrbtr,

z_cr-kudif.

ydrseg_cr-kudif_neu TO ptx_ekb
"N980402

LIMU
REPS
LMRMPF0U
00002
LIMU
REPS
LMRMPF0U
00004
36
1
\\\\\no_empty_blocks/////
1
\\\\\comments_ignored/////
1
\\\\\delta_normalized/////
3
\\\\\allowed/////
FORM
*
3
\\\\\allowed/////
FUNCTION
*
3

\\\\\allowed/////
MODULE
**
3
\\\\\allowed/////
REPORT
*
3
\\\\\allowed/////
PROGRAM
*
3
\\\\\allowed/////
FUNCTION-POOL
*
4
\\\\\allowed/////
CLASS
*
DEFINITION
4
\\\\\allowed/////
CLASS
*
IMPLEMENTATION
5
\\\\\forbidden/////
CLASS
*
DEFINITION
DEFERRED
5
\\\\\forbidden/////
CLASS
*
DEFINITION
LOAD
6
\\\\\forbidden/////
CLASS
*
DEFINITION
LOCAL
FRIENDS
3
\\\\\allowed/////
AT
LINE-SELECTION
3
\\\\\allowed/////
AT
USER-COMMAND
4
\\\\\allowed/////
AT
SELECTION-SCREEN
**
3
\\\\\allowed/////
AT

PF*
2
\\\\\allowed/////
INITIALIZATION
2
\\\\\allowed/////
START-OF-SELECTION
2
\\\\\allowed/////
END-OF-SELECTION
3
\\\\\allowed/////
TOP-OF-PAGE
**
2
\\\\\allowed/////
END-OF-PAGE
3
\\\\\allowed/////
GET
**
3
\\\\\forbidden/////
GET
BADI
3
\\\\\forbidden/////
GET
BIT
3
\\\\\forbidden/////
GET
CONNECTION
3
\\\\\forbidden/////
GET
CURSOR
3
\\\\\forbidden/////
GET
DATASET
3
\\\\\forbidden/////
GET
LOCALE
3
\\\\\forbidden/////
GET
PARAMETER
3
\\\\\forbidden/////
GET
PF-STATUS
3
\\\\\forbidden/////
GET
PROPERTY
3
\\\\\forbidden/////
GET

REFERENCE
3
\\\\\forbidden/////
GET
RUN
3
\\\\\forbidden/////
GET
TIME
1
2
FORM
EKBE_AUFBAUEN

IF ydrseg_cr-curtp = '10' OR
auswhrung

2
131
5
" H

( ydrseg_cr-curtp = '00' AND

pi_rbkpv-waers = pi_drseg-hswae ).

MOVE: ydrseg_cr-dmbtr
e-reewr,

TO ptx_ekb

ydrseg_cr-arewr_neu TO ptx_ekb
e-arewr,

1
ydrseg_cr-basis_dm TO ptx_ekb
e-dmbtr.

ydrseg_cr-basis_dm TO ptx_ekb
e-dmbtr,

be-kudif.

ydrseg_cr-kudif_neu TO ptx_ek
"N980402

MOVE: ydrseg_cr-curtp
cr-curtp,

145
5
TO ptx_ekbe_

ydrseg_cr-waers

TO ptx_ekbe_

pi_drseg-shkzg

TO ptx_ekbe_

ydrseg_cr-dmbtr

TO ptx_ekbe_

cr-waers,

cr-shkzg,

cr-reewr,

ydrseg_cr-arewr_neu TO ptx_ekbe_
cr-arewr,

1
ydrseg_cr-basis_dm TO ptx_ekbe_
cr-wrbtr.

ydrseg_cr-basis_dm TO ptx_ekbe_
cr-wrbtr,

ydrseg_cr-kudif_neu TO ptx_ekbe
"N980402

_cr-kudif.

LIMU
REPS
LMRMPF1S
00001
LIMU
REPS
LMRMPF1S
00003
36
1
\\\\\no_empty_blocks/////
1
\\\\\comments_ignored/////
1
\\\\\delta_normalized/////
3
\\\\\allowed/////
FORM
*
3
\\\\\allowed/////
FUNCTION
*
3
\\\\\allowed/////
MODULE
**
3
\\\\\allowed/////
REPORT
*
3
\\\\\allowed/////
PROGRAM
*
3
\\\\\allowed/////
FUNCTION-POOL

*
4
\\\\\allowed/////
CLASS
*
DEFINITION
4
\\\\\allowed/////
CLASS
*
IMPLEMENTATION
5
\\\\\forbidden/////
CLASS
*
DEFINITION
DEFERRED
5
\\\\\forbidden/////
CLASS
*
DEFINITION
LOAD
6
\\\\\forbidden/////
CLASS
*
DEFINITION
LOCAL
FRIENDS
3
\\\\\allowed/////
AT
LINE-SELECTION
3
\\\\\allowed/////
AT
USER-COMMAND
4
\\\\\allowed/////
AT
SELECTION-SCREEN
**
3
\\\\\allowed/////
AT
PF*
2
\\\\\allowed/////
INITIALIZATION
2
\\\\\allowed/////
START-OF-SELECTION
2
\\\\\allowed/////
END-OF-SELECTION
3
\\\\\allowed/////
TOP-OF-PAGE
**

2
\\\\\allowed/////
END-OF-PAGE
3
\\\\\allowed/////
GET
**
3
\\\\\forbidden/////
GET
BADI
3
\\\\\forbidden/////
GET
BIT
3
\\\\\forbidden/////
GET
CONNECTION
3
\\\\\forbidden/////
GET
CURSOR
3
\\\\\forbidden/////
GET
DATASET
3
\\\\\forbidden/////
GET
LOCALE
3
\\\\\forbidden/////
GET
PARAMETER
3
\\\\\forbidden/////
GET
PF-STATUS
3
\\\\\forbidden/////
GET
PROPERTY
3
\\\\\forbidden/////
GET
REFERENCE
3
\\\\\forbidden/////
GET
RUN
3
\\\\\forbidden/////
GET
TIME
1
2
FORM
ZEILE_GENERIEREN
8

27
3
DATA: h_matnr
LIKE drseg-matnr,
" Hilfsfeld wg. Wertartikel

betrag_fw LIKE drseg-wrbtr,


" Hilfsfeld,

l_pabw_fw LIKE x169c-dmbtr,


" Preisabweichung in Belegwh

1
f_koart

LIKE drseg-koart.

f_koart

LIKE drseg-koart,

ls_t169p

TYPE t169p.
"N980402

MOVE: px_drseg-mat_kdauf
beln,

px_drseg-mat_kdpos
osnr,

61
3
TO sgnbu-v

TO sgnbu-p

pi_rbkpv-budat

TO sgnbu-repda

t,

1
px_drseg-mat_pspnr TO sgnbu-pspnr.

2
pi_rbkpv-ivtyp
TO sgnbu-ivtyp
"N980402

px_drseg-mat_pspnr TO sgnbu-pspnr.

82
4
MOVE: ydrseg_cr-waers TO sgnbu-pwaer,

ydrseg_cr-curtp TO sgnbu-curtp,

ydrseg_cr-arewr TO sgnbu-arewr,

ydrseg_cr-rewrt TO sgnbu-rewrt,

1
ydrseg_cr-wewrt TO sgnbu-wewrt.

2
ydrseg_cr-wewrt TO sgnbu-wewrt,

ydrseg_cr-kudif TO sgnbu-kudif.
"N980402

94
3
IF pi_rbkpv-waers = px_drseg-hswae.

ydrseg_cr-dmbtr = px_drseg-wrbtr.

ELSE.

1
CALL FUNCTION 'CONVERT_TO_LOCAL_CU
RRENCY'

26
* Begin N980402

IF pi_rbkpv-ivtyp = c_ivtyp_storno
.

READ TABLE t_currencies WITH KEY


bukrs = px_drseg-bukrs

curtp = ydrseg_cr-curtp.

* to get exact the same amounts as during


the posting of invoice

* the original wwert and kursf should be f


illed here

CALL FUNCTION 'CONVERT_TO_LOCAL_


CURRENCY'

EXPORTING

date
ies-datum

= t_currenc

foreign_amount

= px_drseg-

wrbtr

foreign_currency = pi_rbkpvwaers

local_currency

= px_drseg-

rate

= px_drseg-

hswae

kursf

IMPORTING

local_amount

= ydrseg_cr

-dmbtr

EXCEPTIONS

error_message

= 01

OTHERS

= 02.

IF sy-subrc <> 0.

MESSAGE ID sy-msgid TYPE sy-ms


gty NUMBER sy-msgno

WITH sy-msgv1 sy-msgv2 sy-m


sgv3 sy-msgv4

RAISING currency_error.

ENDIF.

ELSE.

* End N980402

CALL FUNCTION 'CONVERT_TO_LOCAL_


CURRENCY'

112

5
MESSAGE ID sy-msgid TYPE sy-msgt
y NUMBER sy-msgno

WITH sy-msgv1 sy-msgv2 sy-msg


v3 sy-msgv4

RAISING currency_error.

ENDIF.

ENDIF.

1
px_drseg-dmbtr = ydrseg_cr-dmbtr.

2
ENDIF.

px_drseg-dmbtr = ydrseg_cr-dmbtr.

215

4
CALL FUNCTION 'MR_POSTING_GENERATE'

EXPORTING

i_bustw

= px_drseg-bustw

i_sgnbu

= sgnbu

1
TABLES

3
IMPORTING
"N980402

e_t169p

= ls_t169p
"N980402

TABLES

237

6
PERFORM strukt_material_preisabw TABLE
x169c

USING
pi_rbkpv pi_xnullpos

ydrseg_cr

CHANG
ING l_pabw_fw px_drseg.

*------- Whrung, AWEWR modifizieren, KTOS


L setzen
------------*

1
LOOP AT x169c WHERE bustw = px_drseg-b
ustw AND

4
* Initialize the new exchange rate diffe
rence value.
"N980402

ydrseg_cr-kudif_neu = 0.

"N980402

LOOP AT x169c WHERE bustw = px_drseg-b


ustw AND

260
3
ENDIF.

IF x169c_cr-vorsl IS INITIAL.

MESSAGE e434.

3
ENDIF.

MOVE: ydrseg_cr-curtp TO x169c_cr-cu


rtp,

22
ENDIF.

* Begin N980402

* Transfer the new calculated exchange rat


e difference value to

* the PO history with sign, if exchange ra


te difference handling

* is active for the actual currency type.

IF x169c-vorsl = 'KDM' AND

( ( ydrseg_cr-curtp = ls_t169p-ct
hw AND

ls_t169p-kdhw IS NOT INITIAL


)

OR

( ydrseg_cr-curtp = ls_t169p-ct
ml1 AND

ls_t169p-kdml1 IS NOT INITIAL


) OR

( ydrseg_cr-curtp = ls_t169p-ct
ml2 AND

ls_t169p-kdml2 IS NOT INITIAL


) ).

IF x169c-shkzg = px_drseg-shkzg.

ydrseg_cr-kudif_neu = x169c-dmbt
r.

ELSE.

ydrseg_cr-kudif_neu = 0 - x169cdmbtr.

ENDIF.

ENDIF.

* End N980402

MOVE: ydrseg_cr-curtp TO x169c_cr-cu


rtp,

LIMU
REPS
LMRMPF1Y
00001
LIMU
REPS
LMRMPF1Y
00003
36
1
\\\\\no_empty_blocks/////
1

\\\\\comments_not_ignored/////
1
\\\\\delta_normalized/////
3
\\\\\allowed/////
FORM
*
3
\\\\\allowed/////
FUNCTION
*
3
\\\\\allowed/////
MODULE
**
3
\\\\\allowed/////
REPORT
*
3
\\\\\allowed/////
PROGRAM
*
3
\\\\\allowed/////
FUNCTION-POOL
*
4
\\\\\allowed/////
CLASS
*
DEFINITION
4
\\\\\allowed/////
CLASS
*
IMPLEMENTATION
5
\\\\\forbidden/////
CLASS
*
DEFINITION
DEFERRED
5
\\\\\forbidden/////
CLASS
*
DEFINITION
LOAD
6
\\\\\forbidden/////
CLASS
*
DEFINITION
LOCAL
FRIENDS
3
\\\\\allowed/////
AT
LINE-SELECTION

3
\\\\\allowed/////
AT
USER-COMMAND
4
\\\\\allowed/////
AT
SELECTION-SCREEN
**
3
\\\\\allowed/////
AT
PF*
2
\\\\\allowed/////
INITIALIZATION
2
\\\\\allowed/////
START-OF-SELECTION
2
\\\\\allowed/////
END-OF-SELECTION
3
\\\\\allowed/////
TOP-OF-PAGE
**
2
\\\\\allowed/////
END-OF-PAGE
3
\\\\\allowed/////
GET
**
3
\\\\\forbidden/////
GET
BADI
3
\\\\\forbidden/////
GET
BIT
3
\\\\\forbidden/////
GET
CONNECTION
3
\\\\\forbidden/////
GET
CURSOR
3
\\\\\forbidden/////
GET
DATASET
3
\\\\\forbidden/////
GET
LOCALE
3
\\\\\forbidden/////
GET

PARAMETER
3
\\\\\forbidden/////
GET
PF-STATUS
3
\\\\\forbidden/////
GET
PROPERTY
3
\\\\\forbidden/////
GET
REFERENCE
3
\\\\\forbidden/////
GET
RUN
3
\\\\\forbidden/////
GET
TIME
1
2
FORM
ACCIT_AUFBAUEN
4
35
3
s_t001

LIKE t001,

s_xsako

LIKE xsako,

f_idx

TYPE cnt02,

s_bset

LIKE bset.

s_bset

LIKE bset,

f_komok(3) TYPE c.
"N980402

240
3
MOVE pi_drseg-ebeln TO wrxmod-ebeln.

MOVE pi_drseg-ebelp TO wrxmod-ebelp.

ENHANCEMENT-POINT accit_aufbauen_03 SPOTS


es_saplmrmp.

CALL FUNCTION 'MR_ACCOUNT_ASSIGNMENT


'

34

CLEAR f_komok.
"N980402

IF ptx_accit-ktosl = 'KDM'.
"N980402

IF NOT pi_drseg-knttp IS INITIAL.


"N980402

f_komok = 'ERA'.
"N980402

ELSE.
"N980402

f_komok = 'ERN'.
"N980402

ENDIF.
"N980402

ENDIF.
"N980402

CALL FUNCTION 'MR_ACCOUNT_ASSIGNMENT


'

EXPORTING

bewertungsklasse

= pi_drse

bewertung_modif

= pi_drse

kontenplan

= pi_drse

konto_modif
"N980402

= f_komok

g-bklas

g-bwmod

g-ktopl

soll_haben_kennzeichen = x169c_c
r-shkzg

vorgangsschluessel
r-vorsl

= x169c_c

i_wrxmod

= wrxmod

is_enhancement
mr_account_assignment"IS2ERP

= ls_isi_

IMPORTING

buchungsschluessel

= ptx_acc

konto

= xkonto

it-bschl

CHANGING

cs_enhancement
mr_account_assignment"IS2ERP

EXCEPTIONS

= ls_isc_

error_message

= 01

OTHERS

= 02.

* Begin N980402

* read the setting for KDM without komok i


f there is no entry with komok

IF sy-subrc <> 0 AND ptx_accit-ktosl


= 'KDM'.

CLEAR f_komok.

CALL FUNCTION 'MR_ACCOUNT_ASSIGNME


NT'

246
4
EXPORTING

bewertungsklasse

= pi_drse

bewertung_modif

= pi_drse

kontenplan

= pi_drse

konto_modif

= '

g-bklas

g-bwmod

g-ktopl

ok

konto_modif
"N980402

'

1
= f_kom

259
3
EXCEPTIONS

error_message

= 01

OTHERS

= 02.

1
ENHANCEMENT-POINT accit_aufbauen_04 SPOTS
es_saplmrmp.

4
ENDIF.

* End

N980402

ENHANCEMENT-POINT accit_aufbauen_04 SPOTS


es_saplmrmp.

LIMU
REPS
LMRMPTOP
00002
LIMU
REPS
LMRMPTOP
00004
36
1

\\\\\no_empty_blocks/////
1
\\\\\comments_ignored/////
1
\\\\\delta_normalized/////
3
\\\\\allowed/////
FORM
*
3
\\\\\allowed/////
FUNCTION
*
3
\\\\\allowed/////
MODULE
**
3
\\\\\allowed/////
REPORT
*
3
\\\\\allowed/////
PROGRAM
*
3
\\\\\allowed/////
FUNCTION-POOL
*
4
\\\\\allowed/////
CLASS
*
DEFINITION
4
\\\\\allowed/////
CLASS
*
IMPLEMENTATION
5
\\\\\forbidden/////
CLASS
*
DEFINITION
DEFERRED
5
\\\\\forbidden/////
CLASS
*
DEFINITION
LOAD
6
\\\\\forbidden/////
CLASS
*
DEFINITION
LOCAL
FRIENDS
3
\\\\\allowed/////

AT
LINE-SELECTION
3
\\\\\allowed/////
AT
USER-COMMAND
4
\\\\\allowed/////
AT
SELECTION-SCREEN
**
3
\\\\\allowed/////
AT
PF*
2
\\\\\allowed/////
INITIALIZATION
2
\\\\\allowed/////
START-OF-SELECTION
2
\\\\\allowed/////
END-OF-SELECTION
3
\\\\\allowed/////
TOP-OF-PAGE
**
2
\\\\\allowed/////
END-OF-PAGE
3
\\\\\allowed/////
GET
**
3
\\\\\forbidden/////
GET
BADI
3
\\\\\forbidden/////
GET
BIT
3
\\\\\forbidden/////
GET
CONNECTION
3
\\\\\forbidden/////
GET
CURSOR
3
\\\\\forbidden/////
GET
DATASET
3
\\\\\forbidden/////
GET
LOCALE
3

\\\\\forbidden/////
GET
PARAMETER
3
\\\\\forbidden/////
GET
PF-STATUS
3
\\\\\forbidden/////
GET
PROPERTY
3
\\\\\forbidden/////
GET
REFERENCE
3
\\\\\forbidden/////
GET
RUN
3
\\\\\forbidden/////
GET
TIME
1
2
FUNCTION-POOL
MRMP

T169P,
rameter Rechnungsprfung

T169V,

1
24
3
"Pa

" P

arameter

VF_KRED,
iew Kreditor

" V

1
WRXMOD.

WRXMOD,

bkpf.

"N9

80402

LIMU
REPS
LOMMLF01
99997
LIMU
REPS
LOMMLF01
00002
36
1
\\\\\no_empty_blocks/////
1
\\\\\comments_not_ignored/////
1
\\\\\delta_normalized/////
3
\\\\\allowed/////
FORM
*
3
\\\\\allowed/////
FUNCTION
*
3
\\\\\allowed/////
MODULE
**
3
\\\\\allowed/////
REPORT
*
3
\\\\\allowed/////
PROGRAM
*
3
\\\\\allowed/////
FUNCTION-POOL

*
4
\\\\\allowed/////
CLASS
*
DEFINITION
4
\\\\\allowed/////
CLASS
*
IMPLEMENTATION
5
\\\\\forbidden/////
CLASS
*
DEFINITION
DEFERRED
5
\\\\\forbidden/////
CLASS
*
DEFINITION
LOAD
6
\\\\\forbidden/////
CLASS
*
DEFINITION
LOCAL
FRIENDS
3
\\\\\allowed/////
AT
LINE-SELECTION
3
\\\\\allowed/////
AT
USER-COMMAND
4
\\\\\allowed/////
AT
SELECTION-SCREEN
**
3
\\\\\allowed/////
AT
PF*
2
\\\\\allowed/////
INITIALIZATION
2
\\\\\allowed/////
START-OF-SELECTION
2
\\\\\allowed/////
END-OF-SELECTION
3
\\\\\allowed/////
TOP-OF-PAGE
**

2
\\\\\allowed/////
END-OF-PAGE
3
\\\\\allowed/////
GET
**
3
\\\\\forbidden/////
GET
BADI
3
\\\\\forbidden/////
GET
BIT
3
\\\\\forbidden/////
GET
CONNECTION
3
\\\\\forbidden/////
GET
CURSOR
3
\\\\\forbidden/////
GET
DATASET
3
\\\\\forbidden/////
GET
LOCALE
3
\\\\\forbidden/////
GET
PARAMETER
3
\\\\\forbidden/////
GET
PF-STATUS
3
\\\\\forbidden/////
GET
PROPERTY
3
\\\\\forbidden/////
GET
REFERENCE
3
\\\\\forbidden/////
GET
RUN
3
\\\\\forbidden/////
GET
TIME
1
2
FORM
CHECK_EXCHANGE_RATE
1

1
0
0
92
*---------------------------------------------------------------------*

***INCLUDE LOMMLF01 .

*---------------------------------------------------------------------*

* Begin N980402

*&--------------------------------------------------------------------*

*&

Form check_exchange_rate

*&--------------------------------------------------------------------*

text

*---------------------------------------------------------------------*

FORM check_exchange_rate.

DATA: t_curtp TYPE TABLE OF cki_ml_cty,

s_curtp TYPE cki_ml_cty,

f_lines TYPE i,

f_flag_ml1 TYPE i,

f_flag_ml2 TYPE i,

f_gesamtflags TYPE i,

f_lines_curtp TYPE i.

* Fill company currency type for transport


into database.

MOVE '10' TO v_169p_pk-cthw.

IF v_169p_pk-kdml1 = 'X' OR

v_169p_pk-kdml2 = 'X'.

CALL FUNCTION 'GET_BUKRS_ML_CURRENCY_I

NFO'

EXPORTING

i_bukrs

= v_169p_pk-

bukrs

IMPORTING

et_curtp

= t_curtp

EXCEPTIONS

wrong_input

= 1

ml_inactive

= 2

currencies_not_unique = 3.

* Fill ML currency types for transport i


nto database.

LOOP AT t_curtp INTO s_curtp.

CASE sy-tabix.

WHEN 2.

MOVE s_curtp-curtp TO v_169p_pkctml1.

WHEN 3.

MOVE s_curtp-curtp TO v_169p_pkctml2.

ENDCASE.

ENDLOOP.

IF sy-subrc NE 0.

MESSAGE ID sy-msgid TYPE sy-msgty NU


MBER sy-msgno

WITH sy-msgv1 sy-msgv2


sy-msgv3 sy-msgv4.

ELSE.

CHECK NOT v_169p_pk-xplcu IS INITIAL


.

CHECK NOT v_169p_pk-kdhw IS INITIAL.

DESCRIBE TABLE t_curtp LINES f_lines


.

CLEAR: f_flag_ml1, f_flag_ml2.

IF v_169p_pk-kdml1 = 'X'.

f_flag_ml1 = 1.

ENDIF.

IF v_169p_pk-kdml2 = 'X'.

f_flag_ml2 = 1.

ENDIF.

* Count how much flags are set and how muc


h are

* expected since not all currencies may be


active.

f_gesamtflags = f_flag_ml1 + f_flag_


ml2 + 1.

IF f_lines = f_gesamtflags.

MESSAGE e529(om).

ENDIF.

ENDIF.

ELSE.

CHECK NOT v_169p_pk-xplcu IS INITIAL.

CALL FUNCTION 'GET_BUKRS_ML_CURRENCY_I


NFO'

EXPORTING

i_bukrs

IMPORTING

= v_169p_pk-bukrs

et_curtp

= t_curtp

EXCEPTIONS

error_message = 4.

IF sy-subrc = 4.

DESCRIBE TABLE t_curtp LINES f_lines


_curtp.

IF v_169p_pk-kdhw = 'X' AND f_lines_


curtp = 0.

MESSAGE e529(om).

ENDIF.

ENDIF.

ENDIF.

ENDFORM.
ge_rate

* End N980402

LIMU
REPS
LOMMLI03
99997
LIMU
REPS
LOMMLI03

" check_exchan

00002
36
1
\\\\\no_empty_blocks/////
1
\\\\\comments_not_ignored/////
1
\\\\\delta_normalized/////
3
\\\\\allowed/////
FORM
*
3
\\\\\allowed/////
FUNCTION
*
3
\\\\\allowed/////
MODULE
**
3
\\\\\allowed/////
REPORT
*
3
\\\\\allowed/////
PROGRAM
*
3
\\\\\allowed/////
FUNCTION-POOL
*
4
\\\\\allowed/////
CLASS
*
DEFINITION
4
\\\\\allowed/////
CLASS
*
IMPLEMENTATION
5
\\\\\forbidden/////
CLASS
*
DEFINITION
DEFERRED
5
\\\\\forbidden/////
CLASS
*
DEFINITION
LOAD
6
\\\\\forbidden/////
CLASS

*
DEFINITION
LOCAL
FRIENDS
3
\\\\\allowed/////
AT
LINE-SELECTION
3
\\\\\allowed/////
AT
USER-COMMAND
4
\\\\\allowed/////
AT
SELECTION-SCREEN
**
3
\\\\\allowed/////
AT
PF*
2
\\\\\allowed/////
INITIALIZATION
2
\\\\\allowed/////
START-OF-SELECTION
2
\\\\\allowed/////
END-OF-SELECTION
3
\\\\\allowed/////
TOP-OF-PAGE
**
2
\\\\\allowed/////
END-OF-PAGE
3
\\\\\allowed/////
GET
**
3
\\\\\forbidden/////
GET
BADI
3
\\\\\forbidden/////
GET
BIT
3
\\\\\forbidden/////
GET
CONNECTION
3
\\\\\forbidden/////
GET
CURSOR
3
\\\\\forbidden/////
GET

DATASET
3
\\\\\forbidden/////
GET
LOCALE
3
\\\\\forbidden/////
GET
PARAMETER
3
\\\\\forbidden/////
GET
PF-STATUS
3
\\\\\forbidden/////
GET
PROPERTY
3
\\\\\forbidden/////
GET
REFERENCE
3
\\\\\forbidden/////
GET
RUN
3
\\\\\forbidden/////
GET
TIME
1
3
MODULE
CHECK_EXCHANGE_RATE
INPUT
1
1
0
0
15
*---------------------------------------------------------------------*

***INCLUDE LOMMLI03 .

*---------------------------------------------------------------------*

* Begin N980402

*&--------------------------------------------------------------------*

*&

Module CHECK_EXCHANGE_RATE INPUT

*&--------------------------------------------------------------------*

text

*---------------------------------------------------------------------*

MODULE check_exchange_rate INPUT.

PERFORM check_exchange_rate.

ENDMODULE.
E_RATE INPUT

" CHECK_EXCHANG

* End N980402

LIMU
REPS
LOMMLO01
99997
LIMU
REPS
LOMMLO01
00002
36
1
\\\\\no_empty_blocks/////
1
\\\\\comments_not_ignored/////
1
\\\\\delta_normalized/////
3
\\\\\allowed/////
FORM
*
3
\\\\\allowed/////
FUNCTION
*
3
\\\\\allowed/////
MODULE
**
3

\\\\\allowed/////
REPORT
*
3
\\\\\allowed/////
PROGRAM
*
3
\\\\\allowed/////
FUNCTION-POOL
*
4
\\\\\allowed/////
CLASS
*
DEFINITION
4
\\\\\allowed/////
CLASS
*
IMPLEMENTATION
5
\\\\\forbidden/////
CLASS
*
DEFINITION
DEFERRED
5
\\\\\forbidden/////
CLASS
*
DEFINITION
LOAD
6
\\\\\forbidden/////
CLASS
*
DEFINITION
LOCAL
FRIENDS
3
\\\\\allowed/////
AT
LINE-SELECTION
3
\\\\\allowed/////
AT
USER-COMMAND
4
\\\\\allowed/////
AT
SELECTION-SCREEN
**
3
\\\\\allowed/////
AT
PF*
2
\\\\\allowed/////
INITIALIZATION

2
\\\\\allowed/////
START-OF-SELECTION
2
\\\\\allowed/////
END-OF-SELECTION
3
\\\\\allowed/////
TOP-OF-PAGE
**
2
\\\\\allowed/////
END-OF-PAGE
3
\\\\\allowed/////
GET
**
3
\\\\\forbidden/////
GET
BADI
3
\\\\\forbidden/////
GET
BIT
3
\\\\\forbidden/////
GET
CONNECTION
3
\\\\\forbidden/////
GET
CURSOR
3
\\\\\forbidden/////
GET
DATASET
3
\\\\\forbidden/////
GET
LOCALE
3
\\\\\forbidden/////
GET
PARAMETER
3
\\\\\forbidden/////
GET
PF-STATUS
3
\\\\\forbidden/////
GET
PROPERTY
3
\\\\\forbidden/////
GET
REFERENCE
3
\\\\\forbidden/////
GET

RUN
3
\\\\\forbidden/////
GET
TIME
1
3
MODULE
LIST_EXCHANGE_RATE
OUTPUT
1
1
0
0
61
* Begin N980402

*---------------------------------------------------------------------*

***INCLUDE LOMMLO01

*---------------------------------------------------------------------*

*&--------------------------------------------------------------------*

*&

Module LIST_EXCHANGE_RATE OUTPUT

*&--------------------------------------------------------------------*

text

*---------------------------------------------------------------------*

module LIST_EXCHANGE_RATE output.

DATA: lt_curtp TYPE TABLE OF cki_ml_cty,

ls_curtp TYPE cki_ml_cty,

f_counter TYPE i VALUE 0,

f_number_curtp TYPE i.

CLEAR: v_169p_pk-ctml1, v_169p_pk-ctml2.

CLEAR: lt_curtp. REFRESH: lt_curtp.

LOOP AT SCREEN.

IF ( screen-name = 'V_169P_PK-KDML1' O
R

screen-name = 'V_169P_PK-KDML2' )
.

CALL FUNCTION 'GET_BUKRS_ML_CURRENCY


_INFO'

EXPORTING

i_bukrs

= v_169p_pk-bukrs

IMPORTING

et_curtp

= lt_curtp

EXCEPTIONS

ml_inactive

= 2

error_message = 8.

IF sy-subrc = 2.

IF v_169p_pk-kdml1 IS INITIAL AND

screen-name = 'V_169P_PK-KDML1'.

screen-input = 0.

ENDIF.

IF v_169p_pk-kdml2 IS INITIAL AND


screen-name = 'V_169P_PK-KDML2'.

screen-input = 0.

ENDIF.

ELSE.

CLEAR: f_counter.

LOOP AT lt_curtp INTO ls_curtp WHE


RE curtp NE '10'.

IF f_counter = 0.

MOVE ls_curtp-curtp TO v_169p_


pk-ctml1.

ELSE.

MOVE ls_curtp-curtp TO v_169p_


pk-ctml2.

ENDIF.

f_counter = f_counter + 1.

ENDLOOP.

ENDIF.

MODIFY SCREEN.

ELSEIF screen-name = 'V_169P_PK-CTHW'.

MOVE '10' TO v_169p_pk-cthw.

MODIFY SCREEN.

ENDIF.

ENDLOOP.

endmodule.
_RATE OUTPUT

" LIST_EXCHANGE

* End N980402

LIMU
REPS
MM07MCWS
00005
LIMU
REPS
MM07MCWS
00007
36
1
\\\\\no_empty_blocks/////
1
\\\\\comments_not_ignored/////
1
\\\\\delta_normalized/////
3
\\\\\allowed/////
FORM
*
3
\\\\\allowed/////
FUNCTION
*
3
\\\\\allowed/////
MODULE
**
3
\\\\\allowed/////
REPORT

*
3
\\\\\allowed/////
PROGRAM
*
3
\\\\\allowed/////
FUNCTION-POOL
*
4
\\\\\allowed/////
CLASS
*
DEFINITION
4
\\\\\allowed/////
CLASS
*
IMPLEMENTATION
5
\\\\\forbidden/////
CLASS
*
DEFINITION
DEFERRED
5
\\\\\forbidden/////
CLASS
*
DEFINITION
LOAD
6
\\\\\forbidden/////
CLASS
*
DEFINITION
LOCAL
FRIENDS
3
\\\\\allowed/////
AT
LINE-SELECTION
3
\\\\\allowed/////
AT
USER-COMMAND
4
\\\\\allowed/////
AT
SELECTION-SCREEN
**
3
\\\\\allowed/////
AT
PF*
2
\\\\\allowed/////
INITIALIZATION
2
\\\\\allowed/////

START-OF-SELECTION
2
\\\\\allowed/////
END-OF-SELECTION
3
\\\\\allowed/////
TOP-OF-PAGE
**
2
\\\\\allowed/////
END-OF-PAGE
3
\\\\\allowed/////
GET
**
3
\\\\\forbidden/////
GET
BADI
3
\\\\\forbidden/////
GET
BIT
3
\\\\\forbidden/////
GET
CONNECTION
3
\\\\\forbidden/////
GET
CURSOR
3
\\\\\forbidden/////
GET
DATASET
3
\\\\\forbidden/////
GET
LOCALE
3
\\\\\forbidden/////
GET
PARAMETER
3
\\\\\forbidden/////
GET
PF-STATUS
3
\\\\\forbidden/////
GET
PROPERTY
3
\\\\\forbidden/////
GET
REFERENCE
3
\\\\\forbidden/////
GET
RUN
3

\\\\\forbidden/////
GET
TIME
1
0
1
168
3
VORSL_KBS LIKE T156W-VORSL VAL
UE 'KBS', "Kontierte BE-Pos.

VORSL_KON LIKE T156W-VORSL VAL


UE 'KON', "Konsignation

VORSL_PRD LIKE T156W-VORSL VAL


UE 'PRD', "Preisdifferenz

2
VORSL_WRX LIKE T156W-VORSL VAL
UE 'WRX'. "WE/RE Verrechnung

3
vorsl_wrx LIKE t156w-vorsl VAL
UE 'WRX', "WE/RE Verrechnung

vorsl_kdm LIKE t156w-vorsl VAL


UE 'KDM', "Kursdifferenz N980402

buzid_p

LIKE t156w-buzid VAL

UE 'P'.

"N980402

LIMU
REPS
MM07MFB7_BESTELLENTWICKLUNG_GE
00001
LIMU
REPS
MM07MFB7_BESTELLENTWICKLUNG_GE
00003
36
1
\\\\\no_empty_blocks/////
1
\\\\\comments_not_ignored/////
1
\\\\\delta_normalized/////
3
\\\\\allowed/////
FORM
*
3
\\\\\allowed/////
FUNCTION
*
3
\\\\\allowed/////
MODULE
**
3
\\\\\allowed/////
REPORT
*
3
\\\\\allowed/////
PROGRAM
*
3
\\\\\allowed/////
FUNCTION-POOL
*
4
\\\\\allowed/////
CLASS
*
DEFINITION
4
\\\\\allowed/////

CLASS
*
IMPLEMENTATION
5
\\\\\forbidden/////
CLASS
*
DEFINITION
DEFERRED
5
\\\\\forbidden/////
CLASS
*
DEFINITION
LOAD
6
\\\\\forbidden/////
CLASS
*
DEFINITION
LOCAL
FRIENDS
3
\\\\\allowed/////
AT
LINE-SELECTION
3
\\\\\allowed/////
AT
USER-COMMAND
4
\\\\\allowed/////
AT
SELECTION-SCREEN
**
3
\\\\\allowed/////
AT
PF*
2
\\\\\allowed/////
INITIALIZATION
2
\\\\\allowed/////
START-OF-SELECTION
2
\\\\\allowed/////
END-OF-SELECTION
3
\\\\\allowed/////
TOP-OF-PAGE
**
2
\\\\\allowed/////
END-OF-PAGE
3
\\\\\allowed/////
GET
**
3

\\\\\forbidden/////
GET
BADI
3
\\\\\forbidden/////
GET
BIT
3
\\\\\forbidden/////
GET
CONNECTION
3
\\\\\forbidden/////
GET
CURSOR
3
\\\\\forbidden/////
GET
DATASET
3
\\\\\forbidden/////
GET
LOCALE
3
\\\\\forbidden/////
GET
PARAMETER
3
\\\\\forbidden/////
GET
PF-STATUS
3
\\\\\forbidden/////
GET
PROPERTY
3
\\\\\forbidden/////
GET
REFERENCE
3
\\\\\forbidden/////
GET
RUN
3
\\\\\forbidden/////
GET
TIME
1
2
FORM
BESTELLENTWICKLUNG_GENERIEREN
1
59
3
XEKBE-ERNAM = XMKPF-USNAM.

XEKBE-MENGE = XMSEG-BSTMG.

XEKBE-DMBTR = XVM07M-AWEWR.

1
XEKBE-HSWAE = XMSEG-WAERS.

4
* zdm07m-kudif can only filled if exchan
ge rate
"N980402

difference handling in OMRW is active


"N980402

xekbe-kudif = zdm07m-kudif.
"N980402

XEKBE-HSWAE = XMSEG-WAERS.

LIMU
REPS
MM07MFF9_F_SEGMENTE_BEWERTEN
00001

LIMU
REPS
MM07MFF9_F_SEGMENTE_BEWERTEN
00003
36
1
\\\\\no_empty_blocks/////
1
\\\\\comments_not_ignored/////
1
\\\\\delta_normalized/////
3
\\\\\allowed/////
FORM
*
3
\\\\\allowed/////
FUNCTION
*
3
\\\\\allowed/////
MODULE
**
3
\\\\\allowed/////
REPORT
*
3
\\\\\allowed/////
PROGRAM
*
3
\\\\\allowed/////
FUNCTION-POOL
*
4
\\\\\allowed/////
CLASS
*
DEFINITION
4
\\\\\allowed/////
CLASS
*
IMPLEMENTATION
5
\\\\\forbidden/////
CLASS
*
DEFINITION
DEFERRED
5
\\\\\forbidden/////
CLASS
*
DEFINITION

LOAD
6
\\\\\forbidden/////
CLASS
*
DEFINITION
LOCAL
FRIENDS
3
\\\\\allowed/////
AT
LINE-SELECTION
3
\\\\\allowed/////
AT
USER-COMMAND
4
\\\\\allowed/////
AT
SELECTION-SCREEN
**
3
\\\\\allowed/////
AT
PF*
2
\\\\\allowed/////
INITIALIZATION
2
\\\\\allowed/////
START-OF-SELECTION
2
\\\\\allowed/////
END-OF-SELECTION
3
\\\\\allowed/////
TOP-OF-PAGE
**
2
\\\\\allowed/////
END-OF-PAGE
3
\\\\\allowed/////
GET
**
3
\\\\\forbidden/////
GET
BADI
3
\\\\\forbidden/////
GET
BIT
3
\\\\\forbidden/////
GET
CONNECTION
3
\\\\\forbidden/////
GET

CURSOR
3
\\\\\forbidden/////
GET
DATASET
3
\\\\\forbidden/////
GET
LOCALE
3
\\\\\forbidden/////
GET
PARAMETER
3
\\\\\forbidden/////
GET
PF-STATUS
3
\\\\\forbidden/////
GET
PROPERTY
3
\\\\\forbidden/////
GET
REFERENCE
3
\\\\\forbidden/////
GET
RUN
3
\\\\\forbidden/////
GET
TIME
1
2
FORM
F-SEGMENTE_BEWERTEN
3
61
3
IF F-XBNK = X.

XAUTO = X.

ENDIF.

2
IF x156w-vorsl NE vorsl_kdm.
"N980402

66
4
ENHANCEMENT-SECTION
MM07MFF9_F_SEGMENT
E_BEWERTE_01 SPOTS ES_SAPMM07M.

LOOP AT XZCXCB WHERE STUNR = YEKBNK-STUNR

AND

ZAEHK = YEKBNK-ZA

AND

XAUTO = XAUTO.

EHK

AND

2
xauto = xau

AND
"N980402

vorsl NE vo

to

rsl_kdm.

89
4
ENDLOOP.

END-ENHANCEMENT-SECTION.

11

IF ML10 IS INITIAL.

MESSAGE E001 WITH 'XZCXCB' YEKBNK-ST


UNR YEKBNK-ZAEHK.

ENDIF.

ENDIF.

ENDFORM.

29
IF ml10 IS INITIAL.

MESSAGE e001 WITH 'XZCXCB' yekbnkstunr yekbnk-zaehk.

ENDIF.

* Begin N980402

ELSEIF x156w-vorsl = vorsl_kdm.

LOOP AT xzcxcb WHERE stunr = yekbnkstunr

AND

zaehk = yek

AND

xauto = xau

bnk-zaehk

to

AND

vorsl = vor

sl_kdm.

MOVE-CORRESPONDING xzcxcb TO yaccc


r.

IF xzcxcb-shkzg = s.

yacccr-wrbtr = xzcxcb-dmbtr.

ELSE.

yacccr-wrbtr = 0 - xzcxcb-dmbtr.

ENDIF.

IF f-shkzg IS INITIAL.

f-shkzg = xzcxcb-shkzg.

ELSEIF ( ( f-shkzg = s AND xzcxcbshkzg = h ) OR

( f-shkzg = h AND xzcxcbshkzg = s ) ).

f-shkzg = x.

ENDIF.

APPEND yacccr.

ENDLOOP.

ENDIF.

* End N980402

ENDIF.

ENDFORM.
WERTEN

"F-SEGMENTE_BE

LIMU
REPS
MM07MFF9_F_SEGMENTE_ERSTELLEN
00003
LIMU
REPS
MM07MFF9_F_SEGMENTE_ERSTELLEN
00005
36
1
\\\\\no_empty_blocks/////
1
\\\\\comments_not_ignored/////
1
\\\\\delta_normalized/////
3
\\\\\allowed/////
FORM
*
3
\\\\\allowed/////
FUNCTION
*

3
\\\\\allowed/////
MODULE
**
3
\\\\\allowed/////
REPORT
*
3
\\\\\allowed/////
PROGRAM
*
3
\\\\\allowed/////
FUNCTION-POOL
*
4
\\\\\allowed/////
CLASS
*
DEFINITION
4
\\\\\allowed/////
CLASS
*
IMPLEMENTATION
5
\\\\\forbidden/////
CLASS
*
DEFINITION
DEFERRED
5
\\\\\forbidden/////
CLASS
*
DEFINITION
LOAD
6
\\\\\forbidden/////
CLASS
*
DEFINITION
LOCAL
FRIENDS
3
\\\\\allowed/////
AT
LINE-SELECTION
3
\\\\\allowed/////
AT
USER-COMMAND
4
\\\\\allowed/////
AT
SELECTION-SCREEN
**
3
\\\\\allowed/////

AT
PF*
2
\\\\\allowed/////
INITIALIZATION
2
\\\\\allowed/////
START-OF-SELECTION
2
\\\\\allowed/////
END-OF-SELECTION
3
\\\\\allowed/////
TOP-OF-PAGE
**
2
\\\\\allowed/////
END-OF-PAGE
3
\\\\\allowed/////
GET
**
3
\\\\\forbidden/////
GET
BADI
3
\\\\\forbidden/////
GET
BIT
3
\\\\\forbidden/////
GET
CONNECTION
3
\\\\\forbidden/////
GET
CURSOR
3
\\\\\forbidden/////
GET
DATASET
3
\\\\\forbidden/////
GET
LOCALE
3
\\\\\forbidden/////
GET
PARAMETER
3
\\\\\forbidden/////
GET
PF-STATUS
3
\\\\\forbidden/////
GET
PROPERTY
3
\\\\\forbidden/////

GET
REFERENCE
3
\\\\\forbidden/////
GET
RUN
3
\\\\\forbidden/////
GET
TIME
1
2
FORM
F-SEGMENTE_ERSTELLEN
6
14
3
DATA l_shkzg LIKE mseg-shkzg. CLEAR l_sh
kzg.
"HW578078

DATA: loc_bwmod LIKE dm07m-parbw.

DATA: hbnbtr like mseg-bnbtr.


"830707

1
t_index = 1.

2
DATA: f_156w_save TYPE t156w.
"N980402

t_index = 1.

325
3
DATA komok LIKE t156x-komok. CLEAR k
omok.

DATA kzvbr LIKE mseg-kzvbr. kzvbr =


zmseg-kzvbr.

rc = 2.

1
IF f-xbnk IS INITIAL.

1
IF f-xbnk IS INITIAL OR x156w-vorsl
= vorsl_kdm. "N980402

330
3
IF x156w-vorsl = vorsl_kbs AND mse
g-kzvbr = a.

vorsl = vorsl_anl.

ENDIF.

1
ENHANCEMENT-POINT F-SEGMENTE_ERSTELLEN_08
SPOTS ES_SAPMM07M.

15
* Begin N980402

IF f-xbnk IS INITIAL AND x156w-vor


sl = vorsl_kdm.

f_156w_save = x156w.

READ TABLE x156w WITH KEY bustw


= mseg-bustw

vorsl
= vorsl_kdm.

IF NOT sy-subrc IS INITIAL.

* String is not buffered; only possible fo


r Transfers use WE01

SELECT * FROM t156w INTO x156w


WHERE bustw = 'WE01'

AND vorsl = vorsl_kdm.

EXIT.

ENDSELECT.

ENDIF.

ENDIF.

* End N980402

ENHANCEMENT-POINT F-SEGMENTE_ERSTELLEN_08
SPOTS ES_SAPMM07M.

382
3
xaccit-xpkon = t156x-xpkon.

komok = t156x-komok.

ENDIF.

1
IF NOT sy-subrc IS INITIAL OR t156
x-xpkon IS INITIAL.

5
IF NOT f_156w_save IS INITIAL.
"N980402

x156w = f_156w_save.
"N980402

ENDIF.
"N980402

IF NOT sy-subrc IS INITIAL OR t156


x-xpkon IS INITIAL

AND f-x
bnk IS INITIAL.

"N980402

403
3
CLEAR xaccit-fkber.
"930158

ENDIF.
"930158

ENDIF.
"930158

3
ENDIF.

ENDIF.

ELSE.

27
ENDIF.

ENDIF.

* Begin N980402

IF x156w-bustw = bustw_bnkr AND x1


56w-vorsl = vorsl_kdm.

IF zmseg-bustw = bustw_we06.

SELECT SINGLE * FROM t156x WHE


RE bwart = zmseg-bwart

AND
wertu = zmseg-wertu

AND
mengu = zmseg-mengu

AND
sobkz = zmseg-sobkz

AND
kzbew = zmseg-kzbew

AND
kzvbr = kzvbr

AND
bustw = bustw_we06

AND
cnt02 = '03'.

ELSEIF zmseg-bustw = bustw_we01.

SELECT SINGLE * FROM t156x WHE


RE bwart = zmseg-bwart

AND
wertu = zmseg-wertu

AND
mengu = zmseg-mengu

AND
sobkz = zmseg-sobkz

AND
kzbew = zmseg-kzbew

AND
kzvbr = kzvbr

AND
bustw = bustw_we01

AND
cnt02 = '04'.

ENDIF.

komok = t156x-komok.

ENDIF.

* End N980402

ELSE.

466

3
MESSAGE e001 WITH 'X156W' f-bustw.

ENDIF.

1
ENDFORM.

ENDFORM.
stellen

1
"f-segmente_er

LIMU
REPS
MM07MFF9_F_SEGMENTE_GENERIEREN
00001
LIMU
REPS
MM07MFF9_F_SEGMENTE_GENERIEREN
00003
36
1
\\\\\no_empty_blocks/////
1
\\\\\comments_not_ignored/////
1

\\\\\delta_normalized/////
3
\\\\\allowed/////
FORM
*
3
\\\\\allowed/////
FUNCTION
*
3
\\\\\allowed/////
MODULE
**
3
\\\\\allowed/////
REPORT
*
3
\\\\\allowed/////
PROGRAM
*
3
\\\\\allowed/////
FUNCTION-POOL
*
4
\\\\\allowed/////
CLASS
*
DEFINITION
4
\\\\\allowed/////
CLASS
*
IMPLEMENTATION
5
\\\\\forbidden/////
CLASS
*
DEFINITION
DEFERRED
5
\\\\\forbidden/////
CLASS
*
DEFINITION
LOAD
6
\\\\\forbidden/////
CLASS
*
DEFINITION
LOCAL
FRIENDS
3
\\\\\allowed/////
AT
LINE-SELECTION
3
\\\\\allowed/////

AT
USER-COMMAND
4
\\\\\allowed/////
AT
SELECTION-SCREEN
**
3
\\\\\allowed/////
AT
PF*
2
\\\\\allowed/////
INITIALIZATION
2
\\\\\allowed/////
START-OF-SELECTION
2
\\\\\allowed/////
END-OF-SELECTION
3
\\\\\allowed/////
TOP-OF-PAGE
**
2
\\\\\allowed/////
END-OF-PAGE
3
\\\\\allowed/////
GET
**
3
\\\\\forbidden/////
GET
BADI
3
\\\\\forbidden/////
GET
BIT
3
\\\\\forbidden/////
GET
CONNECTION
3
\\\\\forbidden/////
GET
CURSOR
3
\\\\\forbidden/////
GET
DATASET
3
\\\\\forbidden/////
GET
LOCALE
3
\\\\\forbidden/////
GET
PARAMETER
3

\\\\\forbidden/////
GET
PF-STATUS
3
\\\\\forbidden/////
GET
PROPERTY
3
\\\\\forbidden/////
GET
REFERENCE
3
\\\\\forbidden/////
GET
RUN
3
\\\\\forbidden/////
GET
TIME
1
2
FORM
F-SEGMENTE_GENERIEREN
8
20
4
ENHANCEMENT-POINT F-SEGMENTE_GENERIEREN_11
SPOTS ES_SAPMM07M STATIC.

ENHANCEMENT-POINT F-SEGMENTE_GENERIEREN_12
SPOTS ES_SAPMM07M.

1
DATA: C_KZUML LIKE DM07M-KZUML.
"495236

3
DATA: C_KZUML LIKE DM07M-KZUML,
"495236

lv_append_done,
"N980402

lv_memorise_index TYPE sytabix.


"N980402

312
6
PERFORM F-SEGMENTE_ERSTELLEN USING
XZCXCB-BUSTW

CHANG
ING

C_KZUML.

"495236

DATA ML00. CLEAR ML00.

DATA ML10. CLEAR ML10.

1
CLEAR: XEKBZ, XEKBZ_CR.

done.

1
CLEAR: XEKBZ, XEKBZ_CR, lv_append_
"N980402

320
3
ENHANCEMENT-POINT F-SEGMENTE_GENERIEREN_07
SPOTS ES_SAPMM07M.

1
IF XZCXCB-CURTP = CURTP00.

2
IF XZCXCB-CURTP = CURTP00 AND

xzcxcb-vorsl NE vorsl_kdm.
"N980402

324
3
XEKBZ-WRBTR = XZCXCB-DMBTR.

XEKBZ-WAERS = XZCXCB-WAERS.

ML00 = X.

1
ELSEIF XZCXCB-CURTP = CURTP10.

2
ELSEIF XZCXCB-CURTP = CURTP10 AN
D

xzcxcb-vorsl NE vorsl_kdm
"N980402

393
5
ENDIF.

*
if not zmseg-umwrk is initial a
nd not zmseg-kzzug is initial.

xekbz-waers = zmseg-waers.

endif.

ML10 = X.

1
ELSE.

16

* Begin N980402

ELSEIF xzcxcb-curtp = curtp10 AN


D

xzcxcb-vorsl = vorsl_kdm.

IF xzcxcb-shkzg = zmseg-shkzg.

xekbz-kudif = xzcxcb-dmbtr.

ELSE.

xekbz-kudif = 0 - xzcxcb-dmb
tr.

ENDIF.

* In case of stock transfer (valuated or w


ith account

* assigned) change sign because zmseg-shkz


g is reversed.

IF zdm07m-kzuml = 'X' OR not z

mseg-umwrk IS INITIAL.

xekbz-kudif = 0 - xekbz-kudi
f.

ENDIF.

* End SPC_980402

443
3
ENDIF.
"0439945

ENDIF.
"0439945

IF NOT HELP_EKBZ_CR IS INITIAL.


"0439945

1
XEKBZ_CR-EBELN = ZMSEG-EBELN.

2
IF xzcxcb-vorsl NE vorsl_kdm.
"N980402

XEKBZ_CR-EBELN = ZMSEG-EBELN.

453
3
XEKBZ_CR-WAERS = XZCXCB-WAERS.

XEKBZ_CR-SHKZG = XZCXCB-SHKZG.

XEKBZ_CR-WRBTR = XZCXCB-DMBTR.

1
APPEND XEKBZ_CR.

22

* Begin N980402

lv_append_done = x.

APPEND xekbz_cr.

lv_memorise_index = sy-tabix.

ELSEIF xzcxcb-vorsl = vorsl_kd


m.

IF xzcxcb-shkzg = zmseg-shkz
g.

xekbz_cr-kudif = xzcxcb-dm
btr.

ELSE.

xekbz_cr-kudif = 0 - xzcxc
b-dmbtr.

ENDIF.

IF zdm07m-kzuml = 'X' OR not


zmseg-umwrk IS INITIAL.

xekbz_cr-kudif = 0 - xekbz
_cr-kudif.

ENDIF.

IF lv_append_done = x.

MODIFY xekbz_cr INDEX lv_


memorise_index

TRANSPORTI
NG kudif.

ENDIF.

CONTINUE.

ENDIF.

* End N980402

497
4
ENHANCEMENT-POINT F-SEGMENTE_GENERIEREN_10
SPOTS ES_SAPMM07M.

ENHANCEMENT-POINT F-SEGMENTE_GENERIEREN_13
SPOTS ES_SAPMM07M.

1
ENDFORM.

ENDFORM.
NERIEREN

1
"F-SEGMENTE_GE

LIMU
REPS
RM06EKBE
00001
LIMU
REPS
RM06EKBE
00003
36
1
\\\\\no_empty_blocks/////
1
\\\\\comments_not_ignored/////
1
\\\\\delta_normalized/////
3
\\\\\allowed/////
FORM
*
3
\\\\\allowed/////
FUNCTION
*
3
\\\\\allowed/////
MODULE
**
3
\\\\\allowed/////
REPORT
*
3
\\\\\allowed/////
PROGRAM
*
3
\\\\\allowed/////
FUNCTION-POOL
*
4

\\\\\allowed/////
CLASS
*
DEFINITION
4
\\\\\allowed/////
CLASS
*
IMPLEMENTATION
5
\\\\\forbidden/////
CLASS
*
DEFINITION
DEFERRED
5
\\\\\forbidden/////
CLASS
*
DEFINITION
LOAD
6
\\\\\forbidden/////
CLASS
*
DEFINITION
LOCAL
FRIENDS
3
\\\\\allowed/////
AT
LINE-SELECTION
3
\\\\\allowed/////
AT
USER-COMMAND
4
\\\\\allowed/////
AT
SELECTION-SCREEN
**
3
\\\\\allowed/////
AT
PF*
2
\\\\\allowed/////
INITIALIZATION
2
\\\\\allowed/////
START-OF-SELECTION
2
\\\\\allowed/////
END-OF-SELECTION
3
\\\\\allowed/////
TOP-OF-PAGE
**
2
\\\\\allowed/////

END-OF-PAGE
3
\\\\\allowed/////
GET
**
3
\\\\\forbidden/////
GET
BADI
3
\\\\\forbidden/////
GET
BIT
3
\\\\\forbidden/////
GET
CONNECTION
3
\\\\\forbidden/////
GET
CURSOR
3
\\\\\forbidden/////
GET
DATASET
3
\\\\\forbidden/////
GET
LOCALE
3
\\\\\forbidden/////
GET
PARAMETER
3
\\\\\forbidden/////
GET
PF-STATUS
3
\\\\\forbidden/////
GET
PROPERTY
3
\\\\\forbidden/////
GET
REFERENCE
3
\\\\\forbidden/////
GET
RUN
3
\\\\\forbidden/////
GET
TIME
2
2
FORM
EKBE_ANALYSE
8
52
3

vekbe-wesbs = vekbe-wesbs + xekbewesbs.

vekbe-dmbtr = vekbe-dmbtr + xekbedmbtr.

vekbe-wrbtr = vekbe-wrbtr + xekbewrbtr.

2
vekbe-kudif = vekbe-kudif + xekbekudif.
"N980402

61
3
vekbe-wesbs = vekbe-wesbs - xekbewesbs.

vekbe-dmbtr = vekbe-dmbtr - xekbedmbtr.

vekbe-wrbtr = vekbe-wrbtr - xekbewrbtr.

2
vekbe-kudif = vekbe-kudif - xekbekudif.
"N980402

79
3
vekbe-arewr = vekbe-arewr + xekbearewr.

vekbe-arewr_pop = vekbe-arewr_pop
+ xekbe-arewr_pop.

vekbe-reewr = vekbe-reewr + xekbereewr.

1
IF vekbe-waers = xekbe-waers.

2
vekbe-kudif = vekbe-kudif + xekbekudif.
"N980402

IF vekbe-waers = xekbe-waers.

96
3
vekbe-arewr = vekbe-arewr - xekbearewr.

vekbe-arewr_pop = vekbe-arewr_pop
- xekbe-arewr_pop.

vekbe-reewr = vekbe-reewr - xekbereewr.

1
IF vekbe-waers = xekbe-waers.

2
vekbe-kudif = vekbe-kudif - xekbekudif.
"N980402

IF vekbe-waers = xekbe-waers.

136
3
vnbekbe-bpmng = vnbekbe-bpmng +
xekbe-bpmng.

vnbekbe-dmbtr = vnbekbe-dmbtr +
xekbe-dmbtr.

vnbekbe-reewr = vnbekbe-reewr +
xekbe-reewr.

1
IF vnbekbe-waers = xekbe-waers.

2
vnbekbe-kudif = vnbekbe-kudif +
xekbe-kudif.
"N980402

IF vnbekbe-waers = xekbe-waers.

147
3
vnbekbe-bpmng = vnbekbe-bpmng +
xekbe-bpmng.

vnbekbe-dmbtr = vnbekbe-dmbtr xekbe-dmbtr.

vnbekbe-reewr = vnbekbe-reewr xekbe-reewr.

1
IF vnbekbe-waers = xekbe-waers.

2
vnbekbe-kudif = vnbekbe-kudif xekbe-kudif.
"N980402

IF vnbekbe-waers = xekbe-waers.

164
3
vekbe-dmbtr = vekbe-dmbtr + xekbedmbtr.

vekbe-arewr = vekbe-arewr + xekbearewr.

vekbe-reewr = vekbe-reewr + xekbereewr.

1
IF vekbe-waers = xekbe-waers.

2
vekbe-kudif = vekbe-kudif + xekb
e-kudif.
"N980402

IF vekbe-waers = xekbe-waers.

174
3
vekbe-dmbtr = vekbe-dmbtr - xekbedmbtr.

vekbe-arewr = vekbe-arewr - xekbearewr.

vekbe-reewr = vekbe-reewr - xekbereewr.

1
IF vekbe-waers = xekbe-waers.

2
vekbe-kudif = vekbe-kudif - xekb
e-kudif.
"N980402

IF vekbe-waers = xekbe-waers.

2
FORM
EKBZ_ANALYSE
5
45
3
IF xekbz-shkzg = 'H'.

vekbz-menge = vekbz-menge + xekbzmenge.

vekbz-dmbtr = vekbz-dmbtr + xekbzdmbtr.

3
ELSE.

vekbz-menge = vekbz-menge - xekbzmenge.

vekbz-dmbtr = vekbz-dmbtr - xekbzdmbtr.

5
vekbz-kudif = vekbz-kudif + xekbzkudif.
"N980402

ELSE.

vekbz-menge = vekbz-menge - xekbzmenge.

vekbz-dmbtr = vekbz-dmbtr - xekbzdmbtr.

kudif.

vekbz-kudif = vekbz-kudif - xekbz"N980402

61
3
vekbz-arewr = vekbz-arewr + xekbzarewr.

vekbz-arewr_pop = vekbz-arewr_pop
+ xekbz-arewr_pop.

vekbz-reewr = vekbz-reewr + xekbzreewr.

1
IF vekbz-waers = xekbz-waers.

2
vekbz-kudif = vekbz-kudif + xekbzkudif.
"N980402

IF vekbz-waers = xekbz-waers.

76
3
vekbz-arewr = vekbz-arewr - xekbzarewr.

vekbz-arewr_pop = vekbz-arewr_pop
- xekbz-arewr_pop.

vekbz-reewr = vekbz-reewr - xekbzreewr.

1
IF vekbz-waers = xekbz-waers.

2
vekbz-kudif = vekbz-kudif - xekbzkudif.
"N980402

IF vekbz-waers = xekbz-waers.

92
3
vekbz-dmbtr = vekbz-dmbtr + xekbzdmbtr.

vekbz-arewr = vekbz-arewr + xekbzarewr.

vekbz-reewr = vekbz-reewr + xekbzreewr.

1
IF vekbz-waers = xekbz-waers.

2
vekbz-kudif = vekbz-kudif + xekbzkudif.
"N980402

IF vekbz-waers = xekbz-waers.

102
3
vekbz-dmbtr = vekbz-dmbtr - xekbzdmbtr.

vekbz-arewr = vekbz-arewr - xekbzarewr.

vekbz-reewr = vekbz-reewr - xekbzreewr.

1
IF vekbz-waers = xekbz-waers.

2
vekbz-kudif = vekbz-kudif - xekbzkudif.
"N980402

IF vekbz-waers = xekbz-waers.

LIMU
REPS
SAPLOMML
00001
LIMU
REPS
SAPLOMML
00003
36
1
\\\\\no_empty_blocks/////
1
\\\\\comments_not_ignored/////
1
\\\\\delta_normalized/////
3
\\\\\allowed/////

FORM
*
3
\\\\\allowed/////
FUNCTION
*
3
\\\\\allowed/////
MODULE
**
3
\\\\\allowed/////
REPORT
*
3
\\\\\allowed/////
PROGRAM
*
3
\\\\\allowed/////
FUNCTION-POOL
*
4
\\\\\allowed/////
CLASS
*
DEFINITION
4
\\\\\allowed/////
CLASS
*
IMPLEMENTATION
5
\\\\\forbidden/////
CLASS
*
DEFINITION
DEFERRED
5
\\\\\forbidden/////
CLASS
*
DEFINITION
LOAD
6
\\\\\forbidden/////
CLASS
*
DEFINITION
LOCAL
FRIENDS
3
\\\\\allowed/////
AT
LINE-SELECTION
3
\\\\\allowed/////
AT
USER-COMMAND
4

\\\\\allowed/////
AT
SELECTION-SCREEN
**
3
\\\\\allowed/////
AT
PF*
2
\\\\\allowed/////
INITIALIZATION
2
\\\\\allowed/////
START-OF-SELECTION
2
\\\\\allowed/////
END-OF-SELECTION
3
\\\\\allowed/////
TOP-OF-PAGE
**
2
\\\\\allowed/////
END-OF-PAGE
3
\\\\\allowed/////
GET
**
3
\\\\\forbidden/////
GET
BADI
3
\\\\\forbidden/////
GET
BIT
3
\\\\\forbidden/////
GET
CONNECTION
3
\\\\\forbidden/////
GET
CURSOR
3
\\\\\forbidden/////
GET
DATASET
3
\\\\\forbidden/////
GET
LOCALE
3
\\\\\forbidden/////
GET
PARAMETER
3
\\\\\forbidden/////
GET
PF-STATUS

3
\\\\\forbidden/////
GET
PROPERTY
3
\\\\\forbidden/////
GET
REFERENCE
3
\\\\\forbidden/////
GET
RUN
3
\\\\\forbidden/////
GET
TIME
1
0
1
37
3
INCLUDE LOMMLI02.

INCLUDE LOMMLF02.

0
6

INCLUDE LOMMLO01.

INCLUDE LOMMLI03.

INCLUDE LOMMLF01.

LIMU
TYPD
CCS00
00001
LIMU
TYPD
CCS00
00003
36
1
\\\\\no_empty_blocks/////
1
\\\\\comments_not_ignored/////
1
\\\\\delta_normalized/////
3
\\\\\allowed/////
FORM
*
3
\\\\\allowed/////
FUNCTION
*
3
\\\\\allowed/////
MODULE

**
3
\\\\\allowed/////
REPORT
*
3
\\\\\allowed/////
PROGRAM
*
3
\\\\\allowed/////
FUNCTION-POOL
*
4
\\\\\allowed/////
CLASS
*
DEFINITION
4
\\\\\allowed/////
CLASS
*
IMPLEMENTATION
5
\\\\\forbidden/////
CLASS
*
DEFINITION
DEFERRED
5
\\\\\forbidden/////
CLASS
*
DEFINITION
LOAD
6
\\\\\forbidden/////
CLASS
*
DEFINITION
LOCAL
FRIENDS
3
\\\\\allowed/////
AT
LINE-SELECTION
3
\\\\\allowed/////
AT
USER-COMMAND
4
\\\\\allowed/////
AT
SELECTION-SCREEN
**
3
\\\\\allowed/////
AT
PF*
2

\\\\\allowed/////
INITIALIZATION
2
\\\\\allowed/////
START-OF-SELECTION
2
\\\\\allowed/////
END-OF-SELECTION
3
\\\\\allowed/////
TOP-OF-PAGE
**
2
\\\\\allowed/////
END-OF-PAGE
3
\\\\\allowed/////
GET
**
3
\\\\\forbidden/////
GET
BADI
3
\\\\\forbidden/////
GET
BIT
3
\\\\\forbidden/////
GET
CONNECTION
3
\\\\\forbidden/////
GET
CURSOR
3
\\\\\forbidden/////
GET
DATASET
3
\\\\\forbidden/////
GET
LOCALE
3
\\\\\forbidden/////
GET
PARAMETER
3
\\\\\forbidden/////
GET
PF-STATUS
3
\\\\\forbidden/////
GET
PROPERTY
3
\\\\\forbidden/////
GET
REFERENCE
3

\\\\\forbidden/////
GET
RUN
3
\\\\\forbidden/////
GET
TIME
1
0
1
48
3
* Schichtungsart Material-Ledger

BEGIN OF ccs00_mlcct,

kdmsl

TYPE ck_slml VALUE 'F',

kdmml

TYPE ck_slml VALUE 'N',

2
kdmsl_st TYPE ck_slml VALUE 'X', "N98
0402

kdmml

0120061532
1
0000950570
0015

TYPE ck_slml VALUE 'N',

104
DYNP
SAPLCKMD0201
00001

DYNP
SAPLCKMD0201
00000
7
1
\\\\\no_empty_blocks/////
1
\\\\\comments_not_ignored/////
1
\\\\\delta_normalized/////
4
\\\\\allowed/////
PROCESS
BEFORE
OUTPUT
4
\\\\\allowed/////
PROCESS
AFTER
INPUT
4
\\\\\allowed/////
PROCESS
ON
HELP-REQUEST
4
\\\\\allowed/////
PROCESS
ON
VALUE-REQUEST
0
DYNP
SAPLCKMD0203
00001

DYNP
SAPLCKMD0203
00000

7
1
\\\\\no_empty_blocks/////
1
\\\\\comments_not_ignored/////
1
\\\\\delta_normalized/////
4
\\\\\allowed/////
PROCESS
BEFORE
OUTPUT
4
\\\\\allowed/////
PROCESS
AFTER
INPUT
4
\\\\\allowed/////
PROCESS
ON
HELP-REQUEST
4
\\\\\allowed/////
PROCESS
ON
VALUE-REQUEST
0
DYNP
SAPLCKMD0204
00001

DYNP
SAPLCKMD0204
00000
7
1
\\\\\no_empty_blocks/////
1
\\\\\comments_not_ignored/////
1
\\\\\delta_normalized/////
4
\\\\\allowed/////
PROCESS
BEFORE
OUTPUT
4
\\\\\allowed/////
PROCESS

AFTER
INPUT
4
\\\\\allowed/////
PROCESS
ON
HELP-REQUEST
4
\\\\\allowed/////
PROCESS
ON
VALUE-REQUEST
0
LIMU
DYNP
SAPLOMML0410
00001
LIMU
DYNP
SAPLOMML0410
00000
7
1
\\\\\no_empty_blocks/////
1
\\\\\comments_not_ignored/////
1
\\\\\delta_normalized/////
4
\\\\\allowed/////
PROCESS
BEFORE
OUTPUT
4
\\\\\allowed/////
PROCESS
AFTER
INPUT
4
\\\\\allowed/////
PROCESS
ON
HELP-REQUEST
4
\\\\\allowed/////
PROCESS
ON
VALUE-REQUEST
2
3
PROCESS
BEFORE

OUTPUT
1
6
3
LOOP AT EXTRACT WITH CONTROL

TCTRL_V_169P_PK
OR NEXTLINE.

CURS

MODULE LISTE_SHOW_LISTE.

1
ENDLOOP.

2
MODULE LIST_EXCHANGE_RATE. "separate K
DM lines N980402

ENDLOOP.

3
PROCESS
AFTER
INPUT
1
7
3
LOOP AT EXTRACT.

MODULE LISTE_INIT_WORKAREA.

CHAIN.

3
FIELD V_169P_PK-KURST.

FIELD V_169P_PK-XPLCU.

FIELD V_169P_PK-BUKRS.

FIELD V_169P_PK-KDHW.
KDM lines N980402

7
"separate

FIELD V_169P_PK-KDML1.
KDM lines N980402

"separate

FIELD V_169P_PK-KDML2.
KDM lines N980402

"separate

FIELD V_169P_PK-KURST.

FIELD V_169P_PK-XPLCU.

FIELD V_169P_PK-BUKRS.

MODULE CHECK_EXCHANGE_RATE. "separate


KDM lines N980402

LIMU
FUNC
CKMCD_MLCD_CREATE
00018
LIMU
FUNC
CKMCD_MLCD_CREATE
00000
37
1
\\\\\no_empty_blocks/////
1
\\\\\comments_ignored/////
1
\\\\\delta_normalized/////
1
\\\\\if_comments_ignored/////
3
\\\\\allowed/////
FORM
*
3
\\\\\allowed/////
FUNCTION

*
3
\\\\\allowed/////
MODULE
**
3
\\\\\allowed/////
REPORT
*
3
\\\\\allowed/////
PROGRAM
*
3
\\\\\allowed/////
FUNCTION-POOL
*
4
\\\\\allowed/////
CLASS
*
DEFINITION
4
\\\\\allowed/////
CLASS
*
IMPLEMENTATION
5
\\\\\forbidden/////
CLASS
*
DEFINITION
DEFERRED
5
\\\\\forbidden/////
CLASS
*
DEFINITION
LOAD
6
\\\\\forbidden/////
CLASS
*
DEFINITION
LOCAL
FRIENDS
3
\\\\\allowed/////
AT
LINE-SELECTION
3
\\\\\allowed/////
AT
USER-COMMAND
4
\\\\\allowed/////
AT
SELECTION-SCREEN
**
3

\\\\\allowed/////
AT
PF*
2
\\\\\allowed/////
INITIALIZATION
2
\\\\\allowed/////
START-OF-SELECTION
2
\\\\\allowed/////
END-OF-SELECTION
3
\\\\\allowed/////
TOP-OF-PAGE
**
2
\\\\\allowed/////
END-OF-PAGE
3
\\\\\allowed/////
GET
**
3
\\\\\forbidden/////
GET
BADI
3
\\\\\forbidden/////
GET
BIT
3
\\\\\forbidden/////
GET
CONNECTION
3
\\\\\forbidden/////
GET
CURSOR
3
\\\\\forbidden/////
GET
DATASET
3
\\\\\forbidden/////
GET
LOCALE
3
\\\\\forbidden/////
GET
PARAMETER
3
\\\\\forbidden/////
GET
PF-STATUS
3
\\\\\forbidden/////
GET
PROPERTY
3

\\\\\forbidden/////
GET
REFERENCE
3
\\\\\forbidden/////
GET
RUN
3
\\\\\forbidden/////
GET
TIME
2
2
FUNCTION
CKMCD_MLCD_CREATE
2
851
3
WHEN y_zugang_alte_abrec
h.

*
Die Abschluzeile wird in
die Fortschreibungszeile

integriert!

1
ENDCASE.

13
* Begin N980402

*
e differences

Statistical exchange rat

WHEN y_zugang_einst_auf_
st.

t_mlcd-categ = y_categ
_zugaenge.

t_mlcd-estkdm_st = it_
mlcrf-krdif.

WHEN y_verbr_preisb_eins
t_auf_st.

t_mlcd-categ = y_categ
_sonst_zugaenge.

t_mlcd-estkdm_st = it_
mlcrf-krdif.

WHEN y_verbr_nichtprsb_e
inst_auf_st.

t_mlcd-categ = y_categ
_verbraeuche.

t_mlcd-estkdm_st = it_
mlcrf-krdif.

* End N980402

ENDCASE.

908
3
WHEN y_zugang_alte_abr
ech.

*
Die Abschluzeile wird i
n die Fortschreibungszeile

integriert!

1
ENDCASE.

13
* Begin N980402

*
ate differences

Statistical exchange r

WHEN y_zugang_einst_au
f_st.

t_mlcd-categ = y_cat
eg_zugaenge.

t_mlcd-estkdm_st = i
t_mlcrf-krdif.

WHEN y_verbr_preisb_ei
nst_auf_st.

t_mlcd-categ = y_cat
eg_sonst_zugaenge.

t_mlcd-estkdm_st = i
t_mlcrf-krdif.

WHEN y_verbr_nichtprsb
_einst_auf_st.

t_mlcd-categ = y_cat
eg_verbraeuche.

t_mlcd-estkdm_st = i
t_mlcrf-krdif.

* End N980402

ENDCASE.

2
FORM
MLCD_FILL_MLAST3
1
164
3
pt_mlcd-salk3 = 0.

pt_mlcd-tpprd = pf_mlcrf-prdif.

COLLECT pt_mlcd.

1
WHEN OTHERS.

16
* Begin N980402

Statistical exchange rate differences

WHEN y_zugang_einst_auf_st.

pt_mlcd-categ = y_categ_zugaenge.

pt_mlcd-estkdm_st = pf_mlcrf-krdif.

COLLECT pt_mlcd.

WHEN y_verbr_preisb_einst_auf_st.

pt_mlcd-categ = y_categ_sonst_zugaen
ge.

pt_mlcd-estkdm_st = pf_mlcrf-krdif.

COLLECT pt_mlcd.

WHEN y_verbr_nichtprsb_einst_auf_st.

pt_mlcd-categ = y_categ_verbraeuche.

pt_mlcd-estkdm_st = pf_mlcrf-krdif.

COLLECT pt_mlcd.

* End N980402

WHEN OTHERS.

LIMU
FUNC
CKMCD_MLCD_POSTING
00004
LIMU
FUNC

CKMCD_MLCD_POSTING
00000
37
1
\\\\\no_empty_blocks/////
1
\\\\\comments_not_ignored/////
1
\\\\\delta_normalized/////
1
\\\\\if_comments_ignored/////
3
\\\\\allowed/////
FORM
*
3
\\\\\allowed/////
FUNCTION
*
3
\\\\\allowed/////
MODULE
**
3
\\\\\allowed/////
REPORT
*
3
\\\\\allowed/////
PROGRAM
*
3
\\\\\allowed/////
FUNCTION-POOL
*
4
\\\\\allowed/////
CLASS
*
DEFINITION
4
\\\\\allowed/////
CLASS
*
IMPLEMENTATION
5
\\\\\forbidden/////
CLASS
*
DEFINITION
DEFERRED
5
\\\\\forbidden/////
CLASS
*
DEFINITION

LOAD
6
\\\\\forbidden/////
CLASS
*
DEFINITION
LOCAL
FRIENDS
3
\\\\\allowed/////
AT
LINE-SELECTION
3
\\\\\allowed/////
AT
USER-COMMAND
4
\\\\\allowed/////
AT
SELECTION-SCREEN
**
3
\\\\\allowed/////
AT
PF*
2
\\\\\allowed/////
INITIALIZATION
2
\\\\\allowed/////
START-OF-SELECTION
2
\\\\\allowed/////
END-OF-SELECTION
3
\\\\\allowed/////
TOP-OF-PAGE
**
2
\\\\\allowed/////
END-OF-PAGE
3
\\\\\allowed/////
GET
**
3
\\\\\forbidden/////
GET
BADI
3
\\\\\forbidden/////
GET
BIT
3
\\\\\forbidden/////
GET
CONNECTION
3
\\\\\forbidden/////
GET

CURSOR
3
\\\\\forbidden/////
GET
DATASET
3
\\\\\forbidden/////
GET
LOCALE
3
\\\\\forbidden/////
GET
PARAMETER
3
\\\\\forbidden/////
GET
PF-STATUS
3
\\\\\forbidden/////
GET
PROPERTY
3
\\\\\forbidden/////
GET
REFERENCE
3
\\\\\forbidden/////
GET
RUN
3
\\\\\forbidden/////
GET
TIME
1
2
FUNCTION
CKMCD_MLCD_POSTING
3
42
6
UPDATE mlcd SET lbkum = lbkum + it
_mlcd-lbkum

salk3 = salk3 + it
_mlcd-salk3

estprd = it_mlcd-est
prd

estkdm = it_mlcd-est
kdm

mstprd = it_mlcd-mst
prd

mstkdm = it_mlcd-mst
kdm

1
WHERE kalnr = it_mlcd-k
alnr

estkdm_st

2
estkdm_st = it_mlcd"N980402

WHERE kalnr = it_mlcd-k


alnr

64
6
UPDATE mlcd SET lbkum = lbkum + it
_mlcd-lbkum

salk3 = salk3 + it
_mlcd-salk3

estprd = estprd + it
_mlcd-estprd

estkdm = estkdm + it
_mlcd-estkdm

mstprd = it_mlcd-mst
prd

mstkdm = it_mlcd-mst
kdm

1
WHERE kalnr = it_mlcd-k
alnr

t +

3
estkdm_st = estkdm_s
"N980402

estkdm_st

"N980402

it_mlcd-

WHERE kalnr = it_mlcd-k


alnr

80

7
UPDATE mlcd SET lbkum = lbkum + it
_mlcd-lbkum

salk3 = salk3 + it
_mlcd-salk3

estprd = estprd + it
_mlcd-estprd

estkdm = estkdm + it
_mlcd-estkdm

mstprd = mstprd + it
_mlcd-mstprd

mstkdm = mstkdm + it
_mlcd-mstkdm

tpprd = tpprd + it
_mlcd-tpprd

1
WHERE kalnr = it_mlcd-k
alnr

3
estkdm_st = estkdm_s

t +

"N980402

estkdm_st

"N980402

it_mlcd-

WHERE kalnr = it_mlcd-k


alnr

LIMU
FUNC
CKMD_DOCUMENT_REPORT
00016
LIMU
FUNC
CKMD_DOCUMENT_REPORT
00000
37
1
\\\\\no_empty_blocks/////
1
\\\\\comments_not_ignored/////
1
\\\\\delta_normalized/////
1
\\\\\if_comments_ignored/////
3
\\\\\allowed/////
FORM
*
3
\\\\\allowed/////
FUNCTION
*
3
\\\\\allowed/////
MODULE
**
3
\\\\\allowed/////
REPORT

*
3
\\\\\allowed/////
PROGRAM
*
3
\\\\\allowed/////
FUNCTION-POOL
*
4
\\\\\allowed/////
CLASS
*
DEFINITION
4
\\\\\allowed/////
CLASS
*
IMPLEMENTATION
5
\\\\\forbidden/////
CLASS
*
DEFINITION
DEFERRED
5
\\\\\forbidden/////
CLASS
*
DEFINITION
LOAD
6
\\\\\forbidden/////
CLASS
*
DEFINITION
LOCAL
FRIENDS
3
\\\\\allowed/////
AT
LINE-SELECTION
3
\\\\\allowed/////
AT
USER-COMMAND
4
\\\\\allowed/////
AT
SELECTION-SCREEN
**
3
\\\\\allowed/////
AT
PF*
2
\\\\\allowed/////
INITIALIZATION
2
\\\\\allowed/////

START-OF-SELECTION
2
\\\\\allowed/////
END-OF-SELECTION
3
\\\\\allowed/////
TOP-OF-PAGE
**
2
\\\\\allowed/////
END-OF-PAGE
3
\\\\\allowed/////
GET
**
3
\\\\\forbidden/////
GET
BADI
3
\\\\\forbidden/////
GET
BIT
3
\\\\\forbidden/////
GET
CONNECTION
3
\\\\\forbidden/////
GET
CURSOR
3
\\\\\forbidden/////
GET
DATASET
3
\\\\\forbidden/////
GET
LOCALE
3
\\\\\forbidden/////
GET
PARAMETER
3
\\\\\forbidden/////
GET
PF-STATUS
3
\\\\\forbidden/////
GET
PROPERTY
3
\\\\\forbidden/////
GET
REFERENCE
3
\\\\\forbidden/////
GET
RUN
3

\\\\\forbidden/////
GET
TIME
1
2
FUNCTION
CKMD_DOCUMENT_REPORT
11
134
3
lh_zu LIKE ckmlcr-zuprd_o,

lh_zu_prd LIKE ckmlcr-zuprd_o,

lh_zu_kdm LIKE ckmlcr-zukdm_o,

3
lh_all_diff LIKE ckmlcr-zuprd_o,

lh_prd LIKE ckmlcr-zuprd_o,

lh_kdm LIKE ckmlcr-zukdm_o,

5
lh_zu_kdm_st LIKE ckmlcr-zukdm_o,
"N980402

lh_all_diff LIKE ckmlcr-zuprd_o,

lh_prd LIKE ckmlcr-zuprd_o,

lh_kdm LIKE ckmlcr-zukdm_o,

lh_kdm_st LIKE ckmlcr-zukdm_o,


"N980402

1355
3
CLEAR: lt_report-curtp, lt
_report-salk3,

lt_report-estprd, l
t_report-estkdm,

lt_report-mstprd, l
t_report-mstkdm,

1
lt_report-waers.

1
lt_report-waers, l
t_report-estkdm_st."N980402

1507
5
lt_mlcd-cate
g = y_categ_verbraeuche.

lt_mlcd-estp
rd = t_mlcrf-prdif.

lt_mlcd-estk
dm = t_mlcrf-krdif.

lt_mlcd-salk
3 = 0 - t_mlcrf-prdif - t_mlcrf-krdif.

COLLECT lt_m
lcd.

1
ENDCASE.

15
* Begin N980402

WHEN y_zugang_
einst_auf_st.

lt_mlcd-cate
g = y_categ_zugaenge.

lt_mlcd-estk
dm_st = t_mlcrf-krdif.

COLLECT lt_m
lcd.

WHEN y_verbr_p
reisb_einst_auf_st.

lt_mlcd-cate
g = y_categ_sonst_zugaenge.

lt_mlcd-estk
dm_st = t_mlcrf-krdif.

COLLECT lt_m
lcd.

WHEN y_verbr_n
ichtprsb_einst_auf_st.

lt_mlcd-cate
g = y_categ_verbraeuche.

lt_mlcd-estk
dm_st = t_mlcrf-krdif.

COLLECT lt_m
lcd.

* End N980402

ENDCASE.

1888
3
CLEAR: lt_report-curtp, lt_r
eport-salk3,

lt_report-estprd, lt_
report-estkdm,

lt_report-mstprd, lt_
report-mstkdm,

1
lt_report-waers.

1
lt_report-waers, lt_
report-estkdm_st. "N980402

2039
4
lt_mlcd-categ
= y_categ_verbraeuche.

lt_mlcd-estprd
= t_mlcrf-prdif.

lt_mlcd-estkdm
= t_mlcrf-krdif.

lt_mlcd-salk3
= 0 - t_mlcrf-prdif - t_mlcrf-krdif.

2
COLLECT lt_mlc
d.

ENDCASE.

16
COLLECT lt_mlc
d.

* Begin N980402

WHEN y_zugang_ei
nst_auf_st.

lt_mlcd-categ
= y_categ_zugaenge.

lt_mlcd-estkdm
_st = t_mlcrf-krdif.

COLLECT lt_mlc
d.

WHEN y_verbr_pre
isb_einst_auf_st.

lt_mlcd-categ
= y_categ_sonst_zugaenge.

lt_mlcd-estkdm
_st = t_mlcrf-krdif.

COLLECT lt_mlc
d.

WHEN y_verbr_nic
htprsb_einst_auf_st.

lt_mlcd-categ
= y_categ_verbraeuche.

lt_mlcd-estkdm
_st = t_mlcrf-krdif.

COLLECT lt_mlc
d.

* End N980402

ENDCASE.

2638
3
CLEAR: lt_report-curtp, lt_rep
ort-salk3,

lt_report-estprd, lt_re
port-estkdm,

lt_report-mstprd, lt_re
port-mstkdm,

1
lt_report-waers.

port-estkdm_st.

1
lt_report-waers, lt_re
"N980402

2824
5
lt_report-lbkum = t_mlpp
f-menge.

*
f-menge.

WHEN y_zugang_alte_abrech.

lt_report-lbkum = t_mlpp

ENDCASE.

ENDLOOP.

1
CLEAR: lh_zu, lh_zu_prd, lh_zu
_kdm.

1
CLEAR: lh_zu, lh_zu_prd, lh_zu
_kdm, lh_zu_kdm_st."N980402

2875
5
lt_report-categ = y_cate
g_verbraeuche.

lt_report-estprd = t_mlc
rf-prdif.

lt_report-estkdm = t_mlc
rf-krdif.

lh_zu_prd = lh_zu_prd +
t_mlcrf-prdif.

lh_zu_kdm = lh_zu_kdm +
t_mlcrf-krdif.

1
WHEN y_umbew_alte_abrech.

15
* Begin N980402

WHEN y_zugang_einst_auf_st
.

lt_report-categ = y_cate
g_zugaenge.

lt_report-estkdm_st = t_
mlcrf-krdif.

lh_zu_kdm_st = lh_zu_kdm
_st + t_mlcrf-krdif.

WHEN y_verbr_preisb_einst_
auf_st.

lt_report-categ = y_cate
g_sonst_zugaenge.

lt_report-estkdm_st = t_
mlcrf-krdif.

lh_zu_kdm_st = lh_zu_kdm
_st + t_mlcrf-krdif.

WHEN y_verbr_nichtprsb_ein
st_auf_st.

lt_report-categ = y_cate
g_verbraeuche.

lt_report-estkdm_st = t_
mlcrf-krdif.

lh_zu_kdm_st = lh_zu_kdm
_st + t_mlcrf-krdif.

* End N980402

WHEN y_umbew_alte_abrech.

2910

3
WHEN y_verbr_nichtprsb_e
inst_aufgel.

lh_zu_prd = lh_zu_prd
+ lt_mlcrf_prev-prdif.

lh_zu_kdm = lh_zu_kdm
+ lt_mlcrf_prev-krdif.

1
ENDCASE.

9
* Begin N980402

WHEN y_zugang_einst_auf_
st.

lh_zu_kdm_st = lh_zu_k
dm_st + lt_mlcrf_prev-krdif.

WHEN y_verbr_preisb_eins
t_auf_st.

lh_zu_kdm_st = lh_zu_k

dm_st + lt_mlcrf_prev-krdif.

WHEN y_verbr_nichtprsb_e
inst_auf_st.

lh_zu_kdm_st = lh_zu_k
dm_st + lt_mlcrf_prev-krdif.

* End N980402

ENDCASE.

3028
3
lh_kdm = lf_mlcrfkrdif.

ENDIF.

ELSE.

1
CLEAR: lh_prd, lh_kd
m.

m, lh_kdm_st.

1
CLEAR: lh_prd, lh_kd
"N980402

3036
4
ELSE.

*
ach!

S-Preis, alles bleibt einf

lh_prd = lh_zu_prd.

lh_kdm = lh_zu_kdm.

3
ENDIF.

IF NOT lt_report-estprd IS I
NITIAL OR

NOT lt_report-estkdm IS I
NITIAL.

5
lh_kdm_st = lh_zu_kdm_st.
"N980402

ENDIF.

IF NOT lt_report-estprd IS I
NITIAL OR

NITIAL OR

NOT lt_report-estkdm IS I
"N980402

S INITIAL.

NOT lt_report-estkdm_st I
"N980402

LIMU
FUNC
CKMD_PRICE_HISTORY_READ
00007
LIMU
FUNC
CKMD_PRICE_HISTORY_READ
00000
37
1
\\\\\no_empty_blocks/////

1
\\\\\comments_ignored/////
1
\\\\\delta_normalized/////
1
\\\\\if_comments_ignored/////
3
\\\\\allowed/////
FORM
*
3
\\\\\allowed/////
FUNCTION
*
3
\\\\\allowed/////
MODULE
**
3
\\\\\allowed/////
REPORT
*
3
\\\\\allowed/////
PROGRAM
*
3
\\\\\allowed/////
FUNCTION-POOL
*
4
\\\\\allowed/////
CLASS
*
DEFINITION
4
\\\\\allowed/////
CLASS
*
IMPLEMENTATION
5
\\\\\forbidden/////
CLASS
*
DEFINITION
DEFERRED
5
\\\\\forbidden/////
CLASS
*
DEFINITION
LOAD
6
\\\\\forbidden/////
CLASS
*
DEFINITION
LOCAL
FRIENDS
3

\\\\\allowed/////
AT
LINE-SELECTION
3
\\\\\allowed/////
AT
USER-COMMAND
4
\\\\\allowed/////
AT
SELECTION-SCREEN
**
3
\\\\\allowed/////
AT
PF*
2
\\\\\allowed/////
INITIALIZATION
2
\\\\\allowed/////
START-OF-SELECTION
2
\\\\\allowed/////
END-OF-SELECTION
3
\\\\\allowed/////
TOP-OF-PAGE
**
2
\\\\\allowed/////
END-OF-PAGE
3
\\\\\allowed/////
GET
**
3
\\\\\forbidden/////
GET
BADI
3
\\\\\forbidden/////
GET
BIT
3
\\\\\forbidden/////
GET
CONNECTION
3
\\\\\forbidden/////
GET
CURSOR
3
\\\\\forbidden/////
GET
DATASET
3
\\\\\forbidden/////
GET
LOCALE

3
\\\\\forbidden/////
GET
PARAMETER
3
\\\\\forbidden/////
GET
PF-STATUS
3
\\\\\forbidden/////
GET
PROPERTY
3
\\\\\forbidden/////
GET
REFERENCE
3
\\\\\forbidden/////
GET
RUN
3
\\\\\forbidden/////
GET
TIME
1
2
FUNCTION
CKMD_PRICE_HISTORY_READ
6
943
8
READ TABLE lt_ckmlcr WITH
KEY kalnr = <mlit_ext>-kalnr

bdatj = t_mlpp-bdatj

poper = t_mlpp-poper

curtp = t_mlcr-curtp

BINARY SEARCH.

CLEAR: lf_ph-curtp, lf_phsalk3, lf_ph-salk3_old,

lf_ph-estprd, lf_ph
-estkdm,

1
lf_ph-mstprd, lf_ph
-mstkdm,

2
lf_ph-estkdm_st,
"N980402

lf_ph-mstprd, lf_ph
-mstkdm,

1419
7
READ TABLE lt_ckmlcr WITH KE
Y kalnr = <mlit_ext>-kalnr

bdatj = t_mlpp-bdatj

poper = t_mlpp-poper

curtp = t_mlcr-curtp

BINARY SEARCH.

CLEAR: lf_ph-curtp, lf_ph-sa


lk3, lf_ph-salk3_old,

lf_ph-estprd, lf_ph-e
stkdm,

1
lf_ph-mstprd, lf_ph-m
stkdm,

2
lf_ph-estkdm_st,
"N980402

lf_ph-mstprd, lf_ph-m
stkdm,

2225
5
t_ph-lbkum = 0 - t_mlppf
-menge.

t_ph-estprd = t_mlcrf-pr
dif.

t_ph-estkdm = t_mlcrf-kr
dif.

lh_zu_prd = lh_zu_prd +
t_mlcrf-prdif.

lh_zu_kdm = lh_zu_kdm +
t_mlcrf-krdif.

1
WHEN y_umbew_alte_abrech.

16
* Begin N980402

WHEN y_zugang_einst_auf_st
.

t_ph-categ = y_categ_zug
aenge.

t_ph-lbkum = t_mlppf-men
ge.

t_ph-estkdm_st = t_mlcrf
-krdif.

WHEN y_verbr_preisb_einst_
auf_st.

t_ph-categ = y_categ_son
st_zugaenge.

t_ph-lbkum = t_mlppf-men
ge.

t_ph-estkdm_st = t_mlcrf
-krdif.

WHEN y_verbr_nichtprsb_ein
st_auf_st.

t_ph-categ = y_categ_ver
braeuche.

*
Verbruche haben negative
Mengen (nicht so im Beleg)!

t_ph-lbkum = 0 - t_mlppf
-menge.

t_ph-estkdm_st = t_mlcrf
-krdif.

* End N980402

WHEN y_umbew_alte_abrech.

2290
5
t_ph-categ = y_categ
_verbraeuche.

t_ph-estprd = t_mlcr
f-prdif.

t_ph-estkdm = t_mlcr
f-krdif.

lh_zu_prd = lh_zu_pr
d + t_mlcrf-prdif.

lh_zu_kdm = lh_zu_kd
m + t_mlcrf-krdif.

1
WHEN y_umbew_alte_abre
ch.

12
* Begin N980402

WHEN y_zugang_einst_au
f_st.

t_ph-categ = y_categ
_zugaenge.

t_ph-estkdm_st = t_m
lcrf-krdif.

WHEN y_verbr_preisb_ei
nst_auf_st.

t_ph-categ = y_categ
_sonst_zugaenge.

t_ph-estkdm_st = t_m
lcrf-krdif.

WHEN y_verbr_nichtprsb
_einst_auf_st.

t_ph-categ = y_categ
_verbraeuche.

t_ph-estkdm_st = t_m
lcrf-krdif.

* End N980402

WHEN y_umbew_alte_abre
ch.

2366
3
t_ph-estkdm = lt_values_pr
ev-krdif.

ELSE.

CLEAR: t_ph-salk3, t_ph-es


tprd, t_ph-estkdm,

1
t_ph-mstprd, t_ph-m
stkdm.

2
t_ph-estkdm_st,
"N980402

t_ph-mstprd, t_ph-m
stkdm.

2465
3
ENDIF.

IF NOT t_ph-estprd IS IN
ITIAL OR

NOT t_ph-estkdm IS IN
ITIAL.

1
CLEAR: t_ph-estprd, t_
ph-estkdm,

1
CLEAR: t_ph-estprd, t_
ph-estkdm, t_ph-estkdm_st, "N980402

LIMU
FUNC
CKML_F_DOCUMENT_CREATE_UPDATE
00004
LIMU
FUNC
CKML_F_DOCUMENT_CREATE_UPDATE
00000
37
1
\\\\\no_empty_blocks/////
1
\\\\\comments_ignored/////
1
\\\\\delta_normalized/////
1
\\\\\if_comments_ignored/////
3
\\\\\allowed/////
FORM
*
3
\\\\\allowed/////
FUNCTION
*
3
\\\\\allowed/////
MODULE
**
3
\\\\\allowed/////
REPORT
*
3
\\\\\allowed/////

PROGRAM
*
3
\\\\\allowed/////
FUNCTION-POOL
*
4
\\\\\allowed/////
CLASS
*
DEFINITION
4
\\\\\allowed/////
CLASS
*
IMPLEMENTATION
5
\\\\\forbidden/////
CLASS
*
DEFINITION
DEFERRED
5
\\\\\forbidden/////
CLASS
*
DEFINITION
LOAD
6
\\\\\forbidden/////
CLASS
*
DEFINITION
LOCAL
FRIENDS
3
\\\\\allowed/////
AT
LINE-SELECTION
3
\\\\\allowed/////
AT
USER-COMMAND
4
\\\\\allowed/////
AT
SELECTION-SCREEN
**
3
\\\\\allowed/////
AT
PF*
2
\\\\\allowed/////
INITIALIZATION
2
\\\\\allowed/////
START-OF-SELECTION
2
\\\\\allowed/////

END-OF-SELECTION
3
\\\\\allowed/////
TOP-OF-PAGE
**
2
\\\\\allowed/////
END-OF-PAGE
3
\\\\\allowed/////
GET
**
3
\\\\\forbidden/////
GET
BADI
3
\\\\\forbidden/////
GET
BIT
3
\\\\\forbidden/////
GET
CONNECTION
3
\\\\\forbidden/////
GET
CURSOR
3
\\\\\forbidden/////
GET
DATASET
3
\\\\\forbidden/////
GET
LOCALE
3
\\\\\forbidden/////
GET
PARAMETER
3
\\\\\forbidden/////
GET
PF-STATUS
3
\\\\\forbidden/////
GET
PROPERTY
3
\\\\\forbidden/////
GET
REFERENCE
3
\\\\\forbidden/////
GET
RUN
3
\\\\\forbidden/////
GET
TIME

1
2
FUNCTION
CKML_F_DOCUMENT_CREATE_UPDATE
3
17
8
DATA: l_last_kalnr LIKE ckmlpp-kalnr,

l_last_zeile TYPE ckm3_upd_ckmlpp


-zeile,

l_last_poper LIKE ckmlpp-poper,

l_last_bdatj LIKE ckmlpp-bdatj,

lh_subrc

LIKE sy-subrc,

lh_index

LIKE sy-tabix,

lh_mat_values(50) TYPE c.

* bergabetabellen richtig sortieren

* Bei CKMLPP Zeile vor Periode, da sonst f


r jede Periode evtl. eine

* neue MLIT-Zeile erzeugt wird!

SORT t_ckmlpp BY kalnr zeile bdatj poper


.

4
* bergabetabellen richtig sortieren

* Bei CKMLPP Zeile vor Periode, da sonst f


r jede Periode evtl. eine

* neue MLIT-Zeile erzeugt wird!

SORT t_ckmlpp BY kalnr zeile bdatj poper


.

t_mlcrf-curtp

561
3
= t_ckmlcr-curtp.

t_mlcrf-feldg
b_transfer.

= y_verbr_nichtprs

t_mlcrf-prdif

= t_ckmlcr-vnprd_t

p.

4
APPEND t_mlcrf.

ENDIF.

IF t_mlcr-peinh IS INITIAL.

85
APPEND t_mlcrf.

ENDIF.

* Begin N980402

* Statistical Exchange Rate Differences

IF NOT t_ckmlcr-zukdm_ost IS INITIAL


.

CLEAR t_mlcrf.

t_mlcrf-mandt

t_mlcrf-belnr
Buchen vergeben

t_mlcrf-kjahr

= t_mlpp-mandt.

wird kurz vor

= t_mlpp-kjahr.

t_mlcrf-posnr

= t_mlpp-posnr.

t_mlcrf-bdatj

= t_mlpp-bdatj.

t_mlcrf-poper

= t_mlpp-poper.

t_mlcrf-curtp

= t_ckmlcr-curtp.

t_mlcrf-feldg

= y_zugang_einst_a

t_mlcrf-krdif

= t_ckmlcr-zukdm_o

uf_st.

st.

APPEND t_mlcrf.

ENDIF.

IF NOT t_ckmlcr-ekkdm_ost IS INITIAL


.

CLEAR t_mlcrf.

t_mlcrf-mandt

t_mlcrf-belnr
Buchen vergeben

= t_mlpp-mandt.

wird kurz vor

t_mlcrf-kjahr

= t_mlpp-kjahr.

t_mlcrf-posnr

= t_mlpp-posnr.

t_mlcrf-bdatj

= t_mlpp-bdatj.

t_mlcrf-poper

= t_mlpp-poper.

t_mlcrf-curtp

= t_ckmlcr-curtp.

t_mlcrf-feldg

= y_einkauf_einst_

t_mlcrf-krdif

= t_ckmlcr-ekkdm_o

auf_st.

st.

APPEND t_mlcrf.

ENDIF.

IF NOT t_ckmlcr-pbkdm_ost IS INITIAL


.

CLEAR t_mlcrf.

t_mlcrf-mandt

t_mlcrf-belnr
Buchen vergeben

t_mlcrf-kjahr

= t_mlpp-mandt.

wird kurz vor

= t_mlpp-kjahr.

t_mlcrf-posnr

= t_mlpp-posnr.

t_mlcrf-bdatj

= t_mlpp-bdatj.

t_mlcrf-poper

= t_mlpp-poper.

t_mlcrf-curtp

= t_ckmlcr-curtp.

t_mlcrf-feldg
t_auf_st.

= y_preisbegr_eins

t_mlcrf-krdif

= t_ckmlcr-pbkdm_o

st.

APPEND t_mlcrf.

ENDIF.

IF NOT t_ckmlcr-vpkdm_ost IS INITIAL


.

CLEAR t_mlcrf.

t_mlcrf-mandt

t_mlcrf-belnr
Buchen vergeben

= t_mlpp-mandt.

wird kurz vor

t_mlcrf-kjahr

= t_mlpp-kjahr.

t_mlcrf-posnr

= t_mlpp-posnr.

t_mlcrf-bdatj

= t_mlpp-bdatj.

t_mlcrf-poper

= t_mlpp-poper.

t_mlcrf-curtp

= t_ckmlcr-curtp.

t_mlcrf-feldg
inst_auf_st.

= y_verbr_preisb_e

t_mlcrf-krdif

= t_ckmlcr-vpkdm_o

st.

APPEND t_mlcrf.

ENDIF.

IF NOT t_ckmlcr-vppbkdm_ost IS INITI


AL.

CLEAR t_mlcrf.

t_mlcrf-mandt

t_mlcrf-belnr
Buchen vergeben

= t_mlpp-mandt.

wird kurz vor

t_mlcrf-kjahr

= t_mlpp-kjahr.

t_mlcrf-posnr

= t_mlpp-posnr.

t_mlcrf-bdatj

= t_mlpp-bdatj.

t_mlcrf-poper

= t_mlpp-poper.

t_mlcrf-curtp

= t_ckmlcr-curtp.

t_mlcrf-feldg
r_prsb_auf_st.

= y_preisbegr_verb

t_mlcrf-krdif

= t_ckmlcr-vppbkdm

_ost.

APPEND t_mlcrf.

ENDIF.

IF NOT t_ckmlcr-vnkdm_ost IS INITIAL


.

CLEAR t_mlcrf.

t_mlcrf-mandt

t_mlcrf-belnr
Buchen vergeben

= t_mlpp-mandt.

wird kurz vor

t_mlcrf-kjahr

= t_mlpp-kjahr.

t_mlcrf-posnr

= t_mlpp-posnr.

t_mlcrf-bdatj

= t_mlpp-bdatj.

t_mlcrf-poper

= t_mlpp-poper.

t_mlcrf-curtp

= t_ckmlcr-curtp.

t_mlcrf-feldg
b_einst_auf_st.

= y_verbr_nichtprs

t_mlcrf-krdif

= t_ckmlcr-vnkdm_o

st.

APPEND t_mlcrf.

ENDIF.

* End N980402

IF t_mlcr-peinh IS INITIAL.

612
4
it_mlcrp = t_mlcrp.

* Verdichtungsstze erzeugen (Tabelle MLCD


)

* Abrechnungssteuerung 2 kommt erst in FB


CKML_F_DOCUMENT_CREATE_CLOSING

1
* dran!

1
* dran, wenn alte V-Preis-Logik (vorgangsb
ezogen) aktiv ist.

LIMU
FUNC
CKMS_POST_PERIOD_DELTA
00004
LIMU
FUNC
CKMS_POST_PERIOD_DELTA
00000
37
1

\\\\\no_empty_blocks/////
1
\\\\\comments_not_ignored/////
1
\\\\\delta_normalized/////
1
\\\\\if_comments_ignored/////
3
\\\\\allowed/////
FORM
*
3
\\\\\allowed/////
FUNCTION
*
3
\\\\\allowed/////
MODULE
**
3
\\\\\allowed/////
REPORT
*
3
\\\\\allowed/////
PROGRAM
*
3
\\\\\allowed/////
FUNCTION-POOL
*
4
\\\\\allowed/////
CLASS
*
DEFINITION
4
\\\\\allowed/////
CLASS
*
IMPLEMENTATION
5
\\\\\forbidden/////
CLASS
*
DEFINITION
DEFERRED
5
\\\\\forbidden/////
CLASS
*
DEFINITION
LOAD
6
\\\\\forbidden/////
CLASS
*
DEFINITION
LOCAL
FRIENDS

3
\\\\\allowed/////
AT
LINE-SELECTION
3
\\\\\allowed/////
AT
USER-COMMAND
4
\\\\\allowed/////
AT
SELECTION-SCREEN
**
3
\\\\\allowed/////
AT
PF*
2
\\\\\allowed/////
INITIALIZATION
2
\\\\\allowed/////
START-OF-SELECTION
2
\\\\\allowed/////
END-OF-SELECTION
3
\\\\\allowed/////
TOP-OF-PAGE
**
2
\\\\\allowed/////
END-OF-PAGE
3
\\\\\allowed/////
GET
**
3
\\\\\forbidden/////
GET
BADI
3
\\\\\forbidden/////
GET
BIT
3
\\\\\forbidden/////
GET
CONNECTION
3
\\\\\forbidden/////
GET
CURSOR
3
\\\\\forbidden/////
GET
DATASET
3
\\\\\forbidden/////
GET

LOCALE
3
\\\\\forbidden/////
GET
PARAMETER
3
\\\\\forbidden/////
GET
PF-STATUS
3
\\\\\forbidden/////
GET
PROPERTY
3
\\\\\forbidden/////
GET
REFERENCE
3
\\\\\forbidden/////
GET
RUN
3
\\\\\forbidden/////
GET
TIME
1
2
FUNCTION
CKMS_POST_PERIOD_DELTA
1
181
3
vnkdm_ma = vnkdm_ma + lf_
delta_ckmlcr-vnkdm_ma

ebprd_ma = ebprd_ma + lf_


delta_ckmlcr-ebprd_ma

ebkdm_ma = ebkdm_ma + lf_


delta_ckmlcr-ebkdm_ma

1
WHERE kalnr = in_new_ckmlcr-ka
lnr AND

9
* Begin N980402

zukdm_ost = zukdm_ost
+ lf_delta_ckmlcr-zukdm_ost

ekkdm_ost = ekkdm_ost
+ lf_delta_ckmlcr-ekkdm_ost

pbkdm_ost = pbkdm_ost
+ lf_delta_ckmlcr-pbkdm_ost

vpkdm_ost = vpkdm_ost
+ lf_delta_ckmlcr-vpkdm_ost

vppbkdm_ost = vppbkdm_ost
+ lf_delta_ckmlcr-vppbkdm_ost

vnkdm_ost = vnkdm_ost
+ lf_delta_ckmlcr-vnkdm_ost

* End N980402

WHERE kalnr = in_new_ckmlcr-kaln


r AND

LIMU
FUNC
CKMW_MODIFY_CONDENSED_POH_EKBE
00005
LIMU
FUNC
CKMW_MODIFY_CONDENSED_POH_EKBE
00000
37
1
\\\\\no_empty_blocks/////
1
\\\\\comments_not_ignored/////
1
\\\\\delta_normalized/////
1
\\\\\if_comments_ignored/////
3
\\\\\allowed/////
FORM
*
3
\\\\\allowed/////
FUNCTION
*
3
\\\\\allowed/////
MODULE
**
3
\\\\\allowed/////
REPORT
*
3
\\\\\allowed/////
PROGRAM
*
3
\\\\\allowed/////
FUNCTION-POOL
*
4
\\\\\allowed/////
CLASS
*
DEFINITION
4

\\\\\allowed/////
CLASS
*
IMPLEMENTATION
5
\\\\\forbidden/////
CLASS
*
DEFINITION
DEFERRED
5
\\\\\forbidden/////
CLASS
*
DEFINITION
LOAD
6
\\\\\forbidden/////
CLASS
*
DEFINITION
LOCAL
FRIENDS
3
\\\\\allowed/////
AT
LINE-SELECTION
3
\\\\\allowed/////
AT
USER-COMMAND
4
\\\\\allowed/////
AT
SELECTION-SCREEN
**
3
\\\\\allowed/////
AT
PF*
2
\\\\\allowed/////
INITIALIZATION
2
\\\\\allowed/////
START-OF-SELECTION
2
\\\\\allowed/////
END-OF-SELECTION
3
\\\\\allowed/////
TOP-OF-PAGE
**
2
\\\\\allowed/////
END-OF-PAGE
3
\\\\\allowed/////
GET
**

3
\\\\\forbidden/////
GET
BADI
3
\\\\\forbidden/////
GET
BIT
3
\\\\\forbidden/////
GET
CONNECTION
3
\\\\\forbidden/////
GET
CURSOR
3
\\\\\forbidden/////
GET
DATASET
3
\\\\\forbidden/////
GET
LOCALE
3
\\\\\forbidden/////
GET
PARAMETER
3
\\\\\forbidden/////
GET
PF-STATUS
3
\\\\\forbidden/////
GET
PROPERTY
3
\\\\\forbidden/////
GET
REFERENCE
3
\\\\\forbidden/////
GET
RUN
3
\\\\\forbidden/////
GET
TIME
1
2
FUNCTION
CKMW_MODIFY_CONDENSED_POH_EKBE
5
147
3
IF xekbe-shkzg = 'S'.

HT_CONDENSED_MLBECR-WRBTR =

HT_CONDENSED_MLBECR-WRBTR + T_
MLBECR-WRBTR.

3
ELSE.

HT_CONDENSED_MLBECR-WRBTR =

HT_CONDENSED_MLBECR-WRBTR - T_
MLBECR-WRBTR.

7
ht_condensed_mlbecr-kudif =

ht_condensed_mlbecr-kudif + t_
mlbecr-kudif.
"N980402

ELSE.

ht_condensed_mlbecr-wrbtr =

ht_condensed_mlbecr-wrbtr - t_
mlbecr-wrbtr.

ht_condensed_mlbecr-kudif =

ht_condensed_mlbecr-kudif - t_
mlbecr-kudif.
"N980402

162
4
HT_CONDENSED_MLBECR-AREWR =

HT_CONDENSED_MLBECR-AREWR + T
_MLBECR-AREWR.

HT_CONDENSED_MLBECR-REEWR =

HT_CONDENSED_MLBECR-REEWR + T
_MLBECR-REEWR.

1
ELSE.

3
ht_condensed_mlbecr-kudif =

ht_condensed_mlbecr-kudif + t_
mlbecr-kudif.
"N980402

ELSE.

169
4
HT_CONDENSED_MLBECR-AREWR =

HT_CONDENSED_MLBECR-AREWR - T
_MLBECR-AREWR.

HT_CONDENSED_MLBECR-REEWR =

HT_CONDENSED_MLBECR-REEWR - T
_MLBECR-REEWR.

3
ht_condensed_mlbecr-kudif =

ht_condensed_mlbecr-kudif - t_
mlbecr-kudif.
"N980402

186
4
HT_CONDENSED_MLBECR-AREWR =

HT_CONDENSED_MLBECR-AREWR + T
_MLBECR-AREWR.

HT_CONDENSED_MLBECR-REEWR =

HT_CONDENSED_MLBECR-REEWR + T
_MLBECR-REEWR.

1
ELSE.

3
ht_condensed_mlbecr-kudif =

ht_condensed_mlbecr-kudif + t_
mlbecr-kudif.
"N980402

ELSE.

193
4
HT_CONDENSED_MLBECR-AREWR =

HT_CONDENSED_MLBECR-AREWR - T
_MLBECR-AREWR.

HT_CONDENSED_MLBECR-REEWR =

HT_CONDENSED_MLBECR-REEWR - T
_MLBECR-REEWR.

3
ht_condensed_mlbecr-kudif =

ht_condensed_mlbecr-kudif - t_
mlbecr-kudif.
"N980402

LIMU
FUNC
CKMW_MODIFY_CONDENSED_POH_EKBZ
00007
LIMU
FUNC
CKMW_MODIFY_CONDENSED_POH_EKBZ
00000
37
1
\\\\\no_empty_blocks/////
1
\\\\\comments_not_ignored/////
1
\\\\\delta_normalized/////
1
\\\\\if_comments_ignored/////
3
\\\\\allowed/////
FORM
*
3
\\\\\allowed/////
FUNCTION

*
3
\\\\\allowed/////
MODULE
**
3
\\\\\allowed/////
REPORT
*
3
\\\\\allowed/////
PROGRAM
*
3
\\\\\allowed/////
FUNCTION-POOL
*
4
\\\\\allowed/////
CLASS
*
DEFINITION
4
\\\\\allowed/////
CLASS
*
IMPLEMENTATION
5
\\\\\forbidden/////
CLASS
*
DEFINITION
DEFERRED
5
\\\\\forbidden/////
CLASS
*
DEFINITION
LOAD
6
\\\\\forbidden/////
CLASS
*
DEFINITION
LOCAL
FRIENDS
3
\\\\\allowed/////
AT
LINE-SELECTION
3
\\\\\allowed/////
AT
USER-COMMAND
4
\\\\\allowed/////
AT
SELECTION-SCREEN
**
3

\\\\\allowed/////
AT
PF*
2
\\\\\allowed/////
INITIALIZATION
2
\\\\\allowed/////
START-OF-SELECTION
2
\\\\\allowed/////
END-OF-SELECTION
3
\\\\\allowed/////
TOP-OF-PAGE
**
2
\\\\\allowed/////
END-OF-PAGE
3
\\\\\allowed/////
GET
**
3
\\\\\forbidden/////
GET
BADI
3
\\\\\forbidden/////
GET
BIT
3
\\\\\forbidden/////
GET
CONNECTION
3
\\\\\forbidden/////
GET
CURSOR
3
\\\\\forbidden/////
GET
DATASET
3
\\\\\forbidden/////
GET
LOCALE
3
\\\\\forbidden/////
GET
PARAMETER
3
\\\\\forbidden/////
GET
PF-STATUS
3
\\\\\forbidden/////
GET
PROPERTY
3

\\\\\forbidden/////
GET
REFERENCE
3
\\\\\forbidden/////
GET
RUN
3
\\\\\forbidden/////
GET
TIME
1
2
FUNCTION
CKMW_MODIFY_CONDENSED_POH_EKBZ
3
95
3
IF xekbz-shkzg = 'H'.
"Note 322440

ht_condensed_mlbecr-wrbtr =

ht_condensed_mlbecr-wrbtr + t
_mlbecr-wrbtr.

3
ELSE.

ht_condensed_mlbecr-wrbtr =

ht_condensed_mlbecr-wrbtr - t
_mlbecr-wrbtr.

7
ht_condensed_mlbecr-kudif =

ht_condensed_mlbecr-kudif + t_
mlbecr-kudif.
"N980402

ELSE.

ht_condensed_mlbecr-wrbtr =

ht_condensed_mlbecr-wrbtr - t
_mlbecr-wrbtr.

ht_condensed_mlbecr-kudif =

ht_condensed_mlbecr-kudif - t_
mlbecr-kudif.
"N980402

109
4
HT_CONDENSED_MLBECR-AREWR =

HT_CONDENSED_MLBECR-AREWR + T_
MLBECR-AREWR.

HT_CONDENSED_MLBECR-REEWR =

HT_CONDENSED_MLBECR-REEWR + T_
MLBECR-REEWR.

1
ELSE.

3
ht_condensed_mlbecr-kudif =

ht_condensed_mlbecr-kudif + t_
mlbecr-kudif.
"N980402

ELSE.

116
4
HT_CONDENSED_MLBECR-AREWR =

HT_CONDENSED_MLBECR-AREWR - T_
MLBECR-AREWR.

HT_CONDENSED_MLBECR-REEWR =

HT_CONDENSED_MLBECR-REEWR - T_
MLBECR-REEWR.

3
ht_condensed_mlbecr-kudif =

ht_condensed_mlbecr-kudif - t_
mlbecr-kudif.
"N980402

LIMU
FUNC
CKMW_REPLACE_AND_POST_POH
00005
LIMU

FUNC
CKMW_REPLACE_AND_POST_POH
00000
37
1
\\\\\no_empty_blocks/////
1
\\\\\comments_not_ignored/////
1
\\\\\delta_normalized/////
1
\\\\\if_comments_ignored/////
3
\\\\\allowed/////
FORM
*
3
\\\\\allowed/////
FUNCTION
*
3
\\\\\allowed/////
MODULE
**
3
\\\\\allowed/////
REPORT
*
3
\\\\\allowed/////
PROGRAM
*
3
\\\\\allowed/////
FUNCTION-POOL
*
4
\\\\\allowed/////
CLASS
*
DEFINITION
4
\\\\\allowed/////
CLASS
*
IMPLEMENTATION
5
\\\\\forbidden/////
CLASS
*
DEFINITION
DEFERRED
5
\\\\\forbidden/////
CLASS
*

DEFINITION
LOAD
6
\\\\\forbidden/////
CLASS
*
DEFINITION
LOCAL
FRIENDS
3
\\\\\allowed/////
AT
LINE-SELECTION
3
\\\\\allowed/////
AT
USER-COMMAND
4
\\\\\allowed/////
AT
SELECTION-SCREEN
**
3
\\\\\allowed/////
AT
PF*
2
\\\\\allowed/////
INITIALIZATION
2
\\\\\allowed/////
START-OF-SELECTION
2
\\\\\allowed/////
END-OF-SELECTION
3
\\\\\allowed/////
TOP-OF-PAGE
**
2
\\\\\allowed/////
END-OF-PAGE
3
\\\\\allowed/////
GET
**
3
\\\\\forbidden/////
GET
BADI
3
\\\\\forbidden/////
GET
BIT
3
\\\\\forbidden/////
GET
CONNECTION
3
\\\\\forbidden/////

GET
CURSOR
3
\\\\\forbidden/////
GET
DATASET
3
\\\\\forbidden/////
GET
LOCALE
3
\\\\\forbidden/////
GET
PARAMETER
3
\\\\\forbidden/////
GET
PF-STATUS
3
\\\\\forbidden/////
GET
PROPERTY
3
\\\\\forbidden/////
GET
REFERENCE
3
\\\\\forbidden/////
GET
RUN
3
\\\\\forbidden/////
GET
TIME
1
2
FUNCTION
CKMW_REPLACE_AND_POST_POH
1
23
3
INSERT mlbecrh FROM TABLE t_mlbecr.

ELSE.

IF i_ebeln IS INITIAL.

1
MESSAGE e099 WITH 'ckmw_replace_and_
post_poh' '1' space space.

1
MESSAGE e099 WITH 'ckmw_replace_and_
post_poh' '1' space.

LIMU
FUNC
GET_BUKRS_ML_CURRENCY_INFO
99997
LIMU
FUNC
GET_BUKRS_ML_CURRENCY_INFO
00000
37
1
\\\\\no_empty_blocks/////
1
\\\\\comments_not_ignored/////
1
\\\\\delta_normalized/////
1
\\\\\if_comments_ignored/////
3
\\\\\allowed/////
FORM
*
3
\\\\\allowed/////
FUNCTION
*
3
\\\\\allowed/////
MODULE
**
3
\\\\\allowed/////
REPORT
*
3

\\\\\allowed/////
PROGRAM
*
3
\\\\\allowed/////
FUNCTION-POOL
*
4
\\\\\allowed/////
CLASS
*
DEFINITION
4
\\\\\allowed/////
CLASS
*
IMPLEMENTATION
5
\\\\\forbidden/////
CLASS
*
DEFINITION
DEFERRED
5
\\\\\forbidden/////
CLASS
*
DEFINITION
LOAD
6
\\\\\forbidden/////
CLASS
*
DEFINITION
LOCAL
FRIENDS
3
\\\\\allowed/////
AT
LINE-SELECTION
3
\\\\\allowed/////
AT
USER-COMMAND
4
\\\\\allowed/////
AT
SELECTION-SCREEN
**
3
\\\\\allowed/////
AT
PF*
2
\\\\\allowed/////
INITIALIZATION
2
\\\\\allowed/////
START-OF-SELECTION
2

\\\\\allowed/////
END-OF-SELECTION
3
\\\\\allowed/////
TOP-OF-PAGE
**
2
\\\\\allowed/////
END-OF-PAGE
3
\\\\\allowed/////
GET
**
3
\\\\\forbidden/////
GET
BADI
3
\\\\\forbidden/////
GET
BIT
3
\\\\\forbidden/////
GET
CONNECTION
3
\\\\\forbidden/////
GET
CURSOR
3
\\\\\forbidden/////
GET
DATASET
3
\\\\\forbidden/////
GET
LOCALE
3
\\\\\forbidden/////
GET
PARAMETER
3
\\\\\forbidden/////
GET
PF-STATUS
3
\\\\\forbidden/////
GET
PROPERTY
3
\\\\\forbidden/////
GET
REFERENCE
3
\\\\\forbidden/////
GET
RUN
3
\\\\\forbidden/////
GET

TIME
1
2
FUNCTION
GET_BUKRS_ML_CURRENCY_INFO
1
1
0
0
68
FUNCTION GET_BUKRS_ML_CURRENCY_INFO.

* Disclosure of Exchange Rate Diff.


Package 137003

Work

* N980402

DATA:

lt_t001k LIKE t001k OCCURS 0 WITH HEAD


ER LINE,

lt_curtp TYPE cki_t_ml_cty,

ls_curtp TYPE cki_ml_cty,

ld_tabix LIKE sy-tabix.

IF i_bukrs IS INITIAL.

MESSAGE e301 WITH i_bukrs RAISING wron


g_input.

ENDIF.

SELECT * FROM t001k INTO TABLE lt_t001k

WHERE bukrs = i_bukrs

AND mlbwa = y_x.

IF sy-subrc NE 0.

MESSAGE e044 RAISING ml_inactive.

ENDIF.

LOOP AT lt_t001k.

CALL FUNCTION 'GET_BWKEY_CURRENCY_INFO


'

EXPORTING

bwkey
1k-bwkey

= lt_t00

call_by_init_prog

= 'X'

I_CUSTOMIZING

= 'X'

I_RUN_ID

TABLES

t_curtp_for_va

= lt_cur

tp

EXCEPTIONS

bwkey_not_found

= 1

bwkey_not_active

= 2

matled_not_found

= 3

internal_error

= 4

more_than_3_curtp

= 5

customizing_changed

= 6

OTHERS

= 7.

IF sy-subrc <> 0 AND sy-subrc <> 2.

MESSAGE e099 WITH 'GET_BUKRS_ML_CURR


ENCY_INFO' '1' sy-subrc.

ENDIF.

SORT lt_curtp BY curtp.

IF et_curtp[] IS INITIAL.

et_curtp = lt_curtp.

ELSE.

*
check if all valuation areas have th
e same currency type

(CURTP) and currency (WAERS)

LOOP AT et_curtp INTO ls_curtp.

READ TABLE lt_curtp

WITH KEY curtp = ls_curtp-curtp

waers = ls_curtp-waers

TRANSPORTING NO FIELDS.

ld_tabix = sy-tabix.

IF sy-subrc = 0.

DELETE lt_curtp INDEX ld_tabix.

ELSE.

MESSAGE e332 WITH i_bukrs RAISIN


G currencies_not_unique.

ENDIF.

ENDLOOP.

IF NOT lt_curtp[] IS INITIAL.

*
If an entry finally remains, curre
ncies are also not unique

MESSAGE e332 WITH i_bukrs RAISING


currencies_not_unique.

ENDIF.

ENDIF.

ENDLOOP.

ENDFUNCTION.

LIMU
FUNC
GET_BWKEY_CURRENCY_INFO
00003
LIMU
FUNC
GET_BWKEY_CURRENCY_INFO
00000
37
1
\\\\\no_empty_blocks/////
1
\\\\\comments_ignored/////
1
\\\\\delta_normalized/////
1
\\\\\if_comments_ignored/////
3
\\\\\allowed/////
FORM
*
3
\\\\\allowed/////
FUNCTION
*
3
\\\\\allowed/////
MODULE
**
3
\\\\\allowed/////
REPORT
*
3
\\\\\allowed/////
PROGRAM
*
3
\\\\\allowed/////
FUNCTION-POOL
*
4
\\\\\allowed/////
CLASS
*
DEFINITION

4
\\\\\allowed/////
CLASS
*
IMPLEMENTATION
5
\\\\\forbidden/////
CLASS
*
DEFINITION
DEFERRED
5
\\\\\forbidden/////
CLASS
*
DEFINITION
LOAD
6
\\\\\forbidden/////
CLASS
*
DEFINITION
LOCAL
FRIENDS
3
\\\\\allowed/////
AT
LINE-SELECTION
3
\\\\\allowed/////
AT
USER-COMMAND
4
\\\\\allowed/////
AT
SELECTION-SCREEN
**
3
\\\\\allowed/////
AT
PF*
2
\\\\\allowed/////
INITIALIZATION
2
\\\\\allowed/////
START-OF-SELECTION
2
\\\\\allowed/////
END-OF-SELECTION
3
\\\\\allowed/////
TOP-OF-PAGE
**
2
\\\\\allowed/////
END-OF-PAGE
3
\\\\\allowed/////
GET

**
3
\\\\\forbidden/////
GET
BADI
3
\\\\\forbidden/////
GET
BIT
3
\\\\\forbidden/////
GET
CONNECTION
3
\\\\\forbidden/////
GET
CURSOR
3
\\\\\forbidden/////
GET
DATASET
3
\\\\\forbidden/////
GET
LOCALE
3
\\\\\forbidden/////
GET
PARAMETER
3
\\\\\forbidden/////
GET
PF-STATUS
3
\\\\\forbidden/////
GET
PROPERTY
3
\\\\\forbidden/////
GET
REFERENCE
3
\\\\\forbidden/////
GET
RUN
3
\\\\\forbidden/////
GET
TIME
1
2
FUNCTION
GET_BWKEY_CURRENCY_INFO
2
312
9
ENDLOOP.

ENDIF.

ENDIF.

ENDIF.

* ---------------------------------------------------------------

* Now all currencies are collected, add in


formation and make checks

* ---------------------------------------------------------------

* bergabetabelle aufbauen

LOOP AT t_curtp_for_va.

22
* Begin N980402

* Handling of exchange rate differences fr


om customizing in invoice veri

SELECT SINGLE * FROM t169p WHERE bukrs =


t001k-bukrs.

IF sy-subrc <> 0.

CLEAR t169p.

ENDIF.

* check if data is valid

IF NOT t169p-ctml1 IS INITIAL.

READ TABLE t_curtp_for_va WITH KEY t16


9p-ctml1.

IF sy-subrc NE 0.

MESSAGE e025 WITH t001k-bukrs RAISIN


G customizing_changed.

ENDIF.

ENDIF.

IF NOT t169p-ctml2 IS INITIAL.

READ TABLE t_curtp_for_va WITH KEY t16


9p-ctml2.

IF sy-subrc NE 0.

MESSAGE e025 WITH t001k-bukrs RAISIN


G customizing_changed.

ENDIF.

ENDIF.

* End N980402

* bergabetabelle aufbauen

LOOP AT t_curtp_for_va.

t_curtp_for_va-text10

321
3
= t_curtp-te

xt10.

t_curtp_for_va-currtyp = t_curtp-cu
rrtyp.

t_curtp_for_va-valutyp = t_curtp-va
lutyp.

1
MODIFY t_curtp_for_va.

10
* Begin N980402

IF t_curtp_for_va-curtp = y_curtp_lc
.

t_curtp_for_va-xkudif = t169p-kdhw
.

ELSEIF t_curtp_for_va-curtp = t169pctml1.

t_curtp_for_va-xkudif = t169p-kdml
1.

ELSEIF t_curtp_for_va-curtp = t169pctml2.

t_curtp_for_va-xkudif = t169p-kdml
2.

ENDIF.

* End N980402

MODIFY t_curtp_for_va.

LIMU
FUNC
ME_READ_COND_INVOICE
00021
LIMU
FUNC
ME_READ_COND_INVOICE
00000
37
1
\\\\\no_empty_blocks/////
1
\\\\\comments_not_ignored/////
1
\\\\\delta_normalized/////
1
\\\\\if_comments_ignored/////
3
\\\\\allowed/////
FORM
*

3
\\\\\allowed/////
FUNCTION
*
3
\\\\\allowed/////
MODULE
**
3
\\\\\allowed/////
REPORT
*
3
\\\\\allowed/////
PROGRAM
*
3
\\\\\allowed/////
FUNCTION-POOL
*
4
\\\\\allowed/////
CLASS
*
DEFINITION
4
\\\\\allowed/////
CLASS
*
IMPLEMENTATION
5
\\\\\forbidden/////
CLASS
*
DEFINITION
DEFERRED
5
\\\\\forbidden/////
CLASS
*
DEFINITION
LOAD
6
\\\\\forbidden/////
CLASS
*
DEFINITION
LOCAL
FRIENDS
3
\\\\\allowed/////
AT
LINE-SELECTION
3
\\\\\allowed/////
AT
USER-COMMAND
4
\\\\\allowed/////
AT

SELECTION-SCREEN
**
3
\\\\\allowed/////
AT
PF*
2
\\\\\allowed/////
INITIALIZATION
2
\\\\\allowed/////
START-OF-SELECTION
2
\\\\\allowed/////
END-OF-SELECTION
3
\\\\\allowed/////
TOP-OF-PAGE
**
2
\\\\\allowed/////
END-OF-PAGE
3
\\\\\allowed/////
GET
**
3
\\\\\forbidden/////
GET
BADI
3
\\\\\forbidden/////
GET
BIT
3
\\\\\forbidden/////
GET
CONNECTION
3
\\\\\forbidden/////
GET
CURSOR
3
\\\\\forbidden/////
GET
DATASET
3
\\\\\forbidden/////
GET
LOCALE
3
\\\\\forbidden/////
GET
PARAMETER
3
\\\\\forbidden/////
GET
PF-STATUS
3
\\\\\forbidden/////

GET
PROPERTY
3
\\\\\forbidden/////
GET
REFERENCE
3
\\\\\forbidden/////
GET
RUN
3
\\\\\forbidden/////
GET
TIME
1
2
FUNCTION
ME_READ_COND_INVOICE
2
33
3
IF BEWAE_LOGIC_ON NE SPACE.

SU_BEWAE = 'X'.

ENDIF.

1
IF xek08b_flag ne '1'.

2
gs_ekbe_key = i_ekbe_key.
"N980402

IF xek08b_flag ne '1'.

141
4
SORT bzt BY ebeln ebelp stunr zaehk lifn
r bwtar vgabe gjahr belnr.

* docu: fill IV-interface structure xek08b


n

*- Summen bilden -----------------------------------------------------*

1
PERFORM xek08b_fuellen.

1
PERFORM xek08b_fuellen USING i_ekbe_key.
"N980402

LIMU
FUNC
ME_READ_ITEM_GOODS_RECEIPT
00014
LIMU

FUNC
ME_READ_ITEM_GOODS_RECEIPT
00000
37
1
\\\\\no_empty_blocks/////
1
\\\\\comments_not_ignored/////
1
\\\\\delta_normalized/////
1
\\\\\if_comments_ignored/////
3
\\\\\allowed/////
FORM
*
3
\\\\\allowed/////
FUNCTION
*
3
\\\\\allowed/////
MODULE
**
3
\\\\\allowed/////
REPORT
*
3
\\\\\allowed/////
PROGRAM
*
3
\\\\\allowed/////
FUNCTION-POOL
*
4
\\\\\allowed/////
CLASS
*
DEFINITION
4
\\\\\allowed/////
CLASS
*
IMPLEMENTATION
5
\\\\\forbidden/////
CLASS
*
DEFINITION
DEFERRED
5
\\\\\forbidden/////
CLASS
*

DEFINITION
LOAD
6
\\\\\forbidden/////
CLASS
*
DEFINITION
LOCAL
FRIENDS
3
\\\\\allowed/////
AT
LINE-SELECTION
3
\\\\\allowed/////
AT
USER-COMMAND
4
\\\\\allowed/////
AT
SELECTION-SCREEN
**
3
\\\\\allowed/////
AT
PF*
2
\\\\\allowed/////
INITIALIZATION
2
\\\\\allowed/////
START-OF-SELECTION
2
\\\\\allowed/////
END-OF-SELECTION
3
\\\\\allowed/////
TOP-OF-PAGE
**
2
\\\\\allowed/////
END-OF-PAGE
3
\\\\\allowed/////
GET
**
3
\\\\\forbidden/////
GET
BADI
3
\\\\\forbidden/////
GET
BIT
3
\\\\\forbidden/////
GET
CONNECTION
3
\\\\\forbidden/////

GET
CURSOR
3
\\\\\forbidden/////
GET
DATASET
3
\\\\\forbidden/////
GET
LOCALE
3
\\\\\forbidden/////
GET
PARAMETER
3
\\\\\forbidden/////
GET
PF-STATUS
3
\\\\\forbidden/////
GET
PROPERTY
3
\\\\\forbidden/////
GET
REFERENCE
3
\\\\\forbidden/////
GET
RUN
3
\\\\\forbidden/////
GET
TIME
1
2
FUNCTION
ME_READ_ITEM_GOODS_RECEIPT

endif.

4
26
3
"215075

resb_en = 'X'.

"674587

x_ekbeh = 'X'.

"694091

4
gf_xstor = xstor.
"N980402

gf_smbln = i_smbln.
"N980402

gf_sjahr = i_sjahr.
"N980402

70
5
ENDIF.

*KKO-EBELN = EBELN.

ENHANCEMENT-POINT ME_READ_ITEM_GOODS_RECEI
PT_02 SPOTS ES_SAPLEINR.

* docu: get/check relevant data from ekpo


and ekbe

1
PERFORM bestellpos_lesen USING i_werks s
pace.

15

* Begin N980402

* Read customizing of exchange rate differ


ence handling.

* Used at document cancellation and fixed


exchange rate in PO.

IF ekko-bukrs NE t169p-bukrs.

CALL FUNCTION 'MRM_DBTAB_T169P_READ'

EXPORTING

i_bukrs

= ekko-bukrs

i_buffer_on = 'X'

IMPORTING

e_t169p

ENDIF.

* End N980402

= t169p.

PERFORM bestellpos_lesen USING i_werks s


pace.

113
3
xekbnk_wa-frawe = betb_wa-frawe.

xekbnk_wa-nawwr = betb_wa-nawwr.

xekbnk_wa-fnwwr = betb_wa-fnwwr.

1
*--------------------------------------------------------------"K003063

4
xekbnk_wa-kudif = betb_wa-kudif.
"N980402

r.

xekbnk_wa-kudif_gr = betb_wa-kudif_g
"N980402

xekbnk_wa-kudif_ir = betb_wa-kudif_i
"N980402

r.

*--------------------------------------------------------------"K003063

164
3
PERFORM ebefu_sort.

* docu: processing for return items with s


hipping processing

PERFORM returns_via_sd.

* docu: check, if valid data were found

15

* Begin N980402

* Document cancellation with exchange rate


difference handling needs

* the exchange rate difference amount of t


he original document.

IF ( gf_xstor = '2' OR gf_xstor = 'X' )


AND

not gf_smbln IS INITIAL


AND

zaehlsto = 0
AND

( not t169p-kdhw IS INITIAL OR

not t169p-kdml1 IS INITIAL OR

not t169p-kdml2 IS INITIAL ).

zaehlsel = 0.

ENDIF.

* End N980402

* docu: check, if valid data were found

LIMU
FUNC
ME_READ_ITEM_INVOICE
00012
LIMU
FUNC
ME_READ_ITEM_INVOICE
00000
37
1
\\\\\no_empty_blocks/////

1
\\\\\comments_not_ignored/////
1
\\\\\delta_normalized/////
1
\\\\\if_comments_ignored/////
3
\\\\\allowed/////
FORM
*
3
\\\\\allowed/////
FUNCTION
*
3
\\\\\allowed/////
MODULE
**
3
\\\\\allowed/////
REPORT
*
3
\\\\\allowed/////
PROGRAM
*
3
\\\\\allowed/////
FUNCTION-POOL
*
4
\\\\\allowed/////
CLASS
*
DEFINITION
4
\\\\\allowed/////
CLASS
*
IMPLEMENTATION
5
\\\\\forbidden/////
CLASS
*
DEFINITION
DEFERRED
5
\\\\\forbidden/////
CLASS
*
DEFINITION
LOAD
6
\\\\\forbidden/////
CLASS
*
DEFINITION
LOCAL
FRIENDS
3

\\\\\allowed/////
AT
LINE-SELECTION
3
\\\\\allowed/////
AT
USER-COMMAND
4
\\\\\allowed/////
AT
SELECTION-SCREEN
**
3
\\\\\allowed/////
AT
PF*
2
\\\\\allowed/////
INITIALIZATION
2
\\\\\allowed/////
START-OF-SELECTION
2
\\\\\allowed/////
END-OF-SELECTION
3
\\\\\allowed/////
TOP-OF-PAGE
**
2
\\\\\allowed/////
END-OF-PAGE
3
\\\\\allowed/////
GET
**
3
\\\\\forbidden/////
GET
BADI
3
\\\\\forbidden/////
GET
BIT
3
\\\\\forbidden/////
GET
CONNECTION
3
\\\\\forbidden/////
GET
CURSOR
3
\\\\\forbidden/////
GET
DATASET
3
\\\\\forbidden/////
GET
LOCALE

3
\\\\\forbidden/////
GET
PARAMETER
3
\\\\\forbidden/////
GET
PF-STATUS
3
\\\\\forbidden/////
GET
PROPERTY
3
\\\\\forbidden/////
GET
REFERENCE
3
\\\\\forbidden/////
GET
RUN
3
\\\\\forbidden/////
GET
TIME
1
2
FUNCTION
ME_READ_ITEM_INVOICE
2
31
3
SU_KONT_WAERS = RE_WAERS.

x_ekbeh = 'X'.

3
IF NOT EBELP IS INITIAL.

EINGABE_EBELP = 'X'.

ENDIF.

18
gs_ekbe_key = i_ekbe_key.
"N980402

IF NOT EBELP IS INITIAL.

EINGABE_EBELP = 'X'.

ENDIF.

* Begin N980402

* Read customizing of exchange rate differ


ence handling.

* Used at document cancellation and fixed


exchange rate in PO.

IF iekko-bukrs NE t169p-bukrs.

CALL FUNCTION 'MRM_DBTAB_T169P_READ'

EXPORTING

i_bukrs

= iekko-bukrs

i_buffer_on = 'X'

IMPORTING

e_t169p

= t169p.

ENDIF.

* End N980402

94
3
PERFORM ML_KONTEN_PFLEGE_CURR_BUFFERN
USING
"K003063

XEK08RN_CURR[].
"K003063

ENDIF.
"K003063

* docu: check, if valid data were found

14

* Begin N980402

* Document cancellation with exchange rate


difference handling needs

* the exchange rate difference amount of t


he original document.

IF not i_ekbe_key IS INITIAL

zaehlsto = 0

AND

AND

( not t169p-kdhw IS INITIAL OR

not t169p-kdml1 IS INITIAL OR

not t169p-kdml2 IS INITIAL ).

zaehlsel = 0.

ENDIF.

* End N980402

* docu: check, if valid data were found

LIMU
FUNC
ME_READ_ITEM_TRANSFER
00010
LIMU
FUNC
ME_READ_ITEM_TRANSFER
00000
37
1
\\\\\no_empty_blocks/////
1
\\\\\comments_not_ignored/////
1

\\\\\delta_normalized/////
1
\\\\\if_comments_ignored/////
3
\\\\\allowed/////
FORM
*
3
\\\\\allowed/////
FUNCTION
*
3
\\\\\allowed/////
MODULE
**
3
\\\\\allowed/////
REPORT
*
3
\\\\\allowed/////
PROGRAM
*
3
\\\\\allowed/////
FUNCTION-POOL
*
4
\\\\\allowed/////
CLASS
*
DEFINITION
4
\\\\\allowed/////
CLASS
*
IMPLEMENTATION
5
\\\\\forbidden/////
CLASS
*
DEFINITION
DEFERRED
5
\\\\\forbidden/////
CLASS
*
DEFINITION
LOAD
6
\\\\\forbidden/////
CLASS
*
DEFINITION
LOCAL
FRIENDS
3
\\\\\allowed/////
AT
LINE-SELECTION

3
\\\\\allowed/////
AT
USER-COMMAND
4
\\\\\allowed/////
AT
SELECTION-SCREEN
**
3
\\\\\allowed/////
AT
PF*
2
\\\\\allowed/////
INITIALIZATION
2
\\\\\allowed/////
START-OF-SELECTION
2
\\\\\allowed/////
END-OF-SELECTION
3
\\\\\allowed/////
TOP-OF-PAGE
**
2
\\\\\allowed/////
END-OF-PAGE
3
\\\\\allowed/////
GET
**
3
\\\\\forbidden/////
GET
BADI
3
\\\\\forbidden/////
GET
BIT
3
\\\\\forbidden/////
GET
CONNECTION
3
\\\\\forbidden/////
GET
CURSOR
3
\\\\\forbidden/////
GET
DATASET
3
\\\\\forbidden/////
GET
LOCALE
3
\\\\\forbidden/////
GET

PARAMETER
3
\\\\\forbidden/////
GET
PF-STATUS
3
\\\\\forbidden/////
GET
PROPERTY
3
\\\\\forbidden/////
GET
REFERENCE
3
\\\\\forbidden/////
GET
RUN
3
\\\\\forbidden/////
GET
TIME
1
2
FUNCTION
ME_READ_ITEM_TRANSFER
4
17
3
ENDIF.
"215075

CLEAR vorgang.

resb_en = 'X'.
"674587

4
gf_xstor = xstor.
"N980402

gf_smbln = i_smbln.
"N980402

gf_sjahr = i_sjahr.
"N980402

41
4
MESSAGE e723 WITH ekko-ebeln ekko-resw
k

RAISING wrong_delivery_plant.

ENDIF.

1
*- Lesen Bestellposition ----------------------------------------------

14
* Begin N980402

* Read customizing of exchange rate differ


ence handling.

* Used at document cancellation and fixed


exchange rate in PO.

IF ekko-bukrs NE t169p-bukrs.

CALL FUNCTION 'MRM_DBTAB_T169P_READ'

EXPORTING

i_bukrs

= ekko-bukrs

i_buffer_on = 'X'

IMPORTING

e_t169p

= t169p.

ENDIF.

* End N980402

*- Lesen Bestellposition ----------------------------------------------

79
3
xekbnk_wa-frawe = betb_wa-frawe.

xekbnk_wa-nawwr = betb_wa-nawwr.

xekbnk_wa-fnwwr = betb_wa-fnwwr.

1
*--------------------------------------------------------------"K003063

4
xekbnk_wa-kudif = betb_wa-kudif.
"N980402

xekbnk_wa-kudif_gr = betb_wa-kudif_gr.
"N980402

xekbnk_wa-kudif_ir = betb_wa-kudif_ir.
"N980402

*--------------------------------------------------------------"K003063

120
3
t_ekpo = pot

t_komv = tkomv.

ENDIF.

"AL0K063092

CHECK zaehlsel EQ 0.

15

* Begin N980402

* Document cancellation with exchange rate


difference handling needs

* the exchange rate difference amount of t


he original document.

IF ( gf_xstor = '2' OR gf_xstor = 'X' )


AND

not gf_smbln IS INITIAL


AND

zaehlsto = 0
AND

( not t169p-kdhw IS INITIAL OR

not t169p-kdml1 IS INITIAL OR

not t169p-kdml2 IS INITIAL ).

zaehlsel = 0.

ENDIF.

* End N980402

CHECK zaehlsel EQ 0.

LIMU
FUNC
MRM_DRSEG_CR_CREATE
00006
LIMU
FUNC
MRM_DRSEG_CR_CREATE
00000
37
1
\\\\\no_empty_blocks/////
1
\\\\\comments_not_ignored/////
1
\\\\\delta_normalized/////
1
\\\\\if_comments_ignored/////
3
\\\\\allowed/////
FORM
*
3
\\\\\allowed/////
FUNCTION
*
3
\\\\\allowed/////
MODULE
**
3
\\\\\allowed/////
REPORT
*
3
\\\\\allowed/////
PROGRAM
*
3
\\\\\allowed/////
FUNCTION-POOL
*
4
\\\\\allowed/////
CLASS
*

DEFINITION
4
\\\\\allowed/////
CLASS
*
IMPLEMENTATION
5
\\\\\forbidden/////
CLASS
*
DEFINITION
DEFERRED
5
\\\\\forbidden/////
CLASS
*
DEFINITION
LOAD
6
\\\\\forbidden/////
CLASS
*
DEFINITION
LOCAL
FRIENDS
3
\\\\\allowed/////
AT
LINE-SELECTION
3
\\\\\allowed/////
AT
USER-COMMAND
4
\\\\\allowed/////
AT
SELECTION-SCREEN
**
3
\\\\\allowed/////
AT
PF*
2
\\\\\allowed/////
INITIALIZATION
2
\\\\\allowed/////
START-OF-SELECTION
2
\\\\\allowed/////
END-OF-SELECTION
3
\\\\\allowed/////
TOP-OF-PAGE
**
2
\\\\\allowed/////
END-OF-PAGE
3
\\\\\allowed/////

GET
**
3
\\\\\forbidden/////
GET
BADI
3
\\\\\forbidden/////
GET
BIT
3
\\\\\forbidden/////
GET
CONNECTION
3
\\\\\forbidden/////
GET
CURSOR
3
\\\\\forbidden/////
GET
DATASET
3
\\\\\forbidden/////
GET
LOCALE
3
\\\\\forbidden/////
GET
PARAMETER
3
\\\\\forbidden/////
GET
PF-STATUS
3
\\\\\forbidden/////
GET
PROPERTY
3
\\\\\forbidden/////
GET
REFERENCE
3
\\\\\forbidden/////
GET
RUN
3
\\\\\forbidden/////
GET
TIME
1
2
FORM
DRSEG_CR_CREATE
2
64
3
drseg_cr_wa-rewrt = ek08rn_cr_wa-r
ewrt.

drseg_cr_wa-wewrt = ek08rn_cr_wa-w
ewrt.

drseg_cr_wa-arewr = ek08rn_cr_wa-a
rewr.

1
ELSE.

udif.

2
drseg_cr_wa-kudif = ek08rn_cr_wa-k
"N980402

ELSE.

88
3
drseg_cr_wa-rewrt = ek08bn_cr_wa-r
ewrt.

drseg_cr_wa-wewrt = ek08bn_cr_wa-w
ewrt.

drseg_cr_wa-arewr = ek08bn_cr_wa-a
rewr.

1
ELSE.

udif.

2
drseg_cr_wa-kudif = ek08bn_cr_wa-k
"N980402

ELSE.

FUNC
MR_POSTING_GENERATE
00007

FUNC
MR_POSTING_GENERATE
00000
37
1
\\\\\no_empty_blocks/////
1
\\\\\comments_not_ignored/////
1
\\\\\delta_normalized/////
1
\\\\\if_comments_ignored/////
3
\\\\\allowed/////
FORM
*
3
\\\\\allowed/////
FUNCTION
*

3
\\\\\allowed/////
MODULE
**
3
\\\\\allowed/////
REPORT
*
3
\\\\\allowed/////
PROGRAM
*
3
\\\\\allowed/////
FUNCTION-POOL
*
4
\\\\\allowed/////
CLASS
*
DEFINITION
4
\\\\\allowed/////
CLASS
*
IMPLEMENTATION
5
\\\\\forbidden/////
CLASS
*
DEFINITION
DEFERRED
5
\\\\\forbidden/////
CLASS
*
DEFINITION
LOAD
6
\\\\\forbidden/////
CLASS
*
DEFINITION
LOCAL
FRIENDS
3
\\\\\allowed/////
AT
LINE-SELECTION
3
\\\\\allowed/////
AT
USER-COMMAND
4
\\\\\allowed/////
AT
SELECTION-SCREEN
**
3
\\\\\allowed/////

AT
PF*
2
\\\\\allowed/////
INITIALIZATION
2
\\\\\allowed/////
START-OF-SELECTION
2
\\\\\allowed/////
END-OF-SELECTION
3
\\\\\allowed/////
TOP-OF-PAGE
**
2
\\\\\allowed/////
END-OF-PAGE
3
\\\\\allowed/////
GET
**
3
\\\\\forbidden/////
GET
BADI
3
\\\\\forbidden/////
GET
BIT
3
\\\\\forbidden/////
GET
CONNECTION
3
\\\\\forbidden/////
GET
CURSOR
3
\\\\\forbidden/////
GET
DATASET
3
\\\\\forbidden/////
GET
LOCALE
3
\\\\\forbidden/////
GET
PARAMETER
3
\\\\\forbidden/////
GET
PF-STATUS
3
\\\\\forbidden/////
GET
PROPERTY
3
\\\\\forbidden/////

GET
REFERENCE
3
\\\\\forbidden/////
GET
RUN
3
\\\\\forbidden/////
GET
TIME
0
LIMU
REPS
L0MB4F10
00005
LIMU
REPS
L0MB4F10
00000
36
1
\\\\\no_empty_blocks/////
1
\\\\\comments_not_ignored/////
1
\\\\\delta_normalized/////
3
\\\\\allowed/////
FORM
*
3
\\\\\allowed/////
FUNCTION
*
3
\\\\\allowed/////
MODULE
**
3
\\\\\allowed/////
REPORT
*
3
\\\\\allowed/////
PROGRAM
*
3
\\\\\allowed/////
FUNCTION-POOL
*
4
\\\\\allowed/////

CLASS
*
DEFINITION
4
\\\\\allowed/////
CLASS
*
IMPLEMENTATION
5
\\\\\forbidden/////
CLASS
*
DEFINITION
DEFERRED
5
\\\\\forbidden/////
CLASS
*
DEFINITION
LOAD
6
\\\\\forbidden/////
CLASS
*
DEFINITION
LOCAL
FRIENDS
3
\\\\\allowed/////
AT
LINE-SELECTION
3
\\\\\allowed/////
AT
USER-COMMAND
4
\\\\\allowed/////
AT
SELECTION-SCREEN
**
3
\\\\\allowed/////
AT
PF*
2
\\\\\allowed/////
INITIALIZATION
2
\\\\\allowed/////
START-OF-SELECTION
2
\\\\\allowed/////
END-OF-SELECTION
3
\\\\\allowed/////
TOP-OF-PAGE
**
2
\\\\\allowed/////
END-OF-PAGE

3
\\\\\allowed/////
GET
**
3
\\\\\forbidden/////
GET
BADI
3
\\\\\forbidden/////
GET
BIT
3
\\\\\forbidden/////
GET
CONNECTION
3
\\\\\forbidden/////
GET
CURSOR
3
\\\\\forbidden/////
GET
DATASET
3
\\\\\forbidden/////
GET
LOCALE
3
\\\\\forbidden/////
GET
PARAMETER
3
\\\\\forbidden/////
GET
PF-STATUS
3
\\\\\forbidden/////
GET
PROPERTY
3
\\\\\forbidden/////
GET
REFERENCE
3
\\\\\forbidden/////
GET
RUN
3
\\\\\forbidden/////
GET
TIME
5
2
FORM
DOMVAL
1
17
3

IF sy-subrc EQ 1.

ENDIF.

1
ENDFORM.

1
ENDFORM.

"domval

2
FORM
DYNPRO_MODIF_KOMOK
2
16
3
LOOP AT SCREEN.

IF screen-group1 = '003'.

IF t156w-vorsl NE 'GBB' AND t156w-vo


rsl NE 'PRD' AND

1
t156w-vorsl NE 'KON' AND t156w-vo
rsl NE 'AUM'.

2
t156w-vorsl NE 'KON' AND t156w-vo
rsl NE 'AUM'

AND t156w-vorsl NE 'KDM'.


"N980402

46
3
ENDIF.
"sdp462

ENDIF.
"sdp462

ENDLOOP.

1
ENDFORM.

ENDFORM.
komok

1
"dynpro_modif_

2
FORM
T030W_LESEN
1
27
3
IF sy-subrc IS INITIAL.

MOVE-CORRESPONDING b030w TO t030w.

ENDIF.

1
ENDFORM.

1
ENDFORM.

"t030w_lesen

2
FORM
SHOW_STRING
1
60
3
MODIFY SCREEN.

ENDLOOP.

ENDIF.

1
ENDFORM.

1
ENDFORM.

"show_string

3
MODULE
CHECK_CHSMM
INPUT
1
10
3
CLEAR v_156b_ss-kzchp.

ENDIF.

ENDMODULE.

1
"check_chsmm

ENDMODULE.
INPUT

LIMU
REPS
LCKM1F0D
00007
LIMU
REPS
LCKM1F0D
00000
36
1
\\\\\no_empty_blocks/////
1
\\\\\comments_not_ignored/////
1
\\\\\delta_normalized/////
3
\\\\\allowed/////
FORM
*
3
\\\\\allowed/////
FUNCTION
*
3
\\\\\allowed/////
MODULE
**
3
\\\\\allowed/////
REPORT
*
3
\\\\\allowed/////
PROGRAM
*
3
\\\\\allowed/////

FUNCTION-POOL
*
4
\\\\\allowed/////
CLASS
*
DEFINITION
4
\\\\\allowed/////
CLASS
*
IMPLEMENTATION
5
\\\\\forbidden/////
CLASS
*
DEFINITION
DEFERRED
5
\\\\\forbidden/////
CLASS
*
DEFINITION
LOAD
6
\\\\\forbidden/////
CLASS
*
DEFINITION
LOCAL
FRIENDS
3
\\\\\allowed/////
AT
LINE-SELECTION
3
\\\\\allowed/////
AT
USER-COMMAND
4
\\\\\allowed/////
AT
SELECTION-SCREEN
**
3
\\\\\allowed/////
AT
PF*
2
\\\\\allowed/////
INITIALIZATION
2
\\\\\allowed/////
START-OF-SELECTION
2
\\\\\allowed/////
END-OF-SELECTION
3
\\\\\allowed/////
TOP-OF-PAGE

**
2
\\\\\allowed/////
END-OF-PAGE
3
\\\\\allowed/////
GET
**
3
\\\\\forbidden/////
GET
BADI
3
\\\\\forbidden/////
GET
BIT
3
\\\\\forbidden/////
GET
CONNECTION
3
\\\\\forbidden/////
GET
CURSOR
3
\\\\\forbidden/////
GET
DATASET
3
\\\\\forbidden/////
GET
LOCALE
3
\\\\\forbidden/////
GET
PARAMETER
3
\\\\\forbidden/////
GET
PF-STATUS
3
\\\\\forbidden/////
GET
PROPERTY
3
\\\\\forbidden/////
GET
REFERENCE
3
\\\\\forbidden/////
GET
RUN
3
\\\\\forbidden/////
GET
TIME
1
2
FORM
CLOSE_AND_POST_DIFFERENCES

1
384
5
CALL FUNCTION 'CKML_F_SET_FIELD_DATA'

EXPORTING

curtp = t_curtp-curtp

wrbtr = krdif

feldn = y_feldn_krdif

1
waers = t_curtp-waers

2
komok = y_komok_kdmmat
"N980402

waers = t_curtp-waers

LIMU
REPS
LCKM1TOP
00005
LIMU
REPS
LCKM1TOP
00000
36
1
\\\\\no_empty_blocks/////
1
\\\\\comments_ignored/////
1
\\\\\delta_normalized/////
3
\\\\\allowed/////
FORM
*
3
\\\\\allowed/////
FUNCTION
*
3
\\\\\allowed/////
MODULE
**
3
\\\\\allowed/////
REPORT
*
3
\\\\\allowed/////
PROGRAM
*
3
\\\\\allowed/////
FUNCTION-POOL
*
4
\\\\\allowed/////
CLASS
*
DEFINITION
4
\\\\\allowed/////
CLASS
*
IMPLEMENTATION
5
\\\\\forbidden/////

CLASS
*
DEFINITION
DEFERRED
5
\\\\\forbidden/////
CLASS
*
DEFINITION
LOAD
6
\\\\\forbidden/////
CLASS
*
DEFINITION
LOCAL
FRIENDS
3
\\\\\allowed/////
AT
LINE-SELECTION
3
\\\\\allowed/////
AT
USER-COMMAND
4
\\\\\allowed/////
AT
SELECTION-SCREEN
**
3
\\\\\allowed/////
AT
PF*
2
\\\\\allowed/////
INITIALIZATION
2
\\\\\allowed/////
START-OF-SELECTION
2
\\\\\allowed/////
END-OF-SELECTION
3
\\\\\allowed/////
TOP-OF-PAGE
**
2
\\\\\allowed/////
END-OF-PAGE
3
\\\\\allowed/////
GET
**
3
\\\\\forbidden/////
GET
BADI
3
\\\\\forbidden/////

GET
BIT
3
\\\\\forbidden/////
GET
CONNECTION
3
\\\\\forbidden/////
GET
CURSOR
3
\\\\\forbidden/////
GET
DATASET
3
\\\\\forbidden/////
GET
LOCALE
3
\\\\\forbidden/////
GET
PARAMETER
3
\\\\\forbidden/////
GET
PF-STATUS
3
\\\\\forbidden/////
GET
PROPERTY
3
\\\\\forbidden/////
GET
REFERENCE
3
\\\\\forbidden/////
GET
RUN
3
\\\\\forbidden/////
GET
TIME
1
2
FUNCTION-POOL
CKM1

Y_OBJECT_ID
"Objekt-Id fr

1
198
3
LIKE TCMF5-OBJECT_I

VALUE 'CKML',
"Fehlersteuerung

Y_CURTP_10(2) VALUE '10'.


aehrungstyp
"S11K156502

',

1
"Hausw

3
Y_KOMOK_KDMMAT TYPE komok VALUE 'ERN
"N980402

Y_CURTP_10(2) VALUE '10'.


aehrungstyp
"S11K156502

"Hausw

LIMU
REPS
LCKM2TOP
00001
LIMU
REPS
LCKM2TOP
00000
36
1
\\\\\no_empty_blocks/////
1

\\\\\comments_not_ignored/////
1
\\\\\delta_normalized/////
3
\\\\\allowed/////
FORM
*
3
\\\\\allowed/////
FUNCTION
*
3
\\\\\allowed/////
MODULE
**
3
\\\\\allowed/////
REPORT
*
3
\\\\\allowed/////
PROGRAM
*
3
\\\\\allowed/////
FUNCTION-POOL
*
4
\\\\\allowed/////
CLASS
*
DEFINITION
4
\\\\\allowed/////
CLASS
*
IMPLEMENTATION
5
\\\\\forbidden/////
CLASS
*
DEFINITION
DEFERRED
5
\\\\\forbidden/////
CLASS
*
DEFINITION
LOAD
6
\\\\\forbidden/////
CLASS
*
DEFINITION
LOCAL
FRIENDS
3
\\\\\allowed/////
AT
LINE-SELECTION

3
\\\\\allowed/////
AT
USER-COMMAND
4
\\\\\allowed/////
AT
SELECTION-SCREEN
**
3
\\\\\allowed/////
AT
PF*
2
\\\\\allowed/////
INITIALIZATION
2
\\\\\allowed/////
START-OF-SELECTION
2
\\\\\allowed/////
END-OF-SELECTION
3
\\\\\allowed/////
TOP-OF-PAGE
**
2
\\\\\allowed/////
END-OF-PAGE
3
\\\\\allowed/////
GET
**
3
\\\\\forbidden/////
GET
BADI
3
\\\\\forbidden/////
GET
BIT
3
\\\\\forbidden/////
GET
CONNECTION
3
\\\\\forbidden/////
GET
CURSOR
3
\\\\\forbidden/////
GET
DATASET
3
\\\\\forbidden/////
GET
LOCALE
3
\\\\\forbidden/////
GET

PARAMETER
3
\\\\\forbidden/////
GET
PF-STATUS
3
\\\\\forbidden/////
GET
PROPERTY
3
\\\\\forbidden/////
GET
REFERENCE
3
\\\\\forbidden/////
GET
RUN
3
\\\\\forbidden/////
GET
TIME
1
2
FUNCTION-POOL
CKM2
1
22
3
TCKMHD,

T001,

T001A,

1
T001K.

2
T169P,
"N980402

T001K.

LIMU
REPS
LCKM3F0D
00035
LIMU
REPS
LCKM3F0D
00000
36
1
\\\\\no_empty_blocks/////
1
\\\\\comments_not_ignored/////
1
\\\\\delta_normalized/////
3
\\\\\allowed/////
FORM
*
3
\\\\\allowed/////
FUNCTION
*
3
\\\\\allowed/////
MODULE
**
3
\\\\\allowed/////
REPORT
*
3
\\\\\allowed/////
PROGRAM
*
3
\\\\\allowed/////
FUNCTION-POOL
*
4

\\\\\allowed/////
CLASS
*
DEFINITION
4
\\\\\allowed/////
CLASS
*
IMPLEMENTATION
5
\\\\\forbidden/////
CLASS
*
DEFINITION
DEFERRED
5
\\\\\forbidden/////
CLASS
*
DEFINITION
LOAD
6
\\\\\forbidden/////
CLASS
*
DEFINITION
LOCAL
FRIENDS
3
\\\\\allowed/////
AT
LINE-SELECTION
3
\\\\\allowed/////
AT
USER-COMMAND
4
\\\\\allowed/////
AT
SELECTION-SCREEN
**
3
\\\\\allowed/////
AT
PF*
2
\\\\\allowed/////
INITIALIZATION
2
\\\\\allowed/////
START-OF-SELECTION
2
\\\\\allowed/////
END-OF-SELECTION
3
\\\\\allowed/////
TOP-OF-PAGE
**
2
\\\\\allowed/////

END-OF-PAGE
3
\\\\\allowed/////
GET
**
3
\\\\\forbidden/////
GET
BADI
3
\\\\\forbidden/////
GET
BIT
3
\\\\\forbidden/////
GET
CONNECTION
3
\\\\\forbidden/////
GET
CURSOR
3
\\\\\forbidden/////
GET
DATASET
3
\\\\\forbidden/////
GET
LOCALE
3
\\\\\forbidden/////
GET
PARAMETER
3
\\\\\forbidden/////
GET
PF-STATUS
3
\\\\\forbidden/////
GET
PROPERTY
3
\\\\\forbidden/////
GET
REFERENCE
3
\\\\\forbidden/////
GET
RUN
3
\\\\\forbidden/////
GET
TIME
3
2
FORM
CKM3_UPDATE
2
910
5

LOOP AT t_acccr WHERE awtyp = t_ac


cit-awtyp AND

awref = t_ac
cit-awref AND

aworg = t_ac
cit-aworg AND

posnr = t_ac
cit-posnr AND

curtp NE y_c
urtp_tc.

1
k_poper = t_accit-monat.

6
READ TABLE t_curtp WITH KEY curt
p = t_acccr-curtp."N980402

IF sy-subrc NE 0.
"N980402

CLEAR t_curtp.
"N980402

ENDIF.
"N980402

k_poper = t_accit-monat.

965
5
PERFORM werte_setzen

TABLES

t_accit

USING

s_urz

s_pos

k_kategorie

1
CHANGING t_acccr

2
t_curtp-xkudif
"N980402

CHANGING t_acccr

2
FORM
WERTE_SETZEN
3
17
5
FORM werte_setzen

TABLES

USING
s_urz

s_pos

t_accit

STRUCTURE accit

i_urz

TYPE

ckm3_

i_pos

TYPE

ckm3_

i_kategorie
b01z-kategorie

LIKE

ckmla

1
STRUCTURE acccr

CHANGING io_acccr

2
i_xkudif
TYPE
"N980402

CHANGING io_acccr

STRUCTURE acccr

160
5
IF i_pos-we = y_x AND

i_urz-lv IS INITIAL.

ADD io_acccr-wrbtr TO io_delta_ckm


lcr-ekkdm_o.

ENDIF.

ENDIF.

1
*

20
* Begin N980402

* If XKUDIF is set, exchange rate differ


ences are updated as

'statistical' values

IF NOT i_xkudif IS INITIAL.

ADD io_delta_ckmlcr-zukdm_o
delta_ckmlcr-zukdm_ost.

TO io_

ADD io_delta_ckmlcr-ekkdm_o
delta_ckmlcr-ekkdm_ost.

TO io_

ADD io_delta_ckmlcr-pbkdm_o
delta_ckmlcr-pbkdm_ost.

TO io_

ADD io_delta_ckmlcr-vpkdm_o
delta_ckmlcr-vpkdm_ost.

TO io_

ADD io_delta_ckmlcr-vppbkdm_o TO io_


delta_ckmlcr-vppbkdm_ost.

ADD io_delta_ckmlcr-vnkdm_o
delta_ckmlcr-vnkdm_ost.

CLEAR:

io_delta_ckmlcr-zukdm_o,

io_delta_ckmlcr-ekkdm_o,

io_delta_ckmlcr-pbkdm_o,

io_delta_ckmlcr-vpkdm_o,

TO io_

io_delta_ckmlcr-vppbkdm_o,

io_delta_ckmlcr-vnkdm_o.

ENDIF.

* End N980402

172
3
IF i_kategorie = ckmv3_co_kat-vp.
"Note 301325

io_delta_ckmlcr-vppbprd_o = io_delta_c
kmlcr-pbprd_o. "Note 301325

io_delta_ckmlcr-vppbkdm_o = io_delta_c
kmlcr-pbkdm_o. "Note 301325

ENDIF.
"Note 301325

2
io_delta_ckmlcr-vppbkdm_ost = io_delta
_ckmlcr-pbkdm_ost."N980402

ENDIF.
"Note 301325

2
FORM
BESTANDSZEILENSCHALTER_SETZEN
1
21
3

DATA: ld_is_return TYPE char1,

ld_ret TYPE char1.

1
*

LIMU
REPS
LCKM8F0B
00004
LIMU
REPS
LCKM8F0B
00000
36
1
\\\\\no_empty_blocks/////
1
\\\\\comments_not_ignored/////
1
\\\\\delta_normalized/////
3
\\\\\allowed/////
FORM
*
3
\\\\\allowed/////
FUNCTION
*
3
\\\\\allowed/////
MODULE
**
3
\\\\\allowed/////
REPORT
*
3
\\\\\allowed/////
PROGRAM
*
3
\\\\\allowed/////
FUNCTION-POOL
*
4
\\\\\allowed/////
CLASS
*
DEFINITION
4
\\\\\allowed/////
CLASS

*
IMPLEMENTATION
5
\\\\\forbidden/////
CLASS
*
DEFINITION
DEFERRED
5
\\\\\forbidden/////
CLASS
*
DEFINITION
LOAD
6
\\\\\forbidden/////
CLASS
*
DEFINITION
LOCAL
FRIENDS
3
\\\\\allowed/////
AT
LINE-SELECTION
3
\\\\\allowed/////
AT
USER-COMMAND
4
\\\\\allowed/////
AT
SELECTION-SCREEN
**
3
\\\\\allowed/////
AT
PF*
2
\\\\\allowed/////
INITIALIZATION
2
\\\\\allowed/////
START-OF-SELECTION
2
\\\\\allowed/////
END-OF-SELECTION
3
\\\\\allowed/////
TOP-OF-PAGE
**
2
\\\\\allowed/////
END-OF-PAGE
3
\\\\\allowed/////
GET
**
3
\\\\\forbidden/////

GET
BADI
3
\\\\\forbidden/////
GET
BIT
3
\\\\\forbidden/////
GET
CONNECTION
3
\\\\\forbidden/////
GET
CURSOR
3
\\\\\forbidden/////
GET
DATASET
3
\\\\\forbidden/////
GET
LOCALE
3
\\\\\forbidden/////
GET
PARAMETER
3
\\\\\forbidden/////
GET
PF-STATUS
3
\\\\\forbidden/////
GET
PROPERTY
3
\\\\\forbidden/////
GET
REFERENCE
3
\\\\\forbidden/////
GET
RUN
3
\\\\\forbidden/////
GET
TIME
4
2
FORM
MLS_TREE_BUILD_FIELDCAT
1
121
5
ls_fcat-fieldname = 'KABWE_M'.

ls_fcat-ref_table = 'KKB_ML_POS'.

ls_fcat-cfieldname = 'WAERS'.

ls_fcat-no_out = 'X'.

APPEND ls_fcat TO et_fieldcat.

9
* Begin N980402

* Einstufige Statistische Kursdifferenzen

CLEAR ls_fcat.

ls_fcat-fieldname = 'KABWE_EST'.

ls_fcat-ref_table = 'KKB_ML_POS'.

ls_fcat-cfieldname = 'WAERS'.

ls_fcat-no_out

APPEND ls_fcat

= y_x.

TO et_fieldcat.

* End N980402

2
FORM
MLS_CONVERT_TOTALS
2
104
3
lf_mls-pabwe_e = lf_ckmlcr-zuprd_o.

lf_mls-pabwe_m = lf_ckmlcr-zuprd_mo.

lf_mls-kabwe_e = lf_ckmlcr-zukdm_o.

1
lf_mls-kabwe_m = lf_ckmlcr-zukdm_mo.

2
lf_mls-kabwe_est = lf_ckmlcr-zukdm_ost
"N980402

lf_mls-kabwe_m = lf_ckmlcr-zukdm_mo.

116
3
lf_mls-menge = lf_ckmlpp-vpkumo.

lf_mls-pabwe_e = lf_ckmlcr-vpprd_o.

lf_mls-kabwe_e = lf_ckmlcr-vpkdm_o.

1
PERFORM mls_line_complete USING gf_ckm
lhd lf_ckmlpp lf_ckmlcr

2
lf_mls-kabwe_est = lf_ckmlcr-vpkdm_ost
"N980402

perform mls_line_complete using gf_ckm


lhd lf_ckmlpp lf_ckmlcr

2
FORM
MLS_CONVERT_MLCD
2
61
3
lf_mls-pabwe_e = lf_mlcd-estprd.

lf_mls-pabwe_m = lf_mlcd-mstprd.

lf_mls-kabwe_e = lf_mlcd-estkdm.

1
lf_mls-kabwe_m = lf_mlcd-mstkdm.

2
lf_mls-kabwe_est = lf_mlcd-estkdm_st
"N980402

lf_mls-kabwe_m = lf_mlcd-mstkdm.

87
3
lf_mls-pabwe_e = lf_mlcd-estprd.

lf_mls-pabwe_m = lf_mlcd-mstprd.

lf_mls-kabwe_e = lf_mlcd-estkdm.

1
lf_mls-kabwe_m = lf_mlcd-mstkdm.

2
lf_mls-kabwe_est = lf_mlcd-estkdm_st
"N980402

lf_mls-kabwe_m = lf_mlcd-mstkdm.

2
FORM
MLS_READ_DOCS
1
80
3
lf_mls-pabwe_e = <docs>-estprd.

lf_mls-pabwe_m = <docs>-mstprd.

lf_mls-kabwe_e = <docs>-estkdm.

1
lf_mls-kabwe_m = <docs>-mstkdm.

2
lf_mls-kabwe_est = <docs>-estkdm_st.
"N980402

lf_mls-kabwe_m = <docs>-mstkdm.

LIMU
REPS
LCKM8F0C
00005
LIMU
REPS
LCKM8F0C
00000
36
1

\\\\\no_empty_blocks/////
1
\\\\\comments_not_ignored/////
1
\\\\\delta_normalized/////
3
\\\\\allowed/////
FORM
*
3
\\\\\allowed/////
FUNCTION
*
3
\\\\\allowed/////
MODULE
**
3
\\\\\allowed/////
REPORT
*
3
\\\\\allowed/////
PROGRAM
*
3
\\\\\allowed/////
FUNCTION-POOL
*
4
\\\\\allowed/////
CLASS
*
DEFINITION
4
\\\\\allowed/////
CLASS
*
IMPLEMENTATION
5
\\\\\forbidden/////
CLASS
*
DEFINITION
DEFERRED
5
\\\\\forbidden/////
CLASS
*
DEFINITION
LOAD
6
\\\\\forbidden/////
CLASS
*
DEFINITION
LOCAL
FRIENDS
3
\\\\\allowed/////

AT
LINE-SELECTION
3
\\\\\allowed/////
AT
USER-COMMAND
4
\\\\\allowed/////
AT
SELECTION-SCREEN
**
3
\\\\\allowed/////
AT
PF*
2
\\\\\allowed/////
INITIALIZATION
2
\\\\\allowed/////
START-OF-SELECTION
2
\\\\\allowed/////
END-OF-SELECTION
3
\\\\\allowed/////
TOP-OF-PAGE
**
2
\\\\\allowed/////
END-OF-PAGE
3
\\\\\allowed/////
GET
**
3
\\\\\forbidden/////
GET
BADI
3
\\\\\forbidden/////
GET
BIT
3
\\\\\forbidden/////
GET
CONNECTION
3
\\\\\forbidden/////
GET
CURSOR
3
\\\\\forbidden/////
GET
DATASET
3
\\\\\forbidden/////
GET
LOCALE
3

\\\\\forbidden/////
GET
PARAMETER
3
\\\\\forbidden/////
GET
PF-STATUS
3
\\\\\forbidden/////
GET
PROPERTY
3
\\\\\forbidden/////
GET
REFERENCE
3
\\\\\forbidden/////
GET
RUN
3
\\\\\forbidden/////
GET
TIME
1
2
FORM
FELDKATALOG_AUFBAUEN
1
217
7
afield-fieldname = 'ESTKDM'.

afield-ref_table = 'MLCD'.

afield-datatype

= 'CURR'.

afield-cfieldname = 'WAERS'.

afield-no_out

= y_x.

APPEND afield

TO xfield.

1
* Mehrstufige Preisdifferenzen

11
* Begin N980402

* Einstufige Statistische Kursdifferenzen

CLEAR afield.

afield-fieldname = 'ESTKDM_ST'.

afield-ref_table = 'MLCD'.

afield-datatype

= 'CURR'.

afield-cfieldname = 'WAERS'.

afield-no_out

APPEND afield

= y_x.

TO xfield.

* End N980402

* Mehrstufige Preisdifferenzen

LIMU
REPS
LCKM8TOB
00001
LIMU
REPS
LCKM8TOB
00000

36
1
\\\\\no_empty_blocks/////
1
\\\\\comments_not_ignored/////
1
\\\\\delta_normalized/////
3
\\\\\allowed/////
FORM
*
3
\\\\\allowed/////
FUNCTION
*
3
\\\\\allowed/////
MODULE
**
3
\\\\\allowed/////
REPORT
*
3
\\\\\allowed/////
PROGRAM
*
3
\\\\\allowed/////
FUNCTION-POOL
*
4
\\\\\allowed/////
CLASS
*
DEFINITION
4
\\\\\allowed/////
CLASS
*
IMPLEMENTATION
5
\\\\\forbidden/////
CLASS
*
DEFINITION
DEFERRED
5
\\\\\forbidden/////
CLASS
*
DEFINITION
LOAD
6
\\\\\forbidden/////
CLASS
*
DEFINITION
LOCAL

FRIENDS
3
\\\\\allowed/////
AT
LINE-SELECTION
3
\\\\\allowed/////
AT
USER-COMMAND
4
\\\\\allowed/////
AT
SELECTION-SCREEN
**
3
\\\\\allowed/////
AT
PF*
2
\\\\\allowed/////
INITIALIZATION
2
\\\\\allowed/////
START-OF-SELECTION
2
\\\\\allowed/////
END-OF-SELECTION
3
\\\\\allowed/////
TOP-OF-PAGE
**
2
\\\\\allowed/////
END-OF-PAGE
3
\\\\\allowed/////
GET
**
3
\\\\\forbidden/////
GET
BADI
3
\\\\\forbidden/////
GET
BIT
3
\\\\\forbidden/////
GET
CONNECTION
3
\\\\\forbidden/////
GET
CURSOR
3
\\\\\forbidden/////
GET
DATASET
3
\\\\\forbidden/////

GET
LOCALE
3
\\\\\forbidden/////
GET
PARAMETER
3
\\\\\forbidden/////
GET
PF-STATUS
3
\\\\\forbidden/////
GET
PROPERTY
3
\\\\\forbidden/////
GET
REFERENCE
3
\\\\\forbidden/////
GET
RUN
3
\\\\\forbidden/////
GET
TIME
1
0
1
60
3
pabwe_e TYPE kkb_ml_pabwe_e,

pabwe_m TYPE kkb_ml_pabwe_m,

kabwe_e TYPE kkb_ml_kabwe_e,

1
kabwe_m TYPE kkb_ml_kabwe_m,

2
kabwe_est TYPE kkb_ml_kabwe_est,
"N980402

kabwe_m TYPE kkb_ml_kabwe_m,

LIMU
REPS
LCKM8TOC
00005
LIMU
REPS
LCKM8TOC
00000
36
1
\\\\\no_empty_blocks/////
1
\\\\\comments_not_ignored/////
1
\\\\\delta_normalized/////
3
\\\\\allowed/////
FORM
*
3
\\\\\allowed/////
FUNCTION
*
3
\\\\\allowed/////
MODULE
**
3
\\\\\allowed/////
REPORT
*
3
\\\\\allowed/////
PROGRAM
*
3
\\\\\allowed/////

FUNCTION-POOL
*
4
\\\\\allowed/////
CLASS
*
DEFINITION
4
\\\\\allowed/////
CLASS
*
IMPLEMENTATION
5
\\\\\forbidden/////
CLASS
*
DEFINITION
DEFERRED
5
\\\\\forbidden/////
CLASS
*
DEFINITION
LOAD
6
\\\\\forbidden/////
CLASS
*
DEFINITION
LOCAL
FRIENDS
3
\\\\\allowed/////
AT
LINE-SELECTION
3
\\\\\allowed/////
AT
USER-COMMAND
4
\\\\\allowed/////
AT
SELECTION-SCREEN
**
3
\\\\\allowed/////
AT
PF*
2
\\\\\allowed/////
INITIALIZATION
2
\\\\\allowed/////
START-OF-SELECTION
2
\\\\\allowed/////
END-OF-SELECTION
3
\\\\\allowed/////
TOP-OF-PAGE

**
2
\\\\\allowed/////
END-OF-PAGE
3
\\\\\allowed/////
GET
**
3
\\\\\forbidden/////
GET
BADI
3
\\\\\forbidden/////
GET
BIT
3
\\\\\forbidden/////
GET
CONNECTION
3
\\\\\forbidden/////
GET
CURSOR
3
\\\\\forbidden/////
GET
DATASET
3
\\\\\forbidden/////
GET
LOCALE
3
\\\\\forbidden/////
GET
PARAMETER
3
\\\\\forbidden/////
GET
PF-STATUS
3
\\\\\forbidden/////
GET
PROPERTY
3
\\\\\forbidden/////
GET
REFERENCE
3
\\\\\forbidden/////
GET
RUN
3
\\\\\forbidden/////
GET
TIME
1
3
CLASS
LCL_EVENT_RECEIVER

DEFINITION
1
61
3
salk3_old TYPE ckml_salk3_vor,
"Wert vor der Bew.

estprd

LIKE mlcd-estprd,

estkdm

LIKE mlcd-estkdm,

mstprd

LIKE mlcd-mstprd,

2
LIKE mlcd-estkdm_st,
"N980402

estkdm_st

mstprd

LIMU
REPS
LCKMBF0A
00010
LIMU
REPS
LCKMBF0A

like mlcd-mstprd,

00000
36
1
\\\\\no_empty_blocks/////
1
\\\\\comments_not_ignored/////
1
\\\\\delta_normalized/////
3
\\\\\allowed/////
FORM
*
3
\\\\\allowed/////
FUNCTION
*
3
\\\\\allowed/////
MODULE
**
3
\\\\\allowed/////
REPORT
*
3
\\\\\allowed/////
PROGRAM
*
3
\\\\\allowed/////
FUNCTION-POOL
*
4
\\\\\allowed/////
CLASS
*
DEFINITION
4
\\\\\allowed/////
CLASS
*
IMPLEMENTATION
5
\\\\\forbidden/////
CLASS
*
DEFINITION
DEFERRED
5
\\\\\forbidden/////
CLASS
*
DEFINITION
LOAD
6
\\\\\forbidden/////
CLASS

*
DEFINITION
LOCAL
FRIENDS
3
\\\\\allowed/////
AT
LINE-SELECTION
3
\\\\\allowed/////
AT
USER-COMMAND
4
\\\\\allowed/////
AT
SELECTION-SCREEN
**
3
\\\\\allowed/////
AT
PF*
2
\\\\\allowed/////
INITIALIZATION
2
\\\\\allowed/////
START-OF-SELECTION
2
\\\\\allowed/////
END-OF-SELECTION
3
\\\\\allowed/////
TOP-OF-PAGE
**
2
\\\\\allowed/////
END-OF-PAGE
3
\\\\\allowed/////
GET
**
3
\\\\\forbidden/////
GET
BADI
3
\\\\\forbidden/////
GET
BIT
3
\\\\\forbidden/////
GET
CONNECTION
3
\\\\\forbidden/////
GET
CURSOR
3
\\\\\forbidden/////
GET

DATASET
3
\\\\\forbidden/////
GET
LOCALE
3
\\\\\forbidden/////
GET
PARAMETER
3
\\\\\forbidden/////
GET
PF-STATUS
3
\\\\\forbidden/////
GET
PROPERTY
3
\\\\\forbidden/////
GET
REFERENCE
3
\\\\\forbidden/////
GET
RUN
3
\\\\\forbidden/////
GET
TIME
1
2
FORM
ACCIT_FILL
1
121
3
not_found_t030r

= 3

not_found_t030s

= 4.

IF sy-subrc <> 0.

1
CALL FUNCTION 'CM_F_COLLECT_MESSAGE'
.

27
*

Begin N980402

*
If for exchange rate posting KOMOK i
s set, and no account is

found, try again without KOMOK.

IF f_gnbu_it-vorsl = y_kdm AND f_gnb


u_it-komok = y_komok_kdmmat.

CALL FUNCTION 'MR_ACCOUNT_ASSIGNME


NT'

EXPORTING

ert_klasse

u_it-bwmod

bewertungsklasse
"P30K077560

= l_bew

bewertung_modif

= f_gnb

kontenplan

= f_gnb

u_it-ktopl

soll_haben_kennzeichen = shkzg

vorgangsschluessel

= f_gnb

i_wrxmod

= f_wrx

u_it-vorsl

mod

IMPORTING

buchungsschluessel

= t_acc

konto

= t_acc

it-bschl

it-hkont

EXCEPTIONS

not_found_t030

= 1

not_found_t030b

= 2

not_found_t030r

= 3

not_found_t030s

= 4.

IF sy-subrc <> 0.

CALL FUNCTION 'CM_F_COLLECT_MESS


AGE'.

ENDIF.

ELSE.

End N980402

CALL FUNCTION 'CM_F_COLLECT_MESSAG


E'.

ENDIF.
"N980402

LIMU
REPS
LCKMBTOP
00010
LIMU
REPS
LCKMBTOP
00000
36
1
\\\\\no_empty_blocks/////
1
\\\\\comments_not_ignored/////
1
\\\\\delta_normalized/////
3
\\\\\allowed/////
FORM
*
3
\\\\\allowed/////
FUNCTION
*
3
\\\\\allowed/////
MODULE
**
3
\\\\\allowed/////
REPORT
*
3
\\\\\allowed/////
PROGRAM
*
3
\\\\\allowed/////

FUNCTION-POOL
*
4
\\\\\allowed/////
CLASS
*
DEFINITION
4
\\\\\allowed/////
CLASS
*
IMPLEMENTATION
5
\\\\\forbidden/////
CLASS
*
DEFINITION
DEFERRED
5
\\\\\forbidden/////
CLASS
*
DEFINITION
LOAD
6
\\\\\forbidden/////
CLASS
*
DEFINITION
LOCAL
FRIENDS
3
\\\\\allowed/////
AT
LINE-SELECTION
3
\\\\\allowed/////
AT
USER-COMMAND
4
\\\\\allowed/////
AT
SELECTION-SCREEN
**
3
\\\\\allowed/////
AT
PF*
2
\\\\\allowed/////
INITIALIZATION
2
\\\\\allowed/////
START-OF-SELECTION
2
\\\\\allowed/////
END-OF-SELECTION
3
\\\\\allowed/////
TOP-OF-PAGE

**
2
\\\\\allowed/////
END-OF-PAGE
3
\\\\\allowed/////
GET
**
3
\\\\\forbidden/////
GET
BADI
3
\\\\\forbidden/////
GET
BIT
3
\\\\\forbidden/////
GET
CONNECTION
3
\\\\\forbidden/////
GET
CURSOR
3
\\\\\forbidden/////
GET
DATASET
3
\\\\\forbidden/////
GET
LOCALE
3
\\\\\forbidden/////
GET
PARAMETER
3
\\\\\forbidden/////
GET
PF-STATUS
3
\\\\\forbidden/////
GET
PROPERTY
3
\\\\\forbidden/////
GET
REFERENCE
3
\\\\\forbidden/////
GET
RUN
3
\\\\\forbidden/////
GET
TIME
1
2
FUNCTION-POOL
CKMB

1
394
3
y_frx like t169a-vorsl value 'FRX',

y_fre like t169a-vorsl value 'FRE',

y_bsx like t169a-vorsl value 'BSX',

4
y_kdm like t169a-vorsl value 'KDM',
"N908402

',

y_komok_kdmmat type komok value 'ERN


"N980402

LIMU
REPS
LCKMDO0M
00001
LIMU
REPS
LCKMDO0M
00000
36
1
\\\\\no_empty_blocks/////
1
\\\\\comments_not_ignored/////
1
\\\\\delta_normalized/////
3
\\\\\allowed/////
FORM
*
3
\\\\\allowed/////
FUNCTION
*
3
\\\\\allowed/////
MODULE
**
3
\\\\\allowed/////
REPORT
*
3
\\\\\allowed/////
PROGRAM
*
3
\\\\\allowed/////
FUNCTION-POOL
*
4
\\\\\allowed/////
CLASS
*
DEFINITION
4
\\\\\allowed/////
CLASS
*
IMPLEMENTATION
5
\\\\\forbidden/////

CLASS
*
DEFINITION
DEFERRED
5
\\\\\forbidden/////
CLASS
*
DEFINITION
LOAD
6
\\\\\forbidden/////
CLASS
*
DEFINITION
LOCAL
FRIENDS
3
\\\\\allowed/////
AT
LINE-SELECTION
3
\\\\\allowed/////
AT
USER-COMMAND
4
\\\\\allowed/////
AT
SELECTION-SCREEN
**
3
\\\\\allowed/////
AT
PF*
2
\\\\\allowed/////
INITIALIZATION
2
\\\\\allowed/////
START-OF-SELECTION
2
\\\\\allowed/////
END-OF-SELECTION
3
\\\\\allowed/////
TOP-OF-PAGE
**
2
\\\\\allowed/////
END-OF-PAGE
3
\\\\\allowed/////
GET
**
3
\\\\\forbidden/////
GET
BADI
3
\\\\\forbidden/////

GET
BIT
3
\\\\\forbidden/////
GET
CONNECTION
3
\\\\\forbidden/////
GET
CURSOR
3
\\\\\forbidden/////
GET
DATASET
3
\\\\\forbidden/////
GET
LOCALE
3
\\\\\forbidden/////
GET
PARAMETER
3
\\\\\forbidden/////
GET
PF-STATUS
3
\\\\\forbidden/////
GET
PROPERTY
3
\\\\\forbidden/////
GET
REFERENCE
3
\\\\\forbidden/////
GET
RUN
3
\\\\\forbidden/////
GET
TIME
1
3
MODULE
MOVE_TABLES_TO_02_3_400
OUTPUT
1
111
3
WHEN y_verbr_nichtprsb_einst_aufgel.

ckmd_mlcr-vnprd_o = t_mlcrf-prdif.

ckmd_mlcr-vnkdm_o = t_mlcrf-krdif.

1
WHEN y_umbew_einst_aufgel.

9
* Begin N980402

WHEN y_zugang_einst_auf_st.

ckmd_mlcr-zukdm_ost = t_mlcrf-krdi
f.

WHEN y_verbr_preisb_einst_auf_st.

ckmd_mlcr-vpkdm_ost = t_mlcrf-krdi
f.

WHEN y_verbr_nichtprsb_einst_auf_st.

ckmd_mlcr-vnkdm_ost = t_mlcrf-krdi
f.

* End N980402

WHEN y_umbew_einst_aufgel.

LIMU
REPS
LCKMDO0T
00001
LIMU
REPS
LCKMDO0T
00000
36
1
\\\\\no_empty_blocks/////
1
\\\\\comments_not_ignored/////
1
\\\\\delta_normalized/////
3
\\\\\allowed/////
FORM
*
3
\\\\\allowed/////
FUNCTION
*
3
\\\\\allowed/////
MODULE
**
3
\\\\\allowed/////

REPORT
*
3
\\\\\allowed/////
PROGRAM
*
3
\\\\\allowed/////
FUNCTION-POOL
*
4
\\\\\allowed/////
CLASS
*
DEFINITION
4
\\\\\allowed/////
CLASS
*
IMPLEMENTATION
5
\\\\\forbidden/////
CLASS
*
DEFINITION
DEFERRED
5
\\\\\forbidden/////
CLASS
*
DEFINITION
LOAD
6
\\\\\forbidden/////
CLASS
*
DEFINITION
LOCAL
FRIENDS
3
\\\\\allowed/////
AT
LINE-SELECTION
3
\\\\\allowed/////
AT
USER-COMMAND
4
\\\\\allowed/////
AT
SELECTION-SCREEN
**
3
\\\\\allowed/////
AT
PF*
2
\\\\\allowed/////
INITIALIZATION
2

\\\\\allowed/////
START-OF-SELECTION
2
\\\\\allowed/////
END-OF-SELECTION
3
\\\\\allowed/////
TOP-OF-PAGE
**
2
\\\\\allowed/////
END-OF-PAGE
3
\\\\\allowed/////
GET
**
3
\\\\\forbidden/////
GET
BADI
3
\\\\\forbidden/////
GET
BIT
3
\\\\\forbidden/////
GET
CONNECTION
3
\\\\\forbidden/////
GET
CURSOR
3
\\\\\forbidden/////
GET
DATASET
3
\\\\\forbidden/////
GET
LOCALE
3
\\\\\forbidden/////
GET
PARAMETER
3
\\\\\forbidden/////
GET
PF-STATUS
3
\\\\\forbidden/////
GET
PROPERTY
3
\\\\\forbidden/////
GET
REFERENCE
3
\\\\\forbidden/////
GET
RUN

3
\\\\\forbidden/////
GET
TIME
1
3
MODULE
TABSTRIP_ACTIVATE_FORT
OUTPUT
5
38
4
CKMD_MLCR-ZUPRD_O = CKMD_MLCR-ZUPRD_O
+ CKMD_MLCR-VPPRD_O +

CKMD_MLCR-VNPRD_O.

CKMD_MLCR-ZUKDM_O = CKMD_MLCR-ZUKDM_O
+ CKMD_MLCR-VPKDM_O +

CKMD_MLCR-VNKDM_O.

1
LOOP AT SCREEN.

4
CKMD_MLCR-ZUKDM_OST = CKMD_MLCR-ZUKDM_
OST +
"N980402

CKMD_MLCR-VPKDM_
OST +

"N980402

CKMD_MLCR-VNKDM_
OST.

"N980402

LOOP AT SCREEN.

61
3
WHEN 'ZUOA'.

IF CKMD_MLPP-ZUKUMO IS INITIAL A
ND

CKMD_MLCR-ZUPRD_O IS INITIAL
AND

1
CKMD_MLCR-ZUKDM_O IS INITIAL.

3
CKMD_MLCR-ZUKDM_O IS INITIAL.
"N980402

AND

CKMD_MLCR-ZUKDM_O IS INITIAL
"N980402

L.

CKMD_MLCR-ZUKDM_OST IS INITIA
"N980402

89
3
WHEN Y_ZUGANG_EINST_AUFGEL.

IF CKMD_MLPP-ZUKUMO IS INITIAL A
ND

CKMD_MLCR-ZUPRD_O IS INITIAL
AND

1
CKMD_MLCR-ZUKDM_O IS INITIAL.

3
CKMD_MLCR-ZUKDM_O IS INITIAL.
"N980402

AND

CKMD_MLCR-ZUKDM_O IS INITIAL
"N980402

L.

CKMD_MLCR-ZUKDM_OST IS INITIA
"N980402

96
3
WHEN Y_VERBR_PREISB_EINST_AUFGEL.

IF CKMD_MLPP-VPKUMO IS INITIAL A
ND

CKMD_MLCR-VPPRD_O IS INITIAL
AND

1
CKMD_MLCR-VPKDM_O IS INITIAL.

3
CKMD_MLCR-VPKDM_O IS INITIAL.
"N980402

AND

CKMD_MLCR-VPKDM_O IS INITIAL
"N980402

L.

CKMD_MLCR-VPKDM_OST IS INITIA
"N980402

103
3
WHEN Y_VERBR_NICHTPRSB_EINST_AUFGE
L.

IF CKMD_MLPP-VNKUMO IS INITIAL A
ND

CKMD_MLCR-VNPRD_O IS INITIAL
AND

1
CKMD_MLCR-VNKDM_O IS INITIAL.

3
CKMD_MLCR-VNKDM_O IS INITIAL.
"N980402

AND

CKMD_MLCR-VNKDM_O IS INITIAL
"N980402

L.

CKMD_MLCR-VNKDM_OST IS INITIA
"N980402

LIMU
REPS
LCKMDTOP_FELDGRUPPEN
00001
LIMU
REPS
LCKMDTOP_FELDGRUPPEN

00000
36
1
\\\\\no_empty_blocks/////
1
\\\\\comments_not_ignored/////
1
\\\\\delta_normalized/////
3
\\\\\allowed/////
FORM
*
3
\\\\\allowed/////
FUNCTION
*
3
\\\\\allowed/////
MODULE
**
3
\\\\\allowed/////
REPORT
*
3
\\\\\allowed/////
PROGRAM
*
3
\\\\\allowed/////
FUNCTION-POOL
*
4
\\\\\allowed/////
CLASS
*
DEFINITION
4
\\\\\allowed/////
CLASS
*
IMPLEMENTATION
5
\\\\\forbidden/////
CLASS
*
DEFINITION
DEFERRED
5
\\\\\forbidden/////
CLASS
*
DEFINITION
LOAD
6
\\\\\forbidden/////

CLASS
*
DEFINITION
LOCAL
FRIENDS
3
\\\\\allowed/////
AT
LINE-SELECTION
3
\\\\\allowed/////
AT
USER-COMMAND
4
\\\\\allowed/////
AT
SELECTION-SCREEN
**
3
\\\\\allowed/////
AT
PF*
2
\\\\\allowed/////
INITIALIZATION
2
\\\\\allowed/////
START-OF-SELECTION
2
\\\\\allowed/////
END-OF-SELECTION
3
\\\\\allowed/////
TOP-OF-PAGE
**
2
\\\\\allowed/////
END-OF-PAGE
3
\\\\\allowed/////
GET
**
3
\\\\\forbidden/////
GET
BADI
3
\\\\\forbidden/////
GET
BIT
3
\\\\\forbidden/////
GET
CONNECTION
3
\\\\\forbidden/////
GET
CURSOR
3
\\\\\forbidden/////

GET
DATASET
3
\\\\\forbidden/////
GET
LOCALE
3
\\\\\forbidden/////
GET
PARAMETER
3
\\\\\forbidden/////
GET
PF-STATUS
3
\\\\\forbidden/////
GET
PROPERTY
3
\\\\\forbidden/////
GET
REFERENCE
3
\\\\\forbidden/////
GET
RUN
3
\\\\\forbidden/////
GET
TIME
1
0
1
46
3
y_verbr_nachbel_einst LIKE mlppf-feldg V
ALUE 'VNBE',

y_verbr_nachbel_mehrst LIKE mlppf-feldg


VALUE 'VNBM',

* ACHTUNG: Nur statistisch!

1
y_verbr_nichtprsb_stat LIKE mlppf-feldg
VALUE 'VNOS'.

8
y_verbr_nichtprsb_stat LIKE mlppf-feldg
VALUE 'VNOS',

* For statistical exchange rate difference


s

y_zugang_einst_auf_st LIKE mlppf-feldg V


ALUE 'ZUOS',
"N980402

y_verbr_preisb_einst_auf_st LIKE mlppf-f


eldg VALUE 'VPOS', "N980402

y_verbr_nichtprsb_einst_auf_st LIKE mlpp


f-feldg VALUE 'VNOS',"N980402

y_einkauf_einst_auf_st LIKE mlppf-feldg


VALUE 'EKOS',
"N980402

y_preisbegr_einst_auf_st LIKE mlppf-feld


g VALUE 'PBOS',
"N980402

y_preisbegr_verbr_prsb_auf_st LIKE mlppf


-feldg VALUE 'VPPS'. "N980402

LIMU
REPS
LEINRD01
00001
LIMU
REPS
LEINRD01
00000
36
1
\\\\\no_empty_blocks/////
1
\\\\\comments_ignored/////
1
\\\\\delta_normalized/////
3
\\\\\allowed/////
FORM
*
3
\\\\\allowed/////
FUNCTION
*
3
\\\\\allowed/////
MODULE
**
3
\\\\\allowed/////
REPORT
*
3
\\\\\allowed/////
PROGRAM
*
3
\\\\\allowed/////
FUNCTION-POOL
*
4
\\\\\allowed/////
CLASS
*
DEFINITION
4
\\\\\allowed/////
CLASS
*
IMPLEMENTATION
5
\\\\\forbidden/////

CLASS
*
DEFINITION
DEFERRED
5
\\\\\forbidden/////
CLASS
*
DEFINITION
LOAD
6
\\\\\forbidden/////
CLASS
*
DEFINITION
LOCAL
FRIENDS
3
\\\\\allowed/////
AT
LINE-SELECTION
3
\\\\\allowed/////
AT
USER-COMMAND
4
\\\\\allowed/////
AT
SELECTION-SCREEN
**
3
\\\\\allowed/////
AT
PF*
2
\\\\\allowed/////
INITIALIZATION
2
\\\\\allowed/////
START-OF-SELECTION
2
\\\\\allowed/////
END-OF-SELECTION
3
\\\\\allowed/////
TOP-OF-PAGE
**
2
\\\\\allowed/////
END-OF-PAGE
3
\\\\\allowed/////
GET
**
3
\\\\\forbidden/////
GET
BADI
3
\\\\\forbidden/////

GET
BIT
3
\\\\\forbidden/////
GET
CONNECTION
3
\\\\\forbidden/////
GET
CURSOR
3
\\\\\forbidden/////
GET
DATASET
3
\\\\\forbidden/////
GET
LOCALE
3
\\\\\forbidden/////
GET
PARAMETER
3
\\\\\forbidden/////
GET
PF-STATUS
3
\\\\\forbidden/////
GET
PROPERTY
3
\\\\\forbidden/////
GET
REFERENCE
3
\\\\\forbidden/////
GET
RUN
3
\\\\\forbidden/////
GET
TIME
1
0
9
71
3
wewrt type mlcr_curr_tbl,

rewrt type mlcr_curr_tbl,

arewr type mlcr_curr_tbl,

1
end of mlcr_ebefu_cr,

4
kudif TYPE mlcr_curr_tbl,
"N980402

kudif_gr TYPE mlcr_curr_tbl,


"N980402

kudif_ir TYPE mlcr_curr_tbl,


"N980402

end of mlcr_ebefu_cr,

81
3
frawe type mlcr_curr_tbl,

nawwr type mlcr_curr_tbl,

fnwwr type mlcr_curr_tbl,

1
end of mlcr_ekbnk_cr,

4
kudif TYPE mlcr_curr_tbl,
"N980402

kudif_gr TYPE mlcr_curr_tbl,


"N980402

kudif_ir TYPE mlcr_curr_tbl,


"N980402

end of mlcr_ekbnk_cr,

90
8

* EK08RN_CR ( parallele EK08RN-Tabelle )

begin of mlcr_ek08rn_cr,

key

type mlcr_ek08rn_key,

reewr type mlcr_curr_tbl,

rewrt type mlcr_curr_tbl,

wewrt type mlcr_curr_tbl,

arewr type mlcr_curr_tbl,

1
*

ANZAL TYPE MLCR_CURR_TBL,

2
kudif TYPE mlcr_curr_tbl,
"N980402

ANZAL TYPE MLCR_CURR_TBL,

100
3
reewr type mlcr_curr_tbl,

rewrt type mlcr_curr_tbl,

wewrt type mlcr_curr_tbl,

1
end of mlcr_ek08bn_cr,

2
kudif TYPE mlcr_curr_tbl,
"N980402

end of mlcr_ek08bn_cr,

153
3
dmbtr type mlcr_curr_tbl,

reewr type mlcr_curr_tbl,

arewr type mlcr_curr_tbl,

1
end of ty_bet_wa,

4
kudif TYPE mlcr_curr_tbl,
"N980402

kudif_gr TYPE mlcr_curr_tbl,


"N980402

kudif_ir TYPE mlcr_curr_tbl,


"N980402

end of ty_bet_wa,

163
3
rewrt type mlcr_curr_tbl,

wewrt type mlcr_curr_tbl,

anzal type mlcr_curr_tbl,

1
end of ty_bets_wa,

4
kudif TYPE mlcr_curr_tbl,
"N980402

kudif_gr TYPE mlcr_curr_tbl,


"N980402

kudif_ir TYPE mlcr_curr_tbl,


"N980402

end of ty_bets_wa,

172
8

* Interne whrungsgerechte Summentabellen


(BETZ-Erweiterung)

begin of ty_betz_wa,

key

like betzkey,

arewr type mlcr_curr_tbl,

reewr type mlcr_curr_tbl,

rewrt type mlcr_curr_tbl,

wewrt type mlcr_curr_tbl,

1
end of ty_betz_wa,

4
kudif TYPE mlcr_curr_tbl,

"N980402

kudif_gr TYPE mlcr_curr_tbl,


"N980402

kudif_ir TYPE mlcr_curr_tbl,


"N980402

end of ty_betz_wa,

180
7

* Interne whrungsgerechte Summentabellen


(BZT-Erweiterung)

begin of ty_bzt_wa,

key

like bzti_key,

dmbtr type mlcr_curr_tbl,

reewr type mlcr_curr_tbl,

arewr type mlcr_curr_tbl,

1
end of ty_bzt_wa,

4
kudif TYPE mlcr_curr_tbl,
"N980402

kudif_gr TYPE mlcr_curr_tbl,


"N980402

kudif_ir TYPE mlcr_curr_tbl,


"N980402

end of ty_bzt_wa,

190
3
frawe type mlcr_curr_tbl,

nawwr type mlcr_curr_tbl,

fnwwr type mlcr_curr_tbl,

1
end of ty_betb_wa,

4
kudif TYPE mlcr_curr_tbl,
"N980402

kudif_gr TYPE mlcr_curr_tbl,


"N980402

kudif_ir TYPE mlcr_curr_tbl,


"N980402

end of ty_betb_wa,

LIMU
REPS
LEINRF0D

00010
LIMU
REPS
LEINRF0D
00000
36
1
\\\\\no_empty_blocks/////
1
\\\\\comments_ignored/////
1
\\\\\delta_normalized/////
3
\\\\\allowed/////
FORM
*
3
\\\\\allowed/////
FUNCTION
*
3
\\\\\allowed/////
MODULE
**
3
\\\\\allowed/////
REPORT
*
3
\\\\\allowed/////
PROGRAM
*
3
\\\\\allowed/////
FUNCTION-POOL
*
4
\\\\\allowed/////
CLASS
*
DEFINITION
4
\\\\\allowed/////
CLASS
*
IMPLEMENTATION
5
\\\\\forbidden/////
CLASS
*
DEFINITION
DEFERRED
5
\\\\\forbidden/////

CLASS
*
DEFINITION
LOAD
6
\\\\\forbidden/////
CLASS
*
DEFINITION
LOCAL
FRIENDS
3
\\\\\allowed/////
AT
LINE-SELECTION
3
\\\\\allowed/////
AT
USER-COMMAND
4
\\\\\allowed/////
AT
SELECTION-SCREEN
**
3
\\\\\allowed/////
AT
PF*
2
\\\\\allowed/////
INITIALIZATION
2
\\\\\allowed/////
START-OF-SELECTION
2
\\\\\allowed/////
END-OF-SELECTION
3
\\\\\allowed/////
TOP-OF-PAGE
**
2
\\\\\allowed/////
END-OF-PAGE
3
\\\\\allowed/////
GET
**
3
\\\\\forbidden/////
GET
BADI
3
\\\\\forbidden/////
GET
BIT
3
\\\\\forbidden/////
GET
CONNECTION

3
\\\\\forbidden/////
GET
CURSOR
3
\\\\\forbidden/////
GET
DATASET
3
\\\\\forbidden/////
GET
LOCALE
3
\\\\\forbidden/////
GET
PARAMETER
3
\\\\\forbidden/////
GET
PF-STATUS
3
\\\\\forbidden/////
GET
PROPERTY
3
\\\\\forbidden/////
GET
REFERENCE
3
\\\\\forbidden/////
GET
RUN
3
\\\\\forbidden/////
GET
TIME
1
2
FORM
XEK08B_FUELLEN
4
5
4
*eject

*---------------------------------------------------------------------*

* Bezugsnebenkosten fr RE fuellen
*

*---------------------------------------------------------------------*

1
FORM XEK08B_FUELLEN.

1
FORM xek08b_fuellen USING i_ekbe_key TYPE
ekbe_key_document."N980402

9
3

DATA: BNK_LIFNR LIKE EKBZ-LIFNR.

DATA: BNK_BWTAR LIKE EKBZ-BWTAR.

1
DATA: SU_BEWAE_INIT TYPE XFELD.

2
data: lv_kudif type c.

"N980402

DATA: SU_BEWAE_INIT TYPE XFELD.

264
3
XEK08BN-REBEL = BZT-BELNR.

XEK08BN-REBUZ = BZT-BUZEI.

ENDIF.

2
*------- Frachtnachbelastung --> nur Werte
----------------------------

WHEN '3'.

19

* Begin N980402

* At document cancellation the exchange ra


te difference amount from

* the cancellation document with its origi


nal sign has to be used.

* For ML currency selection is implemented


in other subroutine.

PERFORM add_to USING:

xek08bn_wa-kudif bzt_wa-kudif.

* For CC currency document selection is do


ne here.

IF not i_ekbe_key-belnr IS INITIAL


AND

bzt-belnr = i_ekbe_key-belnr AN
D

bzt-gjahr = i_ekbe_key-gjahr.

xek08bn-kudif = xek08bn-kudif
+ bzt-kudif.

zaehlsto = zaehlsto + 1.

lv_kudif = 'X'.

ENDIF.

* End N980402

*------- Frachtnachbelastung --> nur Werte


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

WHEN '3'.

365
3
XEK08BN-REBEL = BZT-BELNR.

XEK08BN-REBUZ = BZT-BUZEI.

ENDIF.

1
ENDCASE.

18
* Begin N980402

* At document cancellation the exchange ra


te difference amount from

* the cancellation document with its origi


nal sign has to be used.

* For ML currency selection is implemented


in other subroutine.

PERFORM add_to USING:

xek08bn_wa-kudif bzt_wa-kudif.

* For CC currency document selection is do


ne here.

IF not i_ekbe_key-belnr IS INITIAL


AND

bzt-belnr = i_ekbe_key-belnr AN
D

bzt-gjahr = i_ekbe_key-gjahr.

xek08bn-kudif = xek08bn-kudif
+ bzt-kudif.

zaehlsto = zaehlsto + 1.

lv_kudif = 'X'.

ENDIF.

* End N980402

ENDCASE.

LIMU
REPS
LEINRF0J
00001
LIMU
REPS
LEINRF0J
00000
36

1
\\\\\no_empty_blocks/////
1
\\\\\comments_not_ignored/////
1
\\\\\delta_normalized/////
3
\\\\\allowed/////
FORM
*
3
\\\\\allowed/////
FUNCTION
*
3
\\\\\allowed/////
MODULE
**
3
\\\\\allowed/////
REPORT
*
3
\\\\\allowed/////
PROGRAM
*
3
\\\\\allowed/////
FUNCTION-POOL
*
4
\\\\\allowed/////
CLASS
*
DEFINITION
4
\\\\\allowed/////
CLASS
*
IMPLEMENTATION
5
\\\\\forbidden/////
CLASS
*
DEFINITION
DEFERRED
5
\\\\\forbidden/////
CLASS
*
DEFINITION
LOAD
6
\\\\\forbidden/////
CLASS
*
DEFINITION
LOCAL
FRIENDS
3

\\\\\allowed/////
AT
LINE-SELECTION
3
\\\\\allowed/////
AT
USER-COMMAND
4
\\\\\allowed/////
AT
SELECTION-SCREEN
**
3
\\\\\allowed/////
AT
PF*
2
\\\\\allowed/////
INITIALIZATION
2
\\\\\allowed/////
START-OF-SELECTION
2
\\\\\allowed/////
END-OF-SELECTION
3
\\\\\allowed/////
TOP-OF-PAGE
**
2
\\\\\allowed/////
END-OF-PAGE
3
\\\\\allowed/////
GET
**
3
\\\\\forbidden/////
GET
BADI
3
\\\\\forbidden/////
GET
BIT
3
\\\\\forbidden/////
GET
CONNECTION
3
\\\\\forbidden/////
GET
CURSOR
3
\\\\\forbidden/////
GET
DATASET
3
\\\\\forbidden/////
GET
LOCALE

3
\\\\\forbidden/////
GET
PARAMETER
3
\\\\\forbidden/////
GET
PF-STATUS
3
\\\\\forbidden/////
GET
PROPERTY
3
\\\\\forbidden/////
GET
REFERENCE
3
\\\\\forbidden/////
GET
RUN
3
\\\\\forbidden/////
GET
TIME
1
2
FORM
BZT_ANALYSE_CR
10
25
3
WHEN 'F'.

PERFORM SUB_FROM USING:

W1 = W1 - W2

1
BETB_WA-FRWWR BZT_WA-DMBTR.

3
BETB_WA-FRWWR BZT_WA-DMBTR,

gr,

betb_wa-kudif_gr bzt_wa-kudif_
"N980402

ir.

betb_wa-kudif_ir bzt_wa-kudif_
"N980402

29
3
WHEN 'B'.

PERFORM SUB_FROM USING:

W1 = W1 - W2

1
BETB_WA-NAWWR BZT_WA-DMBTR.

3
BETB_WA-NAWWR BZT_WA-DMBTR,

gr,

betb_wa-kudif_gr bzt_wa-kudif_
"N980402

ir.

betb_wa-kudif_ir bzt_wa-kudif_
"N980402

33
3
WHEN 'C'.

PERFORM SUB_FROM USING:

W1 = W1 - W2

1
BETB_WA-FNWWR BZT_WA-DMBTR.

3
BETB_WA-FNWWR BZT_WA-DMBTR,

gr,

betb_wa-kudif_gr bzt_wa-kudif_
"N980402

ir.

betb_wa-kudif_ir bzt_wa-kudif_
"N980402

40
3
WHEN 'F'.

PERFORM ADD_TO USING:

W1 = W1 + W2

1
BETB_WA-FRWWR BZT_WA-DMBTR.

3
BETB_WA-FRWWR BZT_WA-DMBTR,

gr,

betb_wa-kudif_gr bzt_wa-kudif_
"N980402

ir.

betb_wa-kudif_ir bzt_wa-kudif_
"N980402

44
3
WHEN 'B'.

PERFORM ADD_TO USING:

W1 = W1 + W2

1
BETB_WA-NAWWR BZT_WA-DMBTR.

3
BETB_WA-NAWWR BZT_WA-DMBTR,

gr,

betb_wa-kudif_gr bzt_wa-kudif_
"N980402

ir.

betb_wa-kudif_ir bzt_wa-kudif_
"N980402

48
3
WHEN 'C'.

PERFORM ADD_TO USING:

W1 = W1 + W2

3
BETB_WA-FNWWR BZT_WA-DMBTR.

ENDCASE.

ENDIF.

9
BETB_WA-FNWWR BZT_WA-DMBTR,

gr,

betb_wa-kudif_gr bzt_wa-kudif_
"N980402

ir.

betb_wa-kudif_ir bzt_wa-kudif_
"N980402

ENDCASE.

ENDIF.

*
At document cancellation the exchang
e rate difference amount from

*
the cancellation document with its o
riginal sign has to be used.

PERFORM add_to USING:


"N980402

betb_wa-kudif bzt_wa-kudif.
"N980402

57
3
PERFORM SUB_FROM USING:

W1 = W1 - W2

BETB_WA-FRRWR BZT_WA-DMBTR,

1
BETB_WA-FRAWE BZT_WA-AREWR.

3
BETB_WA-FRAWE BZT_WA-AREWR,

betb_wa-kudif_gr bzt_wa-kudif_gr,
"N980402

betb_wa-kudif_ir bzt_wa-kudif_ir.
"N980402

62
3
PERFORM ADD_TO USING:

W1 = W1 + W2

BETB_WA-FRRWR BZT_WA-DMBTR,

BETB_WA-FRAWE BZT_WA-AREWR.

ENDIF.

9
BETB_WA-FRAWE BZT_WA-AREWR,

betb_wa-kudif_gr bzt_wa-kudif_gr,
"N980402

betb_wa-kudif_ir bzt_wa-kudif_ir.
"N980402

ENDIF.

*
At document cancellation the exchang
e rate difference amount from

*
the cancellation document with its o
riginal sign has to be used.

PERFORM add_to USING:


"N980402

betb_wa-kudif bzt_wa-kudif.
"N980402

73
3
PERFORM SUB_FROM USING:

W1 = W1 - W2

BETB_WA-FRRWR BZT_WA-DMBTR,

1
BETB_WA-FRAWE BZT_WA-AREWR.

3
BETB_WA-FRAWE BZT_WA-AREWR,

betb_wa-kudif_gr bzt_wa-kudif_gr,
"N980402

betb_wa-kudif_ir bzt_wa-kudif_ir.
"N980402

78
3
PERFORM ADD_TO USING:

W1 = W1 + W2

BETB_WA-FRRWR BZT_WA-DMBTR,

2
BETB_WA-FRAWE BZT_WA-AREWR.

ENDIF.

8
BETB_WA-FRAWE BZT_WA-AREWR,

betb_wa-kudif_gr bzt_wa-kudif_gr,
"N980402

betb_wa-kudif_ir bzt_wa-kudif_ir.
"N980402

ENDIF.

*
At document cancellation the exchang
e rate difference amount from

*
the cancellation document with its o
riginal sign has to be used.

PERFORM add_to USING:


"N980402

betb_wa-kudif bzt_wa-kudif.
"N980402

LIMU
REPS
LEINRF0K
00008
LIMU
REPS
LEINRF0K
00000

36
1
\\\\\no_empty_blocks/////
1
\\\\\comments_not_ignored/////
1
\\\\\delta_normalized/////
3
\\\\\allowed/////
FORM
*
3
\\\\\allowed/////
FUNCTION
*
3
\\\\\allowed/////
MODULE
**
3
\\\\\allowed/////
REPORT
*
3
\\\\\allowed/////
PROGRAM
*
3
\\\\\allowed/////
FUNCTION-POOL
*
4
\\\\\allowed/////
CLASS
*
DEFINITION
4
\\\\\allowed/////
CLASS
*
IMPLEMENTATION
5
\\\\\forbidden/////
CLASS
*
DEFINITION
DEFERRED
5
\\\\\forbidden/////
CLASS
*
DEFINITION
LOAD
6
\\\\\forbidden/////
CLASS
*
DEFINITION

LOCAL
FRIENDS
3
\\\\\allowed/////
AT
LINE-SELECTION
3
\\\\\allowed/////
AT
USER-COMMAND
4
\\\\\allowed/////
AT
SELECTION-SCREEN
**
3
\\\\\allowed/////
AT
PF*
2
\\\\\allowed/////
INITIALIZATION
2
\\\\\allowed/////
START-OF-SELECTION
2
\\\\\allowed/////
END-OF-SELECTION
3
\\\\\allowed/////
TOP-OF-PAGE
**
2
\\\\\allowed/////
END-OF-PAGE
3
\\\\\allowed/////
GET
**
3
\\\\\forbidden/////
GET
BADI
3
\\\\\forbidden/////
GET
BIT
3
\\\\\forbidden/////
GET
CONNECTION
3
\\\\\forbidden/////
GET
CURSOR
3
\\\\\forbidden/////
GET
DATASET
3

\\\\\forbidden/////
GET
LOCALE
3
\\\\\forbidden/////
GET
PARAMETER
3
\\\\\forbidden/////
GET
PF-STATUS
3
\\\\\forbidden/////
GET
PROPERTY
3
\\\\\forbidden/////
GET
REFERENCE
3
\\\\\forbidden/////
GET
RUN
3
\\\\\forbidden/////
GET
TIME
1
2
FORM
BZT_ANALYSE
6
89
3
ENDIF.

ENDIF.

ENDCASE.

1
ELSE.

2
betb-kudif_gr = betb-kudif_gr - bz
t-kudif.
"N980402

ELSE.

124
3
ENDIF.

ENDIF.

ENDCASE.

1
ENDIF.

12
betb-kudif_gr = betb-kudif_gr + bz
t-kudif.
"N980402

ENDIF.

* Begin N980402

* At document cancellation the exchange ra


te difference amount from

* the cancellation document with its origi


nal sign has to be used.

IF ( gf_xstor = '2' OR gf_xstor = 'X


' ) AND

not gf_smbln IS INITIAL


AND

gf_smbln = bzt-belnr AND gf_sjahr


= bzt-gjahr.

betb-kudif = betb-kudif + bzt-ku


dif.

zaehlsto = zaehlsto + 1.

ENDIF.

*End N980402

166
3
betb-frawe = betb-frawe - bzt-arew
r.

betb-frawb = betb-frawb - bzt-arew


b.

betb-frrwb = betb-frrwb - bzt-rewr


b.

1
IF su_fwknz NE space.

2
betb-kudif_ir = betb-kudif_ir - bz
t-kudif.
"N980402

IF su_fwknz NE space.

183
3
betb-frawe = betb-frawe + bzt-arew
r.

betb-frawb = betb-frawb + bzt-arew


b.

betb-frrwb = betb-frrwb + bzt-rewr


b.

1
IF su_fwknz NE space.

2
betb-kudif_ir = betb-kudif_ir + bz
t-kudif.
"N980402

IF su_fwknz NE space.

r.

236
3
betb-frawe = betb-frawe - bzt-arew
"3.1G

betb-frawb = betb-frawb - bzt-arew


b.

betb-frrwb = betb-frrwb - bzt-rewr


b.

1
IF su_fwknz NE space.

2
betb-kudif_ir = betb-kudif_ir - bz
t-kudif.
"N980402

IF su_fwknz NE space.

r.

251
3
betb-frawe = betb-frawe + bzt-arew
"3.1G

betb-frawb = betb-frawb + bzt-arew


b.

betb-frrwb = betb-frrwb + bzt-rewr


b.

1
IF su_fwknz NE space.

2
betb-kudif_ir = betb-kudif_ir + bz
t-kudif.
"N980402

IF su_fwknz NE space.

LIMU
REPS
LEINRF0O
00001
LIMU
REPS
LEINRF0O
00000
36
1
\\\\\no_empty_blocks/////
1
\\\\\comments_not_ignored/////
1
\\\\\delta_normalized/////
3
\\\\\allowed/////
FORM
*
3
\\\\\allowed/////
FUNCTION
*
3
\\\\\allowed/////
MODULE
**
3
\\\\\allowed/////
REPORT
*
3
\\\\\allowed/////
PROGRAM

*
3
\\\\\allowed/////
FUNCTION-POOL
*
4
\\\\\allowed/////
CLASS
*
DEFINITION
4
\\\\\allowed/////
CLASS
*
IMPLEMENTATION
5
\\\\\forbidden/////
CLASS
*
DEFINITION
DEFERRED
5
\\\\\forbidden/////
CLASS
*
DEFINITION
LOAD
6
\\\\\forbidden/////
CLASS
*
DEFINITION
LOCAL
FRIENDS
3
\\\\\allowed/////
AT
LINE-SELECTION
3
\\\\\allowed/////
AT
USER-COMMAND
4
\\\\\allowed/////
AT
SELECTION-SCREEN
**
3
\\\\\allowed/////
AT
PF*
2
\\\\\allowed/////
INITIALIZATION
2
\\\\\allowed/////
START-OF-SELECTION
2
\\\\\allowed/////
END-OF-SELECTION

3
\\\\\allowed/////
TOP-OF-PAGE
**
2
\\\\\allowed/////
END-OF-PAGE
3
\\\\\allowed/////
GET
**
3
\\\\\forbidden/////
GET
BADI
3
\\\\\forbidden/////
GET
BIT
3
\\\\\forbidden/////
GET
CONNECTION
3
\\\\\forbidden/////
GET
CURSOR
3
\\\\\forbidden/////
GET
DATASET
3
\\\\\forbidden/////
GET
LOCALE
3
\\\\\forbidden/////
GET
PARAMETER
3
\\\\\forbidden/////
GET
PF-STATUS
3
\\\\\forbidden/////
GET
PROPERTY
3
\\\\\forbidden/////
GET
REFERENCE
3
\\\\\forbidden/////
GET
RUN
3
\\\\\forbidden/////
GET
TIME
1

2
FORM
BET_ANALYSE_CR
6
34
3
perform add_to using:

W1 = W1 + W2

bets_wa-wewrt bet_wa-dmbtr,

1
betz_wa-wewrt bet_wa-dmbtr.

3
betz_wa-wewrt bet_wa-dmbtr,

bets_wa-kudif_gr bet_wa-kudif_gr,
"N980402

betz_wa-kudif_gr bet_wa-kudif_gr.
"N980402

39
3
perform sub_from using:

W1 = W1 - W2

bets_wa-wewrt bet_wa-dmbtr,

3
betz_wa-wewrt bet_wa-dmbtr.

endif.

13
betz_wa-wewrt bet_wa-dmbtr,

bets_wa-kudif_gr bet_wa-kudif_gr,
"N980402

betz_wa-kudif_gr bet_wa-kudif_gr.
"N980402

endif.

* Begin N980402

* At document cancellation the exchange ra


te difference amount from

* the cancellation document with its origi


nal sign has to be used.

PERFORM add_to USING:


"N980402

bets_wa-kudif bet_wa-kudif,
"N980402

betz_wa-kudif bet_wa-kudif.
"N980402

* End N980402

52
7
perform add_to using:

W1 = W1 + W2

bets_wa-rewrt bet_wa-dmbtr,

betz_wa-rewrt bet_wa-dmbtr,

bets_wa-arewr bet_wa-arewr,

betz_wa-arewr bet_wa-arewr,

bets_wa-reewr bet_wa-reewr,

1
betz_wa-reewr bet_wa-reewr.

3
betz_wa-reewr bet_wa-reewr,

bets_wa-kudif_ir bet_wa-kudif_ir,
"N980402

betz_wa-kudif_ir bet_wa-kudif_ir.
"N980402

61
7
perform sub_from using:

W1 = W1 - W2

bets_wa-rewrt bet_wa-dmbtr,

betz_wa-rewrt bet_wa-dmbtr,

bets_wa-arewr bet_wa-arewr,

betz_wa-arewr bet_wa-arewr,

bets_wa-reewr bet_wa-reewr,

2
betz_wa-reewr bet_wa-reewr.

endif.

11
betz_wa-reewr bet_wa-reewr,

bets_wa-kudif_ir bet_wa-kudif_ir,
"N980402

betz_wa-kudif_ir bet_wa-kudif_ir.
"N980402

endif.

* Begin N980402

* At document cancellation the exchange ra


te difference amount from

* the cancellation document with its origi


nal sign has to be used.

PERFORM add_to USING:


"N980402

bets_wa-kudif bet_wa-kudif,
"N980402

betz_wa-kudif bet_wa-kudif.
"N980402

* End N980402

78

7
perform add_to using:

W1 = W1 + W2

bets_wa-rewrt bet_wa-dmbtr,

betz_wa-rewrt bet_wa-dmbtr,

bets_wa-arewr bet_wa-arewr,

betz_wa-arewr bet_wa-arewr,

bets_wa-reewr bet_wa-reewr,

1
betz_wa-reewr bet_wa-reewr.

3
betz_wa-reewr bet_wa-reewr,

bets_wa-kudif_ir bet_wa-kudif_ir,
"N980402

betz_wa-kudif_ir bet_wa-kudif_ir.
"N980402

87
7
perform sub_from using:

W1 = W1 - W2

bets_wa-rewrt bet_wa-dmbtr,

betz_wa-rewrt bet_wa-dmbtr,

bets_wa-arewr bet_wa-arewr,

betz_wa-arewr bet_wa-arewr,

bets_wa-reewr bet_wa-reewr,

2
betz_wa-reewr bet_wa-reewr.

endif.

11
betz_wa-reewr bet_wa-reewr,

bets_wa-kudif_ir bet_wa-kudif_ir,
"N980402

betz_wa-kudif_ir bet_wa-kudif_ir.
"N980402

endif.

* Begin N980402

* At document cancellation the exchange ra


te difference amount from

* the cancellation document with its origi


nal sign has to be used.

PERFORM add_to USING:


"N980402

bets_wa-kudif bet_wa-kudif,
"N980402

betz_wa-kudif bet_wa-kudif.
"N980402

* End N980402

LIMU
REPS
LEINRF0P
00027
LIMU
REPS
LEINRF0P
00000

36
1
\\\\\no_empty_blocks/////
1
\\\\\comments_not_ignored/////
1
\\\\\delta_normalized/////
3
\\\\\allowed/////
FORM
*
3
\\\\\allowed/////
FUNCTION
*
3
\\\\\allowed/////
MODULE
**
3
\\\\\allowed/////
REPORT
*
3
\\\\\allowed/////
PROGRAM
*
3
\\\\\allowed/////
FUNCTION-POOL
*
4
\\\\\allowed/////
CLASS
*
DEFINITION
4
\\\\\allowed/////
CLASS
*
IMPLEMENTATION
5
\\\\\forbidden/////
CLASS
*
DEFINITION
DEFERRED
5
\\\\\forbidden/////
CLASS
*
DEFINITION
LOAD
6
\\\\\forbidden/////
CLASS
*
DEFINITION
LOCAL
FRIENDS

3
\\\\\allowed/////
AT
LINE-SELECTION
3
\\\\\allowed/////
AT
USER-COMMAND
4
\\\\\allowed/////
AT
SELECTION-SCREEN
**
3
\\\\\allowed/////
AT
PF*
2
\\\\\allowed/////
INITIALIZATION
2
\\\\\allowed/////
START-OF-SELECTION
2
\\\\\allowed/////
END-OF-SELECTION
3
\\\\\allowed/////
TOP-OF-PAGE
**
2
\\\\\allowed/////
END-OF-PAGE
3
\\\\\allowed/////
GET
**
3
\\\\\forbidden/////
GET
BADI
3
\\\\\forbidden/////
GET
BIT
3
\\\\\forbidden/////
GET
CONNECTION
3
\\\\\forbidden/////
GET
CURSOR
3
\\\\\forbidden/////
GET
DATASET
3
\\\\\forbidden/////
GET

LOCALE
3
\\\\\forbidden/////
GET
PARAMETER
3
\\\\\forbidden/////
GET
PF-STATUS
3
\\\\\forbidden/////
GET
PROPERTY
3
\\\\\forbidden/////
GET
REFERENCE
3
\\\\\forbidden/////
GET
RUN
3
\\\\\forbidden/////
GET
TIME
2
2
FORM
BET_ANALYSE
10
193
3
betz-wewrt = betz-wewrt + bet-dmbt
r.

bets-wewwr = bets-wewwr + bet-wrbt


r.

betz-wewwr = betz-wewwr + bet-wrbt


r.

1
ENHANCEMENT-POINT LEINRF0P_01 SPOTS ES_SAP
LEINR.

3
bets-kudif_gr = bets-kudif_gr + be
t-kudif.
"N980402

betz-kudif_gr = betz-kudif_gr + be
"N980402

t-kudif.

ENHANCEMENT-POINT LEINRF0P_01 SPOTS ES_SAP


LEINR.

249
3
betz-wewrt = betz-wewrt - bet-dmbt
r.

bets-wewwr = bets-wewwr - bet-wrbt


r.

betz-wewwr = betz-wewwr - bet-wrbt


r.

1
ENHANCEMENT-POINT LEINRF0P_02 SPOTS ES_SAP
LEINR.

3
bets-kudif_gr = bets-kudif_gr - be
t-kudif.
"N980402

betz-kudif_gr = betz-kudif_gr - be
"N980402

t-kudif.

ENHANCEMENT-POINT LEINRF0P_02 SPOTS ES_SAP


LEINR.

266
3
betz-mblnr = bet-belnr.

betz-mblpo = bet-buzei.

betz-mjahr = bet-gjahr.

1
*------- Rechnung oder Kontenpflege ---( M
engen und Werte )-------------

14

* Begin N980402

* At document cancellation the exchange ra


te difference amount from

* the cancellation document with its origi


nal sign has to be used.

IF ( gf_xstor = '2' OR gf_xstor = 'X


' ) AND

not gf_smbln IS INITIAL AND

gf_smbln = bet-belnr AND gf_sjahr


= bet-gjahr.

bets-kudif = bets-kudif + bet-kudi


f.

betz-kudif = betz-kudif + bet-kudi


f.

zaehlsto = zaehlsto + 1.

ENDIF.

* End N980402

*------- Rechnung oder Kontenpflege ---( M


engen und Werte )-------------

307
3
betz-rewrb = betz-rewrb + bet-rewr
b.

bets-reewr = bets-reewr + bet-reew


r.

betz-reewr = betz-reewr + bet-reew


r.

1
ENHANCEMENT-POINT LEINRF0P_03 SPOTS ES_SAP
LEINR.

3
bets-kudif_ir = bets-kudif_ir + be
t-kudif.
"N980402

betz-kudif_ir = betz-kudif_ir + be
"N980402

t-kudif.

ENHANCEMENT-POINT LEINRF0P_03 SPOTS ES_SAP


LEINR.

357
3
betz-reewr = betz-reewr - bet-reew
r.

bets-rewrb = bets-rewrb - bet-rewr


b.

betz-rewrb = betz-rewrb - bet-rewr


b.

1
ENHANCEMENT-POINT LEINRF0P_04 SPOTS ES_SAP
LEINR.

3
bets-kudif_ir = bets-kudif_ir - be
t-kudif.
"N980402

betz-kudif_ir = betz-kudif_ir - be
"N980402

t-kudif.

ENHANCEMENT-POINT LEINRF0P_04 SPOTS ES_SAP


LEINR.

397
8
ENDIF.

*
PERFORM bet_doc_currency_fields USI
NG bet
"215075

*
ING bets-rewwb

CHANG

*
betz-rewwb

*
bets-arewb

*
betz-arewb.

betz-xunpl = bet-xunpl.
geplante Kontierung

"un

bets-xunpl = bet-xunpl.

1
*------- Nachbelastung ----- ( nur Werte )
------------------------------

14

* Begin N980402

* At document cancellation the exchange ra


te difference amount from

* the cancellation document with its origi


nal sign has to be used.

IF not gs_ekbe_key-belnr IS INITIAL


AND

gs_ekbe_key-belnr = bet-belnr
AND

gs_ekbe_key-gjahr = bet-gjahr.

bets-kudif = bets-kudif + bet-kudi


f.

betz-kudif = betz-kudif + bet-kudi


f.

zaehlsto = zaehlsto + 1.

ENDIF.

* End N980402

*------- Nachbelastung ----- ( nur Werte )


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

435
3
betz-reewr = betz-reewr + bet-re

ewr.

bets-rewrb = bets-rewrb + bet-re


wrb.

betz-rewrb = betz-rewrb + bet-re


wrb.

1
ENHANCEMENT-POINT LEINRF0P_05 SPOTS ES_SAP
LEINR.

4
bets-kudif_ir = bets-kudif_ir +
bet-kudif.
"N980402

betz-kudif_ir = betz-kudif_ir +
"N980402

bet-kudif.

ENHANCEMENT-POINT LEINRF0P_05 SPOTS ES_SAP


LEINR.

477
3
betz-reewr = betz-reewr - bet-re

ewr.

bets-rewrb = bets-rewrb - bet-re


wrb.

betz-rewrb = betz-rewrb - bet-re


wrb.

1
ENHANCEMENT-POINT LEINRF0P_06 SPOTS ES_SAP
LEINR.

3
bets-kudif_ir = bets-kudif_ir bet-kudif.
"N980402

betz-kudif_ir = betz-kudif_ir "N980402

bet-kudif.

ENHANCEMENT-POINT LEINRF0P_06 SPOTS ES_SAP


LEINR.

516
8
ENDIF.

PERFORM bet_doc_currency_fields U

SING bet

"215075

*
NGING bets-rewwb

CHA

*
betz-rewwb

*
bets-arewb

*
betz-arewb.

betz-xunpl = bet-xunpl.
geplante Kontierung

"un

bets-xunpl = bet-xunpl.

1
ELSE.
"tk 4.5b

14

* Begin N98042

* At document cancellation the exchange ra


te difference amount from

* the cancellation document with its origi


nal sign has to be used.

IF not gs_ekbe_key-belnr IS INITIA


L AND

gs_ekbe_key-belnr = bet-belnr
AND

gs_ekbe_key-gjahr = bet-gjahr.

bets-kudif = bets-kudif + bet-ku


dif.

betz-kudif = betz-kudif + bet-ku


dif.

zaehlsto = zaehlsto + 1.

ENDIF.

* End N980402

ELSE.
"tk 4.5b

610
3
betz-mblnr = bet-belnr.

betz-mblpo = bet-buzei.

betz-mjahr = bet-gjahr.

1
*-------Lieferung -- ---------------------

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

14

* Begin N980402

* At document cancellation of a GI for STO


, the counter for the

* exchange rate difference amount from the


freight costs has to be

* set here, because the freight costs are


optional.

IF ( gf_xstor = '2' OR gf_xstor = 'X


' ) AND

gf_smbln IS NOT INITIAL


AND

gf_smbln = bet-belnr
AND

gf_sjahr = bet-gjahr.

zaehlsto = zaehlsto + 1.

ENDIF.

* End N980402

*-------Lieferung -- --------------------------------------------------

2
FORM
BET_ANALYSE_L
2
148
3
ENDIF.

betsl-xunpl = bet-xunpl.

1
*------- Nachbelastung ----- ( nur Werte )
------------------------------

12
* Begin N980402

* At document cancellation the exchange ra


te difference amount from

* the cancellation document with its origi


nal sign has to be used.

IF gs_ekbe_key-belnr IS NOT INITIAL


AND

gs_ekbe_key-belnr = bet-belnr
AND

gs_ekbe_key-gjahr = bet-gjahr.

betsl-kudif = betsl-kudif + bet-ku


dif.

zaehlsto = zaehlsto + 1.

ENDIF.

* End N980402

*------- Nachbelastung ----- ( nur Werte )


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

241
3
ENDIF.

ENDIF.

betsl-xunpl = bet-xunpl.

2
ENDIF.

*------- Anzahlung ----------------------------------------------------

14
ENDIF.

* Begin N980402

* At document cancellation the exchange ra


te difference amount from

* the cancellation document with its origi


nal sign has to be used.

IF not gs_ekbe_key-belnr IS INITIAL

AND

gs_ekbe_key-belnr = bet-belnr
AND

gs_ekbe_key-gjahr = bet-gjahr.

betsl-kudif = betsl-kudif + bet-ku


dif.

zaehlsto = zaehlsto + 1.

ENDIF.

* End N980402

*------- Anzahlung ----------------------------------------------------

LIMU
REPS
LEINRF1C
00007
LIMU
REPS
LEINRF1C
00000
36
1
\\\\\no_empty_blocks/////
1
\\\\\comments_not_ignored/////
1
\\\\\delta_normalized/////
3
\\\\\allowed/////
FORM
*
3
\\\\\allowed/////
FUNCTION
*
3
\\\\\allowed/////
MODULE
**
3
\\\\\allowed/////
REPORT
*
3
\\\\\allowed/////
PROGRAM
*
3
\\\\\allowed/////
FUNCTION-POOL
*
4
\\\\\allowed/////
CLASS
*
DEFINITION
4
\\\\\allowed/////
CLASS
*
IMPLEMENTATION
5

\\\\\forbidden/////
CLASS
*
DEFINITION
DEFERRED
5
\\\\\forbidden/////
CLASS
*
DEFINITION
LOAD
6
\\\\\forbidden/////
CLASS
*
DEFINITION
LOCAL
FRIENDS
3
\\\\\allowed/////
AT
LINE-SELECTION
3
\\\\\allowed/////
AT
USER-COMMAND
4
\\\\\allowed/////
AT
SELECTION-SCREEN
**
3
\\\\\allowed/////
AT
PF*
2
\\\\\allowed/////
INITIALIZATION
2
\\\\\allowed/////
START-OF-SELECTION
2
\\\\\allowed/////
END-OF-SELECTION
3
\\\\\allowed/////
TOP-OF-PAGE
**
2
\\\\\allowed/////
END-OF-PAGE
3
\\\\\allowed/////
GET
**
3
\\\\\forbidden/////
GET
BADI
3

\\\\\forbidden/////
GET
BIT
3
\\\\\forbidden/////
GET
CONNECTION
3
\\\\\forbidden/////
GET
CURSOR
3
\\\\\forbidden/////
GET
DATASET
3
\\\\\forbidden/////
GET
LOCALE
3
\\\\\forbidden/////
GET
PARAMETER
3
\\\\\forbidden/////
GET
PF-STATUS
3
\\\\\forbidden/////
GET
PROPERTY
3
\\\\\forbidden/////
GET
REFERENCE
3
\\\\\forbidden/////
GET
RUN
3
\\\\\forbidden/////
GET
TIME
1
2
FORM
APPEND_XEK08BN_CR
2
42
3
XEK08BN_CR-AREWR = XEK08BN-AREWW.

ENDIF.

* XEK08BN_CR-KWERT = XEK08BN-KWRFW.

1
APPEND XEK08BN_CR.

3
* Currency rate difference value only in c
ompany code currency N980402

xek08bn_cr-kudif = 0.
"N980402

APPEND XEK08BN_CR.

60
3
XEK08BN_CR-REWRT = XEK08BN-REWRT.

XEK08BN_CR-AREWR = XEK08BN-AREWR.

XEK08BN_CR-WEWRT = XEK08BN-WEWRT.

1
* XEK08BN_CR-KWERT = XEK08BN-KWRFW.

2
xek08bn_cr-kudif = xek08bn-kudif.
"N980402

* XEK08BN_CR-KWERT = XEK08BN-KWRFW.

LIMU
REPS
LEINRF1D
00007
LIMU
REPS
LEINRF1D
00000
36
1
\\\\\no_empty_blocks/////
1
\\\\\comments_not_ignored/////
1
\\\\\delta_normalized/////
3
\\\\\allowed/////
FORM
*
3
\\\\\allowed/////
FUNCTION
*
3
\\\\\allowed/////

MODULE
**
3
\\\\\allowed/////
REPORT
*
3
\\\\\allowed/////
PROGRAM
*
3
\\\\\allowed/////
FUNCTION-POOL
*
4
\\\\\allowed/////
CLASS
*
DEFINITION
4
\\\\\allowed/////
CLASS
*
IMPLEMENTATION
5
\\\\\forbidden/////
CLASS
*
DEFINITION
DEFERRED
5
\\\\\forbidden/////
CLASS
*
DEFINITION
LOAD
6
\\\\\forbidden/////
CLASS
*
DEFINITION
LOCAL
FRIENDS
3
\\\\\allowed/////
AT
LINE-SELECTION
3
\\\\\allowed/////
AT
USER-COMMAND
4
\\\\\allowed/////
AT
SELECTION-SCREEN
**
3
\\\\\allowed/////
AT
PF*

2
\\\\\allowed/////
INITIALIZATION
2
\\\\\allowed/////
START-OF-SELECTION
2
\\\\\allowed/////
END-OF-SELECTION
3
\\\\\allowed/////
TOP-OF-PAGE
**
2
\\\\\allowed/////
END-OF-PAGE
3
\\\\\allowed/////
GET
**
3
\\\\\forbidden/////
GET
BADI
3
\\\\\forbidden/////
GET
BIT
3
\\\\\forbidden/////
GET
CONNECTION
3
\\\\\forbidden/////
GET
CURSOR
3
\\\\\forbidden/////
GET
DATASET
3
\\\\\forbidden/////
GET
LOCALE
3
\\\\\forbidden/////
GET
PARAMETER
3
\\\\\forbidden/////
GET
PF-STATUS
3
\\\\\forbidden/////
GET
PROPERTY
3
\\\\\forbidden/////
GET
REFERENCE

3
\\\\\forbidden/////
GET
RUN
3
\\\\\forbidden/////
GET
TIME
1
2
FORM
APPEND_XEK08RN_CR
2
42
3
XEK08RN_CR-AREWR = XEK08RN-AREWW.

ENDIF.

* XEK08RN_CR-NETWR = XEK08RN-NETWr.

1
APPEND XEK08RN_CR.

2
xek08rn_cr-kudif = 0.
"N980402

APPEND XEK08RN_CR.

60

3
XEK08RN_CR-REEWR = XEK08RN-REEWR.

XEK08RN_CR-AREWR = XEK08RN-AREWR.

* XEK08RN_CR-NETWR = XEK08RN-NETWR.

1
APPEND XEK08RN_CR.

2
xek08rn_cr-kudif = xek08rn-kudif.
"N980402

APPEND XEK08RN_CR.

LIMU
REPS
LEINRF1E
00007
LIMU
REPS
LEINRF1E
00000

36
1
\\\\\no_empty_blocks/////
1
\\\\\comments_not_ignored/////
1
\\\\\delta_normalized/////
3
\\\\\allowed/////
FORM
*
3
\\\\\allowed/////
FUNCTION
*
3
\\\\\allowed/////
MODULE
**
3
\\\\\allowed/////
REPORT
*
3
\\\\\allowed/////
PROGRAM
*
3
\\\\\allowed/////
FUNCTION-POOL
*
4
\\\\\allowed/////
CLASS
*
DEFINITION
4
\\\\\allowed/////
CLASS
*
IMPLEMENTATION
5
\\\\\forbidden/////
CLASS
*
DEFINITION
DEFERRED
5
\\\\\forbidden/////
CLASS
*
DEFINITION
LOAD
6
\\\\\forbidden/////
CLASS
*
DEFINITION
LOCAL

FRIENDS
3
\\\\\allowed/////
AT
LINE-SELECTION
3
\\\\\allowed/////
AT
USER-COMMAND
4
\\\\\allowed/////
AT
SELECTION-SCREEN
**
3
\\\\\allowed/////
AT
PF*
2
\\\\\allowed/////
INITIALIZATION
2
\\\\\allowed/////
START-OF-SELECTION
2
\\\\\allowed/////
END-OF-SELECTION
3
\\\\\allowed/////
TOP-OF-PAGE
**
2
\\\\\allowed/////
END-OF-PAGE
3
\\\\\allowed/////
GET
**
3
\\\\\forbidden/////
GET
BADI
3
\\\\\forbidden/////
GET
BIT
3
\\\\\forbidden/////
GET
CONNECTION
3
\\\\\forbidden/////
GET
CURSOR
3
\\\\\forbidden/////
GET
DATASET
3
\\\\\forbidden/////

GET
LOCALE
3
\\\\\forbidden/////
GET
PARAMETER
3
\\\\\forbidden/////
GET
PF-STATUS
3
\\\\\forbidden/////
GET
PROPERTY
3
\\\\\forbidden/////
GET
REFERENCE
3
\\\\\forbidden/////
GET
RUN
3
\\\\\forbidden/////
GET
TIME
1
2
FORM
APPEND_XEKBNK_CR
2
160
3
ENDIF.

ENDIF.

XEKBNK_CR-KWERT = XEKBNK-KWRFW.

1
APPEND XEKBNK_CR.

5
* Exchange rate difference occurs only in
company code and ML currency

xekbnk_cr-kudif = 0.
"N980402

xekbnk_cr-kudif_gr = 0.
"N980402

xekbnk_cr-kudif_ir = 0.
"N980402

APPEND XEKBNK_CR.

176
3
XEKBNK_CR-NAWWR = XEKBNK-NAWWR.

XEKBNK_CR-FNWWR = XEKBNK-FNWWR.

XEKBNK_CR-KWERT = XEKBNK-KWERT.

1
APPEND XEKBNK_CR.

5
xekbnk_cr-kudif = xekbnk-kudif.
"N980402

xekbnk_cr-kudif_gr = xekbnk-kudif_gr.
"N980402

xekbnk_cr-kudif_ir = xekbnk-kudif_ir.
"N980402

APPEND xekbnk_cr.

LIMU
REPS
LEINRF1F
00001
LIMU
REPS
LEINRF1F
00000

36
1
\\\\\no_empty_blocks/////
1
\\\\\comments_not_ignored/////
1
\\\\\delta_normalized/////
3
\\\\\allowed/////
FORM
*
3
\\\\\allowed/////
FUNCTION
*
3
\\\\\allowed/////
MODULE
**
3
\\\\\allowed/////
REPORT
*
3
\\\\\allowed/////
PROGRAM
*
3
\\\\\allowed/////
FUNCTION-POOL
*
4
\\\\\allowed/////
CLASS
*
DEFINITION
4
\\\\\allowed/////
CLASS
*
IMPLEMENTATION
5
\\\\\forbidden/////
CLASS
*
DEFINITION
DEFERRED
5
\\\\\forbidden/////
CLASS
*
DEFINITION
LOAD
6
\\\\\forbidden/////
CLASS
*
DEFINITION
LOCAL

FRIENDS
3
\\\\\allowed/////
AT
LINE-SELECTION
3
\\\\\allowed/////
AT
USER-COMMAND
4
\\\\\allowed/////
AT
SELECTION-SCREEN
**
3
\\\\\allowed/////
AT
PF*
2
\\\\\allowed/////
INITIALIZATION
2
\\\\\allowed/////
START-OF-SELECTION
2
\\\\\allowed/////
END-OF-SELECTION
3
\\\\\allowed/////
TOP-OF-PAGE
**
2
\\\\\allowed/////
END-OF-PAGE
3
\\\\\allowed/////
GET
**
3
\\\\\forbidden/////
GET
BADI
3
\\\\\forbidden/////
GET
BIT
3
\\\\\forbidden/////
GET
CONNECTION
3
\\\\\forbidden/////
GET
CURSOR
3
\\\\\forbidden/////
GET
DATASET
3
\\\\\forbidden/////

GET
LOCALE
3
\\\\\forbidden/////
GET
PARAMETER
3
\\\\\forbidden/////
GET
PF-STATUS
3
\\\\\forbidden/////
GET
PROPERTY
3
\\\\\forbidden/////
GET
REFERENCE
3
\\\\\forbidden/////
GET
RUN
3
\\\\\forbidden/////
GET
TIME
1
2
FORM
APPEND_XEBEFU_CR
2
110
3
ENDIF.

ENDIF.

xebefu_cr-netwr = xebefu-netww.

1
APPEND xebefu_cr.

4
xebefu_cr-kudif = 0.
"N980402

xebefu_cr-kudif_gr = 0.
"N980402

xebefu_cr-kudif_ir = 0.
"N980402

APPEND xebefu_cr.

124
3
xebefu_cr-rewrt = xebefu-rewrt.

xebefu_cr-arewr = xebefu-arewr.

xebefu_cr-netwr = xebefu-netwr.

1
APPEND xebefu_cr.

5
xebefu_cr-kudif = xebefu-kudif.
"N980402

xebefu_cr-kudif_gr = xebefu-kudif_gr.
"N980402

xebefu_cr-kudif_ir = xebefu-kudif_ir.
"N980402

APPEND xebefu_cr.

LIMU
REPS
LEINRF1J
00001
LIMU
REPS
LEINRF1J
00000
36
1
\\\\\no_empty_blocks/////
1
\\\\\comments_ignored/////
1

\\\\\delta_normalized/////
3
\\\\\allowed/////
FORM
*
3
\\\\\allowed/////
FUNCTION
*
3
\\\\\allowed/////
MODULE
**
3
\\\\\allowed/////
REPORT
*
3
\\\\\allowed/////
PROGRAM
*
3
\\\\\allowed/////
FUNCTION-POOL
*
4
\\\\\allowed/////
CLASS
*
DEFINITION
4
\\\\\allowed/////
CLASS
*
IMPLEMENTATION
5
\\\\\forbidden/////
CLASS
*
DEFINITION
DEFERRED
5
\\\\\forbidden/////
CLASS
*
DEFINITION
LOAD
6
\\\\\forbidden/////
CLASS
*
DEFINITION
LOCAL
FRIENDS
3
\\\\\allowed/////
AT
LINE-SELECTION
3
\\\\\allowed/////

AT
USER-COMMAND
4
\\\\\allowed/////
AT
SELECTION-SCREEN
**
3
\\\\\allowed/////
AT
PF*
2
\\\\\allowed/////
INITIALIZATION
2
\\\\\allowed/////
START-OF-SELECTION
2
\\\\\allowed/////
END-OF-SELECTION
3
\\\\\allowed/////
TOP-OF-PAGE
**
2
\\\\\allowed/////
END-OF-PAGE
3
\\\\\allowed/////
GET
**
3
\\\\\forbidden/////
GET
BADI
3
\\\\\forbidden/////
GET
BIT
3
\\\\\forbidden/////
GET
CONNECTION
3
\\\\\forbidden/////
GET
CURSOR
3
\\\\\forbidden/////
GET
DATASET
3
\\\\\forbidden/////
GET
LOCALE
3
\\\\\forbidden/////
GET
PARAMETER
3

\\\\\forbidden/////
GET
PF-STATUS
3
\\\\\forbidden/////
GET
PROPERTY
3
\\\\\forbidden/////
GET
REFERENCE
3
\\\\\forbidden/////
GET
RUN
3
\\\\\forbidden/////
GET
TIME
1
2
FORM
WE_BNK_RETOURE
2
36
3
XEKBNK-FRAWE = -1 * ( XEKBNK-FRAWE ). "
Rechnungsbetrag in Hauswhrung

XEKBNK-NAWWR = -1 * ( XEKBNK-NAWWR ). "


WE-Wert Nachtrgliche Abrechnu

XEKBNK-FNWWR = -1 * ( XEKBNK-FNWWR ). "


WE-Wert neutrale Rckstellunge

1
* Fremdwhrung

4
xekbnk-kudif_gr = -1 * ( xekbnk-kudif_gr
). "N980402

xekbnk-kudif_ir = -1 * ( xekbnk-kudif_ir
). "N980402

* Fremdwhrung

58
5
PERFORM CR_NORM_3 USING:

XEKBNK_WA-FRWWR,

XEKBNK_WA-FRRWR,

XEKBNK_WA-FRAWE,

XEKBNK_WA-NAWWR,

1
XEKBNK_WA-FNWWR.

4
XEKBNK_WA-FNWWR,

xekbnk_wa-kudif_gr,
"N980402

xekbnk_wa-kudif_ir.
"N980402

LIMU
REPS
LEINRF1L
00008
LIMU
REPS
LEINRF1L
00000
36
1
\\\\\no_empty_blocks/////
1
\\\\\comments_ignored/////
1

\\\\\delta_normalized/////
3
\\\\\allowed/////
FORM
*
3
\\\\\allowed/////
FUNCTION
*
3
\\\\\allowed/////
MODULE
**
3
\\\\\allowed/////
REPORT
*
3
\\\\\allowed/////
PROGRAM
*
3
\\\\\allowed/////
FUNCTION-POOL
*
4
\\\\\allowed/////
CLASS
*
DEFINITION
4
\\\\\allowed/////
CLASS
*
IMPLEMENTATION
5
\\\\\forbidden/////
CLASS
*
DEFINITION
DEFERRED
5
\\\\\forbidden/////
CLASS
*
DEFINITION
LOAD
6
\\\\\forbidden/////
CLASS
*
DEFINITION
LOCAL
FRIENDS
3
\\\\\allowed/////
AT
LINE-SELECTION
3
\\\\\allowed/////

AT
USER-COMMAND
4
\\\\\allowed/////
AT
SELECTION-SCREEN
**
3
\\\\\allowed/////
AT
PF*
2
\\\\\allowed/////
INITIALIZATION
2
\\\\\allowed/////
START-OF-SELECTION
2
\\\\\allowed/////
END-OF-SELECTION
3
\\\\\allowed/////
TOP-OF-PAGE
**
2
\\\\\allowed/////
END-OF-PAGE
3
\\\\\allowed/////
GET
**
3
\\\\\forbidden/////
GET
BADI
3
\\\\\forbidden/////
GET
BIT
3
\\\\\forbidden/////
GET
CONNECTION
3
\\\\\forbidden/////
GET
CURSOR
3
\\\\\forbidden/////
GET
DATASET
3
\\\\\forbidden/////
GET
LOCALE
3
\\\\\forbidden/////
GET
PARAMETER
3

\\\\\forbidden/////
GET
PF-STATUS
3
\\\\\forbidden/////
GET
PROPERTY
3
\\\\\forbidden/////
GET
REFERENCE
3
\\\\\forbidden/////
GET
RUN
3
\\\\\forbidden/////
GET
TIME
1
2
FORM
WE_RETOURE
2
28
3
XEBEFU-AREWW = ABS( XEBEFU-AREWW ).

XEBEFU-REWRT = ABS( XEBEFU-REWRT ).

XEBEFU-REWWR = ABS( XEBEFU-REWWR ).

1
* maintains algebraic sign relation for go
ods receipt value

4
xebefu-kudif_gr = ABS( xebefu-kudif_gr )
.
"N980402

xebefu-kudif_ir = ABS( xebefu-kudif_ir )


"N980402

* maintains algebraic sign relation for go


ods receipt value

42
5
ENDIF.

* Whrungsvektoren: W = ABS( W )
K003063

PERFORM CR_NORM_4 USING:

XEBEFU_WA-AREWR,

1
XEBEFU_WA-REWRT.

4
XEBEFU_WA-REWRT,

xebefu_wa-kudif_gr,
"N980402

xebefu_wa-kudif_ir.
"N980402

LIMU
REPS
LEINRF27
00012
LIMU
REPS
LEINRF27
00000
36
1
\\\\\no_empty_blocks/////
1
\\\\\comments_not_ignored/////
1

\\\\\delta_normalized/////
3
\\\\\allowed/////
FORM
*
3
\\\\\allowed/////
FUNCTION
*
3
\\\\\allowed/////
MODULE
**
3
\\\\\allowed/////
REPORT
*
3
\\\\\allowed/////
PROGRAM
*
3
\\\\\allowed/////
FUNCTION-POOL
*
4
\\\\\allowed/////
CLASS
*
DEFINITION
4
\\\\\allowed/////
CLASS
*
IMPLEMENTATION
5
\\\\\forbidden/////
CLASS
*
DEFINITION
DEFERRED
5
\\\\\forbidden/////
CLASS
*
DEFINITION
LOAD
6
\\\\\forbidden/////
CLASS
*
DEFINITION
LOCAL
FRIENDS
3
\\\\\allowed/////
AT
LINE-SELECTION
3
\\\\\allowed/////

AT
USER-COMMAND
4
\\\\\allowed/////
AT
SELECTION-SCREEN
**
3
\\\\\allowed/////
AT
PF*
2
\\\\\allowed/////
INITIALIZATION
2
\\\\\allowed/////
START-OF-SELECTION
2
\\\\\allowed/////
END-OF-SELECTION
3
\\\\\allowed/////
TOP-OF-PAGE
**
2
\\\\\allowed/////
END-OF-PAGE
3
\\\\\allowed/////
GET
**
3
\\\\\forbidden/////
GET
BADI
3
\\\\\forbidden/////
GET
BIT
3
\\\\\forbidden/////
GET
CONNECTION
3
\\\\\forbidden/////
GET
CURSOR
3
\\\\\forbidden/////
GET
DATASET
3
\\\\\forbidden/////
GET
LOCALE
3
\\\\\forbidden/////
GET
PARAMETER
3

\\\\\forbidden/////
GET
PF-STATUS
3
\\\\\forbidden/////
GET
PROPERTY
3
\\\\\forbidden/////
GET
REFERENCE
3
\\\\\forbidden/////
GET
RUN
3
\\\\\forbidden/////
GET
TIME
1
2
FORM
WE_AUS_POT
1
249
3
SELECT SINGLE * FROM T001 WHERE BUKRS
EQ POT-BUKRS.

endif.

IF EKKO-WAERS NE T001-WAERS.

1
IF EKKO-KUFIX NE SPACE.

1
IF EKKO-KUFIX NE SPACE AND t169p-kdhw
IS INITIAL. "N980402

LIMU
REPS
LEINRF2A
00021
LIMU
REPS
LEINRF2A
00000
36
1
\\\\\no_empty_blocks/////
1
\\\\\comments_not_ignored/////
1
\\\\\delta_normalized/////
3
\\\\\allowed/////
FORM
*
3
\\\\\allowed/////
FUNCTION
*
3
\\\\\allowed/////
MODULE
**
3
\\\\\allowed/////
REPORT
*
3
\\\\\allowed/////
PROGRAM
*
3
\\\\\allowed/////
FUNCTION-POOL
*
4
\\\\\allowed/////
CLASS
*
DEFINITION
4
\\\\\allowed/////
CLASS
*
IMPLEMENTATION

5
\\\\\forbidden/////
CLASS
*
DEFINITION
DEFERRED
5
\\\\\forbidden/////
CLASS
*
DEFINITION
LOAD
6
\\\\\forbidden/////
CLASS
*
DEFINITION
LOCAL
FRIENDS
3
\\\\\allowed/////
AT
LINE-SELECTION
3
\\\\\allowed/////
AT
USER-COMMAND
4
\\\\\allowed/////
AT
SELECTION-SCREEN
**
3
\\\\\allowed/////
AT
PF*
2
\\\\\allowed/////
INITIALIZATION
2
\\\\\allowed/////
START-OF-SELECTION
2
\\\\\allowed/////
END-OF-SELECTION
3
\\\\\allowed/////
TOP-OF-PAGE
**
2
\\\\\allowed/////
END-OF-PAGE
3
\\\\\allowed/////
GET
**
3
\\\\\forbidden/////
GET
BADI

3
\\\\\forbidden/////
GET
BIT
3
\\\\\forbidden/////
GET
CONNECTION
3
\\\\\forbidden/////
GET
CURSOR
3
\\\\\forbidden/////
GET
DATASET
3
\\\\\forbidden/////
GET
LOCALE
3
\\\\\forbidden/////
GET
PARAMETER
3
\\\\\forbidden/////
GET
PF-STATUS
3
\\\\\forbidden/////
GET
PROPERTY
3
\\\\\forbidden/////
GET
REFERENCE
3
\\\\\forbidden/////
GET
RUN
3
\\\\\forbidden/////
GET
TIME
1
2
FORM
WE_AUS_BETZ
1
86
3
xebefu-lfpos = betz-lfpos.

xebefu-bwtar = betz-bwtar.

xebefu-etens = betz-etens.

1
* die gesamte WE-Menge der Position (nicht
des Ursprungsbelegs)

4
xebefu-kudif = betz-kudif.
"N980402

xebefu-kudif_gr = betz-kudif_gr.
"N980402

xebefu-kudif_ir = betz-kudif_ir.
"N980402

* die gesamte WE-Menge der Position (nicht


des Ursprungsbelegs)

LIMU
REPS
LEINRF2B
00013
LIMU
REPS
LEINRF2B

00000
36
1
\\\\\no_empty_blocks/////
1
\\\\\comments_not_ignored/////
1
\\\\\delta_normalized/////
3
\\\\\allowed/////
FORM
*
3
\\\\\allowed/////
FUNCTION
*
3
\\\\\allowed/////
MODULE
**
3
\\\\\allowed/////
REPORT
*
3
\\\\\allowed/////
PROGRAM
*
3
\\\\\allowed/////
FUNCTION-POOL
*
4
\\\\\allowed/////
CLASS
*
DEFINITION
4
\\\\\allowed/////
CLASS
*
IMPLEMENTATION
5
\\\\\forbidden/////
CLASS
*
DEFINITION
DEFERRED
5
\\\\\forbidden/////
CLASS
*
DEFINITION
LOAD
6
\\\\\forbidden/////

CLASS
*
DEFINITION
LOCAL
FRIENDS
3
\\\\\allowed/////
AT
LINE-SELECTION
3
\\\\\allowed/////
AT
USER-COMMAND
4
\\\\\allowed/////
AT
SELECTION-SCREEN
**
3
\\\\\allowed/////
AT
PF*
2
\\\\\allowed/////
INITIALIZATION
2
\\\\\allowed/////
START-OF-SELECTION
2
\\\\\allowed/////
END-OF-SELECTION
3
\\\\\allowed/////
TOP-OF-PAGE
**
2
\\\\\allowed/////
END-OF-PAGE
3
\\\\\allowed/////
GET
**
3
\\\\\forbidden/////
GET
BADI
3
\\\\\forbidden/////
GET
BIT
3
\\\\\forbidden/////
GET
CONNECTION
3
\\\\\forbidden/////
GET
CURSOR
3
\\\\\forbidden/////

GET
DATASET
3
\\\\\forbidden/////
GET
LOCALE
3
\\\\\forbidden/////
GET
PARAMETER
3
\\\\\forbidden/////
GET
PF-STATUS
3
\\\\\forbidden/////
GET
PROPERTY
3
\\\\\forbidden/////
GET
REFERENCE
3
\\\\\forbidden/////
GET
RUN
3
\\\\\forbidden/////
GET
TIME
1
2
FORM
WE_AUS_BETS
2
40
3
xebefu-rewrt = bets-rewrt.

xebefu-wamng = bets-wamng.

xebefu-glmng = bets-glmng.

1
*-----------------------------------------

----------------------"K003063

4
xebefu-kudif = bets-kudif.
"N980402

xebefu-kudif_gr = bets-kudif_gr.
"N980402

xebefu-kudif_ir = bets-kudif_ir.
"N980402

*--------------------------------------------------------------"K003063

45
3
xebefu_wa-wewrt = bets_wa-wewrt.

xebefu_wa-arewr = bets_wa-arewr.

xebefu_wa-rewrt = bets_wa-rewrt.

1
*-----------------------------------------

----------------------"K003063

4
xebefu_wa-kudif = bets_wa-kudif.
"N980402

xebefu_wa-kudif_gr = bets_wa-kudif_gr.
"N980402

xebefu_wa-kudif_ir = bets_wa-kudif_ir.
"N980402

*--------------------------------------------------------------"K003063

LIMU
REPS
LEINRF2F
00007
LIMU
REPS
LEINRF2F
00000
36
1
\\\\\no_empty_blocks/////
1
\\\\\comments_not_ignored/////
1
\\\\\delta_normalized/////
3
\\\\\allowed/////

FORM
*
3
\\\\\allowed/////
FUNCTION
*
3
\\\\\allowed/////
MODULE
**
3
\\\\\allowed/////
REPORT
*
3
\\\\\allowed/////
PROGRAM
*
3
\\\\\allowed/////
FUNCTION-POOL
*
4
\\\\\allowed/////
CLASS
*
DEFINITION
4
\\\\\allowed/////
CLASS
*
IMPLEMENTATION
5
\\\\\forbidden/////
CLASS
*
DEFINITION
DEFERRED
5
\\\\\forbidden/////
CLASS
*
DEFINITION
LOAD
6
\\\\\forbidden/////
CLASS
*
DEFINITION
LOCAL
FRIENDS
3
\\\\\allowed/////
AT
LINE-SELECTION
3
\\\\\allowed/////
AT
USER-COMMAND
4

\\\\\allowed/////
AT
SELECTION-SCREEN
**
3
\\\\\allowed/////
AT
PF*
2
\\\\\allowed/////
INITIALIZATION
2
\\\\\allowed/////
START-OF-SELECTION
2
\\\\\allowed/////
END-OF-SELECTION
3
\\\\\allowed/////
TOP-OF-PAGE
**
2
\\\\\allowed/////
END-OF-PAGE
3
\\\\\allowed/////
GET
**
3
\\\\\forbidden/////
GET
BADI
3
\\\\\forbidden/////
GET
BIT
3
\\\\\forbidden/////
GET
CONNECTION
3
\\\\\forbidden/////
GET
CURSOR
3
\\\\\forbidden/////
GET
DATASET
3
\\\\\forbidden/////
GET
LOCALE
3
\\\\\forbidden/////
GET
PARAMETER
3
\\\\\forbidden/////
GET
PF-STATUS

3
\\\\\forbidden/////
GET
PROPERTY
3
\\\\\forbidden/////
GET
REFERENCE
3
\\\\\forbidden/////
GET
RUN
3
\\\\\forbidden/////
GET
TIME
1
2
FORM
RE_AUS_BETZ2
2
12
3
xek08rn_wa-arewr = betz_wa-arewr.

xek08rn_wa-rewrt = betz_wa-rewrt.

xek08rn_wa-reewr = betz_wa-reewr.

1
*--------------------------------------------------------------"K003063

2
xek08rn_wa-kudif = betz_wa-kudif.
"N980402

*--------------------------------------------------------------"K003063

28
3
xek08rn-reewr = betz-reewr.

xek08rn-refwr = betz-refwr.

xek08rn-xunpl = betz-xunpl.

1
IF ekpo-pstyp = '9'.
"424699

2
xek08rn-kudif = betz-kudif.
"N980402

IF ekpo-pstyp = '9'.
"424699

LIMU
REPS
LEINRF2H
00007

LIMU
REPS
LEINRF2H
00000
36
1
\\\\\no_empty_blocks/////
1
\\\\\comments_not_ignored/////
1
\\\\\delta_normalized/////
3
\\\\\allowed/////
FORM
*
3
\\\\\allowed/////
FUNCTION
*
3
\\\\\allowed/////
MODULE
**
3
\\\\\allowed/////
REPORT
*
3
\\\\\allowed/////
PROGRAM
*
3
\\\\\allowed/////
FUNCTION-POOL
*
4
\\\\\allowed/////
CLASS
*
DEFINITION
4
\\\\\allowed/////
CLASS
*
IMPLEMENTATION
5
\\\\\forbidden/////
CLASS
*
DEFINITION
DEFERRED
5
\\\\\forbidden/////
CLASS
*

DEFINITION
LOAD
6
\\\\\forbidden/////
CLASS
*
DEFINITION
LOCAL
FRIENDS
3
\\\\\allowed/////
AT
LINE-SELECTION
3
\\\\\allowed/////
AT
USER-COMMAND
4
\\\\\allowed/////
AT
SELECTION-SCREEN
**
3
\\\\\allowed/////
AT
PF*
2
\\\\\allowed/////
INITIALIZATION
2
\\\\\allowed/////
START-OF-SELECTION
2
\\\\\allowed/////
END-OF-SELECTION
3
\\\\\allowed/////
TOP-OF-PAGE
**
2
\\\\\allowed/////
END-OF-PAGE
3
\\\\\allowed/////
GET
**
3
\\\\\forbidden/////
GET
BADI
3
\\\\\forbidden/////
GET
BIT
3
\\\\\forbidden/////
GET
CONNECTION
3
\\\\\forbidden/////

GET
CURSOR
3
\\\\\forbidden/////
GET
DATASET
3
\\\\\forbidden/////
GET
LOCALE
3
\\\\\forbidden/////
GET
PARAMETER
3
\\\\\forbidden/////
GET
PF-STATUS
3
\\\\\forbidden/////
GET
PROPERTY
3
\\\\\forbidden/////
GET
REFERENCE
3
\\\\\forbidden/////
GET
RUN
3
\\\\\forbidden/////
GET
TIME
2
2
FORM
RE_AUS_BETS1
2
11
3
XEK08RN_WA-AREWR = BETS_WA-AREWR.

XEK08RN_WA-REWRT = BETS_WA-REWRT.

XEK08RN_WA-REEWR = BETS_WA-REEWR.

1
*--------------------------------------------------------------"K003063

2
xek08rn_wa-kudif = bets_wa-kudif.
"N980402

*--------------------------------------------------------------"K003063

27
3
XEK08RN-REEWR = BETS-REEWR.

XEK08RN-REFWR = BETS-REFWR.

XEK08RN-XUNPL = BETS-XUNPL.

1
xek08rn-kudif = bets-kudif.
"N980402

2
FORM
RE_AUS_BETSL
1
30
3
XEK08RN-REFWR = BETSL-REFWR.

XEK08RN-XUNPL = BETSL-XUNPL.

XEK08RN-WENAM = BETSL-WENAM.

1
xek08rn-kudif = betsl-kudif.
"N980402

LIMU
REPS
LEINRF2N
00006
LIMU
REPS
LEINRF2N

00000
36
1
\\\\\no_empty_blocks/////
1
\\\\\comments_ignored/////
1
\\\\\delta_normalized/////
3
\\\\\allowed/////
FORM
*
3
\\\\\allowed/////
FUNCTION
*
3
\\\\\allowed/////
MODULE
**
3
\\\\\allowed/////
REPORT
*
3
\\\\\allowed/////
PROGRAM
*
3
\\\\\allowed/////
FUNCTION-POOL
*
4
\\\\\allowed/////
CLASS
*
DEFINITION
4
\\\\\allowed/////
CLASS
*
IMPLEMENTATION
5
\\\\\forbidden/////
CLASS
*
DEFINITION
DEFERRED
5
\\\\\forbidden/////
CLASS
*
DEFINITION
LOAD
6
\\\\\forbidden/////
CLASS
*

DEFINITION
LOCAL
FRIENDS
3
\\\\\allowed/////
AT
LINE-SELECTION
3
\\\\\allowed/////
AT
USER-COMMAND
4
\\\\\allowed/////
AT
SELECTION-SCREEN
**
3
\\\\\allowed/////
AT
PF*
2
\\\\\allowed/////
INITIALIZATION
2
\\\\\allowed/////
START-OF-SELECTION
2
\\\\\allowed/////
END-OF-SELECTION
3
\\\\\allowed/////
TOP-OF-PAGE
**
2
\\\\\allowed/////
END-OF-PAGE
3
\\\\\allowed/////
GET
**
3
\\\\\forbidden/////
GET
BADI
3
\\\\\forbidden/////
GET
BIT
3
\\\\\forbidden/////
GET
CONNECTION
3
\\\\\forbidden/////
GET
CURSOR
3
\\\\\forbidden/////
GET
DATASET

3
\\\\\forbidden/////
GET
LOCALE
3
\\\\\forbidden/////
GET
PARAMETER
3
\\\\\forbidden/////
GET
PF-STATUS
3
\\\\\forbidden/////
GET
PROPERTY
3
\\\\\forbidden/////
GET
REFERENCE
3
\\\\\forbidden/////
GET
RUN
3
\\\\\forbidden/////
GET
TIME
1
2
FORM
BETB_ERGAENZEN
6
10
3
DATA:
"K003063

ld_tabix

LIKE sy-subrc,
"K003063

lo_tabix

LIKE sy-subrc.
"K003063

1
DATA: lf_bnk_check type xfeld.
"446831

2
DATA: lf_bnk_check type xfeld,
"446831

lf_kufix

TYPE ekko-kufix.
"N980402

110
8
LOOP AT xebefu WHERE ebelp EQ ebelp

AND

vbeln_vl NE space

AND

vbelp_vl NE space.

* gehe ber alle XEBEFU-Zeilen mit Liefe


ravisbezug;

* es mssen mehrere XEBEFU-Zeilen berck


sichtigt werden, da die

* Bezugsnebenkosten nicht pro XEBEFU-Zei


le an den WE bergeben werden

REFRESH te_vtfkla.

SELECT SINGLE * FROM t001 WHERE bukrs


EQ ekko-bukrs.
"<693957

1
CALL FUNCTION 'SD_SCD_PO_ITEM_DELIVERY
_COSTS'

12

* Begin N980402

* If exchange rate handling is active the


actual exchange rate

* has to be used for GR.

IF t169p-kdhw IS INITIAL.

lf_kufix = ekko-kufix.

ELSE.

CLEAR lf_kufix.

ENDIF.

* End N980402

CALL FUNCTION 'SD_SCD_PO_ITEM_DELIVERY


_COSTS'

117
6
EXPORTING

i_vbeln = xebefu-vbeln_vl

i_vbelp = xebefu-vbelp_vl

i_budat = budat

i_waers = xebefu-waers

i_wkurs = ekko-wkurs
conversion rate
<693957

i_kufix = ekko-kufix
fixed rate flag
<693957

"PO

1
"PO

1
i_kufix = lf_kufix
"N980402

159
3
LOOP AT xbbefu.

REFRESH te_vtfkla.

SELECT SINGLE * FROM t001 WHERE bukr


s EQ ekko-bukrs.
"<693957

1
CALL FUNCTION 'SD_SCD_PO_ITEM_DELIVE
RY_COSTS'

12

* Begin N980402

* If exchange rate handling is active the


actual exchange rate

* has to be used for GR.

IF t169p-kdhw IS INITIAL.

lf_kufix = ekko-kufix.

ELSE.

CLEAR lf_kufix.

ENDIF.

*End N980402

CALL FUNCTION 'SD_SCD_PO_ITEM_DELIVE


RY_COSTS'

166
6
EXPORTING

i_vbeln = i_vbeln

i_vbelp = i_vbelp

i_budat = budat

i_waers = ekko-waers

i_wkurs = ekko-wkurs
O conversion rate
<693957

i_kufix = ekko-kufix
O fixed rate flag
<693957

"P

1
"P

1
i_kufix = lf_kufix
"N980402

253
3
IF budat IS INITIAL.

budat = sy-datlo.

ENDIF.

1
IF ekko-kufix NE space.

3
*
If exchange rate handling is active
the actual exchange rate

has to be used for GR.

IF ekko-kufix NE space AND t169p-kdh


w IS INITIAL.
"N980402

LIMU
REPS
LEINRF2O
00005
LIMU
REPS
LEINRF2O
00000
36
1
\\\\\no_empty_blocks/////
1
\\\\\comments_ignored/////

1
\\\\\delta_normalized/////
3
\\\\\allowed/////
FORM
*
3
\\\\\allowed/////
FUNCTION
*
3
\\\\\allowed/////
MODULE
**
3
\\\\\allowed/////
REPORT
*
3
\\\\\allowed/////
PROGRAM
*
3
\\\\\allowed/////
FUNCTION-POOL
*
4
\\\\\allowed/////
CLASS
*
DEFINITION
4
\\\\\allowed/////
CLASS
*
IMPLEMENTATION
5
\\\\\forbidden/////
CLASS
*
DEFINITION
DEFERRED
5
\\\\\forbidden/////
CLASS
*
DEFINITION
LOAD
6
\\\\\forbidden/////
CLASS
*
DEFINITION
LOCAL
FRIENDS
3
\\\\\allowed/////
AT
LINE-SELECTION
3

\\\\\allowed/////
AT
USER-COMMAND
4
\\\\\allowed/////
AT
SELECTION-SCREEN
**
3
\\\\\allowed/////
AT
PF*
2
\\\\\allowed/////
INITIALIZATION
2
\\\\\allowed/////
START-OF-SELECTION
2
\\\\\allowed/////
END-OF-SELECTION
3
\\\\\allowed/////
TOP-OF-PAGE
**
2
\\\\\allowed/////
END-OF-PAGE
3
\\\\\allowed/////
GET
**
3
\\\\\forbidden/////
GET
BADI
3
\\\\\forbidden/////
GET
BIT
3
\\\\\forbidden/////
GET
CONNECTION
3
\\\\\forbidden/////
GET
CURSOR
3
\\\\\forbidden/////
GET
DATASET
3
\\\\\forbidden/////
GET
LOCALE
3
\\\\\forbidden/////
GET
PARAMETER

3
\\\\\forbidden/////
GET
PF-STATUS
3
\\\\\forbidden/////
GET
PROPERTY
3
\\\\\forbidden/////
GET
REFERENCE
3
\\\\\forbidden/////
GET
RUN
3
\\\\\forbidden/////
GET
TIME
1
2
FORM
BETB_AUFBAUEN
1
67
4
ENDIF.

*- Nettobestellwert in Hauswhrung -----------------------------------*

IF ekko-waers NE t001-waers.

2
* IF EKKO-KUFIX NE SPACE OR KONV-WAERS E
Q T001-WAERS. "4.6A

IF ekko-kufix NE space OR
7864 note

"11

3
* N980402 if exchange rate handling is act
ive the actual exchange rate

* has to be used for GR.

IF ekko-kufix NE space AND t169p-kdhw


IS INITIAL OR
"N980402

LIMU
REPS
LEINRF2V
00014
LIMU
REPS
LEINRF2V
00000
36
1
\\\\\no_empty_blocks/////
1
\\\\\comments_not_ignored/////
1
\\\\\delta_normalized/////
3
\\\\\allowed/////
FORM
*
3

\\\\\allowed/////
FUNCTION
*
3
\\\\\allowed/////
MODULE
**
3
\\\\\allowed/////
REPORT
*
3
\\\\\allowed/////
PROGRAM
*
3
\\\\\allowed/////
FUNCTION-POOL
*
4
\\\\\allowed/////
CLASS
*
DEFINITION
4
\\\\\allowed/////
CLASS
*
IMPLEMENTATION
5
\\\\\forbidden/////
CLASS
*
DEFINITION
DEFERRED
5
\\\\\forbidden/////
CLASS
*
DEFINITION
LOAD
6
\\\\\forbidden/////
CLASS
*
DEFINITION
LOCAL
FRIENDS
3
\\\\\allowed/////
AT
LINE-SELECTION
3
\\\\\allowed/////
AT
USER-COMMAND
4
\\\\\allowed/////
AT
SELECTION-SCREEN

**
3
\\\\\allowed/////
AT
PF*
2
\\\\\allowed/////
INITIALIZATION
2
\\\\\allowed/////
START-OF-SELECTION
2
\\\\\allowed/////
END-OF-SELECTION
3
\\\\\allowed/////
TOP-OF-PAGE
**
2
\\\\\allowed/////
END-OF-PAGE
3
\\\\\allowed/////
GET
**
3
\\\\\forbidden/////
GET
BADI
3
\\\\\forbidden/////
GET
BIT
3
\\\\\forbidden/////
GET
CONNECTION
3
\\\\\forbidden/////
GET
CURSOR
3
\\\\\forbidden/////
GET
DATASET
3
\\\\\forbidden/////
GET
LOCALE
3
\\\\\forbidden/////
GET
PARAMETER
3
\\\\\forbidden/////
GET
PF-STATUS
3
\\\\\forbidden/////
GET

PROPERTY
3
\\\\\forbidden/////
GET
REFERENCE
3
\\\\\forbidden/////
GET
RUN
3
\\\\\forbidden/////
GET
TIME
1
2
FORM
BESTELLPOS_LESEN
1
17
4
DATA: L_EKPO LIKE EKPO OCCURS 0 WITH HEA
DER LINE.

* ALRK013768 end insert.

REFRESH: POT, KNT, BET, BETS, BETZ, BETS


L, BZT, BETB, ETT.

1
CLEAR:

CLEAR:
ehlsto.

ZAEHLALL, ZAEHLSEL, XMATRIX.

1
zaehlall, zaehlsel, xmatrix, za
"N980402

LIMU
REPS
LEINRF44
00001
LIMU
REPS
LEINRF44
00000
36
1
\\\\\no_empty_blocks/////
1
\\\\\comments_not_ignored/////
1
\\\\\delta_normalized/////
3
\\\\\allowed/////
FORM
*
3
\\\\\allowed/////
FUNCTION
*
3
\\\\\allowed/////
MODULE
**
3
\\\\\allowed/////
REPORT
*
3
\\\\\allowed/////
PROGRAM
*
3
\\\\\allowed/////
FUNCTION-POOL
*
4
\\\\\allowed/////
CLASS
*
DEFINITION
4
\\\\\allowed/////
CLASS
*

IMPLEMENTATION
5
\\\\\forbidden/////
CLASS
*
DEFINITION
DEFERRED
5
\\\\\forbidden/////
CLASS
*
DEFINITION
LOAD
6
\\\\\forbidden/////
CLASS
*
DEFINITION
LOCAL
FRIENDS
3
\\\\\allowed/////
AT
LINE-SELECTION
3
\\\\\allowed/////
AT
USER-COMMAND
4
\\\\\allowed/////
AT
SELECTION-SCREEN
**
3
\\\\\allowed/////
AT
PF*
2
\\\\\allowed/////
INITIALIZATION
2
\\\\\allowed/////
START-OF-SELECTION
2
\\\\\allowed/////
END-OF-SELECTION
3
\\\\\allowed/////
TOP-OF-PAGE
**
2
\\\\\allowed/////
END-OF-PAGE
3
\\\\\allowed/////
GET
**
3
\\\\\forbidden/////
GET

BADI
3
\\\\\forbidden/////
GET
BIT
3
\\\\\forbidden/////
GET
CONNECTION
3
\\\\\forbidden/////
GET
CURSOR
3
\\\\\forbidden/////
GET
DATASET
3
\\\\\forbidden/////
GET
LOCALE
3
\\\\\forbidden/////
GET
PARAMETER
3
\\\\\forbidden/////
GET
PF-STATUS
3
\\\\\forbidden/////
GET
PROPERTY
3
\\\\\forbidden/////
GET
REFERENCE
3
\\\\\forbidden/////
GET
RUN
3
\\\\\forbidden/////
GET
TIME
1
2
FORM
XEKBNK_CR_ERGAENZEN
2
48
3
LD_XEKBNK_CR-FRAWE = 0.

LD_XEKBNK_CR-NAWWR = 0.

LD_XEKBNK_CR-FNWWR = 0.

1
APPEND LD_XEKBNK_CR TO R_XEKBNK_CR_TBL
.

4
ld_xekbnk_cr-kudif = 0.
"N980402

ld_xekbnk_cr-kudif_gr = 0.
"N980402

ld_xekbnk_cr-kudif_ir = 0.
"N980402

APPEND LD_XEKBNK_CR TO R_XEKBNK_CR_TBL


.

72
3
LD_XEKBNK_CR-FRAWE = XEKBNK-FRAWE.

LD_XEKBNK_CR-NAWWR = XEKBNK-NAWWR.

LD_XEKBNK_CR-FNWWR = XEKBNK-FNWWR.

1
APPEND LD_XEKBNK_CR TO R_XEKBNK_CR_TBL
.

4
ld_xekbnk_cr-kudif = xekbnk-kudif.
"N980402

r.

ld_xekbnk_cr-kudif_gr = xekbnk-kudif_g
"N980402

r.

ld_xekbnk_cr-kudif_ir = xekbnk-kudif_i
"N980402

APPEND LD_XEKBNK_CR TO R_XEKBNK_CR_TBL


.

LIMU
REPS
LEINRF45
00001
LIMU
REPS

LEINRF45
00000
36
1
\\\\\no_empty_blocks/////
1
\\\\\comments_ignored/////
1
\\\\\delta_normalized/////
3
\\\\\allowed/////
FORM
*
3
\\\\\allowed/////
FUNCTION
*
3
\\\\\allowed/////
MODULE
**
3
\\\\\allowed/////
REPORT
*
3
\\\\\allowed/////
PROGRAM
*
3
\\\\\allowed/////
FUNCTION-POOL
*
4
\\\\\allowed/////
CLASS
*
DEFINITION
4
\\\\\allowed/////
CLASS
*
IMPLEMENTATION
5
\\\\\forbidden/////
CLASS
*
DEFINITION
DEFERRED
5
\\\\\forbidden/////
CLASS
*
DEFINITION
LOAD
6

\\\\\forbidden/////
CLASS
*
DEFINITION
LOCAL
FRIENDS
3
\\\\\allowed/////
AT
LINE-SELECTION
3
\\\\\allowed/////
AT
USER-COMMAND
4
\\\\\allowed/////
AT
SELECTION-SCREEN
**
3
\\\\\allowed/////
AT
PF*
2
\\\\\allowed/////
INITIALIZATION
2
\\\\\allowed/////
START-OF-SELECTION
2
\\\\\allowed/////
END-OF-SELECTION
3
\\\\\allowed/////
TOP-OF-PAGE
**
2
\\\\\allowed/////
END-OF-PAGE
3
\\\\\allowed/////
GET
**
3
\\\\\forbidden/////
GET
BADI
3
\\\\\forbidden/////
GET
BIT
3
\\\\\forbidden/////
GET
CONNECTION
3
\\\\\forbidden/////
GET
CURSOR
3

\\\\\forbidden/////
GET
DATASET
3
\\\\\forbidden/////
GET
LOCALE
3
\\\\\forbidden/////
GET
PARAMETER
3
\\\\\forbidden/////
GET
PF-STATUS
3
\\\\\forbidden/////
GET
PROPERTY
3
\\\\\forbidden/////
GET
REFERENCE
3
\\\\\forbidden/////
GET
RUN
3
\\\\\forbidden/////
GET
TIME
1
2
FORM
XEKBNK_CR_AUFBAUEN
2
62
4
LD_EKBNK_CR_TBL-WAERS = LD_F_CURR-WA
ERS.

Werte abloopen und bertragen

COMPNR = 2.

"K029929

1
DO 5 TIMES

1
DO 9 TIMES
"N980402

67
4
*

VARYING LD_MASK_TBL
"K029929

*
FROM XEKBNK_WA-FRWWR NEXT XEKBNK_W
A-FRRWR
"K029929

VARYING LD_MASK_CURR

FROM LD_EKBNK_CR_TBL-FRWWR NEXT LD


_EKBNK_CR_TBL-FRRWR.

Anstelle von Do-Varying


"K029929

ASSIGN COMPONENT COMPNR OF STRUCTU


RE XEKBNK_WA TO <TAB>.

Disregard field kwert which is not


in table xekbnk_wa

IF sy-index = 6.
"N980402

CONTINUE.
"N980402

ENDIF.
"N980402

Anstelle von Do-Varying


"K029929

ASSIGN COMPONENT COMPNR OF STRUCTU


RE XEKBNK_WA TO <TAB>.

LIMU
REPS
LEINRF48
00001
LIMU
REPS
LEINRF48
00000
36
1
\\\\\no_empty_blocks/////
1
\\\\\comments_not_ignored/////
1
\\\\\delta_normalized/////
3
\\\\\allowed/////
FORM
*
3
\\\\\allowed/////
FUNCTION
*
3
\\\\\allowed/////
MODULE
**
3
\\\\\allowed/////
REPORT
*
3
\\\\\allowed/////
PROGRAM
*
3
\\\\\allowed/////
FUNCTION-POOL
*
4
\\\\\allowed/////

CLASS
*
DEFINITION
4
\\\\\allowed/////
CLASS
*
IMPLEMENTATION
5
\\\\\forbidden/////
CLASS
*
DEFINITION
DEFERRED
5
\\\\\forbidden/////
CLASS
*
DEFINITION
LOAD
6
\\\\\forbidden/////
CLASS
*
DEFINITION
LOCAL
FRIENDS
3
\\\\\allowed/////
AT
LINE-SELECTION
3
\\\\\allowed/////
AT
USER-COMMAND
4
\\\\\allowed/////
AT
SELECTION-SCREEN
**
3
\\\\\allowed/////
AT
PF*
2
\\\\\allowed/////
INITIALIZATION
2
\\\\\allowed/////
START-OF-SELECTION
2
\\\\\allowed/////
END-OF-SELECTION
3
\\\\\allowed/////
TOP-OF-PAGE
**
2
\\\\\allowed/////
END-OF-PAGE

3
\\\\\allowed/////
GET
**
3
\\\\\forbidden/////
GET
BADI
3
\\\\\forbidden/////
GET
BIT
3
\\\\\forbidden/////
GET
CONNECTION
3
\\\\\forbidden/////
GET
CURSOR
3
\\\\\forbidden/////
GET
DATASET
3
\\\\\forbidden/////
GET
LOCALE
3
\\\\\forbidden/////
GET
PARAMETER
3
\\\\\forbidden/////
GET
PF-STATUS
3
\\\\\forbidden/////
GET
PROPERTY
3
\\\\\forbidden/////
GET
REFERENCE
3
\\\\\forbidden/////
GET
RUN
3
\\\\\forbidden/////
GET
TIME
1
2
FORM
XEBEFU_CR_ERGAENZEN
2
46
3
LD_XEBEFU_CR-AREWR = 0.

LD_XEBEFU_CR-REWRT = 0.

LD_XEBEFU_CR-WEWRT = XEBEFU-WEWWR.

1
APPEND LD_XEBEFU_CR TO R_XEBEFU_CR_TBL
.

4
ld_xebefu_cr-kudif = 0.
"N980402

ld_xebefu_cr-kudif_gr = 0.
"N980402

ld_xebefu_cr-kudif_ir = 0.
"N980402

APPEND LD_XEBEFU_CR TO R_XEBEFU_CR_TBL


.

68
3
LD_XEBEFU_CR-AREWR = XEBEFU-AREWR.

LD_XEBEFU_CR-REWRT = XEBEFU-REWRT.

LD_XEBEFU_CR-WEWRT = XEBEFU-WEWRT.

1
APPEND LD_XEBEFU_CR TO R_XEBEFU_CR_TBL
.

4
ld_xebefu_cr-kudif = xebefu-kudif.
"N980402

r.

ld_xebefu_cr-kudif_gr = xebefu-kudif_g
"N980402

r.

ld_xebefu_cr-kudif_ir = xebefu-kudif_i
"N980402

APPEND LD_XEBEFU_CR TO R_XEBEFU_CR_TBL


.

LIMU
REPS
LEINRF49

00005
LIMU
REPS
LEINRF49
00000
36
1
\\\\\no_empty_blocks/////
1
\\\\\comments_ignored/////
1
\\\\\delta_normalized/////
3
\\\\\allowed/////
FORM
*
3
\\\\\allowed/////
FUNCTION
*
3
\\\\\allowed/////
MODULE
**
3
\\\\\allowed/////
REPORT
*
3
\\\\\allowed/////
PROGRAM
*
3
\\\\\allowed/////
FUNCTION-POOL
*
4
\\\\\allowed/////
CLASS
*
DEFINITION
4
\\\\\allowed/////
CLASS
*
IMPLEMENTATION
5
\\\\\forbidden/////
CLASS
*
DEFINITION
DEFERRED

5
\\\\\forbidden/////
CLASS
*
DEFINITION
LOAD
6
\\\\\forbidden/////
CLASS
*
DEFINITION
LOCAL
FRIENDS
3
\\\\\allowed/////
AT
LINE-SELECTION
3
\\\\\allowed/////
AT
USER-COMMAND
4
\\\\\allowed/////
AT
SELECTION-SCREEN
**
3
\\\\\allowed/////
AT
PF*
2
\\\\\allowed/////
INITIALIZATION
2
\\\\\allowed/////
START-OF-SELECTION
2
\\\\\allowed/////
END-OF-SELECTION
3
\\\\\allowed/////
TOP-OF-PAGE
**
2
\\\\\allowed/////
END-OF-PAGE
3
\\\\\allowed/////
GET
**
3
\\\\\forbidden/////
GET
BADI
3
\\\\\forbidden/////
GET
BIT
3
\\\\\forbidden/////

GET
CONNECTION
3
\\\\\forbidden/////
GET
CURSOR
3
\\\\\forbidden/////
GET
DATASET
3
\\\\\forbidden/////
GET
LOCALE
3
\\\\\forbidden/////
GET
PARAMETER
3
\\\\\forbidden/////
GET
PF-STATUS
3
\\\\\forbidden/////
GET
PROPERTY
3
\\\\\forbidden/////
GET
REFERENCE
3
\\\\\forbidden/////
GET
RUN
3
\\\\\forbidden/////
GET
TIME
1
2
FORM
XEBEFU_CR_AUFBAUEN
2
37
6
READ TABLE xebefu_wa

WITH KEY key = ld_key_ebefu BINAR


Y SEARCH.

* Suchen Whrungsvektor ungleich Null (R


eprsentant)

CLEAR ld_f_curr_tbl.

compnr = 2.
"K029929

1
DO 3 TIMES.
"K029929

1
DO 6 TIMES.
"N980402

78
3
ld_mask_curr = ld_curr-wert.

ENHANCEMENT-POINT XEBEFU_CR_AUFBAUEN_01 SP
OTS ES_SAPLEINR.

ENDDO.

1
APPEND ld_ebefu_cr_tbl.

19

* Begin N980402

* Transfer exchange rate difference values

compnr = 5.

DO 3 TIMES

VARYING ld_mask_curr

FROM ld_ebefu_cr_tbl-kudif NEXT ld


_ebefu_cr_tbl-kudif_gr.

ASSIGN COMPONENT compnr OF STRUCTU


RE xebefu_wa TO <tab>.

ADD 1 TO compnr.

ld_mask_tbl = <tab>.

READ TABLE ld_mask_tbl INTO ld_cur


r INDEX ld_tabix.

CHECK sy-subrc EQ 0.

ld_mask_curr = ld_curr-wert.

ENDDO.

* End N980402

APPEND ld_ebefu_cr_tbl.

LIMU
REPS
LEINRF4C
00001
LIMU
REPS
LEINRF4C
00000
36
1
\\\\\no_empty_blocks/////
1
\\\\\comments_not_ignored/////
1
\\\\\delta_normalized/////
3
\\\\\allowed/////
FORM
*
3
\\\\\allowed/////
FUNCTION
*
3

\\\\\allowed/////
MODULE
**
3
\\\\\allowed/////
REPORT
*
3
\\\\\allowed/////
PROGRAM
*
3
\\\\\allowed/////
FUNCTION-POOL
*
4
\\\\\allowed/////
CLASS
*
DEFINITION
4
\\\\\allowed/////
CLASS
*
IMPLEMENTATION
5
\\\\\forbidden/////
CLASS
*
DEFINITION
DEFERRED
5
\\\\\forbidden/////
CLASS
*
DEFINITION
LOAD
6
\\\\\forbidden/////
CLASS
*
DEFINITION
LOCAL
FRIENDS
3
\\\\\allowed/////
AT
LINE-SELECTION
3
\\\\\allowed/////
AT
USER-COMMAND
4
\\\\\allowed/////
AT
SELECTION-SCREEN
**
3
\\\\\allowed/////
AT

PF*
2
\\\\\allowed/////
INITIALIZATION
2
\\\\\allowed/////
START-OF-SELECTION
2
\\\\\allowed/////
END-OF-SELECTION
3
\\\\\allowed/////
TOP-OF-PAGE
**
2
\\\\\allowed/////
END-OF-PAGE
3
\\\\\allowed/////
GET
**
3
\\\\\forbidden/////
GET
BADI
3
\\\\\forbidden/////
GET
BIT
3
\\\\\forbidden/////
GET
CONNECTION
3
\\\\\forbidden/////
GET
CURSOR
3
\\\\\forbidden/////
GET
DATASET
3
\\\\\forbidden/////
GET
LOCALE
3
\\\\\forbidden/////
GET
PARAMETER
3
\\\\\forbidden/////
GET
PF-STATUS
3
\\\\\forbidden/////
GET
PROPERTY
3
\\\\\forbidden/////
GET

REFERENCE
3
\\\\\forbidden/////
GET
RUN
3
\\\\\forbidden/////
GET
TIME
1
2
FORM
XEK08RN_CR_ERGAENZEN
2
47
3
LD_XEK08RN_CR-REEWR = XEK08RN-REFWR.

LD_XEK08RN_CR-REWRT = XEK08RN-REWWR.

LD_XEK08RN_CR-WEWRT = XEK08RN-WEWWR.

1
APPEND LD_XEK08RN_CR TO R_XEK08RN_CR_T
BL.

2
ld_xek08rn_cr-kudif = 0.
"N980402

APPEND LD_XEK08RN_CR TO R_XEK08RN_CR_T


BL.

70
3
LD_XEK08RN_CR-REEWR = XEK08RN-REEWR.

LD_XEK08RN_CR-REWRT = XEK08RN-REWRT.

LD_XEK08RN_CR-WEWRT = XEK08RN-WEWRT.

1
APPEND LD_XEK08RN_CR TO R_XEK08RN_CR_T
BL.

2
ld_xek08rn_cr-kudif = xek08rn-kudif.
"N980402

APPEND LD_XEK08RN_CR TO R_XEK08RN_CR_T


BL.

LIMU
REPS
LEINRF4D
00001
LIMU
REPS
LEINRF4D
00000

36
1
\\\\\no_empty_blocks/////
1
\\\\\comments_ignored/////
1
\\\\\delta_normalized/////
3
\\\\\allowed/////
FORM
*
3
\\\\\allowed/////
FUNCTION
*
3
\\\\\allowed/////
MODULE
**
3
\\\\\allowed/////
REPORT
*
3
\\\\\allowed/////
PROGRAM
*
3
\\\\\allowed/////
FUNCTION-POOL
*
4
\\\\\allowed/////
CLASS
*
DEFINITION
4
\\\\\allowed/////
CLASS
*
IMPLEMENTATION
5
\\\\\forbidden/////
CLASS
*
DEFINITION
DEFERRED
5
\\\\\forbidden/////
CLASS
*
DEFINITION
LOAD
6
\\\\\forbidden/////
CLASS
*
DEFINITION

LOCAL
FRIENDS
3
\\\\\allowed/////
AT
LINE-SELECTION
3
\\\\\allowed/////
AT
USER-COMMAND
4
\\\\\allowed/////
AT
SELECTION-SCREEN
**
3
\\\\\allowed/////
AT
PF*
2
\\\\\allowed/////
INITIALIZATION
2
\\\\\allowed/////
START-OF-SELECTION
2
\\\\\allowed/////
END-OF-SELECTION
3
\\\\\allowed/////
TOP-OF-PAGE
**
2
\\\\\allowed/////
END-OF-PAGE
3
\\\\\allowed/////
GET
**
3
\\\\\forbidden/////
GET
BADI
3
\\\\\forbidden/////
GET
BIT
3
\\\\\forbidden/////
GET
CONNECTION
3
\\\\\forbidden/////
GET
CURSOR
3
\\\\\forbidden/////
GET
DATASET
3

\\\\\forbidden/////
GET
LOCALE
3
\\\\\forbidden/////
GET
PARAMETER
3
\\\\\forbidden/////
GET
PF-STATUS
3
\\\\\forbidden/////
GET
PROPERTY
3
\\\\\forbidden/////
GET
REFERENCE
3
\\\\\forbidden/////
GET
RUN
3
\\\\\forbidden/////
GET
TIME
1
2
FORM
XEK08RN_CR_AUFBAUEN
2
38
5
READ TABLE XEK08RN_WA

WITH KEY KEY = LD_KEY_EK08RN BINA


RY SEARCH.

* If no entries found, LD_F_CURR_TBL wil


l not be filled with ML-Data

CLEAR LD_F_CURR_TBL.

COMPNR = 2.
"K029929

1
DO 4 TIMES.
"K029929

1
DO 5 TIMES.
"N980402

63
4
LD_EK08RN_CR_TBL-WAERS = LD_F_CURR-W
AERS.

Werte abloopen und bertragen

COMPNR = 2.
"K029929

1
DO 4 TIMES

1
DO 5 TIMES
"N980402

LIMU
REPS
LEINRF4G
00001
LIMU
REPS
LEINRF4G
00000
36
1
\\\\\no_empty_blocks/////
1
\\\\\comments_not_ignored/////
1
\\\\\delta_normalized/////
3
\\\\\allowed/////
FORM
*
3
\\\\\allowed/////
FUNCTION
*
3
\\\\\allowed/////
MODULE
**
3
\\\\\allowed/////
REPORT
*
3
\\\\\allowed/////
PROGRAM
*
3
\\\\\allowed/////
FUNCTION-POOL
*
4
\\\\\allowed/////

CLASS
*
DEFINITION
4
\\\\\allowed/////
CLASS
*
IMPLEMENTATION
5
\\\\\forbidden/////
CLASS
*
DEFINITION
DEFERRED
5
\\\\\forbidden/////
CLASS
*
DEFINITION
LOAD
6
\\\\\forbidden/////
CLASS
*
DEFINITION
LOCAL
FRIENDS
3
\\\\\allowed/////
AT
LINE-SELECTION
3
\\\\\allowed/////
AT
USER-COMMAND
4
\\\\\allowed/////
AT
SELECTION-SCREEN
**
3
\\\\\allowed/////
AT
PF*
2
\\\\\allowed/////
INITIALIZATION
2
\\\\\allowed/////
START-OF-SELECTION
2
\\\\\allowed/////
END-OF-SELECTION
3
\\\\\allowed/////
TOP-OF-PAGE
**
2
\\\\\allowed/////
END-OF-PAGE

3
\\\\\allowed/////
GET
**
3
\\\\\forbidden/////
GET
BADI
3
\\\\\forbidden/////
GET
BIT
3
\\\\\forbidden/////
GET
CONNECTION
3
\\\\\forbidden/////
GET
CURSOR
3
\\\\\forbidden/////
GET
DATASET
3
\\\\\forbidden/////
GET
LOCALE
3
\\\\\forbidden/////
GET
PARAMETER
3
\\\\\forbidden/////
GET
PF-STATUS
3
\\\\\forbidden/////
GET
PROPERTY
3
\\\\\forbidden/////
GET
REFERENCE
3
\\\\\forbidden/////
GET
RUN
3
\\\\\forbidden/////
GET
TIME
1
2
FORM
XEK08BN_CR_ERGAENZEN
2
48
3
LD_XEK08BN_CR-REWRT = XEK08BN-REWWR.

LD_XEK08BN_CR-WEWRT = XEK08BN-WEWWR.

LD_XEK08BN_CR-KSCHL = XEK08BN-KSCHL.

1
APPEND LD_XEK08BN_CR TO R_XEK08BN_CR_T
BL.

2
ld_xek08bn_cr-kudif = 0.
"N980402

APPEND LD_XEK08BN_CR TO R_XEK08BN_CR_T


BL.

72
3
LD_XEK08BN_CR-REWRT = XEK08BN-REWRT.

LD_XEK08BN_CR-WEWRT = XEK08BN-WEWRT.

LD_XEK08BN_CR-KSCHL = XEK08BN-KSCHL.

1
APPEND LD_XEK08BN_CR TO R_XEK08BN_CR_T
BL.

2
ld_xek08bn_cr-kudif = xek08bn-kudif.
"N980402

APPEND LD_XEK08BN_CR TO R_XEK08BN_CR_T


BL.

LIMU
REPS
LEINRF4H
00001
LIMU
REPS
LEINRF4H
00000
36
1
\\\\\no_empty_blocks/////
1
\\\\\comments_not_ignored/////
1
\\\\\delta_normalized/////
3
\\\\\allowed/////
FORM
*
3
\\\\\allowed/////
FUNCTION
*

3
\\\\\allowed/////
MODULE
**
3
\\\\\allowed/////
REPORT
*
3
\\\\\allowed/////
PROGRAM
*
3
\\\\\allowed/////
FUNCTION-POOL
*
4
\\\\\allowed/////
CLASS
*
DEFINITION
4
\\\\\allowed/////
CLASS
*
IMPLEMENTATION
5
\\\\\forbidden/////
CLASS
*
DEFINITION
DEFERRED
5
\\\\\forbidden/////
CLASS
*
DEFINITION
LOAD
6
\\\\\forbidden/////
CLASS
*
DEFINITION
LOCAL
FRIENDS
3
\\\\\allowed/////
AT
LINE-SELECTION
3
\\\\\allowed/////
AT
USER-COMMAND
4
\\\\\allowed/////
AT
SELECTION-SCREEN
**
3
\\\\\allowed/////

AT
PF*
2
\\\\\allowed/////
INITIALIZATION
2
\\\\\allowed/////
START-OF-SELECTION
2
\\\\\allowed/////
END-OF-SELECTION
3
\\\\\allowed/////
TOP-OF-PAGE
**
2
\\\\\allowed/////
END-OF-PAGE
3
\\\\\allowed/////
GET
**
3
\\\\\forbidden/////
GET
BADI
3
\\\\\forbidden/////
GET
BIT
3
\\\\\forbidden/////
GET
CONNECTION
3
\\\\\forbidden/////
GET
CURSOR
3
\\\\\forbidden/////
GET
DATASET
3
\\\\\forbidden/////
GET
LOCALE
3
\\\\\forbidden/////
GET
PARAMETER
3
\\\\\forbidden/////
GET
PF-STATUS
3
\\\\\forbidden/////
GET
PROPERTY
3
\\\\\forbidden/////

GET
REFERENCE
3
\\\\\forbidden/////
GET
RUN
3
\\\\\forbidden/////
GET
TIME
1
2
FORM
XEK08BN_CR_AUFBAUEN
2
38
5
READ TABLE XEK08BN_WA

WITH KEY KEY = LD_KEY_EK08BN BINA


RY SEARCH.

* If no entries found, LD_F_CURR_TBL wil


l not be filled with ML-Data

CLEAR LD_F_CURR_TBL.

COMPNR = 2.
"K029929

1
DO 4 TIMES.
"K029929

1
DO 5 TIMES.
"N980402

78
3
CHECK SY-SUBRC EQ 0.

LD_MASK_CURR = LD_CURR-WERT.

ENDDO.

Zusatzinfo-Felder (Nicht-Key-Felder)

13

* Begin N980402

* Transfer exchange rate difference outsid


e of DO loop

* because there is a character field in be


tween.

ASSIGN COMPONENT 6 OF STRUCTURE xek0


8bn_wa TO <tab>.

ld_mask_tbl = <tab>.

READ TABLE ld_mask_tbl INTO ld_curr


INDEX ld_tabix.

IF sy-subrc EQ 0.

ld_ek08bn_cr_tbl-kudif = ld_curr-w
ert.

ENDIF.

* End N980402

Zusatzinfo-Felder (Nicht-Key-Felder)

LIMU
REPS
LEINRF50
00001
LIMU
REPS
LEINRF50
00000
36
1
\\\\\no_empty_blocks/////
1
\\\\\comments_ignored/////
1
\\\\\delta_normalized/////
3
\\\\\allowed/////
FORM
*
3
\\\\\allowed/////
FUNCTION
*
3
\\\\\allowed/////
MODULE
**
3
\\\\\allowed/////
REPORT
*
3
\\\\\allowed/////
PROGRAM

*
3
\\\\\allowed/////
FUNCTION-POOL
*
4
\\\\\allowed/////
CLASS
*
DEFINITION
4
\\\\\allowed/////
CLASS
*
IMPLEMENTATION
5
\\\\\forbidden/////
CLASS
*
DEFINITION
DEFERRED
5
\\\\\forbidden/////
CLASS
*
DEFINITION
LOAD
6
\\\\\forbidden/////
CLASS
*
DEFINITION
LOCAL
FRIENDS
3
\\\\\allowed/////
AT
LINE-SELECTION
3
\\\\\allowed/////
AT
USER-COMMAND
4
\\\\\allowed/////
AT
SELECTION-SCREEN
**
3
\\\\\allowed/////
AT
PF*
2
\\\\\allowed/////
INITIALIZATION
2
\\\\\allowed/////
START-OF-SELECTION
2
\\\\\allowed/////
END-OF-SELECTION

3
\\\\\allowed/////
TOP-OF-PAGE
**
2
\\\\\allowed/////
END-OF-PAGE
3
\\\\\allowed/////
GET
**
3
\\\\\forbidden/////
GET
BADI
3
\\\\\forbidden/////
GET
BIT
3
\\\\\forbidden/////
GET
CONNECTION
3
\\\\\forbidden/////
GET
CURSOR
3
\\\\\forbidden/////
GET
DATASET
3
\\\\\forbidden/////
GET
LOCALE
3
\\\\\forbidden/////
GET
PARAMETER
3
\\\\\forbidden/////
GET
PF-STATUS
3
\\\\\forbidden/////
GET
PROPERTY
3
\\\\\forbidden/////
GET
REFERENCE
3
\\\\\forbidden/////
GET
RUN
3
\\\\\forbidden/////
GET
TIME
1

2
FORM
BZT_WA_EINTRAG_BEREITEN
5
15
4
DATA:

LD_EKBZ_CR
CR_TBL,

TYPE LINE OF TY_EKBZ_

LD_DMBTR

TYPE MLCR_CURR,

LD_AREWR

TYPE MLCR_CURR,

LD_REEWR

TYPE MLCR_CURR.

LD_REEWR

TYPE MLCR_CURR,

ld_kudif

TYPE mlcr_curr,
"N980402

ld_kudif_gr

TYPE mlcr_curr,
"N980402

ld_kudif_ir

TYPE mlcr_curr.
"N980402

LD_DMBTR-CURTP

24
3
= LD_EKBZ_CR-CURTP.

LD_REEWR-CURTP

= LD_EKBZ_CR-CURTP.

LD_AREWR-CURTP

= LD_EKBZ_CR-CURTP.

4
= ld_ekbz_cr-curtp.
"N980402

ld_kudif-curtp

ld_kudif_gr-curtp = ld_ekbz_cr-curtp.
"N980402

ld_kudif_ir-curtp = ld_ekbz_cr-curtp.
"N980402

LD_DMBTR-WAERS

29
3
= LD_EKBZ_CR-WAERS.

LD_REEWR-WAERS

= LD_EKBZ_CR-WAERS.

LD_AREWR-WAERS

= LD_EKBZ_CR-WAERS.

4
= ld_ekbz_cr-waers.
"N980402

ld_kudif-waers

ld_kudif_gr-waers = ld_ekbz_cr-waers.
"N980402

ld_kudif_ir-waers = ld_ekbz_cr-waers.
"N980402

LD_REEWR-WERT

35
3
= LD_EKBZ_CR-REEWR.

LD_AREWR-WERT

= LD_EKBZ_CR-AREWR.

4
*

Hinzufgen

APPEND LD_DMBTR TO R_BZT_WA-DMBTR.

APPEND LD_REEWR TO R_BZT_WA-REEWR.

APPEND LD_AREWR TO R_BZT_WA-AREWR.

29
* Begin N980402

* Exchange rate difference is transferred


only for a specified

* document in case of cancellation.

IF not gs_ekbe_key-belnr IS INITIAL


AND "Cancel IR

gs_ekbe_key-belnr = ld_ekbz_cr-beln
r AND

gs_ekbe_key-gjahr = ld_ekbz_cr-gjah
r OR

( gf_xstor = '2' OR gf_xstor = 'X'


) AND "Cancel GR

not gf_smbln IS INITIAL


AND

gf_smbln = ld_ekbz_cr-belnr
AND

gf_sjahr = ld_ekbz_cr-gjahr.

ld_kudif-wert

= ld_ekbz_cr-kudif.

ELSE.

CLEAR ld_kudif-wert.

ENDIF.

CASE ld_ekbz_cr-vgabe.

WHEN 1.

ld_kudif_gr-wert
udif.

= ld_ekbz_cr-k

WHEN 2 OR 3.

ld_kudif_ir-wert

= ld_ekbz_cr-k

udif.

ENDCASE.

* End N980402

Hinzufgen

APPEND LD_DMBTR TO R_BZT_WA-DMBTR.

APPEND LD_REEWR TO R_BZT_WA-REEWR.

APPEND LD_AREWR TO R_BZT_WA-AREWR.

APPEND ld_kudif TO r_bzt_wa-kudif.


"N980402

r.

APPEND ld_kudif_gr TO r_bzt_wa-kudif_g


"N980402

r.

APPEND ld_kudif_ir TO r_bzt_wa-kudif_i


"N980402

49
3
SORT R_BZT_WA-DMBTR BY CURTP.

SORT R_BZT_WA-REEWR BY CURTP.

SORT R_BZT_WA-AREWR BY CURTP.

1
ENDFORM.

5
SORT r_bzt_wa-kudif BY curtp.

"N980402

SORT r_bzt_wa-kudif_gr BY curtp.


"N980402

SORT r_bzt_wa-kudif_ir BY curtp.


"N980402

ENDFORM.

LIMU
REPS
LEINRF54
00001
LIMU
REPS
LEINRF54
00000
36
1
\\\\\no_empty_blocks/////
1
\\\\\comments_ignored/////
1
\\\\\delta_normalized/////
3
\\\\\allowed/////
FORM

*
3
\\\\\allowed/////
FUNCTION
*
3
\\\\\allowed/////
MODULE
**
3
\\\\\allowed/////
REPORT
*
3
\\\\\allowed/////
PROGRAM
*
3
\\\\\allowed/////
FUNCTION-POOL
*
4
\\\\\allowed/////
CLASS
*
DEFINITION
4
\\\\\allowed/////
CLASS
*
IMPLEMENTATION
5
\\\\\forbidden/////
CLASS
*
DEFINITION
DEFERRED
5
\\\\\forbidden/////
CLASS
*
DEFINITION
LOAD
6
\\\\\forbidden/////
CLASS
*
DEFINITION
LOCAL
FRIENDS
3
\\\\\allowed/////
AT
LINE-SELECTION
3
\\\\\allowed/////
AT
USER-COMMAND
4
\\\\\allowed/////

AT
SELECTION-SCREEN
**
3
\\\\\allowed/////
AT
PF*
2
\\\\\allowed/////
INITIALIZATION
2
\\\\\allowed/////
START-OF-SELECTION
2
\\\\\allowed/////
END-OF-SELECTION
3
\\\\\allowed/////
TOP-OF-PAGE
**
2
\\\\\allowed/////
END-OF-PAGE
3
\\\\\allowed/////
GET
**
3
\\\\\forbidden/////
GET
BADI
3
\\\\\forbidden/////
GET
BIT
3
\\\\\forbidden/////
GET
CONNECTION
3
\\\\\forbidden/////
GET
CURSOR
3
\\\\\forbidden/////
GET
DATASET
3
\\\\\forbidden/////
GET
LOCALE
3
\\\\\forbidden/////
GET
PARAMETER
3
\\\\\forbidden/////
GET
PF-STATUS
3

\\\\\forbidden/////
GET
PROPERTY
3
\\\\\forbidden/////
GET
REFERENCE
3
\\\\\forbidden/////
GET
RUN
3
\\\\\forbidden/////
GET
TIME
1
2
FORM
BET_WA_EINTRAG_BEREITEN
5
15
4
DATA:

LD_EKBE_CR
CR_TBL,

TYPE LINE OF TY_EKBE_

LD_DMBTR

TYPE MLCR_CURR,

LD_AREWR

TYPE MLCR_CURR,

LD_REEWR

TYPE MLCR_CURR.

LD_REEWR

TYPE MLCR_CURR,

ld_kudif

TYPE mlcr_curr,
"N980402

ld_kudif_gr

TYPE mlcr_curr,
"N980402

ld_kudif_ir

TYPE mlcr_curr.
"N980402

LD_DMBTR-CURTP

24
3
= LD_EKBE_CR-CURTP.

LD_REEWR-CURTP

= LD_EKBE_CR-CURTP.

LD_AREWR-CURTP

= LD_EKBE_CR-CURTP.

ld_kudif-curtp

4
= ld_ekbe_cr-curtp.

"N980402

ld_kudif_gr-curtp = ld_ekbe_cr-curtp.
"N980402

ld_kudif_ir-curtp = ld_ekbe_cr-curtp.
"N980402

LD_DMBTR-WAERS

29
3
= LD_EKBE_CR-WAERS.

LD_REEWR-WAERS

= LD_EKBE_CR-WAERS.

LD_AREWR-WAERS

= LD_EKBE_CR-WAERS.

ld_kudif-waers

4
= ld_ekbe_cr-waers.

"N980402

ld_kudif_gr-waers = ld_ekbe_cr-waers.
"N980402

ld_kudif_ir-waers = ld_ekbe_cr-waers.
"N980402

LD_REEWR-WERT

35
3
= LD_EKBE_CR-REEWR.

LD_AREWR-WERT

= LD_EKBE_CR-AREWR.

4
*

Hinzufgen

APPEND LD_DMBTR TO R_BET_WA-DMBTR.

APPEND LD_REEWR TO R_BET_WA-REEWR.

APPEND LD_AREWR TO R_BET_WA-AREWR.

32
* Begin N980402

* Exchange rate difference values from

* GR in kudif_gr, IR in kudif_in and cance


lled document in kudif.

IF ld_ekbe_cr-vgabe = '1'.

CLEAR: ld_kudif-wert, ld_kudif_ir-we


rt.

ld_kudif_gr-wert = ld_ekbe_cr-kudif.

IF ( gf_xstor = '2' OR gf_xstor = 'X


' ) AND

not gf_smbln IS INITIAL


AND

gf_smbln = ld_ekbe_cr-belnr
AND

gf_sjahr = ld_ekbe_cr-gjahr.

ld_kudif-wert = ld_ekbe_cr-kudif.

ENDIF.

ELSEIF ld_ekbe_cr-vgabe = '2' OR ld_ek


be_cr-vgabe = '3'.

CLEAR: ld_kudif-wert, ld_kudif_gr-we


rt.

ld_kudif_ir-wert = ld_ekbe_cr-kudif.

IF not gs_ekbe_key-belnr IS INITIAL


AND

gs_ekbe_key-belnr = ld_ekbe_cr-be
lnr AND

gs_ekbe_key-gjahr = ld_ekbe_cr-gj
ahr.

ld_kudif-wert = ld_ekbe_cr-kudif.

ENDIF.

ELSE.

CLEAR: ld_kudif-wert, ld_kudif_gr-we


rt, ld_kudif_ir-wert.

ENDIF.

* End N980402

Hinzufgen

APPEND LD_DMBTR TO R_BET_WA-DMBTR.

APPEND LD_REEWR TO R_BET_WA-REEWR.

APPEND LD_AREWR TO R_BET_WA-AREWR.

APPEND ld_kudif TO r_bet_wa-kudif.


"N980402

r.

APPEND ld_kudif_gr TO r_bet_wa-kudif_g


"N980402

r.

APPEND ld_kudif_ir TO r_bet_wa-kudif_i


"N980402

49
3
SORT R_BET_WA-DMBTR BY CURTP.

SORT R_BET_WA-REEWR BY CURTP.

SORT R_BET_WA-AREWR BY CURTP.

1
ENDFORM.

5
SORT r_bet_wa-kudif BY curtp.
"N980402

SORT r_bet_wa-kudif_gr BY curtp.


"N980402

SORT r_bet_wa-kudif_ir BY curtp.


"N980402

ENDFORM.

LIMU
REPS
LEINRF5M
00007
LIMU
REPS
LEINRF5M
00000
36
1
\\\\\no_empty_blocks/////
1
\\\\\comments_not_ignored/////
1
\\\\\delta_normalized/////
3
\\\\\allowed/////
FORM
*
3
\\\\\allowed/////
FUNCTION
*
3
\\\\\allowed/////
MODULE
**
3
\\\\\allowed/////
REPORT
*
3
\\\\\allowed/////
PROGRAM
*
3
\\\\\allowed/////
FUNCTION-POOL
*
4
\\\\\allowed/////

CLASS
*
DEFINITION
4
\\\\\allowed/////
CLASS
*
IMPLEMENTATION
5
\\\\\forbidden/////
CLASS
*
DEFINITION
DEFERRED
5
\\\\\forbidden/////
CLASS
*
DEFINITION
LOAD
6
\\\\\forbidden/////
CLASS
*
DEFINITION
LOCAL
FRIENDS
3
\\\\\allowed/////
AT
LINE-SELECTION
3
\\\\\allowed/////
AT
USER-COMMAND
4
\\\\\allowed/////
AT
SELECTION-SCREEN
**
3
\\\\\allowed/////
AT
PF*
2
\\\\\allowed/////
INITIALIZATION
2
\\\\\allowed/////
START-OF-SELECTION
2
\\\\\allowed/////
END-OF-SELECTION
3
\\\\\allowed/////
TOP-OF-PAGE
**
2
\\\\\allowed/////
END-OF-PAGE

3
\\\\\allowed/////
GET
**
3
\\\\\forbidden/////
GET
BADI
3
\\\\\forbidden/////
GET
BIT
3
\\\\\forbidden/////
GET
CONNECTION
3
\\\\\forbidden/////
GET
CURSOR
3
\\\\\forbidden/////
GET
DATASET
3
\\\\\forbidden/////
GET
LOCALE
3
\\\\\forbidden/////
GET
PARAMETER
3
\\\\\forbidden/////
GET
PF-STATUS
3
\\\\\forbidden/////
GET
PROPERTY
3
\\\\\forbidden/////
GET
REFERENCE
3
\\\\\forbidden/////
GET
RUN
3
\\\\\forbidden/////
GET
TIME
1
2
FORM
CONV_TO_LOCAL_CURRENCY
1
23
3
PERFORM buchungskreis_lesen USING pot-

bukrs.

ENDIF.

IF ekko-waers ne t001-waers.

1
IF ekko-kufix ne space.

1
IF ekko-kufix ne space AND t169p-kdhw
IS INITIAL.
"N980402

LIMU
REPS
LEINRTOP
00020
LIMU
REPS
LEINRTOP
00000
36
1
\\\\\no_empty_blocks/////
1
\\\\\comments_not_ignored/////
1
\\\\\delta_normalized/////
3

\\\\\allowed/////
FORM
*
3
\\\\\allowed/////
FUNCTION
*
3
\\\\\allowed/////
MODULE
**
3
\\\\\allowed/////
REPORT
*
3
\\\\\allowed/////
PROGRAM
*
3
\\\\\allowed/////
FUNCTION-POOL
*
4
\\\\\allowed/////
CLASS
*
DEFINITION
4
\\\\\allowed/////
CLASS
*
IMPLEMENTATION
5
\\\\\forbidden/////
CLASS
*
DEFINITION
DEFERRED
5
\\\\\forbidden/////
CLASS
*
DEFINITION
LOAD
6
\\\\\forbidden/////
CLASS
*
DEFINITION
LOCAL
FRIENDS
3
\\\\\allowed/////
AT
LINE-SELECTION
3
\\\\\allowed/////
AT
USER-COMMAND

4
\\\\\allowed/////
AT
SELECTION-SCREEN
**
3
\\\\\allowed/////
AT
PF*
2
\\\\\allowed/////
INITIALIZATION
2
\\\\\allowed/////
START-OF-SELECTION
2
\\\\\allowed/////
END-OF-SELECTION
3
\\\\\allowed/////
TOP-OF-PAGE
**
2
\\\\\allowed/////
END-OF-PAGE
3
\\\\\allowed/////
GET
**
3
\\\\\forbidden/////
GET
BADI
3
\\\\\forbidden/////
GET
BIT
3
\\\\\forbidden/////
GET
CONNECTION
3
\\\\\forbidden/////
GET
CURSOR
3
\\\\\forbidden/////
GET
DATASET
3
\\\\\forbidden/////
GET
LOCALE
3
\\\\\forbidden/////
GET
PARAMETER
3
\\\\\forbidden/////
GET

PF-STATUS
3
\\\\\forbidden/////
GET
PROPERTY
3
\\\\\forbidden/////
GET
REFERENCE
3
\\\\\forbidden/////
GET
RUN
3
\\\\\forbidden/////
GET
TIME
1
2
FUNCTION-POOL
EINR
3
23
3
t160b,

t160s,

t161v,

t161w,

t163b,

t163k,

1
t052,

2
t169p,
"N980402

t052,

79
3
END OF vrt.

DATA: zaehlsel TYPE p,


ehler Selektierte Pos

zaehlall TYPE p.
ehler Positionen

zaehlall TYPE p,
ehler Positionen

"Za

1
"Za

2
"Za

zaehlsto TYPE p.
"Counter selec
ted cancel document N980402

100
3
DATA: h_betz_wemng(10) TYPE p DECIMALS 3.
"TK 4.5A

DATA: h_bets_bpmng(10) TYPE p DECIMALS 3.


"TK 4.5A

DATA: h_betz_bpmng(10) TYPE p DECIMALS 3.


"TK 4.5A

5
DATA: gs_ekbe_key TYPE ekbe_key_document,
"N980402

gf_xstor TYPE kzsto,


"N980402

gf_smbln TYPE mblnr,


"N980402

gf_sjahr TYPE mjahr.


"N980402

LIMU
REPS
LGNB8F03
00007
LIMU
REPS
LGNB8F03
00000
36
1
\\\\\no_empty_blocks/////
1
\\\\\comments_ignored/////
1
\\\\\delta_normalized/////
3
\\\\\allowed/////
FORM
*
3
\\\\\allowed/////
FUNCTION
*
3
\\\\\allowed/////
MODULE
**
3
\\\\\allowed/////
REPORT
*
3
\\\\\allowed/////
PROGRAM
*
3
\\\\\allowed/////
FUNCTION-POOL
*
4
\\\\\allowed/////
CLASS
*
DEFINITION
4
\\\\\allowed/////
CLASS
*
IMPLEMENTATION
5
\\\\\forbidden/////

CLASS
*
DEFINITION
DEFERRED
5
\\\\\forbidden/////
CLASS
*
DEFINITION
LOAD
6
\\\\\forbidden/////
CLASS
*
DEFINITION
LOCAL
FRIENDS
3
\\\\\allowed/////
AT
LINE-SELECTION
3
\\\\\allowed/////
AT
USER-COMMAND
4
\\\\\allowed/////
AT
SELECTION-SCREEN
**
3
\\\\\allowed/////
AT
PF*
2
\\\\\allowed/////
INITIALIZATION
2
\\\\\allowed/////
START-OF-SELECTION
2
\\\\\allowed/////
END-OF-SELECTION
3
\\\\\allowed/////
TOP-OF-PAGE
**
2
\\\\\allowed/////
END-OF-PAGE
3
\\\\\allowed/////
GET
**
3
\\\\\forbidden/////
GET
BADI
3
\\\\\forbidden/////

GET
BIT
3
\\\\\forbidden/////
GET
CONNECTION
3
\\\\\forbidden/////
GET
CURSOR
3
\\\\\forbidden/////
GET
DATASET
3
\\\\\forbidden/////
GET
LOCALE
3
\\\\\forbidden/////
GET
PARAMETER
3
\\\\\forbidden/////
GET
PF-STATUS
3
\\\\\forbidden/////
GET
PROPERTY
3
\\\\\forbidden/////
GET
REFERENCE
3
\\\\\forbidden/////
GET
RUN
3
\\\\\forbidden/////
GET
TIME
9
2
FORM
BESTAND_PRD_BUCHUNG_N
3
36
3
prdif = i_sgnbu-dmbtr - vwere - krdi
f.

ELSEIF lmeng <= lbkum.

*------- Bestand noch voll am Lager ---------------------------------*

1
bestd = i_sgnbu-dmbtr - vwere.

2
IF gf_kdm_active = ' '.
"N980402

bestd = i_sgnbu-dmbtr - vwere.

41
3
IF ( i_sgnbu-vprsv = vprsv-v ) AND (
i_sgnbu-mlmaa IS INITIAL ).

krdif = 0.

ENDIF.

3
ELSE.

*------- Bestand nicht mehr voll am Lager


----------------------------*

7
ELSE.
"N980402

bestd = i_sgnbu-dmbtr - vwere - kr


"N980402

dif.

ENDIF.
"N980402

ELSE.

*------- Bestand nicht mehr voll am Lager


----------------------------*

IF gf_kdm_active = ' '.


"N980402

51
3
IF ( i_sgnbu-vprsv = vprsv-v ) AND (
i_sgnbu-mlmaa IS INITIAL ).

krdif = betrag.

ENDIF.

1
ENDIF.

6
ELSE.
"N980402

krdif )

bestd = ( i_sgnbu-dmbtr - vwere "N980402

* lbkum / lmeng.
"N980402

prdif = i_sgnbu-dmbtr - vwere - be


std - krdif.
"N980402

ENDIF.
"N980402

ENDIF.

2
FORM
FELDER_INIT
2
12
5
CLEAR: vwere, shvwere, bestd, shbestd, b
estv, shbestv,

einkk, sheinkk, bestu, shbestu, u


mdif, shumdif,

einkg, sheinkg, prdif, shprdif, b


estg, shbestg,

krdif, shkrdif, verbr, shverbr, f


remd, shfremd,

kredt, shkredt, aufum, shaufum, c


odif, shcodif,

1
laufende_periode_fix.

ve.

1
laufende_periode_fix, gf_kdm_acti
"N980402

50
7
CALL FUNCTION 'T001K_SINGLE_READ'

EXPORTING

bwkey = i_sgnbu-bwkey

IMPORTING

wt001k = t001k.

ENDIF.

ENDIF.

ENDFORM.

"FELDER_INIT

25

* Begin N980402

* Nachsehen, ob Kursdifferenzen gegen eine


n vorgegebenen Plankurs

* berechnet werden sollen:

IF i_sgnbu-bukrs NE t169p-bukrs.

CALL FUNCTION 'MRM_DBTAB_T169P_READ'

EXPORTING

i_bukrs

= i_sgnbu-bukrs

i_buffer_on = 'X'

IMPORTING

e_t169p

ENDIF.

= t169p.

* Separate KDM lines

e_t169p = t169p.

IF i_sgnbu-curtp = '10' AND t169p-kdhw =


'X'.

gf_kdm_active = 'X'.

ELSEIF i_sgnbu-curtp = t169p-ctml1 AND t


169p-kdml1 = 'X'.

gf_kdm_active = 'X'.

ELSEIF i_sgnbu-curtp = t169p-ctml2 AND t


169p-kdml2 = 'X'.

gf_kdm_active = 'X'.

ENDIF.

* End N980402

ENDFORM.

"FELDER_INIT

2
FORM
KURSDIFFERENZ_STORNO_N
5
13
3
FORM kursdifferenz_storno_n.

DATA: pl_dmbtr LIKE sgnbu-dmbtr.

3
*------- Kursdifferenz nicht bei fixiertem
Kurs in der Bestellung ----*

aber nur relevant in Hauswhrung


*

IF i_sgnbu-curtp = '10'.

13
* Begin N980402

DATA: menge_re TYPE f,

menge_we TYPE f,

menge_we_open TYPE f,

krdif_faktor_re TYPE sgnbu-kudif,

krdif_faktor_we TYPE sgnbu-kudif,

f_kdm1 LIKE bseg-dmbtr,

f_kdm2 LIKE bseg-dmbtr.

* End N980402

*------- Kursdifferenz nicht bei fixiertem


Kurs in der Bestellung ----*

aber nur relevant in Hauswhrung


*

IF i_sgnbu-curtp = '10' AND gf_kdm_activ


e = ' '.
"N980402

19
3
CHECK: i_sgnbu-kufix IS INITIAL.

ENDIF.

2
*------- Kursdifferenz nicht bei geplanten
Bezugsnebenkosten -------*

CHECK: i_sgnbu-xekbz IS INITIAL.

4
IF gf_kdm_active = ' '.
"N980402

*------- Kursdifferenz nicht bei geplanten


Bezugsnebenkosten -------*

CHECK: i_sgnbu-xekbz IS INITIAL.

ENDIF.
"N980402

32
7
CALL FUNCTION 'MRM_DBTAB_T169P_READ'

EXPORTING

i_bukrs

= i_sgnbu-bukrs

i_buffer_on = 'X'

IMPORTING

e_t169p

= t169p.

ENDIF.

1
CASE t169p-xplcu.

IF gf_kdm_active = ' '.


"N980402

CASE t169p-xplcu.

42
3
CHECK: i_sgnbu-waers NE i_sgnbu-pwae
r,

i_sgnbu-waers = i_sgnbu-bwae
r,

i_sgnbu-rewwr NE 0.

1
IF i_sgnbu-curtp = '10'.

IF i_sgnbu-curtp = '10'.

105
4
WHEN 'N'.

* Grundstzlich keine Kursdifferenzen

krdif = 0.

ENDCASE.

2
*Ende Einschub "uw

146
* Begin N980402

ELSE.

* Cancellation: Use currency difference va


lue from original document

IF i_sgnbu-ivtyp = c_ivtyp_storno.

krdif = i_sgnbu-kudif.

ELSE.

CHECK: i_sgnbu-waers NE i_sgnbu-pwae


r,

i_sgnbu-waers = i_sgnbu-bwae
r,

i_sgnbu-wewwr NE 0,

i_sgnbu-rewwr NE 0.

IF i_sgnbu-curtp = '10'.

CALL FUNCTION 'CONVERT_TO_LOCAL_CU


RRENCY'

EXPORTING

foreign_amount

= i_sgnbu-wrb

tr

foreign_currency = i_sgnbu-wae
rs

local_currency

= i_sgnbu-pwa

rate

= i_sgnbu-kur

date

= i_sgnbu-rep

er

sf

dat

IMPORTING

local_amount

= rewrt.

ELSE.

* In anderen als der lokalen Whrung mu d


er Kurstyp geholt werden

READ TABLE t_currencies WITH KEY b


ukrs = i_sgnbu-bukrs

c
urtp = i_sgnbu-curtp.

IF sy-subrc = 0.

CALL FUNCTION 'CONVERT_TO_LOCAL_


CURRENCY'

EXPORTING

foreign_amount
rbtr

= i_sgnbu-w

foreign_currency = i_sgnbu-w
aers

local_currency

= i_sgnbu-p

type_of_rate

= t_currenc

date

= i_sgnbu-r

waer

ies-kurst

epdat

IMPORTING

local_amount

ENDIF.

ENDIF.

= rewrt.

menge_re = i_sgnbu-remng - i_sgnbu-w


emng.

menge_we = i_sgnbu-wemng.

menge_we_open = menge_re - i_sgnbu-m


enge.

menge_we_open = ABS( menge_we_open )


.

krdif_faktor_re = i_sgnbu-rewrt / i_
sgnbu-rewwr.

krdif_faktor_we = i_sgnbu-wewrt / i_
sgnbu-wewwr.

IF NOT i_sgnbu-tbtkz IS INITIAL.

IF i_sgnbu-menge <= i_sgnbu-wemng.

krdif = rewrt - ( i_sgnbu-wrbtr


*

( krdif_faktor_we ) ).

f_kdm1 = rewrt - ( i_sgnbu-wrbtr


*

( i_sgnbu-wewrt / i_sgnb
u-wewwr ) ).

f_kdm2 = rewrt - i_sgnbu-wrbtr *


i_sgnbu-wewrt / i_sgnbu-wewwr.

IF f_kdm1 = 0 OR f_kdm2 = 0.

krdif = 0.

ENDIF.

ELSE.

krdif = ( i_sgnbu-dmbtr * ( i_sg


nbu-wemng /

i_sgnbu-menge ) ) -

( i_sgnbu-wrbtr *

( krdif_faktor_we ) ) *

( i_sgnbu-wemng / i_sgnb
u-menge ).

f_kdm1 = ( i_sgnbu-dmbtr * ( i_s


gnbu-wemng /

i_sgnbu-menge ) ) -

( i_sgnbu-wrbtr *

( i_sgnbu-wewrt / i_sgnb
u-wewwr ) ) *

( i_sgnbu-wemng / i_sgnb
u-menge ).

f_kdm2 = ( i_sgnbu-dmbtr * ( i_s


gnbu-wemng /

i_sgnbu-menge ) ) -

( i_sgnbu-wrbtr * i_sgnb
u-wewrt / i_sgnbu-wewwr ) *

( i_sgnbu-wemng / i_sgnb

u-menge ).

IF f_kdm1 = 0 OR f_kdm2 = 0.

krdif = 0.

ENDIF.

ENDIF.

ELSE.

* Case invoice surplus

IF menge_re > 0 AND i_sgnbu-weunb


EQ space.

* Case 1: Quantity only in invoice surplus

IF i_sgnbu-menge <= menge_re.

krdif = ( rewrt * ( re_we_meng


e / i_sgnbu-menge ) ) -

( ( i_sgnbu-wrbtr * (
krdif_faktor_re ) ) *

( re_we_menge / i_sgnb
u-menge ) ).

f_kdm1 = ( rewrt * ( re_we_men


ge / i_sgnbu-menge ) ) -

( ( i_sgnbu-wrbtr * (
i_sgnbu-rewrt / i_sgnbu-rewwr ) ) *

( re_we_menge / i_sgnb
u-menge ) ).

f_kdm2 = ( rewrt * ( re_we_men


ge / i_sgnbu-menge ) ) -

( ( i_sgnbu-wrbtr * i_
sgnbu-rewrt / i_sgnbu-rewwr ) *

( re_we_menge / i_sgnb
u-menge ) ).

IF f_kdm1 = 0 OR f_kdm2 = 0.

krdif = 0.

ENDIF.

ELSE.

* Case 2: Quantity larger than invoice sur


plus

*
krdif (total) = krdif (invoice)
+ krdif (goods receipt)

krdif = ( ( rewrt * ( re_we_me


nge / i_sgnbu-menge ) ) -

( ( i_sgnbu-wrbtr *

( krdif_faktor_re ) )
*

( menge_re / i_sgnbu-m
enge ) ) ) +

( ( rewrt * ( menge_we
_open / i_sgnbu-menge ) ) -

( i_sgnbu-wrbtr *

( menge_we_open / i
_sgnbu-menge ) ) *

( krdif_faktor_we ) )
.

f_kdm1 = ( ( rewrt * ( re_we_m


enge / i_sgnbu-menge ) ) -

( ( i_sgnbu-wrbtr * (
i_sgnbu-rewrt / i_sgnbu-rewwr ) ) *

( menge_re / i_sgnbu-m
enge ) ) ) +

( ( rewrt * ( menge_we
_open / i_sgnbu-menge ) ) -

( i_sgnbu-wrbtr *

( menge_we_open / i
_sgnbu-menge ) ) *

( i_sgnbu-wewrt / i_s
gnbu-wewwr ) ).

f_kdm2 = ( ( rewrt * ( re_we_m


enge / i_sgnbu-menge ) ) -

( ( i_sgnbu-wrbtr * i_
sgnbu-rewrt / i_sgnbu-rewwr ) *

( menge_re / i_sgnbu-m
enge ) ) ) +

( ( rewrt * ( menge_we
_open / i_sgnbu-menge ) ) -

( i_sgnbu-wrbtr *

( menge_we_open / i
_sgnbu-menge ) ) *

( i_sgnbu-wewrt / i_s
gnbu-wewwr ) ).

IF f_kdm1 = 0 OR f_kdm2 = 0.

krdif = 0.

ENDIF.

ENDIF.

ELSE.

* Case delivery surplus

krdif = rewrt - ( i_sgnbu-wrbtr


* ( krdif_faktor_we ) ).

f_kdm1 = rewrt - i_sgnbu-wrbtr *


i_sgnbu-wewrt / i_sgnbu-wewwr.

f_kdm2 = rewrt - i_sgnbu-wrbtr *


( i_sgnbu-wewrt / i_sgnbu-wewwr ).

IF f_kdm1 = 0 OR f_kdm2 = 0.

krdif = 0.

ENDIF.

ENDIF.

ENDIF.

ENDIF.

ENDIF.

*End N980402

2
FORM
KURSDIFFERENZ_ZUGANG_N
2
14
3
FORM kursdifferenz_zugang_n.

DATA: pl_dmbtr LIKE sgnbu-dmbtr.

3
*------- Kursdifferenz nicht bei geplanten
Bezugsnebenkosten -------*

CHECK: i_sgnbu-xekbz IS INITIAL.

CLEAR krdif.

11
DATA: menge_we TYPE f,
"N980402

menge_re TYPE f,
"N980402

betrag_we TYPE sgnbu-wewwr.


"N980402

*------- Kursdifferenz nicht bei geplanten


Bezugsnebenkosten -------*

IF gf_kdm_active = ' '.


"N980402

CHECK: i_sgnbu-xekbz IS INITIAL.

ENDIF.
"N980402

CLEAR krdif.

IF gf_kdm_active = ' '.


"N980402

111
4

WHEN 'N'.

Grundstzlich keine Kursdifferenzen

krdif = 0.

ENDCASE.

ENDFORM.
_ZUGANG_N

1
"KURSDIFFERENZ

84

* Begin N980402

ELSE.

* New calculation logic for exchange rate


differences from customizing

* settings in transaction OMRW

IF i_sgnbu-ivtyp = c_ivtyp_storno.

* Cancellation: Use currency difference va


lue from original document

krdif = i_sgnbu-kudif.

ELSE.

* Exchange rate differences for every curr


ency, which is not invoice

* currency

CHECK: i_sgnbu-waers NE i_sgnbu-pwae


r.

* but only, if invoice currency = PO curre


ncy

CHECK i_sgnbu-waers = i_sgnbu-bwae


r.

* and a quantity is delivered already

CHECK i_sgnbu-wewwr > 0.

* If the goods receipt quantity has been f


ully invoiced

* -> no exchange rate

* Is there any goods receipt quantity open


( not for

* subsequent debit )?

IF i_sgnbu-tbtkz EQ space.

CHECK: we_re_menge > 0.

ENDIF.

IF i_sgnbu-curtp = '10'.

CALL FUNCTION 'CONVERT_TO_LOCAL_CU


RRENCY'

EXPORTING

foreign_amount

= i_sgnbu-wrb

tr

foreign_currency = i_sgnbu-wae
rs

local_currency

= i_sgnbu-pwa

rate

= i_sgnbu-kur

date

= i_sgnbu-rep

er

sf

dat

IMPORTING

local_amount

= wewrt.

ELSE.

* In other than local currency the exchang


e rate type has to be fetched

READ TABLE t_currencies WITH KEY b


ukrs = i_sgnbu-bukrs

c
urtp = i_sgnbu-curtp.

IF sy-subrc = 0.

CALL FUNCTION 'CONVERT_TO_LOCAL_


CURRENCY'

EXPORTING

foreign_amount

= i_sgnbu-w

rbtr

foreign_currency = i_sgnbu-w
aers

local_currency

= i_sgnbu-p

type_of_rate

= t_currenc

waer

ies-kurst

date

= i_sgnbu-r

epdat

IMPORTING

local_amount

= wewrt.

ENDIF.

ENDIF.

* Calculation of the exchange rate

menge_re = i_sgnbu-menge + i_sgnbu-r


emng.

menge_we = i_sgnbu-wemng.

IF NOT i_sgnbu-tbtkz IS INITIAL.

IF i_sgnbu-menge <= menge_we.

krdif = wewrt - ( i_sgnbu-wrbtr


*

( i_sgnbu-wewrt / i_
sgnbu-wewwr ) ).

ELSE.

krdif = wewrt * ( i_sgnbu-wemng


/ i_sgnbu-menge )

- ( i_sgnbu-wrbtr *

( i_sgnbu-wewrt / i_
sgnbu-wewwr ) ) *

( i_sgnbu-wemng / i_
sgnbu-menge ).

ENDIF.

ELSE.

* Case 1: Invoice quantity in the range of


delivered quantity

IF menge_re <= menge_we.

krdif = wewrt - ( i_sgnbu-wrbtr


*

( i_sgnbu-wewrt / i_sgnb
u-wewwr ) ).

ELSE.

krdif = wewrt * ( we_re_menge /


i_sgnbu-menge ) -

( i_sgnbu-wrbtr *

( i_sgnbu-wewrt / i_sgnbuwewwr ) ) *

( we_re_menge / i_sgnbu-me
nge ).

ENDIF.

ENDIF.

ENDIF.

ENDIF.

* End N980402

ENDFORM.
_ZUGANG_N

"KURSDIFFERENZ

2
FORM
PRDIF_KRDIF_VERRECHNEN
1
26
3
ENDIF.

* Verrechnung nur durchfhren, wenn KDM ni


cht gegen Plankurs gerechnet

CHECK t169p-xplcu NE 'X'.

2
CHECK gf_kdm_active NE 'X'.
"N980402

2
FORM
RE_STORNO_N
1
17
4
IF i_sgnbu-tbtkz EQ space.

*------- WE/RE Buchung ----------------------------------------------*

PERFORM vwere_stornobetrag_n.

*------- Menge geht in RE-Unterschuss -------------------------------*

IF i_sgnbu-menge > re_we_menge.

2
*------- Menge geht in RE-Unterschuss -------------------------------*

IF i_sgnbu-menge > re_we_menge.

2
FORM
RE_STORNO_KONTIERT_N
1
48
4
ENDIF.

verbr = i_sgnbu-dmbtr - vwere.

ENDIF.

1
"RE_STORNO_KON

ENDFORM.
TIERT_N

5
IF gf_kdm_active = 'X'.
"N980402

verbr = i_sgnbu-dmbtr - vwere - krdif.


"N980402

ENDIF.
"N980402

ENDFORM.
TIERT_N

"RE_STORNO_KON

2
FORM
RE_ZUGANG_N
1
52
4
vwere = i_sgnbu-dmbtr

* ( i_sgnbu-menge - i_sgnbu-we
mng ) / i_sgnbu-menge.

ENDIF.

ENDIF.

*------- Folgebuchung bei Lagermaterial mi


t Preissteuerung 'V' -------*

IF ( i_sgnbu-vprsv = vprsv-v ) AND ( i_s


gnbu-mlmaa IS INITIAL ).

PERFORM bestand_prd_buchung_n.

PERFORM umbewertung_material_n.

4
*------- Folgebuchung bei Lagermaterial mi
t Preissteuerung 'V' -------*

IF ( i_sgnbu-vprsv = vprsv-v ) AND ( i_s


gnbu-mlmaa IS INITIAL ).

PERFORM bestand_prd_buchung_n.

PERFORM umbewertung_material_n.

2
FORM
RE_ZUGANG_KONTIERT_N
1
78
4
ENDIF.

verbr = i_sgnbu-dmbtr - vwere.

ENDIF.

1
"RE_ZUGANG_KON

ENDFORM.
TIERT_N

5
IF gf_kdm_active = 'X'.
"N980402

verbr = i_sgnbu-dmbtr - vwere - krdif.


"N980402

ENDIF.
"N980402

ENDFORM.
TIERT_N

LIMU
REPS
LGNB8F04
00010
LIMU
REPS
LGNB8F04

"RE_ZUGANG_KON

00000
36
1
\\\\\no_empty_blocks/////
1
\\\\\comments_not_ignored/////
1
\\\\\delta_normalized/////
3
\\\\\allowed/////
FORM
*
3
\\\\\allowed/////
FUNCTION
*
3
\\\\\allowed/////
MODULE
**
3
\\\\\allowed/////
REPORT
*
3
\\\\\allowed/////
PROGRAM
*
3
\\\\\allowed/////
FUNCTION-POOL
*
4
\\\\\allowed/////
CLASS
*
DEFINITION
4
\\\\\allowed/////
CLASS
*
IMPLEMENTATION
5
\\\\\forbidden/////
CLASS
*
DEFINITION
DEFERRED
5
\\\\\forbidden/////
CLASS
*
DEFINITION
LOAD
6
\\\\\forbidden/////
CLASS

*
DEFINITION
LOCAL
FRIENDS
3
\\\\\allowed/////
AT
LINE-SELECTION
3
\\\\\allowed/////
AT
USER-COMMAND
4
\\\\\allowed/////
AT
SELECTION-SCREEN
**
3
\\\\\allowed/////
AT
PF*
2
\\\\\allowed/////
INITIALIZATION
2
\\\\\allowed/////
START-OF-SELECTION
2
\\\\\allowed/////
END-OF-SELECTION
3
\\\\\allowed/////
TOP-OF-PAGE
**
2
\\\\\allowed/////
END-OF-PAGE
3
\\\\\allowed/////
GET
**
3
\\\\\forbidden/////
GET
BADI
3
\\\\\forbidden/////
GET
BIT
3
\\\\\forbidden/////
GET
CONNECTION
3
\\\\\forbidden/////
GET
CURSOR
3
\\\\\forbidden/////
GET

DATASET
3
\\\\\forbidden/////
GET
LOCALE
3
\\\\\forbidden/////
GET
PARAMETER
3
\\\\\forbidden/////
GET
PF-STATUS
3
\\\\\forbidden/////
GET
PROPERTY
3
\\\\\forbidden/////
GET
REFERENCE
3
\\\\\forbidden/////
GET
RUN
3
\\\\\forbidden/////
GET
TIME
3
2
FORM
RE01

else.
ure-Position

1
49
5
"Reto

*--- bei einer Retoure-Position ist die Bu


chungslogik genau umgekehrt

*--- zur Lieferposition:

case i_sgnbu-shkzg.

when haben.

5
perform kursdifferenz_zugang_n.

perform re_zugang_n.

when soll.

perform kursdifferenz_storno_n.

perform re_storno_n.

15
IF i_sgnbu-xekbz = 'X' AND i_sgn
bu-ivtyp = '5'. "N980402

PERFORM kursdifferenz_storno_n
"N980402

PERFORM re_storno_n.
"N980402

ELSE.
"N980402

PERFORM kursdifferenz_zugang_n
.

PERFORM re_zugang_n.

ENDIF.
"N980402

WHEN soll.

IF i_sgnbu-xekbz = 'X' AND i_sgn


bu-ivtyp = space. "N980402

PERFORM kursdifferenz_zugang_n
"N980402

PERFORM re_zugang_n.
"N980402

ELSE.
"N980402

PERFORM kursdifferenz_storno_n
.

PERFORM re_storno_n.

ENDIF.
"N980402

2
FORM
RE02
3
15
3
form re02.

if i_sgnbu-menge ne 0.

5
"Li

if i_sgnbu-retpo = space.
efer-Position

case i_sgnbu-shkzg.

when soll.

perform re_zugang_kontiert_n.

when haben.

22
we_re_menge = i_sgnbu-wemng - i_sgnburemng.
"N980402

re_we_menge = 0 - we_re_menge.
"N980402

IF i_sgnbu-retpo = space.
efer-Position

CASE i_sgnbu-shkzg.

"Li

WHEN soll.

* separate KDM lines N980402 WP 140949

* Calculate any exchange rate differences


only if there is a

* valuated goods receipt expected.

IF gf_kdm_active = 'X' AND


"N980402

i_sgnbu-weunb = space AND


"N980402

i_sgnbu-wepos <> space.


"N980402

PERFORM kursdifferenz_zugang_n
"N980402

ENDIF.
"N980402

PERFORM re_zugang_kontiert_n.

WHEN haben.

IF gf_kdm_active = 'X' AND


"N980402

i_sgnbu-weunb = space AND


"N980402

i_sgnbu-wepos <> space.


"N980402

* For credit memos post the exchange rate


difference

* against the average exchange rate of the


invoices

PERFORM kursdifferenz_storno_n
"N980402

ENDIF.
"N980402

else.
toure-Position

27
5
"Re

*--- bei einer Retoure-Position ist die Bu


chungslogik genau umgekehrt

*--- zur Lieferposition:

case i_sgnbu-shkzg.

when haben.

3
perform re_zugang_kontiert_n.

when soll.

perform re_storno_kontiert_n.

31
IF i_sgnbu-xekbz = 'X' AND i_sgn
bu-ivtyp = '5'. "N980402

IF gf_kdm_active = 'X' AND


"N980402

i_sgnbu-weunb = space AND


"N980402

i_sgnbu-wepos <> space.


"N980402

_n.

PERFORM kursdifferenz_storno
"N980402

ENDIF.
"N980402

PERFORM re_storno_kontiert_n.
"N980402

ELSE.
"N980402

IF gf_kdm_active = 'X' AND

i_sgnbu-weunb = space AND

i_sgnbu-wepos <> space.


"N980402

PERFORM kursdifferenz_zugang
_n.

ENDIF.

PERFORM re_zugang_kontiert_n.

ENDIF.
"N980402

WHEN soll.

IF i_sgnbu-xekbz = 'X' AND i_sgn


bu-ivtyp = space. "N980402

IF gf_kdm_active = 'X' AND


"N980402

i_sgnbu-weunb = space AND


"N980402

i_sgnbu-wepos <> space.


"N980402

_n.

PERFORM kursdifferenz_zugang
"N980402

ENDIF.
"N980402

PERFORM re_zugang_kontiert_n.
"N980402

ELSE.
"N980402

IF gf_kdm_active = 'X' AND

i_sgnbu-weunb = space AND

i_sgnbu-wepos <> space.


"N980402

PERFORM kursdifferenz_storno
_n.

ENDIF.

PERFORM re_storno_kontiert_n.

ENDIF.
"N980402

35
4
endif.

perform sh_kzg_setzen_n using vwere ch


anging shvwere.

perform sh_kzg_setzen_n using verbr ch


anging shverbr.

1
endif.

4
IF gf_kdm_active = 'X'.
"N980402

PERFORM sh_kzg_setzen_n USING krdif


CHANGING shkrdif. "N980402

ENDIF.
"N980402

ENDIF.

2
FORM
RE21
4
29

3
re_we_menge = 0 - we_re_menge.

case i_sgnbu-shkzg.

when soll.

2
perform re_zugang_n.

when haben.

8
IF gf_kdm_active = 'X'.
"N980402

PERFORM kursdifferenz_zugang_n.
"N980402

ENDIF.
"N980402

PERFORM re_zugang_n.

WHEN haben.

IF gf_kdm_active = 'X'.
"N980402

PERFORM kursdifferenz_storno_n.
"N980402

ENDIF.
"N980402

34
3
perform re_storno_n.

endcase.

fremd = bestd + prdif.

1
* only for planned delivery costs for subc
ontract PO

4
IF gf_kdm_active = 'X'.
"N980402

fremd = bestd + prdif + krdif.


"N980402

ENDIF.
"N980402

* only for planned delivery costs for subc


ontract PO

44
4
ENDIF.

if t001k-xlbpd ne space or i_sgnbu-mlm


aa ne space.

bestg = 0 - prdif - bestd.

2
else.

prdif = 0.

8
IF gf_kdm_active = 'X'.
"N980402

bestg = 0 - prdif - bestd - krdif.


"N980402

ENDIF.
"N980402

ELSE.

prdif = 0.

IF gf_kdm_active = 'X'.
"N980402

krdif = 0.
"N980402

ENDIF.
"N980402

56
3
perform sh_kzg_setzen_n using bestg ch
anging shbestg.

PERFORM sh_kzg_setzen_n USING einkk CH


ANGING sheinkk.

perform sh_kzg_setzen_n using prdif ch


anging shprdif.

1
endif.

4
IF gf_kdm_active = 'X'.
"N980402

PERFORM sh_kzg_setzen_n USING krdif


CHANGING shkrdif. "N980402

ENDIF.
"N980402

ENDIF.

LIMU
REPS
LGNB8TOP
00005
LIMU
REPS
LGNB8TOP
00000
36
1
\\\\\no_empty_blocks/////
1
\\\\\comments_ignored/////
1
\\\\\delta_normalized/////
3
\\\\\allowed/////
FORM
*
3
\\\\\allowed/////
FUNCTION
*
3
\\\\\allowed/////
MODULE
**
3
\\\\\allowed/////
REPORT
*
3
\\\\\allowed/////
PROGRAM
*
3

\\\\\allowed/////
FUNCTION-POOL
*
4
\\\\\allowed/////
CLASS
*
DEFINITION
4
\\\\\allowed/////
CLASS
*
IMPLEMENTATION
5
\\\\\forbidden/////
CLASS
*
DEFINITION
DEFERRED
5
\\\\\forbidden/////
CLASS
*
DEFINITION
LOAD
6
\\\\\forbidden/////
CLASS
*
DEFINITION
LOCAL
FRIENDS
3
\\\\\allowed/////
AT
LINE-SELECTION
3
\\\\\allowed/////
AT
USER-COMMAND
4
\\\\\allowed/////
AT
SELECTION-SCREEN
**
3
\\\\\allowed/////
AT
PF*
2
\\\\\allowed/////
INITIALIZATION
2
\\\\\allowed/////
START-OF-SELECTION
2
\\\\\allowed/////
END-OF-SELECTION
3
\\\\\allowed/////

TOP-OF-PAGE
**
2
\\\\\allowed/////
END-OF-PAGE
3
\\\\\allowed/////
GET
**
3
\\\\\forbidden/////
GET
BADI
3
\\\\\forbidden/////
GET
BIT
3
\\\\\forbidden/////
GET
CONNECTION
3
\\\\\forbidden/////
GET
CURSOR
3
\\\\\forbidden/////
GET
DATASET
3
\\\\\forbidden/////
GET
LOCALE
3
\\\\\forbidden/////
GET
PARAMETER
3
\\\\\forbidden/////
GET
PF-STATUS
3
\\\\\forbidden/////
GET
PROPERTY
3
\\\\\forbidden/////
GET
REFERENCE
3
\\\\\forbidden/////
GET
RUN
3
\\\\\forbidden/////
GET
TIME
1
2
FUNCTION-POOL

GNB8

DATA: LAUFENDE_PERIODE_FIX,
r statistischen GLD

MESSAGES_ACTIVE,
lag Messagesammler aktiv

SMBEW_INDEX

2
132
7
" f

" F

LIKE SY-TABIX,

SH_KZG(16),
eldname S/H-KZ

" F

X_NWALT LIKE DM08R-VWALT,

X_NWERR LIKE DM08R-VWERR,

X_NWERT LIKE DM08R-VWERT,

1
X_NWREM LIKE DM08R-VWREM.

2
X_NWREM LIKE DM08R-VWREM,

gf_kdm_active TYPE boole-boole.


"N980402

143
6
VAL

DATA:
HABEN
UE 'H',

SOLL

VAL

UE 'S',

TOLSL-VP

LIKE T169E-TOLSL

VAL

VORSL-BSX LIKE T169A-VORSL

VAL

UE 'VP',

UE 'BSX',

VPRSV-S

VAL

VPRSV-V

VAL

UE 'S',

UE 'V',

BUSTW-RE05 LIKE T169A-BUSTW


UE 'RE05'.

BUSTW-RE05 LIKE T169A-BUSTW


UE 'RE05',

2
VAL

2
VAL

c_ivtyp_storno LIKE rbkp-ivtyp V


"N980402

ALUE '5'.

LIMU
REPS
LMBGBFBN
00015
LIMU
REPS
LMBGBFBN
00000
36
1
\\\\\no_empty_blocks/////
1
\\\\\comments_not_ignored/////
1
\\\\\delta_normalized/////
3
\\\\\allowed/////
FORM
*
3
\\\\\allowed/////
FUNCTION

*
3
\\\\\allowed/////
MODULE
**
3
\\\\\allowed/////
REPORT
*
3
\\\\\allowed/////
PROGRAM
*
3
\\\\\allowed/////
FUNCTION-POOL
*
4
\\\\\allowed/////
CLASS
*
DEFINITION
4
\\\\\allowed/////
CLASS
*
IMPLEMENTATION
5
\\\\\forbidden/////
CLASS
*
DEFINITION
DEFERRED
5
\\\\\forbidden/////
CLASS
*
DEFINITION
LOAD
6
\\\\\forbidden/////
CLASS
*
DEFINITION
LOCAL
FRIENDS
3
\\\\\allowed/////
AT
LINE-SELECTION
3
\\\\\allowed/////
AT
USER-COMMAND
4
\\\\\allowed/////
AT
SELECTION-SCREEN
**
3

\\\\\allowed/////
AT
PF*
2
\\\\\allowed/////
INITIALIZATION
2
\\\\\allowed/////
START-OF-SELECTION
2
\\\\\allowed/////
END-OF-SELECTION
3
\\\\\allowed/////
TOP-OF-PAGE
**
2
\\\\\allowed/////
END-OF-PAGE
3
\\\\\allowed/////
GET
**
3
\\\\\forbidden/////
GET
BADI
3
\\\\\forbidden/////
GET
BIT
3
\\\\\forbidden/////
GET
CONNECTION
3
\\\\\forbidden/////
GET
CURSOR
3
\\\\\forbidden/////
GET
DATASET
3
\\\\\forbidden/////
GET
LOCALE
3
\\\\\forbidden/////
GET
PARAMETER
3
\\\\\forbidden/////
GET
PF-STATUS
3
\\\\\forbidden/////
GET
PROPERTY
3

\\\\\forbidden/////
GET
REFERENCE
3
\\\\\forbidden/////
GET
RUN
3
\\\\\forbidden/////
GET
TIME
4
2
FORM
BEZUGSNEBENKOSTEN_RECHNEN
8
8
3
*--------------------------------------------------------------------*

FORM bezugsnebenkosten_rechnen USING b-bfl


ag TYPE c "PO with ACC.ASSIGN

b-xei
nk LIKE t001-xeink

6
b-waf
lg TYPE c. "GOODS ISSUE/WA04

DATA: l_curtp LIKE ycurtp-curtp.

CHECK NOT dm07m-bsmng IS INITIAL.

CHECK b-waflg IS INITIAL OR vm07m-kzbwa


NE '04'.

8
b_waf
lg TYPE c. "GOODS ISSUE/WA04 "N980402

DATA: l_curtp LIKE ycurtp-curtp,

lv_kudif_bnk LIKE bseg-dmbtr.


"N980402

CHECK NOT dm07m-bsmng IS INITIAL.

CHECK b_waflg IS INITIAL OR vm07m-kzbwa


NE '04'.
"N980402

19
3
PERFORM wertestring_puffern USING bust
w_bnkg.

flagbnk = x.

ENDIF.

1
IF b-waflg = space.

1
IF b_waflg = space.
"N980402

48
7

PERFORM wertesperrtab_ekbn_pruefen USI


NG mseg-zeile

ye
kbnk_cr-stunr

ye
kbnk_cr-zaehk

ye
kbnk_cr-curtp

space.

refe2 = xekbn-frwmg - erfmg.

we_re_menge = xekbn-frwmg - xekbn-frrm


g.

1
IF yekbnk-kwert < 0 AND NOT b-waflg IS
INITIAL.

1
IF yekbnk-kwert < 0 AND NOT b_waflg IS
INITIAL.
"N980402

57
4
CLEAR betrag.

IF mseg-weunb IS INITIAL.

DATA shkzg LIKE mseg-shkzg. shkzg =


mseg-shkzg.

1
IF NOT b-waflg IS INITIAL.

1
IF NOT b_waflg IS INITIAL.
"N980402

94
3
xzcxcb-lifnr = yekbnk-lifnr.

xzcxcb-dmbtr = betrag.

xzcxcb-dmbtr = 0 - xzcxcb-dmbtr.

1
betrag = fracht - xzcxcb-dmbtr.

CLEAR: lv_kudif_bnk.
"N980402

PERFORM kursdifferenz_bznk_rechnen
"N980402

USING
"N980402

b_waflg
"N980402

CHANGING
"N980402

lv_kudif_bnk.
"N980402

betrag = fracht - xzcxcb-dmbtr.

100
3
ENDIF.

fracht = betrag.

IF ( mseg-shkzg = h AND NOT mseg-kzzug


IS INITIAL ) OR

1
NOT b-waflg IS INITIAL.

1
NOT b_waflg IS INITIAL.
"N980402

105
3
xzcxcb-dmbtr = 0 - xzcxcb-dmbtr.

ENDIF.

DATA xleit. CLEAR xleit.

5
IF ( yekbnk_cr-kwert > 0 AND b-waflg I
S INITIAL ) OR

( yekbnk_cr-kwert < 0 AND NOT b-waf


lg IS INITIAL ).

xleit = k.

ELSEIF ( yekbnk_cr-kwert < 0 AND b-waf


lg IS INITIAL ) OR

( yekbnk_cr-kwert > 0 AND NOT b


-waflg IS INITIAL ).

5
IF ( yekbnk_cr-kwert > 0 AND b_waflg I
S INITIAL ) OR
"N980402

( yekbnk_cr-kwert < 0 AND NOT b_waf


lg IS INITIAL ). "N980402

xleit = k.

ELSEIF ( yekbnk_cr-kwert < 0 AND b_waf


lg IS INITIAL ) OR"N980402

( yekbnk_cr-kwert > 0 AND NOT b


_waflg IS INITIAL )."N980402

140
3
APPEND xzcxcb.

PA.

COLLECT XZCXCB-VORSL INTO GT_VORSL_F


"note 990492

ENDIF.

1
ENDLOOP.

8
* Begin N980402

PERFORM kursdifferenz_bznk_generieren

USING lv_kudif_bnk

b_waflg.

* accumulate the kdm amounts for all condi


tions which belong to the PO item

kudif_bnk = kudif_bnk + lv_kudif_bnk.

* END N980402

ENDLOOP.

2
FORM
CHECK_FREIGHT_PO_ACCT
1
16
3
ELSE.

O_PURCHASE_ACCT = SPACE.

ENDIF.

3
ENDFORM.

* end

of
note 990492

*eject

ENDFORM.
_PO_ACCT

1
"CHECK_FREIGHT

2
FORM
KURSDIFFERENZ_BZNK_GENERIEREN
1
1
0
0
43
* end

of
note 990492

*eject

*Begin N980402 WP140949

*eject

*&--------------------------------------------------------------------*

*&
n

Form kursdifferenz_bznk_generiere

*&--------------------------------------------------------------------*

*
Create posting lines for exchange
rate differences (KDM)

*
in table XZCXCB for planned delive
ry cost

*---------------------------------------------------------------------*

FORM kursdifferenz_bznk_generieren

USING

uv_kudif_bnk LIKE bseg-dmbtr

uv_waflg

DATA:

TYPE c.

lv_index TYPE syindex.

xzcxcb-stunr = yekbnk-stunr.

xzcxcb-zaehk = yekbnk-zaehk.

xzcxcb-xauto = x.

xzcxcb-lifnr = yekbnk-lifnr.

IF uv_waflg IS INITIAL.

xzcxcb-dmbtr = uv_kudif_bnk.

ELSEIF uv_waflg = 'X'.

xzcxcb-dmbtr = 0 - uv_kudif_bnk.

ENDIF.

IF betrag > maximum OR betrag < minimum.

MESSAGE e302 WITH 'BEZUGSNEBENKOSTEN_R


ECHNEN' 'FRACHT'.

ENDIF.

PERFORM shkzg_setzen USING xzcxcb-dmbtr


xzcxcb-shkzg space space.

xzcxcb-waers = yekbnk_cr-waers.

xzcxcb-vorsl = vorsl_kdm.

xzcxcb-bewtp = buzid_p.

xzcxcb-kschl = yekbnk-kschl.

xzcxcb-bustw = bustw_bnkr.

xzcxcb-curtp = yekbnk_cr-curtp.

APPEND xzcxcb.

ENDFORM.
z_bznk_generieren

" kursdifferen

2
FORM
KURSDIFFERENZ_BZNK_RECHNEN
1
1
0
0
98
*&--------------------------------------------------------------------*

*&

Form kursdifferenz_bznk_rechnen

*&--------------------------------------------------------------------*

*
calculate exchange rate difference
s for planned delivery cost

*---------------------------------------------------------------------*

FORM kursdifferenz_bznk_rechnen

USING

lf_waflg TYPE c
sue/WA04

"goods is

CHANGING

cv_kudif_bnk TYPE dmbtr.


exchange rate difference

"memorize

DATA: cs_bnkdm00 TYPE ty_bnkdm.

CHECK: yekbnk-bewtp NE 'C'.


for konv-kruek = 'X'

IF yekbnk_cr-curtp = curtp00.

"no KDM

* memorise delivery costs for transactio


n currency in gt_bnkdm

* to calculate the exchange rate differe


nce

MOVE-CORRESPONDING yekbnk_cr TO cs_bnk


dm00.

* see form wertesperrtab_ekbn_pruefen

cs_bnkdm00-frwwr = xekbn-frwwr.

* Use 'betrag' as TYPE f to avoid roundi


ng differences

IF xzcxcb-dmbtr > 0 AND NOT vm07m-ret


po = 'X'.

cs_bnkdm00-bnbtr = betrag.

ELSE.

cs_bnkdm00-bnbtr = 0 - betrag.

ENDIF.

APPEND cs_bnkdm00 TO gt_bnkdm.

CLEAR

cs_bnkdm00.

ELSE.

* read corresponding data of the transac


tion currency

READ TABLE gt_bnkdm

WITH KEY ebeln = yekbnk_cr-ebeln

ebelp = yekbnk_cr-ebelp

stunr = yekbnk_cr-stunr

zaehk = yekbnk_cr-zaehk

curtp = curtp00

INTO cs_bnkdm00.

* Calculate the exchange rate difference a


mount regarding the actual

* exchange rate;

* in case of goods receipt and goods issue


.

IF gf_kdm_active_im = 'X' AND vm07m-xs


tor NE '2'

AND ( gf_return_delivery NE 'X' OR


lf_waflg = 'X' ) .

* First translation of the condition value


to avoid rounding

* differences due to partial goods receipt


(wemng >= remng)

CLEAR fw_betrag.

IF we_re_menge GE 0.

betrag = cs_bnkdm00-kwert.

PERFORM wa04_currency

USING

betrag

fw_betrag

ycurtp-kurst

ycurtp-curdt

vm07m-bwaer

yekbnk_cr-waers

space.

ENDIF.

*exchange rate difference only, if IR


> GR before or after

*the posting or direct difference (fi


rst condition)

IF fw_betrag
wert OR

we_re_menge

NE yekbnk_cr-k

LT 0

OR

we_re_menge_final LT 0.

betrag = cs_bnkdm00-bnbtr.

PERFORM wa04_currency

USING

betrag

fw_betrag

ycurtp-kurst

ycurtp-curdt

vm07m-bwaer

yekbnk_cr-waers

space.

cv_kudif_bnk = fw_betrag.

cv_kudif_bnk = cv_kudif_bnk - xzcx


cb-dmbtr.

ENDIF.

* Calculate the exchange rate difference a


mount regarding the average

* exchange rate of previous goods receipts


;

* in case of return delivery.

ELSEIF gf_kdm_active_im = 'X' AND vm07


m-xstor NE '2'

AND gf_return_delivery = 'X'.

cv_kudif_bnk = cs_bnkdm00-bnbtr * ye
kbnk_cr-frwwr /

cs_bnkdm00-frwwr - xz
cxcb-dmbtr.

* Use the exchange rate difference amount


of the cancellation document which

* was calculated as kudif_bnk during the p


osting of GR

ELSEIF gf_kdm_active_im = 'X' AND vm07

m-xstor = '2'.

cv_kudif_bnk = yekbnk_cr-kudif.

ENDIF.

ENDIF.

ENDFORM.
z_bznk_rechnen

*eject

*End N980402

LIMU
REPS
LMBGBFSU
00007
LIMU
REPS
LMBGBFSU

" kursdifferen

00000
36
1
\\\\\no_empty_blocks/////
1
\\\\\comments_not_ignored/////
1
\\\\\delta_normalized/////
3
\\\\\allowed/////
FORM
*
3
\\\\\allowed/////
FUNCTION
*
3
\\\\\allowed/////
MODULE
**
3
\\\\\allowed/////
REPORT
*
3
\\\\\allowed/////
PROGRAM
*
3
\\\\\allowed/////
FUNCTION-POOL
*
4
\\\\\allowed/////
CLASS
*
DEFINITION
4
\\\\\allowed/////
CLASS
*
IMPLEMENTATION
5
\\\\\forbidden/////
CLASS
*
DEFINITION
DEFERRED
5
\\\\\forbidden/////
CLASS
*
DEFINITION
LOAD
6
\\\\\forbidden/////
CLASS

*
DEFINITION
LOCAL
FRIENDS
3
\\\\\allowed/////
AT
LINE-SELECTION
3
\\\\\allowed/////
AT
USER-COMMAND
4
\\\\\allowed/////
AT
SELECTION-SCREEN
**
3
\\\\\allowed/////
AT
PF*
2
\\\\\allowed/////
INITIALIZATION
2
\\\\\allowed/////
START-OF-SELECTION
2
\\\\\allowed/////
END-OF-SELECTION
3
\\\\\allowed/////
TOP-OF-PAGE
**
2
\\\\\allowed/////
END-OF-PAGE
3
\\\\\allowed/////
GET
**
3
\\\\\forbidden/////
GET
BADI
3
\\\\\forbidden/////
GET
BIT
3
\\\\\forbidden/////
GET
CONNECTION
3
\\\\\forbidden/////
GET
CURSOR
3
\\\\\forbidden/////
GET

DATASET
3
\\\\\forbidden/////
GET
LOCALE
3
\\\\\forbidden/////
GET
PARAMETER
3
\\\\\forbidden/////
GET
PF-STATUS
3
\\\\\forbidden/////
GET
PROPERTY
3
\\\\\forbidden/////
GET
REFERENCE
3
\\\\\forbidden/////
GET
RUN
3
\\\\\forbidden/////
GET
TIME
3
2
FORM
FELDER_INIT
3
20
3
exbualt, exalt,

salk3, salkv, lbkum, vmsal, vmsav


, vmkum, bualt, buaum,

umsal, umlbk, umsav, umvsa, umvku


, umvsv, umbua, umbum,

1
fracht, lbwert, exwrt, umexw, ver
brauch.

3
fracht, lbwert, exwrt, umexw, ver
brauch,

gf_kdm_active_im, kudif_bnk.
"N980402

24
3
IF ycurtp-curtm = curtp00.

CLEAR: x_fwdif, x_shfwdif, vwere00.

umwae = mseg-waers.

1
ELSEIF ycurtp-umwae IS INITIAL.

2
CLEAR gt_bnkdm.

"N980402

ELSEIF ycurtp-umwae IS INITIAL.

48
3
shkzk = s.

ENDIF.

PERFORM jv_crp_fields_init.

ENHANCEMENT-POINT FELDER_INIT_01 SPOTS ES_


SAPLMBGB.

PERFORM check_t169p.

"N980402

PERFORM check_return_delivery.
"N980402

ENHANCEMENT-POINT felder_init_01 SPOTS es_


saplmbgb.

2
FORM
KALKULATIONSNUMMER_ERMITTELN
1
30
7
CALL FUNCTION 'CKMS_KALNR_GET'

EXPORTING

if_ckmlkalnr
wa

IMPORTING

= kalnr_

einzelkalkulationsnummer

= kalnr

erzeugniskalkulationsnummer = kaln1.

ENDFORM.
ummer_ermitteln

"kalkulationsn

1
*eject

0
2
FORM
CHECK_T169P
1
1
0
0
32
*eject

* Begin N980402

*&--------------------------------------------------------------------*

*&

Form check_t169p

*&--------------------------------------------------------------------*

text

*---------------------------------------------------------------------*

* --> p1

text

* <-- p2

text

*---------------------------------------------------------------------*

FORM check_t169p.

* check customizing settings in transactio


n OMRW

-> Table T169P

IF NOT t169p-bukrs = mseg-bukrs OR t169p


-bukrs IS INITIAL.

SELECT SINGLE * FROM t169p WHERE bukrs


= mseg-bukrs.

IF NOT sy-subrc IS INITIAL.

MESSAGE e001 WITH '169P' mseg-bukrs.

ENDIF.

ENDIF.

IF ycurtp-curtp = curtp10.

gf_kdm_active_im = t169p-kdhw.

ELSEIF ycurtp-curtp = t169p-ctml1.

gf_kdm_active_im = t169p-kdml1.

ELSEIF ycurtp-curtp = t169p-ctml2.

gf_kdm_active_im = t169p-kdml2.

ENDIF.

ENDFORM.

" check_t169p

* End N980402

LIMU
REPS
LMBGBFWE
00007
LIMU
REPS
LMBGBFWE
00000
36
1
\\\\\no_empty_blocks/////
1
\\\\\comments_not_ignored/////
1
\\\\\delta_normalized/////
3
\\\\\allowed/////
FORM
*
3
\\\\\allowed/////
FUNCTION
*
3
\\\\\allowed/////
MODULE
**
3
\\\\\allowed/////

REPORT
*
3
\\\\\allowed/////
PROGRAM
*
3
\\\\\allowed/////
FUNCTION-POOL
*
4
\\\\\allowed/////
CLASS
*
DEFINITION
4
\\\\\allowed/////
CLASS
*
IMPLEMENTATION
5
\\\\\forbidden/////
CLASS
*
DEFINITION
DEFERRED
5
\\\\\forbidden/////
CLASS
*
DEFINITION
LOAD
6
\\\\\forbidden/////
CLASS
*
DEFINITION
LOCAL
FRIENDS
3
\\\\\allowed/////
AT
LINE-SELECTION
3
\\\\\allowed/////
AT
USER-COMMAND
4
\\\\\allowed/////
AT
SELECTION-SCREEN
**
3
\\\\\allowed/////
AT
PF*
2
\\\\\allowed/////
INITIALIZATION
2

\\\\\allowed/////
START-OF-SELECTION
2
\\\\\allowed/////
END-OF-SELECTION
3
\\\\\allowed/////
TOP-OF-PAGE
**
2
\\\\\allowed/////
END-OF-PAGE
3
\\\\\allowed/////
GET
**
3
\\\\\forbidden/////
GET
BADI
3
\\\\\forbidden/////
GET
BIT
3
\\\\\forbidden/////
GET
CONNECTION
3
\\\\\forbidden/////
GET
CURSOR
3
\\\\\forbidden/////
GET
DATASET
3
\\\\\forbidden/////
GET
LOCALE
3
\\\\\forbidden/////
GET
PARAMETER
3
\\\\\forbidden/////
GET
PF-STATUS
3
\\\\\forbidden/////
GET
PROPERTY
3
\\\\\forbidden/////
GET
REFERENCE
3
\\\\\forbidden/////
GET
RUN

3
\\\\\forbidden/////
GET
TIME
4
2
FORM
WE01_RECHNEN
9
41
5
PERFORM were_betrag USING xekws-netwr

xekws-wwmng

xekws-wewrt

remng

xekws-rewrt.

1
exwrt = betrag.

PERFORM handle_return_delivery
"N980402

CHANGING betrag.
"N980402

exwrt = betrag.

45
3
IF ycurtp-curtm = curtp00.

vwere00 = vwere.

netwr00 = xekws-netwr.

1
ELSEIF t169p-xplcu IS INITIAL AND

2
wewrt00 = yebefu_cr-wewrt.
"N980402

ELSEIF t169p-xplcu IS INITIAL AND

65
4
ENDIF.

*exchange rate difference only, if IR


> GR before or after

*the posting or direct difference (fi


rst condition)

IF fw_betrag NE xekws-netwr OR we_re


_menge LT 0

1
OR we_re_menge_final LT 0.

2
OR we_re_menge_final LT 0 AND

gf_return_delivery NE 'X'.
"N980402

76
3
space.

kudif = fw_betrag.

kudif = kudif - vwere.

4
ELSE.

CLEAR kudif.

ENDIF.

ENDIF.

38
* Begin N980402

ELSEIF fw_betrag
etwr OR

we_re_menge

NE xekws-n

LT 0

OR

we_re_menge_final LT 0
AND

gf_return_delivery = 'X'.

*
Exchange rate difference for return
deliveries

kudif = vwere00 * yebefu_cr-wewrt


/

wewrt00 - vwere.

* End N980402

IF ycurtp-curtp = curtp10.

dm07m-kudif = kudif.

ENDIF.

ELSE.

CLEAR kudif.

ENDIF.

ENDIF.

* Begin N980402

IF gf_kdm_active_im = 'X' AND gf_retur


n_delivery NE 'X'.

* Cancellation: Use the original exchange


rate difference value.

* which was calculated as kudif during the


posting of GR

IF vm07m-xstor = '2'.

kudif = yebefu_cr-kudif.

ENDIF.

* dm07m-kudif contains the exchange rate d


ifference for curtp = 10.

* It shall only be filled if f_kdm_active_


im = 'X'.

* Otherwise the PO-History will be updated


incorrect.

* The PO-History will be updated with the


calculated value kudif

* before the form shkzg_setzen change the


value kudif

* otherwise the document cancellation cann


ot use the original value

* of the exhcnange rate differnce

IF ycurtp-curtm = curtp10.

dm07m-kudif = kudif.

ENDIF.

exwrt = exwrt - kudif - kudif_bnk.

ENDIF.

* End N980402

105
3
IF vm07m-mlmaa IS INITIAL AND dm07mxlbpd IS INITIAL.

verbr = 0 - bestd - kudif.

ELSE.

1
prdif = fracht + lbwert - vwere -

bestd - kudif.

1
prdif = fracht + lbwert - vwere bestd - kudif - kudif_bnk."N980402

116
3
ELSE.

*
PRD includes FRE for purchase accoun
t (note 184770)

IF dm07m-xefre EQ x AND mseg-gjahr G


E dm07m-efrej.

1
prdif = fracht - vwere - bestd - k
udif.

1
prdif = fracht - vwere - bestd - k
udif - kudif_bnk. "N980402

120
3
PRD without FRE for purchace account

ELSE.

IF dm07m-xeink IS INITIAL OR msegvprsv = v.

1
prdif = fracht - vwere - bestd kudif.

1
prdif = fracht - vwere - bestd kudif - kudif_bnk."N980402

159
3
PERFORM shkzg_setzen USING bestd shbes
td mseg-wertu l.

PERFORM shkzg_setzen USING vwere shvwe


re space space.

PERFORM shkzg_setzen USING prdif shprd


if space space.

2
PERFORM shkzg_setzen USING kudif shkud
if space space.

IF w-mb IS INITIAL.

1
IF w-mb IS INITIAL.

183
3
zekbe_cr-waers = ycurtp-waers.

zekbe_cr-shkzg = shvwere.

zekbe_cr-wrbtr = vwere.

2
APPEND zekbe_cr.

ENDIF.

19
* attention the calculated value kudif wil
l be update in ekbe

* and in mlbecr, it is needed for cancella


tion, it can happen

* that the shkzg for kudif in ekbe, mlbecr


and in bseg are

* not conform to each other, if you need c


orrect value

* which was posted go to bseg

IF gf_kdm_active_im = 'X'.
"N980402

zekbe_cr-kudif = kudif.
"N980402

ENDIF.
"N980402

APPEND zekbe_cr.

ENDIF.

* N980402

* FORM shkzg_setzen changes the value of K


UDIF always to positive

* that's why the form will be called when


the value was saved in PO

* history (zekbe_cr-kudif), it will be nee


ded for MBST.

* in the ekbe / ekbz and mlbecr the value


kudif should be

* considered without the shkzg, if you nee


d the correct data

* with value and shkzg then use bseg,

PERFORM shkzg_setzen USING kudif shkudif


space space.

2
FORM
WE06_RECHNEN
3
24
5
PERFORM were_betrag USING xekws-netw
r

xekws-wwmn
g

xekws-wewr
t

remn
g

xekws-rewr
t.

6
END-ENHANCEMENT-SECTION.

verbr = betrag.

ENDIF.

IF NOT dm07m-xbnsb IS INITIAL.

verbr = verbr - fracht.

ENDIF.

89
verbr = betrag.

END-ENHANCEMENT-SECTION.

* Begin N980402

PERFORM handle_return_delivery

CHANGING betrag.

verbr = betrag.

IF ycurtp-curtm = curtp00.

vwere00 = vwere.

netwr00 = xekws-netwr.

wewrt00 = yebefu_cr-wewrt.

ENDIF.

IF gf_kdm_active_im = 'X'.

IF xekws-kdiff_tp IS INITIAL

AN

D NOT

yebefu_cr-waers = vm07m-bwaer AN
D NOT

vwere00

IS INITIAL.

* First translation of the purchase order


value to avoid rounding

* differences due to partial goods receipt


(wemng >= remng)

CLEAR fw_betrag.

IF we_re_menge GE 0.

betrag = netwr00.

PERFORM wa04_currency

USING

betrag

fw_betrag

ycurtp-kurst

ycurtp-curdt

vm07m-bwaer

yebefu_cr-waers

space.

ENDIF.

*exchange rate difference only, if IR


> GR before or after

*the posting or direct difference (fi


rst condition)

IF fw_betrag

NE xekws-n

etwr OR

we_re_menge

LT 0

OR

we_re_menge_final LT 0
AND

gf_return_delivery NE 'X'.

betrag = vwere00.

PERFORM wa04_currency

USING

betrag

fw_betrag

ycurtp-kurst

ycurtp-curdt

vm07m-bwaer

yebefu_cr-waers

space.

kudif = fw_betrag.

kudif = kudif - vwere.

ELSEIF fw_betrag
ws-netwr OR

we_re_menge

NE xek

LT 0

OR

we_re_menge_final LT 0
AND

gf_return_delivery = 'X'.

*
Exchange rate difference for return
deliveries

kudif = vwere00 * yebefu_cr-we


wrt /

wewrt00 - vwere.

IF ycurtp-curtm = curtp10.

dm07m-kudif = kudif.

ENDIF.

ELSE.

CLEAR kudif.

ENDIF.

ENDIF.

* Cancellation: Use the original exchange


rate difference value

* which was calculated as kudif during the


posting of GR

IF vm07m-xstor = zwei.

kudif = yebefu_cr-kudif.

ENDIF.

*
dm07m-kudif contains the exchange ra
te difference for curtp = 10.

*
It shall only be filled if gf_kdm_ac
tive_im = 'X'.

Otherwise the PO-History will be upd

ated incorrect.

*
The PO-History must be updated with
the correct algebraic sign,

*
otherwise the document cancellation
cannot use the original value

of the exchange rate differnce

IF ycurtp-curtp = curtp10.

dm07m-kudif = kudif.

ENDIF.

ENDIF.

* End N980402

ENDIF.

IF NOT dm07m-xbnsb IS INITIAL.

verbr = verbr - fracht - kudif_bnk.


"N980402

ELSE.
"N980402

verbr = verbr - kudif - kudif_bnk.


"N980402

ENDIF.

68
3

zekbe_cr-waers = ycurtp-waers.

zekbe_cr-shkzg = shvwere.

zekbe_cr-wrbtr = vwere.

1
APPEND zekbe_cr.

10
* N980402

* attention the calculated value kudif wil


l be update in ekbe

* and in mlbecr, it is needed for cancella


tion, it can happen

* that the shkzg for kudif in ekbe, mlbecr


and in bseg are

* not conform to each other, if you need c


orrect value go to bseg

IF gf_kdm_active_im = 'X'.
"N980402

zekbe_cr-kudif = kudif.
"N980402

ENDIF.
"N980402

APPEND zekbe_cr.

79
3
zaufbe_cr-wrbtr = verbr.

APPEND zaufbe_cr.

ENDIF.

ENDFORM.

"WE06_RECHNEN

*eject

12

* N980402

* FORM shkzg_setzen changes the value of K


UDIF always to positive

* and set accordingly the shkzg that's why


the form will be called

* when the value was saved in PO history (


zekbe_cr-kudif),

* it will be needed for MBST as original v


alue

* in the ekbe / ekbz and mlbecr the value


kudif should be

* considered without the shkzg, if you nee


d the correct data

* with value and shkzg then use bseg,

PERFORM shkzg_setzen USING kudif shkudif


space space.

ENDFORM.

"WE06_RECHNEN

2
FORM
CHECK_RETURN_DELIVERY
1
1
0
0
28
*eject

*Begin N980402 WP140949

*&--------------------------------------------------------------------*

*&

Form check_return_delivery

*&--------------------------------------------------------------------*

*
The handling of exchange rate diff
erence and the calculation

*
of the stock value is differnt fro
m the normal logic if the

*
customizing in OMRW is set (gf_kdm
_active_im = 'X'). This

*
routine checks whether the movemen
t is a return delivery

(cv_return_delivery = 'X') or not

*---------------------------------------------------------------------*

<-- CV_RETURN_DELIVERY movement is


return delviery?

*---------------------------------------------------------------------*

FORM check_return_delivery.

CHECK gf_kdm_active_im = 'X'.

IF ( mseg-shkzg = h
"Return delivery?

vm07m-retpo IS INITIAL

AND

AND

vm07m-xstor IS INITIAL ) OR

vm07m-xstor = '1'.

gf_return_delivery = 'X'.

ELSE.

CLEAR gf_return_delivery.

ENDIF.

ENDFORM.
_delivery

" check_return

2
FORM
HANDLE_RETURN_DELIVERY
1
1
0
0
45
*&--------------------------------------------------------------------*

*&

Form handle_return_delivery

*&--------------------------------------------------------------------*

* If the customizing in OMRW is set (gf_kd


m_active_im = 'X') the

* valuation of return deliveries is differ


ent. In case of return

* deliveries the stock value shall be tran


slated with the average

* exchange rate of the already posted good


s receipts. For this the

* average exchange rate of the goods recei


pts has to be calculated

* using YEBFU_CR-WEWRT for the needed curr


encies, e.g.:

* average exchange rate = YEBEFU_CR-WEWR


T(curtp = 10) /

*
T(curtp = 00)

YEBEFU_CR-WEWR

* With this average exchange rate the exte


rnal value EXWRT has to be

* calculated:

* EXWRT = EXWRT(curtp = 00) * AVG_EXCHAN


GE_RATE_GR

*---------------------------------------------------------------------*

--> UV_RETURN_DELIVERY movement is


return delivery?

*
<-- CV_BETRAG
ted external value

new calcula

*---------------------------------------------------------------------*

FORM handle_return_delivery

CHANGING

cv_betrag

TYPE f.

CHECK gf_kdm_active_im

= 'X'.

CHECK gf_return_delivery = 'X'.

IF ycurtp-curtp NE curtp00.

* vwere00 is calculated WRX value in curtp


00

* wewrt00 is sum of all posted WRX values


in curtp 00

* yebefu_cr-wewrt is sum of all posted WRX


values in curtp

* 10 and ML currencies

cv_betrag = vwere00 * yebefu_cr-wewrt


/ wewrt00.

cv_betrag = ABS( cv_betrag ).

exbualt = cv_betrag + fracht + exalt.

IF exbualt > maximum OR exbualt < mini


mum.

MESSAGE e302 WITH 'HANDLE_RETURN_DEL


IVERY' 'EXBUALT'.

ENDIF.

cv_betrag = cv_betrag + fracht + lbwer


t.

IF cv_betrag > maximum OR cv_betrag <


minimum.

MESSAGE e302 WITH 'HANDLE_RETURN_DEL


IVERY' 'BETRAG2'.

ENDIF.

ENDIF.

ENDFORM.
n_delivery

" handle_retur

*End N980402 WP140949

LIMU
REPS
LMBGBTOP
00007
LIMU
REPS
LMBGBTOP
00000
36
1
\\\\\no_empty_blocks/////
1
\\\\\comments_ignored/////
1
\\\\\delta_normalized/////

3
\\\\\allowed/////
FORM
*
3
\\\\\allowed/////
FUNCTION
*
3
\\\\\allowed/////
MODULE
**
3
\\\\\allowed/////
REPORT
*
3
\\\\\allowed/////
PROGRAM
*
3
\\\\\allowed/////
FUNCTION-POOL
*
4
\\\\\allowed/////
CLASS
*
DEFINITION
4
\\\\\allowed/////
CLASS
*
IMPLEMENTATION
5
\\\\\forbidden/////
CLASS
*
DEFINITION
DEFERRED
5
\\\\\forbidden/////
CLASS
*
DEFINITION
LOAD
6
\\\\\forbidden/////
CLASS
*
DEFINITION
LOCAL
FRIENDS
3
\\\\\allowed/////
AT
LINE-SELECTION
3
\\\\\allowed/////
AT

USER-COMMAND
4
\\\\\allowed/////
AT
SELECTION-SCREEN
**
3
\\\\\allowed/////
AT
PF*
2
\\\\\allowed/////
INITIALIZATION
2
\\\\\allowed/////
START-OF-SELECTION
2
\\\\\allowed/////
END-OF-SELECTION
3
\\\\\allowed/////
TOP-OF-PAGE
**
2
\\\\\allowed/////
END-OF-PAGE
3
\\\\\allowed/////
GET
**
3
\\\\\forbidden/////
GET
BADI
3
\\\\\forbidden/////
GET
BIT
3
\\\\\forbidden/////
GET
CONNECTION
3
\\\\\forbidden/////
GET
CURSOR
3
\\\\\forbidden/////
GET
DATASET
3
\\\\\forbidden/////
GET
LOCALE
3
\\\\\forbidden/////
GET
PARAMETER
3
\\\\\forbidden/////

GET
PF-STATUS
3
\\\\\forbidden/////
GET
PROPERTY
3
\\\\\forbidden/////
GET
REFERENCE
3
\\\\\forbidden/////
GET
RUN
3
\\\\\forbidden/////
GET
TIME
1
2
FUNCTION-POOL
MBGB

vwere00 like prdif,


E/RE in Transaktionswhr

netwr00 like prdif,


estellnettowert in "

1
148
3
" W

" B

shkzl like mseg-shkzg,

1
shkzk like mseg-shkzg.

29
shkzk like mseg-shkzg,

* Begin N980402

gf_kdm_active_im
e, "flag from T169P

TYPE boole-bool

gf_return_delivery TYPE boole-bool


e, "flag return delivery

bnbtr00

LIKE bseg-dmbtr

wewrt00

LIKE bseg-dmbtr

kudif_bnk

like bseg-dmbtr

frkdm

LIKE bseg-dmbtr

* declarations for the calculation of exch


ange

* rate differencies for delivery costs

TYPES:

BEGIN OF ty_bnkdm,

ebeln

TYPE ebeln,

ebelp

TYPE ebelp,

stunr

TYPE stunr,

zaehk

TYPE dzaehk,

curtp

TYPE curtp,

waers

TYPE waers,

bnbtr

TYPE f,

frwwr

TYPE f,

kwert

type kwert,

END OF ty_bnkdm,

tt_bnkdm TYPE TABLE OF ty_bnkdm.

DATA:

gt_bnkdm TYPE tt_bnkdm.

*End N980402

LIMU
REPS
LMLCCS_UPDATEF02
00003
LIMU
REPS
LMLCCS_UPDATEF02
00000
36
1
\\\\\no_empty_blocks/////
1
\\\\\comments_not_ignored/////
1
\\\\\delta_normalized/////
3
\\\\\allowed/////
FORM
*
3
\\\\\allowed/////
FUNCTION
*
3
\\\\\allowed/////
MODULE
**
3
\\\\\allowed/////
REPORT
*
3
\\\\\allowed/////
PROGRAM

*
3
\\\\\allowed/////
FUNCTION-POOL
*
4
\\\\\allowed/////
CLASS
*
DEFINITION
4
\\\\\allowed/////
CLASS
*
IMPLEMENTATION
5
\\\\\forbidden/////
CLASS
*
DEFINITION
DEFERRED
5
\\\\\forbidden/////
CLASS
*
DEFINITION
LOAD
6
\\\\\forbidden/////
CLASS
*
DEFINITION
LOCAL
FRIENDS
3
\\\\\allowed/////
AT
LINE-SELECTION
3
\\\\\allowed/////
AT
USER-COMMAND
4
\\\\\allowed/////
AT
SELECTION-SCREEN
**
3
\\\\\allowed/////
AT
PF*
2
\\\\\allowed/////
INITIALIZATION
2
\\\\\allowed/////
START-OF-SELECTION
2
\\\\\allowed/////
END-OF-SELECTION

3
\\\\\allowed/////
TOP-OF-PAGE
**
2
\\\\\allowed/////
END-OF-PAGE
3
\\\\\allowed/////
GET
**
3
\\\\\forbidden/////
GET
BADI
3
\\\\\forbidden/////
GET
BIT
3
\\\\\forbidden/////
GET
CONNECTION
3
\\\\\forbidden/////
GET
CURSOR
3
\\\\\forbidden/////
GET
DATASET
3
\\\\\forbidden/////
GET
LOCALE
3
\\\\\forbidden/////
GET
PARAMETER
3
\\\\\forbidden/////
GET
PF-STATUS
3
\\\\\forbidden/////
GET
PROPERTY
3
\\\\\forbidden/////
GET
REFERENCE
3
\\\\\forbidden/////
GET
RUN
3
\\\\\forbidden/////
GET
TIME
1

3
CLASS
LCL_GD
IMPLEMENTATION
1
1541
3
ed_sum = ed_sum +

ls_ckmlcr-zukdm_o + ls
_ckmlcr-vpkdm_o.

1
*

error case

7
* Begin N980402

statistical exchange differences

WHEN ccs00_mlcct-kdmsl_st.

ed_sum = ed_sum +

ls_ckmlcr-zukdm_ost +
ls_ckmlcr-vpkdm_ost.

* End N980402

error case

LIMU
REPS
LMLCCS_UPDATEF13
00001
LIMU
REPS
LMLCCS_UPDATEF13
00000
36
1
\\\\\no_empty_blocks/////
1
\\\\\comments_not_ignored/////
1
\\\\\delta_normalized/////
3
\\\\\allowed/////
FORM
*
3
\\\\\allowed/////
FUNCTION
*
3
\\\\\allowed/////
MODULE

**
3
\\\\\allowed/////
REPORT
*
3
\\\\\allowed/////
PROGRAM
*
3
\\\\\allowed/////
FUNCTION-POOL
*
4
\\\\\allowed/////
CLASS
*
DEFINITION
4
\\\\\allowed/////
CLASS
*
IMPLEMENTATION
5
\\\\\forbidden/////
CLASS
*
DEFINITION
DEFERRED
5
\\\\\forbidden/////
CLASS
*
DEFINITION
LOAD
6
\\\\\forbidden/////
CLASS
*
DEFINITION
LOCAL
FRIENDS
3
\\\\\allowed/////
AT
LINE-SELECTION
3
\\\\\allowed/////
AT
USER-COMMAND
4
\\\\\allowed/////
AT
SELECTION-SCREEN
**
3
\\\\\allowed/////
AT
PF*
2

\\\\\allowed/////
INITIALIZATION
2
\\\\\allowed/////
START-OF-SELECTION
2
\\\\\allowed/////
END-OF-SELECTION
3
\\\\\allowed/////
TOP-OF-PAGE
**
2
\\\\\allowed/////
END-OF-PAGE
3
\\\\\allowed/////
GET
**
3
\\\\\forbidden/////
GET
BADI
3
\\\\\forbidden/////
GET
BIT
3
\\\\\forbidden/////
GET
CONNECTION
3
\\\\\forbidden/////
GET
CURSOR
3
\\\\\forbidden/////
GET
DATASET
3
\\\\\forbidden/////
GET
LOCALE
3
\\\\\forbidden/////
GET
PARAMETER
3
\\\\\forbidden/////
GET
PF-STATUS
3
\\\\\forbidden/////
GET
PROPERTY
3
\\\\\forbidden/////
GET
REFERENCE
3

\\\\\forbidden/////
GET
RUN
3
\\\\\forbidden/////
GET
TIME
1
3
CLASS
LCL_BUSINESS_ORDER
IMPLEMENTATION
2
264
3
id_elesm = ld_layershema.

ls_kdm_delta to buffer.

1
call method lcl_tool=>vector_to_bu
ffer

2
IF is_cty-xkudif IS INITIAL.
"N980402

call method lcl_tool=>vector_to_


buffer

272

7
exporting

id_keart = id_keart

is_player = is_player

is_cty

= is_cty

is_vector = ls_kdm_delta

id_mlcct = ccs00_mlcct-kdmsl

id_elesm = ld_layershema.

11
ELSE.

"N980402

buffer

CALL METHOD lcl_tool=>vector_to_


"N980402

EXPORTING
"N980402

id_keart = id_keart
"N980402

is_player = is_player
"N980402

is_cty
= is_cty
"N980402

is_vector = ls_kdm_delta
"N980402

l_st

id_mlcct = ccs00_mlcct-kdms
"N980402

id_elesm = ld_layershema.
"N980402

ENDIF.
"N980402

LIMU
REPS
LMLCCS_UPDATEF20
00001
LIMU
REPS
LMLCCS_UPDATEF20
00000
36
1
\\\\\no_empty_blocks/////
1
\\\\\comments_not_ignored/////
1
\\\\\delta_normalized/////
3
\\\\\allowed/////
FORM
*
3
\\\\\allowed/////
FUNCTION
*
3
\\\\\allowed/////
MODULE
**
3
\\\\\allowed/////
REPORT
*
3
\\\\\allowed/////
PROGRAM
*
3

\\\\\allowed/////
FUNCTION-POOL
*
4
\\\\\allowed/////
CLASS
*
DEFINITION
4
\\\\\allowed/////
CLASS
*
IMPLEMENTATION
5
\\\\\forbidden/////
CLASS
*
DEFINITION
DEFERRED
5
\\\\\forbidden/////
CLASS
*
DEFINITION
LOAD
6
\\\\\forbidden/////
CLASS
*
DEFINITION
LOCAL
FRIENDS
3
\\\\\allowed/////
AT
LINE-SELECTION
3
\\\\\allowed/////
AT
USER-COMMAND
4
\\\\\allowed/////
AT
SELECTION-SCREEN
**
3
\\\\\allowed/////
AT
PF*
2
\\\\\allowed/////
INITIALIZATION
2
\\\\\allowed/////
START-OF-SELECTION
2
\\\\\allowed/////
END-OF-SELECTION
3
\\\\\allowed/////

TOP-OF-PAGE
**
2
\\\\\allowed/////
END-OF-PAGE
3
\\\\\allowed/////
GET
**
3
\\\\\forbidden/////
GET
BADI
3
\\\\\forbidden/////
GET
BIT
3
\\\\\forbidden/////
GET
CONNECTION
3
\\\\\forbidden/////
GET
CURSOR
3
\\\\\forbidden/////
GET
DATASET
3
\\\\\forbidden/////
GET
LOCALE
3
\\\\\forbidden/////
GET
PARAMETER
3
\\\\\forbidden/////
GET
PF-STATUS
3
\\\\\forbidden/////
GET
PROPERTY
3
\\\\\forbidden/////
GET
REFERENCE
3
\\\\\forbidden/////
GET
RUN
3
\\\\\forbidden/////
GET
TIME
1
3
CLASS

LCL_BUSINESS_INVOICE
IMPLEMENTATION
2
247
3
id_elesm = ld_layershema.

ls_kdm_delta to buffer.

1
CALL METHOD lcl_tool=>vector_to_bu
ffer

2
IF is_cty-xkudif IS INITIAL.
"N980402

CALL METHOD lcl_tool=>vector_to_


buffer

255
7
EXPORTING

id_keart = id_keart

is_player = is_player

is_cty

= is_cty

is_vector = ls_kdm_vector

id_mlcct = ccs00_mlcct-kdmsl

id_elesm = ld_layershema.

11
ELSE.
"N980402

buffer

CALL METHOD lcl_tool=>vector_to_


"N980402

EXPORTING
"N980402

id_keart = id_keart
"N980402

is_player = is_player
"N980402

is_cty
= is_cty
"N980402

is_vector = ls_kdm_vector
"N980402

id_mlcct = ccs00_mlcct-kdms
"N980402

l_st

id_elesm = ld_layershema.
"N980402

ENDIF.
"N980402

LIMU
REPS
LMR1MF5W
00014
LIMU
REPS
LMR1MF5W
00000
36
1
\\\\\no_empty_blocks/////
1
\\\\\comments_not_ignored/////
1
\\\\\delta_normalized/////
3
\\\\\allowed/////
FORM
*
3
\\\\\allowed/////
FUNCTION
*
3
\\\\\allowed/////
MODULE
**
3
\\\\\allowed/////
REPORT
*
3
\\\\\allowed/////
PROGRAM
*
3
\\\\\allowed/////
FUNCTION-POOL
*
4
\\\\\allowed/////
CLASS
*
DEFINITION
4
\\\\\allowed/////

CLASS
*
IMPLEMENTATION
5
\\\\\forbidden/////
CLASS
*
DEFINITION
DEFERRED
5
\\\\\forbidden/////
CLASS
*
DEFINITION
LOAD
6
\\\\\forbidden/////
CLASS
*
DEFINITION
LOCAL
FRIENDS
3
\\\\\allowed/////
AT
LINE-SELECTION
3
\\\\\allowed/////
AT
USER-COMMAND
4
\\\\\allowed/////
AT
SELECTION-SCREEN
**
3
\\\\\allowed/////
AT
PF*
2
\\\\\allowed/////
INITIALIZATION
2
\\\\\allowed/////
START-OF-SELECTION
2
\\\\\allowed/////
END-OF-SELECTION
3
\\\\\allowed/////
TOP-OF-PAGE
**
2
\\\\\allowed/////
END-OF-PAGE
3
\\\\\allowed/////
GET
**
3

\\\\\forbidden/////
GET
BADI
3
\\\\\forbidden/////
GET
BIT
3
\\\\\forbidden/////
GET
CONNECTION
3
\\\\\forbidden/////
GET
CURSOR
3
\\\\\forbidden/////
GET
DATASET
3
\\\\\forbidden/////
GET
LOCALE
3
\\\\\forbidden/////
GET
PARAMETER
3
\\\\\forbidden/////
GET
PF-STATUS
3
\\\\\forbidden/////
GET
PROPERTY
3
\\\\\forbidden/////
GET
REFERENCE
3
\\\\\forbidden/////
GET
RUN
3
\\\\\forbidden/////
GET
TIME
1
2
FORM
DRSEG_COMPLETE
7
40
3
s_ek08bn_flat

TYPE ek08bn,

s_rseg

TYPE rseg,

s_rbco

TYPE rbco,

s_eksel

TYPE eksel.

s_eksel

TYPE eksel,

s_ekbe_key

TYPE ekbe_key_doc
"N980402

ument.

139
4
ENDIF.

IF NOT ( i_trtyp = c_trtyp_a AND f_f


ast_display = c_x ).

1
IF s_drseg-pstyp EQ f_service AND
NOT s_drseg-webre IS INITIAL.

9
* Begin N980402

* At document cancellation fill document k


ey to get the exchange

* rate difference values of the original d


ocument from PO history

IF i_trtyp = c_trtyp_c.

MOVE-CORRESPONDING s_drseg TO s_
ekbe_key.

ENDIF.

* End N980402

IF s_drseg-pstyp EQ f_service AND


NOT s_drseg-webre IS INITIAL.

lfbnr

155
3
= s_drseg-lfbn

lfgja

= s_drseg-lfgj

lfpos

= s_drseg-lfpo

1
TABLES

2
i_ekbe_key
= s_ekbe_key
"N980402

TABLES

178
8
CALL FUNCTION 'ME_READ_ITEM_INVO
ICE'

EXPORTING

display

= f_display

ebelp

= s_drseg-ebel

iekko

= s_ekko

re_kursf

= i_rbkpv-kurs

re_waers

= i_rbkpv-waer

re_wwert

= i_rbkpv-buda

1
TABLES

2
i_ekbe_key
= s_ekbe_key
"N980402

TABLES

lfbnr

203
3
= s_drseg-lfbn

lfgja

= s_drseg-lfgj

lfpos

= s_drseg-lfpo

1
TABLES

2
i_ekbe_key

= s_ekbe_key

"N980402

TABLES

338
7
MOVE: s1_ek08rn-bsmng TO s_c
o-bsmng,

s1_ek08rn-netwr TO s_c
o-netwr,

s1_ek08rn-remng TO s_c
o-remng,

s1_ek08rn-bprem TO s_c
o-bprem,

s1_ek08rn-rewwr TO s_c
o-rewwr,

s1_ek08rn-refwr TO s_c
o-refwr,

s1_ek08rn-wemng TO s_c
o-wemng,

1
s1_ek08rn-bpwem TO s_c
o-bpwem.

5
s1_ek08rn-bpwem TO s_c
o-bpwem,

o-wewwr,

s1_ek08rn-wewwr TO s_c
"N980402

o-wewrb,

s1_ek08rn-wewrb TO s_c
"N980402

o-rewrb,

s1_ek08rn-rewrb TO s_c
"N980402

o-arewb.

s1_ek08rn-arewb TO s_c
"N980402

542
3
ENDIF.

MOVE-CORRESPONDING s_ek08bn TO s_ek


08bn_flat. " move without CR

MOVE-CORRESPONDING s_ek08bn_flat T
O s_drseg.

MOVE-CORRESPONDING s_rseg

1
TO s_d

rseg.

2
s_drseg-bwaer = s_ek08bn-bewae.
"N980402

MOVE-CORRESPONDING s_rseg

TO s_d

rseg.

LIMU
REPS
LMRMDF0H
00009
LIMU
REPS
LMRMDF0H
00000
36
1
\\\\\no_empty_blocks/////
1
\\\\\comments_not_ignored/////
1
\\\\\delta_normalized/////
3
\\\\\allowed/////
FORM

*
3
\\\\\allowed/////
FUNCTION
*
3
\\\\\allowed/////
MODULE
**
3
\\\\\allowed/////
REPORT
*
3
\\\\\allowed/////
PROGRAM
*
3
\\\\\allowed/////
FUNCTION-POOL
*
4
\\\\\allowed/////
CLASS
*
DEFINITION
4
\\\\\allowed/////
CLASS
*
IMPLEMENTATION
5
\\\\\forbidden/////
CLASS
*
DEFINITION
DEFERRED
5
\\\\\forbidden/////
CLASS
*
DEFINITION
LOAD
6
\\\\\forbidden/////
CLASS
*
DEFINITION
LOCAL
FRIENDS
3
\\\\\allowed/////
AT
LINE-SELECTION
3
\\\\\allowed/////
AT
USER-COMMAND
4
\\\\\allowed/////

AT
SELECTION-SCREEN
**
3
\\\\\allowed/////
AT
PF*
2
\\\\\allowed/////
INITIALIZATION
2
\\\\\allowed/////
START-OF-SELECTION
2
\\\\\allowed/////
END-OF-SELECTION
3
\\\\\allowed/////
TOP-OF-PAGE
**
2
\\\\\allowed/////
END-OF-PAGE
3
\\\\\allowed/////
GET
**
3
\\\\\forbidden/////
GET
BADI
3
\\\\\forbidden/////
GET
BIT
3
\\\\\forbidden/////
GET
CONNECTION
3
\\\\\forbidden/////
GET
CURSOR
3
\\\\\forbidden/////
GET
DATASET
3
\\\\\forbidden/////
GET
LOCALE
3
\\\\\forbidden/////
GET
PARAMETER
3
\\\\\forbidden/////
GET
PF-STATUS
3

\\\\\forbidden/////
GET
PROPERTY
3
\\\\\forbidden/////
GET
REFERENCE
3
\\\\\forbidden/////
GET
RUN
3
\\\\\forbidden/////
GET
TIME
1
2
FORM
T_DRSEG_AUFBAUEN_PRUEFEN_1
1
142
3
IF xek08rnc-kufix = 'X'.

i_rbkpv-wwert = xek08rnc-bedat.

ENDIF.

1
t_drseg-bwaer = xek08rnc-waers.

2
* the field bewae has the currency of the
PO
"N980402

t_drseg-bwaer = xek08rnc-bewae.

"N980402

LIMU
REPS
LMRMHF0A
00022
LIMU
REPS
LMRMHF0A
00000
36
1
\\\\\no_empty_blocks/////
1
\\\\\comments_not_ignored/////
1
\\\\\delta_normalized/////
3
\\\\\allowed/////
FORM
*
3
\\\\\allowed/////
FUNCTION
*
3
\\\\\allowed/////
MODULE
**
3
\\\\\allowed/////
REPORT
*
3
\\\\\allowed/////
PROGRAM
*
3
\\\\\allowed/////
FUNCTION-POOL
*
4
\\\\\allowed/////
CLASS
*
DEFINITION
4
\\\\\allowed/////

CLASS
*
IMPLEMENTATION
5
\\\\\forbidden/////
CLASS
*
DEFINITION
DEFERRED
5
\\\\\forbidden/////
CLASS
*
DEFINITION
LOAD
6
\\\\\forbidden/////
CLASS
*
DEFINITION
LOCAL
FRIENDS
3
\\\\\allowed/////
AT
LINE-SELECTION
3
\\\\\allowed/////
AT
USER-COMMAND
4
\\\\\allowed/////
AT
SELECTION-SCREEN
**
3
\\\\\allowed/////
AT
PF*
2
\\\\\allowed/////
INITIALIZATION
2
\\\\\allowed/////
START-OF-SELECTION
2
\\\\\allowed/////
END-OF-SELECTION
3
\\\\\allowed/////
TOP-OF-PAGE
**
2
\\\\\allowed/////
END-OF-PAGE
3
\\\\\allowed/////
GET
**
3

\\\\\forbidden/////
GET
BADI
3
\\\\\forbidden/////
GET
BIT
3
\\\\\forbidden/////
GET
CONNECTION
3
\\\\\forbidden/////
GET
CURSOR
3
\\\\\forbidden/////
GET
DATASET
3
\\\\\forbidden/////
GET
LOCALE
3
\\\\\forbidden/////
GET
PARAMETER
3
\\\\\forbidden/////
GET
PF-STATUS
3
\\\\\forbidden/////
GET
PROPERTY
3
\\\\\forbidden/////
GET
REFERENCE
3
\\\\\forbidden/////
GET
RUN
3
\\\\\forbidden/////
GET
TIME
1
2
FORM
MRM_DRSEG_FILL

f_shkzg

7
63
3
TYPE shkzg,

s_sako

LIKE xsako,

f_cond

TYPE i,

s_cond_cobl_mrm

1
TYPE cobl_mrm

s_cond_cobl_mrm

2
TYPE cobl_mrm

s_ekbe_key
TYPE ekbe_key
_document.
"N980402

198
3
ENHANCEMENT-POINT mrm_drseg_fill_08 SPOTS
es_saplmrmh.

ENHANCEMENT-POINT mrm_drseg_fill_09 SPOTS


es_saplmrmh.

1
*----- Daten der Input-Tabelle --------------------------------------*

9
* Begin N980402

* In case of IV-cancellation transfer docu


ment number to reading FM.

IF i_rbkpv-ivtyp = c_ivtyp_storno.

MOVE i_rbkpv-stjah TO s_ekbe_key-gjahr


.

MOVE i_rbkpv-stblg TO s_ekbe_key-belnr


.

ENDIF.

* End N980402

*----- Daten der Input-Tabelle --------------------------------------*

222
7
CALL FUNCTION 'ME_READ_ITEM_INVOIC
E'

EXPORTING

ebelp

= s_frseg-ebelp

iekko

= f_ekko

re_kursf

= i_rbkpv-kursf

re_waers

= i_rbkpv-waers

re_wwert

= i_rbkpv-budat

1
TABLES

2
i_ekbe_key
= s_ekbe_key
"N980402

TABLES

re_kursf

530
3
= i_rbkpv-kurs

re_waers

= i_rbkpv-waer

re_wwert

= i_rbkpv-buda

1
TABLES

2
i_ekbe_key

= s_ekbe_key

"N980402

TABLES

re_kursf

549
3
= i_rbkpv-kurs

re_waers

= i_rbkpv-waer

re_wwert

= i_rbkpv-buda

1
TABLES

2
i_ekbe_key
= s_ekbe_key
"N980402

TABLES

579

re_kursf

3
= i_rbkpv-kurs

re_waers

= i_rbkpv-waer

re_wwert

= i_rbkpv-buda

1
TABLES

2
i_ekbe_key
= s_ekbe_key
"N980402

TABLES

re_kursf

598
3
= i_rbkpv-kurs

re_waers

= i_rbkpv-waer

re_wwert

= i_rbkpv-buda

1
TABLES

2
i_ekbe_key
= s_ekbe_key
"N980402

TABLES

LIMU
REPS
LMRMPF0T
00013
LIMU
REPS
LMRMPF0T
00000
36
1
\\\\\no_empty_blocks/////
1
\\\\\comments_ignored/////
1
\\\\\delta_normalized/////
3
\\\\\allowed/////
FORM
*
3
\\\\\allowed/////

FUNCTION
*
3
\\\\\allowed/////
MODULE
**
3
\\\\\allowed/////
REPORT
*
3
\\\\\allowed/////
PROGRAM
*
3
\\\\\allowed/////
FUNCTION-POOL
*
4
\\\\\allowed/////
CLASS
*
DEFINITION
4
\\\\\allowed/////
CLASS
*
IMPLEMENTATION
5
\\\\\forbidden/////
CLASS
*
DEFINITION
DEFERRED
5
\\\\\forbidden/////
CLASS
*
DEFINITION
LOAD
6
\\\\\forbidden/////
CLASS
*
DEFINITION
LOCAL
FRIENDS
3
\\\\\allowed/////
AT
LINE-SELECTION
3
\\\\\allowed/////
AT
USER-COMMAND
4
\\\\\allowed/////
AT
SELECTION-SCREEN
**

3
\\\\\allowed/////
AT
PF*
2
\\\\\allowed/////
INITIALIZATION
2
\\\\\allowed/////
START-OF-SELECTION
2
\\\\\allowed/////
END-OF-SELECTION
3
\\\\\allowed/////
TOP-OF-PAGE
**
2
\\\\\allowed/////
END-OF-PAGE
3
\\\\\allowed/////
GET
**
3
\\\\\forbidden/////
GET
BADI
3
\\\\\forbidden/////
GET
BIT
3
\\\\\forbidden/////
GET
CONNECTION
3
\\\\\forbidden/////
GET
CURSOR
3
\\\\\forbidden/////
GET
DATASET
3
\\\\\forbidden/////
GET
LOCALE
3
\\\\\forbidden/////
GET
PARAMETER
3
\\\\\forbidden/////
GET
PF-STATUS
3
\\\\\forbidden/////
GET
PROPERTY

3
\\\\\forbidden/////
GET
REFERENCE
3
\\\\\forbidden/////
GET
RUN
3
\\\\\forbidden/////
GET
TIME
1
2
FORM
EKBZ_AUFBAUEN

IF ydrseg_cr-curtp = '10' OR
auswhrung

2
107
4
" H

( ydrseg_cr-curtp = '00' AND pi_rbkpv


-waers = pi_drseg-hswae ).

MOVE: ydrseg_cr-dmbtr
z-reewr,

TO ptx_ekb

ydrseg_cr-arewr_neu TO ptx_ekb
z-arewr,

1
ydrseg_cr-basis_dm TO ptx_ekb
z-dmbtr.

2
ydrseg_cr-basis_dm TO ptx_ekb
z-dmbtr,

z-kudif.

ydrseg_cr-kudif_neu TO ptx_ekb
"N980402

MOVE: ydrseg_cr-curtp
z_cr-curtp,

122
5
TO ptx_ekb

ydrseg_cr-waers

TO ptx_ekb

pi_drseg-shkzg

TO ptx_ekb

ydrseg_cr-dmbtr

TO ptx_ekb

z_cr-waers,

z_cr-shkzg,

z_cr-reewr,

ydrseg_cr-arewr_neu TO ptx_ekb
z_cr-arewr,

1
ydrseg_cr-basis_dm TO ptx_ekb
z_cr-wrbtr.

3
ydrseg_cr-basis_dm TO ptx_ekb
z_cr-wrbtr,

z_cr-kudif.

ydrseg_cr-kudif_neu TO ptx_ekb
"N980402

LIMU
REPS
LMRMPF0U
00014
LIMU
REPS
LMRMPF0U
00000
36
1
\\\\\no_empty_blocks/////
1
\\\\\comments_ignored/////
1
\\\\\delta_normalized/////
3
\\\\\allowed/////
FORM
*
3
\\\\\allowed/////
FUNCTION
*
3
\\\\\allowed/////
MODULE
**
3
\\\\\allowed/////
REPORT
*
3
\\\\\allowed/////
PROGRAM
*

3
\\\\\allowed/////
FUNCTION-POOL
*
4
\\\\\allowed/////
CLASS
*
DEFINITION
4
\\\\\allowed/////
CLASS
*
IMPLEMENTATION
5
\\\\\forbidden/////
CLASS
*
DEFINITION
DEFERRED
5
\\\\\forbidden/////
CLASS
*
DEFINITION
LOAD
6
\\\\\forbidden/////
CLASS
*
DEFINITION
LOCAL
FRIENDS
3
\\\\\allowed/////
AT
LINE-SELECTION
3
\\\\\allowed/////
AT
USER-COMMAND
4
\\\\\allowed/////
AT
SELECTION-SCREEN
**
3
\\\\\allowed/////
AT
PF*
2
\\\\\allowed/////
INITIALIZATION
2
\\\\\allowed/////
START-OF-SELECTION
2
\\\\\allowed/////
END-OF-SELECTION
3

\\\\\allowed/////
TOP-OF-PAGE
**
2
\\\\\allowed/////
END-OF-PAGE
3
\\\\\allowed/////
GET
**
3
\\\\\forbidden/////
GET
BADI
3
\\\\\forbidden/////
GET
BIT
3
\\\\\forbidden/////
GET
CONNECTION
3
\\\\\forbidden/////
GET
CURSOR
3
\\\\\forbidden/////
GET
DATASET
3
\\\\\forbidden/////
GET
LOCALE
3
\\\\\forbidden/////
GET
PARAMETER
3
\\\\\forbidden/////
GET
PF-STATUS
3
\\\\\forbidden/////
GET
PROPERTY
3
\\\\\forbidden/////
GET
REFERENCE
3
\\\\\forbidden/////
GET
RUN
3
\\\\\forbidden/////
GET
TIME
1
2

FORM
EKBE_AUFBAUEN

IF ydrseg_cr-curtp = '10' OR
auswhrung

2
131
5
" H

( ydrseg_cr-curtp = '00' AND

pi_rbkpv-waers = pi_drseg-hswae ).

MOVE: ydrseg_cr-dmbtr
e-reewr,

TO ptx_ekb

ydrseg_cr-arewr_neu TO ptx_ekb
e-arewr,

1
ydrseg_cr-basis_dm TO ptx_ekb
e-dmbtr.

2
ydrseg_cr-basis_dm TO ptx_ekb
e-dmbtr,

be-kudif.

ydrseg_cr-kudif_neu TO ptx_ek
"N980402

MOVE: ydrseg_cr-curtp
cr-curtp,

145
5
TO ptx_ekbe_

ydrseg_cr-waers

TO ptx_ekbe_

pi_drseg-shkzg

TO ptx_ekbe_

ydrseg_cr-dmbtr

TO ptx_ekbe_

cr-waers,

cr-shkzg,

cr-reewr,

ydrseg_cr-arewr_neu TO ptx_ekbe_
cr-arewr,

1
ydrseg_cr-basis_dm TO ptx_ekbe_
cr-wrbtr.

3
ydrseg_cr-basis_dm TO ptx_ekbe_
cr-wrbtr,

cr-kudif.

ydrseg_cr-kudif_neu TO ptx_ekbe_
"N980402

LIMU
REPS
LMRMPF1S
00011
LIMU
REPS
LMRMPF1S
00000
36
1
\\\\\no_empty_blocks/////
1
\\\\\comments_ignored/////
1
\\\\\delta_normalized/////
3
\\\\\allowed/////
FORM
*
3
\\\\\allowed/////
FUNCTION
*
3
\\\\\allowed/////
MODULE
**
3
\\\\\allowed/////
REPORT
*
3
\\\\\allowed/////
PROGRAM
*
3
\\\\\allowed/////
FUNCTION-POOL
*
4
\\\\\allowed/////
CLASS

*
DEFINITION
4
\\\\\allowed/////
CLASS
*
IMPLEMENTATION
5
\\\\\forbidden/////
CLASS
*
DEFINITION
DEFERRED
5
\\\\\forbidden/////
CLASS
*
DEFINITION
LOAD
6
\\\\\forbidden/////
CLASS
*
DEFINITION
LOCAL
FRIENDS
3
\\\\\allowed/////
AT
LINE-SELECTION
3
\\\\\allowed/////
AT
USER-COMMAND
4
\\\\\allowed/////
AT
SELECTION-SCREEN
**
3
\\\\\allowed/////
AT
PF*
2
\\\\\allowed/////
INITIALIZATION
2
\\\\\allowed/////
START-OF-SELECTION
2
\\\\\allowed/////
END-OF-SELECTION
3
\\\\\allowed/////
TOP-OF-PAGE
**
2
\\\\\allowed/////
END-OF-PAGE
3

\\\\\allowed/////
GET
**
3
\\\\\forbidden/////
GET
BADI
3
\\\\\forbidden/////
GET
BIT
3
\\\\\forbidden/////
GET
CONNECTION
3
\\\\\forbidden/////
GET
CURSOR
3
\\\\\forbidden/////
GET
DATASET
3
\\\\\forbidden/////
GET
LOCALE
3
\\\\\forbidden/////
GET
PARAMETER
3
\\\\\forbidden/////
GET
PF-STATUS
3
\\\\\forbidden/////
GET
PROPERTY
3
\\\\\forbidden/////
GET
REFERENCE
3
\\\\\forbidden/////
GET
RUN
3
\\\\\forbidden/////
GET
TIME
1
2
FORM
ZEILE_GENERIEREN
8
27
3
DATA: h_matnr
LIKE drseg-matnr,
" Hilfsfeld wg. Wertartikel

betrag_fw LIKE drseg-wrbtr,


" Hilfsfeld,

l_pabw_fw LIKE x169c-dmbtr,


" Preisabweichung in Belegwh

1
f_koart

LIKE drseg-koart.

f_koart

LIKE drseg-koart,

ls_t169p

TYPE t169p.
"N980402

MOVE: px_drseg-mat_kdauf
beln,

px_drseg-mat_kdpos

61
3
TO sgnbu-v

TO sgnbu-p

osnr,

pi_rbkpv-budat
t,

TO sgnbu-repda

1
px_drseg-mat_pspnr TO sgnbu-pspnr.

2
pi_rbkpv-ivtyp
TO sgnbu-ivtyp
"N980402

px_drseg-mat_pspnr TO sgnbu-pspnr.

82
4
MOVE: ydrseg_cr-waers TO sgnbu-pwaer,

ydrseg_cr-curtp TO sgnbu-curtp,

ydrseg_cr-arewr TO sgnbu-arewr,

ydrseg_cr-rewrt TO sgnbu-rewrt,

1
ydrseg_cr-wewrt TO sgnbu-wewrt.

2
ydrseg_cr-wewrt TO sgnbu-wewrt,

ydrseg_cr-kudif TO sgnbu-kudif.
"N980402

94
3
IF pi_rbkpv-waers = px_drseg-hswae.

ydrseg_cr-dmbtr = px_drseg-wrbtr.

ELSE.

1
CALL FUNCTION 'CONVERT_TO_LOCAL_CU
RRENCY'

24
IF pi_rbkpv-ivtyp = c_ivtyp_storno
.

READ TABLE t_currencies WITH KEY


bukrs = px_drseg-bukrs

curtp = ydrseg_cr-curtp.

* to get exact the same amounts as during


the posting of invoice

* the original wwert and kursf should be f


illed here

CALL FUNCTION 'CONVERT_TO_LOCAL_


CURRENCY'

EXPORTING

date

= t_currenc

foreign_amount

= px_drseg-

ies-datum

wrbtr

foreign_currency = pi_rbkpvwaers

local_currency

= px_drseg-

rate

= px_drseg-

hswae

kursf

IMPORTING

local_amount

= ydrseg_cr

-dmbtr

EXCEPTIONS

error_message

= 01

OTHERS

= 02.

IF sy-subrc <> 0.

MESSAGE ID sy-msgid TYPE sy-ms

gty NUMBER sy-msgno

WITH sy-msgv1 sy-msgv2 sy-m


sgv3 sy-msgv4

RAISING currency_error.

ENDIF.

ELSE.

CALL FUNCTION 'CONVERT_TO_LOCAL_


CURRENCY'

110
3
MESSAGE ID sy-msgid TYPE sy-msgt
y NUMBER sy-msgno

WITH sy-msgv1 sy-msgv2 sy-msg


v3 sy-msgv4

RAISING currency_error.

3
ENDIF.

ENDIF.

px_drseg-dmbtr = ydrseg_cr-dmbtr.

4
ENDIF.

ENDIF.

ENDIF.

px_drseg-dmbtr = ydrseg_cr-dmbtr.

215
4
CALL FUNCTION 'MR_POSTING_GENERATE'

EXPORTING

i_bustw

= px_drseg-bustw

i_sgnbu

= sgnbu

1
TABLES

3
IMPORTING
"N980402

e_t169p

= ls_t169p
"N980402

TABLES

236
5
PERFORM strukt_material_preisabw TABLE
x169c

USING
pi_rbkpv pi_xnullpos

ydrseg_cr

CHANG
ING l_pabw_fw px_drseg.

2
*------- Whrung, AWEWR modifizieren, KTOS
L setzen
------------*

LOOP AT x169c WHERE bustw = px_drseg-b


ustw AND

*------- Whrung, AWEWR modifizieren, KTOS


L setzen
------------*

* Initialize the new exchange rate diffe


rence value.
"N980402

ydrseg_cr-kudif_neu = 0.
"N980402

LOOP AT x169c WHERE bustw = px_drseg-b


ustw AND

260
3
ENDIF.

IF x169c_cr-vorsl IS INITIAL.

MESSAGE e434.

3
ENDIF.

MOVE: ydrseg_cr-curtp TO x169c_cr-cu


rtp,

22
ENDIF.

* Begin N980402

* Transfer the new calculated exchange rat


e difference value to

* the PO history with sign, if exchange ra


te difference handling

* is active for the actual currency type.

IF x169c-vorsl = 'KDM' AND

( ( ydrseg_cr-curtp = ls_t169p-ct
hw AND

ls_t169p-kdhw IS NOT INITIAL


)

OR

( ydrseg_cr-curtp = ls_t169p-ct
ml1 AND

ls_t169p-kdml1 IS NOT INITIAL


) OR

( ydrseg_cr-curtp = ls_t169p-ct
ml2 AND

ls_t169p-kdml2 IS NOT INITIAL


) ).

IF x169c-shkzg = px_drseg-shkzg.

ydrseg_cr-kudif_neu = x169c-dmbt
r.

ELSE.

ydrseg_cr-kudif_neu = 0 - x169cdmbtr.

ENDIF.

ENDIF.

* End N980402

MOVE: ydrseg_cr-curtp TO x169c_cr-cu


rtp,

LIMU
REPS
LMRMPF1Y
00029
LIMU
REPS

LMRMPF1Y
00000
36
1
\\\\\no_empty_blocks/////
1
\\\\\comments_not_ignored/////
1
\\\\\delta_normalized/////
3
\\\\\allowed/////
FORM
*
3
\\\\\allowed/////
FUNCTION
*
3
\\\\\allowed/////
MODULE
**
3
\\\\\allowed/////
REPORT
*
3
\\\\\allowed/////
PROGRAM
*
3
\\\\\allowed/////
FUNCTION-POOL
*
4
\\\\\allowed/////
CLASS
*
DEFINITION
4
\\\\\allowed/////
CLASS
*
IMPLEMENTATION
5
\\\\\forbidden/////
CLASS
*
DEFINITION
DEFERRED
5
\\\\\forbidden/////
CLASS
*
DEFINITION
LOAD
6

\\\\\forbidden/////
CLASS
*
DEFINITION
LOCAL
FRIENDS
3
\\\\\allowed/////
AT
LINE-SELECTION
3
\\\\\allowed/////
AT
USER-COMMAND
4
\\\\\allowed/////
AT
SELECTION-SCREEN
**
3
\\\\\allowed/////
AT
PF*
2
\\\\\allowed/////
INITIALIZATION
2
\\\\\allowed/////
START-OF-SELECTION
2
\\\\\allowed/////
END-OF-SELECTION
3
\\\\\allowed/////
TOP-OF-PAGE
**
2
\\\\\allowed/////
END-OF-PAGE
3
\\\\\allowed/////
GET
**
3
\\\\\forbidden/////
GET
BADI
3
\\\\\forbidden/////
GET
BIT
3
\\\\\forbidden/////
GET
CONNECTION
3
\\\\\forbidden/////
GET
CURSOR
3

\\\\\forbidden/////
GET
DATASET
3
\\\\\forbidden/////
GET
LOCALE
3
\\\\\forbidden/////
GET
PARAMETER
3
\\\\\forbidden/////
GET
PF-STATUS
3
\\\\\forbidden/////
GET
PROPERTY
3
\\\\\forbidden/////
GET
REFERENCE
3
\\\\\forbidden/////
GET
RUN
3
\\\\\forbidden/////
GET
TIME
1
2
FORM
ACCIT_AUFBAUEN
4
35
3
s_t001

LIKE t001,

s_xsako

LIKE xsako,

f_idx

TYPE cnt02,

s_bset

LIKE bset.

s_bset

LIKE bset,

f_komok(3) TYPE c.
"N980402

240
3
MOVE pi_drseg-ebeln TO wrxmod-ebeln.

MOVE pi_drseg-ebelp TO wrxmod-ebelp.

ENHANCEMENT-POINT accit_aufbauen_03 SPOTS


es_saplmrmp.

CALL FUNCTION 'MR_ACCOUNT_ASSIGNMENT


'

34

CLEAR f_komok.
"N980402

IF ptx_accit-ktosl = 'KDM'.
"N980402

IF NOT pi_drseg-knttp IS INITIAL.


"N980402

f_komok = 'ERA'.
"N980402

ELSE.
"N980402

f_komok = 'ERN'.
"N980402

ENDIF.
"N980402

ENDIF.
"N980402

CALL FUNCTION 'MR_ACCOUNT_ASSIGNMENT


'

EXPORTING

bewertungsklasse

= pi_drse

bewertung_modif

= pi_drse

kontenplan

= pi_drse

konto_modif
"N980402

= f_komok

g-bklas

g-bwmod

g-ktopl

soll_haben_kennzeichen = x169c_c
r-shkzg

vorgangsschluessel

= x169c_c

i_wrxmod

= wrxmod

is_enhancement
mr_account_assignment"IS2ERP

= ls_isi_

r-vorsl

IMPORTING

buchungsschluessel

= ptx_acc

konto

= xkonto

it-bschl

CHANGING

cs_enhancement
mr_account_assignment"IS2ERP

= ls_isc_

EXCEPTIONS

error_message

= 01

OTHERS

= 02.

* Begin N980402

* read the setting for KDM without komok i


f there is no entry with komok

IF sy-subrc <> 0 AND ptx_accit-ktosl


= 'KDM'.

CLEAR f_komok.

CALL FUNCTION 'MR_ACCOUNT_ASSIGNME

NT'

246
4
EXPORTING

bewertungsklasse

= pi_drse

bewertung_modif

= pi_drse

kontenplan

= pi_drse

konto_modif

= '

g-bklas

g-bwmod

g-ktopl

ok

konto_modif
"N980402

'

1
= f_kom

259
3
EXCEPTIONS

error_message

= 01

OTHERS

= 02.

1
ENHANCEMENT-POINT accit_aufbauen_04 SPOTS
es_saplmrmp.

4
ENDIF.

* End

N980402

ENHANCEMENT-POINT accit_aufbauen_04 SPOTS


es_saplmrmp.

LIMU
REPS
LOMMLF01
99997

LIMU
REPS
LOMMLF01
00000
36
1
\\\\\no_empty_blocks/////
1
\\\\\comments_not_ignored/////
1
\\\\\delta_normalized/////
3
\\\\\allowed/////
FORM
*
3
\\\\\allowed/////
FUNCTION
*
3
\\\\\allowed/////
MODULE
**
3
\\\\\allowed/////
REPORT
*
3
\\\\\allowed/////
PROGRAM
*
3
\\\\\allowed/////
FUNCTION-POOL
*
4
\\\\\allowed/////
CLASS
*
DEFINITION
4
\\\\\allowed/////
CLASS
*
IMPLEMENTATION
5
\\\\\forbidden/////
CLASS
*
DEFINITION
DEFERRED
5
\\\\\forbidden/////
CLASS
*
DEFINITION

LOAD
6
\\\\\forbidden/////
CLASS
*
DEFINITION
LOCAL
FRIENDS
3
\\\\\allowed/////
AT
LINE-SELECTION
3
\\\\\allowed/////
AT
USER-COMMAND
4
\\\\\allowed/////
AT
SELECTION-SCREEN
**
3
\\\\\allowed/////
AT
PF*
2
\\\\\allowed/////
INITIALIZATION
2
\\\\\allowed/////
START-OF-SELECTION
2
\\\\\allowed/////
END-OF-SELECTION
3
\\\\\allowed/////
TOP-OF-PAGE
**
2
\\\\\allowed/////
END-OF-PAGE
3
\\\\\allowed/////
GET
**
3
\\\\\forbidden/////
GET
BADI
3
\\\\\forbidden/////
GET
BIT
3
\\\\\forbidden/////
GET
CONNECTION
3
\\\\\forbidden/////
GET

CURSOR
3
\\\\\forbidden/////
GET
DATASET
3
\\\\\forbidden/////
GET
LOCALE
3
\\\\\forbidden/////
GET
PARAMETER
3
\\\\\forbidden/////
GET
PF-STATUS
3
\\\\\forbidden/////
GET
PROPERTY
3
\\\\\forbidden/////
GET
REFERENCE
3
\\\\\forbidden/////
GET
RUN
3
\\\\\forbidden/////
GET
TIME
1
2
FORM
CHECK_EXCHANGE_RATE
1
1
0
0
94
*---------------------------------------------------------------------*

***INCLUDE LOMMLF01 .

*---------------------------------------------------------------------*

* Begin N980402

*&--------------------------------------------------------------------*

*&

Form check_exchange_rate

*&--------------------------------------------------------------------*

text

*---------------------------------------------------------------------*

-->P_V_169P_PK_BUKRS text

*---------------------------------------------------------------------*

FORM check_exchange_rate USING p_v_169p_pk

DATA: t_curtp TYPE TABLE OF cki_ml_cty,

s_curtp TYPE cki_ml_cty,

f_lines TYPE i,

f_flag_ml1 TYPE i,

f_flag_ml2 TYPE i,

f_gesamtflags TYPE i,

f_lines_curtp TYPE i.

* Fill company currency type for transport


into database.

MOVE '10' TO v_169p_pk-cthw.

IF v_169p_pk-kdml1 = 'X' OR

v_169p_pk-kdml2 = 'X'.

CALL FUNCTION 'GET_BUKRS_ML_CURRENCY_I


NFO'

EXPORTING

i_bukrs

= v_169p_pk-

bukrs

IMPORTING

et_curtp

= t_curtp

EXCEPTIONS

wrong_input

= 1

ml_inactive

= 2

currencies_not_unique = 3.

* Fill ML currency types for transport i


nto database.

LOOP AT t_curtp INTO s_curtp.

CASE sy-tabix.

WHEN 2.

MOVE s_curtp-curtp TO v_169p_pkctml1.

WHEN 3.

MOVE s_curtp-curtp TO v_169p_pkctml2.

ENDCASE.

ENDLOOP.

IF sy-subrc NE 0.

MESSAGE ID sy-msgid TYPE sy-msgty NU


MBER sy-msgno

WITH sy-msgv1 sy-msgv2


sy-msgv3 sy-msgv4.

ELSE.

CHECK NOT v_169p_pk-xplcu IS INITIAL


.

CHECK NOT v_169p_pk-kdhw IS INITIAL.

DESCRIBE TABLE t_curtp LINES f_lines


.

CLEAR: f_flag_ml1, f_flag_ml2.

IF v_169p_pk-kdml1 = 'X'.

f_flag_ml1 = 1.

ENDIF.

IF v_169p_pk-kdml2 = 'X'.

f_flag_ml2 = 1.

ENDIF.

* Count how much flags are set and how muc


h are

* expected since not all currencies may be


active.

f_gesamtflags = f_flag_ml1 + f_flag_


ml2 + 1.

IF f_lines = f_gesamtflags.

MESSAGE e529(om).

ENDIF.

ENDIF.

ELSE.

CHECK NOT v_169p_pk-xplcu IS INITIAL.

CALL FUNCTION 'GET_BUKRS_ML_CURRENCY_I


NFO'

EXPORTING

i_bukrs

= v_169p_pk-bukrs

IMPORTING

et_curtp

= t_curtp

EXCEPTIONS

error_message = 4.

IF sy-subrc = 4.

DESCRIBE TABLE t_curtp LINES f_lines


_curtp.

IF v_169p_pk-kdhw = 'X' AND f_lines_


curtp = 0.

MESSAGE e529(om).

ENDIF.

ENDIF.

ENDIF.

ENDFORM.
ge_rate

" check_exchan

* End N980402

REPS
LOMMLF03
99997

REPS
LOMMLF03
00000
36
1
\\\\\no_empty_blocks/////
1

\\\\\comments_not_ignored/////
1
\\\\\delta_normalized/////
3
\\\\\allowed/////
FORM
*
3
\\\\\allowed/////
FUNCTION
*
3
\\\\\allowed/////
MODULE
**
3
\\\\\allowed/////
REPORT
*
3
\\\\\allowed/////
PROGRAM
*
3
\\\\\allowed/////
FUNCTION-POOL
*
4
\\\\\allowed/////
CLASS
*
DEFINITION
4
\\\\\allowed/////
CLASS
*
IMPLEMENTATION
5
\\\\\forbidden/////
CLASS
*
DEFINITION
DEFERRED
5
\\\\\forbidden/////
CLASS
*
DEFINITION
LOAD
6
\\\\\forbidden/////
CLASS
*
DEFINITION
LOCAL
FRIENDS
3
\\\\\allowed/////
AT
LINE-SELECTION

3
\\\\\allowed/////
AT
USER-COMMAND
4
\\\\\allowed/////
AT
SELECTION-SCREEN
**
3
\\\\\allowed/////
AT
PF*
2
\\\\\allowed/////
INITIALIZATION
2
\\\\\allowed/////
START-OF-SELECTION
2
\\\\\allowed/////
END-OF-SELECTION
3
\\\\\allowed/////
TOP-OF-PAGE
**
2
\\\\\allowed/////
END-OF-PAGE
3
\\\\\allowed/////
GET
**
3
\\\\\forbidden/////
GET
BADI
3
\\\\\forbidden/////
GET
BIT
3
\\\\\forbidden/////
GET
CONNECTION
3
\\\\\forbidden/////
GET
CURSOR
3
\\\\\forbidden/////
GET
DATASET
3
\\\\\forbidden/////
GET
LOCALE
3
\\\\\forbidden/////
GET

PARAMETER
3
\\\\\forbidden/////
GET
PF-STATUS
3
\\\\\forbidden/////
GET
PROPERTY
3
\\\\\forbidden/////
GET
REFERENCE
3
\\\\\forbidden/////
GET
RUN
3
\\\\\forbidden/////
GET
TIME
0
LIMU
REPS
LOMMLI03
99997
LIMU
REPS
LOMMLI03
00000
36
1
\\\\\no_empty_blocks/////
1
\\\\\comments_not_ignored/////
1
\\\\\delta_normalized/////
3
\\\\\allowed/////
FORM
*
3
\\\\\allowed/////
FUNCTION
*
3
\\\\\allowed/////
MODULE
**
3
\\\\\allowed/////
REPORT

*
3
\\\\\allowed/////
PROGRAM
*
3
\\\\\allowed/////
FUNCTION-POOL
*
4
\\\\\allowed/////
CLASS
*
DEFINITION
4
\\\\\allowed/////
CLASS
*
IMPLEMENTATION
5
\\\\\forbidden/////
CLASS
*
DEFINITION
DEFERRED
5
\\\\\forbidden/////
CLASS
*
DEFINITION
LOAD
6
\\\\\forbidden/////
CLASS
*
DEFINITION
LOCAL
FRIENDS
3
\\\\\allowed/////
AT
LINE-SELECTION
3
\\\\\allowed/////
AT
USER-COMMAND
4
\\\\\allowed/////
AT
SELECTION-SCREEN
**
3
\\\\\allowed/////
AT
PF*
2
\\\\\allowed/////
INITIALIZATION
2
\\\\\allowed/////

START-OF-SELECTION
2
\\\\\allowed/////
END-OF-SELECTION
3
\\\\\allowed/////
TOP-OF-PAGE
**
2
\\\\\allowed/////
END-OF-PAGE
3
\\\\\allowed/////
GET
**
3
\\\\\forbidden/////
GET
BADI
3
\\\\\forbidden/////
GET
BIT
3
\\\\\forbidden/////
GET
CONNECTION
3
\\\\\forbidden/////
GET
CURSOR
3
\\\\\forbidden/////
GET
DATASET
3
\\\\\forbidden/////
GET
LOCALE
3
\\\\\forbidden/////
GET
PARAMETER
3
\\\\\forbidden/////
GET
PF-STATUS
3
\\\\\forbidden/////
GET
PROPERTY
3
\\\\\forbidden/////
GET
REFERENCE
3
\\\\\forbidden/////
GET
RUN
3

\\\\\forbidden/////
GET
TIME
1
3
MODULE
CHECK_EXCHANGE_RATE
INPUT
1
1
0
0
15
*---------------------------------------------------------------------*

***INCLUDE LOMMLI03 .

*---------------------------------------------------------------------*

* Begin N980402

*&--------------------------------------------------------------------*

*&

Module CHECK_EXCHANGE_RATE INPUT

*&--------------------------------------------------------------------*

text

*---------------------------------------------------------------------*

MODULE check_exchange_rate INPUT.

PERFORM check_exchange_rate USING v_169p


_pk.

ENDMODULE.
E_RATE INPUT

* End N980402

LIMU
REPS

" CHECK_EXCHANG

LOMMLI04
99997
LIMU
REPS
LOMMLI04
00000
36
1
\\\\\no_empty_blocks/////
1
\\\\\comments_not_ignored/////
1
\\\\\delta_normalized/////
3
\\\\\allowed/////
FORM
*
3
\\\\\allowed/////
FUNCTION
*
3
\\\\\allowed/////
MODULE
**
3
\\\\\allowed/////
REPORT
*
3
\\\\\allowed/////
PROGRAM
*
3
\\\\\allowed/////
FUNCTION-POOL
*
4
\\\\\allowed/////
CLASS
*
DEFINITION
4
\\\\\allowed/////
CLASS
*
IMPLEMENTATION
5
\\\\\forbidden/////
CLASS
*
DEFINITION

DEFERRED
5
\\\\\forbidden/////
CLASS
*
DEFINITION
LOAD
6
\\\\\forbidden/////
CLASS
*
DEFINITION
LOCAL
FRIENDS
3
\\\\\allowed/////
AT
LINE-SELECTION
3
\\\\\allowed/////
AT
USER-COMMAND
4
\\\\\allowed/////
AT
SELECTION-SCREEN
**
3
\\\\\allowed/////
AT
PF*
2
\\\\\allowed/////
INITIALIZATION
2
\\\\\allowed/////
START-OF-SELECTION
2
\\\\\allowed/////
END-OF-SELECTION
3
\\\\\allowed/////
TOP-OF-PAGE
**
2
\\\\\allowed/////
END-OF-PAGE
3
\\\\\allowed/////
GET
**
3
\\\\\forbidden/////
GET
BADI
3
\\\\\forbidden/////
GET
BIT
3

\\\\\forbidden/////
GET
CONNECTION
3
\\\\\forbidden/////
GET
CURSOR
3
\\\\\forbidden/////
GET
DATASET
3
\\\\\forbidden/////
GET
LOCALE
3
\\\\\forbidden/////
GET
PARAMETER
3
\\\\\forbidden/////
GET
PF-STATUS
3
\\\\\forbidden/////
GET
PROPERTY
3
\\\\\forbidden/////
GET
REFERENCE
3
\\\\\forbidden/////
GET
RUN
3
\\\\\forbidden/////
GET
TIME
1
0
1
1
0
0
3
*---------------------------------------------------------------------*

***INCLUDE LOMMLI04 .

*---------------------------------------------------------------------*

LIMU
REPS
LOMMLO01
99997
LIMU
REPS
LOMMLO01
00000
36
1
\\\\\no_empty_blocks/////
1
\\\\\comments_not_ignored/////
1
\\\\\delta_normalized/////
3
\\\\\allowed/////
FORM
*
3
\\\\\allowed/////
FUNCTION
*
3
\\\\\allowed/////
MODULE
**
3
\\\\\allowed/////
REPORT
*
3
\\\\\allowed/////
PROGRAM
*
3
\\\\\allowed/////
FUNCTION-POOL
*
4
\\\\\allowed/////
CLASS
*
DEFINITION
4

\\\\\allowed/////
CLASS
*
IMPLEMENTATION
5
\\\\\forbidden/////
CLASS
*
DEFINITION
DEFERRED
5
\\\\\forbidden/////
CLASS
*
DEFINITION
LOAD
6
\\\\\forbidden/////
CLASS
*
DEFINITION
LOCAL
FRIENDS
3
\\\\\allowed/////
AT
LINE-SELECTION
3
\\\\\allowed/////
AT
USER-COMMAND
4
\\\\\allowed/////
AT
SELECTION-SCREEN
**
3
\\\\\allowed/////
AT
PF*
2
\\\\\allowed/////
INITIALIZATION
2
\\\\\allowed/////
START-OF-SELECTION
2
\\\\\allowed/////
END-OF-SELECTION
3
\\\\\allowed/////
TOP-OF-PAGE
**
2
\\\\\allowed/////
END-OF-PAGE
3
\\\\\allowed/////
GET
**

3
\\\\\forbidden/////
GET
BADI
3
\\\\\forbidden/////
GET
BIT
3
\\\\\forbidden/////
GET
CONNECTION
3
\\\\\forbidden/////
GET
CURSOR
3
\\\\\forbidden/////
GET
DATASET
3
\\\\\forbidden/////
GET
LOCALE
3
\\\\\forbidden/////
GET
PARAMETER
3
\\\\\forbidden/////
GET
PF-STATUS
3
\\\\\forbidden/////
GET
PROPERTY
3
\\\\\forbidden/////
GET
REFERENCE
3
\\\\\forbidden/////
GET
RUN
3
\\\\\forbidden/////
GET
TIME
1
3
MODULE
LIST_EXCHANGE_RATE
OUTPUT
1
1
0
0
61
* Begin N980402

*---------------------------------------------------------------------*

***INCLUDE LOMMLO01

*---------------------------------------------------------------------*

*&--------------------------------------------------------------------*

*&

Module LIST_EXCHANGE_RATE OUTPUT

*&--------------------------------------------------------------------*

text

*---------------------------------------------------------------------*

module LIST_EXCHANGE_RATE output.

DATA: lt_curtp TYPE TABLE OF cki_ml_cty,

ls_curtp TYPE cki_ml_cty,

f_counter TYPE i VALUE 0,

f_number_curtp TYPE i.

CLEAR: v_169p_pk-ctml1, v_169p_pk-ctml2.

CLEAR: lt_curtp. REFRESH: lt_curtp.

LOOP AT SCREEN.

IF ( screen-name = 'V_169P_PK-KDML1' O
R

screen-name = 'V_169P_PK-KDML2' )
.

CALL FUNCTION 'GET_BUKRS_ML_CURRENCY


_INFO'

EXPORTING

i_bukrs

IMPORTING

= v_169p_pk-bukrs

et_curtp

= lt_curtp

EXCEPTIONS

ml_inactive

= 2

error_message = 8.

IF sy-subrc = 2.

IF v_169p_pk-kdml1 IS INITIAL AND


screen-name = 'V_169P_PK-KDML1'.

screen-input = 0.

ENDIF.

IF v_169p_pk-kdml2 IS INITIAL AND


screen-name = 'V_169P_PK-KDML2'.

screen-input = 0.

ENDIF.

ELSE.

CLEAR: f_counter.

LOOP AT lt_curtp INTO ls_curtp WHE


RE curtp NE '10'.

IF f_counter = 0.

MOVE ls_curtp-curtp TO v_169p_

pk-ctml1.

ELSE.

MOVE ls_curtp-curtp TO v_169p_


pk-ctml2.

ENDIF.

f_counter = f_counter + 1.

ENDLOOP.

ENDIF.

MODIFY SCREEN.

ELSEIF screen-name = 'V_169P_PK-CTHW'.

MOVE '10' TO v_169p_pk-cthw.

MODIFY SCREEN.

ENDIF.

ENDLOOP.

endmodule.
_RATE OUTPUT

* End N980402

" LIST_EXCHANGE

LIMU
REPS
MM07MCWS
00004
LIMU
REPS
MM07MCWS
00000
36
1
\\\\\no_empty_blocks/////
1
\\\\\comments_not_ignored/////
1
\\\\\delta_normalized/////
3
\\\\\allowed/////
FORM
*
3
\\\\\allowed/////
FUNCTION
*
3
\\\\\allowed/////
MODULE
**
3
\\\\\allowed/////
REPORT
*
3
\\\\\allowed/////
PROGRAM
*
3
\\\\\allowed/////
FUNCTION-POOL
*
4
\\\\\allowed/////
CLASS
*
DEFINITION
4
\\\\\allowed/////
CLASS

*
IMPLEMENTATION
5
\\\\\forbidden/////
CLASS
*
DEFINITION
DEFERRED
5
\\\\\forbidden/////
CLASS
*
DEFINITION
LOAD
6
\\\\\forbidden/////
CLASS
*
DEFINITION
LOCAL
FRIENDS
3
\\\\\allowed/////
AT
LINE-SELECTION
3
\\\\\allowed/////
AT
USER-COMMAND
4
\\\\\allowed/////
AT
SELECTION-SCREEN
**
3
\\\\\allowed/////
AT
PF*
2
\\\\\allowed/////
INITIALIZATION
2
\\\\\allowed/////
START-OF-SELECTION
2
\\\\\allowed/////
END-OF-SELECTION
3
\\\\\allowed/////
TOP-OF-PAGE
**
2
\\\\\allowed/////
END-OF-PAGE
3
\\\\\allowed/////
GET
**
3
\\\\\forbidden/////

GET
BADI
3
\\\\\forbidden/////
GET
BIT
3
\\\\\forbidden/////
GET
CONNECTION
3
\\\\\forbidden/////
GET
CURSOR
3
\\\\\forbidden/////
GET
DATASET
3
\\\\\forbidden/////
GET
LOCALE
3
\\\\\forbidden/////
GET
PARAMETER
3
\\\\\forbidden/////
GET
PF-STATUS
3
\\\\\forbidden/////
GET
PROPERTY
3
\\\\\forbidden/////
GET
REFERENCE
3
\\\\\forbidden/////
GET
RUN
3
\\\\\forbidden/////
GET
TIME
1
0
1
168
3
VORSL_KBS LIKE T156W-VORSL VAL
UE 'KBS', "Kontierte BE-Pos.

VORSL_KON LIKE T156W-VORSL VAL


UE 'KON', "Konsignation

VORSL_PRD LIKE T156W-VORSL VAL


UE 'PRD', "Preisdifferenz

2
VORSL_WRX LIKE T156W-VORSL VAL
UE 'WRX'. "WE/RE Verrechnung

3
VORSL_WRX LIKE T156W-VORSL VAL
UE 'WRX', "WE/RE Verrechnung

VORSL_KDM LIKE T156W-VORSL VAL


UE 'KDM', "Kursdifferenz N980402

UE 'P'.

BUZID_P
"N980402

LIKE T156W-BUZID VAL

LIMU
REPS
MM07MFB7_BESTELLENTWICKLUNG_GE
00016
LIMU
REPS
MM07MFB7_BESTELLENTWICKLUNG_GE

00000
36
1
\\\\\no_empty_blocks/////
1
\\\\\comments_not_ignored/////
1
\\\\\delta_normalized/////
3
\\\\\allowed/////
FORM
*
3
\\\\\allowed/////
FUNCTION
*
3
\\\\\allowed/////
MODULE
**
3
\\\\\allowed/////
REPORT
*
3
\\\\\allowed/////
PROGRAM
*
3
\\\\\allowed/////
FUNCTION-POOL
*
4
\\\\\allowed/////
CLASS
*
DEFINITION
4
\\\\\allowed/////
CLASS
*
IMPLEMENTATION
5
\\\\\forbidden/////
CLASS
*
DEFINITION
DEFERRED
5
\\\\\forbidden/////
CLASS
*
DEFINITION
LOAD
6
\\\\\forbidden/////

CLASS
*
DEFINITION
LOCAL
FRIENDS
3
\\\\\allowed/////
AT
LINE-SELECTION
3
\\\\\allowed/////
AT
USER-COMMAND
4
\\\\\allowed/////
AT
SELECTION-SCREEN
**
3
\\\\\allowed/////
AT
PF*
2
\\\\\allowed/////
INITIALIZATION
2
\\\\\allowed/////
START-OF-SELECTION
2
\\\\\allowed/////
END-OF-SELECTION
3
\\\\\allowed/////
TOP-OF-PAGE
**
2
\\\\\allowed/////
END-OF-PAGE
3
\\\\\allowed/////
GET
**
3
\\\\\forbidden/////
GET
BADI
3
\\\\\forbidden/////
GET
BIT
3
\\\\\forbidden/////
GET
CONNECTION
3
\\\\\forbidden/////
GET
CURSOR
3
\\\\\forbidden/////

GET
DATASET
3
\\\\\forbidden/////
GET
LOCALE
3
\\\\\forbidden/////
GET
PARAMETER
3
\\\\\forbidden/////
GET
PF-STATUS
3
\\\\\forbidden/////
GET
PROPERTY
3
\\\\\forbidden/////
GET
REFERENCE
3
\\\\\forbidden/////
GET
RUN
3
\\\\\forbidden/////
GET
TIME
1
2
FORM
BESTELLENTWICKLUNG_GENERIEREN
1
59
3
XEKBE-ERNAM = XMKPF-USNAM.

XEKBE-MENGE = XMSEG-BSTMG.

XEKBE-DMBTR = XVM07M-AWEWR.

1
XEKBE-HSWAE = XMSEG-WAERS.

4
* zdm07m-kudif can only filled if exchan
ge rate
"N980402

difference handling in OMRW is active


"N980402

xekbe-kudif = zdm07m-kudif.
"N980402

XEKBE-HSWAE = XMSEG-WAERS.

LIMU
REPS
MM07MFF9_F_SEGMENTE_BEWERTEN
00005
LIMU
REPS
MM07MFF9_F_SEGMENTE_BEWERTEN
00000
36
1
\\\\\no_empty_blocks/////
1
\\\\\comments_not_ignored/////
1
\\\\\delta_normalized/////
3
\\\\\allowed/////

FORM
*
3
\\\\\allowed/////
FUNCTION
*
3
\\\\\allowed/////
MODULE
**
3
\\\\\allowed/////
REPORT
*
3
\\\\\allowed/////
PROGRAM
*
3
\\\\\allowed/////
FUNCTION-POOL
*
4
\\\\\allowed/////
CLASS
*
DEFINITION
4
\\\\\allowed/////
CLASS
*
IMPLEMENTATION
5
\\\\\forbidden/////
CLASS
*
DEFINITION
DEFERRED
5
\\\\\forbidden/////
CLASS
*
DEFINITION
LOAD
6
\\\\\forbidden/////
CLASS
*
DEFINITION
LOCAL
FRIENDS
3
\\\\\allowed/////
AT
LINE-SELECTION
3
\\\\\allowed/////
AT
USER-COMMAND
4

\\\\\allowed/////
AT
SELECTION-SCREEN
**
3
\\\\\allowed/////
AT
PF*
2
\\\\\allowed/////
INITIALIZATION
2
\\\\\allowed/////
START-OF-SELECTION
2
\\\\\allowed/////
END-OF-SELECTION
3
\\\\\allowed/////
TOP-OF-PAGE
**
2
\\\\\allowed/////
END-OF-PAGE
3
\\\\\allowed/////
GET
**
3
\\\\\forbidden/////
GET
BADI
3
\\\\\forbidden/////
GET
BIT
3
\\\\\forbidden/////
GET
CONNECTION
3
\\\\\forbidden/////
GET
CURSOR
3
\\\\\forbidden/////
GET
DATASET
3
\\\\\forbidden/////
GET
LOCALE
3
\\\\\forbidden/////
GET
PARAMETER
3
\\\\\forbidden/////
GET
PF-STATUS

3
\\\\\forbidden/////
GET
PROPERTY
3
\\\\\forbidden/////
GET
REFERENCE
3
\\\\\forbidden/////
GET
RUN
3
\\\\\forbidden/////
GET
TIME
1
2
FORM
F-SEGMENTE_BEWERTEN
3
62
3
XAUTO = X.

ENDIF.

1
ENHANCEMENT-SECTION
MM07MFF9_F_SEGMENT
E_BEWERTE_01 SPOTS ES_SAPMM07M.

ENHANCEMENT-SECTION
mm07mff9_f_segment
e_bewerte_01 SPOTS es_sapmm07m.

IF x156w-vorsl NE vorsl_kdm.
"N980402

66
3

LOOP AT XZCXCB WHERE STUNR = YEKBNK-STUNR

AND

ZAEHK = YEKBNK-ZA

AND

XAUTO = XAUTO.

EHK

AND

2
xauto = xau

AND
"N980402

vorsl NE vo

to

rsl_kdm.

86
3
APPEND YACCCR.

ENDLOOP.

14

END-ENHANCEMENT-SECTION.

IF ML10 IS INITIAL.

MESSAGE E001 WITH 'XZCXCB' YEKBNK-ST


UNR YEKBNK-ZAEHK.

ENDIF.

ENDIF.

ENDFORM.

32

IF ml10 IS INITIAL.

MESSAGE e001 WITH 'XZCXCB' yekbnkstunr yekbnk-zaehk.

ENDIF.

* Begin N980402

ELSEIF x156w-vorsl = vorsl_kdm.

LOOP AT xzcxcb WHERE stunr = yekbnkstunr

AND

zaehk = yek

AND

xauto = xau

bnk-zaehk

to

AND

vorsl = vor

sl_kdm.

MOVE-CORRESPONDING xzcxcb TO yaccc


r.

IF xzcxcb-shkzg = s.

yacccr-wrbtr = xzcxcb-dmbtr.

ELSE.

yacccr-wrbtr = 0 - xzcxcb-dmbtr.

ENDIF.

IF f-shkzg IS INITIAL.

f-shkzg = xzcxcb-shkzg.

ELSEIF ( ( f-shkzg = s AND xzcxcbshkzg = h ) OR

( f-shkzg = h AND xzcxcbshkzg = s ) ).

f-shkzg = x.

ENDIF.

APPEND yacccr.

ENDLOOP.

ENDIF.

* End N980402

END-ENHANCEMENT-SECTION.

ENDIF.

ENDFORM.
WERTEN

"F-SEGMENTE_BE

LIMU
REPS
MM07MFF9_F_SEGMENTE_ERSTELLEN
00024
LIMU
REPS
MM07MFF9_F_SEGMENTE_ERSTELLEN

00000
36
1
\\\\\no_empty_blocks/////
1
\\\\\comments_not_ignored/////
1
\\\\\delta_normalized/////
3
\\\\\allowed/////
FORM
*
3
\\\\\allowed/////
FUNCTION
*
3
\\\\\allowed/////
MODULE
**
3
\\\\\allowed/////
REPORT
*
3
\\\\\allowed/////
PROGRAM
*
3
\\\\\allowed/////
FUNCTION-POOL
*
4
\\\\\allowed/////
CLASS
*
DEFINITION
4
\\\\\allowed/////
CLASS
*
IMPLEMENTATION
5
\\\\\forbidden/////
CLASS
*
DEFINITION
DEFERRED
5
\\\\\forbidden/////
CLASS
*
DEFINITION
LOAD
6
\\\\\forbidden/////
CLASS
*

DEFINITION
LOCAL
FRIENDS
3
\\\\\allowed/////
AT
LINE-SELECTION
3
\\\\\allowed/////
AT
USER-COMMAND
4
\\\\\allowed/////
AT
SELECTION-SCREEN
**
3
\\\\\allowed/////
AT
PF*
2
\\\\\allowed/////
INITIALIZATION
2
\\\\\allowed/////
START-OF-SELECTION
2
\\\\\allowed/////
END-OF-SELECTION
3
\\\\\allowed/////
TOP-OF-PAGE
**
2
\\\\\allowed/////
END-OF-PAGE
3
\\\\\allowed/////
GET
**
3
\\\\\forbidden/////
GET
BADI
3
\\\\\forbidden/////
GET
BIT
3
\\\\\forbidden/////
GET
CONNECTION
3
\\\\\forbidden/////
GET
CURSOR
3
\\\\\forbidden/////
GET
DATASET

3
\\\\\forbidden/////
GET
LOCALE
3
\\\\\forbidden/////
GET
PARAMETER
3
\\\\\forbidden/////
GET
PF-STATUS
3
\\\\\forbidden/////
GET
PROPERTY
3
\\\\\forbidden/////
GET
REFERENCE
3
\\\\\forbidden/////
GET
RUN
3
\\\\\forbidden/////
GET
TIME
1
2
FORM
F-SEGMENTE_ERSTELLEN
6
14
3
DATA l_shkzg LIKE mseg-shkzg. CLEAR l_sh
kzg.
"HW578078

DATA: loc_bwmod LIKE dm07m-parbw.

DATA: hbnbtr like mseg-bnbtr.


"830707

1
t_index = 1.

2
DATA: f_156w_save TYPE t156w.
"N980402

t_index = 1.

325
3
DATA komok LIKE t156x-komok. CLEAR k
omok.

DATA kzvbr LIKE mseg-kzvbr. kzvbr =


zmseg-kzvbr.

rc = 2.

1
IF f-xbnk IS INITIAL.

1
IF f-xbnk IS INITIAL OR x156w-vorsl
= vorsl_kdm.
"N980402

330
3

IF x156w-vorsl = vorsl_kbs AND mse


g-kzvbr = a.

vorsl = vorsl_anl.

ENDIF.

1
ENHANCEMENT-POINT F-SEGMENTE_ERSTELLEN_08
SPOTS ES_SAPMM07M.

15
* Begin N980402

IF f-xbnk IS INITIAL AND x156w-vor


sl = vorsl_kdm.

f_156w_save = x156w.

READ TABLE x156w WITH KEY bustw


= mseg-bustw

vorsl
= vorsl_kdm.

IF NOT sy-subrc IS INITIAL.

* String is not buffered; only possible fo


r Transfers use WE01

SELECT * FROM t156w INTO x156w


WHERE bustw = 'WE01'

AND vorsl = vorsl_kdm.

EXIT.

ENDSELECT.

ENDIF.

ENDIF.

* End N980402

ENHANCEMENT-POINT f-segmente_erstellen_08
SPOTS es_sapmm07m.

382
3
xaccit-xpkon = t156x-xpkon.

komok = t156x-komok.

ENDIF.

1
IF NOT sy-subrc IS INITIAL OR t156
x-xpkon IS INITIAL.

5
IF NOT f_156w_save IS INITIAL.
"N980402

x156w = f_156w_save.
"N980402

ENDIF.
"N980402

IF NOT sy-subrc IS INITIAL OR t156


x-xpkon IS INITIAL

AND f-x
bnk IS INITIAL.

"N980402

403
3
CLEAR xaccit-fkber.
"930158

ENDIF.
"930158

ENDIF.
"930158

3
ENDIF.

ENDIF.

ELSE.

27
ENDIF.

ENDIF.

* Begin N980402

IF x156w-bustw = bustw_bnkr AND x1


56w-vorsl = vorsl_kdm.

IF zmseg-bustw = bustw_we06.

SELECT SINGLE * FROM t156x WHE


RE bwart = zmseg-bwart

AND
wertu = zmseg-wertu

AND
mengu = zmseg-mengu

AND
sobkz = zmseg-sobkz

AND
kzbew = zmseg-kzbew

AND
kzvbr = kzvbr

AND
bustw = bustw_we06

AND
cnt02 = '03'.

ELSEIF zmseg-bustw = bustw_we01.

SELECT SINGLE * FROM t156x WHE


RE bwart = zmseg-bwart

AND
wertu = zmseg-wertu

AND
mengu = zmseg-mengu

AND
sobkz = zmseg-sobkz

AND
kzbew = zmseg-kzbew

AND
kzvbr = kzvbr

AND
bustw = bustw_we01

AND
cnt02 = '04'.

ENDIF.

komok = t156x-komok.

ENDIF.

* End N980402

ELSE.

466
3
MESSAGE e001 WITH 'X156W' f-bustw.

ENDIF.

1
ENDFORM.

ENDFORM.
stellen

1
"f-segmente_er

LIMU
REPS
MM07MFF9_F_SEGMENTE_GENERIEREN

00019
LIMU
REPS
MM07MFF9_F_SEGMENTE_GENERIEREN
00000
36
1
\\\\\no_empty_blocks/////
1
\\\\\comments_not_ignored/////
1
\\\\\delta_normalized/////
3
\\\\\allowed/////
FORM
*
3
\\\\\allowed/////
FUNCTION
*
3
\\\\\allowed/////
MODULE
**
3
\\\\\allowed/////
REPORT
*
3
\\\\\allowed/////
PROGRAM
*
3
\\\\\allowed/////
FUNCTION-POOL
*
4
\\\\\allowed/////
CLASS
*
DEFINITION
4
\\\\\allowed/////
CLASS
*
IMPLEMENTATION
5
\\\\\forbidden/////
CLASS
*
DEFINITION
DEFERRED
5

\\\\\forbidden/////
CLASS
*
DEFINITION
LOAD
6
\\\\\forbidden/////
CLASS
*
DEFINITION
LOCAL
FRIENDS
3
\\\\\allowed/////
AT
LINE-SELECTION
3
\\\\\allowed/////
AT
USER-COMMAND
4
\\\\\allowed/////
AT
SELECTION-SCREEN
**
3
\\\\\allowed/////
AT
PF*
2
\\\\\allowed/////
INITIALIZATION
2
\\\\\allowed/////
START-OF-SELECTION
2
\\\\\allowed/////
END-OF-SELECTION
3
\\\\\allowed/////
TOP-OF-PAGE
**
2
\\\\\allowed/////
END-OF-PAGE
3
\\\\\allowed/////
GET
**
3
\\\\\forbidden/////
GET
BADI
3
\\\\\forbidden/////
GET
BIT
3
\\\\\forbidden/////
GET

CONNECTION
3
\\\\\forbidden/////
GET
CURSOR
3
\\\\\forbidden/////
GET
DATASET
3
\\\\\forbidden/////
GET
LOCALE
3
\\\\\forbidden/////
GET
PARAMETER
3
\\\\\forbidden/////
GET
PF-STATUS
3
\\\\\forbidden/////
GET
PROPERTY
3
\\\\\forbidden/////
GET
REFERENCE
3
\\\\\forbidden/////
GET
RUN
3
\\\\\forbidden/////
GET
TIME
1
2
FORM
F-SEGMENTE_GENERIEREN
8
20
4
ENHANCEMENT-POINT F-SEGMENTE_GENERIEREN_11
SPOTS ES_SAPMM07M STATIC.

ENHANCEMENT-POINT F-SEGMENTE_GENERIEREN_12
SPOTS ES_SAPMM07M.

1
DATA: C_KZUML LIKE DM07M-KZUML.
"495236

3
DATA: c_kzuml LIKE dm07m-kzuml,
"495236

lv_append_done,
"N980402

lv_memorise_index TYPE sytabix.


"N980402

312
6
PERFORM F-SEGMENTE_ERSTELLEN USING
XZCXCB-BUSTW

CHANG
ING

C_KZUML.

"495236

DATA ML00. CLEAR ML00.

DATA ML10. CLEAR ML10.

1
CLEAR: XEKBZ, XEKBZ_CR.

done.

1
CLEAR: xekbz, xekbz_cr, lv_append_
"N980402

320
3
ENHANCEMENT-POINT F-SEGMENTE_GENERIEREN_07
SPOTS ES_SAPMM07M.

1
IF XZCXCB-CURTP = CURTP00.

2
IF xzcxcb-curtp = curtp00 AND

xzcxcb-vorsl NE vorsl_kdm.
"N980402

324
3
XEKBZ-WRBTR = XZCXCB-DMBTR.

XEKBZ-WAERS = XZCXCB-WAERS.

ML00 = X.

1
ELSEIF XZCXCB-CURTP = CURTP10.

ELSEIF xzcxcb-curtp = curtp10 AN


D

xzcxcb-vorsl NE vorsl_kdm
"N980402

393
5
ENDIF.

*
if not zmseg-umwrk is initial a
nd not zmseg-kzzug is initial.

xekbz-waers = zmseg-waers.

endif.

ML10 = X.

1
ELSE.

16

* Begin N980402

ELSEIF xzcxcb-curtp = curtp10 AN


D

xzcxcb-vorsl = vorsl_kdm.

IF xzcxcb-shkzg = zmseg-shkzg.

xekbz-kudif = xzcxcb-dmbtr.

ELSE.

xekbz-kudif = 0 - xzcxcb-dmb
tr.

ENDIF.

* In case of stock transfer (valuated or w


ith account

* assigned) change sign because zmseg-shkz


g is reversed.

IF zdm07m-kzuml = 'X' OR NOT z


mseg-umwrk IS INITIAL.

xekbz-kudif = 0 - xekbz-kudi
f.

ENDIF.

* End SPC_980402

443
3
ENDIF.
"0439945

ENDIF.
"0439945

IF NOT HELP_EKBZ_CR IS INITIAL.


"0439945

1
XEKBZ_CR-EBELN = ZMSEG-EBELN.

2
IF xzcxcb-vorsl NE vorsl_kdm.
"N980402

xekbz_cr-ebeln = zmseg-ebeln
.

453
3
XEKBZ_CR-WAERS = XZCXCB-WAERS.

XEKBZ_CR-SHKZG = XZCXCB-SHKZG.

XEKBZ_CR-WRBTR = XZCXCB-DMBTR.

1
APPEND XEKBZ_CR.

22

* Begin N980402

lv_append_done = x.

APPEND xekbz_cr.

lv_memorise_index = sy-tabix
.

ELSEIF xzcxcb-vorsl = vorsl_kd


m.

IF xzcxcb-shkzg = zmseg-shkz
g.

xekbz_cr-kudif = xzcxcb-dm

btr.

ELSE.

xekbz_cr-kudif = 0 - xzcxc
b-dmbtr.

ENDIF.

IF zdm07m-kzuml = 'X' OR NOT


zmseg-umwrk IS INITIAL.

xekbz_cr-kudif = 0 - xekbz
_cr-kudif.

ENDIF.

IF lv_append_done = x.

MODIFY xekbz_cr INDEX lv_


memorise_index

TRANSPORTI
NG kudif.

ENDIF.

CONTINUE.

ENDIF.

* End N980402

497
4
ENHANCEMENT-POINT F-SEGMENTE_GENERIEREN_10
SPOTS ES_SAPMM07M.

ENHANCEMENT-POINT F-SEGMENTE_GENERIEREN_13
SPOTS ES_SAPMM07M.

1
ENDFORM.

ENDFORM.
NERIEREN

1
"F-SEGMENTE_GE

LIMU
REPS
RM06EKBE
00017
LIMU
REPS
RM06EKBE
00000
36
1
\\\\\no_empty_blocks/////
1
\\\\\comments_not_ignored/////
1
\\\\\delta_normalized/////
3
\\\\\allowed/////
FORM
*
3
\\\\\allowed/////
FUNCTION

*
3
\\\\\allowed/////
MODULE
**
3
\\\\\allowed/////
REPORT
*
3
\\\\\allowed/////
PROGRAM
*
3
\\\\\allowed/////
FUNCTION-POOL
*
4
\\\\\allowed/////
CLASS
*
DEFINITION
4
\\\\\allowed/////
CLASS
*
IMPLEMENTATION
5
\\\\\forbidden/////
CLASS
*
DEFINITION
DEFERRED
5
\\\\\forbidden/////
CLASS
*
DEFINITION
LOAD
6
\\\\\forbidden/////
CLASS
*
DEFINITION
LOCAL
FRIENDS
3
\\\\\allowed/////
AT
LINE-SELECTION
3
\\\\\allowed/////
AT
USER-COMMAND
4
\\\\\allowed/////
AT
SELECTION-SCREEN
**
3

\\\\\allowed/////
AT
PF*
2
\\\\\allowed/////
INITIALIZATION
2
\\\\\allowed/////
START-OF-SELECTION
2
\\\\\allowed/////
END-OF-SELECTION
3
\\\\\allowed/////
TOP-OF-PAGE
**
2
\\\\\allowed/////
END-OF-PAGE
3
\\\\\allowed/////
GET
**
3
\\\\\forbidden/////
GET
BADI
3
\\\\\forbidden/////
GET
BIT
3
\\\\\forbidden/////
GET
CONNECTION
3
\\\\\forbidden/////
GET
CURSOR
3
\\\\\forbidden/////
GET
DATASET
3
\\\\\forbidden/////
GET
LOCALE
3
\\\\\forbidden/////
GET
PARAMETER
3
\\\\\forbidden/////
GET
PF-STATUS
3
\\\\\forbidden/////
GET
PROPERTY
3

\\\\\forbidden/////
GET
REFERENCE
3
\\\\\forbidden/////
GET
RUN
3
\\\\\forbidden/////
GET
TIME
2
2
FORM
EKBE_ANALYSE
8
52
3
vekbe-wesbs = vekbe-wesbs + xekbewesbs.

vekbe-dmbtr = vekbe-dmbtr + xekbedmbtr.

vekbe-wrbtr = vekbe-wrbtr + xekbewrbtr.

2
vekbe-kudif = vekbe-kudif + xekbekudif.
"N980402

61
3
vekbe-wesbs = vekbe-wesbs - xekbewesbs.

vekbe-dmbtr = vekbe-dmbtr - xekbedmbtr.

vekbe-wrbtr = vekbe-wrbtr - xekbewrbtr.

2
vekbe-kudif = vekbe-kudif - xekbekudif.
"N980402

79
3
vekbe-arewr = vekbe-arewr + xekbearewr.

vekbe-arewr_pop = vekbe-arewr_pop
+ xekbe-arewr_pop.

vekbe-reewr = vekbe-reewr + xekbereewr.

1
IF vekbe-waers = xekbe-waers.

2
vekbe-kudif = vekbe-kudif + xekbekudif.
"N980402

IF vekbe-waers = xekbe-waers.

96
3
vekbe-arewr = vekbe-arewr - xekbearewr.

vekbe-arewr_pop = vekbe-arewr_pop
- xekbe-arewr_pop.

vekbe-reewr = vekbe-reewr - xekbereewr.

1
IF vekbe-waers = xekbe-waers.

2
vekbe-kudif = vekbe-kudif - xekbekudif.
"N980402

IF vekbe-waers = xekbe-waers.

136
3
vnbekbe-bpmng = vnbekbe-bpmng +
xekbe-bpmng.

vnbekbe-dmbtr = vnbekbe-dmbtr +
xekbe-dmbtr.

vnbekbe-reewr = vnbekbe-reewr +
xekbe-reewr.

1
IF vnbekbe-waers = xekbe-waers.

2
vnbekbe-kudif = vnbekbe-kudif +
xekbe-kudif.
"N980402

IF vnbekbe-waers = xekbe-waers.

147
3
vnbekbe-bpmng = vnbekbe-bpmng +
xekbe-bpmng.

vnbekbe-dmbtr = vnbekbe-dmbtr xekbe-dmbtr.

vnbekbe-reewr = vnbekbe-reewr xekbe-reewr.

1
IF vnbekbe-waers = xekbe-waers.

2
vnbekbe-kudif = vnbekbe-kudif xekbe-kudif.
"N980402

IF vnbekbe-waers = xekbe-waers.

164
3
vekbe-dmbtr = vekbe-dmbtr + xekbedmbtr.

vekbe-arewr = vekbe-arewr + xekbearewr.

vekbe-reewr = vekbe-reewr + xekbereewr.

1
IF vekbe-waers = xekbe-waers.

2
vekbe-kudif = vekbe-kudif + xekb
e-kudif.
"N980402

IF vekbe-waers = xekbe-waers.

174
3
vekbe-dmbtr = vekbe-dmbtr - xekbedmbtr.

vekbe-arewr = vekbe-arewr - xekbearewr.

vekbe-reewr = vekbe-reewr - xekbereewr.

1
IF vekbe-waers = xekbe-waers.

2
vekbe-kudif = vekbe-kudif - xekb
e-kudif.
"N980402

IF vekbe-waers = xekbe-waers.

2
FORM
EKBZ_ANALYSE
5
45
3
IF xekbz-shkzg = 'H'.

vekbz-menge = vekbz-menge + xekbzmenge.

vekbz-dmbtr = vekbz-dmbtr + xekbzdmbtr.

3
ELSE.

vekbz-menge = vekbz-menge - xekbz-

menge.

vekbz-dmbtr = vekbz-dmbtr - xekbzdmbtr.

5
vekbz-kudif = vekbz-kudif + xekbzkudif.
"N980402

ELSE.

vekbz-menge = vekbz-menge - xekbzmenge.

vekbz-dmbtr = vekbz-dmbtr - xekbzdmbtr.

kudif.

vekbz-kudif = vekbz-kudif - xekbz"N980402

61
3
vekbz-arewr = vekbz-arewr + xekbzarewr.

vekbz-arewr_pop = vekbz-arewr_pop
+ xekbz-arewr_pop.

vekbz-reewr = vekbz-reewr + xekbzreewr.

1
IF vekbz-waers = xekbz-waers.

2
vekbz-kudif = vekbz-kudif + xekbzkudif.
"N980402

IF vekbz-waers = xekbz-waers.

76
3
vekbz-arewr = vekbz-arewr - xekbzarewr.

vekbz-arewr_pop = vekbz-arewr_pop
- xekbz-arewr_pop.

vekbz-reewr = vekbz-reewr - xekbzreewr.

1
IF vekbz-waers = xekbz-waers.

2
vekbz-kudif = vekbz-kudif - xekbzkudif.
"N980402

IF vekbz-waers = xekbz-waers.

92
3
vekbz-dmbtr = vekbz-dmbtr + xekbzdmbtr.

vekbz-arewr = vekbz-arewr + xekbzarewr.

vekbz-reewr = vekbz-reewr + xekbzreewr.

1
IF vekbz-waers = xekbz-waers.

2
vekbz-kudif = vekbz-kudif + xekbzkudif.
"N980402

IF vekbz-waers = xekbz-waers.

102
3
vekbz-dmbtr = vekbz-dmbtr - xekbzdmbtr.

vekbz-arewr = vekbz-arewr - xekbzarewr.

vekbz-reewr = vekbz-reewr - xekbzreewr.

1
IF vekbz-waers = xekbz-waers.

2
vekbz-kudif = vekbz-kudif - xekbzkudif.
"N980402

IF vekbz-waers = xekbz-waers.

LIMU
REPS
SAPLOMML
00001

LIMU
REPS
SAPLOMML
00000
36
1
\\\\\no_empty_blocks/////
1
\\\\\comments_not_ignored/////
1
\\\\\delta_normalized/////
3
\\\\\allowed/////
FORM
*
3
\\\\\allowed/////
FUNCTION
*
3
\\\\\allowed/////
MODULE
**
3
\\\\\allowed/////
REPORT
*
3
\\\\\allowed/////
PROGRAM
*
3
\\\\\allowed/////
FUNCTION-POOL
*
4
\\\\\allowed/////
CLASS
*
DEFINITION
4
\\\\\allowed/////
CLASS
*
IMPLEMENTATION
5
\\\\\forbidden/////
CLASS
*
DEFINITION
DEFERRED
5
\\\\\forbidden/////
CLASS
*

DEFINITION
LOAD
6
\\\\\forbidden/////
CLASS
*
DEFINITION
LOCAL
FRIENDS
3
\\\\\allowed/////
AT
LINE-SELECTION
3
\\\\\allowed/////
AT
USER-COMMAND
4
\\\\\allowed/////
AT
SELECTION-SCREEN
**
3
\\\\\allowed/////
AT
PF*
2
\\\\\allowed/////
INITIALIZATION
2
\\\\\allowed/////
START-OF-SELECTION
2
\\\\\allowed/////
END-OF-SELECTION
3
\\\\\allowed/////
TOP-OF-PAGE
**
2
\\\\\allowed/////
END-OF-PAGE
3
\\\\\allowed/////
GET
**
3
\\\\\forbidden/////
GET
BADI
3
\\\\\forbidden/////
GET
BIT
3
\\\\\forbidden/////
GET
CONNECTION
3
\\\\\forbidden/////

GET
CURSOR
3
\\\\\forbidden/////
GET
DATASET
3
\\\\\forbidden/////
GET
LOCALE
3
\\\\\forbidden/////
GET
PARAMETER
3
\\\\\forbidden/////
GET
PF-STATUS
3
\\\\\forbidden/////
GET
PROPERTY
3
\\\\\forbidden/////
GET
REFERENCE
3
\\\\\forbidden/////
GET
RUN
3
\\\\\forbidden/////
GET
TIME
1
0
1
37
3
INCLUDE LOMMLI02.

INCLUDE LOMMLF02.

0
6

INCLUDE LOMMLO01.

INCLUDE LOMMLI03.

INCLUDE LOMMLF01.

LIMU
TYPD
CCS00
00001
LIMU
TYPD
CCS00
00000

36
1
\\\\\no_empty_blocks/////
1
\\\\\comments_not_ignored/////
1
\\\\\delta_normalized/////
3
\\\\\allowed/////
FORM
*
3
\\\\\allowed/////
FUNCTION
*
3
\\\\\allowed/////
MODULE
**
3
\\\\\allowed/////
REPORT
*
3
\\\\\allowed/////
PROGRAM
*
3
\\\\\allowed/////
FUNCTION-POOL
*
4
\\\\\allowed/////
CLASS
*
DEFINITION
4
\\\\\allowed/////
CLASS
*
IMPLEMENTATION
5
\\\\\forbidden/////
CLASS
*
DEFINITION
DEFERRED
5
\\\\\forbidden/////
CLASS
*
DEFINITION
LOAD
6
\\\\\forbidden/////
CLASS
*
DEFINITION
LOCAL
FRIENDS

3
\\\\\allowed/////
AT
LINE-SELECTION
3
\\\\\allowed/////
AT
USER-COMMAND
4
\\\\\allowed/////
AT
SELECTION-SCREEN
**
3
\\\\\allowed/////
AT
PF*
2
\\\\\allowed/////
INITIALIZATION
2
\\\\\allowed/////
START-OF-SELECTION
2
\\\\\allowed/////
END-OF-SELECTION
3
\\\\\allowed/////
TOP-OF-PAGE
**
2
\\\\\allowed/////
END-OF-PAGE
3
\\\\\allowed/////
GET
**
3
\\\\\forbidden/////
GET
BADI
3
\\\\\forbidden/////
GET
BIT
3
\\\\\forbidden/////
GET
CONNECTION
3
\\\\\forbidden/////
GET
CURSOR
3
\\\\\forbidden/////
GET
DATASET
3
\\\\\forbidden/////
GET

LOCALE
3
\\\\\forbidden/////
GET
PARAMETER
3
\\\\\forbidden/////
GET
PF-STATUS
3
\\\\\forbidden/////
GET
PROPERTY
3
\\\\\forbidden/////
GET
REFERENCE
3
\\\\\forbidden/////
GET
RUN
3
\\\\\forbidden/////
GET
TIME
1
0
1
48
3
* Schichtungsart Material-Ledger

BEGIN OF ccs00_mlcct,

kdmsl

TYPE ck_slml VALUE 'F',

kdmml

TYPE ck_slml VALUE 'N',

kdmsl_st TYPE ck_slml VALUE 'X', "N98


0402

kdmml

TYPE ck_slml VALUE 'N',

LIMU
FUNC
MRM_ASSIGNMENT
00017
LIMU
FUNC
MRM_ASSIGNMENT
00000
37
1
\\\\\no_empty_blocks/////
1
\\\\\comments_not_ignored/////
1
\\\\\delta_normalized/////
1
\\\\\if_comments_ignored/////
3
\\\\\allowed/////
FORM
*
3
\\\\\allowed/////
FUNCTION
*
3
\\\\\allowed/////
MODULE
**
3
\\\\\allowed/////
REPORT
*
3
\\\\\allowed/////
PROGRAM
*
3

\\\\\allowed/////
FUNCTION-POOL
*
4
\\\\\allowed/////
CLASS
*
DEFINITION
4
\\\\\allowed/////
CLASS
*
IMPLEMENTATION
5
\\\\\forbidden/////
CLASS
*
DEFINITION
DEFERRED
5
\\\\\forbidden/////
CLASS
*
DEFINITION
LOAD
6
\\\\\forbidden/////
CLASS
*
DEFINITION
LOCAL
FRIENDS
3
\\\\\allowed/////
AT
LINE-SELECTION
3
\\\\\allowed/////
AT
USER-COMMAND
4
\\\\\allowed/////
AT
SELECTION-SCREEN
**
3
\\\\\allowed/////
AT
PF*
2
\\\\\allowed/////
INITIALIZATION
2
\\\\\allowed/////
START-OF-SELECTION
2
\\\\\allowed/////
END-OF-SELECTION
3
\\\\\allowed/////

TOP-OF-PAGE
**
2
\\\\\allowed/////
END-OF-PAGE
3
\\\\\allowed/////
GET
**
3
\\\\\forbidden/////
GET
BADI
3
\\\\\forbidden/////
GET
BIT
3
\\\\\forbidden/////
GET
CONNECTION
3
\\\\\forbidden/////
GET
CURSOR
3
\\\\\forbidden/////
GET
DATASET
3
\\\\\forbidden/////
GET
LOCALE
3
\\\\\forbidden/////
GET
PARAMETER
3
\\\\\forbidden/////
GET
PF-STATUS
3
\\\\\forbidden/////
GET
PROPERTY
3
\\\\\forbidden/////
GET
REFERENCE
3
\\\\\forbidden/////
GET
RUN
3
\\\\\forbidden/////
GET
TIME
1
2
FUNCTION

MRM_ASSIGNMENT
1
734
4
ENDIF.

CLEAR t_drseg-cr.
ch move-corresponding verhunzt

" dur

1
MOVE: xek08bnc-waers TO t_drseg-bw
aer,

2
* the field bewae has the currency of the
PO

MOVE: xek08bnc-bewae TO t_drseg-bw


aer, "N980402

LIMU
REPS
LMRMPF04

00004
LIMU
REPS
LMRMPF04
00000
36
1
\\\\\no_empty_blocks/////
1
\\\\\comments_not_ignored/////
1
\\\\\delta_normalized/////
3
\\\\\allowed/////
FORM
*
3
\\\\\allowed/////
FUNCTION
*
3
\\\\\allowed/////
MODULE
**
3
\\\\\allowed/////
REPORT
*
3
\\\\\allowed/////
PROGRAM
*
3
\\\\\allowed/////
FUNCTION-POOL
*
4
\\\\\allowed/////
CLASS
*
DEFINITION
4
\\\\\allowed/////
CLASS
*
IMPLEMENTATION
5
\\\\\forbidden/////
CLASS
*
DEFINITION
DEFERRED
5
\\\\\forbidden/////

CLASS
*
DEFINITION
LOAD
6
\\\\\forbidden/////
CLASS
*
DEFINITION
LOCAL
FRIENDS
3
\\\\\allowed/////
AT
LINE-SELECTION
3
\\\\\allowed/////
AT
USER-COMMAND
4
\\\\\allowed/////
AT
SELECTION-SCREEN
**
3
\\\\\allowed/////
AT
PF*
2
\\\\\allowed/////
INITIALIZATION
2
\\\\\allowed/////
START-OF-SELECTION
2
\\\\\allowed/////
END-OF-SELECTION
3
\\\\\allowed/////
TOP-OF-PAGE
**
2
\\\\\allowed/////
END-OF-PAGE
3
\\\\\allowed/////
GET
**
3
\\\\\forbidden/////
GET
BADI
3
\\\\\forbidden/////
GET
BIT
3
\\\\\forbidden/////
GET
CONNECTION

3
\\\\\forbidden/////
GET
CURSOR
3
\\\\\forbidden/////
GET
DATASET
3
\\\\\forbidden/////
GET
LOCALE
3
\\\\\forbidden/////
GET
PARAMETER
3
\\\\\forbidden/////
GET
PF-STATUS
3
\\\\\forbidden/////
GET
PROPERTY
3
\\\\\forbidden/////
GET
REFERENCE
3
\\\\\forbidden/////
GET
RUN
3
\\\\\forbidden/////
GET
TIME
1
2
FORM
AUFBAU_CURRENCIES
2
22
6
DATA: F_BETRAG_FW LIKE DRSEG-WRBTR,

f_arewr_fw LIKE drseg-arewr,

f_rewrt_fw LIKE drseg-rewrt,

f_wewrt_fw LIKE drseg-wewrt,

f_cr LIKE drseg_cr,

tab_co TYPE mmcr_drseg_co OCCURS 1


WITH HEADER LINE,

1
tab_cr TYPE mmcr_tdrseg_cr.

2
tab_cr TYPE mmcr_tdrseg_cr,

f_awkey LIKE bkpf-awkey.


"N980402

203
3
ENDIF.

ENDIF.

ENDLOOP.

ENDFORM.
UFBAU_CURRENCIES

" A

21

* Begin N980402

* Cancelling wwert = budat for ML currenci


es from the original

* document, since the kursf for ML currenc


ies won't

* Be saved in rbkp and for big amounts and


not exact kursf

* the convert_to_local_currency need to ha


ve the same wwert

* as during the posting of invoice to get


the same amounts

IF pi_rbkpv-ivtyp = c_ivtyp_storno.

f_awkey+00(10) = pi_rbkpv-stblg.

f_awkey+10(10) = pi_rbkpv-stjah.

SELECT SINGLE * FROM bkpf WHERE awkey


= f_awkey

AND awtyp
= c_awtyp_rmrp

AND blart
<> 'ML'.

LOOP AT pto_rcurr WHERE curtp NE '00'.

pto_rcurr-datum = bkpf-wwert.

MODIFY pto_rcurr.

ENDLOOP.

ENDIF.

* End N980402

ENDFORM.
UFBAU_CURRENCIES

LIMU
REPS
LMRMPTOP
00010

" A

LIMU
REPS
LMRMPTOP
00000
36
1
\\\\\no_empty_blocks/////
1
\\\\\comments_ignored/////
1
\\\\\delta_normalized/////
3
\\\\\allowed/////
FORM
*
3
\\\\\allowed/////
FUNCTION
*
3
\\\\\allowed/////
MODULE
**
3
\\\\\allowed/////
REPORT
*
3
\\\\\allowed/////
PROGRAM
*
3
\\\\\allowed/////
FUNCTION-POOL
*
4
\\\\\allowed/////
CLASS
*
DEFINITION
4
\\\\\allowed/////
CLASS
*
IMPLEMENTATION
5
\\\\\forbidden/////
CLASS
*
DEFINITION
DEFERRED
5
\\\\\forbidden/////
CLASS

*
DEFINITION
LOAD
6
\\\\\forbidden/////
CLASS
*
DEFINITION
LOCAL
FRIENDS
3
\\\\\allowed/////
AT
LINE-SELECTION
3
\\\\\allowed/////
AT
USER-COMMAND
4
\\\\\allowed/////
AT
SELECTION-SCREEN
**
3
\\\\\allowed/////
AT
PF*
2
\\\\\allowed/////
INITIALIZATION
2
\\\\\allowed/////
START-OF-SELECTION
2
\\\\\allowed/////
END-OF-SELECTION
3
\\\\\allowed/////
TOP-OF-PAGE
**
2
\\\\\allowed/////
END-OF-PAGE
3
\\\\\allowed/////
GET
**
3
\\\\\forbidden/////
GET
BADI
3
\\\\\forbidden/////
GET
BIT
3
\\\\\forbidden/////
GET
CONNECTION
3

\\\\\forbidden/////
GET
CURSOR
3
\\\\\forbidden/////
GET
DATASET
3
\\\\\forbidden/////
GET
LOCALE
3
\\\\\forbidden/////
GET
PARAMETER
3
\\\\\forbidden/////
GET
PF-STATUS
3
\\\\\forbidden/////
GET
PROPERTY
3
\\\\\forbidden/////
GET
REFERENCE
3
\\\\\forbidden/////
GET
RUN
3
\\\\\forbidden/////
GET
TIME
1
2
FUNCTION-POOL
MRMP

T169P,
rameter Rechnungsprfung

T169V,

1
24
3
"Pa

" P

arameter

VF_KRED,
iew Kreditor

" V

1
WRXMOD.

2
WRXMOD,

bkpf.

"N9

80402

LIMU
REPS
LMBGBFSE
00005
LIMU
REPS
LMBGBFSE
00000
36
1
\\\\\no_empty_blocks/////
1
\\\\\comments_not_ignored/////
1
\\\\\delta_normalized/////
3
\\\\\allowed/////
FORM
*
3
\\\\\allowed/////
FUNCTION
*
3
\\\\\allowed/////
MODULE

**
3
\\\\\allowed/////
REPORT
*
3
\\\\\allowed/////
PROGRAM
*
3
\\\\\allowed/////
FUNCTION-POOL
*
4
\\\\\allowed/////
CLASS
*
DEFINITION
4
\\\\\allowed/////
CLASS
*
IMPLEMENTATION
5
\\\\\forbidden/////
CLASS
*
DEFINITION
DEFERRED
5
\\\\\forbidden/////
CLASS
*
DEFINITION
LOAD
6
\\\\\forbidden/////
CLASS
*
DEFINITION
LOCAL
FRIENDS
3
\\\\\allowed/////
AT
LINE-SELECTION
3
\\\\\allowed/////
AT
USER-COMMAND
4
\\\\\allowed/////
AT
SELECTION-SCREEN
**
3
\\\\\allowed/////
AT
PF*
2

\\\\\allowed/////
INITIALIZATION
2
\\\\\allowed/////
START-OF-SELECTION
2
\\\\\allowed/////
END-OF-SELECTION
3
\\\\\allowed/////
TOP-OF-PAGE
**
2
\\\\\allowed/////
END-OF-PAGE
3
\\\\\allowed/////
GET
**
3
\\\\\forbidden/////
GET
BADI
3
\\\\\forbidden/////
GET
BIT
3
\\\\\forbidden/////
GET
CONNECTION
3
\\\\\forbidden/////
GET
CURSOR
3
\\\\\forbidden/////
GET
DATASET
3
\\\\\forbidden/////
GET
LOCALE
3
\\\\\forbidden/////
GET
PARAMETER
3
\\\\\forbidden/////
GET
PF-STATUS
3
\\\\\forbidden/////
GET
PROPERTY
3
\\\\\forbidden/////
GET
REFERENCE
3

\\\\\forbidden/////
GET
RUN
3
\\\\\forbidden/////
GET
TIME
1
2
FORM
WERTESPERRTAB_EKWS_PRUEFEN
1
33
3
xekws-remng = dm07m-remng.

xekws-bprem = dm07m-bprem.

xekws-rewrt = yebefu_cr-rewrt.

1
xekws-arewr = yebefu_cr-arewr.

7
* Begin N980402

* the kdm amount of invoices should not ef


fect the posting of WRX

if gf_kdm_active_im = 'X'.

xekws-rewrt = yebefu_cr-rewrt - y
ebefu_cr-kudif_ir.

endif.

* End N980402

xekws-arewr = yebefu_cr-arewr.

LIMU
REPS
LEINRF5D
00001
LIMU
REPS
LEINRF5D
00000
36
1
\\\\\no_empty_blocks/////
1
\\\\\comments_not_ignored/////
1
\\\\\delta_normalized/////
3
\\\\\allowed/////
FORM
*

3
\\\\\allowed/////
FUNCTION
*
3
\\\\\allowed/////
MODULE
**
3
\\\\\allowed/////
REPORT
*
3
\\\\\allowed/////
PROGRAM
*
3
\\\\\allowed/////
FUNCTION-POOL
*
4
\\\\\allowed/////
CLASS
*
DEFINITION
4
\\\\\allowed/////
CLASS
*
IMPLEMENTATION
5
\\\\\forbidden/////
CLASS
*
DEFINITION
DEFERRED
5
\\\\\forbidden/////
CLASS
*
DEFINITION
LOAD
6
\\\\\forbidden/////
CLASS
*
DEFINITION
LOCAL
FRIENDS
3
\\\\\allowed/////
AT
LINE-SELECTION
3
\\\\\allowed/////
AT
USER-COMMAND
4
\\\\\allowed/////
AT

SELECTION-SCREEN
**
3
\\\\\allowed/////
AT
PF*
2
\\\\\allowed/////
INITIALIZATION
2
\\\\\allowed/////
START-OF-SELECTION
2
\\\\\allowed/////
END-OF-SELECTION
3
\\\\\allowed/////
TOP-OF-PAGE
**
2
\\\\\allowed/////
END-OF-PAGE
3
\\\\\allowed/////
GET
**
3
\\\\\forbidden/////
GET
BADI
3
\\\\\forbidden/////
GET
BIT
3
\\\\\forbidden/////
GET
CONNECTION
3
\\\\\forbidden/////
GET
CURSOR
3
\\\\\forbidden/////
GET
DATASET
3
\\\\\forbidden/////
GET
LOCALE
3
\\\\\forbidden/////
GET
PARAMETER
3
\\\\\forbidden/////
GET
PF-STATUS
3
\\\\\forbidden/////

GET
PROPERTY
3
\\\\\forbidden/////
GET
REFERENCE
3
\\\\\forbidden/////
GET
RUN
3
\\\\\forbidden/////
GET
TIME
1
2
FORM
COLLECT_BETS_WA
1
40
6
PERFORM ADD_TO USING:

W1 = W1 + W2

BETS_WA-WEWRT

LD_BETS_WA-WEWRT,

BETS_WA-REWRT

LD_BETS_WA-REWRT,

BETS_WA-AREWR

LD_BETS_WA-AREWR,

BETS_WA-ANZAL

LD_BETS_WA-ANZAL,

1
BETS_WA-REEWR

LD_BETS_WA-REEWR.

BETS_WA-REEWR

LD_BETS_WA-REEWR,

BETS_WA-kudif_ir LD_BETS_WA-kudif_ir.
"N980402

LIMU
REPS
LMBGBFSB
00001
LIMU
REPS
LMBGBFSB
00000
36
1
\\\\\no_empty_blocks/////
1
\\\\\comments_not_ignored/////
1
\\\\\delta_normalized/////
3
\\\\\allowed/////
FORM
*
3
\\\\\allowed/////
FUNCTION
*
3
\\\\\allowed/////
MODULE

**
3
\\\\\allowed/////
REPORT
*
3
\\\\\allowed/////
PROGRAM
*
3
\\\\\allowed/////
FUNCTION-POOL
*
4
\\\\\allowed/////
CLASS
*
DEFINITION
4
\\\\\allowed/////
CLASS
*
IMPLEMENTATION
5
\\\\\forbidden/////
CLASS
*
DEFINITION
DEFERRED
5
\\\\\forbidden/////
CLASS
*
DEFINITION
LOAD
6
\\\\\forbidden/////
CLASS
*
DEFINITION
LOCAL
FRIENDS
3
\\\\\allowed/////
AT
LINE-SELECTION
3
\\\\\allowed/////
AT
USER-COMMAND
4
\\\\\allowed/////
AT
SELECTION-SCREEN
**
3
\\\\\allowed/////
AT
PF*
2

\\\\\allowed/////
INITIALIZATION
2
\\\\\allowed/////
START-OF-SELECTION
2
\\\\\allowed/////
END-OF-SELECTION
3
\\\\\allowed/////
TOP-OF-PAGE
**
2
\\\\\allowed/////
END-OF-PAGE
3
\\\\\allowed/////
GET
**
3
\\\\\forbidden/////
GET
BADI
3
\\\\\forbidden/////
GET
BIT
3
\\\\\forbidden/////
GET
CONNECTION
3
\\\\\forbidden/////
GET
CURSOR
3
\\\\\forbidden/////
GET
DATASET
3
\\\\\forbidden/////
GET
LOCALE
3
\\\\\forbidden/////
GET
PARAMETER
3
\\\\\forbidden/////
GET
PF-STATUS
3
\\\\\forbidden/////
GET
PROPERTY
3
\\\\\forbidden/////
GET
REFERENCE
3

\\\\\forbidden/////
GET
RUN
3
\\\\\forbidden/////
GET
TIME
1
2
FORM
WERTESPERRTAB_EKBN_PRUEFEN
1
78
3
xekbn-frwwr = frwwr.

xekbn-frrmg = frrmg.

xekbn-frrwr = frrwr.

1
xekbn-frawe = frawe.

10
* Begin N980402

* the kdm amount of invoices should not ef


fect the posting of WRX

* kdm amount should not be a part of the I


nvoice value in local currency

* frrwr = ekbz-wrbtr for invoices, wrbtr i


ncludes also kudif for

* invoices, it should be deducted, this is


according IAS

if gf_kdm_active_im = 'X'.

xekbn-frrwr = frrwr - yekbnk_cr-k


udif_ir.

endif.

* End N980402

xekbn-frawe = frawe.

LIMU
REPS
LMRMPF08
00009

LIMU
REPS
LMRMPF08
00000
36
1
\\\\\no_empty_blocks/////
1
\\\\\comments_not_ignored/////
1
\\\\\delta_normalized/////
3
\\\\\allowed/////
FORM
*
3
\\\\\allowed/////
FUNCTION
*
3
\\\\\allowed/////
MODULE
**
3
\\\\\allowed/////
REPORT
*
3
\\\\\allowed/////
PROGRAM
*
3
\\\\\allowed/////
FUNCTION-POOL
*
4
\\\\\allowed/////
CLASS
*
DEFINITION
4
\\\\\allowed/////
CLASS
*
IMPLEMENTATION
5
\\\\\forbidden/////
CLASS
*
DEFINITION
DEFERRED
5
\\\\\forbidden/////
CLASS

*
DEFINITION
LOAD
6
\\\\\forbidden/////
CLASS
*
DEFINITION
LOCAL
FRIENDS
3
\\\\\allowed/////
AT
LINE-SELECTION
3
\\\\\allowed/////
AT
USER-COMMAND
4
\\\\\allowed/////
AT
SELECTION-SCREEN
**
3
\\\\\allowed/////
AT
PF*
2
\\\\\allowed/////
INITIALIZATION
2
\\\\\allowed/////
START-OF-SELECTION
2
\\\\\allowed/////
END-OF-SELECTION
3
\\\\\allowed/////
TOP-OF-PAGE
**
2
\\\\\allowed/////
END-OF-PAGE
3
\\\\\allowed/////
GET
**
3
\\\\\forbidden/////
GET
BADI
3
\\\\\forbidden/////
GET
BIT
3
\\\\\forbidden/////
GET
CONNECTION
3

\\\\\forbidden/////
GET
CURSOR
3
\\\\\forbidden/////
GET
DATASET
3
\\\\\forbidden/////
GET
LOCALE
3
\\\\\forbidden/////
GET
PARAMETER
3
\\\\\forbidden/////
GET
PF-STATUS
3
\\\\\forbidden/////
GET
PROPERTY
3
\\\\\forbidden/////
GET
REFERENCE
3
\\\\\forbidden/////
GET
RUN
3
\\\\\forbidden/////
GET
TIME
1
2
FORM
ACCIT_KRED_AUFBAUEN_HW
2
119
4
READ TABLE pt_acccr WITH KEY posnr = k
red_posnr

waers = p
i_rbkpv-waers.

MOVE sy-tabix TO kred_fw_idx.

2
CALL FUNCTION 'CONVERT_TO_LOCAL_CURREN
CY'

EXPORTING

25
IF pi_rbkpv-ivtyp = c_ivtyp_storno.

READ TABLE t_currencies WITH KEY buk


rs = xrbkp_t001-bukrs

cur
tp = '10'.

* to get exact the same amounts as during


the posting of invoice

* the original wwert and kursf should be f


illed here

CALL FUNCTION 'CONVERT_TO_LOCAL_CURR


ENCY'

EXPORTING

date

= t_currencies-

foreign_amount

= pt_acccr-wrbt

datum

foreign_currency = pi_rbkpv-waer
s

local_currency

= xrbkp_t001-wa

rate

= pi_rbkpv-kurs

ers

IMPORTING

local_amount

= betrag_fw

EXCEPTIONS

error_message

= 01

OTHERS

= 02.

IF sy-subrc <> 0.

MESSAGE ID sy-msgid TYPE sy-msgty


NUMBER sy-msgno

WITH sy-msgv1 sy-msgv2 sy-msgv3


sy-msgv4

RAISING currency_error.

ENDIF.

ELSE.

CALL FUNCTION 'CONVERT_TO_LOCAL_CURR


ENCY'

EXPORTING

135
3
MESSAGE ID sy-msgid TYPE sy-msgty NU
MBER sy-msgno

WITH sy-msgv1 sy-msgv2 sy-msgv3 s


y-msgv4

RAISING currency_error.

2
ENDIF.

ENDIF.

ENDIF.

INFODESC
CWBCIVALID
INSTA
PAKID
ALEID
VERSNO
TRPAKID
TRTYPEID
TRALSI