In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-18 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Internet Technology >
Share
Shulou(Shulou.com)05/31 Report--
How to use bapi_acc_document_post instructions, in view of this problem, this article introduces the corresponding analysis and answers in detail, hoping to help more partners who want to solve this problem to find a more simple and feasible method.
Instructions for using bapi_acc_document_post
Bapi_acc_document_post is suitable for creating accounting vouchers. Its function is the same as the front desk FB01, and its output is the accounting voucher number created. This bapi is often used in conjunction with badi ACC_DOCUMENT to implement customized requirements based on standard functionality.
1. Description of common parameters of bapi
Parameter name
Description
Examples of usage
DOCUMENTHEADER
Financial voucher title structure, voucher type, date, etc.
* look up
Ls_documentheader-doc_type = 'SA'. "General ledger account voucher
Ls_documentheader-username = sy-uname.
Ls_documentheader-comp_code = pt_main-bukrs.
Ls_documentheader-doc_date = pt_main-budat_cb.
Ls_documentheader-pstng_date = pt_main-budat_cb.
Ls_documentheader-fisc_year = pt_main-budat_cb+0 (4).
Ls_documentheader-fis_period = pt_main-budat_cb+4 (2).
Ls_documentheader-ref_doc_no = pt_main-belnr. "CO credential
ACCOUNTGL
Store line item information related to the general ledger.
Ls_accountgl-itemno_acc = lv_itemno. "Line item number
Ls_accountgl-item_text = pt_main-kstar_txt. "subject description
Ls_accountgl-gl_account = pt_main-kstar. "subject
Ls_accountgl-costcenter = pt_main-kostl. "cost center
APPEND ls_accountgl TO lt_accountgl.
CLEAR ls_accountgl.
ACCOUNTRECEIVABLE
Store the line item information related to the customer, and special general ledger identification can be set.
Ls_accountreceivable-itemno_acc = 10. "Line item number
Ls_accountreceivable-customer = pt_main-bukrs_in. "transfer party company code
Ls_accountreceivable-sp_gl_ind = 'Egg. "Special general ledger identification
APPEND ls_accountreceivable TO lt_accountreceivable.
CLEAR ls_accountreceivable.
ACCOUNTPAYABLE
Store line item information related to suppliers, and special general ledger identification can be set.
Lv_itemno = lv_itemno + 10.
Ls_accountpayable-itemno_acc = lv_itemno. "Line item number
Ls_accountpayable-vendor_no = pt_main-bukrs. "transfer party company code
Ls_accountpayable-sp_gl_ind = 'Downs. "Special general ledger identification
APPEND ls_accountpayable TO lt_accountpayable.
CLEAR ls_accountpayable.
ACCOUNTTAX
Deposit tax-related line items
* Line item 30 tax
Ls_accounttax-itemno_acc = 30. "Line item number
Ls_accounttax-gl_account = '0022210118. "subject
Ls_accounttax-tax_code ='X3'. "tax code
APPEND ls_accounttax TO lt_accounttax.
CLEAR ls_accounttax.
CURRENCYAMOUNT
Store all line items related to the amount of information, positive and negative corresponding accounting code system can automatically deal with some, such as plus 40, minus 50 and so on.
* * Line item amount setting
Lv_sum = lv_sum * (- 1).
Ls_currencyamount-itemno_acc = lv_itemno. "Line item number
Ls_currencyamount-currency = 'RMB'. "monetary unit
Ls_currencyamount-amt_doccur = lv_sum. "Total amount
APPEND ls_currencyamount TO lt_currencyamount.
CLEAR ls_currencyamount.
two。 Example explanation
Create a voucher through Tcd:FB01 with the following line items (no need to analyze business reasonableness, only from a technical point of view)
Line item number
Subject
Amount
Description
Special general ledger
ten
020101
one thousand
General ledger account
None
twenty
YH50
five hundred
Customer
09E
thirty
YHG3
1590-
Supplier
39E
forty
22210118
ninety
Tax X3, 6%
When posting the above data using bapi, set the following
1. Line item 10 is stored in ACCOUNTGL
2. Line item 20 is deposited as receivable, and the general ledger is marked E
3. Bank item 30 is deposited and payable, and the general ledger is marked D
4. Line item 40 deposit tax, tax base, tax amount and tax code should be filled in.
5. The amount corresponding to lines 10-40 should be deposited into CURRENCYAMOUNT.
For the code, see attachment.
Effect.
Bapi_acc_document_post.docx
The answer to the question on how to use bapi_acc_document_post is shared here. I hope the above content can be of some help to you. If you still have a lot of doubts to be solved, you can follow the industry information channel for more related knowledge.
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.