Beruflich Dokumente
Kultur Dokumente
RM06EEI0 is a standard ABAP report available within your SAP system (depending on your version and release level).
Below is the standard documentation available for this report and a few details of other objects it interacts with such as
tables, function modules, includes etc. If you would like to see the full code listing simply enter RM06EEI0 into the relevant
SAP transaction such as SE38 or SE80
PRECONDITION
Before you begin with the actual transfer of your purchase orders using this program, certain activities must be carried out. Among
other things, the data extract for this program must be created and Customizing settings checked or altered. For further
information, please refer to the Implementation Guide.
OUTPUT
The program log contains:
Program statistics (start, end, number of records read etc.)
A listing of PO numbers added
A listing of PO numbers not added (i.e. faulty POs)
The detailed error log per PO item supplements this, provided you have activated the output of this log via the relevant program
parameter.
This latter log contains:
PO number
PO item
Message class
Error category
Error number
Error short text
CHECK
The same checks are made as in the case of the manual creation of purchase orders.
In addition, the system checks whether the order types and item categories are allowed for automatic PO transfer (see
restrictions).
If the PO history is to be compiled using program RM06EEI1, (as per the specification in field MBEPOI-WEREF), additional checks
relating to the amount and quantity fields of the invoice and goods receipts are made.
A purchase order is only created if all PO items have passed the checking process without errors.
TECHNICAL-INFO
Prior to transferring purchase orders with database updating, you should carry out a database back up. Reset programs for
automatically created purchase orders are currently not available.
Restarting at the existing sequential file is possible. The program recognizes that the PO in question is not to be added again by
reference to the external PO number assigned by you.
A database commit is initiated after each newly created purchase order.
By means of the appropriate organizational measures, please ensure that the POs created via program RM06EEI0 are not changed
manually before program RM06EEI1 has been run successfully. Inconsistencies cannot otherwise be ruled out.
The program run-time depends largely on your installation, your organization structure, and the quantity structure of your master
and transaction data.
As a rough estimate, however, it can be assumed that approx. 4000 PO items per hour can be handled.
The complete documentation on data transfer with regard to purchase orders is available in the SAP Library:
CA Cross-Application Components -> CA Data Transfer Workbench -> Data Transfer Objects by Application -> MM Materials
Management -> MM Purchase Orders: Data Transfer Workbench.
* FROM tsad3t
WHERE langu
AND
= zekko-spras
title_medi = help_title
T001.
SELECT bukrs waers INTO TABLE zt001 FROM t001.
T024E.
SELECT ekorg bukrs INTO TABLE zt024e FROM t024e.
TCURC.
SELECT waers INTO TABLE ztcurc FROM tcurc.
T161
SELECT bsart bsakz INTO TABLE zt161 FROM t161
WHERE bstyp = 'F'.
T001W.
SELECT werks bwkey INTO TABLE zt001w FROM t001w.
TCURM.
SELECT SINGLE * FROM tcurm.
Function Modules used within report and the associated call statement:
FILE_GET_NAME
CALL FUNCTION 'FILE_GET_NAME'
EXPORTING
logical_filename = lds_name
IMPORTING
file_name
= phy_filename
EXCEPTIONS
file_not_found
= 01.
ME_CREATE_PO_HEADER
CALL FUNCTION 'ME_CREATE_PO_HEADER'
EXPORTING
i_bedat
= zekko-bedat
i_bsart
= zekko-bsart
i_bukrs
= zekko-bukrs
i_ekgrp
= zekko-ekgrp
i_ekorg
= zekko-ekorg
i_lifnr
= zekko-lifnr
i_ebeln
= zekko-ebeln
i_tekko
= ztekko
i_tekkorel
= 'X'
i_no_condition_copy = 'X'
i_vorga
= cva_bu
i_address
= addr1_val
EXCEPTIONS
error_message
= 1.
ME_CREATE_PO_ITEM
CALL FUNCTION 'ME_CREATE_PO_ITEM'
EXPORTING
i_adrnr
i_ematn
= zekpo-adrnr
= zekpo-ematn
i_knttp
= zekpo-knttp
i_kunnr
= zekpo-kunnr
i_lgort
= zekpo-lgort
i_matkl
= zekpo-matkl
i_meins
= zekpo-meins
i_pstyp
= zpstyp
i_txz01
= zekpo-txz01
i_werks
= zekpo-werks
i_kanba
= zekpo-kanba
i_aktnr
= zekpo-aktnr
i_abeln
= zekpo-abeln
i_abelp
= zekpo-abelp
i_netpr
= zekpo-netpr
i_peinh
= zekpo-peinh
i_bprme
= zekpo-bprme
i_bpumz
= zekpo-bpumz
i_bpumn
= zekpo-bpumn
i_packno
= zekpo-packno
i_tekpo
= ztekpo
i_tekporel
= 'X'
i_ebelp
i_bpueb
= zekpo-ebelp
= '2'
i_no_rounding = 'X'
i_attyp
= zekpo-attyp
i_upvor
= zekpo-upvor
i_uebpo
= zekpo-uebpo
i_uptyp
= zekpo-uptyp
IMPORTING
e_ebelp
= zekpo-ebelp
TABLES
xeket
= zeket
xekkn
= zekkn
EXCEPTIONS
error_message = 1.
"363722
ME_POST_PO
CALL FUNCTION 'ME_POST_PO'
IMPORTING
e_ebeln
= zekko-ebeln
EXCEPTIONS
error_message = 1.
DEQUEUE_EMEKKOE
*
*
*
"INSERT 84048
"INSERT 84048
ebeln = zekko-ebeln.
"INSERT 84048
DEQUEUE_ALL
CALL FUNCTION 'DEQUEUE_ALL'.
ME_REFRESH_PO
CALL FUNCTION 'ME_REFRESH_PO'.
ME_ITEM_CATEGORY_INPUT
CALL FUNCTION 'ME_ITEM_CATEGORY_INPUT'
EXPORTING
epstp
= mbepoi-epstp
IMPORTING
pstyp
= zpstyp
EXCEPTIONS
not_found = 01.
MBEW_SINGLE_READ
CALL FUNCTION 'MBEW_SINGLE_READ'
EXPORTING
*
kzrfb
maxtz
matnr
=''
=0
= mbepoi-ematn
"170479
bwkey
= zt001w-bwkey
bwtar
= space
sperrmodus
=''
std_sperrmodus
=''
IMPORTING
wmbew
= mbew
EXCEPTIONS
lock_on_mbew
=1
lock_system_error = 2
wrong_call
=3
not_found
=4
OTHERS
= 5.
READ_NETWORK_AUFPL_APLZL
CALL FUNCTION 'READ_NETWORK_AUFPL_APLZL'
EXPORTING
nplnr
= mbepoi-nplnr
vornr
= mbepoi-vornr
IMPORTING
aplzl
= zekkn-aplzl
aufpl
= zekkn-aufpl
EXCEPTIONS
not_found = 01.
CALCULATE_EXCHANGE_RATE
CALL FUNCTION 'CALCULATE_EXCHANGE_RATE'
EXPORTING
date
= sy-datum
foreign_amount
= zwebtf
foreign_currency = zekko-waers
local_amount
= zwebth
local_currency
= zt001-waers
type_of_rate
= 'M'
IMPORTING
exchange_rate
= zkurs.
CALCULATE_EXCHANGE_RATE
CALL FUNCTION 'CALCULATE_EXCHANGE_RATE'
EXPORTING
date
= sy-datum
foreign_amount
= zrebtf
foreign_currency = zekko-waers
local_amount
= zrebth
local_currency
= zt001-waers
type_of_rate
= 'M'
IMPORTING
exchange_rate
= zkurs.
MESSAGE_TEXT_BUILD
CALL FUNCTION 'MESSAGE_TEXT_BUILD'
EXPORTING
msgid
= prot-msgid
msgnr
= prot-msgno
msgv1
= prot-msgv1
msgv2
= prot-msgv2
msgv3
= prot-msgv3
msgv4
= prot-msgv4
IMPORTING
message_text_output = omess.