Professional Documents
Culture Documents
SPECIFICATION
PARKING AND POSTING
G/L ACCOUNT FOR CREDIT MEMO
T-CODE: ZCKFI67 For parking the Document
ZCKFI68 For Posting the Document
Created by
Parks the Data provided in Excel document into Database table custom table Header
(zpark_cust_hdr), item (zpark_cust_itm) and also updates in validating table (zpark_cn_val) for post the
G/L Account for Customer Credit Memo.
ZCKFI68 (Posting the Document):
Fetches data from the respective Header an Item table based on the Customer Number (ACCNT)
and posting the G/L Account for Customer Credit Memo through BAPI
(BAPI_ACC_DOCUMENT_POST).
CHANGES DONE:
Parks the Data provided in Excel document into Respective Database Tables with additional
fields
Cost Centre(KOSTL) [after the field Order Number(AUFNR)]
Tax Code(MWSKZ)
Business Place(BUPLA)
PROGRAM: ZFV75_PARK_CUST_CREDIT_MEMO
Declaration:
START-OF-SELECTION:
Form excel_to_internal_table: (fetch the data from the excel and stores it to internal table)
WHEN '0013'.
MOVE <lfs_excel>-value TO record-kostl.
WHEN '0020'.
MOVE <lfs_excel>-value TO record-bupla.
Form park_customer_credit_note: (stores the data from internal table to Database table)
Calculated amount for all the line item for storing the amount(WRBTR) in the header
table.
Form build_catalog: (for building catalog for displaying the parked data)
PERFORM fldcat USING itname 'BUPLA' 'L' '4' '8' 'Business place'.
Form pick: (for getting the line items for selected header value)
Form build_catalog1: (for building the catalog for displaying line item)
A new field catalog added for Cost Center(KOSTL) and Tax Code(MWSKZ).
TCODE: ZCKFI68
PROGRAM: ZFV75_POST_GL_ACCNT_CUST_CKL
Declaration:
Park_itab: (used when user is going for deleting the parked document)
Park_itab1: (used when user is going for deleting the parked document)
Park_itab2: (used when user is going for deleting the parked document)
START-OF-SELECTION:
Form build_catalog: (for building the fieldcat for displaying the header Information)
PERFORM fldcat USING itname 'BUPLA' 'L' '4' '11' 'Business Place'.
Form Pick: (for fetching the item details based on the seolected header)
Fetches the item details based on the Account Number(accnt) and Reference (xblnr).
The below modified code gets only the header data which matches the selected Row’s Account
Number(accnt) and Reference(xblnr)
Fetching the item details based on the Header’s Account Number(accnt) and Reference (xblnr) .
Form Bild_catalog1: (for building the fieldcat to display the item details)
Added field catalog for displaying three new fields (Cost Centre, Reference Number, Tax Code)
Form posting_gl_account: (for posting the Items fetched)
accountreceivable-businessplace = gl_header-bupla .
Fill the cost center if the orderid for the given ordernumber is not there in the aufk table.
accountgl-costcenter = gl_item-kostl.
Loop at the Internal table that we got in above function Module into a workarea
lv_count = lv_count + 1.
currencyamount-itemno_acc = lv_count.
currencyamount-currency = 'INR'.
currencyamount-amt_doccur = ls_mwdat-wmwst.
currencyamount-amt_base = ls_mwdat-kawrt.
DATA(lv_base_amt) = ls_mwdat-kawrt.
currencyamount-tax_amt = ls_mwdat-wmwst.
accounttax-itemno_acc = lv_count.
accounttax-gl_account = ls_mwdat-hkont.
accounttax-cond_key = ls_mwdat-kschl.
accounttax-acct_key = ls_mwdat-ktosl.
accounttax-tax_code = gl_item-mwskz.
accounttax-itemno_tax = count.
Get the ktosl value of the workarea and store it in a local variable for finding their
respective G/L Account.
Pass a structure name and the Business place(BUPLA) of the line item to extension
wl_extension2-structure = 'ZBAPI_BUPLA'.
wl_extension2-valuepart1 = gl_header-bupla.
Pass a structure name and the KTOSL of the line item to extension
wl_extension2-structure = 'ZKTOSL'.
wl_extension2-valuepart1 = lv_ktosl. " Value
accounttax = accounttax
extension2 = tl_extension2
Modifications done inside BAPI ('CALCULATE_TAX_FROM_GROSSAMOUNT)
In ZBADI_ACC_DOCUMENT_FB60
Read the extension[] table with key structure for Business Place value(BUPLA)
If Successful
Read the extension[] table with key structure for KTOSL value
If Successful
Split the values in the KTOSL valuepart and store it in a Range table
Get the G/L Account from J_1IT030K table where KTOSL in Values in Range
table
If Successful.
Loop at c_accit
Endif
Endif.
Endif.
Form parking_document_delete: (for deleting the line item from database table)
Cost Center
Reference
Tax Code
PERFORM fldcat2 USING itname2 'KOSTL' 'L' '10' '16' 'Cost Center'.