‎2011 Feb 23 6:51 PM
Hello,
I've been searching around here and google, and didn't found a answer for my problem.
The Problem is: When I execute the function BAPI_ACC_DOCUMENT_POST, it returns the error: "No currency information transferred into Accounting". Can somebody help me solving this?
My code:
Moderator message - Please respect the 5,000 character maximum when posting. Post only the relevant portions of code
Edited by: Rob Burbank on Feb 23, 2011 1:58 PM
‎2011 Feb 23 7:00 PM
Moderator message - Welcome to SCN Please read [Rules of Engagement|https://wiki.sdn.sap.com/wiki/display/HOME/RulesofEngagement], and [Asking Good Questions in the Forums to get Good Answers|/people/rob.burbank/blog/2010/05/12/asking-good-questions-in-the-forums-to-get-good-answers] before posting again. Rob
‎2011 Feb 23 7:07 PM
The Code
MOVE: sy-uname TO w_doc_header-username,
w_xbsis-bukrs TO w_doc_header-comp_code,
sy-datum TO w_doc_header-doc_date,
sy-datum TO w_doc_header-pstng_date,
sy-datum TO w_doc_header-trans_date,
'SA' TO w_doc_header-doc_type,
w_xbsis-xblnr TO w_doc_header-ref_doc_no.
"Use the first line of each document number
MOVE: '1' TO w_accgl-itemno_acc,
p_acc TO w_accgl-gl_account,
w_xbsis-gsber TO w_accgl-bus_area,
w_xbsis-oid_extbol TO w_accgl-alloc_nmbr,
w_xbsis-sgtxt TO w_accgl-item_text,
w_xbsis-prctr TO w_accgl-profit_ctr,
w_xbsis-kostl TO w_accgl-costcenter,
'1' TO w_curamount-itemno_acc,
w_xbsis-waers TO w_curamount-currency.
w_curamount-amt_doccur = ( -1 ) * w_xbsis-wrbtr.
MOVE: l_index TO w_accounttax-itemno_acc,
p_acc TO w_accounttax-gl_account,
w_tax_info-ktosl TO w_accounttax-acct_key,
w_tax_info-kschl TO w_accounttax-cond_key ,
w_bseg-mwskz TO w_accounttax-tax_code,
w_tax_info-txjcd TO w_accounttax-taxjurcode,
w_tax_info-txjcd_deep TO w_accounttax-taxjurcode_deep,
w_tax_info-txjlv TO w_accounttax-taxjurcode_level.
w_curamount-amt_base = w_tax_info-KAWRT.
MOVE: l_index TO w_accgl-itemno_acc,
w_del_data-hkont TO w_accgl-gl_account,
w_xbsis-gsber TO w_accgl-bus_area,
w_xbsis-oid_extbol TO w_accgl-alloc_nmbr,
w_del_data-sgtxt TO w_accgl-item_text,
w_del_data-prctr TO w_accgl-profit_ctr,
w_del_data-kostl TO w_accgl-costcenter,
w_del_data-matnr TO w_accgl-material,
w_del_data-werks TO w_accgl-plant,
l_index TO w_curamount-itemno_acc,
w_xbsis-waers TO w_curamount-currency,
w_del_data-wrbtr TO w_curamount-amt_doccur.
MOVE: l_index TO w_accounttax-itemno_acc,
p_acc TO w_accounttax-gl_account,
w_tax_info-ktosl TO w_accounttax-acct_key,
w_tax_info-kschl TO w_accounttax-cond_key ,
w_bseg-mwskz TO w_accounttax-tax_code,
w_tax_info-txjcd TO w_accounttax-taxjurcode,
w_tax_info-txjcd_deep TO w_accounttax-taxjurcode_deep,
w_tax_info-txjlv TO w_accounttax-taxjurcode_level.
w_curamount-amt_base = w_tax_info-KAWRT.
‎2011 Feb 23 7:36 PM
‎2011 Feb 23 7:47 PM
Hello Rob,
TYPE: E
ID: RW
NUMBER: 003
MESSAGE: No currency information transferred into Accounting
Thank You
‎2011 Feb 23 8:25 PM
It doesn't look as if you are passing a table to the table parameter CURRENCYAMOUNT.
Rob
‎2011 Feb 24 11:19 AM
Rob,
Yes, I'm using a table on this parameters.
This is the other part of my code:
loop...
APPEND: w_accgl TO it_accgl,
w_curamount TO it_curamount,
w_accounttax TO it_accounttax.
endloop.
CALL FUNCTION 'BAPI_ACC_DOCUMENT_POST'
EXPORTING
documentheader = w_doc_header
TABLES
accountgl = it_accgl
currencyamount = it_curamount
accounttax = it_accounttax
return = it_return.
‎2011 Feb 24 11:41 AM
Have you tried BAPI_ACC_DOCUMENT_CHECK before posting? It may give you more information.
‎2011 Feb 24 12:45 PM
As Rob mentioned it is the problem related to parameter CURRENCYAMOUNT. See line number 2151 to 2199 of include LACC9F20. You can find the reason for this error.
‎2011 Feb 24 8:30 PM
Hi nicolas,
code looks reasonable.
Did you check in debug mode the consistency of all records of the tables passed to the bapi?
Regards,
Clemens
‎2011 Feb 24 10:12 PM
If you are passing multiple currencies to a single line item ,then pass currency type field (CURR_TYPE) also to BAPI
regards
Vishnu
‎2011 Feb 28 6:33 PM
Problem solved!
I changed the document type from SA to IF and it solved my calculation tax problem.
‎2011 Feb 24 5:47 PM
Hello,
Are you using the field CURRENCY of structure CURRENCYAMOUNT (BAPIACCR09)? If you are using a valid currency code in this field, for each record, the error should not occur.
By the way, BAPI_ACC_DOCUMENT_CHECK gives the same errors (messages in general) as BAPI_ACC_DOCUMENT_POST.
Regards,
Mário Espinheira
‎2011 Feb 24 6:16 PM
Yes, I'm passing the correct values from my itab currency field to the currency structure on BAPI.
I noticed that the include LACC9F20 deletes all data from the currency table, and it doesn't populate the main currency table.
‎2011 Feb 24 6:18 PM
Yes, I'm passing the correct values from my itab currency field to the currency structure on BAPI.
I noticed that the include LACC9F20 deletes all data from the currency table, and it doesn't populate the main currency table.
Becouse of that, it gives me the message with error 003. Anyone knows why, and how can I solve this?