on 2010 Nov 23 3:02 PM
Hi all,
we developed one z program to do the miro using bapi_incominginvoice_create,
But here my problem is i need to populate the withholding tax, for this thing i used the below code.
if withtaxdata[] is initial.
withtaxdata-SPLIT_KEY = '1'.
withtaxdata-WI_TAX_CODE = 'G9'.
withtaxdata-WI_TAX_TYPE = 'G9'.
withtaxdata-WI_TAX_BASE = amount."p_base.
append withtaxdata.
endif.
CALL FUNCTION 'BAPI_INCOMINGINVOICE_CREATE'
EXPORTING
headerdata = headerdata
IMPORTING
invoicedocnumber = invoicedocnumber
fiscalyear = fiscalyear
TABLES
itemdata = itemdata[]
taxdata = taxdata[]
WITHTAXDATA = withtaxdata[]
vendoritemsplitdata = vendoritemsplitdata[]
return = return2[].
with this code iam able to create the invoice. but if go and see the invoice, withholding tax value is zero but iam able to see the
tax type and code there, so why its not picking the base value which i passed from bapi.
Please guys do reply me, <removed by moderator>
Edited by: Thomas Zloch on Nov 23, 2010 4:22 PM - priority normalised
Request clarification before answering.
Olá,
Você precisa enviar todos os impostos referentes ao fornecedor na tabela WITHTAXDATA.
Busque os impostos na tabela LFBW com LIFNR e BUKRS, crie as linhas da tabela WITHTAXDATA com SPLIT_KEY, WI_TAX_TYPE e WI_TAX_CODE, mesmo que deixe os campos de valor vazios.
Você pode consultar o imposto retido na fonte na tabela RBWS.
*SPLIT_KEY, WI_TAX_TYPE são campos chave e não devem se repetir.
LOOP AT lt_lfbw INTO DATA(ls_lfbw) WHERE lifnr EQ lv_lifnr AND bukrs EQ lv_bukrs.
APPEND INITIAL LINE TO lt_withtax ASSIGNING FIELD-SYMBOL(<fs_taxdata>).
<fs_taxdata>-split_key = 1.
<fs_taxdata>-wi_tax_type = ls_lfbw-witht.
<fs_taxdata>-wi_tax_code = ls_lfbw-wt_withcd.
IF ls_lfbw-wt_withcd EQ '03'.
<fs_taxdata>-wi_tax_base = '200'.
ENDIF.
ENDLOOP.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
8 | |
6 | |
6 | |
5 | |
4 | |
4 | |
3 | |
3 | |
3 | |
2 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.