2007 Dec 06 10:31 PM
When I enter taxes values in BAPI_ACC_DOCUMENT_POST I need to fill out the ACCOUNTTAX structure. Im not clear on two of the fields in the structure: COND_KEY Condition Type and ACCT_KEY - Transaction Key. Im posting an AR Customer Invoice (simulating FB70) with a DOC_TYPE = DR. Im having trouble finding any equivalent sample code or documentation. Anyone know what Im supposed to be using for COND_KEY (MWAS?) or ACCT_KEY (VST?) ??
Thanks for any help,
Karl
When I enter taxes values in BAPI_ACC_DOCUMENT_POST I need to fill out the ACCOUNTTAX structure. Im not clear on two of the fields in the structure: COND_KEY Condition Type and ACCT_KEY - Transaction Key. Im posting an AR Customer Invoice (simulating FB70) with a DOC_TYPE = DR. Im having trouble finding any equivalent sample code or documentation. Anyone know what Im supposed to be using for COND_KEY (MWAS?) or ACCT_KEY (VST?) ??
Thanks for any help,
Karl
2007 Dec 06 11:17 PM
COND_KEY must from the table T685.
You can check the table entries with the
KVEWE = 'A'
KAPPL = 'TX'
You need to pass COND_KEY = KSCHL value.
And the ACCT_KEY = 'VST'.
Check the program <b>ACC_BAPI_TEST_DOCUMENT</b>. It has one data filled in the Tax structure.
Regards,
Naimesh Patel
2007 Dec 07 10:39 PM
Thanks for your help. When I looked up the Condition Types in Table T685 there were many available for AR taxes (AR1-4, JR1-4, UT01-6, XR1-6). I looked in the BSET table for some invoices I created via FB70 and was able to determine that the Condition Type JR1 through JR4 were used and they were the only ones with Access Sequence KOZGF=TAXJ. I ended up having to use Transaction Key / ACCT_KEY = MW1 to get BAPI_ACC_DOCUMENT_POST to work.
My follow up question: Are these Condition Types and Transaction Keys normally on SAP systems? Can I count on customer systems having KSCHL entries for JRn and Transaction Key/KTOSL=MW1 ?
2007 Dec 07 10:46 PM
I think yes. Because if the customer has created any taxcode or taxkey than it might be starting with "Y" or "Z". So, I think you will have them avaliable in your customer system.
Regards,
Naimesh Patel