Z_FI_DOCUMENT_UPLOAD_EXCEL
Code listing for: Z_FI_DOCUMENT_UPLOAD_EXCEL
*&---------------------------------------------------------------------*
*& Report Z_FI_DOCUMENT_UPLOAD_EXCEL
*&
*&---------------------------------------------------------------------*
* Report Name: Upload Excel Data and Batch Upload Accounting document
* Developer: T08934
* Date: 2014-02-14
* Request Department: Accounting
*&---------------------------------------------------------------------*
REPORT z_fi_document_upload_excel LINE-SIZE 1023.
TYPES: BEGIN OF ty_upload, "Asset Document
headid TYPE c LENGTH 10, "Header ID
bukrs TYPE bkpf-bukrs, "Company Code
blart TYPE bkpf-blart, "Document Type
bldat TYPE bkpf-bldat, "Document Date in Document
budat TYPE bkpf-budat, "Posting Date in the Document
monat TYPE bkpf-monat, "Fiscal Period
waers TYPE bkpf-waers, "Currency Key
kursf TYPE bkpf-kursf, "Exchange rate Annie 20201221
xblnr TYPE bkpf-xblnr, "Reference Document Number
bktxt TYPE bkpf-bktxt,"Header Text
brnch TYPE bkpf-brnch, "Brnch No
bschl TYPE bseg-bschl, "Posting Key
lifnr TYPE c LENGTH 12, "Vendor/Customer/Account NO./Asset No.
umskz TYPE bseg-umskz, "Special G/L Indicator
anbwa TYPE c LENGTH 3, "Transaction Type
hkont TYPE bseg-hkont, "General Ledger Account
wrbtr TYPE c LENGTH 10, "Amount in Document Currency
werks TYPE bseg-werks, "Plant
mwskz TYPE bseg-mwskz, "Tax on sales/purchases code
zfbdt TYPE bseg-zfbdt, "Baseline Date for Due Date Calculation
zterm TYPE bseg-zterm, "Payment Teerm
kostl TYPE bseg-kostl, "Cost Center
projk TYPE c LENGTH 10,"WBS Element
vbund TYPE bseg-vbund, "Trading Partner
zuonr TYPE bseg-zuonr, "Assignment Number
sgtxt TYPE bseg-sgtxt, "Item Text
rstgr TYPE bseg-rstgr, "Reason Code for Payments
ebeln TYPE bseg-ebeln, "Purchasing Document Number
ebelp TYPE bseg-ebelp, "Item Number of Purchasing Document
xref1 TYPE bseg-xref1, "Reference Key1
xref2 TYPE bseg-xref2, "Reference Key2
xref3 TYPE bseg-xref3, "Reference Key3
END OF ty_upload.
TYPES: BEGIN OF ty_upload1, "Non-Asset Document(Post or Park Document)
headid TYPE c LENGTH 10, "Header ID
bukrs TYPE bkpf-bukrs, "Company Code
blart TYPE bkpf-blart, "Document Type
bldat TYPE bkpf-bldat, "Document Date in Document
budat TYPE bkpf-budat, "Posting Date in the Document
monat TYPE bkpf-monat, "Fiscal Period
waers TYPE bkpf-waers, "Currency Key
kursf TYPE bkpf-kursf, "Exchange rate Annie 20201221
xblnr TYPE bkpf-xblnr, "Reference Document Number
bktxt TYPE bkpf-bktxt,"Header Text
brnch TYPE bkpf-brnch, "Brnch No
itemid TYPE c LENGTH 10, "Item ID
bschl TYPE bseg-bschl, "Posting Key
lifnr TYPE c LENGTH 10, "Vendor/Customer/Account NO./Asset No.
umskz TYPE bseg-umskz, "Special G/L Indicator
hkont TYPE bseg-hkont, "General Ledger Account
wrbtr TYPE bseg-wrbtr, "Amount in Document Currency
werks TYPE bseg-werks, "Plant
mwskz TYPE bseg-mwskz, "Tax on sales/purchases code
zfbdt TYPE bseg-zfbdt, "Baseline Date for Due Date Calculation
zterm TYPE bseg-zterm, "Payment Teerm
kostl TYPE bseg-kostl, "Cost Center
projk TYPE c LENGTH 10,"WBS Element
vbund TYPE bseg-vbund, "Trading Partner
zuonr TYPE bseg-zuonr, "Assignment Number
sgtxt TYPE bseg-sgtxt, "Item Text
rstgr TYPE bseg-rstgr, "Reason Code for Payments
ebeln TYPE bseg-ebeln, "Purchasing Document Number
ebelp TYPE bseg-ebelp, "Item Number of Purchasing Document
xref1 TYPE bseg-xref1, "Reference Key1
xref2 TYPE bseg-xref2, "Reference Key2
xref3 TYPE bseg-xref3, "Reference Key3
material TYPE marc-matnr, "Reference Key3
quantity TYPE mard-labst, "Reference Key3
base_uom TYPE marc-ausme, "Reference Key3
aufnr TYPE bseg-aufnr,"20240811 MODIFY
END OF ty_upload1.
TYPES: BEGIN OF ty_header, "Document Header
headid TYPE c LENGTH 10, "Header ID
bukrs TYPE bkpf-bukrs, "Company Code
blart TYPE bkpf-blart, "Document Type
bldat TYPE bkpf-bldat, "Document Date in Document
budat TYPE bkpf-budat, "Posting Date in the Document
monat TYPE bkpf-monat, "Fiscal Period
waers TYPE bkpf-waers, "Currency Key
kursf TYPE bkpf-kursf, "Exchange rate Annie 20201221
xblnr TYPE bkpf-xblnr, "Reference Document Number
bktxt TYPE bkpf-bktxt, "Header Text
brnch TYPE bkpf-brnch, "Brnch No
belnr TYPE bkpf-belnr, "Document Numbe
emsg TYPE string, "Error Message
END OF ty_header.
TYPES: BEGIN OF ty_item, "Document Item For Asset Document
headid TYPE c LENGTH 10, "Item ID
bschl TYPE bseg-bschl, "Posting Key
lifnr TYPE c LENGTH 12, "Vendor/Customer/Account NO./Asset No.
umskz TYPE bseg-umskz, "Special G/L Indicator
anbwa TYPE c LENGTH 3, "Transaction Type
hkont TYPE bseg-hkont, "General Ledger Account
wrbtr TYPE c LENGTH 10, "Amount in Document Currency
werks TYPE bseg-werks, "Plant
mwskz TYPE bseg-mwskz, "Tax on sales/purchases code
zfbdt TYPE bseg-zfbdt, "Baseline Date for Due Date Calculation
zterm TYPE bseg-zterm, "Payment Term
kostl TYPE bseg-kostl, "Cost Center
projk TYPE c LENGTH 24,"WBS Element
vbund TYPE bseg-vbund, "Trading Partner
zuonr TYPE bseg-zuonr, "Assignment Number
sgtxt TYPE bseg-sgtxt, "Item Text
rstgr TYPE bseg-rstgr, "Reason Code for Payments
ebeln TYPE bseg-ebeln, "Purchasing Document Number
ebelp TYPE bseg-ebelp, "Item Number of Purchasing Document
xref1 TYPE bseg-xref1, "Reference Key1
xref2 TYPE bseg-xref2, "Reference Key2
xref3 TYPE bseg-xref3, "Reference Key3
END OF ty_item.
TYPES: BEGIN OF ty_item1, "Document Item for Non-Asset Document
headid TYPE c LENGTH 10, "Item ID
itemid TYPE c LENGTH 10, "Item ID
bschl TYPE bseg-bschl, "Posting Key
lifnr TYPE c LENGTH 10, "Vendor/Customer/Account NO./Asset No.
umskz TYPE bseg-umskz, "Special G/L Indicator
hkont TYPE bseg-hkont, "General Ledger Account
wrbtr TYPE bseg-wrbtr, "Amount in Document Currency
werks TYPE bseg-werks, "Plant
mwskz TYPE bseg-mwskz, "Tax on sales/purchases code
zfbdt TYPE bseg-zfbdt, "Baseline Date for Due Date Calculation
zterm TYPE bseg-zterm, "Payment Term
kostl TYPE bseg-kostl, "Cost Center
projk TYPE c LENGTH 24,"WBS Element
vbund TYPE bseg-vbund, "Trading Partner
zuonr TYPE bseg-zuonr, "Assignment Number
sgtxt TYPE bseg-sgtxt, "Item Text
rstgr TYPE bseg-rstgr, "Reason Code for Payments
ebeln TYPE bseg-ebeln, "Purchasing Document Number
ebelp TYPE bseg-ebelp, "Item Number of Purchasing Document
xref1 TYPE bseg-xref1, "Reference Key1
xref2 TYPE bseg-xref2, "Reference Key2
xref3 TYPE bseg-xref3, "Reference Key3
material TYPE marc-matnr, "Reference Key3
quantity TYPE mard-labst, "Reference Key3
base_uom TYPE marc-ausme, "Reference Key3
aufnr TYPE bseg-aufnr, "20240811
END OF ty_item1.
TYPES: BEGIN OF ty_output_header, "Output Information
headid TYPE c LENGTH 10, "Header ID
bukrs TYPE bkpf-bukrs, "Company Code
blart TYPE bkpf-blart, "Document Type
bldat TYPE bkpf-bldat, "Document Date in Document
budat TYPE bkpf-budat, "Posting Date in the Document
monat TYPE bkpf-monat, "Fiscal Period
waers TYPE bkpf-waers, "Currency Key
kursf TYPE bkpf-kursf, "Exchange rate Annie 20201221
xblnr TYPE bkpf-xblnr, "Reference Document Num