Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Input tax clearing using bapi_acc_document_post

former_member1125862
Participant
0 Likes
652

Hi Experts,

I am working on input tax clearing for the open documents using BAPI bapi_acc_document_post.

Can any one please suggest me what are the inputs that i have to give to run this BAPI.

I tired this by searching in all the threads in SDN but i am not able to create the document.

Can any one suggest me in doing so.

Waiting for your replaies.

Thanks,

Kruthik

2 REPLIES 2
Read only

Former Member
0 Likes
528

Hi,

In this FM, you need to populate data:

DOCUMENTHEADER

ACCOUNTGL

ACCOUNTTAX

CURRENCYAMOUNT

ACCOUNTPAYABLE

EXTENSION1

DOCUMENTHEADER you need to pass the below:

doc_date, doc_type, comp_code, pstng_date, ref_doc_no, header_txt, username

ACCOUNTGL you need to pass the below values:

wa_accountgl-gl_account

wa_accountgl-itemno_acc

wa_accountgl-item_text

wa_accountgl-bus_area

wa_accountgl-alloc_nmbr

EXTENSION1 you need to pass the below values:

it_extension-field1(3) = wf_cnt. "line item number

it_extension-field1+3(2) = '40'. " Posting key

ACCOUNTTAX:

clear wa_accounttx.

wa_accounttx-itemno_acc

wa_accounttx-tax_code .

wa_accounttx-gl_account

wa_accounttx-acct_key

wa_accounttx-cond_key

wa_accounttx-taxjurcode

wa_accounttx-taxjurcode_deep

wa_accounttx-taxjurcode_level

wa_accounttx-itemno_tax

append wa_accounttx to it_accounttx.

CURRENCYAMOUNT:

it_currencyamount-itemno_acc = wf_cnt. "Line item number

it_currencyamount-amt_doccur = '100.00'. "Amount

it_currencyamount-currency_iso = ''. "Currency

it_currencyamount-curr_type = '00'

ACCOUNTPAYABLE:

wa_accountap-itemno_acc = '001'.

call function 'CONVERSION_EXIT_ALPHA_OUTPUT'

exporting

input = creditor_account

importing

output = creditor_account.

wa_accountap-vendor_no = ''

wa_accountap-item_text = ''

wa_accountap-bus_area = ''

append wa_accountap to it_accountap.

===========================

After populating all the above internal table, first use this FM BAPI_ACC_DOCUMENT_CHECK and then BAPI_ACC_DOCUMENT_POST and then BAPI_TRANSACTION_COMMIT.

Regards,

Ani

Read only

former_member1125862
Participant
0 Likes
528

EXPERTS,

CAN ANY ONE PLEASE HELP ME IN SOLVING THIS ISSUE.

PLEASE.

KRUTHIK