ähhm ...das kann fast nicht sein. Dein Senderfeld WRBTR1 (warum nimmst Du so komische Feldnamen?) ist 8 Zeichen lang, das Feld Kostenstelle jedoch 10. Bitte achte auch ggf. auf führende Nullen (siehe mein Beispiel-Coding).Stegemann90 hat geschrieben:(Anzahl Zeichen und Format werden richtig übertragen)
Code: Alles auswählen.
*&---------------------------------------------------------------------*
*& Report Z_F02_SA
*&
*&---------------------------------------------------------------------*
*&
*&
*&---------------------------------------------------------------------*
REPORT Z_F02_SA.
DATA: BEGIN OF ITAB OCCURS 0,
bldat type bldat, "Belegdatum
budat type budat, "Buchungsdatum
bukrs type bukrs, "Buchungskreis
waers type waers, "Belegwährung
xblnr type xblnr, "Referenz
bktxt type bktxt, "Belegtext
hkonts(10) type n, "Konto Soll
lifnrs(10) type n, "Kreditorkonto Soll
wrbtr type wrbtr, "Betrag
mwskzs type mwskz, "Steuerkennzeichen Soll
kostls type kostl, "Kostenstelle Soll
aufnrs type aufnr, "Auftrag Soll
ps_posids type ps_posid, "PSP Soll
zuonrs type ACPI_ZUONR, "Zuordnung Soll
sgtxts type sgtxt, "Belegpos.text Soll
hkonth(10) type n, "Konto Haben
mwskzh type mwskz, "Steuerkennzeichen Haben
kostlh type kostl, "Kostenstelle Haben
aufnrh type aufnr, "Auftrag Haben
ps_posidh type ps_posid, "PSP Haben
zuonrh type ACPI_ZUONR, "Zuordnung Haben
sgtxth type sgtxt, "Belegpos.text Haben
END OF ITAB.
shift ITAB-hkonts right deleting trailing space.
overlay ITAB-hkonts with '0000000000'.
shift ITAB-lifnrs right deleting trailing space.
overlay ITAB-lifnrs with '0000000000'.
shift ITAB-hkonth right deleting trailing space.
overlay ITAB-hkonth with '0000000000'.
DATA: docnum type belnr_d. "Belegnummer
* Schnittstellendaten für Verbuchungs-BAPI
data:
l_documentheader type bapiache09,
l_obj_type type bapiache09-obj_type,
l_obj_key type bapiache09-obj_key,
l_obj_sys type bapiache09-obj_sys,
* Sachkontenpositionen
l_accountgl type table of bapiacgl09 with header line,
* Kreditorenpositionen
l_accountpayable type table of bapiacap09 with header line,
* Steuerzeilen (in vorliegendem Bsp. nicht relevant)
l_accounttax type table of bapiactx09 with header line,
* Betragsinformationen
l_currencyamount type table of bapiaccr09 with header line,
* Meldungen des BAPI's
l_return type table of bapiret2 with header line.
data:
l_t001 type t001,
l_itemno type posnr_acc.
constants:
lc_doctype type blart value 'SA'. "<<<< ggf. anpassen
***************Upload************************************
PERFORM DATEN_LADEN USING
'C:\Datenmigration\uploadf02.txt'.
LOOP AT ITAB.
CALL FUNCTION 'CONVERSION_EXIT_ALPHA_INPUT'
EXPORTING
input = ITAB-kostls
IMPORTING
output = ITAB-kostls.
CALL FUNCTION 'CONVERSION_EXIT_ALPHA_INPUT'
EXPORTING
input = ITAB-kostlh
IMPORTING
output = ITAB-kostlh.
*-----------------------------------------------------------------------
* Initialisierung
*-----------------------------------------------------------------------
refresh: l_accountgl,
l_accountpayable,
l_accounttax,
l_currencyamount,
l_return.
*-----------------------------------------------------------------------
* Positionsnummer (fängt bei 1 an und wird pro Belegpos. um 1 inkr.)
* Hinweis: Es können auch 10er Schritte verwendet werden, wichtig ist
* nur eins: Die Einträge der Tabellen l_accountgl und
* l_currencyamount finden über den jeweiligen Inhalt des Felds
* itemno_acc 'zueinander', d.h. anders ausgedrückt:
* Für jede Belegposition muss jeweils ein Eintrag in den
* genannten Tabellen mit identischer itemno_acc aufgenommen
* werden.
*-----------------------------------------------------------------------
l_itemno = 1.
*-----------------------------------------------------------------------
* Belegkopf
*-----------------------------------------------------------------------
clear l_documentheader.
l_documentheader-bus_act = 'RFBU'. "Vorgang (fix)
l_documentheader-username = sy-uname. "Belegerfasser
l_documentheader-comp_code = ITAB-bukrs. "Buchungskreis
l_documentheader-doc_date = ITAB-bldat. "Belegdatum
l_documentheader-pstng_date = ITAB-budat. "Buchungsdatum
l_documentheader-ref_doc_no = ITAB-xblnr. "Referenznummer
l_documentheader-header_txt = ITAB-bktxt. "Belegkopftext
l_documentheader-doc_type = lc_doctype. "Belegart
*-----------------------------------------------------------------------
* 1. Belegposition (Soll)
*-----------------------------------------------------------------------
clear: l_accountgl, l_currencyamount, l_accountpayable.
l_accountgl-itemno_acc = l_itemno. "Positionsidentifier
l_accountgl-gl_account = ITAB-hkonts. "Sachkonto (Soll)
l_accountpayable-vendor_no = ITAB-lifnrs. "Kreditorkonto (Soll)
l_accountgl-item_text = ITAB-sgtxts. "Belegtext
l_accountgl-costcenter = ITAB-kostls. "Kostenstelle
l_accountgl-orderid = ITAB-aufnrs. "Auftrag
l_accountgl-wbs_element = ITAB-ps_posids. "PSP
l_accountgl-alloc_nmbr = ITAB-zuonrs. "Zuordnung
l_accountgl-tax_code = ITAB-mwskzs. "Steuerkennzeichen
* Betragssegment zur Sachkontenposition 1 mit identischem Identifier:
l_currencyamount-itemno_acc = l_accountgl-itemno_acc.
l_currencyamount-currency = ITAB-waers.
l_currencyamount-amt_doccur = ITAB-wrbtr.
append: l_accountgl, l_currencyamount, l_accountpayable.
*-----------------------------------------------------------------------
* 2. Belegposition (Haben)
*-----------------------------------------------------------------------
add 1 to l_itemno.
clear: l_accountgl, l_currencyamount.
l_accountgl-itemno_acc = l_itemno.
l_accountgl-gl_account = ITAB-hkonth.
l_accountgl-item_text = ITAB-sgtxth.
l_accountgl-costcenter = ITAB-kostlh. "Kostenstelle
l_accountgl-orderid = ITAB-aufnrh. "Auftrag
l_accountgl-wbs_element = ITAB-ps_posidh. "PSP
l_accountgl-alloc_nmbr = ITAB-zuonrh. "Zuordnung
l_accountgl-tax_code = ITAB-mwskzh. "Steuerkennzeichen
* Betragssegment zur Sachkontenposition 2 mit identischem Identifier:
l_currencyamount-itemno_acc = l_accountgl-itemno_acc.
l_currencyamount-currency = ITAB-waers.
l_currencyamount-amt_doccur = ITAB-wrbtr * -1. "Haben --> Minus
append: l_accountgl, l_currencyamount.
*-----------------------------------------------------------------------
* BAPI-Aufruf
*-----------------------------------------------------------------------
call function 'BAPI_ACC_DOCUMENT_POST'
exporting
documentheader = l_documentheader
importing
obj_type = l_obj_type
obj_key = l_obj_key
obj_sys = l_obj_sys
tables
accountgl = l_accountgl
accountpayable = l_accountpayable
* ACCOUNTRECEIVABLE =
* ACCOUNTPAYABLE =
* accounttax = l_accounttax
currencyamount = l_currencyamount
* CRITERIA =
* VALUEFIELD =
* EXTENSION1 =
return = l_return
* PAYMENTCARD =
* CONTRACTITEM =
* EXTENSION2 =
* REALESTATE =
* ACCOUNTWT =
.
commit work.
loop at l_return .
write: / l_return-type,
l_return-id,
l_return-number,
l_return-message,
l_return-message_v1,
l_return-message_v2,
l_return-message_v3,
l_return-message_v4.
endloop.
* systemseitig vergebene Belegnummer kommt zurück!
ENDLOOP.
docnum = l_obj_key(10).
******************************FORMS*******************************
FORM DATEN_LADEN USING DATEI.
CALL FUNCTION 'GUI_UPLOAD'
EXPORTING
FILENAME = DATEI
FILETYPE = 'ASC'
HAS_FIELD_SEPARATOR = 'X'
TABLES
DATA_TAB = ITAB
EXCEPTIONS
FILE_OPEN_ERROR = 1
FILE_READ_ERROR = 2
NO_BATCH = 3
GUI_REFUSE_FILETRANSFER = 4
INVALID_TYPE = 5
NO_AUTHOITY = 6
UNKNOWN_ERROR = 7
BAD_DATA_FORMAT = 8
HEADER_NOT_ALLOWED = 9
SEPARATOR_NOT_ALLOWED = 10
HEADER_TOO_LONG = 11
UNKNOWN_DP_ERROR = 12
ACCESS_DENIED = 13
DP_OUT_OF_MEMORY = 14
DISK_FULL = 15
DP_TIMEOUT = 16
OTHERS = 17.
ENDFORM.
Code: Alles auswählen.
REPORT Z_F02_SAKRED.
** Internal table declaration
DATA: lt_glacct TYPE TABLE OF bapiacgl09,
lt_vendact TYPE TABLE OF bapiacap09,
lt_curramt TYPE TABLE OF bapiaccr09,
lt_return TYPE TABLE OF bapiret2.
** Workarea and variable declaration
DATA: lv_objtyp TYPE bapiache09-obj_type,
lv_objkey TYPE bapiache09-obj_key,
lv_objsys TYPE bapiache09-obj_sys,
wa_docheader TYPE bapiache09,
wa_glacct LIKE LINE OF lt_glacct,
wa_curramt LIKE LINE OF lt_curramt,
wa_vendact LIKE LINE OF lt_vendact,
wa_return LIKE LINE OF lt_return.
** All necessary fields for vendor invoices will be considerd.
* Populate header data of document
wa_docheader-obj_type = 'REACI'.
wa_docheader-obj_key = '$'.
wa_docheader-obj_sys = 'T90CLNT090'.
wa_docheader-bus_act = 'RMRP'.
wa_docheader-comp_code = '50'.
wa_docheader-username = sy-uname.
wa_docheader-header_txt = 'Upload using BAPI'.
wa_docheader-doc_date = '20141016'.
wa_docheader-pstng_date = '20141016'.
wa_docheader-fisc_year = '2015'.
wa_docheader-doc_type = 'RE'.
* Account payable are maintained here
wa_vendact-itemno_acc = '0000000001'.
wa_vendact-vendor_no = '0000000066'.
*wa_vendact-pmnttrms = '0001'.
wa_vendact-bus_area = '50'.
wa_vendact-profit_ctr = '0000000500'.
wa_vendact-bline_date = '20141016'.
wa_vendact-item_text = 'Account payable'.
APPEND wa_vendact TO lt_vendact.
* Corresponding entry in GL Account
wa_glacct-itemno_acc = '0000000002'.
wa_glacct-gl_account = '0000405000'.
wa_glacct-item_text = 'GL account'.
wa_glacct-costcenter = '0058000000'. "Kostenstelle
*wa_glacct-tax_code = '99'. "Steuerkennzeichen
APPEND wa_glacct TO lt_glacct.
*Make sure total amount balance for a document should be zero
wa_curramt-itemno_acc = '0000000001'.
wa_curramt-curr_type = '00'.
wa_curramt-currency = 'EUR'.
wa_curramt-amt_doccur = '-1000.00'.
APPEND wa_curramt TO lt_curramt.
CLEAR wa_curramt.
wa_curramt-itemno_acc = '0000000002'.
wa_curramt-curr_type = '00'.
wa_curramt-currency = 'EUR'.
wa_curramt-amt_doccur = '1000.00'.
APPEND wa_curramt TO lt_curramt.
CLEAR: wa_curramt,wa_glacct,wa_vendact.
CALL FUNCTION 'BAPI_ACC_DOCUMENT_POST'
EXPORTING
documentheader = wa_docheader
IMPORTING
obj_type = lv_objtyp
obj_key = lv_objkey
obj_sys = lv_objsys
TABLES
accountgl = lt_glacct
accountpayable = lt_vendact
currencyamount = lt_curramt
return = lt_return.
IF sy-subrc EQ 0.
WRITE:/ lv_objtyp.
WRITE:/ lv_objkey.
WRITE:/ lv_objsys.
LOOP AT lt_return INTO wa_return.
WRITE:/ wa_return-message.
CLEAR wa_return.
ENDLOOP.
COMMIT WORK AND WAIT.
ENDIF.
Benutze Customizingtabellen in denen du die notwendigen Einstellungen hinterlegst.Stegemann90 hat geschrieben:Allerdings möchte ich das Programm gerne so einsetzen, dass ich mit diesem flexibler bin. Also z.B. auch Debitor an Hauptbuch, Hauptbuch an Hauptbuch etc. buchen kann. Wie kann ich das in das Programm einbauen... Komme an dieser Stelle leider nicht mehr weiter...
Code: Alles auswählen.
*&---------------------------------------------------------------------*
*& Report Z_KB21N_GV
*&
*&---------------------------------------------------------------------*
*&
*&
*&---------------------------------------------------------------------*
REPORT Z_KB21N_GV.
DATA: ls_doc_header TYPE bapidochdrp.
DATA: lt_doc_items TYPE TABLE OF bapiaaitm.
DATA: ls_doc_item TYPE bapiaaitm.
DATA: lt_return TYPE TABLE OF bapiret2.
DATA: ls_docno TYPE bapidochdrp-doc_no.
DATA: BEGIN OF ITAB OCCURS 0,
KRKRS LIKE SVALD-VALUE(02),
WRBTR10(8),
WRBTR11(8),
BLTXT LIKE COHEADER-BLTXT,
WRBTR1(10),
WRBTR2(6),
WRBTR3(10),
WRBTR4(6),
WRBTR5(10),
WRBTR6(6),
WRBTR7(3),
WRBTR8(6),
WRBTR9(20),
END OF ITAB.
***************Upload************************************
PERFORM DATEN_LADEN USING
'C:\Datenmigration\uploadkb21n_gv.txt'.
LOOP AT ITAB.
CALL FUNCTION 'CONVERSION_EXIT_ALPHA_INPUT'
EXPORTING
input = ITAB-WRBTR1
IMPORTING
output = ITAB-WRBTR1.
CALL FUNCTION 'CONVERSION_EXIT_ALPHA_INPUT'
EXPORTING
input = ITAB-WRBTR3
IMPORTING
output = ITAB-WRBTR3.
* Belegkopf
ls_doc_header-co_area = ITAB-KRKRS. "Kostenrechnungskreis
ls_doc_header-docdate = ITAB-WRBTR10. "Belegdatum
ls_doc_header-postgdate = ITAB-WRBTR11. "Buchungsdatum
ls_doc_header-doc_hdr_tx = ITAB-BLTXT. "Belegkopftext
ls_doc_header-username = sy-uname. "User-Name
* Positionen aufbauen
* Pos. 1
ls_doc_item-send_cctr = ITAB-WRBTR1. "Sender-Kostenstelle
ls_doc_item-acttype = ITAB-WRBTR2. "Leistungsart
ls_doc_item-actvty_qty = ITAB-WRBTR6. "Menge
ls_doc_item-rec_cctr = ITAB-WRBTR3. "Empfänger-KST
ls_doc_item-rec_order = ITAB-WRBTR4. "Empfänger-Auftrag
ls_doc_item-rec_wbs_el = ITAB-WRBTR5. "Empfänger-KTR
ls_doc_item-activityun = ITAB-WRBTR7. "Leistungseinheit
ls_doc_item-person_no = ITAB-WRBTR8. "Gerätebezeichnung
ls_doc_item-seg_text = ITAB-WRBTR9. "Segmenttext
APPEND ls_doc_item TO lt_doc_items.
ENDLOOP.
* BAPI rufen
CALL FUNCTION 'BAPI_ACC_ACTIVITY_ALLOC_POST'
EXPORTING
doc_header = ls_doc_header
* IGNORE_WARNINGS = ' '
IMPORTING
doc_no = ls_docno
TABLES
doc_items = lt_doc_items
return = lt_return
* CRITERIA =
* CUSTOMER_FIELDS =
.
* COMMIT nicht vergessen!
CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'.
* Meldungen ausgeben
IF lt_return IS NOT INITIAL.
CALL FUNCTION 'C14ALD_BAPIRET2_SHOW'
TABLES
i_bapiret2_tab = lt_return.
ENDIF.
******************************FORMS*******************************
FORM DATEN_LADEN USING DATEI.
CALL FUNCTION 'GUI_UPLOAD'
EXPORTING
FILENAME = DATEI
FILETYPE = 'ASC'
HAS_FIELD_SEPARATOR = 'X'
TABLES
DATA_TAB = ITAB
EXCEPTIONS
FILE_OPEN_ERROR = 1
FILE_READ_ERROR = 2
NO_BATCH = 3
GUI_REFUSE_FILETRANSFER = 4
INVALID_TYPE = 5
NO_AUTHOITY = 6
UNKNOWN_ERROR = 7
BAD_DATA_FORMAT = 8
HEADER_NOT_ALLOWED = 9
SEPARATOR_NOT_ALLOWED = 10
HEADER_TOO_LONG = 11
UNKNOWN_DP_ERROR = 12
ACCESS_DENIED = 13
DP_OUT_OF_MEMORY = 14
DISK_FULL = 15
DP_TIMEOUT = 16
OTHERS = 17.
ENDFORM.
Code: Alles auswählen.
*&---------------------------------------------------------------------*
*& Report Z_KB21N_GV
*&
*&---------------------------------------------------------------------*
*&
*&
*&---------------------------------------------------------------------*
REPORT Z_KB21N_GV.
DATA: nummer1 TYPE p,
nummer2 TYPE p.
DATA: v_lines type i.
DATA: ls_doc_header TYPE bapidochdrp.
DATA: lt_doc_items TYPE TABLE OF bapiaaitm.
DATA: ls_doc_item TYPE bapiaaitm.
DATA: lt_return TYPE TABLE OF bapiret2.
DATA: ls_docno TYPE bapidochdrp-doc_no.
DATA: BEGIN OF ITAB1 OCCURS 0,
KRKRS LIKE SVALD-VALUE(02),
WRBTR10(8),
WRBTR11(8),
BLTXT LIKE COHEADER-BLTXT,
WRBTR1(10),
WRBTR2(6),
WRBTR3(10),
WRBTR4(6),
WRBTR5(10),
WRBTR6(6),
WRBTR7(3),
WRBTR8(6),
WRBTR9(20),
END OF ITAB1.
DATA: BEGIN OF ITAB2 OCCURS 0,
KRKRS LIKE SVALD-VALUE(02),
WRBTR10(8),
WRBTR11(8),
BLTXT LIKE COHEADER-BLTXT,
WRBTR1(10),
WRBTR2(6),
WRBTR3(10),
WRBTR4(6),
WRBTR5(10),
WRBTR6(6),
WRBTR7(3),
WRBTR8(6),
WRBTR9(20),
END OF ITAB2.
***************Upload************************************
PERFORM DATEN_LADEN USING
'C:\Datenmigration\uploadkb21n_gv.txt'.
DESCRIBE TABLE ITAB2 LINES v_lines.
LOOP AT ITAB1.
INSERT current line OF ITAB1 into ITAB2.
IF v_lines = 100.
LOOP AT ITAB2.
CALL FUNCTION 'CONVERSION_EXIT_ALPHA_INPUT'
EXPORTING
input = ITAB2-WRBTR1
IMPORTING
output = ITAB2-WRBTR1.
CALL FUNCTION 'CONVERSION_EXIT_ALPHA_INPUT'
EXPORTING
input = ITAB2-WRBTR3
IMPORTING
output = ITAB2-WRBTR3.
* Belegkopf
ls_doc_header-co_area = ITAB2-KRKRS. "Kostenrechnungskreis
ls_doc_header-docdate = ITAB2-WRBTR10. "Belegdatum
ls_doc_header-postgdate = ITAB2-WRBTR11. "Buchungsdatum
ls_doc_header-doc_hdr_tx = ITAB2-BLTXT. "Belegkopftext
ls_doc_header-username = sy-uname. "User-Name
* Positionen aufbauen
* Pos. 1
ls_doc_item-send_cctr = ITAB2-WRBTR1. "Sender-Kostenstelle
ls_doc_item-acttype = ITAB2-WRBTR2. "Leistungsart
ls_doc_item-actvty_qty = ITAB2-WRBTR6. "Menge
ls_doc_item-rec_cctr = ITAB2-WRBTR3. "Empfänger-KST
ls_doc_item-rec_order = ITAB2-WRBTR4. "Empfänger-Auftrag
ls_doc_item-rec_wbs_el = ITAB2-WRBTR5. "Empfänger-KTR
ls_doc_item-activityun = ITAB2-WRBTR7. "Leistungseinheit
ls_doc_item-person_no = ITAB2-WRBTR8. "Gerätebezeichnung
ls_doc_item-seg_text = ITAB2-WRBTR9. "Segmenttext
APPEND ls_doc_item TO lt_doc_items.
ENDLOOP.
* BAPI rufen
CALL FUNCTION 'BAPI_ACC_ACTIVITY_ALLOC_POST'
EXPORTING
doc_header = ls_doc_header
* IGNORE_WARNINGS = ' '
IMPORTING
doc_no = ls_docno
TABLES
doc_items = lt_doc_items
return = lt_return
* CRITERIA =
* CUSTOMER_FIELDS =
.
CLEAR ITAB2.
ENDIF.
AT Last.
If ITAB2 is not initial.
LOOP at ITAB2.
CALL FUNCTION 'CONVERSION_EXIT_ALPHA_INPUT'
EXPORTING
input = ITAB2-WRBTR1
IMPORTING
output = ITAB2-WRBTR1.
CALL FUNCTION 'CONVERSION_EXIT_ALPHA_INPUT'
EXPORTING
input = ITAB2-WRBTR3
IMPORTING
output = ITAB2-WRBTR3.
* Belegkopf
ls_doc_header-co_area = ITAB2-KRKRS. "Kostenrechnungskreis
ls_doc_header-docdate = ITAB2-WRBTR10. "Belegdatum
ls_doc_header-postgdate = ITAB2-WRBTR11. "Buchungsdatum
ls_doc_header-doc_hdr_tx = ITAB2-BLTXT. "Belegkopftext
ls_doc_header-username = sy-uname. "User-Name
* Positionen aufbauen
* Pos. 1
ls_doc_item-send_cctr = ITAB2-WRBTR1. "Sender-Kostenstelle
ls_doc_item-acttype = ITAB2-WRBTR2. "Leistungsart
ls_doc_item-actvty_qty = ITAB2-WRBTR6. "Menge
ls_doc_item-rec_cctr = ITAB2-WRBTR3. "Empfänger-KST
ls_doc_item-rec_order = ITAB2-WRBTR4. "Empfänger-Auftrag
ls_doc_item-rec_wbs_el = ITAB2-WRBTR5. "Empfänger-KTR
ls_doc_item-activityun = ITAB2-WRBTR7. "Leistungseinheit
ls_doc_item-person_no = ITAB2-WRBTR8. "Gerätebezeichnung
ls_doc_item-seg_text = ITAB2-WRBTR9. "Segmenttext
APPEND ls_doc_item TO lt_doc_items.
ENDLOOP.
* BAPI rufen
CALL FUNCTION 'BAPI_ACC_ACTIVITY_ALLOC_POST'
EXPORTING
doc_header = ls_doc_header
* IGNORE_WARNINGS = ' '
IMPORTING
doc_no = ls_docno
TABLES
doc_items = lt_doc_items
return = lt_return
* CRITERIA =
* CUSTOMER_FIELDS =
.
ENDIF.
ENDAT.
ENDLOOP.
* COMMIT nicht vergessen!
CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'.
* Meldungen ausgeben
IF lt_return IS NOT INITIAL.
CALL FUNCTION 'C14ALD_BAPIRET2_SHOW'
TABLES
i_bapiret2_tab = lt_return.
ENDIF.
******************************FORMS*******************************
FORM DATEN_LADEN USING DATEI.
CALL FUNCTION 'GUI_UPLOAD'
EXPORTING
FILENAME = DATEI
FILETYPE = 'ASC'
HAS_FIELD_SEPARATOR = 'X'
TABLES
DATA_TAB = ITAB
EXCEPTIONS
FILE_OPEN_ERROR = 1
FILE_READ_ERROR = 2
NO_BATCH = 3
GUI_REFUSE_FILETRANSFER = 4
INVALID_TYPE = 5
NO_AUTHOITY = 6
UNKNOWN_ERROR = 7
BAD_DATA_FORMAT = 8
HEADER_NOT_ALLOWED = 9
SEPARATOR_NOT_ALLOWED = 10
HEADER_TOO_LONG = 11
UNKNOWN_DP_ERROR = 12
ACCESS_DENIED = 13
DP_OUT_OF_MEMORY = 14
DISK_FULL = 15
DP_TIMEOUT = 16
OTHERS = 17.
ENDFORM.